:root {
    --ink: #1c2434;
    --muted: #667085;
    --brand: #1f4fd8;
    --brand-dark: #173aa3;
    --accent: #f2a900;
    --bg: #f4f6fa;
    --panel: #ffffff;
    --line: #dde2ec;
    --danger: #c93c3c;
    --ok: #1f8a5b;
    --warn: #b7791f;
}

/* =========================
   RESET
========================= */

* {
    box-sizing: border-box;
}

html {
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    width: 100%;
    min-height: 100vh;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.5;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent;
}

/* =========================
   TOPBAR
========================= */

.topbar {
    background: var(--ink);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 0 24px;
    min-height: 56px;
    flex-wrap: wrap;
}

.brand {
    font-weight: 700;
    font-size: 18px;
    letter-spacing: .2px;
    white-space: nowrap;
}

.brand b {
    color: var(--accent);
}

/* =========================
   MENU PC
========================= */

.nav {
    display: flex;
    gap: 4px;
    flex: 1;
    flex-wrap: wrap;
}

.nav a {
    padding: 16px 12px;
    color: #c8d0e0;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}

.nav a.active {
    color: #fff;
    border-bottom-color: var(--accent);
}

/* =========================
   NÚT 3 GẠCH
========================= */

.menu-toggle {
    display: none;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    padding: 6px 8px;
    cursor: pointer;
}

.menu-toggle:active {
    transform: scale(.92);
}

/* =========================
   THÔNG BÁO PC
========================= */

.notification-box {
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.notification-box a {
    color: #c8d0e0;
}

.notification-box a:hover {
    color: #fff;
}

/* Thông báo trong menu mobile
   Mặc định PC không hiện */

.mobile-notification {
    display: none !important;
}

/* =========================
   ACCOUNT
========================= */

.who {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    white-space: nowrap;
}

.who a {
    color: #c8d0e0;
    text-decoration: underline;
}

/* =========================
   MAIN
========================= */

main {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 24px;
}

h1 {
    font-size: 22px;
    margin: 0 0 16px;
}

h2 {
    font-size: 16px;
    margin: 0 0 12px;
}

/* =========================
   PANEL
========================= */

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

/* =========================
   GRID / STAT
========================= */

.grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    margin-bottom: 20px;
}

.stat {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
}

.stat span {
    color: var(--muted);
    font-size: 13px;
}

.stat strong {
    display: block;
    font-size: 26px;
    margin-top: 2px;
}

.stat.alert strong {
    color: var(--danger);
}

/* =========================
   TABLE
========================= */

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th,
td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

th {
    color: var(--muted);
    font-weight: 600;
    background: #fafbfd;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-wrap table {
    min-width: 650px;
}

.num {
    text-align: right;
}

.empty {
    color: var(--muted);
    padding: 16px 0;
}

/* =========================
   FORM
========================= */

.form {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    align-items: end;
}

label {
    display: grid;
    gap: 4px;
    font-size: 13px;
    color: var(--muted);
}

label.check {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink);
}

input,
select,
textarea {
    width: 100%;
    font: inherit;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 1px;
}

/* =========================
   BUTTON
========================= */

.btn {
    font: inherit;
    padding: 8px 14px;
    border-radius: 6px;
    border: 1px solid var(--brand);
    background: var(--brand);
    color: #fff;
    cursor: pointer;
    transition: .15s ease;
}

.btn:hover {
    background: var(--brand-dark);
}

.btn.ghost {
    background: #fff;
    color: var(--brand);
}

.btn.ghost:hover {
    background: #eef2ff;
}

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

.btn.danger:hover {
    background: #fdeeee;
}

.btn.ok {
    background: var(--ok);
    border-color: var(--ok);
}

.btn.small {
    padding: 4px 10px;
    font-size: 13px;
}

.actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.toolbar input {
    flex: 1;
    min-width: 200px;
}

/* =========================
   BADGE
========================= */

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

.badge.PENDING {
    background: #fff4d6;
    color: var(--warn);
}

.badge.APPROVED,
.badge.IN {
    background: #dcf5e8;
    color: var(--ok);
}

.badge.REJECTED {
    background: #fbe1e1;
    color: var(--danger);
}

.badge.OUT {
    background: #e3eaff;
    color: var(--brand);
}

.low {
    color: var(--danger);
    font-weight: 600;
}

/* =========================
   MESSAGE
========================= */

.msg {
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 14px;
}

.msg.error {
    background: #fbe1e1;
    color: var(--danger);
}

.msg.success {
    background: #dcf5e8;
    color: var(--ok);
}

/* =========================
   LOGIN
========================= */

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 16px;
}

.login-box {
    width: 100%;
    max-width: 380px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 28px;
    box-shadow: 0 8px 30px rgba(28, 36, 52, .08);
}

.login-box h1 {
    margin-bottom: 4px;
}

.login-box p {
    margin: 0 0 20px;
    color: var(--muted);
}

.login-box label {
    margin-bottom: 12px;
}

.login-box input,
.login-box select {
    min-height: 44px;
}

.login-box .btn {
    width: 100%;
    min-height: 44px;
}

.hint {
    margin-top: 16px;
    font-size: 13px;
    color: var(--muted);
}

/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 640px) {

    body {
        font-size: 14px;
    }

    /* =========================
       TOPBAR MOBILE
    ========================= */

    .topbar {
        position:relative;
        display:flex;
        align-items:center;
        justify-content:flex-start;
        min-height:58px;
        padding:10px 14px;
        gap:8px;
        flex-wrap:nowrap;
    }

    .brand {
        width:auto;
        flex:1;
        font-size:17px;
        order:1;
    }

    /* Hiện nút 3 gạch */

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        flex-shrink: 0;
    }

    /* =========================
       MENU MOBILE
    ========================= */

    .nav {
        display: none;

        position: absolute;

        top: 58px;
        left: 0;
        right: 0;

        width: 100%;

        flex-direction: column;
        flex-wrap: nowrap;

        gap: 0;

        background: var(--ink);

        border-top: 1px solid rgba(255, 255, 255, .1);

        box-shadow: 0 8px 20px rgba(0, 0, 0, .2);

        z-index: 9999;

        padding: 6px 0;
    }

    /* Khi bấm ☰ */

    .nav.mobile-open {
        display: flex;
    }

    /* Từng menu */

    .nav a {
        display: flex;
        align-items: center;

        width: 100%;

        padding: 14px 18px;

        color: #c8d0e0;

        border-bottom: 1px solid rgba(255, 255, 255, .08);

        font-size: 14px;
    }

    .nav a:last-child {
        border-bottom: 0;
    }

    .nav a.active {
        color: #fff;

        background: rgba(255, 255, 255, .08);

        border-bottom-color: transparent;

        border-left: 3px solid var(--accent);

        padding-left: 15px;
    }

    .nav a:active {
        background: rgba(255, 255, 255, .12);
    }

    /* =========================
       THÔNG BÁO TRONG MENU
    ========================= */

    .notification-box {
        display: none !important;
    }

    .mobile-notification {
        display: flex !important;
        align-items: center;

        width: 100%;

        padding: 14px 18px;

        color: #c8d0e0;

        font-size: 14px;

        border-bottom: 1px solid rgba(255, 255, 255, .08);
    }

    .mobile-notification:hover {
        background: rgba(255, 255, 255, .08);
    }

    .mobile-notification span {
        margin-left: 6px;
    }

    /* =========================
       ACCOUNT MOBILE
    ========================= */

    .who {
        width: auto;
        flex-shrink: 0;
    }

    .who {
        display:flex;
        align-items:center;
        gap:8px;
        flex-shrink:0;
        font-size:12px;
    }

    .who a:first-child {
        display:block;
        max-width:130px;
        overflow:hidden;
        text-overflow:ellipsis;
        white-space:nowrap;
    }

    .who a:last-child {
        font-size:12px;
    }

    .who a:last-child {
        font-size: 13px;
    }

    /* =========================
       MAIN
    ========================= */

    main {
        width: 100%;
        padding: 14px 12px;
    }

    h1 {
        font-size: 20px;
        margin-bottom: 14px;
    }

    h2 {
        font-size: 16px;
    }

    /* =========================
       PANEL
    ========================= */

    .panel {
        padding: 13px;
        border-radius: 10px;
        margin-bottom: 14px;
    }

    /* =========================
       DASHBOARD
    ========================= */

    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin-bottom: 14px;
    }

    .stat {
        padding: 13px;
        border-radius: 10px;
        min-width: 0;
    }

    .stat span {
        display: block;
        font-size: 12px;
        line-height: 1.35;
    }

    .stat strong {
        font-size: 22px;
        margin-top: 4px;
    }

    /* =========================
       FORM
    ========================= */

    .form {
        grid-template-columns: 1fr;
        gap: 11px;
    }

    label {
        font-size: 12px;
    }

    input,
    select,
    textarea {
        min-height: 44px;
        padding: 10px 11px;
        border-radius: 8px;
        font-size: 15px;
    }

    textarea {
        min-height: 100px;
    }

    /* =========================
       BUTTON
    ========================= */

    .btn {
        min-height: 44px;
        padding: 10px 14px;
        border-radius: 8px;
        font-size: 14px;
    }

    .btn.small {
        min-height: 38px;
        padding: 8px 11px;
        font-size: 13px;
    }

    .actions {
        width: 100%;
        gap: 7px;
    }

    .actions .btn {
        flex: 1;
        min-width: 100px;
    }

    /* =========================
       TOOLBAR
    ========================= */

    .toolbar {
        display: flex;
        flex-direction: column;
        gap: 9px;
    }

    .toolbar input {
        width: 100%;
        min-width: 0;
    }

    .toolbar .btn {
        width: 100%;
    }

    /* =========================
       TABLE
    ========================= */

    .table-wrap {
        margin-left: -13px;
        margin-right: -13px;
        width: calc(100% + 26px);

        border-top: 1px solid var(--line);
        border-bottom: 1px solid var(--line);
    }

    .table-wrap table {
        min-width: 680px;
        font-size: 13px;
    }

    th,
    td {
        padding: 9px 10px;
        white-space: nowrap;
    }

    /* =========================
       MESSAGE
    ========================= */

    .msg {
        font-size: 13px;
        padding: 10px;
        border-radius: 8px;
    }

    /* =========================
       LOGIN
    ========================= */

    .login-page {
        min-height: 100dvh;
        padding: 14px;
        align-items: center;
    }

    .login-box {
        width: 100%;
        max-width: 100%;
        padding: 22px 18px;
        border-radius: 14px;
        box-shadow: 0 8px 30px rgba(28, 36, 52, .08);
    }

    .login-box h1 {
        font-size: 21px;
        text-align: center;
    }

    .login-box h2 {
        font-size: 18px;
        text-align: center;
        margin-top: 8px;
    }

    .login-box p {
        text-align: center;
        font-size: 13px;
        margin-bottom: 18px;
    }

    .login-box label {
        margin-bottom: 12px;
    }

    .login-box input {
        min-height: 46px;
        font-size: 15px;
    }

    .login-box .btn {
        min-height: 46px;
        font-size: 15px;
    }

    /* =========================
       RESET PASSWORD
    ========================= */

    #resetForm {
        margin-top: 16px !important;
        padding-top: 15px;
        border-top: 1px solid var(--line);
    }

    #forgotMessage {
        font-size: 13px;
    }
}

/* =====================================================
   ĐIỆN THOẠI RẤT NHỎ
===================================================== */

@media (max-width: 380px) {

    .topbar {
        padding: 8px 10px;
    }

    .brand {
        font-size: 16px;
    }

    .menu-toggle {
        width: 42px;
        height: 42px;
        font-size: 26px;
    }

    .nav {
        top: 54px;
    }

    main {
        padding: 12px 10px;
    }

    .grid {
        gap: 8px;
    }

    .stat {
        padding: 11px;
    }

    .stat strong {
        font-size: 20px;
    }

    .login-page {
        padding: 10px;
    }

    .login-box {
        padding: 20px 15px;
    }

    .login-box h1 {
        font-size: 19px;
    }

    .login-box h2 {
        font-size: 17px;
    }
}

/* =====================================================
   LANDSCAPE MOBILE
===================================================== */

@media (max-width: 900px) and (orientation: landscape) {

    .login-page {
        align-items: flex-start;
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .login-box {
        max-width: 420px;
    }
}

.login-error {
    width: 100%;
    box-sizing: border-box;
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 10px 12px;
    margin: 10px 0 15px;
    font-size: 14px;
    font-weight: 500;
}


/* =========================================================
   WINGS UP - HIỆU ỨNG UI
   Giữ nguyên giao diện hiện tại, chỉ bổ sung animation
   ========================================================= */

/* ---------- Animation ---------- */

@keyframes wuFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes wuFadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes wuScaleIn {
    from {
        opacity: 0;
        transform: scale(.97);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes wuSlideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes wuPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

@keyframes wuSpin {
    to { transform: rotate(360deg); }
}


/* ---------- Toàn trang ---------- */

body {
    animation: wuFadeIn .28s ease-out;
}


/* ---------- Topbar ---------- */

.topbar {
    transition: box-shadow .25s ease;
}

.topbar:hover {
    box-shadow: 0 3px 14px rgba(0, 0, 0, .12);
}

.brand {
    transition: transform .2s ease;
}

.brand:hover {
    transform: translateY(-1px);
}


/* ---------- Menu PC ---------- */

.nav a {
    position: relative;
    transition:
        color .2s ease,
        background .2s ease,
        transform .2s ease;
}

.nav a::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 0;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .22s ease;
}

.nav a:hover {
    color: #fff;
    transform: translateY(-1px);
}

.nav a:hover::after,
.nav a.active::after {
    transform: scaleX(1);
}


/* ---------- Nút 3 gạch ---------- */

.menu-toggle {
    transition: transform .2s ease, background .2s ease;
    border-radius: 8px;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, .08);
    transform: scale(1.04);
}


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

main {
    animation: wuFadeUp .35s ease-out;
}


/* ---------- Panel ---------- */

.panel {
    transition:
        transform .25s ease,
        box-shadow .25s ease,
        border-color .25s ease;
}

.panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(28, 36, 52, .07);
    border-color: #d3d9e5;
}


/* ---------- Dashboard stat ---------- */

.stat {
    transition:
        transform .25s ease,
        box-shadow .25s ease,
        border-color .25s ease;
    animation: wuFadeUp .4s ease both;
}

.stat:nth-child(2) {
    animation-delay: .05s;
}

.stat:nth-child(3) {
    animation-delay: .10s;
}

.stat:nth-child(4) {
    animation-delay: .15s;
}

.stat:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(28, 36, 52, .10);
    border-color: #cbd4e3;
}

.stat strong {
    transition: transform .2s ease;
}

.stat:hover strong {
    transform: scale(1.04);
}


/* ---------- Bảng ---------- */

.table-wrap {
    animation: wuFadeUp .4s ease-out;
}

table tbody tr {
    transition:
        background-color .18s ease,
        box-shadow .18s ease;
}

table tbody tr:hover {
    background: #f7f9fd;
    box-shadow: inset 3px 0 0 var(--brand);
}

th {
    transition: background-color .2s ease;
}

tr:hover td {
    color: #172033;
}


/* ---------- Form ---------- */

.form {
    animation: wuFadeUp .35s ease-out;
}

input,
select,
textarea {
    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        transform .18s ease;
}

input:hover,
select:hover,
textarea:hover {
    border-color: #c6cfde;
}

input:focus,
select:focus,
textarea:focus {
    transform: translateY(-1px);
    box-shadow: 0 0 0 3px rgba(31, 79, 216, .10);
}


/* ---------- Button ---------- */

.btn {
    position: relative;
    overflow: hidden;
    transition:
        transform .16s ease,
        box-shadow .2s ease,
        background-color .2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 14px rgba(31, 79, 216, .18);
}

.btn:active {
    transform: translateY(0) scale(.97);
    box-shadow: none;
}

.btn.ghost:hover {
    box-shadow: 0 4px 12px rgba(31, 79, 216, .10);
}

.btn.danger:hover {
    box-shadow: 0 4px 12px rgba(201, 60, 60, .12);
}

.btn.ok:hover {
    box-shadow: 0 4px 12px rgba(31, 138, 91, .16);
}


/* ---------- Actions ---------- */

.actions .btn {
    transition:
        transform .16s ease,
        box-shadow .2s ease,
        background-color .2s ease;
}


/* ---------- Badge ---------- */

.badge {
    transition: transform .18s ease;
}

.badge:hover {
    transform: scale(1.05);
}


/* ---------- Message ---------- */

.msg {
    animation: wuSlideDown .3s ease-out;
}


/* ---------- Login ---------- */

.login-page {
    animation: wuFadeIn .4s ease-out;
}

.login-box {
    animation: wuScaleIn .4s ease-out;
    transition:
        box-shadow .25s ease,
        transform .25s ease;
}

.login-box:hover {
    box-shadow: 0 14px 40px rgba(28, 36, 52, .12);
}

.login-box h1 {
    animation: wuFadeUp .45s ease-out;
}

.login-box p {
    animation: wuFadeUp .55s ease-out;
}

.login-box label {
    animation: wuFadeUp .6s ease-out;
}


/* ---------- Notification ---------- */

.notification-box a {
    transition: color .2s ease, transform .2s ease;
}

.notification-box a:hover {
    transform: translateY(-1px);
}

.notification-badge,
#notificationBadge {
    animation: wuPulse 1.8s ease-in-out infinite;
}


/* ---------- Mobile menu ---------- */

@media (max-width: 640px) {

    .nav.mobile-open {
        animation: wuSlideDown .22s ease-out;
        transform-origin: top center;
    }

    .nav a {
        transition:
            background .18s ease,
            padding-left .18s ease,
            color .18s ease;
    }

    .nav a:hover {
        transform: none;
        padding-left: 23px;
    }

    .nav a::after {
        display: none;
    }

    .mobile-notification {
        transition: background .18s ease, padding-left .18s ease;
    }

    .mobile-notification:hover {
        padding-left: 23px;
    }

    .stat:hover {
        transform: translateY(-3px);
    }

    .panel:hover {
        transform: translateY(-1px);
    }

    .login-box:hover {
        transform: none;
    }
}


/* ---------- Loading nếu dùng class này ---------- */

.loading-spinner {
    animation: wuSpin .7s linear infinite;
}


/* ---------- Reduced motion ---------- */

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

/* =========================================================
   WINGS UP — MODERN PREMIUM REDESIGN
   Override layer: preserves existing JS/API/class names
========================================================= */
:root {
    --ink: #172033;
    --muted: #758096;
    --brand: #315efb;
    --brand-dark: #2448d8;
    --accent: #f4b740;
    --bg: #f5f7fb;
    --panel: #ffffff;
    --line: #e7ebf3;
    --danger: #e5484d;
    --ok: #15966a;
    --warn: #b7791f;
    --wu-shadow: 0 8px 28px rgba(23, 32, 51, .055);
    --wu-shadow-hover: 0 14px 34px rgba(23, 32, 51, .09);
    --wu-radius: 16px;
}

html { scroll-behavior: smooth; }
body {
    background: #f5f7fb;
    color: var(--ink);
    font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
    line-height: 1.55;
}

/* Desktop: convert existing header/nav into a sidebar without JS changes */
.topbar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 10000;
    width: 258px;
    min-height: 100vh;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    padding: 28px 16px 20px;
    background: #111b31;
    color: #f8fafc;
    box-shadow: 8px 0 28px rgba(17, 27, 49, .08);
    border-right: 1px solid rgba(255,255,255,.06);
}
.topbar:hover { transform: none; }
.brand {
    display: block;
    padding: 4px 12px 22px;
    font-size: 23px;
    font-weight: 800;
    letter-spacing: -.7px;
    color: #fff;
}
.brand b { color: #7fa2ff; }
.menu-toggle { display: none !important; }
.nav {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
    flex-wrap: nowrap;
}
.nav > a,
.nav a {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 0;
    border-radius: 11px;
    color: #b9c4d8;
    font-size: 14px;
    font-weight: 550;
    text-align: left;
    white-space: normal;
    background: transparent;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}
.nav a::after { display: none !important; }
.nav a:hover {
    color: #fff;
    background: rgba(255,255,255,.075);
    transform: translateX(2px);
}
.nav a.active {
    color: #fff;
    background: linear-gradient(100deg, rgba(69,108,255,.28), rgba(69,108,255,.12));
    box-shadow: inset 3px 0 #7fa2ff;
}
.notification-box {
    display: flex;
    align-items: stretch;
    margin-top: auto;
    padding: 12px 4px 0;
    border-top: 1px solid rgba(255,255,255,.1);
}
.notification-box a {
    display: block;
    width: 100%;
    padding: 10px 12px;
    color: #c5cee0;
    border-radius: 10px;
    font-size: 14px;
}
.notification-box a:hover { color: #fff; background: rgba(255,255,255,.07); }
.who {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 12px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 14px;
    background: rgba(255,255,255,.045);
    white-space: normal;
}
.who a { color: #d5ddef; text-decoration: none; }
.user-info { display: flex; flex-direction: column; gap: 3px; overflow-wrap: anywhere; }
.user-name { color: #fff; font-weight: 700; }
.user-role { color: #aebbd2; font-size: 12px; }
.who .logout-link {
    padding: 8px 10px;
    border-radius: 9px;
    color: #ffb9bd;
    background: rgba(229,72,77,.09);
}
.who .logout-link:hover { background: rgba(229,72,77,.17); }
.mobile-account, .mobile-notification { display: none !important; }

main {
    width: auto;
    max-width: none;
    min-width: 0;
    margin: 0 0 0 258px;
    padding: 34px clamp(22px, 3vw, 48px) 48px;
}
#content { min-width: 0; }
h1 {
    margin: 0 0 22px;
    color: #18233a;
    font-size: clamp(25px, 2.3vw, 32px);
    font-weight: 780;
    letter-spacing: -.8px;
    line-height: 1.2;
}
h2 { color: #202c43; font-size: 18px; font-weight: 720; letter-spacing: -.25px; }
p { color: inherit; }

/* Surfaces and dashboard cards */
.panel, .stat, .welcome-banner, .login-box {
    border: 1px solid rgba(224,230,241,.9);
    border-radius: var(--wu-radius);
    background: #fff;
    box-shadow: var(--wu-shadow);
}
.panel {
    padding: 24px;
    margin: 0 0 22px;
    transition: box-shadow .2s ease, border-color .2s ease;
}
.panel:hover { transform: none; box-shadow: var(--wu-shadow-hover); border-color: #dbe3f3; }
.grid { gap: 16px; }
.stat {
    padding: 22px;
    min-width: 0;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}
.stat:hover { transform: translateY(-3px); box-shadow: var(--wu-shadow-hover); }
.stat span { color: var(--muted); font-size: 13px; font-weight: 600; }
.stat strong { display: block; margin-top: 8px; color: #172033; font-size: clamp(25px, 2vw, 32px); font-weight: 800; letter-spacing: -.8px; }
.stat:nth-child(2), .stat:nth-child(3), .stat:nth-child(4) { background: #fff; }
.welcome-banner { padding: 25px 28px; margin-bottom: 24px; }
.welcome-title { font-size: clamp(22px, 2vw, 29px); font-weight: 800; letter-spacing: -.7px; }

/* Tables */
.table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fff;
}
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
th {
    padding: 13px 15px;
    color: #69758c;
    background: #f7f9fc;
    border-bottom: 1px solid var(--line);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .55px;
    text-transform: uppercase;
    white-space: nowrap;
}
td { padding: 13px 15px; border-bottom: 1px solid #edf0f6; color: #354158; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
table tbody tr:hover { background: #f8faff; box-shadow: none; }
tr:hover td { color: #26334a; }

/* Inputs and buttons */
label { gap: 7px; color: #59657a; font-size: 12px; font-weight: 650; }
input, select, textarea {
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid #dce3ef;
    border-radius: 10px;
    background: #fff;
    color: #202b41;
    font-size: 14px;
    box-shadow: 0 1px 2px rgba(20,35,60,.025);
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
textarea { min-height: 110px; }
input:hover, select:hover, textarea:hover { border-color: #bdc9df; }
input:focus, select:focus, textarea:focus, button:focus-visible {
    outline: none;
    border-color: #6b8cff;
    box-shadow: 0 0 0 3px rgba(49,94,251,.13);
}
.btn, button.btn {
    min-height: 40px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: var(--brand);
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(49,94,251,.14);
    transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}
.btn:hover { background: var(--brand-dark); transform: translateY(-1px); box-shadow: 0 6px 14px rgba(49,94,251,.2); }
.btn:active { transform: translateY(0); }
.btn.ghost { background: #f4f6fb; border-color: #e2e7f0; color: #34415a; box-shadow: none; }
.btn.ghost:hover { background: #eaf0fb; }
.btn.ok { background: #138a62; box-shadow: 0 3px 8px rgba(19,138,98,.13); }
.btn.ok:hover { background: #0e7653; }
.btn.danger { background: #dc424b; }
.btn.small { min-height: 31px; padding: 6px 10px; border-radius: 8px; font-size: 12px; }
.toolbar { gap: 10px; }
.badge { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 999px; font-size: 11px; font-weight: 750; }
.msg { padding: 12px 14px; border-radius: 11px; }

/* Login / registration / forgot password */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 18px;
    background: radial-gradient(ellipse at 15% 10%, rgba(95,130,255,.13), transparent 38%),
                radial-gradient(ellipse at 90% 90%, rgba(105,154,255,.12), transparent 34%),
                #f4f7fc;
}
.login-box {
    width: min(100%, 440px);
    padding: 34px;
    border-radius: 22px;
    box-shadow: 0 24px 70px rgba(28,44,78,.12);
}
.login-box h1 { margin-bottom: 8px; color: #17233d; font-size: 26px; text-align: center; }
.login-box h2 { text-align: center; }
.login-box p { margin: 0 0 22px; color: #7b879b; text-align: center; font-size: 13px; }
.login-box label { margin: 0 0 14px; }
.login-box input, .login-box select { min-height: 46px; }
.login-box .btn { width: 100%; margin-top: 6px; }
.login-error { border-radius: 10px; }

/* Keep chat compact and readable */
.chat-message, .message-bubble, .chat-bubble { max-width: min(78%, 560px); padding: 9px 12px; border-radius: 13px; font-size: 13px; line-height: 1.45; }

/* Better focus and motion accessibility */
:focus-visible { outline: 3px solid rgba(49,94,251,.35); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Tablet and mobile: restore horizontal header + collapsible navigation */
@media (max-width: 1000px) {
    .topbar {
        position: sticky;
        inset: auto;
        width: 100%;
        height: auto;
        min-height: 64px;
        overflow: visible;
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px 16px;
        border-right: 0;
        box-shadow: 0 5px 20px rgba(17,27,49,.12);
    }
    .brand { padding: 8px 4px; margin-right: auto; font-size: 21px; }
    .menu-toggle {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        order: 2;
        width: 42px;
        height: 42px;
        padding: 0;
        border: 1px solid rgba(255,255,255,.15);
        border-radius: 10px;
        background: rgba(255,255,255,.07);
        color: #fff;
        font-size: 25px;
        cursor: pointer;
    }
    .nav {
        display: none;
        order: 5;
        flex: 0 0 100%;
        width: 100%;
        padding: 8px 0 2px;
        border-top: 1px solid rgba(255,255,255,.1);
    }
    .nav.mobile-open { display: flex; }
    .nav > a, .nav a { padding: 11px 13px; }
    .notification-box { display: none; }
    .mobile-notification { display: flex !important; }
    .mobile-account {
        display: flex !important;
        flex-direction: column;
        gap: 8px;
        order: 10;
        width: 100%;
        margin-top: 5px;
        padding: 12px;
        border: 1px solid rgba(255,255,255,.12);
        border-radius: 12px;
        background: rgba(255,255,255,.045);
    }
    .mobile-user-info { display: flex; flex-direction: column; gap: 3px; }
    .mobile-user-name { color: #fff; font-weight: 750; }
    .mobile-user-role { color: #b8c4da; font-size: 12px; }
    .mobile-logout { color: #ffb9bd !important; padding: 7px 0; }
    .who { display: none; }
    main { margin: 0; padding: 25px 20px 36px; }
}
@media (max-width: 640px) {
    main { padding: 20px 13px 28px; }
    h1 { font-size: 25px; margin-bottom: 17px; }
    h2 { font-size: 17px; }
    .panel { padding: 16px; border-radius: 13px; margin-bottom: 16px; }
    .stat { padding: 16px; border-radius: 13px; }
    .stat strong { font-size: 25px; }
    .welcome-banner { padding: 18px; border-radius: 14px; }
    .login-box { padding: 26px 19px; border-radius: 17px; }
    .login-box h1 { font-size: 23px; }
    .table-wrap { border-radius: 10px; }
    th, td { padding: 11px 12px; }
    .form { grid-template-columns: minmax(0, 1fr); }
    .btn { max-width: 100%; }
    .chat-message, .message-bubble, .chat-bubble { max-width: 88%; }
}


/* =========================================================
   WINGS UP — PREMIUM SIDEBAR FINISH
   Chỉ bổ sung giao diện; không thay đổi hành vi các chức năng.
========================================================= */
:root {
    --wu-ink: #17233b;
    --wu-sidebar: #111b31;
    --wu-sidebar-muted: #aebbd2;
    --wu-blue: #456cff;
    --wu-blue-soft: rgba(69, 108, 255, .15);
}

.topbar {
    background: linear-gradient(180deg, #111b31 0%, #14213b 100%);
}

.brand {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 5px 12px 24px;
    border-bottom: 1px solid rgba(255,255,255,.09);
    text-decoration: none;
}

.brand-name {
    display: block;
    font-size: 25px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.8px;
}

.brand-name b { color: #8ba6ff; }

.brand-subtitle {
    display: block;
    color: #8392ad;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.65px;
}

.sidebar-workspace-label {
    padding: 1px 12px 0;
    color: #7585a2;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.25px;
}

.nav {
    gap: 5px;
    padding-top: 0;
}

.nav > a {
    min-height: 43px;
    border: 1px solid transparent;
    border-radius: 11px;
}

.nav > a.active {
    border-color: rgba(130, 157, 255, .12);
    background: linear-gradient(105deg, rgba(69,108,255,.25), rgba(69,108,255,.09));
    box-shadow: inset 3px 0 #8ba6ff;
}

.notification-box {
    margin-top: auto;
}

.who {
    margin-top: 2px;
    border-color: rgba(255,255,255,.09);
    background: rgba(255,255,255,.035);
}

main {
    padding-top: 38px;
}

/* Small screens keep the original collapsible navigation behavior. */
@media (max-width: 1000px) {
    .topbar {
        background: linear-gradient(105deg, #111b31, #192949);
    }
    .brand {
        padding: 3px 4px;
        border: 0;
        gap: 3px;
    }
    .brand-name { font-size: 21px; }
    .brand-subtitle { font-size: 8px; letter-spacing: 1.1px; }
    .sidebar-workspace-label { display: none; }
    .nav { padding-top: 10px; }
    .nav:not(.mobile-open) { display: none; }
    .nav.mobile-open {
        display: flex;
        border-top: 1px solid rgba(255,255,255,.1);
    }
    .nav > a { min-height: 42px; }
    .mobile-account { margin-bottom: 8px; }
    main { padding-top: 25px; }
}

@media (max-width: 640px) {
    .brand-name { font-size: 19px; }
    .brand-subtitle { font-size: 7px; }
    main { padding-top: 20px; }
}


/* =====================================================================
   WINGS UP — PROFESSIONAL WORKSPACE REDESIGN
   Visual layer only: existing routes, API calls and permissions unchanged.
===================================================================== */
:root {
    --brand: #4169e1;
    --brand-dark: #2f54c7;
    --accent: #8da8ff;
    --ink: #17243b;
    --muted: #748097;
    --bg: #f4f6fb;
    --panel: #ffffff;
    --line: #e5eaf3;
    --wu-sidebar-width: 264px;
    --wu-card-shadow: 0 5px 24px rgba(22, 39, 71, .045);
    --wu-card-shadow-hover: 0 12px 30px rgba(22, 39, 71, .075);
}

html { background: var(--bg); }
body {
    background:
        radial-gradient(ellipse at 88% 0%, rgba(224, 232, 255, .34), transparent 30%),
        #f4f6fb;
    color: var(--ink);
    font-family: Inter, "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
    letter-spacing: -.08px;
}

/* Sidebar */
.topbar {
    width: var(--wu-sidebar-width);
    padding: 27px 15px 18px;
    gap: 17px;
    background: linear-gradient(160deg, #111c32 0%, #172746 100%);
    border-right: 1px solid rgba(255,255,255,.055);
    box-shadow: 9px 0 35px rgba(19, 31, 54, .045);
}
.brand {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 0 3px;
    padding: 4px 12px 24px 60px;
    border-bottom: 1px solid rgba(255,255,255,.085);
    font-size: 22px;
    letter-spacing: -.75px;
}
.brand::before {
    content: "W";
    position: absolute;
    left: 10px;
    top: 4px;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    color: #fff;
    font-size: 19px;
    font-weight: 850;
    letter-spacing: -1px;
    background: linear-gradient(145deg, #6c8cff, #3d5ed8);
    box-shadow: 0 6px 15px rgba(67, 100, 222, .28);
}
.brand-name { font-size: 23px; line-height: 1.12; font-weight: 800; }
.brand-name b { color: #91aaff; }
.brand-subtitle { font-size: 8px; letter-spacing: 1.15px; color: #8998b4; font-weight: 750; }
.sidebar-workspace-label {
    padding: 1px 12px 0;
    color: #71819f;
    font-size: 9px;
    letter-spacing: 1.45px;
    font-weight: 800;
}
.nav { gap: 5px; padding: 0 2px; }
.nav > a, .nav a {
    min-height: 44px;
    padding: 11px 13px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #aebbd2;
    font-size: 13px;
    font-weight: 620;
    letter-spacing: 0;
    gap: 10px;
    transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}
.nav a:hover {
    color: #fff;
    background: rgba(255,255,255,.055);
    border-color: rgba(255,255,255,.035);
    transform: translateX(1px);
}
.nav a.active {
    color: #fff;
    background: linear-gradient(100deg, rgba(83, 117, 239, .28), rgba(83, 117, 239, .12));
    border-color: rgba(137, 160, 255, .13);
    box-shadow: inset 3px 0 #86a0ff;
    font-weight: 720;
}
.nav a.active::after { display: none !important; }
.notification-box {
    margin: auto 2px 0;
    padding: 12px 0 0;
    border-top: 1px solid rgba(255,255,255,.085);
}
.notification-box a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    color: #b7c3d8;
    font-size: 13px;
    font-weight: 600;
}
.notification-box a:hover { background: rgba(255,255,255,.06); color: #fff; }
#notificationBadge, #notificationBadgeMobile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    min-height: 18px;
    padding: 0 5px;
    margin-left: auto;
    border-radius: 999px;
    background: #e25a66;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
}
.who {
    gap: 11px;
    padding: 13px 12px;
    border: 1px solid rgba(255,255,255,.085);
    border-radius: 13px;
    background: rgba(255,255,255,.045);
}
.user-name { font-size: 12px; line-height: 1.4; }
.user-role { color: #92a2bd; font-size: 10px; }
.who .logout-link { text-align: center; font-size: 11px; font-weight: 700; border: 1px solid rgba(255,112,121,.1); }

/* Main workspace topbar */
.workspace-topbar {
    position: fixed;
    z-index: 9000;
    top: 0;
    right: 0;
    left: var(--wu-sidebar-width);
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 0 clamp(24px, 3.3vw, 48px);
    border-bottom: 1px solid rgba(226, 232, 243, .9);
    background: rgba(255,255,255,.91);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
.workspace-context { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.workspace-eyebrow {
    color: #929db1;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.4px;
}
.workspace-context > strong { color: #1d2b45; font-size: 17px; font-weight: 780; letter-spacing: -.35px; }
.workspace-topbar-right { display: flex; align-items: center; gap: 12px; }
.workspace-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border: 1px solid #e2eee8;
    border-radius: 999px;
    background: #f6fbf8;
    color: #4e8068;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}
.workspace-status i { width: 6px; height: 6px; border-radius: 50%; background: #35ad78; box-shadow: 0 0 0 3px rgba(53,173,120,.12); }
.workspace-avatar {
    display: grid;
    place-items: center;
    width: 37px;
    height: 37px;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(145deg, #7896ff, #4666db);
    box-shadow: 0 4px 10px rgba(70,102,219,.18);
    font-size: 14px;
    font-weight: 800;
}
.workspace-user { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.workspace-user strong { max-width: 210px; overflow: hidden; color: #26344c; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.workspace-user small { color: #8792a6; font-size: 10px; }

/* Content and hierarchy */
main {
    margin-left: var(--wu-sidebar-width);
    padding: 105px clamp(24px, 3.3vw, 48px) 48px;
}
#content { width: 100%; max-width: 1500px; margin: 0 auto; }
h1 { color: #182641; font-size: clamp(25px, 2vw, 31px); font-weight: 800; letter-spacing: -.9px; line-height: 1.2; margin: 0 0 23px; }
h2 { color: #25344e; font-size: 16px; font-weight: 760; letter-spacing: -.2px; margin: 0 0 15px; }
.panel, .stat, .welcome-banner, .login-box {
    border: 1px solid #e7ebf3;
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--wu-card-shadow);
}
.panel { padding: 23px; margin-bottom: 21px; }
.panel:hover { border-color: #e0e6f1; box-shadow: var(--wu-card-shadow-hover); }
.grid { gap: 16px; margin-bottom: 22px; }
.stat {
    position: relative;
    min-height: 126px;
    overflow: hidden;
    padding: 21px 22px;
    transition: transform .18s ease, box-shadow .18s ease;
}
.stat::after {
    content: "";
    position: absolute;
    top: -27px;
    right: -25px;
    width: 85px;
    height: 85px;
    border-radius: 50%;
    background: rgba(76, 111, 231, .055);
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--wu-card-shadow-hover); }
.stat span { position: relative; z-index: 1; color: #7d899e; font-size: 12px; font-weight: 650; }
.stat strong { position: relative; z-index: 1; margin-top: 13px; color: #1b2b48; font-size: clamp(27px, 2.1vw, 34px); font-weight: 820; letter-spacing: -1px; }
.stat.alert { border-color: #f3e1df; background: linear-gradient(135deg, #fff 50%, #fffafa); }
.stat.alert strong { color: #d44c56; }
.welcome-banner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 18px;
    overflow: hidden;
    margin-bottom: 23px;
    padding: 25px 28px;
    background: linear-gradient(112deg, #fff 0%, #fff 62%, #f3f6ff 100%);
}
.welcome-banner::after {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    top: -105px;
    right: -35px;
    border: 28px solid rgba(86, 119, 230, .055);
    border-radius: 50%;
    pointer-events: none;
}
.welcome-icon { display: grid; place-items: center; flex: 0 0 52px; width: 52px; height: 52px; border-radius: 15px; background: #edf2ff; font-size: 25px; }
.welcome-title { color: #1b2a46; font-size: clamp(21px, 1.8vw, 27px); font-weight: 820; letter-spacing: -.7px; }
.welcome-name { color: #4169d9; }
.welcome-subtitle { margin-top: 5px; color: #7a879c; font-size: 12px; }

/* Tables: calm, readable, enterprise style */
.table-wrap { overflow-x: auto; border: 1px solid #e6ebf3; border-radius: 12px; background: #fff; }
table { border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
th { padding: 13px 15px; background: #f7f9fc; color: #7b879b; border-bottom: 1px solid #e7ecf4; font-size: 10px; font-weight: 800; letter-spacing: .65px; text-transform: uppercase; }
td { padding: 13px 15px; color: #3c4960; border-bottom: 1px solid #eef1f6; }
tbody tr { transition: background .15s ease; }
tbody tr:hover { background: #f8faff; }
tbody tr:last-child td { border-bottom: 0; }
.num { font-variant-numeric: tabular-nums; }
.empty { padding: 24px 16px; color: #8a95a8; text-align: center; font-size: 13px; }

/* Forms, filters, buttons */
.form { gap: 15px; }
label { gap: 7px; color: #596780; font-size: 11px; font-weight: 720; }
input, select, textarea {
    min-width: 0;
    min-height: 43px;
    padding: 10px 12px;
    border: 1px solid #dfe5ef;
    border-radius: 10px;
    background: #fff;
    color: #263650;
    font-size: 13px;
    box-shadow: 0 1px 2px rgba(24,39,66,.02);
}
textarea { min-height: 100px; }
input::placeholder, textarea::placeholder { color: #a4adbd; }
input:focus, select:focus, textarea:focus { border-color: #7d99ff; box-shadow: 0 0 0 3px rgba(74,107,226,.12); outline: none; }
.toolbar { align-items: center; gap: 10px; margin-bottom: 15px; }
.toolbar input { min-width: 180px; }
.btn, button.btn {
    min-height: 39px;
    padding: 9px 15px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: linear-gradient(135deg, #4d70e8, #3b5fd2);
    color: #fff;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .05px;
    box-shadow: 0 4px 10px rgba(58,91,207,.13);
}
.btn:hover { background: linear-gradient(135deg, #4264d7, #304fbc); box-shadow: 0 6px 15px rgba(58,91,207,.18); transform: translateY(-1px); }
.btn.ghost { border-color: #e1e7f1; background: #fff; color: #53617a; box-shadow: none; }
.btn.ghost:hover { background: #f6f8fc; border-color: #d3dced; }
.btn.ok { background: linear-gradient(135deg, #1c9a70, #12805c); box-shadow: 0 4px 10px rgba(18,128,92,.12); }
.btn.danger { background: linear-gradient(135deg, #e45a63, #cf3e4a); }
.btn.small { min-height: 30px; padding: 5px 9px; font-size: 11px; border-radius: 8px; }
.actions { gap: 7px; }
.badge { padding: 5px 9px; border-radius: 7px; font-size: 10px; font-weight: 800; letter-spacing: .1px; }
.badge.PENDING { color: #95651c; background: #fff5df; }
.badge.APPROVED, .badge.IN { color: #167b59; background: #e7f7ef; }
.badge.REJECTED { color: #b93845; background: #fff0f0; }
.badge.OUT { color: #355cc7; background: #edf2ff; }
.msg { padding: 12px 14px; border-radius: 11px; font-size: 12px; }

/* Login, register, recovery */
.login-page {
    position: relative;
    min-height: 100vh;
    padding: 32px 18px;
    background: radial-gradient(ellipse at 18% 15%, rgba(95,126,245,.13), transparent 34%),
                radial-gradient(ellipse at 85% 86%, rgba(93,143,245,.12), transparent 34%),
                #f4f6fb;
}
.login-box {
    position: relative;
    width: min(100%, 430px);
    padding: 39px 37px 34px;
    border: 1px solid rgba(225,231,243,.95);
    border-radius: 22px;
    box-shadow: 0 24px 65px rgba(24,39,72,.12);
}
.login-box::before {
    content: "W";
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin: 0 auto 19px;
    border-radius: 15px;
    background: linear-gradient(145deg, #6f8fff, #3e5fd7);
    box-shadow: 0 8px 18px rgba(65,100,221,.22);
    color: white;
    font-size: 23px;
    font-weight: 850;
}
.login-box h1 { color: #1a2945; font-size: 23px; letter-spacing: -.55px; }
.login-box p { color: #7d899d; font-size: 12px; }
.login-box label { display: grid; margin-bottom: 14px; }
.login-box input { min-height: 46px; }
.login-box .btn { min-height: 45px; border-radius: 11px; }
.login-box a { color: #4166d4 !important; font-weight: 650; }
.login-error { padding: 11px 13px; border-radius: 10px; font-size: 12px; }

/* Special request chat and message panels */
.special-request-panel, .special-chat-panel, .special-new-panel { border-radius: 15px; }
.special-header, .special-chat-header { border-color: #e8edf5; }
.special-message-bubble { max-width: min(78%, 540px); border-radius: 13px; font-size: 12px; line-height: 1.5; }
.special-message-time { font-size: 9px; color: #8c97aa; }
.special-chat-input { gap: 8px; }

/* Tablet and phone */
@media (max-width: 1000px) {
    :root { --wu-sidebar-width: 0px; }
    .topbar {
        position: sticky;
        inset: auto;
        width: 100%;
        height: auto;
        min-height: 66px;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        padding: 10px 17px;
        overflow: visible;
        border-radius: 0;
        border-right: 0;
        border-bottom: 1px solid rgba(255,255,255,.06);
        box-shadow: 0 6px 22px rgba(18,29,50,.12);
    }
    .brand { padding: 5px 4px 5px 49px; margin: 0 auto 0 0; border: 0; }
    .brand::before { left: 0; top: 4px; width: 36px; height: 36px; border-radius: 11px; }
    .brand-name { font-size: 20px; }
    .brand-subtitle { font-size: 7px; letter-spacing: 1px; }
    .sidebar-workspace-label { display: none; }
    .menu-toggle { display: inline-flex !important; order: 2; width: 41px; height: 41px; border: 1px solid rgba(255,255,255,.14); border-radius: 11px; background: rgba(255,255,255,.075); color: #fff; }
    .nav { display: none; order: 5; flex: 0 0 100%; width: 100%; padding: 10px 0 0; border-top: 1px solid rgba(255,255,255,.1); }
    .nav.mobile-open { display: flex; }
    .nav > a, .nav a { min-height: 42px; padding: 10px 12px; }
    .notification-box, .who { display: none; }
    .mobile-notification { display: flex !important; }
    .mobile-account { display: flex !important; flex-direction: column; gap: 8px; order: 10; width: 100%; margin-top: 6px; padding: 13px; border: 1px solid rgba(255,255,255,.1); border-radius: 12px; background: rgba(255,255,255,.045); }
    .mobile-user-name { color: #fff; font-size: 12px; font-weight: 750; }
    .mobile-user-role { color: #9baac4; font-size: 10px; }
    .mobile-logout { color: #ffb9bd !important; padding: 7px 0; font-size: 12px; }
    .workspace-topbar { display: none; }
    main { margin: 0; padding: 28px 24px 40px; }
}
@media (max-width: 640px) {
    main { padding: 22px 14px 30px; }
    h1 { font-size: 25px; margin-bottom: 18px; }
    .panel { padding: 16px; border-radius: 13px; margin-bottom: 15px; }
    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .stat { min-height: 108px; padding: 15px 14px; border-radius: 13px; }
    .stat strong { margin-top: 9px; font-size: 24px; }
    .stat span { font-size: 10px; }
    .welcome-banner { align-items: flex-start; gap: 12px; padding: 17px; border-radius: 14px; }
    .welcome-icon { flex-basis: 42px; width: 42px; height: 42px; border-radius: 12px; font-size: 21px; }
    .welcome-title { font-size: 20px; }
    .welcome-subtitle { font-size: 11px; }
    .table-wrap { border-radius: 10px; }
    th, td { padding: 11px 12px; }
    .form { grid-template-columns: minmax(0, 1fr); }
    .toolbar { align-items: stretch; }
    .toolbar input { min-width: 100%; }
    .btn { max-width: 100%; }
    .login-box { padding: 30px 21px 25px; border-radius: 18px; }
    .special-message-bubble { max-width: 88%; }
}
@media (max-width: 380px) {
    .grid { grid-template-columns: minmax(0, 1fr); }
    .topbar { padding: 9px 12px; }
    .brand-name { font-size: 19px; }
    main { padding: 18px 11px 26px; }
    .login-box { padding: 27px 17px 22px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* FIX: keep the dashboard welcome section below the fixed workspace header */
@media (min-width: 1001px) {
    .workspace-topbar {
        height: 76px;
    }

    main#content {
        padding-top: 132px !important;
        min-width: 0;
    }
}

@media (max-width: 1000px) {
    main#content {
        padding-top: 28px !important;
    }
}

@media (max-width: 640px) {
    main#content {
        padding-top: 22px !important;
    }
}


/* =========================================================
   WINGS UP — POLISH YÊU CẦU ĐẶC BIỆT + CĂN LẠI BỘ LỌC NGÀY
   ========================================================= */
.tx-date-filter {
    justify-content: flex-start !important;
    align-items: end;
    width: 100%;
    margin: 16px 0 20px !important;
    padding: 0;
    box-sizing: border-box;
}
.tx-date-filter label {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    min-width: 150px;
    color: #56647b;
    font-size: 12px;
    font-weight: 700;
}
.tx-date-filter input[type="date"] {
    width: 170px !important;
    min-height: 40px;
}
.tx-date-filter > .btn {
    min-height: 40px !important;
    white-space: nowrap;
}

.special-page {
    width: 100%;
    max-width: 1480px;
    margin: 0 auto;
    color: #1e293b;
}
.special-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 22px;
    padding: 0 0 18px;
    border-bottom: 1px solid #e6ebf3;
}
.special-header h1 {
    margin: 0 0 5px;
    color: #172b4d;
    font-size: clamp(23px, 2vw, 30px);
    font-weight: 800;
    letter-spacing: -.65px;
}
.special-header p {
    margin: 0;
    color: #78869c;
    font-size: 13px;
}
.special-chat-layout {
    display: grid;
    grid-template-columns: minmax(270px, 340px) minmax(0, 1fr);
    align-items: stretch;
    gap: 20px;
    width: 100%;
    min-width: 0;
}
.special-request-panel,
.special-chat-panel,
.special-new-panel {
    min-width: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e5eaf2;
    border-radius: 17px !important;
    box-shadow: 0 8px 26px rgba(29, 48, 82, .055);
}
.special-request-panel {
    display: flex;
    flex-direction: column;
    min-height: 560px;
}
.special-panel-title {
    padding: 19px 20px 15px;
    color: #233755;
    font-size: 14px;
    font-weight: 800;
    border-bottom: 1px solid #edf0f6;
}
.special-search-box {
    padding: 13px 14px;
    border-bottom: 1px solid #edf0f6;
}
.special-search-box input {
    width: 100%;
    min-height: 40px;
    border-radius: 10px;
    background: #f8faff;
}
.special-request-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 10px;
    overflow-y: auto;
    min-height: 0;
    max-height: 690px;
}
.special-request-item {
    display: block;
    width: 100%;
    padding: 14px 13px;
    text-align: left;
    color: #283850;
    background: #fff;
    border: 1px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease;
}
.special-request-item:hover {
    background: #f7f9ff;
    border-color: #e4eaff;
}
.special-request-item.active {
    background: #eef3ff;
    border-color: #cbd8ff;
    box-shadow: inset 3px 0 0 #4166d8;
}
.special-request-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}
.special-request-top strong {
    min-width: 0;
    overflow-wrap: anywhere;
    color: #263957;
    font-size: 12px;
    line-height: 1.45;
}
.special-status {
    flex: 0 0 auto;
    padding: 4px 7px;
    border-radius: 999px;
    color: #16784f;
    background: #e8f8ef;
    font-size: 9px;
    font-weight: 800;
}
.special-status.CLOSED {
    color: #68758a;
    background: #eef1f6;
}
.special-request-user {
    margin-top: 9px;
    color: #6f7e95;
    font-size: 11px;
}
.special-request-time {
    margin-top: 5px;
    color: #9aa5b6;
    font-size: 10px;
}
.special-empty,
.special-chat-empty {
    padding: 35px 18px;
    color: #8b97aa;
    font-size: 12px;
    text-align: center;
}
.special-chat-panel {
    display: flex;
    flex-direction: column;
    min-height: 560px;
    max-height: 780px;
}
.special-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 17px 20px;
    background: linear-gradient(180deg, #fff, #fbfcff);
    border-bottom: 1px solid #e9edf4;
}
.special-chat-header > div:first-child {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}
.special-chat-header strong {
    color: #243957;
    font-size: 14px;
    overflow-wrap: anywhere;
}
.special-chat-header small {
    color: #7c8aa0;
    font-size: 11px;
}
.special-chat-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 7px;
    flex: 0 0 auto;
}
.special-chat-actions .btn {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 10px;
}
/* Nút xóa chat đứng yên, không nhấc lên/thu nhỏ khi rê chuột hoặc bấm. */
.special-delete-button,
.special-delete-button:hover,
.special-delete-button:focus,
.special-delete-button:active {
    transform: none !important;
    animation: none !important;
    transition: background-color .12s ease, color .12s ease, border-color .12s ease !important;
}
.special-delete-button::before,
.special-delete-button::after {
    animation: none !important;
    transition: none !important;
}
.special-chat-messages {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 14px;
    min-height: 280px;
    padding: 22px;
    overflow-y: auto;
    background: #f7f9fd;
    scroll-behavior: smooth;
}
.special-message {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 82%;
    min-width: 0;
}
.special-message.mine {
    align-self: flex-end;
    align-items: flex-end;
}
.special-message-name {
    margin: 0 5px 5px;
    color: #77859b;
    font-size: 10px;
    font-weight: 700;
}
.special-message-bubble {
    max-width: 100% !important;
    padding: 10px 13px;
    color: #34445e;
    background: #fff;
    border: 1px solid #e7ebf3;
    border-radius: 5px 14px 14px 14px;
    box-shadow: 0 2px 6px rgba(31, 48, 79, .035);
    font-size: 12px !important;
    line-height: 1.55 !important;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}
.special-message.mine .special-message-bubble {
    color: #fff;
    background: linear-gradient(135deg, #4169df, #3154c2);
    border-color: transparent;
    border-radius: 14px 5px 14px 14px;
}
.special-message-time {
    margin: 5px 4px 0;
    color: #9aa5b6;
    font-size: 9px !important;
}
.special-chat-input {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 14px 16px;
    background: #fff;
    border-top: 1px solid #e8edf4;
}
.special-chat-input textarea {
    flex: 1 1 auto;
    width: 0;
    min-width: 0;
    min-height: 44px;
    max-height: 130px;
    resize: vertical;
    border-radius: 11px;
    background: #f9faff;
}
.special-chat-input .btn {
    flex: 0 0 auto;
    min-height: 43px;
    white-space: nowrap;
}
.special-chat-closed {
    padding: 15px 18px;
    color: #758198;
    background: #f7f8fb;
    border-top: 1px solid #e8edf4;
    font-size: 12px;
    text-align: center;
}
.special-new-panel {
    max-width: 900px;
    margin: 0 auto;
    padding: 26px;
}
.special-new-panel h2 {
    margin: 0 0 22px;
    color: #233755;
    font-size: 18px;
}
.special-new-panel .form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 17px;
}
.special-new-panel textarea {
    width: 100%;
    min-height: 150px;
    resize: vertical;
}

@media (max-width: 1050px) {
    .special-chat-layout {
        grid-template-columns: minmax(230px, 290px) minmax(0, 1fr);
        gap: 13px;
    }
    .special-chat-header { padding: 14px; }
    .special-chat-messages { padding: 16px; }
}
@media (max-width: 760px) {
    .special-header { align-items: flex-start; }
    .special-chat-layout { grid-template-columns: minmax(0, 1fr); }
    .special-request-panel { min-height: 0; }
    .special-request-list { max-height: 300px; }
    .special-chat-panel { min-height: 480px; max-height: 72vh; }
    .special-chat-header { align-items: flex-start; flex-direction: column; }
    .special-chat-actions { justify-content: flex-start; }
    .special-message { max-width: 92%; }
    .special-chat-messages { min-height: 250px; padding: 14px; }
    .special-new-panel { padding: 19px; }
}
@media (max-width: 480px) {
    .tx-date-filter { justify-content: flex-start !important; gap: 8px; padding: 0; }
    .tx-date-filter label { flex: 1 1 calc(50% - 8px); min-width: 130px; }
    .tx-date-filter input[type="date"] { width: 100% !important; }
    .tx-date-filter > .btn { flex: 1 1 calc(50% - 8px); }
    .special-header { flex-direction: column; align-items: stretch; }
    .special-header > .btn { align-self: flex-start; }
    .special-chat-input { padding: 10px; }
    .special-chat-input .btn { padding: 8px 10px; }
}

/* FIX: center content in the workspace area beside the sidebar */
@media (min-width: 1001px) {
    main#content {
        width: calc(100% - var(--wu-sidebar-width)) !important;
        margin-left: var(--wu-sidebar-width) !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }
    .special-page {
        width: 100% !important;
        max-width: 1480px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

/* Keep the delete-chat button visible without hovering */
.special-chat-actions,
.special-chat-actions .special-delete-button {
    opacity: 1 !important;
    visibility: visible !important;
    display: inline-flex !important;
    pointer-events: auto !important;
}
.special-chat-actions .special-delete-button {
    position: static !important;
    transform: none !important;
    animation: none !important;
}

/* Final adjustment: notification shows a red number only, without a red circle. */
#notificationBadge,
#notificationBadgeMobile {
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #ff6878 !important;
    box-shadow: none !important;
    animation: none !important;
}

.notification-badge {
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    animation: none !important;
}

/* Restore a normal, subtle hover-lift effect on the delete-chat button. */
.special-chat-actions .special-delete-button {
    transition: transform .18s ease, background-color .18s ease,
                color .18s ease, border-color .18s ease, box-shadow .18s ease !important;
    animation: none !important;
}
.special-chat-actions .special-delete-button:hover {
    transform: translateY(-2px) !important;
}
.special-chat-actions .special-delete-button:active {
    transform: translateY(0) !important;
}

/* Apply the same subtle hover-lift to all delete/danger action buttons, not only chat delete. */
.btn.danger,
button.danger,
.danger.btn {
    transition: transform .18s ease, background-color .18s ease,
                color .18s ease, border-color .18s ease, box-shadow .18s ease !important;
    animation: none !important;
}
.btn.danger:hover,
button.danger:hover,
.danger.btn:hover {
    transform: translateY(-2px) !important;
}
.btn.danger:active,
button.danger:active,
.danger.btn:active {
    transform: translateY(0) !important;
}

/* FIX: delete actions use a light, normal button with visible red "Xóa" text,
   not a solid red filled button. Applies consistently across all pages. */
button.danger,
.btn.danger,
.danger.btn,
button[class~="danger"] {
    background: #fff !important;
    background-image: none !important;
    color: #c93c3c !important;
    border: 1px solid #e7b5b8 !important;
    box-shadow: none !important;
    opacity: 1 !important;
    text-indent: 0 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
}
button.danger:hover,
.btn.danger:hover,
.danger.btn:hover,
button[class~="danger"]:hover {
    background: #fff1f1 !important;
    background-image: none !important;
    color: #b4232d !important;
    border-color: #d9777e !important;
    box-shadow: 0 3px 8px rgba(201, 60, 60, .10) !important;
    transform: translateY(-2px) !important;
}
button.danger:active,
.btn.danger:active,
.danger.btn:active,
button[class~="danger"]:active {
    transform: translateY(0) !important;
}

/* ================= USER HOME: dashboard riêng cho USER ================= */
.user-home { max-width: 1440px; margin: 0 auto; color: #172b4d; }
.user-home-hero { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 24px; overflow: hidden; min-height: 228px; padding: 32px 38px; margin: 0 0 28px; border: 1px solid #dce8ff; border-radius: 22px; background: linear-gradient(112deg,#f6f9ff 0%,#edf4ff 57%,#e3eeff 100%); box-shadow: 0 10px 28px rgba(36,87,166,.07); }
.user-home-hero::before { content: ""; position: absolute; width: 280px; height: 280px; right: 8%; top: -170px; border: 1px solid rgba(57,111,211,.12); border-radius: 50%; }
.user-home-hero-copy { position: relative; z-index: 1; max-width: 720px; }
.user-home-eyebrow,.user-home-kicker { display: block; color: #4775cb; font-size: 10px; font-weight: 800; letter-spacing: 1.5px; }
.user-home-hero h1 { margin: 10px 0 9px; color: #152b4d; font-size: clamp(25px,3vw,35px); line-height: 1.2; font-weight: 850; letter-spacing: -.8px; }
.user-home-hero h1 span { font-size: .82em; }
.user-home-hero p { max-width: 600px; margin: 0; color: #63738e; font-size: 14px; line-height: 1.7; }
.user-home-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 22px; }
.user-home-primary,.user-home-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 17px; border-radius: 10px; font-size: 12px; font-weight: 750; text-decoration: none; transition: transform .18s ease,box-shadow .18s ease,background .18s ease; }
.user-home-primary { color: #fff; background: linear-gradient(135deg,#2f6de0,#2454c6); box-shadow: 0 6px 14px rgba(37,84,198,.2); }
.user-home-secondary { color: #2856b8; background: rgba(255,255,255,.78); border: 1px solid #d5e2fa; }
.user-home-primary:hover,.user-home-secondary:hover { transform: translateY(-2px); }
.user-home-hero-art { position: relative; display: grid; place-items: center; flex: 0 0 185px; height: 160px; }
.user-home-art-box { display: grid; place-items: center; width: 118px; height: 118px; border: 1px solid rgba(255,255,255,.95); border-radius: 30px; background: linear-gradient(145deg,#fff,#e7efff); box-shadow: 0 15px 35px rgba(48,94,174,.16); font-size: 58px; transform: rotate(5deg); }
.user-home-art-dot { position: absolute; display: block; border-radius: 50%; background: #6fa0ff; box-shadow: 0 0 0 7px rgba(111,160,255,.13); }
.user-home-art-dot.dot-one { width: 10px; height: 10px; right: 22px; top: 20px; }
.user-home-art-dot.dot-two { width: 7px; height: 7px; left: 18px; bottom: 19px; background: #8acbdc; }
.user-home-section-heading { display: flex; justify-content: space-between; align-items: end; gap: 14px; margin: 0 0 15px; }
.user-home-section-heading h2,.user-home-card-heading h2 { margin: 5px 0 0; color: #1b2c49; font-size: 19px; font-weight: 800; letter-spacing: -.35px; }
.user-home-live { display: inline-flex; align-items: center; gap: 7px; color: #7a8aa2; font-size: 11px; }
.user-home-live i { width: 7px; height: 7px; border-radius: 50%; background: #28b887; }
.user-home-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin-bottom: 25px; }
.user-home-stat { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding: 20px; border: 1px solid #e5ebf4; border-radius: 16px; background: #fff; box-shadow: 0 5px 18px rgba(28,53,91,.035); text-decoration: none; transition: transform .18s ease,border-color .18s ease,box-shadow .18s ease; }
.user-home-stat:hover { transform: translateY(-3px); border-color: #cbdcff; box-shadow: 0 12px 24px rgba(28,72,145,.08); }
.user-home-stat-icon,.user-home-shortcut-icon { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; border-radius: 12px; font-size: 18px; }
.user-home-stat-icon.blue,.user-home-shortcut-icon.blue { color: #2e67d4; background: #edf3ff; }
.user-home-stat-icon.cyan,.user-home-shortcut-icon.cyan { color: #168da5; background: #e8f9fc; }
.user-home-stat-icon.violet,.user-home-shortcut-icon.violet { color: #7554c8; background: #f1edff; }
.user-home-stat-icon.amber,.user-home-shortcut-icon.amber { color: #bd8427; background: #fff5df; }
.user-home-stat-label { margin-top: 14px; color: #687992; font-size: 12px; font-weight: 650; }
.user-home-stat strong { margin-top: 5px; color: #172b4d; font-size: 30px; line-height: 1.2; font-weight: 850; letter-spacing: -.8px; }
.user-home-stat small { margin-top: 8px; color: #98a4b6; font-size: 10px; line-height: 1.5; }
.user-home-lower { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(300px,.85fr); gap: 18px; align-items: stretch; }
.user-home-card { min-width: 0; padding: 22px; border: 1px solid #e5ebf4; border-radius: 17px; background: #fff; box-shadow: 0 5px 18px rgba(28,53,91,.035); }
.user-home-card-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 17px; border-bottom: 1px solid #edf1f7; }
.user-home-card-heading h2 { font-size: 17px; }
.user-home-card-heading > a { flex-shrink: 0; color: #3267cb; font-size: 11px; font-weight: 750; text-decoration: none; }
.user-home-recent-list { display: flex; flex-direction: column; }
.user-home-transaction-row { display: flex; align-items: center; gap: 12px; padding: 15px 0; border-bottom: 1px solid #f0f3f8; }
.user-home-transaction-row:last-child { border-bottom: 0; }
.user-home-tx-icon { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; border-radius: 11px; background: #f0f5ff; font-size: 17px; }
.user-home-tx-main { display: flex; flex: 1; flex-direction: column; min-width: 0; gap: 5px; }
.user-home-tx-main strong { overflow: hidden; color: #2c3e5b; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.user-home-tx-main small { color: #8b98ab; font-size: 10px; }
.user-home-status { flex-shrink: 0; padding: 5px 8px; border-radius: 7px; color: #a87518; background: #fff5df; font-size: 10px; font-weight: 750; }
.user-home-status.approved { color: #18835e; background: #e8f8f1; }
.user-home-status.rejected { color: #bd4149; background: #fff0f0; }
.user-home-empty { display: flex; flex-direction: column; align-items: center; padding: 32px 12px 22px; text-align: center; }
.user-home-empty > span { font-size: 30px; }
.user-home-empty strong { margin-top: 10px; color: #30415e; font-size: 13px; }
.user-home-empty p { margin: 6px 0 13px; color: #8a98ac; font-size: 11px; }
.user-home-empty a { color: #3267cb; font-size: 11px; font-weight: 750; text-decoration: none; }
.user-home-shortcut { display: flex; align-items: center; gap: 12px; padding: 15px 0; border-bottom: 1px solid #f0f3f8; text-decoration: none; }
.user-home-shortcut:last-child { border-bottom: 0; padding-bottom: 0; }
.user-home-shortcut-icon { flex-basis: 37px; width: 37px; height: 37px; font-size: 16px; }
.user-home-shortcut > span:nth-child(2) { display: flex; flex: 1; flex-direction: column; gap: 4px; min-width: 0; }
.user-home-shortcut strong { color: #30415e; font-size: 12px; }
.user-home-shortcut small { color: #8a98ac; font-size: 10px; }
.user-home-shortcut > b { color: #8ea0bb; font-size: 16px; transition: transform .18s ease; }
.user-home-shortcut:hover > b { transform: translateX(3px); color: #3267cb; }
@media (max-width: 1100px) { .user-home-stats { grid-template-columns: repeat(2,minmax(0,1fr)); } .user-home-lower { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .user-home-hero { min-height: 0; padding: 23px 20px; border-radius: 16px; } .user-home-hero-art { display: none; } .user-home-hero h1 { font-size: 25px; } .user-home-hero p { font-size: 12px; } .user-home-actions { gap: 8px; } .user-home-primary,.user-home-secondary { min-height: 39px; padding: 0 12px; font-size: 11px; } .user-home-section-heading { align-items: flex-start; } .user-home-live { margin-top: 3px; font-size: 9px; } .user-home-stats { gap: 10px; } .user-home-stat { padding: 14px; border-radius: 13px; } .user-home-stat strong { font-size: 25px; } .user-home-stat-label { font-size: 11px; } .user-home-stat small { font-size: 9px; } .user-home-card { padding: 16px; border-radius: 14px; } .user-home-transaction-row { gap: 8px; } .user-home-status { padding: 4px 6px; font-size: 9px; } }

/* ================= ADMIN HOME: modern blue-white dashboard ================= */
.admin-home { max-width: 1480px; margin: 0 auto; color: #182b49; }
.admin-home .welcome-banner {
    position: relative; display: flex; align-items: center; gap: 20px; overflow: hidden;
    min-height: 168px; padding: 30px 34px; margin: 0 0 27px;
    border: 1px solid #dce8ff; border-radius: 20px;
    background: linear-gradient(112deg,#f7faff 0%,#edf4ff 58%,#e3edff 100%);
    box-shadow: 0 10px 28px rgba(36,87,166,.065);
}
.admin-home .welcome-banner::after { content: ""; position: absolute; width: 260px; height: 260px; right: 6%; top: -160px; border: 1px solid rgba(57,111,211,.13); border-radius: 50%; box-shadow: 0 0 0 28px rgba(255,255,255,.18),0 0 0 58px rgba(255,255,255,.13); pointer-events: none; }
.admin-home .welcome-icon { z-index: 1; display: grid; place-items: center; flex: 0 0 58px; width: 58px; height: 58px; border: 1px solid #fff; border-radius: 17px; background: linear-gradient(145deg,#fff,#e7efff); box-shadow: 0 8px 20px rgba(48,94,174,.12); font-size: 28px; }
.admin-home .welcome-content { position: relative; z-index: 1; min-width: 0; }
.admin-home .welcome-title { color: #4775cb; font-size: 10px; font-weight: 850; letter-spacing: 1.7px; text-transform: uppercase; }
.admin-home .welcome-name { margin-top: 7px; color: #172d50; font-size: clamp(24px,2.8vw,34px); line-height: 1.2; font-weight: 850; letter-spacing: -.8px; }
.admin-home .welcome-subtitle { margin-top: 9px; color: #657692; font-size: 13px; line-height: 1.6; }
.admin-home > h1 { display: flex; align-items: center; gap: 10px; margin: 0 0 17px; color: #1b2d4a; font-size: 22px; font-weight: 850; letter-spacing: -.45px; }
.admin-home > h1::before { content: ""; width: 4px; height: 23px; border-radius: 5px; background: linear-gradient(#4382f5,#2454c6); }
.admin-home .grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin-bottom: 25px; }
.admin-home .stat { position: relative; overflow: hidden; min-height: 128px; padding: 21px 21px 18px; border: 1px solid #e4ebf5; border-radius: 16px; background: #fff; box-shadow: 0 5px 18px rgba(28,53,91,.035); transition: transform .18s ease,border-color .18s ease,box-shadow .18s ease; }
.admin-home .stat::after { content: ""; position: absolute; right: -23px; top: -27px; width: 86px; height: 86px; border-radius: 50%; background: #eff5ff; }
.admin-home .stat:nth-child(2)::after { background: #eaf9fc; }
.admin-home .stat:nth-child(3)::after { background: #fff4e7; }
.admin-home .stat:nth-child(4)::after { background: #f2edff; }
.admin-home .stat:hover { transform: translateY(-3px); border-color: #cbdcff; box-shadow: 0 12px 24px rgba(28,72,145,.08); }
.admin-home .stat span { position: relative; z-index: 1; display: block; color: #71819a; font-size: 12px; font-weight: 700; }
.admin-home .stat strong { position: relative; z-index: 1; display: block; margin-top: 14px; color: #172b4d; font-size: clamp(27px,2.2vw,34px); line-height: 1; font-weight: 850; letter-spacing: -.8px; }
.admin-home .stat.alert strong { color: #dc4b55; }
.admin-home .panel { padding: 23px; margin-bottom: 20px; border: 1px solid #e5ebf4; border-radius: 17px; background: #fff; box-shadow: 0 5px 18px rgba(28,53,91,.035); }
.admin-home .panel h2 { display: flex; align-items: center; gap: 9px; margin: 0 0 17px; color: #223653; font-size: 16px; font-weight: 800; }
.admin-home .panel h2::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #3975e5; box-shadow: 0 0 0 5px #edf3ff; }
.admin-home .table-wrap { overflow-x: auto; border: 1px solid #edf1f7; border-radius: 12px; }
.admin-home table { min-width: 580px; }
.admin-home th { padding: 13px 15px; color: #75839a; background: #f7f9fd; font-size: 10px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
.admin-home td { padding: 14px 15px; color: #40516c; font-size: 12px; }
.admin-home tbody tr:hover { background: #f8faff; }
.admin-home .empty { padding: 27px 18px; border: 1px dashed #dce5f2; border-radius: 12px; color: #8592a6; background: #fafcff; text-align: center; font-size: 12px; }
@media (max-width: 900px) { .admin-home .grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 600px) { .admin-home .welcome-banner { min-height: 0; gap: 13px; padding: 22px 18px; border-radius: 16px; } .admin-home .welcome-icon { flex-basis: 45px; width: 45px; height: 45px; border-radius: 13px; font-size: 23px; } .admin-home .welcome-name { font-size: 24px; overflow-wrap: anywhere; } .admin-home .welcome-subtitle { font-size: 11px; } .admin-home > h1 { font-size: 19px; } .admin-home .grid { gap: 10px; } .admin-home .stat { min-height: 112px; padding: 15px; border-radius: 13px; } .admin-home .stat span { font-size: 10px; } .admin-home .stat strong { margin-top: 13px; font-size: 27px; } .admin-home .panel { padding: 15px; border-radius: 14px; } .admin-home .panel h2 { font-size: 14px; } }
