/* ==========================================================================
   AwayMood admin theme
   Loaded after Metronic 7 (Bootstrap 4.5). It restyles Metronic components
   and adds the AwayMood shell (sidebar, top bar) and dashboard widgets.
   Uses logical properties so the same rules serve LTR and RTL.
   ========================================================================== */

:root {
    --am-ink: #14213D;
    --am-ink-2: #1C2C4F;
    --am-ink-3: #2B3D66;
    --am-ink-soft: #E9ECF4;
    --am-gold: #A77A22;
    --am-gold-2: #D0A92C;
    --am-gold-3: #E3BF4F;
    --am-gold-soft: #FBF4E2;

    --am-bg: #F5F7FB;
    --am-surface: #FFFFFF;
    --am-surface-2: #FAFBFD;
    --am-border: #E6EAF2;
    --am-border-strong: #D5DBE7;

    --am-text: #14213D;
    --am-text-2: #4A5672;
    --am-muted: #8590A6;

    --am-success: #12A37A;
    --am-success-soft: #E4F6EF;
    --am-danger: #D64545;
    --am-danger-soft: #FCEBEB;
    --am-warning: #E0820F;
    --am-warning-soft: #FEF1E1;
    --am-info: #2F6FED;
    --am-info-soft: #E8F0FE;
    --am-neutral: #6B7590;
    --am-neutral-soft: #EEF0F5;

    --am-radius: 14px;
    --am-radius-sm: 10px;
    --am-radius-xs: 7px;
    --am-shadow: 0 1px 2px rgba(20, 33, 61, .04), 0 6px 20px rgba(20, 33, 61, .045);
    --am-shadow-lg: 0 12px 40px rgba(20, 33, 61, .14);
    --am-ring: 0 0 0 3px rgba(208, 169, 44, .28);

    --am-sidebar-w: 264px;
    --am-sidebar-mini-w: 78px;
    --am-topbar-h: 68px;

    --am-font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --am-font-num: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

html[lang="ar"] {
    --am-font: 'Cairo', 'Inter', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
}

/* ---------- Base ---------- */
html, body {
    font-family: var(--am-font);
    font-size: 13.5px;
}

body {
    background: var(--am-bg);
    color: var(--am-text);
    border-top: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "cv11", "ss01";
}

body, td, th, input, select, textarea, button, .btn, .tooltip, .popover, .dropdown-menu, .daterangepicker,
.apexcharts-legend-text, .apexcharts-text, .apexcharts-title-text, .apexcharts-tooltip, .swal2-popup,
.leaflet-container .leaflet-popup-content-wrapper .leaflet-popup-content, .toast {
    font-family: var(--am-font) !important;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    color: var(--am-ink);
    font-weight: 700;
    letter-spacing: -.01em;
}

html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3, html[lang="ar"] h4, html[lang="ar"] h5, html[lang="ar"] h6 {
    letter-spacing: 0;
}

a { color: var(--am-ink-3); }
a:hover { color: var(--am-gold); text-decoration: none; }

::selection { background: rgba(208, 169, 44, .28); color: var(--am-ink); }

.am-num, .number { font-variant-numeric: tabular-nums; font-family: var(--am-font-num); }

.text-muted { color: var(--am-muted) !important; }
.text-dark, .text-dark-75 { color: var(--am-ink) !important; }
.text-primary { color: var(--am-ink-3) !important; }
.text-gold { color: var(--am-gold) !important; }
.text-success { color: var(--am-success) !important; }
.text-danger { color: var(--am-danger) !important; }
.text-warning { color: var(--am-warning) !important; }
.bg-primary { background-color: var(--am-ink) !important; }

*:focus-visible { outline: none; box-shadow: var(--am-ring); }

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: #C9D0DE transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: #C9D0DE; border-radius: 8px; }
*::-webkit-scrollbar-track { background: transparent; }

/* ==========================================================================
   Shell
   ========================================================================== */
.am-shell {
    min-height: 100vh;
    display: flex;
}

.am-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    margin-inline-start: var(--am-sidebar-w);
    transition: margin .25s ease;
}

.am-content {
    flex: 1 0 auto;
    padding: 24px 28px 8px;
}

.am-content > .d-flex.flex-column-fluid > .container-fluid,
.am-content .container-fluid {
    padding-left: 0;
    padding-right: 0;
}

/* ---------- Sidebar ---------- */
.am-sidebar {
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    width: var(--am-sidebar-w);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(120% 60% at 0% 0%, rgba(208, 169, 44, .10), transparent 60%),
        linear-gradient(180deg, #14213D 0%, #111C35 100%);
    color: rgba(255, 255, 255, .78);
    transition: width .25s ease, transform .25s ease;
}

.am-sidebar__brand {
    height: var(--am-topbar-h);
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px 0 20px;
    padding-inline: 20px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.am-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: #fff !important;
    text-decoration: none !important;
    min-width: 0;
}

.am-brand__mark {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: block;
}

.am-brand__word {
    font-family: 'Inter', var(--am-font);
    font-weight: 800;
    font-size: 19px;
    letter-spacing: -.02em;
    white-space: nowrap;
    color: #fff;
    direction: ltr;
}

.am-brand__word b { font-weight: 800; color: var(--am-gold-2); }

.am-brand__tag {
    display: block;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .45);
    margin-top: -1px;
}

html[lang="ar"] .am-brand__tag { letter-spacing: 0; }

.am-sidebar__collapse {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .04);
    color: rgba(255, 255, 255, .7);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s, color .2s;
    padding: 0;
}

.am-sidebar__collapse:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.am-sidebar__collapse i { font-size: 15px; transition: transform .25s ease; }
[dir="rtl"] .am-sidebar__collapse i { transform: scaleX(-1); }

.am-sidebar__scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 14px 12px 18px;
    scrollbar-color: rgba(255, 255, 255, .15) transparent;
}

.am-sidebar__scroll::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .15); }

.am-nav { list-style: none; margin: 0; padding: 0; }

.am-nav__section {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .38);
    padding: 16px 12px 7px;
    white-space: nowrap;
}

html[lang="ar"] .am-nav__section { letter-spacing: 0; font-size: 11.5px; }

.am-nav__section:first-child { padding-top: 4px; }

.am-nav__link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    margin: 1px 0;
    border-radius: 10px;
    color: rgba(255, 255, 255, .74) !important;
    font-weight: 500;
    font-size: 13.5px;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background .15s ease, color .15s ease;
}

.am-nav__link:hover { background: rgba(255, 255, 255, .06); color: #fff !important; }

.am-nav__icon {
    width: 22px;
    flex: 0 0 22px;
    text-align: center;
    font-size: 19px;
    color: rgba(255, 255, 255, .55);
    transition: color .15s ease;
}

.am-nav__link:hover .am-nav__icon { color: rgba(255, 255, 255, .9); }

.am-nav__text { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; }

.am-nav__badge {
    flex: 0 0 auto;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.am-nav__badge--alert { background: var(--am-gold-2); color: var(--am-ink); }

.am-nav__link.is-active {
    background: linear-gradient(90deg, rgba(208, 169, 44, .18), rgba(208, 169, 44, .04));
    color: #fff !important;
    font-weight: 600;
}

[dir="rtl"] .am-nav__link.is-active {
    background: linear-gradient(270deg, rgba(208, 169, 44, .18), rgba(208, 169, 44, .04));
}

.am-nav__link.is-active::before {
    content: "";
    position: absolute;
    inset-inline-start: -12px;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--am-gold-2);
}

[dir="rtl"] .am-nav__link.is-active::before { border-radius: 3px 0 0 3px; }

.am-nav__link.is-active .am-nav__icon { color: var(--am-gold-2); }

.am-sidebar__foot {
    flex: 0 0 auto;
    padding: 14px 16px;
    border-top: 1px solid rgba(255, 255, 255, .06);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: rgba(255, 255, 255, .45);
    white-space: nowrap;
    overflow: hidden;
}

.am-sidebar__foot .am-live-dot { flex: 0 0 auto; }

/* Mini (collapsed) sidebar - desktop only */
@media (min-width: 992px) {
    body.am-sidebar-mini .am-sidebar { width: var(--am-sidebar-mini-w); }
    body.am-sidebar-mini .am-main { margin-inline-start: var(--am-sidebar-mini-w); }
    body.am-sidebar-mini .am-brand__text,
    body.am-sidebar-mini .am-nav__text,
    body.am-sidebar-mini .am-nav__section span,
    body.am-sidebar-mini .am-sidebar__foot span { display: none; }
    body.am-sidebar-mini .am-nav__section { padding: 12px 0 6px; text-align: center; }
    body.am-sidebar-mini .am-nav__section::after {
        content: ""; display: block; width: 18px; height: 1px; margin: 0 auto; background: rgba(255, 255, 255, .14);
    }
    body.am-sidebar-mini .am-nav__link { justify-content: center; padding: 10px 0; }
    body.am-sidebar-mini .am-nav__badge {
        position: absolute; top: 3px; inset-inline-end: 6px; min-width: 16px; height: 16px; line-height: 16px; font-size: 9.5px; padding: 0 4px;
    }
    body.am-sidebar-mini .am-sidebar__brand { padding-inline: 0; justify-content: center; flex-direction: column; gap: 6px; height: auto; padding-block: 14px; }
    body.am-sidebar-mini .am-sidebar__collapse i { transform: scaleX(-1); }
    [dir="rtl"] body.am-sidebar-mini .am-sidebar__collapse i { transform: none; }
    body.am-sidebar-mini .am-sidebar__foot { justify-content: center; }
}

/* Off-canvas sidebar on small screens */
@media (max-width: 991.98px) {
    .am-sidebar { transform: translateX(-102%); box-shadow: none; width: 280px; }
    [dir="rtl"] .am-sidebar { transform: translateX(102%); }
    body.am-sidebar-open .am-sidebar { transform: none; box-shadow: var(--am-shadow-lg); }
    .am-main { margin-inline-start: 0; }
    .am-sidebar__collapse { display: none; }
    .am-content { padding: 18px 16px 8px; }
}

.am-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(13, 21, 40, .45);
    backdrop-filter: blur(2px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
}

@media (max-width: 991.98px) {
    body.am-sidebar-open .am-backdrop { opacity: 1; visibility: visible; }
    body.am-sidebar-open { overflow: hidden; }
}

/* ---------- Top bar ---------- */
.am-topbar {
    position: sticky;
    top: 0;
    z-index: 95;
    height: var(--am-topbar-h);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 28px;
    background: rgba(255, 255, 255, .86);
    backdrop-filter: saturate(1.4) blur(10px);
    -webkit-backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--am-border);
}

.am-topbar__burger {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    border: 1px solid var(--am-border);
    background: #fff;
    color: var(--am-ink);
    align-items: center;
    justify-content: center;
    padding: 0;
    flex: 0 0 auto;
}

.am-topbar__burger i { font-size: 20px; }

.am-topbar__brand { display: none; }

.am-search {
    position: relative;
    flex: 0 1 420px;
    min-width: 0;
}

.am-search i {
    position: absolute;
    top: 50%;
    inset-inline-start: 13px;
    transform: translateY(-50%);
    color: var(--am-muted);
    font-size: 17px;
    pointer-events: none;
}

.am-search input {
    width: 100%;
    height: 40px;
    border-radius: 11px;
    border: 1px solid var(--am-border);
    background: var(--am-bg);
    padding-inline: 38px 52px;
    font-size: 13px;
    color: var(--am-ink);
    transition: border-color .15s, background .15s, box-shadow .15s;
}

.am-search input::placeholder { color: var(--am-muted); }

.am-search input:focus { outline: none; background: #fff; border-color: var(--am-gold-2); box-shadow: var(--am-ring); }

.am-search kbd {
    position: absolute;
    top: 50%;
    inset-inline-end: 10px;
    transform: translateY(-50%);
    background: #fff;
    border: 1px solid var(--am-border);
    border-bottom-width: 2px;
    color: var(--am-muted);
    font-size: 11px;
    font-family: var(--am-font);
    padding: 1px 6px;
    border-radius: 6px;
    box-shadow: none;
}

.am-topbar__spacer { flex: 1 1 auto; }

.am-topbar__actions { display: flex; align-items: center; gap: 8px; }

.am-iconbtn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    border: 1px solid var(--am-border);
    background: #fff;
    color: var(--am-ink-3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    transition: border-color .15s, background .15s, color .15s;
    text-decoration: none !important;
}

.am-iconbtn:hover { border-color: var(--am-border-strong); background: var(--am-surface-2); color: var(--am-ink); }
.am-iconbtn i { font-size: 19px; }
.am-iconbtn--text { width: auto; padding: 0 12px; gap: 7px; font-weight: 600; font-size: 12.5px; }

.am-iconbtn__count {
    position: absolute;
    top: -6px;
    inset-inline-end: -6px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 10px;
    background: var(--am-danger);
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 19px;
    text-align: center;
    border: 2px solid #fff;
    box-sizing: content-box;
    font-variant-numeric: tabular-nums;
}

.am-iconbtn__count[hidden] { display: none; }

.am-bell.is-ringing { animation: am-ring 1s ease-in-out 3; border-color: var(--am-gold-2); background: var(--am-gold-soft); color: var(--am-gold); }
.am-bell.is-ringing i { animation: am-wiggle .5s ease-in-out 6; transform-origin: 50% 10%; }

@keyframes am-ring {
    0%, 100% { box-shadow: 0 0 0 0 rgba(208, 169, 44, 0); }
    50% { box-shadow: 0 0 0 7px rgba(208, 169, 44, .25); }
}

@keyframes am-wiggle {
    0%, 100% { transform: rotate(0); }
    25% { transform: rotate(14deg); }
    75% { transform: rotate(-14deg); }
}

.am-user {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 4px;
    padding-inline-end: 12px;
    border-radius: 13px;
    border: 1px solid var(--am-border);
    background: #fff;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    max-width: 240px;
}

.am-user:hover { border-color: var(--am-border-strong); background: var(--am-surface-2); }

.am-user img {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    object-fit: cover;
    flex: 0 0 32px;
}

.am-user__meta { line-height: 1.2; min-width: 0; }
.am-user__name { font-weight: 700; color: var(--am-ink); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.am-user__role { font-size: 11px; color: var(--am-muted); display: block; }

/* Bell dropdown */
.am-dropdown {
    width: 360px;
    max-width: calc(100vw - 24px);
    padding: 0;
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius);
    box-shadow: var(--am-shadow-lg);
    overflow: hidden;
}

.am-dropdown__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    background: linear-gradient(135deg, var(--am-ink), var(--am-ink-3));
    color: #fff;
}

.am-dropdown__title { font-weight: 700; font-size: 14px; color: #fff; margin: 0; }
.am-dropdown__sub { font-size: 11.5px; color: rgba(255, 255, 255, .65); }

.am-dropdown__body { max-height: 340px; overflow-y: auto; }

.am-dropdown__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-top: 1px solid var(--am-border);
    background: var(--am-surface-2);
    font-size: 12px;
}

.am-sound-toggle {
    border: 0;
    background: transparent;
    color: var(--am-text-2);
    font-weight: 600;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    cursor: pointer;
}

.am-sound-toggle i { font-size: 16px; }
.am-sound-toggle.is-off { color: var(--am-muted); }

.am-ditem {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    border-bottom: 1px solid var(--am-border);
    color: var(--am-text) !important;
    text-decoration: none !important;
    transition: background .15s;
}

.am-ditem:last-child { border-bottom: 0; }
.am-ditem:hover { background: var(--am-surface-2); }
.am-ditem__main { flex: 1 1 auto; min-width: 0; }
.am-ditem__title { font-weight: 600; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.am-ditem__sub { font-size: 11.5px; color: var(--am-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.am-empty {
    padding: 28px 16px;
    text-align: center;
    color: var(--am-muted);
    font-size: 12.5px;
}

.am-empty i { display: block; font-size: 30px; color: var(--am-border-strong); margin-bottom: 8px; }

@media (max-width: 991.98px) {
    .am-topbar { padding: 0 16px; gap: 10px; }
    .am-topbar__burger { display: inline-flex; }
    .am-topbar__brand { display: inline-flex; }
    .am-topbar__brand .am-brand__word { color: var(--am-ink); font-size: 17px; }
    .am-topbar__brand .am-brand__word b { color: var(--am-gold); }
    .am-search { display: none; }
    .am-user__meta { display: none; }
    .am-user { padding-inline-end: 4px; }
    .am-topbar__lang-text { display: none; }
}

@media (max-width: 575.98px) {
    .am-topbar__brand .am-brand__text { display: none; }
}

/* ---------- Page head ---------- */
.am-pagehead {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.am-pagehead__title { font-size: 22px; font-weight: 800; margin: 0; letter-spacing: -.02em; color: var(--am-ink); }
html[lang="ar"] .am-pagehead__title { letter-spacing: 0; }

.am-crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    margin: 4px 0 0;
    padding: 0;
    font-size: 12.5px;
    color: var(--am-muted);
}

.am-crumbs .breadcrumb-item { display: inline-flex; align-items: center; padding: 0 !important; }
.am-crumbs > li::before { display: none !important; }
.am-crumbs > li + li::before {
    content: "" !important;
    width: 4px;
    height: 4px;
    padding: 0 !important;
    border-radius: 50%;
    background: var(--am-border-strong);
    margin: 0 9px;
    display: inline-block !important;
}
.am-filters .select2-container { width: 100% !important; }
.am-filters .select2-container .select2-selection--single { height: 40px; }
.am-crumbs a { color: var(--am-muted) !important; }
.am-crumbs a:hover { color: var(--am-gold) !important; }

.am-pagehead__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- Footer ---------- */
.am-footer {
    padding: 14px 28px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    color: var(--am-muted);
    font-size: 12px;
}

.am-footer a { color: var(--am-muted); }

@media (max-width: 991.98px) { .am-footer { padding: 12px 16px 18px; } }

/* ==========================================================================
   Metronic component overrides
   ========================================================================== */

/* Cards */
.card, .card.card-custom {
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius);
    box-shadow: var(--am-shadow);
    background: var(--am-surface);
}

.card.card-custom > .card-header, .card > .card-header {
    background: transparent;
    border-bottom: 1px solid var(--am-border);
    min-height: 62px;
    padding: 14px 22px;
    border-top-left-radius: var(--am-radius);
    border-top-right-radius: var(--am-radius);
}

.card.card-custom > .card-header.border-0 { border-bottom: 1px solid var(--am-border) !important; }
.card.card-custom > .card-header .card-title, .card.card-custom > .card-header .card-title .card-label {
    font-size: 15.5px;
    font-weight: 700;
    color: var(--am-ink);
    margin: 0;
}

.card .card-body { padding: 20px 22px; }
.card .card-footer { background: var(--am-surface-2); border-top: 1px solid var(--am-border); border-radius: 0 0 var(--am-radius) var(--am-radius); }

.gutter-b { margin-bottom: 22px; }

/* Buttons */
.btn {
    border-radius: var(--am-radius-sm);
    font-weight: 600;
    font-size: 13px;
    padding: .55rem 1rem;
    transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .05s;
}

.btn:active { transform: translateY(1px); }
.btn.btn-sm { padding: .38rem .75rem; font-size: 12px; border-radius: 8px; }
.btn.btn-lg { border-radius: 12px; }

.btn.btn-primary, .btn.btn-brand {
    background: var(--am-ink) !important;
    border-color: var(--am-ink) !important;
    color: #fff !important;
}

.btn.btn-primary:hover, .btn.btn-primary:focus, .btn.btn-primary:not(:disabled):not(.disabled):active,
.btn.btn-brand:hover {
    background: var(--am-ink-3) !important;
    border-color: var(--am-ink-3) !important;
    color: #fff !important;
}

.btn.btn-gold, .btn.btn-warning {
    background: var(--am-gold-2) !important;
    border-color: var(--am-gold-2) !important;
    color: var(--am-ink) !important;
}

.btn.btn-gold:hover, .btn.btn-warning:hover { background: var(--am-gold-3) !important; border-color: var(--am-gold-3) !important; }

.btn.btn-success { background: var(--am-success) !important; border-color: var(--am-success) !important; color: #fff !important; }
.btn.btn-danger { background: var(--am-danger) !important; border-color: var(--am-danger) !important; color: #fff !important; }

.btn.btn-light, .btn.btn-secondary, .btn.btn-default, .btn.btn-outline-secondary {
    background: #fff !important;
    border: 1px solid var(--am-border) !important;
    color: var(--am-ink) !important;
}

.btn.btn-light:hover, .btn.btn-secondary:hover, .btn.btn-default:hover, .btn.btn-outline-secondary:hover {
    background: var(--am-surface-2) !important;
    border-color: var(--am-border-strong) !important;
}

.btn.btn-light-primary { background: var(--am-ink-soft) !important; color: var(--am-ink) !important; border-color: transparent !important; }
.btn.btn-light-primary:hover { background: var(--am-ink) !important; color: #fff !important; }
.btn.btn-light-success, .btn.btn-light-success.btn-text-success { background: var(--am-success-soft) !important; color: var(--am-success) !important; border-color: transparent !important; }
.btn.btn-light-danger, .btn.btn-light-danger.btn-text-danger { background: var(--am-danger-soft) !important; color: var(--am-danger) !important; border-color: transparent !important; }
.btn.btn-light-warning, .btn.btn-light-warning.btn-text-warning { background: var(--am-warning-soft) !important; color: var(--am-warning) !important; border-color: transparent !important; }

.btn.btn-outline-success { border-color: rgba(18, 163, 122, .35) !important; color: var(--am-success) !important; background: transparent; }
.btn.btn-outline-success:hover { background: var(--am-success) !important; color: #fff !important; }
.btn.btn-outline-danger { border-color: rgba(214, 69, 69, .35) !important; color: var(--am-danger) !important; background: transparent; }
.btn.btn-outline-danger:hover { background: var(--am-danger) !important; color: #fff !important; }
.btn.btn-outline-primary { border-color: rgba(20, 33, 61, .25) !important; color: var(--am-ink) !important; background: transparent; }
.btn.btn-outline-primary:hover { background: var(--am-ink) !important; color: #fff !important; }

.btn.btn-clean { color: var(--am-muted); background: transparent; border-color: transparent; }
.btn.btn-clean:hover { background: var(--am-bg) !important; color: var(--am-ink) !important; }
.btn.btn-icon.btn-lg, .btn.btn-icon { width: 34px; height: 34px; border-radius: 9px; }
.btn.btn-icon i { font-size: 16px !important; }

.trash-icon, .flaticon2-trash { color: var(--am-danger) !important; }

/* Badges / labels */
.badge {
    font-weight: 600;
    font-size: 11.5px;
    padding: .38em .7em;
    border-radius: 999px;
    letter-spacing: 0;
}
.badge-success { background: var(--am-success-soft); color: var(--am-success); }
.badge-danger { background: var(--am-danger-soft); color: var(--am-danger); }
.badge-warning { background: var(--am-warning-soft); color: var(--am-warning) !important; }
.badge-primary { background: var(--am-ink-soft); color: var(--am-ink); }
.badge-info { background: var(--am-info-soft); color: var(--am-info); }
.label.label-light-primary { background: var(--am-ink-soft); color: var(--am-ink); }

/* Tables */
.table {
    color: var(--am-text);
    margin-bottom: 0;
}

.table thead th, .table thead td {
    background: var(--am-surface-2);
    color: var(--am-muted);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    border-top: 0 !important;
    border-bottom: 1px solid var(--am-border) !important;
    padding: 12px 14px;
    white-space: nowrap;
    vertical-align: middle;
}

html[lang="ar"] .table thead th { letter-spacing: 0; font-size: 12px; }

.table td, .table th { border-top: 1px solid var(--am-border); padding: 12px 14px; vertical-align: middle; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: #FBFCFE; }
.table.table-bordered, .table.table-bordered td, .table.table-bordered th { border-color: var(--am-border); }
.table.table-bordered { border-radius: var(--am-radius-sm); overflow: hidden; }
td { font-family: var(--am-font) !important; }

.am-table-wrap {
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius-sm);
    overflow: auto;
}

.am-table-wrap .table thead th:first-child { border-start-start-radius: var(--am-radius-sm); }

/* DataTables */
.dataTables_wrapper .dataTables_filter input, .dataTables_wrapper .dataTables_length select {
    border: 1px solid var(--am-border) !important;
    border-radius: 10px !important;
    height: 38px;
    background: var(--am-bg);
    padding: 0 12px;
}

.dataTables_wrapper .dataTables_filter input:focus { border-color: var(--am-gold-2) !important; box-shadow: var(--am-ring); background: #fff; }
.dataTables_wrapper .dataTables_filter label, .dataTables_wrapper .dataTables_info { color: var(--am-muted); font-size: 12.5px; }

.dt-buttons.btn-group.flex-wrap {
    position: static !important;
    top: auto !important;
    gap: 6px;
    margin-bottom: 12px;
    float: none;
}

.dataTables_wrapper .dt-buttons .btn.btn-secondary {
    background: #fff !important;
    border: 1px solid var(--am-border) !important;
    border-radius: 9px !important;
    color: var(--am-ink) !important;
    padding: 0 !important;
    margin: 0 !important;
}

.dataTables_wrapper .dt-buttons .btn.btn-secondary:hover { border-color: var(--am-border-strong) !important; background: var(--am-surface-2) !important; }

.dataTables_wrapper .dt-buttons .btn.btn-secondary a.btn,
.dataTables_wrapper .dt-buttons .btn.btn-secondary .btn-brand {
    background: transparent !important;
    border: 0 !important;
    color: var(--am-ink) !important;
    padding: 7px 11px !important;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: none !important;
}

.dataTables_wrapper .dt-buttons .btn.btn-secondary i { color: var(--am-ink-3) !important; }
.dataTables_wrapper .btn.btn-secondary.dropdown-toggle:after { color: var(--am-ink) !important; }

.dataTables_wrapper .dataTable { border-radius: var(--am-radius-sm); overflow: hidden; border: 1px solid var(--am-border) !important; margin: 10px 0 !important; }
.dataTables_wrapper .dataTable.table-bordered { border-collapse: separate !important; }

/* Pagination */
.pagination { gap: 4px; flex-wrap: wrap; }
.page-link, .dataTables_wrapper .dataTables_paginate .pagination .page-item .page-link {
    border: 1px solid var(--am-border) !important;
    border-radius: 9px !important;
    color: var(--am-ink) !important;
    min-width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12.5px;
    margin: 0 !important;
    background: #fff;
}

.page-item.active .page-link, .dataTables_wrapper .dataTables_paginate .pagination .page-item.active .page-link {
    background: var(--am-ink) !important;
    border-color: var(--am-ink) !important;
    color: #fff !important;
}

.page-item.disabled .page-link { color: var(--am-muted) !important; background: var(--am-surface-2); }
.page-link:hover { background: var(--am-bg) !important; color: var(--am-ink) !important; }

/* Forms */
.form-control, .custom-select, .select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    border: 1px solid var(--am-border) !important;
    border-radius: var(--am-radius-sm) !important;
    color: var(--am-ink);
    background-color: #fff;
    min-height: 40px;
    font-size: 13px;
    transition: border-color .15s, box-shadow .15s;
}

.form-control.form-control-solid { background: var(--am-bg); border-color: var(--am-bg) !important; }
.form-control:focus, .custom-select:focus,
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--am-gold-2) !important;
    box-shadow: var(--am-ring) !important;
    background: #fff;
}

.form-control.is-invalid { border-color: var(--am-danger) !important; }
.form-group label, .col-form-label { font-weight: 600; color: var(--am-text-2); font-size: 12.5px; }
.select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 38px; color: var(--am-ink); }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 38px; }
.select2-dropdown { border-color: var(--am-border); border-radius: var(--am-radius-sm); box-shadow: var(--am-shadow-lg); overflow: hidden; }
.select2-container--default .select2-results__option--highlighted[aria-selected] { background: var(--am-ink); }

.checkbox > input:checked ~ span, .radio > input:checked ~ span { background-color: var(--am-ink) !important; }
.switch input:checked ~ span:after { background-color: var(--am-gold-2) !important; }

/* Nav pills / tabs */
.nav-pills .nav-link {
    border-radius: 9px;
    color: var(--am-text-2);
    font-weight: 600;
    font-size: 12.5px;
    padding: .5rem .9rem;
}

.nav-pills .nav-link.active, .nav-pills .show > .nav-link,
.nav.nav-pills.nav-pills-light-primary .nav-link.active {
    background: var(--am-ink) !important;
    color: #fff !important;
}

.nav-tabs .nav-link.active { color: var(--am-ink); border-bottom-color: var(--am-gold-2); }

/* Modals, dropdowns, offcanvas */
.modal-content { border: 0; border-radius: 16px; box-shadow: var(--am-shadow-lg); }
.modal-header { border-bottom: 1px solid var(--am-border); padding: 18px 22px; }
.modal-footer { border-top: 1px solid var(--am-border); padding: 14px 22px; }
.modal-backdrop.show { opacity: .45; background: #0D1528; }

.dropdown-menu { border: 1px solid var(--am-border); border-radius: 12px; box-shadow: var(--am-shadow-lg); }
.dropdown-item { font-size: 13px; padding: .55rem 1rem; }
.dropdown-item:active { background: var(--am-ink); }

.offcanvas { background: #fff; box-shadow: var(--am-shadow-lg); }

/* Alerts / toastr / sweetalert */
#toast-container > .toast { border-radius: 12px; box-shadow: var(--am-shadow-lg) !important; opacity: 1; }
.toast-success { background-color: var(--am-success) !important; }
.toast-error { background-color: var(--am-danger) !important; }
.swal2-popup { border-radius: 18px !important; }
.swal2-styled.swal2-confirm { background: var(--am-ink) !important; border-radius: 10px !important; }

/* Legacy custom.css bits that fight the new theme */
.subheader { display: none; }

/* ==========================================================================
   AwayMood components
   ========================================================================== */

.am-card {
    background: var(--am-surface);
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius);
    box-shadow: var(--am-shadow);
    margin-bottom: 22px;
    min-width: 0;
}

.am-card--flush { overflow: hidden; }
.am-card--stretch { height: calc(100% - 22px); display: flex; flex-direction: column; }
.am-card--stretch > .am-card__body { flex: 1 1 auto; }

.am-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px 0;
    flex-wrap: wrap;
}

.am-card__head--line { padding-bottom: 14px; border-bottom: 1px solid var(--am-border); }

.am-card__title { font-size: 15px; font-weight: 700; color: var(--am-ink); margin: 0; display: flex; align-items: center; gap: 8px; }
.am-card__title i { font-size: 18px; color: var(--am-gold); }
.am-card__sub { font-size: 12px; color: var(--am-muted); margin-top: 2px; }
.am-card__body { padding: 16px 20px 20px; }
.am-card__body--flush { padding: 0; }
.am-card__link { font-size: 12.5px; font-weight: 600; color: var(--am-ink-3); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.am-card__link i { font-size: 13px; }
[dir="rtl"] .am-card__link i.la-arrow-right, [dir="rtl"] .am-card__link i.la-angle-right { transform: scaleX(-1); }

/* Status badges */
.am-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
    line-height: 1;
    background: var(--am-neutral-soft);
    color: var(--am-neutral);
}

.am-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex: 0 0 6px;
}

.am-badge--plain::before { display: none; }
.am-badge--sm { height: 20px; padding: 0 8px; font-size: 10.5px; }
.am-badge--success { background: var(--am-success-soft); color: var(--am-success); }
.am-badge--danger { background: var(--am-danger-soft); color: var(--am-danger); }
.am-badge--warning { background: var(--am-warning-soft); color: var(--am-warning); }
.am-badge--info { background: var(--am-info-soft); color: var(--am-info); }
.am-badge--ink { background: var(--am-ink-soft); color: var(--am-ink); }
.am-badge--gold { background: var(--am-gold-soft); color: var(--am-gold); }
.am-badge--muted { background: var(--am-neutral-soft); color: var(--am-neutral); }
.am-badge--warning.is-pulsing::before { animation: am-pulse 1.4s ease-out infinite; }

/* Avatars */
.am-avatar {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12.5px;
    color: var(--am-ink);
    background: var(--am-ink-soft);
    text-transform: uppercase;
    letter-spacing: .02em;
}

.am-avatar--sm { width: 30px; height: 30px; flex-basis: 30px; border-radius: 9px; font-size: 11px; }
.am-avatar--lg { width: 52px; height: 52px; flex-basis: 52px; border-radius: 15px; font-size: 17px; }
.am-avatar--gold { background: var(--am-gold-soft); color: var(--am-gold); }
.am-avatar--ink { background: var(--am-ink); color: var(--am-gold-3); }
.am-avatar--success { background: var(--am-success-soft); color: var(--am-success); }
.am-avatar--info { background: var(--am-info-soft); color: var(--am-info); }
.am-avatar--danger { background: var(--am-danger-soft); color: var(--am-danger); }

/* Live dot */
.am-live-dot {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--am-success);
    display: inline-block;
}

.am-live-dot::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--am-success);
    animation: am-pulse 1.8s ease-out infinite;
}

.am-live-dot.is-stale, .am-live-dot.is-stale::after { background: var(--am-muted); animation: none; }
.am-live-dot.is-error, .am-live-dot.is-error::after { background: var(--am-danger); animation: none; }

@keyframes am-pulse {
    0% { transform: scale(1); opacity: .7; }
    100% { transform: scale(3.2); opacity: 0; }
}

/* ---------- Hero ---------- */
.am-hero {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    padding: 26px 28px;
    margin-bottom: 22px;
    color: #fff;
    background:
        radial-gradient(70% 140% at 100% 0%, rgba(208, 169, 44, .28), transparent 55%),
        radial-gradient(60% 120% at 0% 100%, rgba(47, 111, 237, .16), transparent 60%),
        linear-gradient(135deg, #14213D 0%, #1C2C4F 55%, #23365F 100%);
    box-shadow: 0 18px 40px -18px rgba(20, 33, 61, .55);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
}

[dir="rtl"] .am-hero {
    background:
        radial-gradient(70% 140% at 0% 0%, rgba(208, 169, 44, .28), transparent 55%),
        radial-gradient(60% 120% at 100% 100%, rgba(47, 111, 237, .16), transparent 60%),
        linear-gradient(225deg, #14213D 0%, #1C2C4F 55%, #23365F 100%);
}

.am-hero::after {
    content: "";
    position: absolute;
    width: 300px;
    height: 300px;
    inset-inline-end: -90px;
    top: -150px;
    border-radius: 50%;
    border: 1px solid rgba(227, 191, 79, .18);
    box-shadow: 0 0 0 40px rgba(227, 191, 79, .035), 0 0 0 80px rgba(227, 191, 79, .025);
    pointer-events: none;
}

.am-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, .7);
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.am-hero__eyebrow .am-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(18, 163, 122, .16);
    color: #7CE0BF;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

html[lang="ar"] .am-hero__eyebrow .am-pill { letter-spacing: 0; }

.am-hero__title {
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 6px;
    letter-spacing: -.02em;
}

html[lang="ar"] .am-hero__title { letter-spacing: 0; }
.am-hero__title span { color: var(--am-gold-3); }

.am-hero__lead { color: rgba(255, 255, 255, .72); font-size: 13.5px; margin: 0; max-width: 620px; }
.am-hero__lead b { color: #fff; font-weight: 700; }

.am-hero__stats { display: flex; gap: 10px; flex-wrap: wrap; position: relative; z-index: 1; }

.am-hero-stat {
    min-width: 150px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
    color: #fff !important;
    text-decoration: none !important;
    transition: background .15s, border-color .15s, transform .15s;
}

.am-hero-stat:hover { background: rgba(255, 255, 255, .1); border-color: rgba(227, 191, 79, .45); transform: translateY(-1px); }
.am-hero-stat__label { font-size: 11.5px; color: rgba(255, 255, 255, .62); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.am-hero-stat__value { font-size: 28px; font-weight: 800; line-height: 1.15; margin-top: 4px; font-variant-numeric: tabular-nums; }
.am-hero-stat__hint { font-size: 11.5px; color: rgba(255, 255, 255, .6); margin-top: 2px; }
.am-hero-stat__hint b { color: #FFB4A8; font-weight: 700; }
.am-hero-stat--alert { background: rgba(224, 130, 15, .16); border-color: rgba(224, 130, 15, .45); }
.am-hero-stat--alert .am-hero-stat__value { color: #FFD08A; }

@media (max-width: 1199.98px) {
    .am-hero { grid-template-columns: 1fr; }
}

@media (max-width: 575.98px) {
    .am-hero { padding: 20px 18px; border-radius: 16px; }
    .am-hero__title { font-size: 21px; }
    .am-hero-stat { flex: 1 1 calc(50% - 10px); min-width: 0; }
    .am-hero-stat__value { font-size: 23px; }
}

/* ---------- Toolbar: range control ---------- */
.am-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.am-toolbar__title { font-size: 13px; color: var(--am-muted); font-weight: 600; }
.am-toolbar__title b { color: var(--am-ink); }

.am-seg {
    display: inline-flex;
    align-items: center;
    padding: 4px;
    gap: 2px;
    background: #fff;
    border: 1px solid var(--am-border);
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(20, 33, 61, .04);
    flex-wrap: wrap;
}

.am-seg__btn {
    border: 0;
    background: transparent;
    color: var(--am-text-2);
    font-weight: 600;
    font-size: 12.5px;
    padding: 7px 12px;
    border-radius: 9px;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background .15s, color .15s;
}

.am-seg__btn:hover { background: var(--am-bg); color: var(--am-ink); }
.am-seg__btn.is-active { background: var(--am-ink); color: #fff !important; box-shadow: 0 2px 8px rgba(20, 33, 61, .2); }

.am-range-custom {
    display: none;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid var(--am-border);
    border-radius: 12px;
}

.am-range-custom.is-open { display: flex; }
.am-range-custom label { margin: 0; font-size: 12px; color: var(--am-muted); font-weight: 600; }
.am-range-custom input[type="date"] { height: 36px; min-height: 36px; width: 160px; }

/* ---------- KPI tiles ---------- */
.am-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

@media (max-width: 1399.98px) { .am-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1199.98px) { .am-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .am-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

.am-kpi {
    position: relative;
    background: var(--am-surface);
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius);
    box-shadow: var(--am-shadow);
    padding: 16px 18px 14px;
    overflow: hidden;
    min-width: 0;
    display: flex;
    flex-direction: column;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s;
    color: inherit !important;
    text-decoration: none !important;
}

a.am-kpi:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(20, 33, 61, .09); border-color: var(--am-border-strong); }

.am-kpi__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.am-kpi__label { font-size: 12.5px; font-weight: 600; color: var(--am-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.am-kpi__icon {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    background: var(--am-ink-soft);
    color: var(--am-ink);
}

.am-kpi__icon--gold { background: var(--am-gold-soft); color: var(--am-gold); }
.am-kpi__icon--success { background: var(--am-success-soft); color: var(--am-success); }
.am-kpi__icon--danger { background: var(--am-danger-soft); color: var(--am-danger); }
.am-kpi__icon--info { background: var(--am-info-soft); color: var(--am-info); }
.am-kpi__icon--warning { background: var(--am-warning-soft); color: var(--am-warning); }

.am-kpi__value {
    font-size: 26px;
    font-weight: 800;
    color: var(--am-ink);
    letter-spacing: -.02em;
    line-height: 1.15;
    margin-top: 10px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    direction: ltr;
    text-align: start;
}

[dir="rtl"] .am-kpi__value { text-align: end; }

.am-kpi__value small { font-size: 15px; font-weight: 700; color: var(--am-muted); margin-inline-start: 2px; }

.am-kpi__foot {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
    margin-top: 8px;
    min-height: 30px;
}

.am-kpi__meta { font-size: 11.5px; color: var(--am-muted); line-height: 1.35; min-width: 0; }

.am-delta {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-weight: 700;
    font-size: 11.5px;
    padding: 1px 6px;
    border-radius: 6px;
    margin-inline-end: 4px;
    direction: ltr;
    font-variant-numeric: tabular-nums;
}

.am-delta i { font-size: 11px; }
.am-delta--good { background: var(--am-success-soft); color: var(--am-success); }
.am-delta--bad { background: var(--am-danger-soft); color: var(--am-danger); }
.am-delta--flat { background: var(--am-neutral-soft); color: var(--am-neutral); }

.am-spark { width: 96px; height: 30px; flex: 0 0 96px; }
.am-spark svg { display: block; width: 100%; height: 100%; overflow: visible; }

@media (max-width: 575.98px) {
    .am-kpi { padding: 13px 13px 12px; }
    .am-kpi__value { font-size: 21px; }
    .am-spark { width: 64px; flex-basis: 64px; }
    .am-kpi__icon { display: none; }
}

/* ---------- Grid helpers ---------- */
.am-grid {
    display: grid;
    gap: 22px;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    margin-bottom: 0;
}

.am-grid > .am-card { margin-bottom: 0; }
.am-grid + .am-grid, .am-grid + .am-card { margin-top: 22px; }
.am-col-12 { grid-column: span 12; }
.am-col-8 { grid-column: span 8; }
.am-col-7 { grid-column: span 7; }
.am-col-6 { grid-column: span 6; }
.am-col-5 { grid-column: span 5; }
.am-col-4 { grid-column: span 4; }

@media (max-width: 1199.98px) {
    .am-col-8, .am-col-7, .am-col-5, .am-col-4, .am-col-6 { grid-column: span 12; }
}

/* ---------- Chart legend ---------- */
.am-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--am-text-2); font-weight: 600; }
.am-legend span { display: inline-flex; align-items: center; gap: 6px; }
.am-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.am-legend i.is-line { height: 3px; border-radius: 2px; width: 14px; }

.am-chart { min-height: 300px; margin: 0 -6px; }
.apexcharts-tooltip.apexcharts-theme-light { border: 1px solid var(--am-border) !important; border-radius: 10px !important; box-shadow: var(--am-shadow-lg) !important; }
.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title { background: var(--am-surface-2) !important; border-bottom: 1px solid var(--am-border) !important; font-weight: 700; }

.am-totals { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 4px; }
.am-totals__item { min-width: 0; }
.am-totals__label { font-size: 11.5px; color: var(--am-muted); font-weight: 600; }
.am-totals__value { font-size: 18px; font-weight: 800; color: var(--am-ink); font-variant-numeric: tabular-nums; }

/* ---------- Funnel ---------- */
.am-funnel { display: flex; flex-direction: column; gap: 14px; }
.am-funnel__top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.am-funnel__label { font-size: 12.5px; font-weight: 600; color: var(--am-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.am-funnel__val { white-space: nowrap; font-variant-numeric: tabular-nums; }
.am-funnel__val b { font-size: 15px; font-weight: 800; color: var(--am-ink); }
.am-funnel__val small { font-size: 11px; color: var(--am-muted); font-weight: 600; margin-inline-start: 6px; }
.am-funnel__track { height: 10px; border-radius: 6px; background: var(--am-bg); overflow: hidden; }
.am-funnel__bar { height: 100%; border-radius: 6px; background: var(--am-ink); transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.am-funnel__bar.is-ink3 { background: var(--am-ink-3); }
.am-funnel__bar.is-gold { background: linear-gradient(90deg, var(--am-gold), var(--am-gold-2)); }
[dir="rtl"] .am-funnel__bar.is-gold { background: linear-gradient(270deg, var(--am-gold), var(--am-gold-2)); }
.am-funnel__bar.is-success { background: var(--am-success); }

.am-losses { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.am-loss { border-radius: 11px; padding: 10px 12px; background: var(--am-surface-2); border: 1px solid var(--am-border); }
.am-loss__label { font-size: 11px; color: var(--am-muted); font-weight: 600; display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.am-loss__label i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.am-loss__value { font-size: 18px; font-weight: 800; color: var(--am-ink); font-variant-numeric: tabular-nums; }

/* ---------- Heatmap ---------- */
.am-heat { overflow-x: auto; padding-bottom: 4px; direction: ltr; }
.am-heat__grid {
    display: grid;
    grid-template-columns: 38px repeat(24, minmax(16px, 1fr));
    gap: 3px;
    min-width: 560px;
    direction: ltr;
}

.am-heat__day { font-size: 11px; font-weight: 600; color: var(--am-muted); display: flex; align-items: center; }
.am-heat__hour { font-size: 10px; color: var(--am-muted); text-align: center; padding-top: 4px; font-variant-numeric: tabular-nums; }
.am-heat__cell {
    aspect-ratio: 1 / 1;
    min-height: 16px;
    border-radius: 4px;
    background: var(--am-bg);
    position: relative;
    cursor: default;
    transition: transform .1s;
}

.am-heat__cell:hover { transform: scale(1.18); z-index: 2; box-shadow: 0 0 0 2px #fff, 0 4px 10px rgba(20, 33, 61, .2); }
.am-heat__scale { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--am-muted); }
.am-heat__scale span { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }

.am-peak { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.am-peak__item { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 10px; background: var(--am-gold-soft); color: var(--am-ink); font-size: 12px; font-weight: 600; }
.am-peak__item i { color: var(--am-gold); font-size: 15px; }
.am-peak__item b { font-weight: 800; }

/* ---------- Live feed ---------- */
.am-feed { list-style: none; margin: 0; padding: 0; }

.am-feed__item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-top: 1px solid var(--am-border);
    transition: background .2s;
}

.am-feed__item:first-child { border-top: 0; }
.am-feed__item:hover { background: var(--am-surface-2); }
.am-feed__item.is-new { animation: am-flash 2.4s ease-out 1; }

@keyframes am-flash {
    0% { background: rgba(208, 169, 44, .28); }
    100% { background: transparent; }
}

.am-feed__main { min-width: 0; }
.am-feed__title { font-weight: 700; font-size: 13px; color: var(--am-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.am-feed__title a { color: var(--am-ink) !important; }
.am-feed__title a:hover { color: var(--am-gold) !important; }
.am-feed__title .am-feed__id { color: var(--am-muted); font-weight: 600; font-size: 12px; margin-inline-end: 6px; direction: ltr; unicode-bidi: isolate; }
.am-feed__sub { font-size: 12px; color: var(--am-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.am-feed__sub i { font-size: 13px; vertical-align: -1px; }
.am-feed__side { text-align: end; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.am-feed__price { font-weight: 800; font-size: 13px; color: var(--am-ink); font-variant-numeric: tabular-nums; direction: ltr; }
.am-feed__time { font-size: 11px; color: var(--am-muted); white-space: nowrap; }

@media (max-width: 575.98px) {
    .am-feed__item { grid-template-columns: minmax(0, 1fr) auto; padding: 12px 14px; }
    .am-feed__item .am-avatar { display: none; }
}

/* ---------- Attention ---------- */
.am-attn { display: flex; flex-direction: column; gap: 10px; }

.am-attn__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--am-border);
    background: var(--am-surface);
    color: inherit !important;
    text-decoration: none !important;
    transition: border-color .15s, background .15s, transform .15s;
}

a.am-attn__item:hover { border-color: var(--am-border-strong); background: var(--am-surface-2); transform: translateX(2px); }
[dir="rtl"] a.am-attn__item:hover { transform: translateX(-2px); }

.am-attn__icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
}

.am-attn__main { flex: 1 1 auto; min-width: 0; }
.am-attn__title { font-weight: 700; font-size: 13px; color: var(--am-ink); }
.am-attn__sub { font-size: 11.5px; color: var(--am-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.am-attn__count { font-size: 20px; font-weight: 800; color: var(--am-ink); font-variant-numeric: tabular-nums; }
.am-attn__item.is-hot { border-color: rgba(224, 130, 15, .4); background: linear-gradient(90deg, var(--am-warning-soft), #fff 70%); }
[dir="rtl"] .am-attn__item.is-hot { background: linear-gradient(270deg, var(--am-warning-soft), #fff 70%); }
.am-attn__item.is-clear .am-attn__count { color: var(--am-success); }

.am-mini-list { list-style: none; margin: 8px 0 0; padding: 0; }
.am-mini-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 2px; font-size: 12.5px; border-top: 1px dashed var(--am-border); }
.am-mini-list li:first-child { border-top: 0; }
.am-mini-list a { color: var(--am-ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Ranking (top providers) ---------- */
.am-rank td, .am-rank th { padding: 11px 14px !important; }
.am-rank__who { display: flex; align-items: center; gap: 11px; min-width: 180px; }
.am-rank__pos {
    width: 22px;
    font-weight: 800;
    color: var(--am-muted);
    font-size: 12px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.am-rank__pos.is-1 { color: var(--am-gold); }
.am-rank__name { font-weight: 700; color: var(--am-ink); font-size: 13px; display: block; white-space: nowrap; }
.am-rank__name:hover { color: var(--am-gold); }
.am-rank__sub { font-size: 11.5px; color: var(--am-muted); }
.am-rank__bar { height: 6px; border-radius: 4px; background: var(--am-bg); overflow: hidden; min-width: 70px; margin-top: 5px; }
.am-rank__bar span { display: block; height: 100%; border-radius: 4px; background: var(--am-success); }
.am-rank__bar span.is-mid { background: var(--am-gold-2); }
.am-rank__bar span.is-low { background: var(--am-danger); }
.am-stars { color: var(--am-gold-2); font-weight: 700; white-space: nowrap; }
.am-stars i { font-size: 13px; }

/* Bars list (top services) */
.am-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 13px; }
.am-bars__top { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; margin-bottom: 5px; }
.am-bars__name { font-weight: 600; color: var(--am-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.am-bars__name small { color: var(--am-muted); font-weight: 500; margin-inline-start: 4px; }
.am-bars__val { font-weight: 700; color: var(--am-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.am-bars__track { height: 8px; border-radius: 6px; background: var(--am-bg); overflow: hidden; }
.am-bars__fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--am-gold), var(--am-gold-2)); }
[dir="rtl"] .am-bars__fill { background: linear-gradient(270deg, var(--am-gold), var(--am-gold-2)); }

/* ---------- Map ---------- */
.am-map { height: 380px; border-radius: 0 0 var(--am-radius) var(--am-radius); overflow: hidden; z-index: 0; background: #EEF1F6; }
.am-map .leaflet-control-attribution { font-size: 10px; }
.am-map-legend { display: flex; gap: 14px; font-size: 12px; color: var(--am-text-2); font-weight: 600; flex-wrap: wrap; }
.am-map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.am-map-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(20, 33, 61, .2); }

/* ---------- Filter bar (bookings) ---------- */
.am-chips { display: flex; gap: 6px; flex-wrap: wrap; }

.am-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 34px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid var(--am-border);
    background: #fff;
    color: var(--am-text-2) !important;
    font-weight: 600;
    font-size: 12.5px;
    white-space: nowrap;
    text-decoration: none !important;
    transition: border-color .15s, background .15s, color .15s;
}

.am-chip:hover { border-color: var(--am-border-strong); color: var(--am-ink) !important; }
.am-chip__count { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--am-bg); color: var(--am-muted); font-variant-numeric: tabular-nums; }
.am-chip.is-active { background: var(--am-ink); border-color: var(--am-ink); color: #fff !important; }
.am-chip.is-active .am-chip__count { background: rgba(255, 255, 255, .16); color: #fff; }

.am-filters {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
}

.am-filters label { font-size: 11.5px; font-weight: 700; color: var(--am-muted); margin-bottom: 4px; display: block; }
.am-filters .form-control { height: 40px; }
.am-filters__actions { display: flex; gap: 6px; }

@media (max-width: 1199.98px) { .am-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } .am-filters__actions { grid-column: span 2; } }
@media (max-width: 575.98px) { .am-filters { grid-template-columns: 1fr; } .am-filters__actions { grid-column: auto; } }

.am-who { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.am-who__name { font-weight: 600; color: var(--am-ink); display: block; white-space: nowrap; }
.am-who__sub { font-size: 11.5px; color: var(--am-muted); display: block; white-space: nowrap; }
.am-who__name.is-deleted { color: var(--am-muted); font-style: italic; }

.am-id { font-weight: 700; color: var(--am-ink); white-space: nowrap; direction: ltr; unicode-bidi: isolate; }
.am-id:hover { color: var(--am-gold); }
.am-tags { display: flex; flex-wrap: wrap; gap: 4px; max-width: 260px; }
.am-tag { font-size: 11.5px; font-weight: 600; padding: 3px 8px; border-radius: 7px; background: var(--am-bg); color: var(--am-text-2); white-space: nowrap; }
.am-money { font-weight: 700; color: var(--am-ink); white-space: nowrap; font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.am-when { white-space: nowrap; }
.am-when small { display: block; color: var(--am-muted); font-size: 11.5px; }

.am-table-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 20px; border-top: 1px solid var(--am-border); }
.am-table-foot .pagination { margin: 0; }
.am-table-foot__info { font-size: 12px; color: var(--am-muted); }

.am-row-link { cursor: pointer; }

/* ---------- Booking detail ---------- */
.am-detail-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.am-detail-head__id { font-size: 24px; font-weight: 800; color: var(--am-ink); margin: 0; direction: ltr; unicode-bidi: isolate; }

.am-dl { display: grid; grid-template-columns: minmax(110px, auto) minmax(0, 1fr); gap: 10px 16px; margin: 0; font-size: 13px; }
.am-dl dt { color: var(--am-muted); font-weight: 600; font-size: 12.5px; }
.am-dl dd { margin: 0; color: var(--am-ink); font-weight: 600; min-width: 0; overflow-wrap: anywhere; }

.am-timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.am-timeline::before {
    content: "";
    position: absolute;
    inset-inline-start: 15px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--am-border);
}

.am-timeline__item { position: relative; display: flex; gap: 14px; padding: 0 0 20px; }
.am-timeline__item:last-child { padding-bottom: 0; }
.am-timeline__dot {
    position: relative;
    z-index: 1;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 2px solid var(--am-border);
    color: var(--am-muted);
    font-size: 15px;
}

.am-timeline__item.is-done .am-timeline__dot { background: var(--am-success); border-color: var(--am-success); color: #fff; }
.am-timeline__item.is-current .am-timeline__dot { background: var(--am-gold-2); border-color: var(--am-gold-2); color: var(--am-ink); box-shadow: 0 0 0 5px rgba(208, 169, 44, .2); }
.am-timeline__item.is-bad .am-timeline__dot { background: var(--am-danger); border-color: var(--am-danger); color: #fff; }
.am-timeline__item.is-todo { opacity: .55; }
.am-timeline__title { font-weight: 700; color: var(--am-ink); font-size: 13px; padding-top: 5px; }
.am-timeline__meta { font-size: 12px; color: var(--am-muted); }

.am-sum { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.am-sum__row { display: flex; justify-content: space-between; gap: 12px; color: var(--am-text-2); }
.am-sum__row b { color: var(--am-ink); font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.am-sum__row.is-total { border-top: 1px dashed var(--am-border-strong); padding-top: 10px; margin-top: 2px; font-size: 15px; font-weight: 800; color: var(--am-ink); }
.am-sum__row.is-total b { font-size: 18px; }

.am-person { display: flex; align-items: center; gap: 12px; }
.am-person__name { font-weight: 700; color: var(--am-ink); font-size: 14px; }
.am-person__sub { font-size: 12px; color: var(--am-muted); overflow-wrap: anywhere; }

/* ==========================================================================
   Login
   ========================================================================== */
.am-login {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    background: #fff;
}

.am-login__brand {
    position: relative;
    overflow: hidden;
    color: #fff;
    padding: 48px 56px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background:
        radial-gradient(80% 60% at 85% 10%, rgba(208, 169, 44, .30), transparent 60%),
        radial-gradient(70% 60% at 0% 100%, rgba(47, 111, 237, .18), transparent 60%),
        linear-gradient(150deg, #14213D 0%, #1A2A4C 55%, #22355E 100%);
}

.am-login__brand::before, .am-login__brand::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.am-login__brand::before {
    width: 520px;
    height: 520px;
    inset-inline-end: -180px;
    top: -160px;
    border: 1px solid rgba(227, 191, 79, .18);
    box-shadow: 0 0 0 60px rgba(227, 191, 79, .03), 0 0 0 120px rgba(227, 191, 79, .02);
}

.am-login__brand::after {
    width: 220px;
    height: 220px;
    inset-inline-start: -70px;
    bottom: 120px;
    background: radial-gradient(circle, rgba(227, 191, 79, .16), transparent 70%);
}

.am-login__logo { display: inline-flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.am-login__logo img { width: 46px; height: 46px; }
.am-login__logo .am-brand__word { font-size: 24px; }

.am-login__pitch { position: relative; z-index: 1; max-width: 480px; }
.am-login__kicker { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--am-gold-3); margin-bottom: 14px; }
html[lang="ar"] .am-login__kicker { letter-spacing: 0; }
.am-login__headline { font-size: 38px; line-height: 1.15; font-weight: 800; color: #fff; letter-spacing: -.025em; margin: 0 0 16px; }
html[lang="ar"] .am-login__headline { letter-spacing: 0; line-height: 1.35; }
.am-login__headline span { color: var(--am-gold-3); }
.am-login__copy { color: rgba(255, 255, 255, .7); font-size: 14.5px; line-height: 1.65; margin: 0; }

.am-login__cards { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 10px; max-width: 380px; margin-top: 34px; }

.am-login-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .1);
    backdrop-filter: blur(6px);
}

.am-login-card:nth-child(2) { margin-inline-start: 34px; }
.am-login-card:nth-child(3) { margin-inline-start: 12px; }
.am-login-card__icon { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; background: rgba(227, 191, 79, .16); color: var(--am-gold-3); }
.am-login-card__title { font-weight: 700; font-size: 13px; color: #fff; }
.am-login-card__sub { font-size: 11.5px; color: rgba(255, 255, 255, .6); }

.am-login__foot { position: relative; z-index: 1; font-size: 12px; color: rgba(255, 255, 255, .45); }

.am-login__formside { display: flex; align-items: center; justify-content: center; padding: 48px 28px; background: #fff; position: relative; }
.am-login__form { width: 100%; max-width: 400px; }
.am-login__mobile-logo { display: none; margin-bottom: 28px; }
.am-login__title { font-size: 28px; font-weight: 800; margin: 0 0 6px; letter-spacing: -.02em; }
html[lang="ar"] .am-login__title { letter-spacing: 0; }
.am-login__sub { color: var(--am-muted); margin: 0 0 30px; font-size: 14px; }
.am-login__form .form-group { margin-bottom: 18px; }
.am-login__form label { font-size: 12.5px; font-weight: 700; color: var(--am-text-2); margin-bottom: 7px; }
.am-login__form .form-control { height: 48px; padding: 0 14px; background: var(--am-bg); border-color: var(--am-bg) !important; font-size: 14px; }
.am-login__form .form-control:focus { background: #fff; }
.am-login__submit { width: 100%; height: 48px; font-size: 14.5px; border-radius: 12px; margin-top: 8px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.am-login__lang { position: absolute; top: 22px; inset-inline-end: 24px; }
.am-input-icon { position: relative; }
.am-input-icon i { position: absolute; top: 50%; transform: translateY(-50%); inset-inline-start: 14px; color: var(--am-muted); font-size: 18px; pointer-events: none; }
.am-input-icon .form-control { padding-inline-start: 42px; }
.am-pass-toggle { position: absolute; top: 50%; transform: translateY(-50%); inset-inline-end: 8px; border: 0; background: transparent; color: var(--am-muted); width: 34px; height: 34px; border-radius: 8px; cursor: pointer; padding: 0; }
.am-pass-toggle:hover { color: var(--am-ink); background: #fff; }
.am-pass-toggle i { position: static; transform: none; font-size: 18px; }

@media (max-width: 991.98px) {
    .am-login { grid-template-columns: 1fr; }
    .am-login__brand { display: none; }
    .am-login__mobile-logo { display: inline-flex; }
}

/* ==========================================================================
   Misc
   ========================================================================== */
.am-skeleton { background: linear-gradient(90deg, var(--am-bg), #EDF0F6, var(--am-bg)); background-size: 200% 100%; animation: am-shimmer 1.2s infinite; border-radius: 8px; }
@keyframes am-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.am-divider { height: 1px; background: var(--am-border); margin: 16px 0; border: 0; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

@media print {
    .am-sidebar, .am-topbar, .am-footer, .am-backdrop { display: none !important; }
    .am-main { margin: 0 !important; }
}

/* Directional icons follow the reading direction */
[dir="rtl"] .la-arrow-right, [dir="rtl"] .la-arrow-left, [dir="rtl"] .la-angle-right, [dir="rtl"] .la-angle-left { display: inline-block; transform: scaleX(-1); }

/* Metronic paints every <i> grey; AwayMood icons take the colour of their component. */
:where(.am-shell, .am-login, .am-dropdown, .offcanvas) i:where(.la) { color: inherit; }

.am-grid--top { align-items: start; }
#toast-container > .toast-info { background-color: var(--am-ink) !important; }
#toast-container > .toast-warning { background-color: var(--am-warning) !important; }

@media (max-width: 575.98px) {
    .am-toolbar > div { width: 100%; }
    .am-seg { display: flex; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
    .am-seg::-webkit-scrollbar { display: none; }
    .am-kpi__foot { flex-direction: column; align-items: stretch; gap: 6px; }
    .am-kpi .am-spark { width: 100%; flex-basis: auto; height: 24px; }
    .am-card__head { padding: 14px 16px 0; }
    .am-card__head--line { padding-bottom: 12px; }
    .am-card__body { padding: 14px 16px 16px; }
    .am-pagehead__title { font-size: 19px; }
}

/* custom.css forces "Codec Pro" (never loaded) on some inputs and numbers; use the theme font. */
html input[type="email"], html input[type="number"], html .number, html .number p, html .number p span,
html .table_from_editor, html .table_from_editor p, html .table_from_editor p span { font-family: var(--am-font) !important; }

.am-chips { min-width: 0; max-width: 100%; }
@media (max-width: 575.98px) {
    .am-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
    .am-chips::-webkit-scrollbar { display: none; }
}

/* Legacy list pages keep their row actions on one line. */
.am-content .table td:last-child { white-space: nowrap; }
.am-content .table td:last-child .btn.btn-icon { display: inline-flex; vertical-align: middle; }
/* Toasts appear under the top bar, not over the bell and avatar. */
#toast-container.toast-top-right, #toast-container.toast-top-left { top: calc(var(--am-topbar-h) + 10px); }
