
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  
  --teal:     #0D9488;
  --teal-d:   #0F766E;
  --teal-l:   #F0FDFA;
  --teal-mid: #CCFBF1;

  
  --amber:    #D97706;
  --amber-l:  #FFFBEB;
  --red:      #DC2626;
  --red-l:    #FEF2F2;
  --green:    #16A34A;
  --green-l:  #F0FDF4;
  --blue:     #2563EB;
  --blue-l:   #EFF6FF;
  --purple:   #7C3AED;
  --purple-l: #F5F3FF;
  --orange:   #EA580C;
  --orange-l: #FFF7ED;

  
  --ink:  #111827;
  --ink2: #1F2937;
  --muted: #6B7280;
  --light: #9CA3AF;

  
  --border:   #E5E7EB;
  --border2:  #D1D5DB;
  --bg:       #F8FAFC;
  --surface:  #FFFFFF;
  --surface2: #F1F5F9;

  
  --sidebar:     260px;
  --radius:      8px;
  --radius-lg:   14px;
  --radius-xl:   20px;
  --shadow:      0 2px 12px rgba(0,0,0,.06);
  --shadow-lg:   0 8px 30px rgba(0,0,0,.1);

  
  --z-sidebar:   100;
  --z-topbar:    40;
  --z-overlay:   900;
  --z-fill:      800;
  --z-toast:     9999;
  --z-login:     9999;
}


body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  min-height: 100vh;
}

a {
  text-decoration: none !important;
  color: inherit;
}

#deduction-confirm-modal {
    z-index: 9999 !important; 
}




#login-screen {
  position: fixed;
  inset: 0;
  z-index: var(--z-login);
 background:url(bg.png) center/cover no-repeat;
  display: none; 
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#login-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 15% 85%, rgba(255,255,255,.04) 0%, transparent 40%),
    radial-gradient(circle at 85% 15%, rgba(255,255,255,.06) 0%, transparent 35%);
  pointer-events: none;
}

#login-screen::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(56,189,248,0.12), transparent);
  border-radius: 50%;
  top: -100px;
  right: -100px;
  pointer-events: none;
}

.login-box {
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 28px;
  padding: 44px 40px;
  width: 90%;
  max-width: 420px;
  position: relative;
  z-index: 1;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4),
              inset 0 1px 0 rgba(255,255,255,0.2);
}

.login-box::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 28px;
  background: linear-gradient(135deg,
    rgba(255,255,255,0.08) 0%,
    rgba(255,255,255,0.02) 100%);
  pointer-events: none;
}

.login-logo {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2),
              inset 0 1px 0 rgba(255,255,255,0.3);
}

.login-logo img { height: 72px; }

.login-box h2 {
  color: #F8FAFC;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
}

#startup-loader{
  position: fixed;
  inset: 0;
 background:linear-gradient(135deg,#0F172A 0%,#1E3A5F 50%,#0F172A 100%);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:9999;
}

.loader-box{
  text-align:center;
  color:#fff;
  font-family:sans-serif;
}


.loader-logo{
  width:90px;
  margin-bottom:20px;
  animation:floatLogo 2s ease-in-out infinite;
}


.rgb-loader{
  display:flex;
  justify-content:center;
  gap:10px;
  margin:15px 0;
}

.rgb-loader span{
  width:12px;
  height:12px;
  border-radius:50%;
  animation: bounce 0.6s infinite alternate;
}


.rgb-loader span:nth-child(1){
  background:#ef4444; 
  animation-delay:0s;
}
.rgb-loader span:nth-child(2){
  background:#22c55e; 
  animation-delay:0.2s;
}
.rgb-loader span:nth-child(3){
  background:#3b82f6; 
  animation-delay:0.4s;
}


@keyframes bounce{
  from{ transform: translateY(0); opacity:0.6;}
  to{ transform: translateY(-10px); opacity:1;}
}

@keyframes floatLogo{
  0%,100%{ transform: translateY(0);}
  50%{ transform: translateY(-8px);}
}


.loading-text{
  font-size:13px;
  opacity:0.8;
  margin-top:10px;
  letter-spacing:0.5px;
}


.login-box p {
  color: rgba(148, 163, 184, 0.9);
  text-align: center;
  margin-bottom: 20px;
  margin-top:10px;
  font-size: 13px;
}

.google-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 14px;
  padding: 13px 20px;
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2),
              inset 0 1px 0 rgba(255,255,255,0.8);
}

.google-btn:hover {
  background: rgba(255, 255, 255, 1);
  color:#062e4f;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.google-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
  pointer-events: none;
}

.google-btn img { width: 20px; }

.login-note {
  margin-top: 14px;
  text-align: center;
  font-size: 11.5px;
  color: var(--light);
  line-height: 1.5;
}


.ln-box {
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  text-align: left;
}

.ln-icon   { font-size: 26px; flex-shrink: 0; line-height: 1; }
.ln-title  { font-size: 13px; font-weight: 800; margin-bottom: 4px; line-height: 1.3; }
.ln-body   { font-size: 12px; line-height: 1.65; opacity: .9; }

.ln-banned    { background: linear-gradient(135deg,#FEF2F2,#FFE4E4); border: 1.5px solid #FECACA; color: #7F1D1D; }
.ln-pending   { background: linear-gradient(135deg,#FFFBEB,#FEF3C7); border: 1.5px solid #FDE68A; color: #78350F; }
.ln-not-found { background: linear-gradient(135deg,#EFF6FF,#DBEAFE); border: 1.5px solid #BFDBFE; color: #1E3A5F; }
.ln-error     { background: linear-gradient(135deg,#F5F3FF,#EDE9FE); border: 1.5px solid #DDD6FE; color: #3B0764; }

.ln-try-again {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  padding: 6px 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  background: rgba(0,0,0,.1);
  color: inherit;
  transition: all .15s;
}
.ln-try-again:hover { background: rgba(0,0,0,.18); }


.banned-notice-wrapper {
  background: #fff;
  border-radius: 24px;
  padding: 40px 30px;
  text-align: center;
  max-width: 450px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}

.banned-icon   { font-size: 60px; margin-bottom: 20px; display: block; }
.banned-title  { font-family: 'Sora', sans-serif; font-size: 22px; color: #DC2626; margin-bottom: 12px; font-weight: 800; }

.banned-reason-box {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: 12px;
  padding: 16px;
  margin: 20px 0;
  text-align: left;
}

.banned-reason-label {
  font-size: 11px;
  text-transform: uppercase;
  color: #991B1B;
  font-weight: 800;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 6px;
}

.banned-reason-text { color: #B91C1C; font-size: 14px; font-weight: 600; line-height: 1.5; }


#app { display: none; min-height: 100vh; }


.sidebar {
  width: var(--sidebar);
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
  z-index: 1000;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transition: width .3s cubic-bezier(.4,0,.2,1);
  z-index: var(--z-sidebar);
}

.sidebar::-webkit-scrollbar        { width: 4px; }
.sidebar::-webkit-scrollbar-thumb  { background: var(--border); border-radius: 3px; }


.sidebar.minimized { width: 80px; }

.sidebar.minimized .sb-brand-name,
.sidebar.minimized .sb-brand-sub,
.sidebar.minimized .sb-name,
.sidebar.minimized .sb-biz,
.sidebar.minimized #sb-email,
.sidebar.minimized .sb-meta-row,
.sidebar.minimized .nav-section,
.sidebar.minimized .nav-badge,
.sidebar.minimized .nav-badge-red,
.sidebar.minimized .logout-btn {
  display: none !important;
}

.sidebar.minimized .sb-agent-card { padding: 10px 5px; text-align: center; }
.sidebar.minimized .sb-agent-top  { justify-content: center; }

.sidebar.minimized .nav-item {
  justify-content: center;
  padding: 12px 0;
  font-size: 0;
}

.sidebar.minimized i { margin-right: 0; font-size: 20px; }


.sidebar-toggle {
  position: absolute;
  right: -2px;
  top: 20px;
  margin-right: 5px;
  width: 26px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  transition: .3s;
  box-shadow: 0 2px 5px rgba(0,0,0,.1);
}

.sidebar-toggle:hover {
  transform: scale(1.1);
  background: var(--teal-d);
}


.sb-brand {
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sb-brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--teal), #5EEAD4);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.brand-icon img {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(37,99,235,.4);
  border-radius: 50%;
}

.sb-brand-name { font-family: 'Sora', sans-serif; font-size: 15px; font-weight: 700; line-height: 1.2; }
.sb-brand-sub  { font-size: 10px; color: var(--muted); }

.sb-agent-card {
  margin: 12px 10px;
  background: var(--teal-l);
  border: 1px solid var(--teal-mid);
  border-radius: 14px;
  padding: 14px;
}

.sb-agent-top   { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }

.sb-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--teal-mid);
}

.sb-avatar-ph {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--teal), #5EEAD4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  flex-shrink: 0;
  font-family: 'Sora', sans-serif;
}

.sb-name { font-size: 13px; font-weight: 700; line-height: 1.3; color: var(--ink); }
.sb-biz  { font-size: 11px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sb-meta-row { display: flex; gap: 6px; flex-wrap: wrap; }

.sb-chip         { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 20px; }
.chip-verified   { background: var(--green-l);  color: var(--blue); }
.chip-active     { background: var(--teal-l);   color: var(--blue); border: 1px solid var(--teal-mid); }
.chip-cat        { background: var(--green-l);  color: var(--blue); }
.chip-district   { background: var(--blue-l);   color: var(--blue); }

.nav-section {
  padding: 14px 16px 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--light);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  margin: 2px 8px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  transition: all .15s;
}

.nav-item:hover  { background: var(--bg);   color: var(--ink); }
.nav-item.active { background: var(--teal-l); color: var(--teal-d); font-weight: 700; }

.nav-icon        { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.nav-badge       { margin-left: auto; background: var(--teal); color: #fff; font-size: 10px; font-weight: 800; padding: 1px 7px; border-radius: 20px; }
.nav-badge-red   { margin-left: auto; background: var(--red);  color: #fff; font-size: 10px; font-weight: 800; padding: 1px 7px; border-radius: 20px; display: none; }

.sb-footer     { margin-top: auto; padding: 14px 8px; border-top: 1px solid var(--border); }

.logout-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 8px;
  color: var(--red);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  width: 100%;
  background: none;
  border: none;
  font-family: inherit;
}
.logout-btn:hover { background: var(--red-l); }

.logout-btn{
  font-size: 15px;
}

.main {
  margin-left: var(--sidebar);
  width: calc(100% - var(--sidebar));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: all .3s ease;
}

.sidebar.minimized ~ .main,
body:has(.sidebar.minimized) .main {
  margin-left: 80px;
  width: calc(100% - 80px);
}


.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 64px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: var(--z-topbar);
  box-shadow: var(--shadow);
}

.topbar-title  { font-family: 'Sora', sans-serif; font-size: 18px; font-weight: 700; color: var(--ink); }
.topbar-right  { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.status-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.chip-ok     { background: var(--green-l); color: var(--green); }
.chip-warn   { background: var(--amber-l); color: var(--amber); }


.content { padding: 24px 28px; flex: 1; }
.page        { display: none; }
.page.active { display: block; }


.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

.scard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: all .2s;
}

.scard:hover { box-shadow: var(--shadow); transform: translateY(-1px); }

.scard-accent {
  position: absolute;
  bottom: -16px;
  right: -16px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  opacity: .08;
}


.sc-teal  .scard-accent { background: var(--teal);  }
.sc-blue  .scard-accent { background: var(--blue);  }
.sc-amber .scard-accent { background: var(--amber); }

.scard i {
  font-size: 20px;
  color: rgb(3, 121, 168);
}
.scard-val   { font-family: 'Sora', sans-serif; font-size: 32px; font-weight: 700; line-height: 1; }
.sc-teal  .scard-val { color: var(--teal);  }
.sc-blue  .scard-val { color: var(--blue);  }
.sc-amber .scard-val { color: var(--amber); }
.scard-label { font-size: 12px; color: var(--muted); margin-top: 5px; font-weight: 500; }


.sc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.sc-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sc-head-icon {
  width: 32px;
  height: 32px;
  background: var(--teal-l);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.sc-head h3 { font-family: 'Sora', sans-serif; font-size: 14px; font-weight: 700; }
.sc-body    { padding: 18px 20px; }


table  { width: 100%; border-collapse: collapse; }
thead  { background: var(--bg); }

th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 12px 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

tr:last-child td { border-bottom: none; }
tr:hover td      { background: rgba(13,148,136,.02); }


.badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.b-active  { background: var(--green-l);  color: var(--green);  } .b-active::before  { background: var(--green);  }
.b-hidden  { background: var(--red-l);    color: var(--red);    } .b-hidden::before  { background: var(--red);    }
.b-teal    { background: var(--teal-l);   color: var(--teal-d); } .b-teal::before    { background: var(--teal);   }
.b-blue    { background: var(--blue-l);   color: var(--blue);   } .b-blue::before    { background: var(--blue);   }
.b-amber   { background: var(--amber-l);  color: var(--amber);  } .b-amber::before   { background: var(--amber);  }
.b-purple  { background: var(--purple-l); color: var(--purple); } .b-purple::before  { background: var(--purple); }
.b-orange  { background: var(--orange-l); color: var(--orange); } .b-orange::before  { background: var(--orange); }


.btn {
  padding: 8px 16px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 12px;
  font-family: inherit;
  transition: all .15s;
  display: inline-flex;
  margin-bottom: 5px;
  align-items: center;
  gap: 5px;
}

.btn:disabled { opacity: .55; cursor: not-allowed; }

.btn-teal   { background: var(--teal);   color: #fff; box-shadow: 0 2px 8px rgba(13,148,136,.2); } .btn-teal:hover:not(:disabled)   { background: var(--teal-d); }
.btn-red    { background: var(--red);    color: #fff; }                                              .btn-red:hover:not(:disabled)    { background: #B91C1C; }
.btn-ghost  { background: var(--bg);     border: 1px solid var(--border); color: var(--ink2); }     .btn-ghost:hover:not(:disabled)  { background: var(--border); }
.btn-blue   { background: var(--blue);   color: #fff; }                                              .btn-blue:hover:not(:disabled)   { background: #1D4ED8; }
.btn-amber  { background: var(--amber);  color: #fff; }                                              .btn-amber:hover:not(:disabled)  { background: #B45309; }
.btn-green  { background: var(--green);  color: #fff; }                                              .btn-green:hover:not(:disabled)  { background: #15803D; }

.btn-sm  { padding: 5px 11px; font-size: 11px; border-radius: 6px; }
.btn-lg  { padding: 12px 20px; font-size: 13px; border-radius: 10px; }
.btn-w   { width: 100%; justify-content: center; }


.fg         { margin-bottom: 15px; }
.fg label   { display: block; font-size: 12px; font-weight: 700; color: var(--ink2); margin-bottom: 6px; }
.fg label .opt { font-weight: 400; color: var(--muted); }

.fc {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: all .15s;
  background: #fff;
  color: var(--ink);
}

.fc:focus        { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(13,148,136,.08); }
.fc::placeholder { color: var(--light); }
.fc:disabled     { background: var(--bg); color: var(--muted); cursor: not-allowed; opacity: .8; }

textarea.fc { min-height: 88px; resize: vertical; line-height: 1.5; }

select.fc {
  cursor: pointer;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239CA3AF' fill='none' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

select.fc:disabled { cursor: not-allowed; }

.field-error { border: 2px solid var(--red) !important; background: var(--red-l) !important; }


.rich-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 8px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
}

.tb-btn {
  padding: 5px 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: none;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  color: var(--ink2);
  transition: all .15s;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 28px;
}

.tb-btn:hover  { background: #fff; border-color: var(--border); color: var(--ink); }
.tb-btn.active { background: #fff; border-color: var(--teal-mid); color: var(--teal-d); font-weight: 700; }

.tb-sep {
  width: 1px;
  background: var(--border);
  margin: 2px 4px;
  align-self: stretch;
}

.tb-select {
  padding: 3px 7px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 12px;
  color: var(--ink2);
  background: #fff;
  cursor: pointer;
  height: 28px;
  outline: none;
}
.tb-select:focus { border-color: var(--teal); }

.color-picker-wrap { position: relative; display: inline-flex; }

.color-picker-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink2);
  height: 28px;
  font-family: inherit;
  transition: all .15s;
}
.color-picker-btn:hover { border-color: var(--teal); color: var(--teal-d); }

.color-dot  { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid rgba(0,0,0,.15); flex-shrink: 0; }

.color-dropdown {
  display: none;
  position: absolute;
  top: 34px;
  left: 0;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  box-shadow: var(--shadow-lg);
  z-index: 200;
  gap: 6px;
  flex-wrap: wrap;
  width: 160px;
}
.color-dropdown.open { display: flex; }

.color-swatch {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .15s;
  flex-shrink: 0;
}
.color-swatch:hover    { transform: scale(1.18); border-color: rgba(0,0,0,.25); }
.color-swatch.selected { border-color: var(--ink); transform: scale(1.1); }

.editor-instruction {
  background: linear-gradient(135deg, #EFF6FF, #DBEAFE);
  border: 1px solid #BFDBFE;
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 8px;
  font-size: 11.5px;
  color: #1E40AF;
  display: flex;
  gap: 7px;
  align-items: flex-start;
  line-height: 1.5;
}

.rich-editor {
  width: 100%;
  min-height: 120px;
  max-height: 300px;
  overflow-y: auto;
  padding: 10px 13px;
  border: 1.5px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  line-height: 1.6;
  background: #fff;
  color: var(--ink);
}

.rich-editor:focus       { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(13,148,136,.08); }
.rich-editor:empty::before { content: attr(data-placeholder); color: var(--light); pointer-events: none; }

.rich-editor h1  { font-size: 22px; font-weight: 800; margin: .5em 0; }
.rich-editor h2  { font-size: 18px; font-weight: 700; margin: .5em 0; }
.rich-editor h3  { font-size: 15px; font-weight: 700; margin: .4em 0; }
.rich-editor ul  { padding-left: 20px; margin: .3em 0; }
.rich-editor ol  { padding-left: 20px; margin: .3em 0; }
.rich-editor blockquote { border-left: 3px solid var(--teal); padding-left: 12px; color: var(--muted); margin: .4em 0; font-style: italic; }
.rich-editor a   { color: var(--blue); text-decoration: underline; }
.rich-editor img { max-width: 100%; border-radius: 6px; }
.rich-editor table    { border-collapse: collapse; width: 100%; margin: .5em 0; }
.rich-editor table td,
.rich-editor table th { border: 1px solid var(--border); padding: 6px 10px; }
.rich-editor table th { background: var(--bg); font-weight: 700; }

.char-count { font-size: 11px; color: var(--light); text-align: right; margin-top: 4px; }


.notif-banner {
  background: linear-gradient(135deg, #F0FDFA, #CCFBF1);
  border: 1px solid #99F6E4;
  border-radius: 10px;
  padding: 11px 14px;
  margin-bottom: 16px;
  font-size: 12px;
  color: #0F766E;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.5;
}
.notif-banner strong { font-weight: 700; }


.expiry-row   { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.expiry-badge { padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.expiry-active  { background: var(--green-l);  color: var(--green); }
.expiry-soon    { background: var(--amber-l);  color: var(--amber); }
.expiry-expired { background: var(--red-l);    color: var(--red); }
.expiry-none    { background: var(--bg);        color: var(--muted); border: 1px solid var(--border); }


.compress-info {
  background: linear-gradient(135deg, #ECFDF5, #D1FAE5);
  border: 1px solid #A7F3D0;
  border-radius: 8px;
  padding: 7px 12px;
  margin-top: 7px;
  font-size: 11.5px;
  color: #065F46;
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
}

.locked-field   { position: relative; }
.lock-icon      { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 13px; pointer-events: none; }

.locked-notice {
  background: var(--amber-l);
  border: 1px solid #FDE68A;
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.locked-notice-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.locked-notice-text { font-size: 12px; color: #92400E; line-height: 1.6; }
.locked-notice-text strong { display: block; font-size: 13px; margin-bottom: 2px; }


.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(17,24,39,.5);
  z-index: var(--z-overlay);
  z-index: 9999 !important;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.overlay.open { display: flex; }

.modal {
  background: var(--surface);
  border-radius: var(--radius-xl);
  max-width: 660px;
  width: 92%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: mIn .22s cubic-bezier(.4,0,.2,1);
}

@keyframes mIn {
  from { transform: scale(.96) translateY(8px); opacity: 0; }
  to   { transform: scale(1)   translateY(0);   opacity: 1; }
}

.m-head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.m-head h3 { font-family: 'Sora', sans-serif; font-size: 16px; font-weight: 700; }

.m-close {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 7px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 14px;
  color: var(--muted);
  transition: all .15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.m-close:hover { background: var(--red-l); color: var(--red); border-color: var(--red); }

.m-body { padding: 20px 24px; overflow-y: auto; flex: 1; }
.m-body::-webkit-scrollbar       { width: 4px; }
.m-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.cat-banner {
  background: var(--purple-l);
  border: 1px solid #DDD6FE;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 16px;
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: var(--purple);
  font-weight: 600;
}

.img-wrap            { position: relative; margin-top: 8px; display: none; }
.img-wrap.show       { display: block; }
.img-wrap img        { width: 100%; height: 160px; object-fit: cover; border-radius: 10px; border: 1.5px solid var(--border); }
.img-rm {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  background: rgba(0,0,0,.55);
  border: none;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}


.profile-hero {
  background: linear-gradient(135deg, var(--teal), var(--teal-d));
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  color: #fff;
}

.profile-avatar-wrap { position: relative; flex-shrink: 0; }

.profile-avatar {
  width: 82px;
  height: 82px;
  border-radius: 18px;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,.3);
}

.profile-avatar-ph {
  width: 82px;
  height: 82px;
  border-radius: 18px;
  background: rgba(255,255,255,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  font-weight: 900;
  font-family: 'Sora', sans-serif;
  color: #fff;
  border: 3px solid rgba(255,255,255,.3);
}

.profile-edit-btn {
  position: absolute;
  bottom: -6px;
  right: -6px;
  width: 28px;
  height: 28px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
  border: none;
}

.profile-name { font-family: 'Sora', sans-serif; font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.profile-biz  { font-size: 14px; opacity: .85; margin-bottom: 8px; }
.profile-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.profile-tag  { background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.2); padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }

.verified-badge-hero {
  background: rgba(255,255,255,.25);
  border: 1px solid rgba(255,255,255,.35);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}


.info-grid        { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.info-item        { border-radius: 10px; padding: 14px; }
.info-item-label  { font-size: 10px; font-weight: 700; color: var(--muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .5px; }
.info-item-val    { font-size: 13px; font-weight: 600; word-break: break-all; }


.post-mini {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px;
  margin-bottom: 8px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.post-mini-img {
  width: 56px; height: 44px;
  object-fit: cover;
  border-radius: 7px;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.post-mini-img-ph {
  width: 56px; height: 44px;
  background: var(--teal-l);
  border-radius: 7px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.post-mini-info              { flex: 1; min-width: 0; }
.post-mini-info strong       { font-size: 13px; font-weight: 700; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-mini-info span         { font-size: 11px; color: var(--muted); }


.no-perm       { text-align: center; padding: 60px 20px; }
.no-perm .icon { font-size: 52px; margin-bottom: 14px; }
.no-perm h3    { font-family: 'Sora', sans-serif; font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.no-perm p     { font-size: 13px; color: var(--muted); line-height: 1.6; max-width: 320px; margin: 0 auto; }

.empty       { text-align: center; padding: 44px 20px; }
.empty-icon  { font-size: 40px; margin-bottom: 10px; opacity: .4; }
.empty p     { font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.empty small { font-size: 12px; color: var(--light); }


.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: var(--z-toast);
}

.toast {
  background: var(--ink);
  color: #fff;
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 240px;
  box-shadow: var(--shadow-lg);
  animation: tIn .25s ease;
}

.toast.success { background: #064E3B; border-left: 3px solid var(--green); }
.toast.error   { background: #7F1D1D; border-left: 3px solid var(--red);   }
.toast.info    { background: #1E3A5F; border-left: 3px solid var(--blue);  }
.toast.out     { animation: tOut .25s forwards; }

@keyframes tIn  { from { transform: translateX(14px); opacity: 0; } to { transform: translateX(0);   opacity: 1; } }
@keyframes tOut { to   { transform: translateX(14px); opacity: 0; } }


.chat-hero {
  background: linear-gradient(135deg, var(--teal), var(--teal-d));
  padding: 20px;
  color: #fff;
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.chat-hero-icon {
  width: 56px; height: 56px;
  background: rgba(255,255,255,.2);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}

.chat-hero h2 { font-family: 'Sora', sans-serif; font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.chat-hero p  { font-size: 13px; opacity: .85; }

.chat-messages {
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg);
  min-height: 380px;
  max-height: 480px;
}
.chat-messages::-webkit-scrollbar       { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.chat-msg      { display: flex; gap: 10px; align-items: flex-end; max-width: 80%; }
.chat-msg.sent { flex-direction: row-reverse; margin-left: auto; }

.msg-av {
  width: 32px; height: 32px;
  border-radius: 10px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  font-family: 'Sora', sans-serif;
}

.msg-av-agent { background: linear-gradient(135deg, var(--teal), #5EEAD4); color: #fff; }
.msg-av-admin { background: linear-gradient(135deg, #7C3AED, #A78BFA);   color: #fff; }

.msg-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.5;
  position: relative;
  word-break: break-word;
}

.msg-bubble.sent { background: var(--teal); color: #fff; border-bottom-right-radius: 4px; }
.msg-bubble.recv { background: #fff; color: var(--ink); border: 1px solid var(--border); border-bottom-left-radius: 4px; }

.msg-time { font-size: 10px; opacity: .65; margin-top: 4px; display: block; }

.chat-input-bar {
  border-top: 1px solid var(--border);
  padding: 14px 16px;
  background: #fff;
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.chat-textarea {
  flex: 1;
  padding: 10px 13px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  outline: none;
  resize: none;
  min-height: 42px;
  max-height: 120px;
  line-height: 1.5;
  transition: border-color .15s;
}
.chat-textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(13,148,136,.08); }

.chat-send-btn {
  width: 42px; height: 42px;
  background: var(--teal);
  border: none;
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  transition: all .15s;
  box-shadow: 0 2px 8px rgba(13,148,136,.25);
}
.chat-send-btn:hover    { background: var(--teal-d); transform: translateY(-1px); }
.chat-send-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.msg-bubble-wrap { position: relative; display: inline-flex; flex-direction: column; }

.chat-msg-del {
  display: none;
  position: absolute;
  top: -9px;
  width: 20px; height: 20px;
  background: var(--red);
  border: none;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  font-size: 9px;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(220,38,38,.4);
  z-index: 10;
  line-height: 1;
}

.chat-msg.sent .chat-msg-del { left: -10px; }
.chat-msg.recv .chat-msg-del { right: -10px; }
.chat-msg:hover .chat-msg-del { display: flex; }
.chat-msg-del:hover { transform: scale(1.15); }

.chat-status-bar {
  padding: 10px 16px;
  background: var(--teal-l);
  border-bottom: 1px solid var(--teal-mid);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--teal-d);
  font-weight: 600;
}

.online-dot {
  width: 8px; height: 8px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }

.chat-date-divider {
  text-align: center;
  font-size: 11px;
  color: var(--light);
  font-weight: 600;
  padding: 4px 0;
  position: relative;
}
.chat-date-divider::before {
  content: '';
  position: absolute;
  top: 50%; left: 0; right: 0;
  height: 1px;
  background: var(--border);
}
.chat-date-divider span { background: var(--bg); padding: 0 10px; position: relative; }

.msg-loading {
  display: flex;
  gap: 4px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  width: fit-content;
}

.msg-loading span {
  width: 6px; height: 6px;
  background: var(--light);
  border-radius: 50%;
  animation: typing .9s infinite;
}
.msg-loading span:nth-child(2) { animation-delay: .2s; }
.msg-loading span:nth-child(3) { animation-delay: .4s; }

@keyframes typing { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-6px); } }


.area-section { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.area-section h4 { font-family: 'Sora', sans-serif; font-size: 13px; font-weight: 700; margin-bottom: 12px; color: var(--ink); }


.toggle-wrap  { display: flex; align-items: center; gap: 10px; }
.toggle       { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--border);
  border-radius: 24px;
  transition: .3s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: .3s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.toggle input:checked + .toggle-slider               { background: var(--teal); }
.toggle input:checked + .toggle-slider::before       { transform: translateX(20px); }

.toggle-label { font-size: 13px; font-weight: 600; color: var(--ink2); }


.topnav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 58px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.nav-logo      { display: flex; align-items: center; gap: 9px; }
.nav-logo-icon { width: 32px; height: 32px; background: linear-gradient(135deg, var(--teal), var(--teal-d)); border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.nav-logo-text { font-size: 15px; font-weight: 700; }
.nav-logo-sub  { font-size: 10px; color: var(--muted); }
.nav-sep       { width: 1px; height: 20px; background: var(--border); }
.nav-breadcrumb { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.nav-right     { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.agent-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  background: var(--teal-l);
  border: 1px solid var(--teal-mid);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--teal-d);
}

.agent-chip-dot { width: 7px; height: 7px; background: var(--green); border-radius: 50%; animation: pulse 2s infinite; }

.app-body { display: flex; flex: 1; max-width: 1400px; margin: 0 auto; width: 100%; padding: 24px; gap: 20px; }
.forms-section { flex: 1; min-width: 0; }

.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }
.section-title  { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.section-sub    { font-size: 13px; color: var(--muted); margin-top: 2px; }

.search-bar   { position: relative; }
.search-input {
  padding: 8px 14px 8px 36px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color .15s;
  background: var(--surface);
  width: 220px;
  color: var(--ink);
}
.search-input:focus { border-color: var(--teal); }
.search-icon  { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 13px; pointer-events: none; color: var(--muted); }


.service-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  border-color: grey;
  cursor: pointer;
  transition: all .2s;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--teal), #5EEAD4);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s;
}

.service-card:hover { border-color: var(--teal); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.service-card:hover::before { transform: scaleX(1); }

.service-card-icon  { width: 44px; height: 44px; background: var(--teal-l); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 12px; }
.service-card-name  { font-size: 15px; font-weight: 700; margin-bottom: 4px; line-height: 1.3; }
.service-card-desc  { font-size: 12px; color: var(--muted); line-height: 1.5; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.service-card-meta  { display: flex; align-items: center; justify-content: space-between; }
.service-card-code  { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--muted); background: var(--surface2); padding: 2px 7px; border-radius: 4px; }
.service-card-fields { font-size: 11px; font-weight: 600; color: var(--teal-d); }

.service-card-tag {
  position: absolute;
  top: 0; right: 15px;
  background: var(--teal);
  color: white;
  font-size: 9px;
  padding: 2px 8px;
  border-radius: 0 0 6px 6px;
  font-weight: 700;
}

.form-title     { font-size: 15px; font-weight: 800; color: var(--ink); margin: 5px 0 10px; }
.form-hierarchy { display: flex; align-items: center; gap: 5px; margin-bottom: 10px; }
.dept-pill      { font-size: 10px; font-weight: 700; color: var(--teal-d); }
.sub-dept       { font-size: 10px; color: var(--muted); }
.form-desc      { font-size: 12px; color: var(--light); line-height: 1.4; }

.service-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

.mini-fill-btn {
  background: var(--teal-l);
  color: var(--teal-d);
  border: none;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.fill-btn {
  padding: 7px 14px;
  background: var(--teal);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  margin-top: 10px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.fill-btn:hover { background: var(--teal-d); transform: translateY(-1px); }


.payment-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-left-color: #38BDF8; 
  border-radius: 50%;
  margin: 0 auto;
  animation: p-spin 1s linear infinite;
}

@keyframes p-spin {
  to { transform: rotate(360deg); }
}


.custom-loader-container {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-app-logo {
  position: absolute;
  width: 50px; /* Adjust size based on logo appearance */
  height: auto;
  z-index: 10;
}

.pulse-animation {
  animation: logo-pulse 1.5s ease-in-out infinite;
}

@keyframes logo-pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.loader-ring {
  position: absolute;
  border-radius: 50%;
  border: 5px solid transparent;
  animation: rotateSpinner 2s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
}


.ring-orange {
  width: 110px;
  height: 110px;
  border-top-color: #f34916;
  border-right-color: #f34916;
  animation-duration: 2s;
}

.ring-skyblue {
  width: 90px;
  height: 90px;
  border-bottom-color: #0e83f0; 
  border-left-color: #0e83f0; 
  animation-duration: 1.7s;
  animation-delay: -0.3s;
}

.ring-green {
  width: 70px;
  height: 70px;
  border-top-color: #1cf04e; 
  border-right-color: #1cf04e; 
  animation-duration: 1.4s;
  animation-delay: -0.6s;
}

@keyframes rotateSpinner {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.category-group-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  margin-bottom: 20px;
  overflow: hidden;
  transition: .3s;
}

.main-cat-header {
  background: linear-gradient(135deg, #0D9488, #0f766e);
  color: white;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Sora', sans-serif;
}

.sub-cat-wrapper { padding: 10px; }

.sub-cat-item {
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  margin-bottom: 10px;
  background: #f8fafc;
}

.sub-cat-header {
  padding: 12px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: #334155;
  transition: .2s;
}
.sub-cat-header:hover    { background: #f1f5f9; }
.sub-cat-header .arrow   { margin-left: auto; transition: .3s; font-size: 12px; }
.sub-cat-item.open .sub-cat-header .arrow { transform: rotate(180deg); }

.service-list-content { display: none; padding: 0 15px 15px; background: #fff; }
.sub-cat-item.open .service-list-content { display: block; }

.service-type-group {
  margin-top: 10px;
  padding: 12px;
  border-left: 3px solid #0D9488;
  background: #fdfdfd;
}

.service-type-title {
  font-size: 13px;
  font-weight: 800;
  color: #0D9488;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.forms-mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }


.filter-container {
  background: #fff;
  padding: 15px;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filter-row { display: flex; gap: 8px; flex-wrap: wrap; padding-bottom: 5px; }

.filter-pill {
  padding: 8px 16px;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
  color: var(--ink);
}
.filter-pill:hover  { border-color: var(--teal); }
.filter-pill.active { background: var(--teal); color: #fff; border-color: var(--teal); box-shadow: 0 4px 10px rgba(13,148,136,.2); }


.forms-search-box {
  position: relative;
  max-width: 450px;
  width: 100%;
  margin-bottom: 5px;
}

.forms-search-box input[type="text"] {
  width: 100%;
  padding: 12px 12px 12px 42px;
  font-size: 12px;
  font-family: 'DM Sans', sans-serif;
  color: var(--ink);
  background: #ffffff;
  border: 1.5px solid var(--blue);
  border-radius: 12px;
  transition: all .3s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,.03);
  outline: none;
}
.forms-search-box input[type="text"]:hover { border-color: #cbd5e1; }
.forms-search-box input[type="text"]:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(13,148,136,.1); background: #fff; }

.forms-search-box::before {
  content: "\f002";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 14px;
  pointer-events: none;
  transition: color .3s ease;
}
.forms-search-box:focus-within::before { color: var(--teal); }


.fill-overlay { display: none; position: fixed; inset: 0; background: #F0FDF4; z-index: var(--z-fill); flex-direction: column; }
.fill-overlay.open { display: flex; }

.fill-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  box-shadow: var(--shadow);
}

.fill-header-back {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 12px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  color: var(--ink2);
  transition: all .15s;
  display: flex;
  align-items: center;
  gap: 5px;
}
.fill-header-back:hover { border-color: var(--teal); color: var(--teal); }

.fill-header-title { font-size: 15px; font-weight: 700; }
.fill-header-sub   { font-size: 11px; color: var(--muted); }

.fill-progress     { flex: 1; background: var(--surface2); border-radius: 20px; height: 5px; max-width: 200px; overflow: hidden; }
.fill-progress-bar { height: 100%; background: linear-gradient(90deg, var(--teal), #5EEAD4); border-radius: 20px; transition: width .3s; }

.fill-body { flex: 1; display: flex; overflow: hidden; }

.fill-left {
    flex: 1;
    overflow: auto;
    background: #e8eaed;
    display: flex; 
    justify-content: center; 
    align-items: flex-start;
    padding: 24px;
}
.fill-left::-webkit-scrollbar       { width: 6px; }
.fill-left::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }

.pdf-fill-container {
    position: relative !important;
    margin: 0 auto; 
    display: inline-block; 
    background: white;
    box-shadow: 0 8px 40px rgba(0,0,0,.2);
}

#fill-canvas {
    display: block;
}

#fill-fields-layer {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none;
}

.pdf-input-field {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 2px 4px;
    box-sizing: border-box;
}
.pdf-input-field:focus         { border-color: var(--amber); background: #fff; box-shadow: 0 0 0 3px rgba(13,148,136,.1); }
.pdf-input-field.required-empty { border-color: var(--red) !important; background: rgba(254,242,242,.9) !important; }

select.pdf-input-field {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%230D9488' fill='none' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  padding-right: 20px;
}

.pdf-input-wrapper {
    position: absolute !important;
    background: transparent !important; 
    pointer-events: auto !important;
}


.pdf-input-wrapper input[type="checkbox"] {
    appearance: none; 
    -webkit-appearance: none;
    background-color: transparent !important;
    box-shadow: none !important;
    border: 1.5px solid #000; 
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
}


.pdf-input-wrapper input[type="checkbox"]:checked::after {
    content: '✔'; 
    font-size: 14px;
    color: #000; 
    position: absolute;
    font-weight: bold;
}

.field-label-tooltip {
  position: absolute;
  top: -18px; left: 0;
  background: var(--teal);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s;
}
.pdf-input-wrapper:hover .field-label-tooltip { opacity: 1; }

.fill-right {
  width: 300px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
}
.fill-right::-webkit-scrollbar       { width: 4px; }
.fill-right::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }

.fill-section { padding: 16px; }

.fill-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.fill-section-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.fill-field-list-item {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 12px;
  margin-bottom: 5px;
  cursor: pointer;
  transition: all .15s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.fill-field-list-item:hover    { border-color: var(--teal); }
.fill-field-list-item.filled   { border-color: var(--green); background: var(--green-l); }
.fill-field-list-item.empty-req { border-color: var(--red);  background: var(--red-l); }

.fill-field-info    { flex: 1; min-width: 0; }
.fill-field-name    { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fill-field-status  { font-size: 10px; color: var(--muted); }

.fill-status-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.dot-green { background: var(--green); }
.dot-red   { background: var(--red);   }
.dot-gray  { background: var(--light); }

.fill-summary-card {
  background: var(--teal-l);
  border: 1px solid var(--teal-mid);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
}

.fill-summary-row          { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 6px; }
.fill-summary-row:last-child { margin-bottom: 0; }
.fill-summary-label        { color: var(--muted); }
.fill-summary-val          { font-weight: 700; color: var(--teal-d); }


.page-nav  { display: flex; align-items: center; gap: 6px; }
.pnav-btn  { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; width: 28px; height: 28px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 13px; transition: all .15s; }
.pnav-btn:hover:not(:disabled) { border-color: var(--teal); color: var(--teal); }
.pnav-btn:disabled { opacity: .35; cursor: not-allowed; }


.history-item  { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 6px; display: flex; align-items: center; gap: 10px; }
.history-icon  { font-size: 18px; flex-shrink: 0; }
.history-info  { flex: 1; min-width: 0; }
.history-name  { font-size: 12px; font-weight: 700; }
.history-date  { font-size: 10px; color: var(--muted); }


.loading-state   { text-align: center; padding: 40px; color: var(--muted); }
.loading-spinner { display: inline-block; width: 20px; height: 20px; border: 3px solid var(--border2); border-top-color: var(--teal); border-radius: 50%; animation: spin .6s linear infinite; margin-bottom: 10px; }
@keyframes spin { to { transform: rotate(360deg); } }


.no-perm-banner {
  background: linear-gradient(135deg, #FEF3C7, #FDE68A);
  border: 1px solid #F59E0B;
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  margin: 40px auto;
  max-width: 480px;
}
.no-perm-icon { font-size: 48px; display: block; margin-bottom: 12px; }
.no-perm h2   { font-size: 18px; font-weight: 700; color: #78350F; margin-bottom: 8px; }
.no-perm p    { font-size: 13px; color: #92400E; line-height: 1.6; }

.empty-state      { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-icon       { font-size: 48px; display: block; margin-bottom: 12px; opacity: .35; }
.empty-state h3   { font-size: 15px; font-weight: 600; margin-bottom: 5px; color: var(--ink2); }
.empty-state p    { font-size: 13px; line-height: 1.6; }


.grid-2       { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3       { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.forms-grid   { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.flex         { display: flex; }
.items-center { align-items: center; }
.gap-2        { gap: 8px; }
.gap-3        { gap: 12px; }
.ml-auto      { margin-left: auto; }
.mt-2         { margin-top: 8px; }
.mt-3         { margin-top: 12px; }
.mb-2         { margin-bottom: 8px; }
.w-full       { width: 100%; }



.notif-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--border);
    display: flex;
    gap: 15px;
    transition: 0.2s;
}

.notif-card:hover { border-color: var(--teal); box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.notif-icon { width: 45px; height: 45px; background: var(--teal-l); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.notif-content { flex: 1; }
.notif-time { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.notif-title { font-weight: 700; color: var(--ink); font-size: 15px; margin-bottom: 4px; }
.notif-meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.n-pill { font-size: 10px; padding: 2px 8px; border-radius: 4px; font-weight: 600; text-transform: uppercase; }
.n-pill.main { background: #E0F2FE; color: #0369A1; }
.n-pill.sub { background: #F0FDF4; color: #15803D; }
@keyframes slideIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

@keyframes bounce-in {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}
 
.txn-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: background 0.15s;
}
.txn-item:hover { background: var(--surface2); }
.txn-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.txn-credit-positive { color: #16A34A; font-size: 18px; font-weight: 800; }
.txn-credit-negative { color: #DC2626; font-size: 18px; font-weight: 800; }
 
.wallet-credit-low { animation: pulse-red 1s ease infinite; }
@keyframes pulse-red {
  0%, 100% { color: #DC2626; }
  50% { color: #FCA5A5; }
}


.deduction-modal {
    max-width: 400px !important;
    text-align: center;
    overflow: visible !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.deduction-icon-wrap {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #0d9488, #2dd4bf);
    border-radius: 50%;
    margin: -40px auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    box-shadow: 0 10px 20px rgba(13, 148, 136, 0.3);
    border: 4px solid white;
}

.deduction-modal h3 {
    font-family: 'Sora', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: var(--black);
    margin-bottom: 10px;
}

#post-modal {
    z-index: 9990 !important;
}


.login-footer-links {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px dashed rgba(0,0,0,0.1);
}

.login-footer-links a {
  color: rgba(148, 163, 184, 0.7) !important;
  transition: color 0.15s;
}

.login-footer-links a:hover {
  color: rgba(56, 189, 248, 0.9) !important;
}

.login-footer-links span {
  color: rgba(255,255,255,0.15) !important;
}


#vp-body {
    max-height: 70vh; 
    overflow-y: auto;
    padding: 24px;
    background: #ffffff;
}

#vp-body h4 {
    color: #1e293b;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    font-family: 'Sora', sans-serif;
}

#vp-body p {
    color: #475569;
    font-size: 13.5px;
    line-height: 1.7;
    margin-bottom: 16px;
}

#vp-body ul {
    margin-bottom: 16px;
    padding-left: 20px;
}

#vp-body li {
    color: #475569;
    font-size: 13px;
    margin-bottom: 6px;
    list-style-type: disc;
}

#vp-body strong {
    color: #0f172a;
    font-weight: 600;
}


#vp-body::-webkit-scrollbar {
    width: 6px;
}

#vp-body::-webkit-scrollbar-track {
    background: #f1f5f9;
}

#vp-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

#vp-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}


.deduction-modal p {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 20px;
}

.deduction-amount-card {
    background: #f0fdfa;
    border: 1px dashed #2dd4bf;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.da-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #0d9488;
    font-weight: 700;
    margin-bottom: 5px;
}

.da-value {
    font-size: 32px;
    font-weight: 900;
    color: #111827;
    font-family: 'Sora', sans-serif;
}

.notif-bell-wrap i {
  font-size: 20px;  
  color: rgb(5, 132, 182)
}

.deduction-actions {
    display: flex;
    gap: 12px;
}

.deduction-actions .btn {
    flex: 1;
    padding: 12px;
    font-weight: 700;
    border-radius: 10px;
}

.btn-confirm-deduct {
    background: #0d9488;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
    transition: all 0.3s ease;
}

.btn-confirm-deduct:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(13, 148, 136, 0.4);
}

.hide-deduction {
    display: none !important;
}

@media (max-width: 768px) {
 
  /* Hide desktop table */
  #posts-allowed table {
    display: none !important;
  }
 
  /* Show mobile cards container */
  #mobile-posts-list {
    display: flex !important;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
  }
 
  /* Each post card */
  .mob-post-card {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s;
  }
 
  .mob-post-card:active {
    box-shadow: 0 4px 16px rgba(13,148,136,0.15);
  }
 
  /* Card top row: image + title + status */
  .mob-post-top {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 12px 8px;
  }
 
  .mob-post-img {
    width: 54px;
    height: 44px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #E5E7EB;
    flex-shrink: 0;
  }
 
  .mob-post-img-ph {
    width: 54px;
    height: 44px;
    background: #F0FDFA;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    border: 1px solid #CCFBF1;
  }
 
  .mob-post-title-wrap {
    flex: 1;
    min-width: 0;
  }
 
  .mob-post-title {
    font-size: 13px;
    font-weight: 800;
    color: #111827;
    line-height: 1.3;
    word-break: break-word;
    margin-bottom: 4px;
  }
 
  .mob-post-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
  }
 
  .mob-post-status.active  { background: #F0FDF4; color: #16A34A; }
  .mob-post-status.hidden  { background: #FEF2F2; color: #DC2626; }
  .mob-post-status.expired { background: #FFF7ED; color: #EA580C; }
 
  /* Divider */
  .mob-post-divider {
    height: 1px;
    background: #F1F5F9;
    margin: 0 12px;
  }
 
  /* Info chips row */
  .mob-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 12px;
    align-items: center;
  }
 
  .mob-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    background: #F1F5F9;
    color: #475569;
  }
 
  .mob-meta-chip.cat    { background: #F5F3FF; color: #7C3AED; }
  .mob-meta-chip.area   { background: #EFF6FF; color: #2563EB; }
  .mob-meta-chip.time   { background: #F0FDFA; color: #0F766E; font-size: 9.5px; }
  .mob-meta-chip.expiry { background: #FEF2F2; color: #DC2626; }
  .mob-meta-chip.sched  { background: #FFFBEB; color: #D97706; }
 
  /* Action buttons */
  .mob-post-actions {
    display: flex;
    gap: 8px;
    padding: 8px 12px 12px;
  }
 
  .mob-action-btn {
    flex: 1;
    padding: 8px 0;
    border: none;
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: opacity 0.15s;
  }
 
  .mob-action-btn:active { opacity: 0.75; }
 
  .mob-action-edit   { background: #EFF6FF; color: #2563EB; }
  .mob-action-delete { background: #FEF2F2; color: #DC2626; }
 
  /* sc (card wrapper) no inner padding on mobile posts */
  #posts-allowed .sc > div:not(.sc-head) {
    padding: 0;
  }
 
  /* Header buttons compact */
  #posts-allowed .sc-head {
    padding: 12px 14px;
    gap: 6px;
  }
 
  #posts-allowed .sc-head h3 {
    font-size: 13px;
  }
 
  .sc-head .btn-sm {
    font-size: 10px;
    padding: 5px 8px;
  }
}
 

@media (min-width: 769px) {
  #mobile-posts-list {
    display: none !important;
  }
}

@media (max-width: 768px) {

  .btn {
    margin-bottom: 15px;
  }

  /* Hide sidebar completely on mobile */
  .sidebar {
    display: none !important;
  }

  /* Main content takes full width */
  .main {
    margin-left: 0 !important;
    width: 100% !important;
    padding-bottom: 70px; /* space for bottom nav */
  }

  /* Topbar adjustments */
  .topbar {
    padding: 0 14px;
    height: 56px;
  }

  .topbar-title {
    font-size: 15px;
  }

  /* Content padding */
  .content {
    padding: 16px 14px;
  }

 
  #mobile-bottom-nav {
  display: none;   
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: #ffffff;
  border-top: 1px solid #E5E7EB;
  z-index: 9999;
  align-items: stretch;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
}
}


/* Hidden on desktop */
#mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: #ffffff;
  border-top: 1px solid #E5E7EB;
  z-index: 9999;
  align-items: stretch;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

.mob-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  padding: 8px 4px 10px;
  border: none;
  background: none;
  font-family: 'DM Sans', sans-serif;
  color: #9CA3AF;
  transition: color 0.15s, background 0.15s;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.mob-nav-item:active {
  background: #F0FDFA;
}

.mob-nav-item.active {
  color: #0D9488;
}

/* Active indicator bar at top */
.mob-nav-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 2.5px;
  background: #0D9488;
  border-radius: 0 0 4px 4px;
}

.mob-nav-item i {
  font-size: 20px;
}

.mob-nav-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

/* Badge on icon */
.mob-nav-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  background: #DC2626;
  color: white;
  font-size: 8px;
  font-weight: 800;
  min-width: 14px;
  height: 14px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  line-height: 1;
}

/* More menu overlay */
#mobile-more-menu {
  display: none;
  position: fixed;
  bottom: 64px;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid #E5E7EB;
  z-index: 9998;
  padding: 12px 16px;
  box-shadow: 0 -8px 30px rgba(0,0,0,0.12);
  border-radius: 20px 20px 0 0;
}

#mobile-more-menu.open {
  display: block;
}

.more-menu-title {
  font-size: 11px;
  font-weight: 700;
  color: #9CA3AF;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
  padding-left: 4px;
}

.more-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  cursor: pointer;
  color: #1F2937;
  font-size: 14px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.more-menu-item:active,
.more-menu-item:hover {
  background: #F0FDFA;
  color: #0D9488;
}
.more-menu-item i {
  font-size: 20px;
  color: #0292be;
}
.sc-head i{
  font-size: 20px;
  color: #0292be;
}
.more-menu-item .m-icon {
  font-size: 20px;
  width: 36px;
  height: 36px;
  background: #F0FDFA;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.more-menu-divider {
  height: 1px;
  background: #F1F5F9;
  margin: 6px 0;
}

/* Backdrop for more menu */
#mobile-more-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 9997;
}
#mobile-more-backdrop.open {
  display: block;
}

/* Fix stat-row on mobile */
@media (max-width: 768px) {
  .stat-row {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  
  .scard-val {
    font-size: 24px;
  }

  /* Fill overlay full screen on mobile */
  .fill-right {
    display: none;
  }
}

@media (max-width: 768px) {
 
  /* ── 1. FORMS CENTER ── */
 
  /* Search box full width */
  .forms-search-box {
    max-width: 100% !important;
    width: 100% !important;
  }
 
  .forms-search-box input[type="text"] {
    font-size: 13px;
    padding: 10px 10px 10px 38px;
  }
 
  /* Filter container scroll horizontally row by row */
  .filter-container {
    padding: 10px;
    gap: 8px;
    border-radius: 10px;
  }
 
  /* Each filter row — horizontal scroll */
  .filter-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    gap: 6px !important;
    padding-bottom: 4px !important;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
 
  .filter-row::-webkit-scrollbar {
    display: none;
  }
 
  /* Pills don't shrink */
  .filter-pill {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    font-size: 11px !important;
    padding: 6px 12px !important;
    border-radius: 20px !important;
  }
 
  /* Form cards full width on mobile */
  .forms-grid,
  .forms-mini-grid,
  #forms-grouped-container {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
 
  /* Service card mobile */
  .service-card {
    min-height: auto !important;
    max-height: none !important;
    padding-bottom: 56px !important;
  }
 
  /* Active filter label */
  #active-filter-indicator {
    font-size: 11px;
    padding: 6px 4px;
  }
 
  /* Header panel */
  .forms-header-panel {
    margin-bottom: 12px;
  }
 
  /* Category group cards */
  .category-group-card {
    border-radius: 12px;
    margin-bottom: 12px;
  }
 
  .main-cat-header {
    padding: 12px 16px;
    font-size: 13px;
  }
 
  .sub-cat-header {
    font-size: 12px;
    padding: 10px 14px;
  }
 
 
  /* ── 2. CONTACT ADMIN CHAT ── */
 
  /* Chat hero compact */
  #page-contact .chat-hero {
    padding: 14px;
    border-radius: 10px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
 
  #page-contact .chat-hero h2 {
    font-size: 15px;
    margin-bottom: 2px;
  }
 
  #page-contact .chat-hero p {
    font-size: 12px;
    margin-bottom: 6px;
  }
 
  /* Email badge compact */
  #page-contact .chat-hero a > div {
    font-size: 11px !important;
    padding: 4px 10px !important;
  }
 
  /* Chat box fills screen properly */
  #page-contact .sc {
    margin-top: 12px;
    border-radius: 12px;
    overflow: hidden;
  }
 
  /* Chat messages area — shorter on mobile so input visible */
  .chat-messages {
    min-height: 260px !important;
    max-height: 340px !important;
    padding: 12px !important;
    gap: 8px !important;
  }
 
  /* Chat bubble max width */
  .chat-msg {
    max-width: 92% !important;
  }
 
  .msg-bubble {
    font-size: 12px !important;
    padding: 8px 11px !important;
    border-radius: 12px !important;
  }
 
  /* Input bar */
  .chat-input-bar {
    padding: 10px 10px !important;
    gap: 8px !important;
    /* Stay above bottom nav */
    padding-bottom: 12px !important;
  }
 
  .chat-textarea {
    font-size: 13px !important;
    padding: 9px 11px !important;
    min-height: 40px !important;
  }
 
  .chat-send-btn {
    width: 40px !important;
    height: 40px !important;
    font-size: 15px !important;
    border-radius: 10px !important;
    flex-shrink: 0 !important;
  }
 
  /* Status bar */
  .chat-status-bar {
    font-size: 11px !important;
    padding: 8px 12px !important;
  }
 
  /* Avatar in chat */
  .msg-av {
    width: 28px !important;
    height: 28px !important;
    font-size: 12px !important;
    border-radius: 8px !important;
  }
 
  /* "Hover to delete" hint — hide on mobile, show tap hint */
  .chat-messages > div:first-child small {
    display: none;
  }
 
  /* Delete btn always visible on mobile (no hover) */
  .chat-msg-del {
    display: flex !important;
    opacity: 0.7;
  }
 
}