/* =========================================================
   Stagie Unified — shared design system
   Ported from the container-system's look (admin_base.css /
   admin_header.css / admin_login.css) so every screen in the
   unified app reads as one product.
   ========================================================= */

:root,
[data-theme="light"] {
    --primary-color: #18896e;
    --primary-dark: #0f6b56;
    --primary-light: #1da882;
    --secondary-color: #ffc71a;
    --accent-color: #8b5cf6;
    --accent-light: #a78bfa;
    --success-color: #34C759;
    --warning-color: #FF9500;
    --danger-color: #FF3B30;
    --info-color: #5AC8FA;

    --gradient-brand: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--primary-light));

    --background-color: #F5F7FA;
    --surface-color: #FFFFFF;
    --surface-elevated: #FFFFFF;
    --input-bg: #FFFFFF;
    --text-primary: #1D1D1F;
    --text-secondary: #86868B;
    --text-tertiary: #AEAEB2;
    --border-color: #E5E5EA;
    --border-light: #F2F2F7;

    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-dropdown: 0 10px 40px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 4px 18px rgba(24, 137, 110, 0.28);

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;

    /* Soft semantic notices — used for inline info/warning/success/danger
       boxes so every page reads correctly in both themes instead of
       hardcoding one set of colors that only works on a light background. */
    --warning-soft-bg: rgba(255, 149, 0, .1);
    --warning-soft-text: #b45f00;
    --warning-soft-border: rgba(255, 149, 0, .25);
    --info-soft-bg: rgba(90, 200, 250, .12);
    --info-soft-text: #0284c7;
    --info-soft-border: rgba(90, 200, 250, .3);
    --success-soft-bg: rgba(52, 199, 89, .1);
    --success-soft-text: #1b7a37;
    --success-soft-border: rgba(52, 199, 89, .25);
    --danger-soft-bg: rgba(255, 59, 48, .1);
    --danger-soft-text: #b3261e;
    --danger-soft-border: rgba(255, 59, 48, .25);
}

[data-theme="dark"] {
    --background-color: #0b0f14;
    --surface-color: #15191f;
    --surface-elevated: #1d232b;
    --input-bg: #1d232b;
    --text-primary: #F5F6F7;
    --text-secondary: #B4BAC2;
    --text-tertiary: #7C838D;
    --border-color: #262d36;
    --border-light: #1d232b;

    --shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.45);
    --shadow-dropdown: 0 10px 40px rgba(0, 0, 0, 0.55);
    --shadow-glow: 0 4px 20px rgba(29, 168, 130, 0.35);

    --warning-soft-bg: rgba(255, 149, 0, .14);
    --warning-soft-text: #ffb865;
    --warning-soft-border: rgba(255, 149, 0, .3);
    --info-soft-bg: rgba(90, 200, 250, .14);
    --info-soft-text: #7dd3fc;
    --info-soft-border: rgba(90, 200, 250, .32);
    --success-soft-bg: rgba(52, 199, 89, .14);
    --success-soft-text: #6fe397;
    --success-soft-border: rgba(52, 199, 89, .32);
    --danger-soft-bg: rgba(255, 59, 48, .16);
    --danger-soft-text: #ff8f89;
    --danger-soft-border: rgba(255, 59, 48, .34);
}

/* Techy-but-tasteful scrollbar, themed like the rest of the app. */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }
* { scrollbar-color: var(--border-color) transparent; scrollbar-width: thin; }

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

html { transition: background-color .3s ease, color .3s ease; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a { color: inherit; }

/* ---------- App shell (sidebar layout) ---------- */

.app-shell { min-height: 100vh; display: flex; }

.sidebar {
    width: 264px; flex-shrink: 0;
    background: var(--surface-color); border-right: 1px solid var(--border-color);
    display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh;
    transition: var(--transition);
    z-index: 1000;
}

.sidebar .brand {
    display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px;
    padding: 20px; border-bottom: 1px solid var(--border-color); white-space: nowrap;
    text-decoration: none; color: var(--text-primary); flex-shrink: 0;
}
.sidebar .brand img { height: 34px; width: auto; transition: var(--transition-fast); }

.sidebar-close {
    display: none; margin-left: auto; background: none; border: none;
    color: var(--text-secondary); font-size: 18px; cursor: pointer;
}

/* ---------- Sidebar collapse toggle ----------
   A small pill straddling the sidebar's own right edge (half on the
   sidebar, half on the main content), matching the modern admin-panel
   pattern. Collapsing shrinks the sidebar to an icon rail; the state is
   mirrored on <html data-sidebar="collapsed"> by theme.js so it applies
   before first paint (no flash of the expanded sidebar).
   .sidebar itself is overflow:visible (the scrolling now happens inside
   .main-nav instead — see its rule above) specifically so this negative
   offset isn't clipped; it previously was, which made the pill look cut
   off / shifted. At the 78px collapsed width this position sits clear of
   the centered logo (logo spans roughly x:22-56, the pill x:65-91). */
.sidebar-collapse-toggle {
    position: absolute; top: 22px; right: -13px;
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--surface-elevated); border: 1px solid var(--border-color);
    color: var(--text-secondary); display: flex; align-items: center; justify-content: center;
    cursor: pointer; box-shadow: var(--shadow); transition: var(--transition-fast);
    z-index: 1002; font-size: 11px;
}
.sidebar-collapse-toggle:hover { color: var(--primary-color); border-color: var(--primary-color); }
.sidebar-collapse-toggle i { transition: var(--transition-fast); }

[data-sidebar="collapsed"] .sidebar { width: 78px; }
[data-sidebar="collapsed"] .sidebar-collapse-toggle i { transform: rotate(180deg); }
[data-sidebar="collapsed"] .sidebar .brand { justify-content: center; padding: 20px 10px; }
[data-sidebar="collapsed"] .sidebar .brand span,
[data-sidebar="collapsed"] .nav-link span,
[data-sidebar="collapsed"] .dropdown-toggle .fa-chevron-down { display: none; }
[data-sidebar="collapsed"] .nav-link { justify-content: center; padding: 12px 0; }
[data-sidebar="collapsed"] .nav-link i:first-child { width: auto; font-size: 16px; }
[data-sidebar="collapsed"] .main-nav { padding: 14px 8px; }

/* While collapsed, a group's items appear as a flyout on hover instead of
   an inline dropdown — the labels are only hidden at the top level. */
[data-sidebar="collapsed"] .nav-dropdown .dropdown-menu {
    border-left: none;
}
[data-sidebar="collapsed"] .nav-dropdown:hover .dropdown-menu {
    display: flex; position: absolute; left: 100%; top: 0; margin: 0 0 0 8px;
    min-width: 210px; padding: 8px; background: var(--surface-elevated);
    border: 1px solid var(--border-color); border-radius: var(--radius);
    box-shadow: var(--shadow-dropdown); animation: dropdownFade .15s ease-out;
}
[data-sidebar="collapsed"] .nav-dropdown { position: relative; }

@media (max-width: 900px) {
    .sidebar-collapse-toggle { display: none; }
}

/* The scroll region lives here rather than on .sidebar itself, so .sidebar
   can stay overflow:visible and let the collapse toggle (below) sit
   half-on/half-off its real edge without being clipped. min-height:0
   is the usual flexbox fix needed for a flex:1 child to actually shrink
   and scroll instead of stretching its flex-column parent taller. */
.main-nav {
    flex: 1; min-height: 0; padding: 14px 12px; display: flex; flex-direction: column; gap: 2px;
    overflow-y: auto; overflow-x: hidden;
}

/* Sidebar footer — system name + version (Back Office → App Settings).
   A flex-shrink:0 sibling after .main-nav (which is flex:1), so it's
   always pinned to the bottom of the rail rather than scrolling with the
   menu. Collapsed state shows only the version, centered, matching how
   .nav-link labels are hidden at 78px width elsewhere in this file. */
.sidebar-footer {
    flex-shrink: 0; padding: 10px 20px; border-top: 1px solid var(--border-color);
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    font-size: 11px; color: var(--text-tertiary); white-space: nowrap; overflow: hidden;
}
.sidebar-footer-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.sidebar-footer-version { flex-shrink: 0; }

[data-sidebar="collapsed"] .sidebar-footer { justify-content: center; padding: 10px 8px; }
[data-sidebar="collapsed"] .sidebar-footer-name { display: none; }

.nav-link {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: var(--radius-sm);
    text-decoration: none; color: var(--text-secondary);
    font-weight: 500; font-size: 13.5px; white-space: nowrap;
    transition: var(--transition);
    border: none; background: none; cursor: pointer; width: 100%; text-align: left;
}
.nav-link i:first-child { width: 18px; text-align: center; font-size: 14px; }
.nav-link:hover { background: rgba(24, 137, 110, .1); color: var(--primary-color); }
.nav-link.active { background: var(--gradient-primary); color: #fff; box-shadow: var(--shadow-glow); }

/* Collapsible group inside the sidebar */
.nav-dropdown { display: flex; flex-direction: column; }
.dropdown-toggle { justify-content: space-between; }
.dropdown-toggle .fa-chevron-down { font-size: 10px; margin-left: auto; transition: var(--transition-fast); }
.nav-dropdown.active .dropdown-toggle .fa-chevron-down { transform: rotate(180deg); }
.nav-dropdown.active .dropdown-toggle { background: rgba(24, 137, 110, .1); color: var(--primary-color); }

.nav-dropdown .dropdown-menu {
    display: none; flex-direction: column; gap: 2px;
    padding: 4px 0 4px 14px; margin-top: 2px; margin-bottom: 4px;
    border-left: 2px solid var(--border-color);
}
.nav-dropdown.active .dropdown-menu { display: flex; animation: dropdownFade .15s ease-out; }

.nav-dropdown .dropdown-menu a {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: var(--radius-sm); text-decoration: none;
    color: var(--text-secondary); font-size: 13px; font-weight: 500; white-space: nowrap;
    transition: var(--transition-fast);
}
.nav-dropdown .dropdown-menu a:hover { background: rgba(24, 137, 110, .08); color: var(--primary-color); }
.nav-dropdown .dropdown-menu a.active { background: rgba(24, 137, 110, .12); color: var(--primary-color); font-weight: 600; }
.nav-dropdown .dropdown-menu a i:first-child { width: 16px; color: var(--text-tertiary); font-size: 12px; }
.nav-dropdown .dropdown-menu a:hover i:first-child { color: var(--primary-color); }

/* ---------- Content column ---------- */

.content-col { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }

.topbar {
    height: 68px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; padding: 0 24px;
    position: sticky; top: 0; z-index: 900;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}
[data-theme="dark"] .topbar { background: rgba(21, 25, 31, 0.85); }
/* A thin brand-gradient hairline under the topbar — a small techy accent
   that ties every screen back to the same palette without shouting. */
.topbar::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--secondary-color));
    opacity: .55;
}

.mobile-menu-toggle {
    display: none;
    width: 40px; height: 40px;
    align-items: center; justify-content: center;
    background: none; border: none; border-radius: var(--radius-sm);
    color: var(--text-secondary); font-size: 1.3rem; cursor: pointer;
    transition: var(--transition);
}
.mobile-menu-toggle:hover { background: var(--border-light); color: var(--primary-color); }

/* Global search (Cepter's request, 2026-09-25 — "add a global search").
   Sits between the mobile menu toggle and .header-right, growing to fill
   the space between them; .header-right's own margin-left:auto still
   pushes it to the far right whenever this box is absent (a role with
   none of the searchable permissions never renders the form at all). */
.global-search {
    position: relative; flex: 1 1 auto; max-width: 420px;
    display: flex; align-items: center;
}
.global-search-icon {
    position: absolute; left: 14px; font-size: 13px; color: var(--text-tertiary); pointer-events: none;
}
.global-search-input {
    width: 100%; height: 40px; padding: 0 14px 0 36px;
    border-radius: var(--radius-lg); border: 1px solid var(--border-color);
    background: var(--surface-color); color: var(--text-primary);
    font-size: 13.5px; transition: var(--transition);
}
.global-search-input:focus {
    outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(24, 137, 110, .12);
}
.global-search-results {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0; max-height: 70vh; overflow-y: auto;
    background: var(--surface-elevated); border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-dropdown);
    padding: 8px; display: none; z-index: 1001;
}
.global-search.active .global-search-results { display: block; animation: dropdownFade .15s ease-out; }
.global-search-group + .global-search-group { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border-color); }
.global-search-group-title {
    font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
    color: var(--text-tertiary); padding: 6px 10px 4px;
}
.global-search-item {
    display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border-radius: var(--radius-sm);
    text-decoration: none; color: var(--text-primary); transition: var(--transition-fast);
}
.global-search-item:hover, .global-search-item.is-active { background: rgba(24, 137, 110, .1); }
.global-search-item-title { font-size: 13px; font-weight: 600; }
.global-search-item-subtitle { font-size: 11.5px; color: var(--text-tertiary); }
.global-search-footer {
    display: block; text-align: center; padding: 8px 10px; margin-top: 4px; border-top: 1px solid var(--border-color);
    font-size: 12px; font-weight: 600; color: var(--primary-color); text-decoration: none; border-radius: var(--radius-sm);
}
.global-search-footer:hover { background: rgba(24, 137, 110, .08); }
.global-search-empty, .global-search-loading {
    padding: 16px 10px; text-align: center; font-size: 12.5px; color: var(--text-tertiary);
}

.header-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; margin-left: auto; }

.theme-toggle, .icon-btn {
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm); border: 1px solid var(--border-color);
    background: var(--surface-color); color: var(--text-secondary);
    cursor: pointer; transition: var(--transition); font-size: 16px;
}
.theme-toggle:hover, .icon-btn:hover { background: rgba(24, 137, 110, .1); color: var(--primary-color); }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

/* Notification bell (Cepter's request, 2026-09-26 — "an in-app
   notification bell"). Same dropdown pattern as .user-menu just above. */
.notif-bell { position: relative; }
.notif-bell-toggle {
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm); border: 1px solid var(--border-color);
    background: var(--surface-color); color: var(--text-secondary);
    cursor: pointer; transition: var(--transition); font-size: 16px; position: relative;
}
.notif-bell-toggle:hover, .notif-bell.active .notif-bell-toggle { background: rgba(24, 137, 110, .1); color: var(--primary-color); }
.notif-bell-badge {
    position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px;
    padding: 0 4px; border-radius: 8px; background: var(--danger-color); color: #fff;
    font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
    border: 2px solid var(--surface-color);
}

.notif-dropdown {
    position: absolute; top: calc(100% + 8px); right: 0; width: 340px; max-width: 90vw;
    background: var(--surface-elevated); border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-dropdown);
    padding: 0; display: none; z-index: 1001; overflow: hidden;
}
.notif-bell.active .notif-dropdown { display: block; animation: dropdownFade .2s ease-out; }

.notif-dropdown-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 14px; border-bottom: 1px solid var(--border-color);
    font-weight: 700; font-size: 13.5px;
}
.notif-mark-all {
    border: none; background: none; color: var(--primary-color); cursor: pointer;
    font-size: 12px; font-weight: 600; padding: 0;
}
.notif-mark-all:hover { text-decoration: underline; }

.notif-list { max-height: 340px; overflow-y: auto; }
.notif-item {
    display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px;
    text-decoration: none; color: var(--text-primary); border-bottom: 1px solid var(--border-light);
    transition: var(--transition-fast);
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--border-light); }
.notif-item-unread { background: var(--info-soft-bg); }
.notif-item-unread:hover { background: var(--info-soft-bg); }
.notif-item-icon {
    width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
    background: var(--border-light); color: var(--primary-color);
    display: flex; align-items: center; justify-content: center; font-size: 13px;
}
.notif-item-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.notif-item-title { font-weight: 600; font-size: 12.5px; }
.notif-item-text { font-size: 12px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; }
.notif-item-time { font-size: 10.5px; color: var(--text-tertiary); margin-top: 2px; }

.notif-empty { padding: 24px 14px; text-align: center; font-size: 12.5px; color: var(--text-tertiary); }

.notif-legacy-badges { padding: 8px 14px; border-top: 1px solid var(--border-color); display: flex; flex-direction: column; gap: 6px; }
.notif-legacy-badge {
    display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--warning-soft-text);
    background: var(--warning-soft-bg); border: 1px solid var(--warning-soft-border);
    padding: 6px 10px; border-radius: var(--radius-sm); text-decoration: none;
}
.notif-legacy-badge:hover { filter: brightness(0.97); }

.notif-dropdown-footer {
    display: block; text-align: center; padding: 10px; font-size: 12.5px; font-weight: 600;
    color: var(--primary-color); text-decoration: none; border-top: 1px solid var(--border-color);
}
.notif-dropdown-footer:hover { background: var(--border-light); }

/* "View all" page (resources/views/notifications/index.blade.php) */
.notif-page-list { display: flex; flex-direction: column; }
.notif-page-item {
    display: flex; align-items: center; gap: 12px; padding: 14px 20px;
    text-decoration: none; color: var(--text-primary); border-bottom: 1px solid var(--border-light);
}
.notif-page-item:last-child { border-bottom: none; }
.notif-page-item:hover { background: var(--border-light); }
.notif-page-item-unread { background: var(--info-soft-bg); }
.notif-page-icon {
    width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
    background: var(--border-light); color: var(--primary-color);
    display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.notif-page-body { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.notif-page-title { font-weight: 600; font-size: 13.5px; }
.notif-page-text { font-size: 12.5px; color: var(--text-secondary); }
.notif-page-time { font-size: 11.5px; color: var(--text-tertiary); white-space: nowrap; }

.user-menu {
    display: flex; align-items: center; gap: 10px;
    padding: 4px 10px 4px 4px; border-radius: var(--radius);
    border: 1px solid transparent; cursor: pointer; position: relative;
    transition: var(--transition); user-select: none;
}
.user-menu:hover, .user-menu.active { background: var(--border-light); border-color: var(--border-color); }

.user-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px; flex-shrink: 0;
}

.user-info { display: flex; flex-direction: column; line-height: 1.2; }
.user-name { font-weight: 600; font-size: 13.5px; }
.user-role {
    font-size: 10.5px; color: var(--primary-color); background: rgba(24, 137, 110, .1);
    padding: 1px 8px; border-radius: 8px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .4px; width: fit-content;
}

.user-menu .dropdown-menu {
    position: absolute; top: calc(100% + 8px); right: 0; min-width: 200px;
    background: var(--surface-elevated); border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-dropdown);
    padding: 8px; display: none; z-index: 1001;
}
.user-menu.active .dropdown-menu { display: block; animation: dropdownFade .2s ease-out; }
@keyframes dropdownFade { from { opacity: 0; transform: translateY(-6px);} to { opacity: 1; transform: translateY(0);} }

.user-menu .dropdown-menu form { margin: 0; }
.user-menu .dropdown-menu button, .user-menu .dropdown-menu a {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 10px 12px; border-radius: var(--radius-sm); border: none; background: none;
    color: var(--text-primary); font: inherit; font-size: 13.5px; text-align: left;
    text-decoration: none; cursor: pointer; transition: var(--transition-fast);
}
.user-menu .dropdown-menu button:hover, .user-menu .dropdown-menu a:hover {
    background: var(--border-light); color: var(--primary-color);
}

.mobile-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.5); backdrop-filter: blur(5px); z-index: 999;
}
.mobile-overlay.active { display: block; }

/* ---------- Main content ---------- */

.app-main { flex: 1; width: 100%; max-width: 1400px; padding: 28px 24px; }

.role-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(24, 137, 110, .1); color: var(--primary-color);
    padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .4px; margin-bottom: 14px;
}

.page-title {
    font-size: 26px; font-weight: 700; margin-bottom: 6px;
    display: flex; align-items: center;
}
.page-title::before {
    content: ''; display: inline-block; width: 6px; height: 22px; border-radius: 3px;
    background: var(--gradient-brand); margin-right: 12px; flex-shrink: 0;
}
.page-subtitle { color: var(--text-secondary); margin-bottom: 24px; font-size: 14.5px; }

.card {
    background: var(--surface-color); border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow);
    transition: var(--transition-fast);
}

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
    background: var(--surface-color); border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); padding: 18px 20px; box-shadow: var(--shadow);
    transition: var(--transition-fast);
}
.stat-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.stat-card .stat-label { font-size: 12px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.stat-card .stat-number { font-size: 28px; font-weight: 700; margin-top: 6px; }

.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 18px; border-radius: var(--radius-sm); border: none;
    font-weight: 600; font-size: 14px; cursor: pointer; transition: var(--transition);
    text-decoration: none;
}
.btn-primary { background: var(--gradient-primary); color: #fff; box-shadow: 0 2px 10px rgba(24,137,110,.22); }
.btn-primary:hover { box-shadow: var(--shadow-glow); transform: translateY(-1px); }
.btn-secondary { background: var(--border-light); color: var(--text-primary); }
.btn-secondary:hover { background: var(--border-color); }
.btn-danger { background: rgba(255,59,48,.1); color: var(--danger-color); }
.btn-danger:hover { background: rgba(255,59,48,.18); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn:disabled:hover { box-shadow: none; transform: none; }

/* ---------- Forms ---------- */

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px 20px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.span-2 { grid-column: span 2; }
.form-group label { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.form-group label .req { color: var(--danger-color); }

.form-control, select.form-control, textarea.form-control {
    width: 100%; padding: 10px 12px; border-radius: var(--radius-sm);
    border: 1px solid var(--border-color); background: var(--surface-color);
    color: var(--text-primary); font-size: 14px; font-family: inherit;
    transition: var(--transition-fast);
}
.form-control:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(24,137,110,.12); }
textarea.form-control { resize: vertical; min-height: 90px; }

.form-check { display: flex; align-items: center; gap: 8px; }
.form-check input { width: 16px; height: 16px; accent-color: var(--primary-color); }

.form-section-title {
    font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
    color: var(--text-tertiary); margin: 24px 0 12px; padding-top: 16px; border-top: 1px solid var(--border-light);
}
.form-section-title:first-child { margin-top: 0; padding-top: 0; border-top: none; }

.form-actions { display: flex; gap: 10px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border-color); }

.form-error { color: var(--danger-color); font-size: 12.5px; margin-top: -2px; }

.alert {
    padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 20px;
    display: flex; align-items: center; gap: 10px;
}
.alert-success { background: var(--success-soft-bg); color: var(--success-soft-text); border: 1px solid var(--success-soft-border); }
.alert-danger { background: var(--danger-soft-bg); color: var(--danger-soft-text); border: 1px solid var(--danger-soft-border); }
/* Notice variants — replaces the inline-styled "info box" pattern that used
   to hardcode light-only colors on several pages (Duty Charges, Demurrage,
   Welcome Messages, Warehouse Notifications, Air Cargo, Quotes). */
.alert-warning { background: var(--warning-soft-bg); color: var(--warning-soft-text); border: 1px solid var(--warning-soft-border); }
.alert-info { background: var(--info-soft-bg); color: var(--info-soft-text); border: 1px solid var(--info-soft-border); }

/* ---------- Tables ---------- */

/* 2026-10-16, Cepter's request — "some parts are not working on mobile
   view": .table-wrap/.table-responsive/.analysis-table-wrap (below) were
   the only horizontal-scroll mechanism for wide tables, but gave no visual
   cue that there was more to see off-screen — on a phone a table just
   looked cut off, with nothing suggesting "swipe right". This adds the
   classic CSS-only edge-fade trick: two background gradients scroll WITH
   the content (background-attachment: local) to mask each edge, and two
   more stay fixed (scroll) to darken that edge only while there's really
   more content that way — so the fade disappears on its own once you've
   scrolled all the way to an edge, with no JS needed. */
.table-wrap, .table-responsive, .analysis-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background:
        linear-gradient(to right, var(--surface-color) 30%, rgba(255,255,255,0)),
        linear-gradient(to right, rgba(255,255,255,0), var(--surface-color) 70%) 100% 0,
        linear-gradient(to right, rgba(0,0,0,.12), rgba(0,0,0,0)),
        linear-gradient(to left, rgba(0,0,0,.12), rgba(0,0,0,0)) 100% 0;
    background-repeat: no-repeat;
    background-color: var(--surface-color);
    background-size: 32px 100%, 32px 100%, 12px 100%, 12px 100%;
    background-position: 0 0, 100% 0, 0 0, 100% 0;
    background-attachment: local, local, scroll, scroll;
}

/* A desktop-ratio two-column chart/card grid (e.g. storage reports' chart
   pairs) that collapses to one column on mobile, same breakpoint as
   .dash-grid — use this instead of an inline grid-template-columns style
   whenever the two sides don't need equal width on desktop. */
.chart-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 960px) { .chart-grid { grid-template-columns: 1fr; } }

.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table th {
    text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px;
    color: var(--text-tertiary); font-weight: 700; padding: 10px 14px; border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}
/* Sortable column headers (2026-10-03) — the <th> padding above already
   gives the link its hit area, so the link itself just inherits color and
   loses the underline; the fa-sort/-up/-down icon says which column (and
   which direction) is active. */
.sortable-th { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.sortable-th:hover { color: var(--primary-color); }
/* "Show N per page" control sitting in the table-card-header next to the count. */
.per-page-control { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-tertiary); white-space: nowrap; }
.per-page-control select {
    font-size: 12.5px; padding: 3px 6px; border-radius: 6px; border: 1px solid var(--border-color);
    background: var(--surface-color); color: var(--text-primary);
}
.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--border-light); vertical-align: middle; }
.data-table tbody tr { transition: var(--transition-fast); }
.data-table tbody tr:hover { background: var(--border-light); }
.data-table a.row-link { color: var(--text-primary); font-weight: 600; text-decoration: none; }
.data-table a.row-link:hover { color: var(--primary-color); }

.badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .3px;
}
.badge-info { background: rgba(90,200,250,.15); color: #0284c7; }
.badge-success { background: rgba(52,199,89,.15); color: #1b7a37; }
.badge-danger { background: rgba(255,59,48,.12); color: #c0322a; }
.badge-warning { background: rgba(255,149,0,.15); color: #b45f00; }
[data-theme="dark"] .badge-info { color: #7dd3fc; }
[data-theme="dark"] .badge-success { color: #6fe397; }
[data-theme="dark"] .badge-danger { color: #ff8f89; }
[data-theme="dark"] .badge-warning { color: #ffc069; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.toolbar-filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar-filters .form-control { width: auto; min-width: 160px; }

.empty-state { text-align: center; padding: 48px 24px; color: var(--text-secondary); }
.empty-state i { font-size: 32px; color: var(--text-tertiary); margin-bottom: 12px; display: block; }

.pagination-wrap { margin-top: 20px; }

/* ---------- Pagination (resources/views/vendor/pagination/stagie.blade.php) ----------
   Replaces Laravel's default Tailwind-markup pagination view, which this
   app never loaded Tailwind for — hence the giant unstyled SVG chevrons
   and plain-text page numbers. Registered app-wide in AppServiceProvider
   so every ->links() call anywhere in the app picks it up automatically. */
.pagination-bar {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 12px; font-size: 13px;
}
.pagination-info { color: var(--text-tertiary); }
.pagination-info-num { color: var(--text-primary); font-weight: 700; }
.pagination-links { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.page-btn {
    min-width: 32px; height: 32px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm); text-decoration: none; color: var(--text-secondary);
    font-weight: 600; font-size: 13px; transition: var(--transition-fast); border: 1px solid transparent;
}
a.page-btn:hover { background: var(--border-light); color: var(--primary-color); border-color: var(--border-color); }
.page-btn-active { background: var(--gradient-primary); color: #fff; box-shadow: var(--shadow-glow); }
.page-btn-disabled { color: var(--text-tertiary); opacity: .45; cursor: default; }
.page-btn-dots { color: var(--text-tertiary); cursor: default; }
@media (max-width: 640px) { .pagination-bar { justify-content: center; text-align: center; } }

.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; }
.detail-item .detail-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--text-tertiary); font-weight: 700; margin-bottom: 4px; }
.detail-item .detail-value { font-size: 14.5px; font-weight: 500; }

.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item { display: flex; gap: 14px; padding: 0 0 20px; position: relative; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
    width: 10px; height: 10px; border-radius: 50%; background: var(--primary-color);
    margin-top: 5px; flex-shrink: 0; position: relative;
}
.timeline-item:not(:last-child) .timeline-dot::after {
    content: ''; position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
    width: 2px; height: calc(100% + 8px); background: var(--border-color);
}
.timeline-content { flex: 1; }
.timeline-meta { font-size: 12px; color: var(--text-tertiary); margin-top: 2px; }

/* ── Containers index (ported from admin/manage_containers.php) ────────── */
.role-chip {
    display: inline-flex; align-items: center; gap: 5px; margin-left: 10px;
    padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .3px; vertical-align: middle;
}
.role-chip-admin { background: rgba(139,92,246,.15); color: #6d28d9; }
.role-chip-agent { background: rgba(24,137,110,.12); color: var(--primary-color); }
[data-theme="dark"] .role-chip-admin { color: #c4b5fd; }

.summary-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin-bottom: 20px; }
.summary-stat {
    background: var(--surface-color); border: 1px solid var(--border-color); border-radius: 12px;
    padding: 14px 12px; text-align: center;
}
.summary-stat.has-overdue { border-color: rgba(255,59,48,.4); }
/* clamp() rather than a fixed 22px (2026-10-03): a duty/demurrage total in
   the billions-to-trillions range formats to a long "MWK 1,234,567,890,123.45"
   string that would otherwise crowd or overflow the 120px-min stat tile. */
.summary-stat-value { font-size: clamp(14px, 2.2vw, 22px); font-weight: 700; line-height: 1.25; overflow-wrap: break-word; }
.summary-stat-label { font-size: 11px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: .3px; font-weight: 600; margin-top: 4px; }
.summary-stat-value.text-info { color: #0284c7; }
.summary-stat-value.text-warning { color: #b45f00; }
.summary-stat-value.text-primary { color: var(--primary-color); }
.summary-stat-value.text-success { color: #1b7a37; }
.summary-stat-value.text-danger { color: var(--danger-color); }

/* Bulk Assign (2026-10-03) — the sticky-feeling bar that appears above the
   Active Containers/Air Shipments table once at least one row is checked. */
.bulk-assign-bar {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    background: rgba(24,137,110,.08); border: 1px solid rgba(24,137,110,.3); border-radius: 12px;
    padding: 12px 16px; margin-bottom: 16px;
}
[data-theme="dark"] .bulk-assign-bar { background: rgba(24,137,110,.15); }
.bulk-assign-count { font-size: 13px; font-weight: 700; color: var(--primary-color); white-space: nowrap; }

.filters-card { background: var(--surface-color); border: 1px solid var(--border-color); border-radius: 12px; padding: 16px 18px; margin-bottom: 20px; }
.filters-form { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.filter-group { display: flex; flex-direction: column; gap: 6px; flex: 1 1 220px; min-width: 180px; }
.filter-group label { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.filter-input, .filter-select { padding: 9px 12px; border: 1.5px solid var(--border-color); border-radius: 8px; background: var(--input-bg); color: var(--text-primary); font-size: 13.5px; }
.filter-input:focus, .filter-select:focus { outline: none; border-color: var(--primary-color); }
.filter-actions { display: flex; gap: 10px; }

.table-card { background: var(--surface-color); border: 1px solid var(--border-color); border-radius: 14px; overflow: hidden; }
.table-card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--border-light); flex-wrap: wrap; }
.table-card-title { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.table-count { font-size: 12.5px; color: var(--text-tertiary); }

.job-card-badge {
    display: inline-block; font-family: ui-monospace, monospace; font-weight: 700; font-size: 12.5px;
    color: var(--primary-color); background: rgba(24,137,110,.1); padding: 4px 8px; border-radius: 6px;
    text-decoration: none;
}
.job-card-badge:hover { background: rgba(24,137,110,.18); }
.job-card-badge-muted { color: var(--text-tertiary); background: var(--border-light); }

.container-number { font-weight: 700; font-size: 13.5px; }
.name-cell { font-size: 13.5px; margin-bottom: 3px; }
.sub-text { font-size: 12px; color: var(--text-tertiary); }

.type-pill {
    display: inline-block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px;
    padding: 2px 7px; border-radius: 999px; background: var(--border-light); color: var(--text-secondary);
}
.type-import { background: var(--info-soft-bg); color: var(--info-soft-text); }
.type-export { background: var(--success-soft-bg); color: var(--success-soft-text); }
.type-transit { background: var(--warning-soft-bg); color: var(--warning-soft-text); }
/* Air/Sea mode pills (Shipment Dashboard, C-Numbers) — replaces inline
   rgba() styles that didn't adapt to dark mode. */
.mode-air { background: rgba(139,92,246,.15); color: #6d28d9; }
.mode-sea { background: var(--info-soft-bg); color: var(--info-soft-text); }
[data-theme="dark"] .mode-air { color: #c4b5fd; }

.status-badge {
    display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700;
    padding: 4px 10px; border-radius: 999px; background: var(--info-soft-bg); color: var(--info-soft-text);
}
.status-delivered, .status-released, .status-ready_collection, .status-green { background: var(--success-soft-bg); color: var(--success-soft-text); }
.status-cancelled, .status-on_hold, .status-physical_inspection, .status-customs_clearance, .status-red, .status-query, .status-appeal { background: var(--danger-soft-bg); color: var(--danger-soft-text); }
.status-yellow, .status-undertaking { background: var(--warning-soft-bg); color: var(--warning-soft-text); }

.eta-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.eta-date { font-size: 13px; }
.eta-done { background: var(--success-soft-bg); color: var(--success-soft-text); }
.eta-overdue { background: var(--danger-soft-bg); color: var(--danger-soft-text); }
.eta-urgent { background: var(--warning-soft-bg); color: var(--warning-soft-text); }
.eta-soon { background: rgba(255,199,0,.15); color: #8a6d00; }
[data-theme="dark"] .eta-soon { color: #ffd75e; }
.eta-ok { background: var(--info-soft-bg); color: var(--info-soft-text); }

.row-overdue { background: rgba(255,59,48,.05); }
.row-overdue:hover { background: rgba(255,59,48,.09) !important; }
[data-theme="dark"] .row-overdue { background: rgba(255,59,48,.08); }
[data-theme="dark"] .row-overdue:hover { background: rgba(255,59,48,.13) !important; }

.agent-cell { display: flex; align-items: center; gap: 8px; }
.agent-avatar {
    width: 26px; height: 26px; border-radius: 50%; background: rgba(24,137,110,.15); color: var(--primary-color);
    display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.agent-avatar.avatar-muted { background: var(--border-light); color: var(--text-tertiary); }
.agent-name { font-size: 13px; font-weight: 600; }
.assign-link { font-size: 12.5px; color: var(--primary-color); text-decoration: none; font-weight: 600; }
.assign-link:hover { text-decoration: underline; }

.payment-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.payment-paid { background: var(--success-soft-bg); color: var(--success-soft-text); }
.payment-unpaid { background: var(--warning-soft-bg); color: var(--warning-soft-text); }

.text-center { text-align: center; }

/* 2026-10-04: small inline count badge next to a nav-dropdown link (Phone
   Mismatch Reports' open-report count). Same pill shape as .cnumber-badge,
   but sized for sitting inline after text rather than centered in a table
   cell. */
.nav-badge {
    display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px;
    padding: 0 5px; margin-left: 6px; border-radius: 999px; font-size: 11px; font-weight: 700;
    background: var(--danger-color); color: #fff;
}

.cnumber-badge {
    display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px;
    padding: 0 6px; border-radius: 999px; font-size: 12px; font-weight: 700;
    background: rgba(24,137,110,.12); color: var(--primary-color);
}
.cnumber-badge.cnumber-active { background: var(--success-soft-bg); color: var(--success-soft-text); }
.cnumber-badge.cnumber-suspended { background: var(--danger-soft-bg); color: var(--danger-soft-text); }
.cnumber-badge.cnumber-zero { background: var(--border-light); color: var(--text-tertiary); }
.cnumber-badge.cnumber-info { background: var(--info-soft-bg); color: var(--info-soft-text); }
.cnumber-badge.cnumber-warning { background: var(--warning-soft-bg); color: var(--warning-soft-text); }

.action-buttons, .actions-cell { display: flex; align-items: center; gap: 6px; }
.btn-action-view, .btn-action-edit, .btn-action-update, .btn-action-danger {
    width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm); background: var(--border-light); color: var(--text-secondary);
    text-decoration: none; border: none; cursor: pointer; font: inherit; font-size: 13px;
    padding: 0; flex-shrink: 0; transition: var(--transition-fast);
}
/* Reset so these read the same whether they're an <a> (view/edit links) or
   a <button> inside a one-off form (suspend/reactivate/delete) — without
   this, a <button> keeps the browser's own grey, bordered chrome instead
   of picking up the pill styling above. */
.btn-action-view:hover { background: var(--info-soft-bg); color: var(--info-soft-text); }
.btn-action-edit:hover { background: rgba(24,137,110,.12); color: var(--primary-color); }
.btn-action-update:hover { background: var(--warning-soft-bg); color: var(--warning-soft-text); }
.btn-action-danger, .btn-action-view.is-danger { color: var(--danger-color); }
.btn-action-danger:hover, .btn-action-view.is-danger:hover { background: var(--danger-soft-bg); color: var(--danger-soft-text); }
.btn-action-view:active, .btn-action-edit:active, .btn-action-update:active, .btn-action-danger:active { transform: scale(.94); }

.empty-state-inline { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--text-secondary); padding: 12px 0; }
.empty-cell { text-align: center; padding: 32px 16px !important; }

.completed-section-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 32px 0 16px; }
.completed-section-title { display: flex; align-items: center; gap: 12px; }
.completed-section-icon {
    width: 38px; height: 38px; border-radius: 10px; background: var(--success-soft-bg); color: var(--success-soft-text);
    display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0;
}
.completed-section-title h2 { font-size: 17px; font-weight: 700; margin: 0; }
.completed-section-title p { font-size: 12.5px; color: var(--text-tertiary); margin: 2px 0 0; }
.completed-section-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.completed-count-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 999px; }
.badge-delivered { background: var(--success-soft-bg); color: var(--success-soft-text); }
.badge-cancelled { background: rgba(139,92,246,.15); color: #6d28d9; }
[data-theme="dark"] .badge-cancelled { color: #c4b5fd; }
.completed-row { opacity: .92; }
.cancelled-row { background: rgba(139,92,246,.04); }
[data-theme="dark"] .cancelled-row { background: rgba(139,92,246,.08); }

@media (max-width: 900px) {
    .sidebar {
        position: fixed; top: 0; left: -280px; width: 264px; height: 100vh;
        box-shadow: var(--shadow-hover); transition: left .3s ease;
    }
    .sidebar.active { left: 0; }
    .sidebar-close { display: block; }
    .mobile-menu-toggle { display: flex; }
    .user-info { display: none; }
    .global-search { display: none; }
}

/* =========================================================
   Auth screens — dark gradient with floating blobs, matching
   the container-system's admin_login.css
   ========================================================= */

.auth-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden; margin: 0;
}

.bg-animation { position: fixed; inset: 0; overflow: hidden; z-index: 0; }
.bg-shape { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .3; animation: float 20s infinite ease-in-out; }
.shape-1 { top: -10%; right: -10%; width: 500px; height: 500px; background: linear-gradient(135deg, #18896e, #8b5cf6); }
.shape-2 { bottom: -10%; left: -10%; width: 600px; height: 600px; background: linear-gradient(135deg, #ffc71a, #18896e); animation-delay: 5s; }
.shape-3 { top: 30%; left: 20%; width: 300px; height: 300px; background: linear-gradient(135deg, #8b5cf6, #ffc71a); animation-delay: 10s; }

@keyframes float {
    0%, 100% { transform: translate(0,0) rotate(0deg); }
    33% { transform: translate(30px,-30px) rotate(120deg); }
    66% { transform: translate(-20px,20px) rotate(240deg); }
}

.auth-card {
    position: relative; z-index: 1; width: 100%; max-width: 380px;
    background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
    backdrop-filter: blur(24px); border-radius: 20px; padding: 40px 34px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,.4); color: #fff;
    margin: 20px;
}
.auth-card .brand { justify-content: center; margin-bottom: 22px; }
.auth-card .brand img { height: 42px; }
.auth-card h1 { font-size: 20px; font-weight: 700; text-align: center; margin-bottom: 24px; color: #fff; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 6px; color: rgba(255,255,255,.75); }
.field input {
    width: 100%; padding: 11px 14px; border-radius: 10px; font-size: 14px;
    border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.08); color: #fff;
    transition: var(--transition-fast);
}
.field input::placeholder { color: rgba(255,255,255,.4); }
.field input:focus { outline: none; border-color: #18896e; background: rgba(255,255,255,.12); }

.auth-card .btn-primary { width: 100%; justify-content: center; padding: 12px; margin-top: 6px; }

.auth-error {
    background: rgba(255,59,48,.12); border: 1px solid rgba(255,59,48,.35);
    color: #ffb4b0; padding: 10px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 16px;
}

/* reCAPTCHA v3 notice (security review, 2026-09-26) — Google requires
   this disclosure to be shown wherever the badge itself is hidden. */
.recaptcha-notice {
    font-size: 10.5px; color: rgba(255,255,255,.45); text-align: center;
    margin-top: 14px; line-height: 1.5;
}
.recaptcha-notice a { color: rgba(255,255,255,.65); }
.grecaptcha-badge { visibility: hidden; }

/* =========================================================
   Shipment Dashboard — ported from admin/dashboard.php's
   "Operations Dashboard". Reuses .card/.summary-stats/
   .data-table/.status-badge/.eta-pill/.timeline* wherever
   those already say what's needed; only genuinely new
   components (finance strip, breakdown bars, analysis
   tables, agent workload, monthly bars) get new rules here.
   ========================================================= */

.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 960px) { .dash-grid { grid-template-columns: 1fr; } }

.panel-subtitle { font-size: 11px; color: var(--text-tertiary); font-weight: 600; }

.finance-strip {
    display: flex; flex-wrap: wrap; border: 1px solid var(--border-color); border-radius: var(--radius-lg);
    background: var(--surface-color); box-shadow: var(--shadow); margin-bottom: 20px; overflow: hidden;
}
.finance-item { flex: 1 1 160px; padding: 14px 18px; border-right: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); }
.finance-item:last-child { border-right: none; }
.finance-label { display: block; font-size: 11px; color: var(--text-tertiary); font-weight: 600; text-transform: uppercase; letter-spacing: .3px; margin-bottom: 5px; }
.finance-value { font-size: 17px; font-weight: 800; overflow-wrap: break-word; }
.finance-value.text-success { color: #1b7a37; }
.finance-value.text-danger { color: var(--danger-color); }
.finance-value.text-amber { color: #b45f00; }
[data-theme="dark"] .finance-value.text-success { color: #6fe397; }
[data-theme="dark"] .finance-value.text-amber { color: #ffc069; }

.breakdown-list { margin-top: 4px; }
.breakdown-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.breakdown-row + .breakdown-row { border-top: 1px solid var(--border-light); }
.breakdown-left { flex: 0 0 160px; }
.breakdown-bar-wrap { flex: 1; }
.breakdown-bar { height: 8px; border-radius: 4px; background: var(--border-light); overflow: hidden; }
.breakdown-bar-fill { height: 100%; background: var(--primary-color); border-radius: 4px; }
.breakdown-right { flex: 0 0 90px; text-align: right; font-size: 12.5px; color: var(--text-secondary); display: flex; gap: 8px; justify-content: flex-end; }
.breakdown-count { font-weight: 700; color: var(--text-primary); }

.analysis-table-wrap { margin-top: 4px; }
.analysis-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.analysis-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .3px; color: var(--text-tertiary); padding: 6px 8px; border-bottom: 1px solid var(--border-color); }
.analysis-table td { padding: 8px; border-bottom: 1px solid var(--border-light); vertical-align: middle; }
.analysis-table .line-name { font-weight: 600; }
.mini-bar { display: inline-block; width: 56px; height: 6px; border-radius: 3px; background: var(--border-light); overflow: hidden; vertical-align: middle; }
.mini-bar-fill { height: 100%; background: var(--primary-color); }
.num-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; padding: 2px 7px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.num-blue { background: var(--info-soft-bg); color: var(--info-soft-text); }
.num-green { background: var(--success-soft-bg); color: var(--success-soft-text); }

.agent-workload-list { margin-top: 4px; }
.agent-row-lg { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; }
.agent-row-lg + .agent-row-lg { border-top: 1px solid var(--border-light); }
.agent-avatar-lg {
    width: 36px; height: 36px; border-radius: 50%; background: rgba(24,137,110,.15); color: var(--primary-color);
    display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; flex-shrink: 0;
}
.agent-details { flex: 1; min-width: 0; }
.agent-name-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 5px; }
.agent-nm { font-size: 13.5px; font-weight: 600; }
.agent-total { font-size: 12px; color: var(--text-tertiary); font-weight: 600; }
.agent-bar { height: 6px; border-radius: 3px; background: var(--border-light); overflow: hidden; margin-bottom: 6px; }
.agent-bar-fill { height: 100%; background: var(--primary-color); }
.agent-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--border-light); color: var(--text-secondary); }
.chip-blue { background: var(--info-soft-bg); color: var(--info-soft-text); }
.chip-green { background: var(--success-soft-bg); color: var(--success-soft-text); }
.chip-red { background: var(--danger-soft-bg); color: var(--danger-soft-text); }

.bar-chart { display: flex; align-items: flex-end; gap: 6px; height: 130px; padding-top: 12px; overflow-x: auto; }
.bar-group { flex: 1; min-width: 22px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.bar-pair { display: flex; gap: 2px; align-items: flex-end; height: 90px; }
.bar { width: 8px; border-radius: 2px 2px 0 0; }
.bar-reg { background: var(--primary-color); }
.bar-del { background: var(--info-color); }
.bar-label { font-size: 9px; color: var(--text-tertiary); white-space: nowrap; transform: rotate(-40deg); transform-origin: top left; margin-left: 6px; }
.chart-legend { display: flex; justify-content: center; gap: 18px; margin-top: 14px; font-size: 12px; color: var(--text-secondary); }
.legend-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.dot-reg { background: var(--primary-color); }
.dot-del { background: var(--info-color); }

.no-data { color: var(--text-tertiary); font-size: 13px; padding: 10px 0; }
.no-data-block { text-align: center; padding: 26px 10px; color: var(--text-tertiary); }
.no-data-block i { font-size: 22px; margin-bottom: 8px; display: block; }
.no-data-block.no-data-success { color: #1b7a37; }
[data-theme="dark"] .no-data-block.no-data-success { color: #6fe397; }

/* =========================================================
   Dark-mode contrast fixes for hardcoded inline colors.
   A handful of views set color:#1b7a37 (success green) or
   color:#6d28d9 (admin purple) directly via style="" instead of a themed
   class — fine on a light background, but too dark to read against the
   dark theme's near-black surfaces. Rather than track down every such
   inline style individually, these two rules catch them by their exact
   literal value wherever they appear (present pages and any future one
   using the same pattern) and swap in the same lighter shade already used
   for their themed equivalents (badge-success / role-chip-admin).
   ========================================================= */
[data-theme="dark"] [style*="color:#1b7a37"] { color: #6fe397 !important; }
[data-theme="dark"] [style*="color:#6d28d9"] { color: #c4b5fd !important; }
[data-theme="dark"] [style*="color:#0284c7"] { color: #7dd3fc !important; }
