@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@200..900&display=swap");

:root{
  --op-bg:#f7f8fc;
  --op-card:rgba(255,255,255,.88);
  --op-text:#0f172a;
  --op-muted:#64748b;
  --op-line:rgba(15,23,42,.10);
  --op-shadow: 0 18px 40px rgba(2, 6, 23, .08);
  --op-shadow2: 0 10px 26px rgba(2, 6, 23, .06);
  --op-radius:18px;
  --op-primary:#ff6600;
  --op-primary-2:#181818;
}

*{ box-sizing: border-box; }
body{
  margin:0;
  font-family:"Outfit", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--op-bg);
  color: var(--op-text);
}

/* Admin forms: scoped improvements for PM Income/Advance */
body.model-pmincome.change-form #content-main form,
body.model-pmadvance.change-form #content-main form{
  background: #fff;
  border: 1px solid var(--op-line);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--op-shadow2);
}
body.model-pmincome.change-form fieldset.module,
body.model-pmadvance.change-form fieldset.module{
  border: 1px solid var(--op-line);
  border-radius: 14px;
  padding: 12px;
  margin: 0 0 12px 0;
  background: #fff;
}
body.model-pmincome.change-form fieldset.module > h2,
body.model-pmadvance.change-form fieldset.module > h2{
  margin: 0 0 8px 0;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--op-muted);
}
body.model-pmincome.change-form .form-row,
body.model-pmadvance.change-form .form-row{
  padding: 6px 4px;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 10px;
  align-items: center;
}
body.model-pmincome.change-form .form-row > div,
body.model-pmadvance.change-form .form-row > div{
  margin: 0;
}
body.model-pmincome.change-form .form-row label,
body.model-pmadvance.change-form .form-row label{
  font-weight: 800;
  color: var(--op-text);
}
body.model-pmincome.change-form input[type="text"],
body.model-pmincome.change-form input[type="number"],
body.model-pmincome.change-form input[type="email"],
body.model-pmincome.change-form input[type="date"],
body.model-pmincome.change-form input[type="datetime-local"],
body.model-pmincome.change-form input[type="url"],
body.model-pmincome.change-form select,
body.model-pmincome.change-form textarea,
body.model-pmadvance.change-form input[type="text"],
body.model-pmadvance.change-form input[type="number"],
body.model-pmadvance.change-form input[type="email"],
body.model-pmadvance.change-form input[type="date"],
body.model-pmadvance.change-form input[type="datetime-local"],
body.model-pmadvance.change-form input[type="url"],
body.model-pmadvance.change-form select,
body.model-pmadvance.change-form textarea{
  width: 100%;
  min-width: 280px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,.12);
  background: #fff;
  font-weight: 600;
  color: var(--op-text);
}
body.model-pmincome.change-form input:focus,
body.model-pmincome.change-form select:focus,
body.model-pmincome.change-form textarea:focus,
body.model-pmadvance.change-form input:focus,
body.model-pmadvance.change-form select:focus,
body.model-pmadvance.change-form textarea:focus{
  outline: 2px solid rgba(255,102,0,.22);
  border-color: rgba(255,102,0,.45);
}
body.model-pmincome.change-form .related-widget-wrapper,
body.model-pmadvance.change-form .related-widget-wrapper{
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
body.model-pmincome.change-form .related-widget-wrapper select,
body.model-pmadvance.change-form .related-widget-wrapper select{
  flex: 1 1 320px;
}
body.model-pmincome.change-form .related-widget-wrapper-link,
body.model-pmadvance.change-form .related-widget-wrapper-link{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(15,23,42,.12);
  background: #fff;
  padding: 0;
  margin: 0;
}
body.model-pmincome.change-form .checkbox-row,
body.model-pmadvance.change-form .checkbox-row{
  display: flex;
  align-items: center;
  gap: 8px;
}
body.model-pmincome.change-form .submit-row,
body.model-pmadvance.change-form .submit-row{
  background: transparent;
  border: none;
  padding: 8px 0 0 0;
}
@media (max-width: 900px){
  body.model-pmincome.change-form .form-row,
  body.model-pmadvance.change-form .form-row{
    grid-template-columns: 1fr;
  }
  body.model-pmincome.change-form .related-widget-wrapper select,
  body.model-pmadvance.change-form .related-widget-wrapper select{
    flex: 1 1 100%;
  }
}

.app-hero{
  border: 1px solid var(--op-line);
  border-radius: var(--op-radius);
  background:
    radial-gradient(900px 240px at 10% 0%, rgba(255,102,0,.14), transparent 60%),
    radial-gradient(900px 240px at 85% 0%, rgba(24,24,24,.10), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,.85), rgba(255,255,255,.55));
  box-shadow: var(--op-shadow);
  padding: 18px;
  margin-bottom: 16px;
}
.app-hero-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.app-hero-title{
  margin:0;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -.02em;
  color: var(--op-primary-2);
}
.app-hero-sub{
  margin: 8px 0 0 0;
  color: var(--op-muted);
  font-size: .95rem;
  max-width: 82ch;
}
.app-hero-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

/* Admin heading layout */
#content{
  position: relative;
}
#content > h1{
  margin: 0 0 16px;
  padding: 16px 18px;
  border-radius: var(--op-radius);
  border: 1px solid var(--op-line);
  background:
    radial-gradient(900px 240px at 10% 0%, rgba(255,102,0,.14), transparent 60%),
    radial-gradient(900px 240px at 85% 0%, rgba(24,24,24,.10), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,.85), rgba(255,255,255,.55));
  box-shadow: var(--op-shadow);
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--op-primary-2);
  padding-right: 220px;
}
#content .object-tools{
  position: absolute;
  top: 16px;
  right: 16px;
}
#content .object-tools ul{
  margin: 0;
  padding: 0;
  display: flex;
  gap: 10px;
  list-style: none;
}
#content .object-tools li{
  margin: 0;
  padding: 0;
}
#content .object-tools a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(255,255,255,.85);
  color: var(--op-primary-2);
  font-weight: 800;
  font-size: .9rem;
  text-decoration:none;
  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
}
#content .object-tools a:hover{
  transform: translateY(-1px);
  filter: brightness(1.02);
  box-shadow: 0 10px 20px rgba(2,6,23,.08);
}
#content .object-tools .addlink,
#content .object-tools .historylink,
#content .object-tools .viewsitelink,
#content .object-tools .add,
#content .object-tools .viewlink,
#content .object-tools .changelink{
  background: linear-gradient(180deg, #ff7a1a, #ff6600);
  border-color: rgba(255,102,0,.35);
  color: #fff;
  box-shadow: 0 12px 20px rgba(255,102,0,.20);
}
#content:has(.hero) > h1,
#content:has(.portal-dashboard) > h1,
#content:has(.dash-wrap) > h1{
  display: none;
}
#content:has(.hero) .object-tools,
#content:has(.portal-dashboard) .object-tools,
#content:has(.dash-wrap) .object-tools{
  position: static;
}

/* Admin buttons and submit row */
body.change-form .submit-row input[type="submit"],
body.change-form .submit-row a,
body.change-form .submit-row .button,
body.change-list .actions .button,
body.change-list .actions input[type="submit"],
body.change-list .actions a.button,
.button,
input[type="submit"].default,
input[type="submit"].button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(255,255,255,.85);
  color: var(--op-primary-2);
  font-weight: 800;
  font-size: .9rem;
  text-decoration:none;
  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
}
body.change-form .submit-row input[type="submit"].default,
input[type="submit"].default,
.button.default{
  background: linear-gradient(180deg, #ff7a1a, #ff6600);
  border-color: rgba(255,102,0,.35);
  color: #fff;
  box-shadow: 0 12px 20px rgba(255,102,0,.20);
}
body.change-form .submit-row input[type="submit"]:hover,
body.change-form .submit-row a:hover,
body.change-form .submit-row .button:hover,
body.change-list .actions .button:hover,
body.change-list .actions input[type="submit"]:hover,
body.change-list .actions a.button:hover,
.button:hover,
input[type="submit"].default:hover{
  transform: translateY(-1px);
  filter: brightness(1.02);
  box-shadow: 0 10px 20px rgba(2,6,23,.08);
}
body.change-form .submit-row .deletelink,
.deletelink{
  border-color: rgba(239,68,68,.35);
  color: #b91c1c;
  background: rgba(239,68,68,.08);
}
body.change-form .submit-row .deletelink:hover,
.deletelink:hover{
  box-shadow: 0 10px 20px rgba(239,68,68,.18);
}

.app-chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.78);
  color: var(--op-primary-2);
  font-weight: 900;
  font-size: .86rem;
  text-decoration:none;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.app-chip:hover{
  transform: translateY(-1px);
  border-color: rgba(255,102,0,.40);
  box-shadow: 0 14px 26px rgba(255,102,0,.12);
}
.app-chip.primary{
  border-color: rgba(255,102,0,.22);
  background: rgba(255,102,0,.10);
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(255,255,255,.85);
  color: var(--op-primary-2);
  font-weight: 800;
  font-size: .9rem;
  text-decoration:none;
  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
}
.btn:hover{
  transform: translateY(-1px);
  filter: brightness(1.02);
  box-shadow: 0 10px 20px rgba(2,6,23,.08);
}
.btn.full{
  width: 100%;
}
.btn.primary,
.btn-primary{
  background: linear-gradient(180deg, #ff7a1a, #ff6600);
  border-color: rgba(255,102,0,.35);
  color: #fff;
  box-shadow: 0 12px 20px rgba(255,102,0,.20);
}
.btn.secondary,
.btn-secondary{
  background: #fff;
  border-color: rgba(0,0,0,.12);
  color: #111827;
}
.btn-pill{
  border-radius: 999px;
  padding: 10px 26px;
}

/* Admin changelist layout: filters right, search underneath */
#changelist{
  display:grid;
  
  gap: 16px;
}
#changelist #changelist-filter{
  grid-column: 2;
  grid-row: 1;
}
#changelist #changelist-search{
  grid-column: 2;
  grid-row: 2;
}
#changelist #toolbar,
#changelist #changelist-form,
#changelist .results,
#changelist .paginator,
#changelist .actions{
  grid-column: 1;
}
@media (max-width: 1100px){
  #changelist{
    grid-template-columns: 1fr;
  }
  #changelist #changelist-filter,
  #changelist #changelist-search{
    grid-column: 1;
  }
}

/* MARKER_123 */
.lg\:hover\:shadow-raised:hover,
.lg\:dark\:hover\:shadow-raised-dark:hover {
  box-shadow: none !important;
}
.lg\:hover\:z-20:hover {
  z-index: auto !important;
}

/* Sidebar */
#nav-sidebar-inner{
  position: relative;
 
}
#nav-sidebar-inner::before{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(180deg, rgba(255,255,255,.75), rgba(255,255,255,0));
  pointer-events:none;
}
#nav-sidebar-inner > :first-child{
  background: #fff;
  border-bottom: 1px solid rgba(15,23,42,.08);
  position: relative;
  z-index: 1;
}

#nav-sidebar-inner h2{
  font-size:.7rem;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:#94a3b8;
}
#nav-sidebar-inner ol{
  gap: 4px;
}
#nav-sidebar-inner ol a{
  position: relative;
  height: 42px;
  margin: 2px 0;
  padding: 0 14px;
  border-radius: 14px;
  color: #1f2937;
  background: transparent;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
#nav-sidebar-inner ol a:hover{
  background: rgba(255,255,255,.75);
  color: #0f172a;
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(2,6,23,.10);
}
#nav-sidebar-inner ol a::before{
  content:"";
  position:absolute;
  left:-8px;
  width:4px;
  height:60%;
  border-radius:999px;
  background: linear-gradient(180deg, #ff7a1a, #ff6600);
  opacity:0;
  transition: opacity .2s ease;
}
#nav-sidebar-inner ol a[aria-current="page"],
#nav-sidebar-inner ol a.bg-base-100{
  background: linear-gradient(135deg, rgba(255,122,26,.20), rgba(255,102,0,.08));
  color: #0f172a;
  font-weight: 800;
  box-shadow: 0 14px 28px rgb(255 102 0 / 3%);
}
#nav-sidebar-inner ol a[aria-current="page"]::before,
#nav-sidebar-inner ol a.bg-base-100::before{
  opacity:1;
}
#nav-sidebar-inner ol a .material-symbols-outlined{
  width:28px;
  height:28px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:9px;
  background: rgba(255,255,255,.85);
  color:#0f172a;
  box-shadow: inset 0 0 0 1px rgba(15,23,42,.08);
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
#nav-sidebar-inner ol a:hover .material-symbols-outlined,
#nav-sidebar-inner ol a[aria-current="page"] .material-symbols-outlined,
#nav-sidebar-inner ol a.bg-base-100 .material-symbols-outlined{
  background: rgba(255,102,0,.16);
  color: #ff6600;
  transform: translateY(-1px);
}
.nav-logout{
  margin-top:auto;
  padding: 16px;
}
.nav-logout-btn{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:12px 14px;
  border-radius:14px;
  background: linear-gradient(180deg, #ff7a1a, #ff6600);
  color:#ffffff;
  font-weight:900;
  border:1px solid rgba(255,102,0,.45);
  cursor:pointer;
  box-shadow: 0 14px 26px rgba(255,102,0,.25);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.nav-logout-btn:hover{
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 16px 30px rgba(255,102,0,.30);
}

/* Floating assistant button */
.assistant-fab{
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #ff7a1a, #ff6600);
  color: #fff;
  border: 1px solid rgba(255,102,0,.45);
  box-shadow: 0 16px 30px rgba(255,102,0,.30);
  text-decoration: none;
  z-index: 9999;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.assistant-fab:hover{
  transform: translateY(-2px);
  filter: brightness(1.04);
  box-shadow: 0 18px 34px rgba(255,102,0,.38);
}
.assistant-fab .material-symbols-outlined{
  font-size: 24px;
}

.assistant-popup{
  position: fixed;
  right: 22px;
  bottom: 90px;
  width: 360px;
  max-width: calc(100vw - 36px);
  display: none;
  z-index: 9998;
}
.assistant-popup.open{
  display: block;
}
.assistant-card{
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 28px 60px rgba(15,23,42,.18);
  border: 1px solid rgba(15,23,42,.08);
  overflow: hidden;
}
.assistant-head{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(15,23,42,.08);
  background: #fff;
}
.assistant-avatar{
  width: 50px;
  height: 50px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffe7d6, #fff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: #111827;
  position: relative;
}
.assistant-status{
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #22c55e;
  border: 2px solid #fff;
}
.assistant-meta{
  flex: 1;
}
.assistant-name{
  font-weight: 900;
  color: #111827;
  font-size: 1.05rem;
}
.assistant-online{
  color: #6b7280;
  font-size: .9rem;
}
.assistant-close{
  border: none;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
  color: #6b7280;
}
.assistant-body{
  padding: 16px;
  background: #fff;
}
.assistant-time{
  text-align: center;
  font-size: .85rem;
  color: #94a3b8;
  margin-bottom: 12px;
}
.assistant-bubble{
  background: #f3f4f6;
  padding: 12px 14px;
  border-radius: 16px;
  display: inline-block;
  font-weight: 600;
  color: #111827;
  margin-bottom: 12px;
}
.assistant-answer{
  background: #fff7ed;
  border: 1px solid rgba(255,102,0,.18);
  padding: 10px 12px;
  border-radius: 12px;
  color: #9a3412;
  font-weight: 700;
}
.assistant-input{
  display: flex;
  gap: 8px;
  padding: 12px 14px 16px;
  border-top: 1px solid rgba(15,23,42,.08);
  background: #fff;
}
.assistant-input input{
  flex: 1;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,.12);
  padding: 10px 12px;
}
.assistant-input button{
  border-radius: 12px;
  border: 1px solid rgba(255,102,0,.35);
  background: linear-gradient(180deg, #ff7a1a, #ff6600);
  color: #fff;
  font-weight: 900;
  padding: 10px 14px;
  cursor: pointer;
}

.nav-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:20px;
  height:20px;
  padding:0 6px;
  margin-left:8px;
  border-radius:999px;
  font-size:10px;
  font-weight:900;
  color:#fff;
  background:linear-gradient(135deg,#ff7a1a,#ff6600);
  box-shadow:0 6px 12px rgba(255,102,0,.25);
}
