/* Desktop/tablet enterprise workspace inspired by the supplied dashboard reference. */
.admin-shell{--admin-sidebar:#fbfcff;--admin-border:#e8ebf2;--admin-canvas:#f6f8fc;background:var(--admin-canvas);color:#202531}
.admin-shell .admin-sidebar{position:fixed;z-index:30;inset:0 auto 0 0;width:244px;padding:23px 14px 18px;background:var(--admin-sidebar);border-right:1px solid var(--admin-border);display:flex;flex-direction:column;overflow:auto}
.admin-shell .sidebar-brand{display:flex;align-items:center;gap:9px;padding:0 13px 22px;color:#18202c;text-decoration:none;font-weight:800;font-size:20px}
.admin-shell .sidebar-brand .brand-logo{width:34px;height:34px}.admin-shell .sidebar-brand span{width:34px;height:34px}
.sidebar-section-label{padding:13px 13px 8px;color:#8a93a4;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.08em}.sidebar-section-spaced{margin-top:20px}
.admin-shell .sidebar-nav{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:4px!important;width:auto!important;padding:0!important;border:0!important}
.admin-shell .sidebar-nav a{display:flex;align-items:center;gap:12px;padding:11px 13px;border-radius:9px;color:#6b7280;font-size:14px;font-weight:600;text-decoration:none}
.admin-shell .sidebar-nav a:hover{background:#eef2ff;color:#435bd6}.admin-shell .sidebar-nav a.is-active{background:#e7edff;color:#4561d5}.sidebar-icon{display:inline-grid;place-items:center;width:22px;height:22px;color:currentColor;font-size:17px;font-weight:800}
.sidebar-footer{display:flex;align-items:center;gap:9px;margin-top:auto;padding:16px 10px 3px;border-top:1px solid var(--admin-border);color:#252b36}.sidebar-footer strong,.topbar-user strong{display:block;font-size:12px}.sidebar-footer small,.topbar-user small{display:block;color:#8a93a4;font-size:11px;margin-top:1px}.sidebar-avatar,.topbar-avatar{display:inline-grid;place-items:center;width:32px;height:32px;border-radius:50%;background:#dce5ff;color:#4561d5;font-size:13px;font-weight:800}
.admin-shell .topbar{position:sticky;top:0;z-index:20;min-height:74px;margin-left:244px;padding:0 34px;background:#fff;border-bottom:1px solid var(--admin-border);box-shadow:none;justify-content:flex-end}
.admin-shell .topbar-heading{display:flex;flex-direction:column;gap:2px;margin-right:auto}.topbar-heading span{color:#99a1b0;font-size:11px;font-weight:700}.topbar-heading strong{font-size:22px;line-height:1.2;color:#1f2530}
.history-back{display:inline-flex;align-items:center;gap:5px;margin-right:15px;padding:8px 11px;border:1px solid #e8ebf2;border-radius:8px;background:#fff;color:#667085;font:inherit;font-size:12px;font-weight:700;cursor:pointer;white-space:nowrap}.history-back:hover{border-color:#9aaef7;color:#435bd6;background:#f7f8ff}
.admin-shell .topbar>.brand{display:none}.topbar-tools{display:flex;align-items:center;gap:14px}.topbar-search{display:flex;align-items:center;width:310px;height:39px;border:1px solid #edf0f5;border-radius:9px;background:#f7f8fb;padding:0 11px}.topbar-search span{font-size:22px;color:#8790a1;line-height:1}.topbar-search input{height:35px;border:0;background:transparent;padding:0 8px;outline:0;font-size:13px}.topbar-search input:focus{outline:0}.topbar-icon{display:grid;place-items:center;width:38px;height:38px;border:1px solid #edf0f5;border-radius:9px;color:#697386;text-decoration:none;font-size:21px}.topbar-user{display:flex;align-items:center;gap:9px;padding-left:5px;min-width:138px}.topbar-user .topbar-avatar{width:34px;height:34px}
.admin-shell .nav-toggle{display:none}.admin-shell .topbar nav{display:none!important}.admin-shell .container{max-width:none;margin:0;padding:30px 34px 48px}.admin-shell .section-head{margin-bottom:22px}.admin-shell .section-head h1{font-size:27px;letter-spacing:-.02em}.admin-shell .section-head .muted{font-size:13px}
.admin-shell .dashboard-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:14px}.admin-shell .stat{position:relative;min-height:105px;padding:19px 18px;border:1px solid var(--admin-border);border-radius:13px;background:#fff;box-shadow:0 4px 18px #2a3d6b08}.admin-shell .stat:after{content:'›';position:absolute;right:17px;top:15px;color:#a8b0c0;font-size:20px}.admin-shell .stat p{font-size:12px;color:#8b95a7;font-weight:700}.admin-shell .stat strong{font-size:29px;letter-spacing:-.03em;color:#202531}.admin-shell .stat:nth-child(1){border-top:3px solid #4b5ee8}.admin-shell .stat:nth-child(2){border-top:3px solid #28b6c7}.admin-shell .stat:nth-child(3){border-top:3px solid #f2aa45}.admin-shell .stat:nth-child(4){border-top:3px solid #40b878}.admin-shell .stat:nth-child(5){border-top:3px solid #ec6f91}
.admin-shell .admin-split{grid-template-columns:minmax(0,1.45fr) minmax(300px,.75fr);gap:18px}.admin-shell .card{border-color:var(--admin-border);border-radius:13px;box-shadow:0 4px 18px #2a3d6b08;padding:22px}.admin-shell .card h2{font-size:19px;letter-spacing:-.015em}.admin-shell .table-wrap{border-color:var(--admin-border);box-shadow:none}.admin-shell .table th{background:#fbfcff;color:#8b95a7}.admin-shell .table td{padding:13px 14px}.admin-shell .plain-list li{padding:14px 0}.admin-shell .badge{font-size:11px}
.admin-dashboard-visual{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(300px,.75fr);gap:18px;margin-top:18px}.dashboard-panel{min-height:265px}.dashboard-panel .section-head{margin-bottom:15px}.dashboard-panel .section-head a{color:#4a61d5;text-decoration:none;font-weight:700;font-size:13px}.trend-bars{display:grid;gap:13px;margin-top:22px}.trend-row{display:grid;grid-template-columns:105px 1fr 40px;align-items:center;gap:10px;font-size:12px;color:#7d8798}.trend-track{height:12px;border-radius:99px;background:#eef1f8;overflow:hidden}.trend-fill{height:100%;border-radius:99px;background:linear-gradient(90deg,#4a5fe8,#6c7cff)}.trend-row:nth-child(2) .trend-fill{background:linear-gradient(90deg,#21b5c2,#6dd4d1)}.trend-row:nth-child(3) .trend-fill{background:linear-gradient(90deg,#f2a54b,#f7c77b)}.trend-row:nth-child(4) .trend-fill{background:linear-gradient(90deg,#45b979,#89d9a6)}.trend-row:nth-child(5) .trend-fill{background:linear-gradient(90deg,#e86e91,#f2a4b7)}.trend-row strong{font-size:12px;color:#4c5667;text-align:right}.dashboard-task-list{display:grid;gap:12px}.dashboard-task{display:flex;align-items:center;gap:11px;padding:11px 0;border-bottom:1px solid #eef0f4}.dashboard-task:last-child{border-bottom:0}.dashboard-task-check{width:22px;height:22px;border:1px solid #dce2ec;border-radius:6px;display:grid;place-items:center;color:#35b674;font-size:15px}.dashboard-task-body{min-width:0;flex:1}.dashboard-task-body strong{display:block;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dashboard-task-body small{display:block;color:#9aa3b1;font-size:11px;margin-top:2px}.dashboard-task .badge{margin-left:auto}
.admin-shell .filters{background:#fff;border:1px solid var(--admin-border);border-radius:13px;padding:17px;box-shadow:0 4px 18px #2a3d6b08}.admin-shell .btn{border-radius:8px}.admin-shell footer{margin-left:244px}
@media(max-width:1100px) and (min-width:701px){.admin-shell .admin-sidebar{width:218px}.admin-shell .topbar{margin-left:218px;padding:0 22px}.admin-shell .container{padding:24px 22px}.admin-shell footer{margin-left:218px}.admin-shell .dashboard-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.admin-dashboard-visual{grid-template-columns:1fr}.topbar-search{width:230px}}
@media(max-width:700px){.admin-shell{background:var(--canvas)}.admin-shell .admin-sidebar{display:none}.admin-shell .topbar{margin-left:0;min-height:65px;padding:10px 15px;justify-content:space-between}.admin-shell .topbar-heading{display:none}.admin-shell .topbar>.brand{display:flex;font-size:16px}.admin-shell .topbar-tools{margin-left:auto}.admin-shell .topbar-search{display:none}.admin-shell .topbar-icon{display:none}.admin-shell .topbar-user{min-width:0;padding:0}.admin-shell .topbar-user span:not(.topbar-avatar){display:none}.admin-shell .nav-toggle{display:block;position:static;margin-left:7px}.admin-shell .topbar nav{display:none!important}.admin-shell .topbar nav.nav-open{display:flex!important;position:absolute;top:65px;left:0;right:0;padding:12px 15px;background:#fff;border-top:1px solid var(--admin-border);border-bottom:1px solid var(--admin-border);box-shadow:0 8px 18px #17203314;flex-direction:row;gap:7px;align-items:flex-start}.admin-shell .topbar nav.nav-open a,.admin-shell .topbar nav.nav-open .logout-form button{border:1px solid var(--admin-border);border-radius:999px;padding:7px 10px;background:#fff;font-size:12px}.admin-shell .container{padding:20px 15px 36px}.admin-shell .section-head{align-items:flex-start;flex-direction:column}.admin-shell .section-head h1{font-size:23px}.admin-shell .dashboard-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.admin-shell .stat{min-height:92px;padding:15px}.admin-shell .stat strong{font-size:24px}.admin-dashboard-visual{grid-template-columns:1fr;gap:12px}.admin-shell .admin-split{grid-template-columns:1fr}.admin-shell .card{padding:17px}.admin-shell footer{margin-left:0}.dashboard-panel{min-height:0}.trend-row{grid-template-columns:88px 1fr 30px}}
@media(max-width:420px){.admin-shell .dashboard-grid{grid-template-columns:1fr 1fr}.admin-shell .stat p{font-size:11px}.admin-shell .stat strong{font-size:22px}}

/* Keep page content clear of the fixed navigation rail. */
.admin-shell .container{margin-left:244px}

/* Collapsed rail: keep the workspace usable while retaining navigation icons. */
.sidebar-collapse{display:flex;align-items:center;justify-content:flex-start;gap:10px;width:calc(100% - 10px);margin:0 5px 12px;padding:8px 10px;border:1px solid var(--admin-border);border-radius:8px;background:#fff;color:#6b7280;font:inherit;font-size:12px;font-weight:700;cursor:pointer}
.sidebar-collapse:hover{background:#eef2ff;color:#435bd6}
.sidebar-collapse-icon{font-size:22px;line-height:1}
.admin-shell.sidebar-collapsed .admin-sidebar{width:74px;padding-left:9px;padding-right:9px}
.admin-shell.sidebar-collapsed .topbar{margin-left:74px}
.admin-shell.sidebar-collapsed .container{margin-left:74px}
.admin-shell.sidebar-collapsed footer{margin-left:74px}
.admin-shell.sidebar-collapsed .sidebar-brand{justify-content:center;padding-left:0;padding-right:0;font-size:0}
.admin-shell.sidebar-collapsed .sidebar-brand .brand-logo{margin:0}
.admin-shell.sidebar-collapsed .sidebar-brand span{font-size:12px}
.admin-shell.sidebar-collapsed .sidebar-section-label,
.admin-shell.sidebar-collapsed .sidebar-footer span:not(.sidebar-avatar),
.admin-shell.sidebar-collapsed .sidebar-collapse span:not(.sidebar-collapse-icon){display:none}
.admin-shell.sidebar-collapsed .sidebar-nav a{justify-content:center;padding-left:8px;padding-right:8px;font-size:0}
.admin-shell.sidebar-collapsed .sidebar-icon{font-size:17px}
.admin-shell.sidebar-collapsed .sidebar-collapse{justify-content:center;padding-left:0;padding-right:0}

.sidebar-language{display:flex!important;align-items:center;gap:12px;padding:11px 13px;border-radius:9px;color:#6b7280;text-decoration:none;font-size:14px;font-weight:600}.sidebar-language:hover{background:#eef2ff;color:#435bd6}.sidebar-logout-form{margin-top:12px}.sidebar-logout-form button{display:flex;align-items:center;gap:12px;width:100%;padding:10px 13px;border:1px solid #f0d5d5;border-radius:9px;background:#fff7f7;color:#a32626;font:inherit;font-size:13px;font-weight:700;cursor:pointer}.sidebar-logout-form button:hover{background:#feecec;border-color:#e4aaaa}.topbar-language{display:inline-flex;align-items:center;justify-content:center;min-width:58px;height:38px;padding:0 10px;border:1px solid #edf0f5;border-radius:9px;background:#fff;color:#4a61d5;text-decoration:none;font-size:12px;font-weight:800}.topbar-language:hover{background:#f7f8ff;border-color:#9aaef7}.admin-shell.sidebar-collapsed .sidebar-language{justify-content:center;padding-left:8px;padding-right:8px;font-size:0}.admin-shell.sidebar-collapsed .sidebar-logout-form button{justify-content:center;padding-left:8px;padding-right:8px;font-size:0}
.builder-modal{position:fixed;z-index:100;inset:0;display:grid;place-items:center;padding:20px;background:#10182899}.builder-modal[hidden]{display:none}.builder-modal-card{width:min(500px,100%);padding:24px;border:1px solid var(--admin-border,#e8ebf2);border-radius:14px;background:#fff;box-shadow:0 20px 60px #1018283d}.builder-modal-card .section-head{margin-bottom:18px}.builder-modal-card h2{margin:0}.builder-modal-close{border:0;background:transparent;color:#667085;font-size:27px;line-height:1;cursor:pointer}.builder-modal-close:hover{color:#b42318}.builder-modal-card .button-row{justify-content:flex-end;margin-top:20px}
.topbar-logout{margin:0}.topbar-logout button{height:38px;padding:0 11px;border:1px solid #f0d5d5;border-radius:9px;background:#fff7f7;color:#a32626;font:inherit;font-size:12px;font-weight:800;cursor:pointer}.topbar-logout button:hover{background:#feecec;border-color:#e4aaaa}@media(max-width:700px){.topbar-logout button{height:34px;padding:0 8px;font-size:11px}}
.history-back,.topbar-logout button,.sidebar-logout-form button{border-color:#e8ebf2;background:#fff;color:#667085;border-radius:8px}.history-back:hover,.topbar-logout button:hover,.sidebar-logout-form button:hover{border-color:#9aaef7;background:#f7f8ff;color:#435bd6}.sidebar-logout-form button{font-size:12px}
.license-feature-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.license-feature-option{display:flex;align-items:flex-start;gap:9px;margin:0;padding:11px 12px;border:1px solid var(--admin-border,#e8ebf2);border-radius:9px;background:#fbfcff;cursor:pointer}.license-feature-option input{width:auto;margin-top:4px}.license-feature-option span{display:grid;gap:2px}.license-feature-option small{color:#667085;font-size:11px;line-height:1.35}.license-status-card{border-left:4px solid #4c61d7}.license-key-output{min-width:260px;min-height:58px;font:11px/1.35 ui-monospace,SFMono-Regular,Menlo,monospace;resize:vertical;background:#f8f9fc}.tool-card.is-locked{opacity:.7}.tool-card.is-locked:hover{opacity:1}@media(max-width:700px){.license-feature-grid{grid-template-columns:1fr}.license-key-output{min-width:180px}}
.permission-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.permission-grid .check-label{min-width:0;align-items:flex-start;padding:9px 10px;border:1px solid var(--admin-border,#e8ebf2);border-radius:8px;background:#fbfcff;line-height:1.3}.permission-grid .check-label input{flex:0 0 auto;margin-top:3px}.permission-grid-actions{grid-template-columns:repeat(2,minmax(0,1fr))}.permission-item span{display:grid;gap:3px;min-width:0}.permission-item strong{font-size:12px}.permission-item small{color:#667085;font-size:10px;line-height:1.35}.permission-grid .check-label:has(input:checked){border-color:#9aaef7;background:#f4f6ff}@media(max-width:900px){.permission-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:600px){.permission-grid,.permission-grid-actions{grid-template-columns:1fr}}

@media(max-width:1100px) and (min-width:701px){
  .admin-shell .container{margin-left:218px}
  .admin-shell.sidebar-collapsed .container{margin-left:74px}
}
@media(max-width:700px){
  .admin-shell .container{margin-left:0}
  .admin-shell.sidebar-collapsed .container{margin-left:0}
  .admin-shell.sidebar-collapsed .topbar{margin-left:0}
  .admin-shell.sidebar-collapsed footer{margin-left:0}
  .sidebar-collapse{display:none}
}

/* Mobile admin tools drawer. The workspace stays full width while the
   navigation rail slides over it only when the Tools button is pressed. */
.sidebar-scrim{display:none}
.mobile-topbar-logout{display:none}
@media(max-width:700px){
  .admin-shell .admin-sidebar{
    display:flex;
    width:min(300px,86vw);
    padding:18px 14px;
    transform:translateX(-110%);
    transition:transform .22s ease;
    box-shadow:12px 0 32px rgba(17,24,39,.18);
    z-index:80;
  }
  .admin-shell.sidebar-collapsed .admin-sidebar{width:min(300px,86vw);padding:18px 14px}
  .admin-shell.sidebar-collapsed .sidebar-section-label,
  .admin-shell.sidebar-collapsed .sidebar-footer span:not(.sidebar-avatar),
  .admin-shell.sidebar-collapsed .sidebar-collapse span:not(.sidebar-collapse-icon){display:block}
  .admin-shell.sidebar-collapsed .sidebar-nav a{justify-content:flex-start;padding-left:13px;padding-right:13px;font-size:14px}
  .admin-shell.sidebar-collapsed .sidebar-language{justify-content:flex-start;padding-left:13px;padding-right:13px;font-size:14px}
  .admin-shell.sidebar-collapsed .sidebar-logout-form button{justify-content:flex-start;padding-left:13px;padding-right:13px;font-size:12px}
  .admin-shell.sidebar-mobile-open .admin-sidebar{transform:translateX(0)}
  .admin-shell .sidebar-scrim{
    display:block;
    position:fixed;
    inset:0;
    z-index:70;
    border:0;
    background:rgba(15,23,42,.42);
    cursor:pointer;
  }
  .admin-shell .sidebar-scrim[hidden]{display:none}
  .admin-shell .nav-toggle{
    display:inline-flex!important;
    align-items:center;
    gap:5px;
    position:absolute;
    right:14px;
    top:14px;
    z-index:25;
    margin:0;
    padding:7px 10px;
    border:1px solid #e3e8f2;
    border-radius:8px;
    background:#fff;
    color:#4a61d5;
    font:inherit;
    font-size:12px;
    font-weight:800;
    cursor:pointer;
  }
  .admin-shell .mobile-topbar-logout{
    display:block;
    position:absolute;
    right:82px;
    top:13px;
    z-index:25;
    margin:0;
  }
  .admin-shell .mobile-topbar-logout button{
    height:36px;
    padding:0 9px;
    border:1px solid #e8ebf2;
    border-radius:8px;
    background:#fff;
    color:#667085;
    font:inherit;
    font-size:11px;
    font-weight:800;
    cursor:pointer;
  }
  .admin-shell .topbar-tools{margin-right:150px}
}
@media(max-width:700px){
  .topbar .mobile-topbar-logout{
    display:block;
    position:absolute;
    right:15px;
    top:12px;
    z-index:25;
    margin:0;
  }
  .topbar .mobile-topbar-logout button{
    height:34px;
    padding:0 9px;
    border:1px solid var(--line);
    border-radius:8px;
    background:var(--surface,#fff);
    color:var(--muted);
    font:inherit;
    font-size:11px;
    font-weight:800;
    cursor:pointer;
  }
  body:not(.admin-shell) .topbar .brand{max-width:calc(100% - 90px)}
}

/* Use the same drawer interaction on narrow tablets, where a fixed rail can
   otherwise cover the dashboard content. */
@media (min-width:701px) and (max-width:1024px){
  .admin-shell .admin-sidebar{
    display:flex;
    width:min(300px,86vw);
    padding:18px 14px;
    transform:translateX(-110%);
    transition:transform .22s ease;
    box-shadow:12px 0 32px rgba(17,24,39,.18);
    z-index:80;
  }
  .admin-shell.sidebar-collapsed .admin-sidebar{width:min(300px,86vw);padding:18px 14px}
  .admin-shell.sidebar-collapsed .sidebar-section-label,
  .admin-shell.sidebar-collapsed .sidebar-footer span:not(.sidebar-avatar),
  .admin-shell.sidebar-collapsed .sidebar-collapse span:not(.sidebar-collapse-icon){display:block}
  .admin-shell.sidebar-collapsed .sidebar-nav a{justify-content:flex-start;padding-left:13px;padding-right:13px;font-size:14px}
  .admin-shell.sidebar-collapsed .sidebar-language{justify-content:flex-start;padding-left:13px;padding-right:13px;font-size:14px}
  .admin-shell.sidebar-collapsed .sidebar-logout-form button{justify-content:flex-start;padding-left:13px;padding-right:13px;font-size:12px}
  .admin-shell.sidebar-mobile-open .admin-sidebar{transform:translateX(0)}
  .admin-shell .topbar{margin-left:0;min-height:65px;padding:10px 22px}
  .admin-shell .container{margin-left:0;padding:24px 22px 40px}
  .admin-shell footer{margin-left:0}
  .admin-shell .sidebar-scrim{
    display:block;
    position:fixed;
    inset:0;
    z-index:70;
    border:0;
    background:rgba(15,23,42,.42);
    cursor:pointer;
  }
  .admin-shell .sidebar-scrim[hidden]{display:none}
  .admin-shell .nav-toggle{
    display:inline-flex!important;
    align-items:center;
    gap:5px;
    position:absolute;
    right:22px;
    top:14px;
    z-index:25;
    padding:7px 10px;
    border:1px solid #e3e8f2;
    border-radius:8px;
    background:#fff;
    color:#4a61d5;
    font:inherit;
    font-size:12px;
    font-weight:800;
    cursor:pointer;
  }
  .admin-shell .mobile-topbar-logout{
    display:block;
    position:absolute;
    right:90px;
    top:13px;
    z-index:25;
    margin:0;
  }
  .admin-shell .mobile-topbar-logout button{
    height:36px;
    padding:0 9px;
    border:1px solid #e8ebf2;
    border-radius:8px;
    background:#fff;
    color:#667085;
    font:inherit;
    font-size:11px;
    font-weight:800;
    cursor:pointer;
  }
  .admin-shell .topbar-tools{margin-right:165px}
}

/* The admin complaint register becomes a readable vertical record list on
   phones instead of forcing users to pan across nine columns. */
@media(max-width:700px){
  body.admin-shell[data-page="admin/complaints.php"] .table-wrap{overflow:visible;background:transparent;border:0}
  body.admin-shell[data-page="admin/complaints.php"] .table{display:block;min-width:0}
  body.admin-shell[data-page="admin/complaints.php"] .table thead{display:none}
  body.admin-shell[data-page="admin/complaints.php"] .table tbody{display:grid;gap:11px}
  body.admin-shell[data-page="admin/complaints.php"] .table tbody tr{display:block;border:1px solid var(--admin-border);border-left:4px solid #4b5ee8;border-radius:12px;background:#fff;box-shadow:0 4px 14px rgba(42,61,107,.06);padding:8px 14px}
  body.admin-shell[data-page="admin/complaints.php"] .table tbody tr:has(td.empty){padding:0}
  body.admin-shell[data-page="admin/complaints.php"] .table td{display:grid;grid-template-columns:minmax(92px,34%) 1fr;gap:10px;align-items:start;padding:9px 0;border-bottom:1px solid #eef0f4;overflow-wrap:anywhere}
  body.admin-shell[data-page="admin/complaints.php"] .table td:last-child{border-bottom:0}
  body.admin-shell[data-page="admin/complaints.php"] .table td::before{color:#8b95a7;font-size:10px;font-weight:800;letter-spacing:.04em;text-transform:uppercase}
  body.admin-shell[data-page="admin/complaints.php"] .table td:nth-child(1)::before{content:"Ticket / complaint"}
  body.admin-shell[data-page="admin/complaints.php"] .table td:nth-child(2)::before{content:"Citizen"}
  body.admin-shell[data-page="admin/complaints.php"] .table td:nth-child(3)::before{content:"Routing"}
  body.admin-shell[data-page="admin/complaints.php"] .table td:nth-child(4)::before{content:"Priority"}
  body.admin-shell[data-page="admin/complaints.php"] .table td:nth-child(5)::before{content:"Status"}
  body.admin-shell[data-page="admin/complaints.php"] .table td:nth-child(6)::before{content:"SLA"}
  body.admin-shell[data-page="admin/complaints.php"] .table td:nth-child(7)::before{content:"Assigned to"}
  body.admin-shell[data-page="admin/complaints.php"] .table td:nth-child(8)::before{content:"Updated"}
  body.admin-shell[data-page="admin/complaints.php"] .table td:nth-child(9)::before{content:"Actions"}
  body.admin-shell[data-page="admin/complaints.php"] .table td.empty{display:block;padding:28px;text-align:center}
  body.admin-shell[data-page="admin/complaints.php"] .table td.empty::before{display:none}
}

/* The mobile complaint register is a quick triage list. Keep only the
   ticket/complaint, priority and updated values visible; full routing,
   citizen, SLA and assignment details remain available on the complaint
   detail page. */
@media(max-width:700px){
  body.admin-shell[data-page="admin/complaints.php"] .table td:nth-child(2),
  body.admin-shell[data-page="admin/complaints.php"] .table td:nth-child(3),
  body.admin-shell[data-page="admin/complaints.php"] .table td:nth-child(5),
  body.admin-shell[data-page="admin/complaints.php"] .table td:nth-child(6),
  body.admin-shell[data-page="admin/complaints.php"] .table td:nth-child(7),
  body.admin-shell[data-page="admin/complaints.php"] .table td:nth-child(9){display:none!important}
  body.admin-shell[data-page="admin/complaints.php"] .table td:nth-child(1),
  body.admin-shell[data-page="admin/complaints.php"] .table td:nth-child(4),
  body.admin-shell[data-page="admin/complaints.php"] .table td:nth-child(8){display:grid!important}
  body.admin-shell[data-page="admin/complaints.php"] .table td:nth-child(8){border-bottom:0!important}
  body.admin-shell[data-page="admin/complaints.php"] .table td.empty{display:block!important}
}

@media(max-width:700px){
  html[lang="ta"] body.admin-shell[data-page="admin/complaints.php"] .table td:nth-child(1)::before{content:"டிக்கெட் / புகார்"}
  html[lang="ta"] body.admin-shell[data-page="admin/complaints.php"] .table td:nth-child(4)::before{content:"முன்னுரிமை"}
  html[lang="ta"] body.admin-shell[data-page="admin/complaints.php"] .table td:nth-child(8)::before{content:"புதுப்பிக்கப்பட்டது"}
}

/* Dashboard activity and workspace cards are stacked on phones so every
   value remains visible without a sideways scroll. */
@media(max-width:700px){
  body.admin-shell[data-page="admin/dashboard.php"] .compact-table{overflow:visible;background:transparent;border:0}
  body.admin-shell[data-page="admin/dashboard.php"] .compact-table .table{display:block;min-width:0}
  body.admin-shell[data-page="admin/dashboard.php"] .compact-table .table thead{display:none}
  body.admin-shell[data-page="admin/dashboard.php"] .compact-table .table tbody{display:grid;gap:10px}
  body.admin-shell[data-page="admin/dashboard.php"] .compact-table .table tbody tr{display:block;padding:8px 13px;border:1px solid var(--admin-border);border-left:4px solid #4b5ee8;border-radius:11px;background:#fff;box-shadow:0 4px 14px rgba(42,61,107,.06)}
  body.admin-shell[data-page="admin/dashboard.php"] .compact-table .table td{display:grid;grid-template-columns:92px 1fr;gap:9px;padding:8px 0;border-bottom:1px solid #eef0f4;overflow-wrap:anywhere}
  body.admin-shell[data-page="admin/dashboard.php"] .compact-table .table td:last-child{border-bottom:0}
  body.admin-shell[data-page="admin/dashboard.php"] .compact-table .table td:before{color:#8b95a7;font-size:10px;font-weight:800;letter-spacing:.04em;text-transform:uppercase}
  body.admin-shell[data-page="admin/dashboard.php"] .compact-table .table td:nth-child(1):before{content:"Ticket"}
  body.admin-shell[data-page="admin/dashboard.php"] .compact-table .table td:nth-child(2):before{content:"Citizen"}
  body.admin-shell[data-page="admin/dashboard.php"] .compact-table .table td:nth-child(3):before{content:"Status"}
  body.admin-shell[data-page="admin/dashboard.php"] .compact-table .table td:nth-child(4):before{content:"SLA"}
  body.admin-shell[data-page="admin/dashboard.php"] .admin-split .card:nth-child(2) .details{display:grid;grid-template-columns:1fr;gap:10px}
  body.admin-shell[data-page="admin/dashboard.php"] .admin-split .card:nth-child(2) .details div{padding:12px 13px;border:1px solid var(--admin-border);border-radius:10px;background:#fff;box-shadow:0 3px 11px rgba(42,61,107,.05)}
  body.admin-shell[data-page="admin/dashboard.php"] .admin-split .card:nth-child(2) .details dt{font-size:10px}
  body.admin-shell[data-page="admin/dashboard.php"] .admin-split .card:nth-child(2) .details dd{font-size:13px}
}

/* Mobile topbar: keep only the compact tools icon on the left. Account
   identity and the duplicate top sign-out action remain available in the
   drawer/account area, but do not consume the narrow header width. */
@media(max-width:700px){
  .topbar .mobile-topbar-logout{display:none!important}
  .topbar .nav-toggle,
  .admin-shell .nav-toggle{position:absolute!important;left:15px!important;right:auto!important;top:13px!important;width:38px;height:38px;display:inline-flex!important;align-items:center;justify-content:center;margin:0;padding:0;font-size:20px;line-height:1;z-index:25}
  .topbar .nav-toggle span{display:none!important}
  .topbar .brand{position:absolute!important;left:50%;top:13px;transform:translateX(-50%);margin:0!important;padding:0;max-width:none!important;width:auto;z-index:10;justify-content:center}
  .topbar .brand .brand-name{display:none!important}
  .admin-shell .topbar>.brand{display:flex!important;margin:0!important}
  .card.auth .login-brand{justify-content:center}
  .card.auth .login-brand .brand-name{display:none!important}
  .admin-shell .topbar-user{display:none!important}
  .admin-shell .topbar-tools{margin-left:auto!important;margin-right:0!important;min-width:0}
  .admin-shell .history-back{position:absolute!important;left:62px!important;right:auto!important;top:13px!important;z-index:26!important;height:38px;margin:0!important;padding:7px 10px;font-size:11px;line-height:1}
}

/* Keep primary page actions in a stable vertical position on narrow screens.
   Tamil labels can be longer than their English equivalents, so the heading
   and action intentionally stack instead of shifting sideways. */
@media(max-width:700px){
  .container>.section-head{display:flex;flex-direction:column;align-items:stretch;gap:12px;min-width:0}
  .container>.section-head>div{width:100%;min-width:0}
  .container>.section-head h1,.container>.section-head h2{overflow-wrap:anywhere}
  .container>.section-head>.btn{align-self:flex-start;width:auto;max-width:100%;min-width:0;text-align:center;white-space:normal;line-height:1.35}
  body:not(.admin-shell) .topbar nav:not(.nav-open){display:none!important}
  body:not(.admin-shell) .topbar nav.nav-open{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:6px;width:min(320px,88vw);height:100dvh;min-height:100vh;position:fixed;top:0;left:0;right:auto;padding:18px 14px 24px;background:#fff;border:0;box-shadow:16px 0 36px rgba(15,23,42,.2);overflow-y:auto;z-index:90;transform:translateX(0);animation:public-nav-in .2s ease-out}
  body:not(.admin-shell) .topbar nav.nav-open a,
  body:not(.admin-shell) .topbar nav.nav-open .logout-form{width:100%;min-width:0;flex:0 0 auto}
  body:not(.admin-shell) .topbar nav.nav-open a,
  body:not(.admin-shell) .topbar nav.nav-open .logout-form button{display:flex;align-items:center;gap:10px;width:100%;min-height:43px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--ink);font:inherit;font-size:14px;text-align:left;text-decoration:none}
  body:not(.admin-shell) .topbar nav.nav-open a:hover,
  body:not(.admin-shell) .topbar nav.nav-open a.is-active,
  body:not(.admin-shell) .topbar nav.nav-open .logout-form button:hover{background:color-mix(in srgb,var(--app-accent,var(--red)) 10%,#fff);border-color:var(--app-accent,var(--red));color:var(--app-accent,var(--red))}
  body:not(.admin-shell) .topbar nav.nav-open a span:last-child,
  body:not(.admin-shell) .topbar nav.nav-open .logout-form button span:last-child{overflow-wrap:anywhere;text-align:left;line-height:1.3}
  body:not(.admin-shell) .topbar nav.nav-open .nav-drawer-close{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:42px;margin:0 0 8px;padding:3px 7px 8px;border:0;border-bottom:1px solid var(--line);background:transparent;color:var(--ink);font-size:30px;line-height:1;cursor:pointer}
  body:not(.admin-shell) .topbar nav.nav-open .nav-drawer-close:before{content:attr(data-label);font-size:15px;font-weight:800;line-height:1.25}
  .public-nav-scrim{display:block;position:fixed;inset:0;z-index:80;border:0;background:rgba(15,23,42,.42);cursor:pointer}
  .public-nav-scrim[hidden]{display:none}
  body.public-nav-open{overflow:hidden}
}

@keyframes public-nav-in{from{transform:translateX(-105%)}to{transform:translateX(0)}}

/* Keep drawer content consistently left aligned even when a theme adds a
   centered navigation rule. */
@media(max-width:700px){
  body:not(.admin-shell) .topbar nav.nav-open a,
  body:not(.admin-shell) .topbar nav.nav-open .logout-form button{justify-content:flex-start!important;text-align:left!important}
  body:not(.admin-shell) .topbar nav.nav-open a span:first-child,
  body:not(.admin-shell) .topbar nav.nav-open .logout-form button span:first-child{flex:0 0 22px;text-align:center}
  body:not(.admin-shell) .topbar nav.nav-open a span:last-child,
  body:not(.admin-shell) .topbar nav.nav-open .logout-form button span:last-child{flex:1;text-align:left!important}
}

/* Dashboard latest activity is intentionally compact: ticket/complaint and
   status are the two values needed for a quick operational scan. */
.dashboard-card-action{white-space:nowrap;text-decoration:none!important;color:var(--app-accent,var(--red))!important;font-size:13px!important;padding:6px 10px!important;border:1px solid var(--app-accent,var(--red))!important;border-radius:8px!important;background:#fff!important}
.dashboard-card-action:hover{color:#fff!important;background:var(--app-accent,var(--red))!important}
@media(max-width:700px){
  body.admin-shell[data-page="admin/dashboard.php"] .compact-table .table td:nth-child(1):before{content:"Ticket / complaint"}
  body.admin-shell[data-page="admin/dashboard.php"] .compact-table .table td:nth-child(2):before{content:"Status"}
  html[lang="ta"] body.admin-shell[data-page="admin/dashboard.php"] .compact-table .table td:nth-child(1):before{content:"டிக்கெட் / புகார்"}
  html[lang="ta"] body.admin-shell[data-page="admin/dashboard.php"] .compact-table .table td:nth-child(2):before{content:"நிலை"}
  body.admin-shell[data-page="admin/dashboard.php"] .dashboard-card-action{align-self:flex-start}
}

/* Staff directory actions remain easy to tap: four controls form a clean
   two-column grid on phones and compact tablets. */
.staff-directory-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;align-items:center;min-width:190px}
.staff-directory-actions .inline-form{margin:0}
@media(max-width:900px){
  body.admin-shell[data-page="admin/staff.php"] .staff-directory-actions{gap:8px}
  body.admin-shell[data-page="admin/staff.php"] .staff-directory-actions>*{min-width:0;width:100%}
  body.admin-shell[data-page="admin/staff.php"] .staff-directory-actions .btn{width:100%;white-space:normal;line-height:1.2}
}

/* Keep the application name as normal text. The circular styling belongs
   only to the fallback TVK mark, not to the wrapped brand label. */
.brand .brand-name{display:inline!important;width:auto!important;height:auto!important;border-radius:0!important;background:transparent!important;border:0!important;color:inherit!important;font-size:inherit!important;line-height:inherit!important}
.card.auth .login-brand .brand-name{display:inline!important;width:auto!important;height:auto!important;border-radius:0!important;background:transparent!important;border:0!important;color:inherit!important;font-size:inherit!important;line-height:inherit!important}
.admin-shell .sidebar-brand .brand-name{display:inline!important;width:auto!important;height:auto!important;border-radius:0!important;background:transparent!important;color:inherit!important;font-size:inherit!important;line-height:inherit!important}
.admin-shell.sidebar-collapsed .sidebar-brand .brand-name{display:none!important}
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.config-language-card{border:1px solid color-mix(in srgb,var(--app-accent,var(--red)) 22%,var(--admin-border,#e8ebf2));background:linear-gradient(135deg,#fff 0%,color-mix(in srgb,var(--app-accent,var(--red)) 5%,#fff) 100%)}
.config-language-form{display:flex;align-items:end;gap:12px;flex-wrap:wrap}.config-language-form label{min-width:180px;margin:0}.config-language-form select{width:min(300px,100%)}
@media(max-width:700px){.config-language-form{display:grid;grid-template-columns:1fr}.config-language-form label,.config-language-form select,.config-language-form .btn{width:100%;min-width:0}}

/* Shared finishing touches keep public, citizen and administration screens
   feeling like one polished product without changing their content flow. */
body:not(.admin-shell) .card{border-radius:15px;box-shadow:0 8px 24px rgba(28,44,72,.06);transition:transform .16s ease,box-shadow .16s ease}
body:not(.admin-shell) .card:hover{box-shadow:0 12px 28px rgba(28,44,72,.1)}
body:not(.admin-shell) .btn{box-shadow:0 5px 12px color-mix(in srgb,var(--app-accent,var(--red)) 20%,transparent)}
body:not(.admin-shell) .btn:focus-visible,.admin-shell .btn:focus-visible,.topbar a:focus-visible,.topbar button:focus-visible{outline:3px solid color-mix(in srgb,var(--app-accent,var(--red)) 35%,transparent);outline-offset:2px}
body:not(.admin-shell) .section-head h1{letter-spacing:-.025em}

/* Branding lockup: the optional leader portrait sits as a small circular
   image beside the configured logo/name everywhere the shared brand appears. */
.admin-shell .sidebar-brand .brand-primary{display:inline-flex;align-items:center;gap:7px;width:auto;height:auto;border:0;border-radius:0;background:transparent;color:inherit;font-size:inherit;line-height:inherit;min-width:0;flex:1}.admin-shell .sidebar-brand .brand-name{overflow-wrap:anywhere}.admin-shell .sidebar-brand .brand-logo,.admin-shell .sidebar-brand .brand-mark,.admin-shell .sidebar-brand .brand-leader{width:50px;height:50px;flex-basis:50px}.admin-shell .sidebar-brand .brand-leader{border-radius:8px;margin-left:auto}.admin-shell.sidebar-collapsed .sidebar-brand .brand-leader{display:none}
.sidebar-mobile-close{display:none}
@media(max-width:700px){
  .admin-shell .sidebar-mobile-close{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:43px;margin:0 0 10px;padding:7px 9px;border:1px solid var(--admin-border);border-radius:10px;background:#fff;color:#667085;font:inherit;font-size:13px;font-weight:800;cursor:pointer}
  .admin-shell .sidebar-mobile-close strong{font-size:25px;line-height:1;font-weight:400}
  .admin-shell .sidebar-mobile-close:hover{border-color:#9aaef7;background:#f7f8ff;color:#435bd6}
  .topbar .brand .brand-logo,.topbar .brand .brand-mark,.topbar .brand .brand-leader{width:50px;height:50px;flex-basis:50px}
  .topbar .brand .brand-leader{border-radius:8px;margin-left:2px}
  .login-brand .brand-logo,.login-brand .brand-mark,.login-brand .brand-leader{width:50px;height:50px;flex-basis:50px;border-radius:8px}
  .branding-image-controls{grid-template-columns:1fr;gap:8px}
}

/* Keep the brand lockup anchored left while the optional leader image stays
   on the far right of that header area. */
.topbar>.brand{flex:1;min-width:0;justify-content:space-between}
.admin-shell .sidebar-brand{justify-content:space-between}
.admin-shell .sidebar-brand .brand-primary{flex:1 1 auto}
@media(max-width:700px){
  body:not(.admin-shell) .topbar>.brand,
  .admin-shell .topbar>.brand{position:absolute!important;left:0!important;right:0!important;top:7px!important;width:100%!important;height:50px;padding:0!important;transform:none!important;display:flex!important;justify-content:center!important;flex:none!important}
  .topbar>.brand .brand-leader{position:absolute;right:15px;margin-left:0}
  .topbar>.brand .brand-primary{flex:0 0 auto}
  .card.auth .login-brand{position:relative;min-height:50px;justify-content:center}
  .card.auth .login-brand .brand-primary{margin:0 auto;flex:0 0 auto}
  .card.auth .login-brand .brand-leader{position:absolute;right:0;margin-left:0}
}

/* The admin header keeps language switching in the tools drawer; remove the
   duplicate right-side language control. Back remains an accessible icon-only
   control while retaining its aria-label for screen readers. */
.admin-shell .topbar-language{display:none!important}
.admin-shell .history-back{width:38px;height:38px;padding:0;justify-content:center;font-size:0;line-height:1;overflow:hidden}
.admin-shell .history-back::before{content:"←";font-size:20px;line-height:1}
.auth-action{display:inline-flex;align-items:center;justify-content:center;gap:8px}.auth-svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:0 0 18px}.logout-form .nav-icon,.sidebar-logout-form .sidebar-icon{position:relative;display:inline-grid;place-items:center;width:29px;height:29px;min-width:29px;border:1px solid currentColor;border-radius:8px;font-size:0;line-height:1;overflow:visible}.logout-form .nav-icon::before,.sidebar-logout-form .sidebar-icon::before{content:"";position:absolute;left:7px;top:13px;width:13px;height:10px;border:2px solid currentColor;border-radius:2px}.logout-form .nav-icon::after,.sidebar-logout-form .sidebar-icon::after{content:"";position:absolute;left:9px;top:6px;width:8px;height:8px;border:2px solid currentColor;border-bottom:0;border-radius:8px 8px 0 0;transform:translateX(3px) rotate(18deg);transform-origin:left bottom}

/* Lock the page beneath the mobile tools drawer so only the drawer content
   scrolls, including on touch devices with momentum scrolling. */
@media(max-width:700px){
  /* Public and admin tools buttons share one compact control treatment. */
  .topbar .nav-toggle,.admin-shell .nav-toggle{position:absolute!important;left:15px!important;right:auto!important;top:12px!important;width:42px;height:42px;display:inline-flex!important;align-items:center;justify-content:center;margin:0;padding:0;border:1px solid var(--admin-border,var(--line));border-radius:10px;background:#fff;color:var(--app-accent,var(--red));font-size:20px;line-height:1;z-index:25}
  .topbar .nav-toggle span{display:none!important}
  .admin-shell .nav-toggle span{display:none!important}
  body:not(.admin-shell) .topbar nav.nav-open a,
  body:not(.admin-shell) .topbar nav.nav-open .logout-form button,
  .admin-shell.sidebar-mobile-open .sidebar-nav a,
  .admin-shell.sidebar-mobile-open .sidebar-language,
  .admin-shell.sidebar-mobile-open .sidebar-logout-form button{min-height:43px;border:1px solid var(--admin-border,var(--line));border-radius:10px;background:#fff}
  .admin-shell.sidebar-mobile-open .sidebar-nav a.is-active,
  .admin-shell.sidebar-mobile-open .sidebar-nav a:hover,
  .admin-shell.sidebar-mobile-open .sidebar-language:hover{background:#eef2ff;border-color:#9aaef7;color:#435bd6}
  body.admin-shell.sidebar-mobile-open{overflow:hidden!important;overscroll-behavior:none;touch-action:none}
  .admin-shell.sidebar-mobile-open .admin-sidebar{overscroll-behavior:contain;-webkit-overflow-scrolling:touch;touch-action:auto}
}

/* Tamil labels can be taller than their English equivalents. Keep every
   drawer section in the scrollable rail instead of allowing flex-shrink to
   clip the lower tools, account details, or sign-out control. */
@media(max-width:700px){
  .admin-shell .admin-sidebar{height:100dvh;max-height:100dvh;min-height:0;overflow-x:hidden;overflow-y:auto;scrollbar-gutter:stable}
  .admin-shell .sidebar-mobile-close,
  .admin-shell .sidebar-brand,
  .admin-shell .sidebar-section-label,
  .admin-shell .sidebar-nav,
  .admin-shell .sidebar-footer,
  .admin-shell .sidebar-logout-form{flex:0 0 auto;min-width:0}
  .admin-shell .sidebar-section-label{white-space:normal;line-height:1.35;overflow-wrap:anywhere}
  .admin-shell .sidebar-nav a,
  .admin-shell .sidebar-language,
  .admin-shell .sidebar-logout-form button{min-width:0;white-space:normal;line-height:1.35;overflow-wrap:anywhere}
  .admin-shell .sidebar-nav a .sidebar-icon,
  .admin-shell .sidebar-language .sidebar-icon,
  .admin-shell .sidebar-logout-form .sidebar-icon{flex:0 0 22px}
  .admin-shell .sidebar-footer{margin-top:14px;padding-bottom:calc(7px + env(safe-area-inset-bottom))}
  .admin-shell .sidebar-logout-form{padding-bottom:env(safe-area-inset-bottom)}
}

/* Desktop/tablet sidebar branding: keep both images on the first row and let
   the application name use the full width on the next row. This prevents a
   narrow logo/name/leader three-way flex row from breaking words into single
   letters when the sidebar is 218–244px wide. */
@media(min-width:701px){
  .admin-shell .sidebar-brand{display:grid;grid-template-columns:50px minmax(0,1fr) 50px;grid-template-rows:auto auto;align-items:center;column-gap:8px;row-gap:8px;justify-content:initial}
  .admin-shell .sidebar-brand .brand-primary{display:contents;flex:none}
  .admin-shell .sidebar-brand .brand-primary>.brand-logo,
  .admin-shell .sidebar-brand .brand-primary>.brand-mark{grid-column:1;grid-row:1;width:50px;height:50px;flex:none}
  .admin-shell .sidebar-brand .brand-primary>.brand-name{grid-column:1/-1;grid-row:2;width:auto;min-width:0;text-align:center;white-space:normal;overflow-wrap:normal;word-break:normal;line-height:1.2}
  .admin-shell .sidebar-brand>.brand-leader{grid-column:3;grid-row:1;width:50px;height:50px;margin:0;border-radius:8px}
  .admin-shell.sidebar-collapsed .sidebar-brand{display:flex;align-items:center;justify-content:center;gap:0}
  .admin-shell.sidebar-collapsed .sidebar-brand .brand-primary{display:block;flex:none}
  .admin-shell.sidebar-collapsed .sidebar-brand .brand-primary>.brand-name,
  .admin-shell.sidebar-collapsed .sidebar-brand>.brand-leader{display:none!important}
}

.branding-name-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:14px}.branding-name-row>.branding-toggle{padding-bottom:10px;white-space:nowrap}.branding-toggle{margin-top:8px;font-size:13px}.branding-delete{margin-top:8px;color:#a32626;font-size:12px}.branding-delete input{accent-color:#b42318}
@media(max-width:700px){.branding-name-row{grid-template-columns:1fr;gap:0}.branding-name-row>.branding-toggle{padding-bottom:0;white-space:normal}}

/* Login screens keep the application name if enabled, but never display the
   configured logo or leader portrait. */
body[data-page="login.php"] .topbar>.brand .brand-logo,
body[data-page="login.php"] .topbar>.brand .brand-mark,
body[data-page="login.php"] .topbar>.brand .brand-leader,
body[data-page="admin/login.php"] .topbar>.brand .brand-logo,
body[data-page="admin/login.php"] .topbar>.brand .brand-mark,
body[data-page="admin/login.php"] .topbar>.brand .brand-leader,
body[data-page="verify_otp.php"] .topbar>.brand .brand-logo,
body[data-page="verify_otp.php"] .topbar>.brand .brand-mark,
body[data-page="verify_otp.php"] .topbar>.brand .brand-leader{display:none!important}

/* Closing is handled by the tools button, backdrop, or Escape key. Never
   render a separate X control inside either mobile drawer. */
.nav-drawer-close,.sidebar-mobile-close{display:none!important}

/* Super-admin branding layout controls. The logo and leader remain one
   compact lockup; alignment and spacing come from the application settings. */
@media(min-width:701px){
  .topbar>.brand{justify-content:var(--brand-lockup-justify,flex-start);gap:var(--brand-image-gap,8px)}
  .topbar>.brand .brand-leader{margin-left:0}
  .admin-shell .sidebar-brand{grid-template-columns:var(--brand-grid-template,50px 50px 1fr);column-gap:var(--brand-image-gap,8px)}
  .admin-shell .sidebar-brand .brand-primary>.brand-logo,
  .admin-shell .sidebar-brand .brand-primary>.brand-mark{grid-column:var(--brand-logo-column,1)}
  .admin-shell .sidebar-brand>.brand-leader{grid-column:var(--brand-leader-column,2);margin-left:0}
}

@media(max-width:700px){
  /* Keep the mobile tools button clear while applying the same combined
     lockup alignment and gap inside the remaining header space. */
  .topbar>.brand{justify-content:var(--brand-lockup-justify,center)!important;gap:var(--brand-image-gap,8px)!important;padding-left:55px!important;padding-right:55px!important}
  .topbar>.brand .brand-leader{position:static;margin-left:0}
}

.chatbot-settings-card{border-top:4px solid #b71c1c}.chatbot-master-option,.chatbot-feature-option{display:flex;align-items:flex-start;gap:10px;min-width:0;margin:0;cursor:pointer}.chatbot-master-option{padding:13px 14px;border:1px solid #efc4c4;border-radius:10px;background:#fff7f7}.chatbot-master-option input,.chatbot-feature-option input{width:auto;flex:0 0 auto;margin-top:4px;accent-color:#b71c1c}.chatbot-master-option span,.chatbot-feature-option span{display:grid;gap:3px;min-width:0}.chatbot-master-option strong,.chatbot-feature-option strong{font-size:13px}.chatbot-master-option small,.chatbot-feature-option small{color:#667085;font-size:11px;line-height:1.4}.chatbot-feature-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:12px}.chatbot-feature-option{padding:11px 12px;border:1px solid var(--admin-border,#e8ebf2);border-radius:9px;background:#fbfcff}.chatbot-feature-option:has(input:checked){border-color:#e6a3a3;background:#fff8f8}.chatbot-greeting-grid{margin-top:14px}@media(max-width:700px){.chatbot-feature-grid{grid-template-columns:1fr}}
