/* ==========================================================================
   Admin theme — clean, Zoho-style design system for the admin panel.
   Loaded LAST (after bootstrap / style.css / css.php / common.css).
   Dynamic tokens (--ah-font, --ah-font-size, --ah-primary*, --ah-radius*, --ah-side-*, --ah-head-*)
   are printed by layout/index.blade.php from Settings > Admin panel (Master::adminTheme()).
   Static tokens live here.
   ========================================================================== */
:root {
    --ah-bg: #f6f6f7;
    --ah-surface: #ffffff;
    --ah-surface-2: #f9fafb;
    --ah-surface-3: #f2f4f7;
    --ah-border: #e3e6ec;
    --ah-border-soft: #edf0f4;
    --ah-border-strong: #cfd5de;
    --ah-text: #1f2329;
    --ah-text-2: #3d4655;
    --ah-muted: #677184;
    --ah-subtle: #98a1b2;
    --ah-success: #12805c; --ah-success-soft: #e5f5ee; --ah-success-border: #b9e3d0;
    --ah-danger: #c8332f; --ah-danger-soft: #fdecec; --ah-danger-border: #f5c4c2;
    --ah-warning: #a65d00; --ah-warning-soft: #fff3e0; --ah-warning-border: #f6d7a7;
    --ah-info: #1e66c9; --ah-info-soft: #e8f1fd; --ah-info-border: #bdd5f6;
    --ah-neutral-soft: #eef0f3;
    --ah-shadow-xs: 0 1px 2px rgba(16, 24, 40, .04);
    --ah-shadow-sm: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
    --ah-shadow-md: 0 6px 16px rgba(16, 24, 40, .08), 0 2px 4px rgba(16, 24, 40, .04);
    --ah-shadow-lg: 0 16px 40px rgba(16, 24, 40, .16);
    --ah-ring: 0 0 0 3px rgba(var(--ah-primary-rgb), .18);
    --ah-side-w: 240px;
    --ah-side-w-mini: 64px;
    --ah-head-h: 60px;
    --ah-control-h: 2.5rem;
    --ah-gap: 1.25rem;
    --ah-ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- base ---------- */
html { font-size: var(--ah-font-size); }
body,
body.ah-app,
body.ah-auth {
    font-family: var(--ah-font);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--ah-text);
    background-color: var(--ah-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-family: var(--ah-font); color: var(--ah-text); letter-spacing: -.005em; }
a { color: var(--ah-primary-text); }
a:hover { color: var(--ah-primary-hover); }
b, strong { font-weight: 600; }
.text-primary { color: var(--ah-primary-text) !important; }
.bg-primary { background-color: var(--ah-primary) !important; }
.border-primary { border-color: var(--ah-primary) !important; }
.text-muted { color: var(--ah-muted) !important; }
hr { border-color: var(--ah-border); opacity: 1; }
::selection { background: rgba(var(--ah-primary-rgb), .18); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c7cdd6; border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #a9b1bd; background-clip: padding-box; }
:focus-visible { outline: 2px solid rgba(var(--ah-primary-rgb), .55); outline-offset: 2px; }

/* ==========================================================================
   Shell — sidebar
   ========================================================================== */
.ah-app .main-wrapper { min-height: 100vh; }

.ah-sidebar.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--ah-side-w);
    margin: 0;
    z-index: 1041;
    display: flex;
    flex-direction: column;
    background: var(--ah-side-bg);
    border-right: 1px solid var(--ah-side-border);
    color: var(--ah-side-text);
    transition: width .22s var(--ah-ease), transform .26s var(--ah-ease), box-shadow .22s ease;
}
.ah-side-light .ah-sidebar.sidebar { border-right-color: var(--ah-border); }

.ah-brand {
    height: var(--ah-head-h);
    flex: 0 0 var(--ah-head-h);
    display: flex;
    align-items: center;
    padding: 0 18px;
    border-bottom: 1px solid var(--ah-side-border);
    overflow: hidden;
}
.ah-brand a { display: flex; align-items: center; min-width: 0; text-decoration: none; }
.ah-brand-full img { display: block; max-height: 40px; width: auto; height: auto; object-fit: contain; }
.ah-brand-small { display: none !important; }
.ah-brand-small img { width: 32px; height: 32px; object-fit: contain; border-radius: var(--ah-radius-sm); }
.ah-brand-letter {
    width: 32px; height: 32px; border-radius: var(--ah-radius-sm);
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--ah-primary); color: var(--ah-on-primary); font-weight: 700; font-size: 15px;
}
.ah-side-brand .ah-brand-letter { background: rgba(255, 255, 255, .18); color: #fff; }

.ah-nav {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 10px 24px;
    scrollbar-width: thin;
}
.ah-nav::-webkit-scrollbar-thumb { background: rgba(127, 135, 150, .35); background-clip: padding-box; }
.ah-nav-label {
    font-size: .7143rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ah-side-muted);
    padding: 14px 10px 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ah-nav-label:first-child { padding-top: 6px; }
.ah-nav-list, .ah-nav-sub { list-style: none; margin: 0; padding: 0; }
.ah-nav-list > li + li { margin-top: 2px; }

.ah-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 36px;
    padding: 7px 10px;
    border: 0;
    background: transparent;
    border-radius: var(--ah-radius-sm);
    color: var(--ah-side-text);
    font-size: .9643rem;
    font-weight: 500;
    line-height: 1.3;
    text-align: left;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    position: relative;
    transition: background-color .15s ease, color .15s ease;
}
.ah-nav-link:hover { background: var(--ah-side-hover); color: var(--ah-side-strong); }
.ah-nav-link:focus-visible { outline: 2px solid rgba(var(--ah-primary-rgb), .5); outline-offset: -2px; }
.ah-nav-icon { width: 18px; height: 18px; flex: 0 0 18px; stroke-width: 1.9; color: var(--ah-side-icon); }
.ah-nav-link:hover .ah-nav-icon { color: var(--ah-side-strong); }
.ah-nav-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ah-nav-caret { width: 15px; height: 15px; flex: 0 0 15px; color: var(--ah-side-muted); transition: transform .2s ease; }
.ah-nav-group.is-open > .ah-nav-toggle .ah-nav-caret { transform: rotate(90deg); }
.ah-nav-toggle.has-active { color: var(--ah-side-strong); font-weight: 600; }
.ah-nav-toggle.has-active .ah-nav-icon { color: var(--ah-side-active-text); }

.ah-nav-sub { display: none; padding: 2px 0 4px; }
.ah-nav-group.is-open > .ah-nav-sub { display: block; }
.ah-nav-sublink { padding-left: 38px; min-height: 34px; font-size: .9286rem; font-weight: 450; }
.ah-nav-sublink .ah-nav-icon { width: 16px; height: 16px; flex-basis: 16px; display: none; }

.ah-nav-link.active,
.ah-nav-link.active:hover {
    background: var(--ah-side-active-bg);
    color: var(--ah-side-active-text);
    font-weight: 600;
}
.ah-nav-link.active .ah-nav-icon { color: var(--ah-side-active-text); }
.ah-nav-link.active::before {
    content: "";
    position: absolute;
    left: -10px;
    top: 7px;
    bottom: 7px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--ah-primary);
}
.ah-side-brand .ah-nav-link.active::before,
.ah-side-dark .ah-nav-link.active::before { background: #fff; }
.ah-side-dark .ah-nav-link.active::before { background: var(--ah-primary-border); }

/* ---------- collapsed (desktop) ---------- */
@media (min-width: 992px) {
    .ah-collapsed .ah-sidebar.sidebar { width: var(--ah-side-w-mini); }
    .ah-collapsed .ah-brand { padding: 0 16px; }
    .ah-collapsed .ah-brand-full { display: none !important; }
    .ah-collapsed .ah-brand-small { display: flex !important; }
    .ah-collapsed .ah-nav { padding-left: 10px; padding-right: 10px; }
    .ah-collapsed .ah-nav-label { visibility: hidden; height: 12px; padding: 0; margin: 6px 0; border-top: 1px solid var(--ah-side-border); }
    .ah-collapsed .ah-nav-label:first-child { border-top: 0; }
    .ah-collapsed .ah-nav-link { justify-content: center; padding-left: 0; padding-right: 0; gap: 0; }
    .ah-collapsed .ah-nav-text,
    .ah-collapsed .ah-nav-caret { display: none; }
    .ah-collapsed .ah-nav-sublink { padding-left: 0; }
    .ah-collapsed .ah-nav-sublink .ah-nav-icon { display: block; }
    .ah-collapsed .ah-nav-group.is-open > .ah-nav-sub { display: none; }
    .ah-collapsed .ah-nav-toggle.has-active { background: var(--ah-side-active-bg); }

    /* hover = temporary expand over the content */
    .ah-collapsed .ah-sidebar.sidebar:hover,
    .ah-collapsed .ah-sidebar.sidebar:focus-within { width: var(--ah-side-w); box-shadow: var(--ah-shadow-lg); }
    .ah-collapsed .ah-sidebar:hover .ah-brand,
    .ah-collapsed .ah-sidebar:focus-within .ah-brand { padding: 0 18px; }
    .ah-collapsed .ah-sidebar:hover .ah-brand-full,
    .ah-collapsed .ah-sidebar:focus-within .ah-brand-full { display: flex !important; }
    .ah-collapsed .ah-sidebar:hover .ah-brand-small,
    .ah-collapsed .ah-sidebar:focus-within .ah-brand-small { display: none !important; }
    .ah-collapsed .ah-sidebar:hover .ah-nav-label,
    .ah-collapsed .ah-sidebar:focus-within .ah-nav-label { visibility: visible; height: auto; padding: 14px 10px 6px; margin: 0; border-top: 0; }
    .ah-collapsed .ah-sidebar:hover .ah-nav-link,
    .ah-collapsed .ah-sidebar:focus-within .ah-nav-link { justify-content: flex-start; padding-left: 10px; padding-right: 10px; gap: 10px; }
    .ah-collapsed .ah-sidebar:hover .ah-nav-sublink,
    .ah-collapsed .ah-sidebar:focus-within .ah-nav-sublink { padding-left: 38px; }
    .ah-collapsed .ah-sidebar:hover .ah-nav-sublink .ah-nav-icon,
    .ah-collapsed .ah-sidebar:focus-within .ah-nav-sublink .ah-nav-icon { display: none; }
    .ah-collapsed .ah-sidebar:hover .ah-nav-text,
    .ah-collapsed .ah-sidebar:hover .ah-nav-caret,
    .ah-collapsed .ah-sidebar:focus-within .ah-nav-text,
    .ah-collapsed .ah-sidebar:focus-within .ah-nav-caret { display: block; }
    .ah-collapsed .ah-sidebar:hover .ah-nav-group.is-open > .ah-nav-sub,
    .ah-collapsed .ah-sidebar:focus-within .ah-nav-group.is-open > .ah-nav-sub { display: block; }
    .ah-collapsed .ah-sidebar:hover .ah-nav-toggle.has-active,
    .ah-collapsed .ah-sidebar:focus-within .ah-nav-toggle.has-active { background: transparent; }
}

/* ---------- mobile drawer (< 992px) ---------- */
@media (max-width: 991.98px) {
    .ah-sidebar.sidebar {
        width: min(280px, 86vw);
        margin-left: 0;
        transform: translateX(-102%);
        box-shadow: none;
    }
    .slide-nav .ah-sidebar.sidebar { transform: none; margin-left: 0; box-shadow: var(--ah-shadow-lg); }
    .ah-app .sidebar-overlay {
        top: 0;
        z-index: 1040;
        background: rgba(16, 24, 40, .45);
        backdrop-filter: blur(1px);
    }
    html.menu-opened, html.menu-opened body { overflow: hidden; }
}

/* ==========================================================================
   Shell — top bar
   ========================================================================== */
.ah-topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: var(--ah-side-w);
    height: var(--ah-head-h);
    z-index: 1030;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 20px 0 12px;
    background: var(--ah-head-bg);
    color: var(--ah-head-text);
    border-bottom: 1px solid var(--ah-head-border);
    transition: left .22s var(--ah-ease);
}
.ah-head-light .ah-topbar { box-shadow: 0 1px 0 rgba(16, 24, 40, .02); }
.ah-topbar-left { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1 1 auto; }
.ah-topbar-right { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; flex: 0 0 auto; }
.ah-topbar-right > li { display: flex; align-items: center; }

.ah-icon-btn {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: var(--ah-radius-sm);
    background: transparent;
    color: var(--ah-head-muted);
    transition: background-color .15s ease, color .15s ease;
    flex: 0 0 auto;
}
.ah-icon-btn:hover, .ah-icon-btn:focus-visible { background: var(--ah-head-hover); color: var(--ah-head-text); }
.ah-icon-btn svg { width: 18px; height: 18px; stroke-width: 1.9; }
.ah-mobile-btn { display: none; }

.ah-context { display: flex; align-items: center; gap: 10px; min-width: 0; margin-left: 6px; font-size: .9643rem; }
.ah-context-org {
    font-weight: 600;
    color: var(--ah-head-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
}
.ah-context-sep { width: 1px; height: 18px; background: var(--ah-head-border); flex: 0 0 1px; }
.ah-head-brand .ah-context-sep { background: var(--ah-head-btn-border); }
.ah-context-page { color: var(--ah-head-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ah-context-page:empty { display: none; }
.ah-context-org + .ah-context-sep:has(+ .ah-context-page:empty) { display: none; }

.ah-top-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 12px;
    border: 1px solid var(--ah-head-btn-border);
    border-radius: var(--ah-radius-sm);
    background: transparent;
    color: var(--ah-head-text);
    font-size: .9286rem;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease;
}
.ah-top-btn:hover { background: var(--ah-head-hover); color: var(--ah-head-text); }
.ah-top-btn svg { width: 15px; height: 15px; }
.ah-top-btn.cleanCache::before,
.dropdown-item.cleanCache::before {
    content: "\f2f9";
    font-family: "Font Awesome 5 Free", "Font Awesome 6 Free";
    font-weight: 900;
    font-size: .8571rem;
}
.ah-top-btn.cleanCache:has(.spinner-border)::before,
.dropdown-item.cleanCache:has(.spinner-border)::before { display: none; }
.ah-top-btn.cleanCache .spinner-border { width: .9rem; height: .9rem; margin-right: 2px !important; }
.ah-top-btn[disabled] { opacity: .7; pointer-events: none; }

.ah-user { margin-left: 6px; padding-left: 10px; border-left: 1px solid var(--ah-head-border); }
.ah-head-brand .ah-user { border-left-color: var(--ah-head-btn-border); }
.ah-user-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 6px 4px 4px;
    border-radius: var(--ah-radius);
    color: var(--ah-head-text);
    text-decoration: none;
}
.ah-user-btn:hover, .ah-user-btn[aria-expanded="true"] { background: var(--ah-head-hover); color: var(--ah-head-text); }
.ah-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--ah-surface-3);
    flex: 0 0 auto;
    box-shadow: 0 0 0 1px rgba(16, 24, 40, .08);
}
.ah-avatar-lg { width: 42px; height: 42px; }
.ah-user-meta { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.ah-user-name { font-weight: 600; font-size: .9286rem; color: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.ah-user-role { font-size: .7857rem; color: var(--ah-head-muted); white-space: nowrap; }
.ah-user-caret { width: 15px; height: 15px; color: var(--ah-head-muted); }

.ah-user-menu.dropdown-menu { min-width: 240px; padding: 6px; margin-top: 8px !important; }
.ah-user-card { display: flex; align-items: center; gap: 12px; padding: 10px 10px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--ah-border-soft); }
.ah-user-card .ah-user-name { color: var(--ah-text); max-width: 160px; }
.ah-user-card .ah-user-role { color: var(--ah-muted); }
.ah-user-menu .dropdown-item svg { width: 16px; height: 16px; margin-right: 10px; color: var(--ah-muted); vertical-align: -3px; }
.ah-user-menu .dropdown-item.cleanCache::before { margin-right: 12px; color: var(--ah-muted); }
.ah-user-menu .ah-logout, .ah-user-menu .ah-logout svg { color: var(--ah-danger); }
.ah-show-sm { display: none !important; }

/* ==========================================================================
   Shell — page wrapper + footer
   ========================================================================== */
.ah-app .page-wrapper {
    margin: 0 0 0 var(--ah-side-w);
    padding: var(--ah-head-h) 0 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: transparent;
    transition: margin-left .22s var(--ah-ease);
}
.ah-main { flex: 1 0 auto; min-width: 0; }
.ah-app .page-wrapper .content { padding: 24px 28px; }
.ah-footer {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px 16px;
    padding: 14px 28px;
    border-top: 1px solid var(--ah-border);
    background: var(--ah-surface);
    color: var(--ah-muted);
    font-size: .8571rem;
}
.ah-footer a { color: var(--ah-muted); }
.ah-footer a:hover { color: var(--ah-primary-text); }

@media (min-width: 992px) {
    .ah-collapsed .ah-topbar { left: var(--ah-side-w-mini); }
    .ah-collapsed .ah-app .page-wrapper,
    .ah-collapsed body.ah-app .page-wrapper { margin-left: var(--ah-side-w-mini); }
}
@media (max-width: 991.98px) {
    .ah-topbar { left: 0; padding: 0 12px 0 8px; }
    .ah-mobile-btn { display: inline-flex; }
    .ah-collapse-btn { display: none; }
    .ah-app .page-wrapper { margin-left: 0; }
    .ah-app .page-wrapper .content { padding: 16px; }
    .ah-footer { padding: 12px 16px; }
}
@media (max-width: 1279.98px) {
    /* icon-only top buttons so the page context keeps its room */
    .ah-top-btn { width: 34px; padding: 0; justify-content: center; font-size: 0; gap: 0; }
    .ah-top-btn > span { display: none; }
    .ah-top-btn.cleanCache::before { font-size: 13px; }
    .ah-top-btn.cleanCache .spinner-border { margin: 0 !important; }
}
.ah-context-org { flex: 0 1 auto; min-width: 48px; }
@media (max-width: 767.98px) {
    .ah-hide-sm { display: none !important; }
    .ah-show-sm { display: block !important; }
    .ah-user-meta, .ah-user-caret { display: none; }
    .ah-user { margin-left: 2px; padding-left: 6px; }
    .ah-context-org { max-width: 46vw; }
    .ah-context-org ~ .ah-context-page, .ah-context-sep { display: none; }
}

/* ==========================================================================
   Page headers / breadcrumbs (Dreams POS .cardhead, .page-header)
   ========================================================================== */
.cardhead.card-header,
.content > .cardhead {
    background: transparent;
    border: 0;
    padding: 0 0 16px;
    margin-bottom: 4px;
}
.cardhead .page-title,
.page-header .page-title,
.page-header h3,
.page-header h4,
.content .page-title {
    font-size: 1.4286rem;
    font-weight: 600;
    color: var(--ah-text);
    margin: 0 0 4px;
    letter-spacing: -.01em;
}
.page-header { margin-bottom: 20px; }
.page-header h6 { color: var(--ah-muted); font-size: .9286rem; }
.breadcrumb { margin: 0; padding: 0; background: transparent; font-size: .8571rem; }
.breadcrumb .breadcrumb-item, .breadcrumb .breadcrumb-item a { color: var(--ah-muted); font-weight: 400; }
.breadcrumb .breadcrumb-item a:hover { color: var(--ah-primary-text); }
.breadcrumb .breadcrumb-item.active { color: var(--ah-text-2); }
.breadcrumb-item + .breadcrumb-item::before { color: var(--ah-subtle); content: "/"; float: none; padding-right: .5rem; }
.breadcrumb .breadcrumb-item + .breadcrumb-item { padding-left: .5rem; }

/* ==========================================================================
   Cards
   ========================================================================== */
.card {
    background: var(--ah-surface);
    border: 1px solid var(--ah-border);
    border-radius: var(--ah-radius);
    box-shadow: var(--ah-shadow-xs);
    margin-bottom: var(--ah-gap);
}
.card > .card-header,
.card .card-header {
    background: transparent;
    border-bottom: 1px solid var(--ah-border-soft);
    padding: 14px 18px;
}
.card .card-header .card-title,
.card .card-title { font-size: 1.0714rem; font-weight: 600; color: var(--ah-text); margin: 0; }
.card .card-body { padding: 18px; }
.card .card-footer { background: var(--ah-surface-2); border-top: 1px solid var(--ah-border-soft); padding: 12px 18px; }
.card:has(> .table-responsive), .card:has(> .card-body > .table-responsive) { overflow: hidden; }

/* dashboard widgets */
.dash-widget {
    background: var(--ah-surface);
    border: 1px solid var(--ah-border);
    border-radius: var(--ah-radius);
    box-shadow: var(--ah-shadow-xs);
    padding: 18px;
    margin-bottom: var(--ah-gap);
    min-height: 92px;
    display: flex;
    align-items: center;
}
.dash-widget .dash-widgetimg span {
    width: 44px; height: 44px; border-radius: var(--ah-radius); background: var(--ah-primary-soft);
}
.dash-widget .dash-widgetcontent h5 { font-size: 1.2857rem; font-weight: 700; color: var(--ah-text); margin-bottom: 2px; }
.dash-widget .dash-widgetcontent h6 { font-size: .9286rem; font-weight: 500; color: var(--ah-muted); margin: 0; }
.dash-count,
.dash-count.das1,
.dash-count.das2,
.dash-count.das3 {
    background: var(--ah-surface);
    color: var(--ah-text);
    border: 1px solid var(--ah-border);
    border-left: 3px solid var(--ah-primary);
    border-radius: var(--ah-radius);
    box-shadow: var(--ah-shadow-xs);
    min-height: 88px;
    margin-bottom: var(--ah-gap);
    padding: 18px;
}
.dash-count.das1 { border-left-color: #1e9bb8; }
.dash-count.das2 { border-left-color: #3b4a6b; }
.dash-count.das3 { border-left-color: #21a366; }
.dash-count .dash-counts h4 { color: var(--ah-text); font-size: 1.4286rem; font-weight: 700; }
.dash-count .dash-counts h5 { color: var(--ah-muted); font-size: .9286rem; font-weight: 500; }
.dash-count .dash-imgs svg, .dash-count .dash-imgs i { color: var(--ah-subtle); width: 32px; height: 32px; }

/* ==========================================================================
   Tables + DataTables
   ========================================================================== */
.table { color: var(--ah-text); margin: 0; border-color: var(--ah-border-soft); }
.table > :not(:first-child) { border-top: 0; }
.table thead,
.table thead tr { background: var(--ah-surface-2); border-bottom: 1px solid var(--ah-border); }
.table thead th,
.table > thead > tr > th {
    background: var(--ah-surface-2);
    color: var(--ah-muted);
    font-size: .8214rem;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: uppercase;
    padding: 10px 14px;
    border-bottom: 1px solid var(--ah-border) !important;
    white-space: nowrap;
    vertical-align: middle;
}
.table tbody tr td,
.table > tbody > tr > td {
    padding: 10px 14px;
    color: var(--ah-text-2);
    font-weight: 400;
    font-size: .9643rem;
    border-bottom: 1px solid var(--ah-border-soft);
    vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background-color .12s ease; }
.table tbody tr:hover,
.table-hover > tbody > tr:hover > * { background: #f7f9fc; --bs-table-accent-bg: transparent; }
.table tbody tr td a { color: var(--ah-text); }
.table tbody tr td a:hover { color: var(--ah-primary-text); }
.table-striped > tbody > tr:nth-of-type(odd) > * { --bs-table-accent-bg: var(--ah-surface-2); }
.card .table-responsive { border-radius: 0; }

/* sorting arrows: calmer */
table.dataTable > thead .sorting::before, table.dataTable > thead .sorting::after,
table.dataTable > thead .sorting_asc::before, table.dataTable > thead .sorting_asc::after,
table.dataTable > thead .sorting_desc::before, table.dataTable > thead .sorting_desc::after { opacity: .25; font-size: .8em; }
table.dataTable > thead .sorting_asc::before, table.dataTable > thead .sorting_desc::after { opacity: .8; color: var(--ah-primary-text); }
table.dataTable { margin-top: 0 !important; margin-bottom: 0 !important; border-collapse: collapse !important; }

.dataTables_wrapper .row { --bs-gutter-x: 1.5rem; }
.dataTables_wrapper .row.align-items-center { padding: 12px 0 0; margin-top: 4px; }
.dataTables_length, .dataTables_paginate { margin-top: 0 !important; }
.dataTables_length { float: none; font-size: .8571rem; color: var(--ah-muted); }
.dataTables_length label { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 400; color: var(--ah-muted); }
.dataTables_length label::before { content: "Rows per page"; margin: 0; }
.dataTables_length select,
div.dataTables_wrapper div.dataTables_length select {
    width: auto;
    min-width: 68px;
    height: 30px;
    padding: 0 26px 0 10px;
    font-size: .8571rem;
    border: 1px solid var(--ah-border-strong);
    border-radius: var(--ah-radius-sm);
    background-color: #fff;
}
.dataTables_info,
div.dataTables_wrapper div.dataTables_info {
    float: none;
    padding: 0 !important;
    text-align: center;
    font-size: .8571rem;
    font-weight: 400;
    color: var(--ah-muted);
    white-space: normal;
}
div.dataTables_wrapper div.dataTables_paginate { float: none; }
div.dataTables_wrapper div.dataTables_paginate ul.pagination { justify-content: flex-end; margin: 0; }
div.dataTables_wrapper div.dataTables_processing {
    background: rgba(255, 255, 255, .92);
    border: 1px solid var(--ah-border);
    border-radius: var(--ah-radius);
    box-shadow: var(--ah-shadow-md);
    color: var(--ah-text-2);
    font-size: .9286rem;
    padding: 10px 16px !important;
    width: auto;
    margin-left: 0;
    transform: translateX(-50%);
}
@media (max-width: 767.98px) {
    .dataTables_wrapper .row.align-items-center > div { text-align: center; margin-bottom: 8px; }
    div.dataTables_wrapper div.dataTables_paginate ul.pagination { justify-content: center; }
}

/* pagination */
.pagination { gap: 4px; }
.pagination li { margin: 0; }
.pagination .page-link,
.pagination li a,
.pagination li a.page-link {
    min-width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 9px;
    border: 1px solid var(--ah-border);
    border-radius: var(--ah-radius-sm) !important;
    background: #fff;
    color: var(--ah-text-2);
    font-size: .8571rem;
    font-weight: 500;
    box-shadow: none;
    margin: 0;
}
.pagination li a:hover,
.pagination .page-link:hover { background: var(--ah-surface-3); color: var(--ah-text); border-color: var(--ah-border-strong); }
.pagination .page-item.active .page-link,
.pagination li.active a.page-link {
    background: var(--ah-primary);
    border-color: var(--ah-primary);
    color: var(--ah-on-primary);
}
.pagination .page-item.disabled .page-link { background: #fff; color: var(--ah-subtle); border-color: var(--ah-border-soft); }
.page-link:focus { box-shadow: var(--ah-ring); }

/* old list toolbar (search + add) */
.table-top { margin-bottom: 16px; gap: 12px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.search-set { display: flex; align-items: center; }
.search-set .search-input { position: relative; }
.search-set .search-input .btn-searchset {
    position: absolute; left: 4px; top: 50%; transform: translateY(-50%); z-index: 1;
    width: 30px; height: 30px; padding: 0; display: flex; align-items: center; justify-content: center;
    background: transparent; border: 0; border-radius: var(--ah-radius-sm);
}
.search-set .search-input .btn-searchset img { filter: brightness(0) saturate(0) opacity(.45); width: 15px; }
.search-set .search-input input[type=search],
.search-set .search-input .form-control {
    height: var(--ah-control-h);
    width: 280px;
    max-width: 100%;
    padding-left: 34px;
    margin: 0;
}
.search-set .search-input .dataTables_filter label { margin: 0; }
@media (max-width: 575px) {
    .table-top { flex-direction: row; }
    .table-top .wordset { margin-top: 0; }
    .search-set, .search-set .search-input, .search-set .search-input input[type=search] { width: 100%; }
}

/* ==========================================================================
   Forms
   ========================================================================== */
.form-label, .form-group label, label.form-label {
    font-size: .9286rem;
    font-weight: 500;
    color: var(--ah-text-2);
    margin-bottom: 6px;
}
.form-control,
.form-select,
.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group textarea,
.form-group select {
    min-height: var(--ah-control-h);
    padding: .45rem .75rem;
    font-size: .9643rem;
    line-height: 1.45;
    color: var(--ah-text);
    background-color: #fff;
    border: 1px solid var(--ah-border-strong);
    border-radius: var(--ah-radius-sm);
    box-shadow: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.form-control-sm, .form-select-sm { min-height: calc(var(--ah-control-h) - 6px); padding-top: .3rem; padding-bottom: .3rem; font-size: .8929rem; }
.form-control-lg, .form-select-lg { min-height: calc(var(--ah-control-h) + 8px); font-size: 1.0714rem; }
textarea.form-control { min-height: 80px; }
.form-select { padding-right: 2.25rem; background-position: right .7rem center; }
.form-control::placeholder { color: var(--ah-subtle); opacity: 1; }
.form-control:hover:not(:focus):not(:disabled),
.form-select:hover:not(:focus):not(:disabled) { border-color: #b8c0cc; }
.form-control:focus,
.form-select:focus,
.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus,
.form-group textarea:focus {
    border-color: var(--ah-primary);
    box-shadow: var(--ah-ring);
    background-color: #fff;
    outline: 0;
}
.form-control:disabled, .form-control[readonly], .form-select:disabled { background-color: var(--ah-surface-3); color: var(--ah-muted); }
.form-control[type=color] { padding: 4px; width: 56px; }
.form-control.is-invalid, .form-select.is-invalid, .was-validated .form-control:invalid { border-color: var(--ah-danger); }
.form-control.is-invalid:focus, .form-select.is-invalid:focus { box-shadow: 0 0 0 3px rgba(200, 51, 47, .15); }
.invalid-feedback { color: var(--ah-danger); font-size: .8571rem; }
.form-text { color: var(--ah-muted); font-size: .8571rem; }
.input-group-text {
    background: var(--ah-surface-2);
    border-color: var(--ah-border-strong);
    color: var(--ah-muted);
    font-size: .9286rem;
    border-radius: var(--ah-radius-sm);
}
.input-group > .form-control, .input-group > .form-select { min-height: var(--ah-control-h); }
.input-group-sm > .form-control, .input-group-sm > .input-group-text, .input-group-sm > .form-select { min-height: calc(var(--ah-control-h) - 6px); }
.form-check-input { border-color: var(--ah-border-strong); }
.form-check-input:checked { background-color: var(--ah-primary); border-color: var(--ah-primary); }
.form-check-input:focus { border-color: var(--ah-primary); box-shadow: var(--ah-ring); }
.form-switch .form-check-input:focus:not(:checked) { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280,0,0,.25%29'/%3e%3c/svg%3e"); }
.form-range::-webkit-slider-thumb { background: var(--ah-primary); }
.form-group { margin-bottom: 16px; }

/* select2 */
.select2-container { min-width: 0; }
.select2-container--default .select2-selection--single,
.select2-container .select2-selection--single {
    height: var(--ah-control-h);
    border: 1px solid var(--ah-border-strong);
    border-radius: var(--ah-radius-sm);
    background: #fff;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: calc(var(--ah-control-h) - 2px);
    padding-left: .75rem;
    padding-right: 2rem;
    color: var(--ah-text);
    font-size: .9643rem;
}
.select2-container--default .select2-selection--single .select2-selection__placeholder { color: var(--ah-subtle); }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: calc(var(--ah-control-h) - 2px); right: 8px; }
.select2-container--default .select2-selection--multiple {
    min-height: var(--ah-control-h);
    border: 1px solid var(--ah-border-strong);
    border-radius: var(--ah-radius-sm);
    padding: 2px 6px;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background: var(--ah-primary-soft);
    border: 1px solid var(--ah-primary-border);
    color: var(--ah-primary-text);
    border-radius: var(--ah-radius-sm);
    font-size: .8571rem;
    padding: 1px 8px;
    margin-top: 4px;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove { color: var(--ah-primary-text); margin-right: 4px; }
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--focus .select2-selection--single {
    border-color: var(--ah-primary) !important;
    box-shadow: var(--ah-ring);
}
.select2-dropdown {
    border: 1px solid var(--ah-border);
    border-radius: var(--ah-radius-sm);
    box-shadow: var(--ah-shadow-md);
    overflow: hidden;
    z-index: 1060;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid var(--ah-border-strong);
    border-radius: var(--ah-radius-sm);
    height: 32px;
    padding: 4px 8px;
}
.select2-results__option { padding: 7px 12px; font-size: .9286rem; }
.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background: var(--ah-primary-soft);
    color: var(--ah-primary-text);
}
.select2-container--default .select2-results__option[aria-selected=true],
.select2-container--default .select2-results__option--selected { background: var(--ah-surface-3); color: var(--ah-text); font-weight: 500; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    font-family: var(--ah-font);
    font-size: .9286rem;
    font-weight: 500;
    line-height: 1.4;
    padding: .5rem 1rem;
    border-radius: var(--ah-radius-sm);
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
    box-shadow: none;
}
.btn:focus, .btn:focus-visible { box-shadow: var(--ah-ring) !important; }
.btn-sm { font-size: .8571rem; padding: .3rem .7rem; }
.btn-lg { font-size: 1.0714rem; padding: .65rem 1.25rem; }
.btn svg { vertical-align: -2px; }

.btn-primary,
.btn-submit,
.page-header .btn-added {
    background-color: var(--ah-primary) !important;
    border: 1px solid var(--ah-primary) !important;
    color: var(--ah-on-primary) !important;
}
.btn-primary:hover, .btn-primary:focus,
.btn-submit:hover, .btn-submit:focus,
.page-header .btn-added:hover {
    background-color: var(--ah-primary-hover) !important;
    border-color: var(--ah-primary-hover) !important;
    color: var(--ah-on-primary) !important;
}
.btn-primary:active, .btn-primary.active, .btn-submit:active { background-color: var(--ah-primary-active) !important; border-color: var(--ah-primary-active) !important; }
.btn-primary:disabled, .btn-primary.disabled { opacity: .6; }
.btn-submit, .btn-cancel { min-width: 96px; font-weight: 600; font-size: .9286rem; padding: .5rem 1rem; border-radius: var(--ah-radius-sm); }
.btn-submit.btn-sm, .btn-cancel.btn-sm { padding: .35rem .85rem; min-width: 84px; font-size: .8929rem; }
.btn-cancel {
    background: #fff;
    border: 1px solid var(--ah-border-strong);
    color: var(--ah-text-2);
}
.btn-cancel:hover, .btn-cancel:focus { background: var(--ah-surface-3); color: var(--ah-text); border-color: #b8c0cc; }

.btn-outline-primary { color: var(--ah-primary-text); border-color: var(--ah-primary-border); background: #fff; }
.btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary.active, .btn-check:checked + .btn-outline-primary {
    background: var(--ah-primary-soft); color: var(--ah-primary-text); border-color: var(--ah-primary);
}
.btn-outline-secondary, .btn-light, .btn-white, .btn-default {
    background: #fff;
    color: var(--ah-text-2);
    border: 1px solid var(--ah-border-strong);
}
.btn-outline-secondary:hover, .btn-outline-secondary:focus, .btn-light:hover, .btn-white:hover, .btn-default:hover,
.btn-check:checked + .btn-outline-secondary, .btn-outline-secondary.active {
    background: var(--ah-surface-3); color: var(--ah-text); border-color: #b8c0cc;
}
.btn-secondary { background: #5d6879; border-color: #5d6879; color: #fff; }
.btn-secondary:hover { background: #4a5463; border-color: #4a5463; color: #fff; }
.btn-success { background: #16855f; border-color: #16855f; color: #fff; }
.btn-success:hover { background: #106c4d; border-color: #106c4d; color: #fff; }
.btn-danger { background: #c8332f; border-color: #c8332f; color: #fff; }
.btn-danger:hover { background: #a82925; border-color: #a82925; color: #fff; }
.btn-warning { background: #e8a33a; border-color: #e8a33a; color: #2b1d05; }
.btn-info { background: #1e7fc9; border-color: #1e7fc9; color: #fff; }
.btn-info:hover { background: #1868a6; border-color: #1868a6; color: #fff; }
.btn-dark { background: #262b33; border-color: #262b33; color: #fff; }
.btn-outline-danger { color: var(--ah-danger); border-color: var(--ah-danger-border); background: #fff; }
.btn-outline-danger:hover { background: var(--ah-danger-soft); color: var(--ah-danger); border-color: var(--ah-danger); }
.btn-outline-success { color: var(--ah-success); border-color: var(--ah-success-border); background: #fff; }
.btn-outline-success:hover { background: var(--ah-success-soft); color: var(--ah-success); border-color: var(--ah-success); }
.btn-link { color: var(--ah-primary-text); text-decoration: none; }
.btn-link:hover { color: var(--ah-primary-hover); text-decoration: underline; }

/* ==========================================================================
   Badges (soft pastel)
   ========================================================================== */
.badge {
    font-weight: 600;
    font-size: .7857rem;
    letter-spacing: .01em;
    padding: .3em .65em;
    border-radius: 999px;
    line-height: 1.25;
}
.badge.bg-primary, .badges.bg-primary, .badge-primary { background: var(--ah-primary-soft) !important; color: var(--ah-primary-text) !important; }
.badge.bg-success, .badges.bg-lightgreen, .badge-success, .bg-lightgreen { background: var(--ah-success-soft) !important; color: var(--ah-success) !important; }
.badge.bg-danger, .badges.bg-lightred, .badge-danger, .bg-lightred { background: var(--ah-danger-soft) !important; color: var(--ah-danger) !important; }
.badge.bg-warning, .badges.bg-lightyellow, .badge-warning, .bg-lightyellow { background: var(--ah-warning-soft) !important; color: var(--ah-warning) !important; }
.badge.bg-info, .badge-info { background: var(--ah-info-soft) !important; color: var(--ah-info) !important; }
.badge.bg-secondary, .badge.bg-light, .badge-secondary, .badges.bg-lightgrey { background: var(--ah-neutral-soft) !important; color: #4b5565 !important; }
.badge.bg-dark { background: #2b313b !important; color: #fff !important; }
.badges { border-radius: 999px; font-weight: 600; font-size: .7857rem; padding: 3px 10px; }

/* alerts */
.alert { border-radius: var(--ah-radius); font-size: .9286rem; padding: 12px 16px; }
.alert-success { background: var(--ah-success-soft); border-color: var(--ah-success-border); color: #0b5c41; }
.alert-danger { background: var(--ah-danger-soft); border-color: var(--ah-danger-border); color: #8f1f1c; }
.alert-warning { background: var(--ah-warning-soft); border-color: var(--ah-warning-border); color: #7a4500; }
.alert-info { background: var(--ah-info-soft); border-color: var(--ah-info-border); color: #174e99; }
.alert-primary { background: var(--ah-primary-soft); border-color: var(--ah-primary-border); color: var(--ah-primary-text); }

/* ==========================================================================
   Nav tabs / pills
   ========================================================================== */
.nav-tabs { border-bottom: 1px solid var(--ah-border); gap: 4px; }
.nav-tabs .nav-link {
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    margin-bottom: -1px;
    padding: 10px 14px;
    color: var(--ah-muted);
    font-weight: 500;
    font-size: .9643rem;
    background: transparent;
}
.nav-tabs .nav-link:hover { color: var(--ah-text); border-bottom-color: var(--ah-border-strong); }
.nav-tabs .nav-link.active,
.nav-tabs .nav-item.show .nav-link,
.tabs-set .nav-tabs .nav-link.active {
    color: var(--ah-primary-text);
    background: transparent;
    border-bottom: 2px solid var(--ah-primary);
}
.nav-pills .nav-link { border-radius: var(--ah-radius-sm); color: var(--ah-text-2); font-weight: 500; }
.nav-pills .nav-link.active, .nav-pills .show > .nav-link { background: var(--ah-primary-soft); color: var(--ah-primary-text); }

/* ==========================================================================
   Dropdowns, modals, tooltips
   ========================================================================== */
.dropdown-menu {
    border: 1px solid var(--ah-border);
    border-radius: var(--ah-radius);
    box-shadow: var(--ah-shadow-md);
    padding: 6px;
    font-size: .9286rem;
}
.dropdown-item { border-radius: var(--ah-radius-sm); padding: 7px 10px; color: var(--ah-text-2); }
.dropdown-item:hover, .dropdown-item:focus { background: var(--ah-surface-3); color: var(--ah-text); }
.dropdown-item.active, .dropdown-item:active { background: var(--ah-primary-soft); color: var(--ah-primary-text); }
.dropdown-divider { border-color: var(--ah-border-soft); margin: 6px 0; }

.modal-content {
    border: 1px solid var(--ah-border);
    border-radius: var(--ah-radius-lg);
    box-shadow: var(--ah-shadow-lg);
    overflow: hidden;
}
.modal-header { padding: 16px 20px; border-bottom: 1px solid var(--ah-border-soft); background: #fff; }
.modal .modal-title, .modal-title { font-size: 1.1429rem; font-weight: 600; color: var(--ah-text); }
.modal-body { padding: 20px; }
.modal-footer { padding: 12px 20px; border-top: 1px solid var(--ah-border-soft); background: var(--ah-surface-2); gap: 8px; }
.modal-footer > * { margin: 0; }
.modal .modal-footer .btn { min-width: 0; }
.modal .btn-close, .modal .close {
    width: 32px; height: 32px; padding: 0; border-radius: var(--ah-radius-sm);
    background-color: transparent; opacity: .55; box-shadow: none; border: 0;
    background-size: 12px; position: static; font-size: 0;
}
.modal .btn-close:hover, .modal .close:hover { background-color: var(--ah-surface-3); opacity: .9; }
.modal-backdrop.show { opacity: .45; background: #101828; }
.tooltip-inner { border-radius: var(--ah-radius-sm); font-size: .8214rem; padding: 5px 9px; background: #1f2329; }

/* ==========================================================================
   Toastr + SweetAlert2
   ========================================================================== */
#toast-container > div,
#toast-container > .toast {
    opacity: 1;
    border-radius: var(--ah-radius);
    box-shadow: var(--ah-shadow-lg) !important;
    padding: 14px 16px 14px 48px;
    width: 340px;
    max-width: calc(100vw - 24px);
    font-family: var(--ah-font);
    font-size: .9286rem;
    background-position: 16px 15px;
    background-size: 18px;
}
#toast-container > div:hover { box-shadow: var(--ah-shadow-lg) !important; opacity: 1; }
#toast-container .toast-title { font-weight: 600; text-transform: capitalize; margin-bottom: 2px; }
#toast-container .toast-message { line-height: 1.45; }
#toast-container .toast-close-button { opacity: .7; text-shadow: none; font-weight: 400; top: -4px; right: -4px; }
#toast-container .toast-success, .toast-success { background-color: #16805c; }
#toast-container .toast-error, .toast-error { background-color: #c8332f; }
#toast-container .toast-warning, .toast-warning { background-color: #b86d0a; }
#toast-container .toast-info, .toast-info { background-color: #1e66c9; }
.toast-progress { opacity: .25; }
#toast-container.toast-top-left { top: 72px; left: auto; right: 16px; }
.ah-app #toast-container.toast-top-right { top: 72px; right: 16px; }
.ah-auth #toast-container.toast-top-left { top: 16px; }

.swal2-popup {
    border-radius: var(--ah-radius-lg) !important;
    font-family: var(--ah-font) !important;
    padding: 1.5rem 1.5rem 1.25rem !important;
    box-shadow: var(--ah-shadow-lg);
}
.swal2-title, .swal2-header .swal2-title { font-size: 1.2857rem !important; font-weight: 600 !important; color: var(--ah-text) !important; }
.swal2-html-container, .swal2-content { font-size: .9643rem !important; color: var(--ah-text-2) !important; }
.swal2-actions { gap: 8px; }
.swal2-actions button, .swal2-styled { margin: 0 !important; }
.swal2-styled.swal2-confirm {
    background: var(--ah-primary) !important;
    color: var(--ah-on-primary) !important;
    border-radius: var(--ah-radius-sm) !important;
    font-size: .9286rem !important;
    font-weight: 600 !important;
    padding: .55rem 1.2rem !important;
}
.swal2-styled.swal2-confirm:hover { background: var(--ah-primary-hover) !important; background-image: none !important; }
.swal2-styled.swal2-cancel, .swal2-styled.swal2-deny {
    background: #fff !important;
    color: var(--ah-text-2) !important;
    border: 1px solid var(--ah-border-strong) !important;
    border-radius: var(--ah-radius-sm) !important;
    font-size: .9286rem !important;
    font-weight: 500 !important;
    padding: .55rem 1.2rem !important;
}
.swal2-styled.swal2-deny { color: var(--ah-danger) !important; }
.swal2-styled:focus { box-shadow: var(--ah-ring) !important; }
.swal2-icon { transform: scale(.8); margin: .5rem auto .75rem !important; }

/* misc legacy bits */
.ribbon.ribbon-primary { background: var(--ah-primary); }
.bar-icon span { background-color: var(--ah-head-muted); }
.checkboxs input:checked ~ .checkmarks { background-color: var(--ah-primary); border-color: var(--ah-primary); }
.table tbody tr td .product-imgs { color: var(--ah-primary-text) !important; background: var(--ah-primary-soft); }
.error-box h1 { color: var(--ah-primary-text); }

/* ==========================================================================
   Login
   ========================================================================== */
.ah-auth { background: var(--ah-bg); }
.ah-login {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    position: relative;
    isolation: isolate;
}
.ah-login-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}
.ah-login-main {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    min-width: 0;
}
.ah-login-card {
    width: 100%;
    max-width: 400px;
}
.ah-login-logo { margin-bottom: 28px; }
.ah-login-logo img { max-height: 56px; max-width: 200px; width: auto; height: auto; display: block; }
.ah-login-title { font-size: 1.6429rem; font-weight: 700; letter-spacing: -.015em; margin: 0 0 6px; color: var(--ah-text); line-height: 1.25; }
.ah-login-sub { color: var(--ah-muted); margin: 0 0 24px; font-size: 1rem; }
.ah-login-form .ah-field { margin-bottom: 16px; }
.ah-login-form .form-label { font-size: .9286rem; font-weight: 500; color: var(--ah-text-2); }
.ah-input-icon { position: relative; }
.ah-input-icon > i {
    position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
    color: var(--ah-subtle); font-size: .9286rem; pointer-events: none;
}
.ah-login-form .form-control { min-height: 2.9rem; padding-left: 38px; font-size: 1rem; border-radius: var(--ah-radius-sm); }
.ah-login-form .pass-group .form-control { padding-right: 44px; }
.ah-login-form .form-control.is-invalid { background-image: none; padding-right: 44px; background-color: #fffafa; }
.ah-login-form .toggle-password {
    position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
    width: 38px; height: 38px; border: 0; background: transparent; color: var(--ah-subtle);
    border-radius: var(--ah-radius-sm); font-size: .9286rem; cursor: pointer;
}
.ah-login-form .toggle-password:hover { color: var(--ah-primary-text); background: var(--ah-surface-3); }
.ah-field-error { color: var(--ah-danger); font-size: .8571rem; margin-top: 6px; display: flex; gap: 6px; align-items: flex-start; }
.ah-field-error::before { content: "\f06a"; font-family: "Font Awesome 5 Free", "Font Awesome 6 Free"; font-weight: 900; }
.ah-login-btn.btn { width: 100%; min-height: 2.9rem; margin-top: 8px; font-size: 1rem; font-weight: 600; }
.ah-login-foot { margin: 28px 0 0; font-size: .8214rem; color: var(--ah-subtle); }

/* split: brand / image side + form */
.ah-login--split .ah-login-aside {
    flex: 0 0 46%;
    max-width: 640px;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(120% 80% at 0% 0%, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, 0) 55%),
        radial-gradient(90% 70% at 100% 100%, rgba(0, 0, 0, .28) 0%, rgba(0, 0, 0, 0) 60%),
        linear-gradient(150deg, var(--ah-primary) 0%, var(--ah-primary-active) 100%);
}
.ah-login--split .ah-login-aside::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: radial-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, .9), rgba(0, 0, 0, 0) 75%);
}
.ah-login--split.has-bg .ah-login-aside::after {
    background: linear-gradient(180deg, rgba(16, 24, 40, .15) 0%, rgba(16, 24, 40, .65) 100%);
    mask-image: none;
}
.ah-login--split .ah-login-aside .ah-login-bg { z-index: -2; }
.ah-login-aside-inner {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px 48px;
    gap: 32px;
}
.ah-login-aside-logo img {
    max-height: 52px;
    max-width: 210px;
    width: auto;
    background: rgba(255, 255, 255, .94);
    padding: 8px 12px;
    border-radius: var(--ah-radius);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
}
.ah-login-aside-copy { max-width: 460px; }
.ah-login-aside-copy h2 { color: #fff; font-size: 2rem; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; margin: 0 0 12px; }
.ah-login-aside-copy p { color: rgba(255, 255, 255, .85); font-size: 1.0714rem; line-height: 1.6; margin: 0; }
.ah-login--split .ah-login-main { background: var(--ah-surface); }
.ah-login--split .ah-login-logo { display: none; }

/* centered: full-bleed background + card */
.ah-login--centered {
    background:
        radial-gradient(80% 60% at 10% 0%, rgba(var(--ah-primary-rgb), .22) 0%, rgba(var(--ah-primary-rgb), 0) 60%),
        radial-gradient(70% 60% at 100% 100%, rgba(var(--ah-primary-rgb), .16) 0%, rgba(var(--ah-primary-rgb), 0) 60%),
        var(--ah-bg);
}
.ah-login--centered.has-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(16, 24, 40, .35);
}
.ah-login--centered > .ah-login-bg { z-index: -2; }
.ah-login--centered .ah-login-card {
    max-width: 420px;
    background: var(--ah-surface);
    border: 1px solid var(--ah-border);
    border-radius: var(--ah-radius-lg);
    box-shadow: var(--ah-shadow-lg);
    padding: 36px 32px 28px;
}
.ah-login--centered .ah-login-logo { display: flex; justify-content: center; margin-bottom: 22px; }
.ah-login--centered .ah-login-title,
.ah-login--centered .ah-login-sub,
.ah-login--centered .ah-login-foot { text-align: center; }

@media (max-width: 991.98px) {
    .ah-login--split .ah-login-aside { display: none; }
    .ah-login--split .ah-login-logo { display: block; }
}
@media (max-width: 575.98px) {
    .ah-login-main { padding: 24px 16px; align-items: flex-start; }
    .ah-login--split .ah-login-main { padding-top: 48px; }
    .ah-login--centered .ah-login-main { align-items: center; }
    .ah-login--centered .ah-login-card { padding: 28px 20px 22px; }
    .ah-login-title { font-size: 1.4286rem; }
}
@media (prefers-reduced-motion: reduce) {
    .ah-sidebar.sidebar, .ah-topbar, .ah-app .page-wrapper, .ah-nav-caret { transition: none; }
}
