:root{
    --ui-brand-1:#183153;
    --ui-brand-2:#27496a;
    --ui-brand-3:#96b8cc;
    --ui-bg:#f5f7fb;
    --ui-card:#ffffff;
    --ui-text:#0f172a;
    --ui-muted:#64748b;
    --ui-line:#e2e8f0;
    --ui-soft:#eef6fa;
    --ui-success-bg:#dcfce7;
    --ui-success:#166534;
    --ui-danger-bg:#fee2e2;
    --ui-danger:#991b1b;
    --ui-warn-bg:#fef3c7;
    --ui-warn:#92400e;
    --ui-shadow:0 18px 40px rgba(24,49,83,.10);
    --ui-radius:24px;
}

html,body{background:var(--ui-bg) !important;color:var(--ui-text)}
body.admin-body .page-wrapper{background:var(--ui-bg) !important}
body.admin-body .page-content{padding:18px 22px 22px !important}
body.admin-body .page-content > *:first-child{margin-top:0 !important}
body.admin-body .page-content > :is(.container,.content-wrapper,.page-wrap,.ofr-wrap,.stg-wrap,.ns-page){margin-top:0 !important;max-width:100%}
body.admin-body .page-content > .container{padding:0 !important}
body.admin-body .page-content .content-wrapper{padding:0 !important}

/* shared hero-like header */
body.admin-body .page-content :is(.topbar,.page-header,.page-header-box,.page-topbar,.ofr-page-title,.stg-top,.nay-module-header,.module-header){
    position:relative !important;
    top:auto !important;
    height:auto !important;
    min-height:unset !important;
    background:linear-gradient(135deg,var(--ui-brand-1) 0%, var(--ui-brand-2) 45%, var(--ui-brand-3) 100%) !important;
    color:#fff !important;
    border:0 !important;
    border-radius:28px !important;
    padding:24px 26px !important;
    box-shadow:var(--ui-shadow) !important;
    margin:0 0 20px !important;
    display:flex !important;
    justify-content:space-between !important;
    align-items:flex-start !important;
    gap:16px !important;
    flex-wrap:wrap !important;
    overflow:hidden;
}
body.admin-body .page-content :is(.topbar,.page-header,.page-header-box,.page-topbar,.ofr-page-title,.stg-top,.nay-module-header,.module-header)::before{
    content:'';
    position:absolute;
    inset:auto auto -45px -30px;
    width:150px;
    height:150px;
    border-radius:50%;
    background:rgba(255,255,255,.08);
    pointer-events:none;
}
body.admin-body .page-content :is(.topbar,.page-header,.page-header-box,.page-topbar,.ofr-page-title,.stg-top,.nay-module-header,.module-header) h1,
body.admin-body .page-content :is(.topbar,.page-header,.page-header-box,.page-topbar,.ofr-page-title,.stg-top,.nay-module-header,.module-header) h2{
    margin:0 !important;
    color:#fff !important;
    font-size:30px !important;
    font-weight:900 !important;
    line-height:1.25 !important;
}
body.admin-body .page-content :is(.topbar,.page-header,.page-header-box,.page-topbar,.ofr-page-title,.stg-top,.nay-module-header,.module-header) p,
body.admin-body .page-content :is(.topbar,.page-header,.page-header-box,.page-topbar,.ofr-page-title,.stg-top,.nay-module-header,.module-header) .topbar-meta{
    margin:10px 0 0 !important;
    color:rgba(255,255,255,.88) !important;
    font-size:14px !important;
    line-height:1.9 !important;
    max-width:760px;
}
body.admin-body .page-content :is(.page-actions,.hero-actions,.ns-hero-actions,.ofr-actions,.nay-header-actions,.stg-actions){
    display:flex !important;
    gap:10px !important;
    flex-wrap:wrap !important;
    margin:0 !important;
}
body.admin-body .page-content :is(.page-actions,.hero-actions,.ns-hero-actions,.ofr-actions,.nay-header-actions,.stg-actions) > *{
    margin:0 !important;
}

/* ns dashboard blocks */
.ns-page{display:flex;flex-direction:column;gap:18px}
.ns-hero{
    background:linear-gradient(135deg,var(--ui-brand-1) 0%, var(--ui-brand-2) 45%, var(--ui-brand-3) 100%) !important;
    border-radius:28px !important;
    padding:26px !important;
    box-shadow:var(--ui-shadow) !important;
    color:#fff !important;
    margin:0 !important;
}
.ns-hero-title h1{color:#fff !important;font-size:31px !important;margin:0 !important}
.ns-hero-title p{color:rgba(255,255,255,.88) !important;font-size:15px !important;line-height:1.9 !important;max-width:760px}
.ns-stats-grid,.stats-grid,.order-grid,.dashboard-cards,.cards-grid,.stg-stats{
    display:grid !important;
    grid-template-columns:repeat(auto-fit,minmax(210px,1fr)) !important;
    gap:16px !important;
    margin:0 !important;
}
.ns-stat-card,.stat-card,.order-card,.dashboard-card,.stg-stat{
    position:relative;
    background:var(--ui-card) !important;
    border:1px solid #edf2f7 !important;
    border-radius:24px !important;
    padding:18px !important;
    box-shadow:0 12px 28px rgba(15,23,42,.06) !important;
    overflow:hidden;
}
.ns-stat-card::before,.stat-card::before,.order-card::before,.dashboard-card::before,.stg-stat::before{
    content:'';
    position:absolute;
    top:0;right:0;width:84px;height:84px;
    background:radial-gradient(circle,var(--ui-soft),transparent 70%);
}
.ns-stat-label,.stat-label,.order-card h3,.dashboard-card h3,.stg-stat span{font-size:13px !important;font-weight:800 !important;color:var(--ui-muted) !important;margin-bottom:10px !important;display:block}
.ns-stat-value,.stat-value,.order-card .num,.dashboard-card .card-number,.stg-stat strong{font-size:32px !important;font-weight:900 !important;color:var(--ui-text) !important;line-height:1.05 !important}
.ns-stat-note,.stat-note,.dashboard-card p{margin-top:10px !important;color:var(--ui-muted) !important;font-size:12px !important}

/* panels/cards/tables */
body.admin-body .page-content :is(.card,.panel,.box,.nay-card,.stg-card,.card-box,.table-card,.table-box,.order-card,.login-card,.ofr-card){
    background:var(--ui-card) !important;
    border:1px solid #edf2f7 !important;
    border-radius:24px !important;
    box-shadow:0 12px 28px rgba(15,23,42,.06) !important;
}
body.admin-body .page-content :is(.panel-head,.card-head,.card-header,.ns-panel-head){
    padding:18px 20px !important;
    border-bottom:1px solid #f1f5f9 !important;
    background:linear-gradient(180deg,#fff,#fbfdff) !important;
}
body.admin-body .page-content :is(.panel-head,.card-head,.card-header,.ns-panel-head) h2,
body.admin-body .page-content :is(.panel-head,.card-head,.card-header,.ns-panel-head) h3{
    margin:0 !important;
    color:var(--ui-brand-1) !important;
    font-size:20px !important;
    font-weight:900 !important;
}
body.admin-body .page-content :is(.panel-head,.card-head,.card-header,.ns-panel-head) p,
body.admin-body .page-content :is(.panel-head,.card-head,.card-header,.ns-panel-head) span{margin:6px 0 0 !important;color:var(--ui-muted) !important;font-size:13px !important}
body.admin-body .page-content :is(.panel-body,.card-body,.ns-panel-body,.ofr-card,.stg-card){padding:18px !important}
body.admin-body .page-content :is(.panel,.card,.box,.nay-card,.stg-card,.card-box,.table-card,.table-box,.ns-panel){overflow:hidden !important}
body.admin-body .page-content :is(.table-wrap,.ns-table-wrap,.ofr-table-wrap){overflow:auto !important;border-radius:20px !important}
body.admin-body .page-content :is(table,.table,.ns-table){width:100% !important;border-collapse:separate !important;border-spacing:0 !important;background:#fff !important}
body.admin-body .page-content :is(table,.table,.ns-table) thead th{
    position:sticky;top:0;background:#f8fbfe !important;color:#475569 !important;font-size:13px !important;font-weight:900 !important;padding:15px 12px !important;border-bottom:1px solid #eaf0f5 !important;text-align:center !important;white-space:nowrap
}
body.admin-body .page-content :is(table,.table,.ns-table) tbody td{
    padding:14px 12px !important;border-bottom:1px solid #f1f5f9 !important;text-align:center !important;vertical-align:middle !important;color:#1e293b !important;background:#fff !important
}
body.admin-body .page-content :is(table,.table,.ns-table) tbody tr:hover td{background:#fbfeff !important}

/* forms/buttons */
body.admin-body .page-content :is(input[type="text"],input[type="number"],input[type="date"],input[type="time"],input[type="password"],input[type="email"],select,textarea){
    width:100% !important;
    min-height:46px !important;
    border:1px solid #dbe4ea !important;
    border-radius:14px !important;
    padding:11px 14px !important;
    background:#f8fbfd !important;
    color:#1f2937 !important;
    font-size:14px !important;
    outline:none !important;
    box-sizing:border-box !important;
}
body.admin-body .page-content textarea{min-height:110px !important;resize:vertical !important}
body.admin-body .page-content :is(input,select,textarea):focus{
    border-color:var(--ui-brand-3) !important;
    box-shadow:0 0 0 4px rgba(150,184,204,.18) !important;
    background:#fff !important;
}
body.admin-body .page-content :is(label,.stg-field label,.nay-form-group label){font-weight:800 !important;color:#334155 !important;font-size:14px !important}
body.admin-body .page-content :is(.btn,.nay-btn,.ns-btn,.hero-btn,.ghost-btn,.filter-btn,.btn-sm,.stg-actions a,.stg-actions button,a.btn,button.btn){
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:8px !important;
    min-height:46px !important;
    padding:11px 16px !important;
    border-radius:14px !important;
    font-weight:800 !important;
    text-decoration:none !important;
    border:1px solid transparent !important;
    cursor:pointer !important;
    transition:.18s ease !important;
}
body.admin-body .page-content :is(.btn-primary,.nay-btn-primary,.ns-btn-primary,.filter-btn,.stg-actions button,.stg-actions a:not(.secondary),button[type="submit"]){background:var(--ui-brand-1) !important;color:#fff !important}
body.admin-body .page-content :is(.btn-primary,.nay-btn-primary,.ns-btn-primary,.filter-btn,.stg-actions button,.stg-actions a:not(.secondary),button[type="submit"]):hover{transform:translateY(-1px);filter:brightness(1.03)}
body.admin-body .page-content :is(.btn-light,.nay-btn-light,.ns-btn-light,.hero-btn,.filter-reset,.btn-view){background:#eef6fa !important;color:var(--ui-brand-1) !important;border-color:#dbeaf2 !important}
body.admin-body .page-content :is(.btn-dark,.ns-btn-dark,.ghost-btn,.secondary){background:rgba(255,255,255,.16) !important;color:#fff !important;border-color:rgba(255,255,255,.18) !important}
body.admin-body .page-content :is(.btn-danger,.nay-btn-danger,.ns-btn-delete,.btn-del,.btn-delete){background:#fef2f2 !important;color:#dc2626 !important;border-color:#fecaca !important}
body.admin-body .page-content :is(.btn-edit,.ns-btn-edit){background:#eff6ff !important;color:#1d4ed8 !important;border-color:#bfdbfe !important}
body.admin-body .page-content :is(.btn-save){background:#ecfdf5 !important;color:#065f46 !important;border-color:#a7f3d0 !important}

/* badges/chips/alerts */
body.admin-body .page-content :is(.badge,.status-badge,.ns-chip,.slug-chip,.count-chip,.pill){
    display:inline-flex !important;align-items:center !important;justify-content:center !important;padding:8px 12px !important;border-radius:999px !important;font-size:12px !important;font-weight:800 !important;border:1px solid transparent !important
}
body.admin-body .page-content .status-on,
body.admin-body .page-content .badge.green,
body.admin-body .page-content .ns-chip.success{background:var(--ui-success-bg) !important;color:var(--ui-success) !important;border-color:#bbf7d0 !important}
body.admin-body .page-content .status-off,
body.admin-body .page-content .badge.red,
body.admin-body .page-content .ns-chip.error{background:var(--ui-danger-bg) !important;color:var(--ui-danger) !important;border-color:#fecaca !important}
body.admin-body .page-content .ns-chip.warn,
body.admin-body .page-content .badge.yellow,
body.admin-body .page-content .badge.orange{background:var(--ui-warn-bg) !important;color:var(--ui-warn) !important;border-color:#fde68a !important}
body.admin-body .page-content .ns-chip.info,
body.admin-body .page-content .badge.blue,
body.admin-body .page-content .slug-chip,
body.admin-body .page-content .count-chip,
body.admin-body .page-content .pill{background:#eef6fa !important;color:var(--ui-brand-1) !important;border-color:#dbeaf2 !important}
body.admin-body .page-content :is(.alert,.flash,.ns-alert,.stg-alert){padding:14px 16px !important;border-radius:16px !important;font-weight:800 !important;border:1px solid transparent !important;margin:0 0 16px !important}
body.admin-body .page-content :is(.alert-success,.flash.success,.ns-alert-success,.stg-alert.success){background:#ecfdf5 !important;color:#065f46 !important;border-color:#a7f3d0 !important}
body.admin-body .page-content :is(.alert-error,.flash.error,.ns-alert-error,.stg-alert.error){background:#fef2f2 !important;color:#991b1b !important;border-color:#fecaca !important}
body.admin-body .page-content :is(.ns-alert-warn){background:#fff7ed !important;color:#9a3412 !important;border-color:#fdba74 !important}
body.admin-body .page-content :is(.empty,.empty-state,.ns-empty){padding:32px 18px !important;text-align:center !important;color:var(--ui-muted) !important;font-weight:700 !important;border:1px dashed #cbd5e1 !important;border-radius:18px !important;background:#fbfdff !important}

/* grids / filters */
body.admin-body .page-content :is(.filters,.nay-filter-form,.ns-form-grid,.stg-grid,.grid,.form-grid){gap:14px !important}
body.admin-body .page-content :is(.filters,.nay-filter-form,.ns-form-grid,.stg-grid,.grid,.form-grid,.ns-grid-2,.ns-link-grid,.quick-links){display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px !important}
body.admin-body .page-content .quick-links a{background:#eef6fa !important;color:var(--ui-brand-1) !important;border:1px solid #dbeaf2 !important;padding:14px 16px !important;border-radius:16px !important}
body.admin-body .page-content .action-group,
body.admin-body .page-content .ns-actions{display:flex !important;gap:8px !important;justify-content:center !important;flex-wrap:wrap !important}
body.admin-body .page-content .ns-link-card,
body.admin-body .page-content .nay-quick-link{display:flex !important;flex-direction:column !important;gap:8px !important;background:#fff !important;border:1px solid #edf2f7 !important;border-radius:20px !important;padding:16px !important;box-shadow:0 8px 22px rgba(15,23,42,.04) !important;color:var(--ui-text) !important}
body.admin-body .page-content .ns-link-card i{font-size:20px;color:var(--ui-brand-1) !important}
body.admin-body .page-content .ns-link-card span,
body.admin-body .page-content .nay-quick-link small{color:var(--ui-muted) !important}
body.admin-body .page-content .ns-list,.stg-nav{display:grid !important;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px !important}
body.admin-body .page-content .ns-list-item,.stg-nav-item{background:#fff !important;border:1px solid #edf2f7 !important;border-radius:18px !important;padding:14px 16px !important;display:flex !important;align-items:center !important;justify-content:space-between !important;gap:10px !important;color:var(--ui-text) !important}
body.admin-body .page-content .stg-nav-item.active{background:linear-gradient(135deg,var(--ui-brand-1),var(--ui-brand-2)) !important;color:#fff !important;border-color:transparent !important}
body.admin-body .page-content .stg-nav-item i{color:inherit !important}

/* provinces modal, toast and inline inputs */
body.admin-body .page-content .toast{box-shadow:0 12px 28px rgba(15,23,42,.18) !important;border-radius:14px !important;top:18px !important;right:18px !important}
body.admin-body .page-content .modal > div{border-radius:22px !important;box-shadow:0 22px 60px rgba(15,23,42,.22) !important;padding:22px !important}
body.admin-body .page-content input.inline{width:100% !important;background:#f8fbfd !important}
body.admin-body .page-content input.inline.active{background:#fff !important}

/* brand page remains king but remove extra container spacing */
.page-wrap{padding:0 !important}
.hero-card{margin-top:0 !important}
.ofr-wrap{padding:0 !important}
.stg-wrap{padding:0 !important}

/* mobile */
@media (max-width:991px){
    body.admin-body .page-content{padding:14px !important}
    body.admin-body .page-content :is(.topbar,.page-header,.page-header-box,.page-topbar,.ofr-page-title,.stg-top,.nay-module-header,.module-header),
    .ns-hero{padding:20px !important;border-radius:22px !important}
    body.admin-body .page-content :is(.topbar,.page-header,.page-header-box,.page-topbar,.ofr-page-title,.stg-top,.nay-module-header,.module-header) h1,
    body.admin-body .page-content :is(.topbar,.page-header,.page-header-box,.page-topbar,.ofr-page-title,.stg-top,.nay-module-header,.module-header) h2,
    .ns-hero-title h1{font-size:24px !important}
}

/* switches */
.switch{position:relative;display:inline-block;width:50px;height:28px}
.switch input{display:none}
.switch .slider{position:absolute;cursor:pointer;inset:0;background:#cbd5e1;border-radius:999px;transition:.22s}
.switch .slider:before{content:'';position:absolute;height:22px;width:22px;left:3px;bottom:3px;background:#fff;border-radius:50%;transition:.22s;box-shadow:0 4px 10px rgba(15,23,42,.18)}
.switch input:checked + .slider{background:linear-gradient(135deg,var(--ui-brand-2),var(--ui-brand-3))}
.switch input:checked + .slider:before{transform:translateX(22px)}
