/* Tenant dashboard — light modern sidebar */
:root {
    --bg: #eef5fb;
    --surface: #ffffff;
    --border: #cfe0f2;
    --text: #0f172a;
    --muted: #64748b;
    --blue: #2196f3;
    --blue-dark: #1565c0;
    --blue-light: #e3f2fd;
    --side-w: 248px;
    --side-w-collapsed: 72px;
    --radius: 14px;
    --shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
    --shadow-lift: 0 10px 28px rgba(21, 101, 192, 0.12);
    --font: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --side-bg: #bbdefb;
    --side-text: #0d2744;
    --side-muted: #1565c0;
    --side-border: #64b5f6;
    --side-hover: rgba(255, 255, 255, 0.72);
    --side-active: #ffffff;
}

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

html { scroll-behavior: smooth; }

body.oa-dash {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.oa-dash-app {
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--side-w) 1fr;
    transition: grid-template-columns 0.2s ease;
}

.oa-dash-app.sidebar-collapsed {
    grid-template-columns: var(--side-w-collapsed) 1fr;
}

/* ── Sidebar — mesh aurora light ── */
.oa-dash-side {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    isolation: isolate;
    color: var(--side-text);
    background:
        linear-gradient(165deg, rgba(255, 255, 255, 0.55) 0%, transparent 42%),
        linear-gradient(180deg, #eaf5ff 0%, #d9ecff 38%, #c8e4ff 72%, #b7dbff 100%);
    border-right: 1px solid rgba(100, 181, 246, 0.55);
    box-shadow:
        inset -1px 0 0 rgba(255, 255, 255, 0.65),
        6px 0 28px rgba(21, 101, 192, 0.08);
    z-index: 100;
}

/* Orb ánh sáng trên + dưới */
.oa-dash-side::before {
    content: "";
    position: absolute;
    inset: -20% -40% auto -30%;
    height: 58%;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 70% 55% at 18% 30%, rgba(66, 165, 245, 0.55), transparent 62%),
        radial-gradient(ellipse 55% 45% at 88% 12%, rgba(255, 255, 255, 0.85), transparent 58%),
        radial-gradient(ellipse 60% 50% at 72% 70%, rgba(21, 101, 192, 0.22), transparent 65%);
    filter: blur(2px);
}

.oa-dash-side::after {
    content: "";
    position: absolute;
    inset: auto -30% -25% -40%;
    height: 55%;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 65% 55% at 30% 80%, rgba(33, 150, 243, 0.35), transparent 60%),
        radial-gradient(ellipse 50% 40% at 90% 55%, rgba(187, 222, 251, 0.9), transparent 55%);
    opacity: 0.95;
}

/* Lưới chấm siêu nhẹ */
.oa-dash-side-fx {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.35;
    background-image: radial-gradient(rgba(21, 101, 192, 0.18) 0.7px, transparent 0.8px);
    background-size: 16px 16px;
    mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
    -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}

.oa-dash-side-head,
.oa-dash-nav,
.oa-dash-side-foot {
    position: relative;
    z-index: 1;
}

.oa-dash-side-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 14px 12px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.45);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.08));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.oa-dash-side-brand-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    min-width: 0;
    flex: 1;
}

.oa-dash-mark {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: linear-gradient(135deg, #42a5f5, #1565c0);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.02em;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.28);
}

.oa-dash-mark::after { display: none; }

.oa-dash-side-brand {
    min-width: 0;
}

.oa-dash-side-brand strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.oa-dash-side-brand span {
    font-size: 10px;
    color: #1565c0;
}

.oa-dash-collapse-btn {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.7);
    color: #64748b;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.oa-dash-collapse-btn:hover {
    background: #fff;
    border-color: #94a3b8;
    color: #0f172a;
    box-shadow: none;
}

.oa-dash-app.sidebar-collapsed .ico-collapse { display: none; }
.oa-dash-app:not(.sidebar-collapsed) .ico-expand { display: none; }

.oa-dash-collapse-btn-top { display: none; }

.oa-dash-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 8px 12px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.oa-dash-nav::-webkit-scrollbar { width: 5px; }
.oa-dash-nav::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 5px;
}
.oa-dash-nav::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

.oa-dash-nav-group { margin-bottom: 6px; }

.oa-dash-nav-section-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #1565c0;
    padding: 8px 10px 4px;
    margin: 0;
}

.oa-dash-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    margin-bottom: 2px;
    color: #0d2744;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.oa-dash-nav-item::before { display: none; }

.oa-dash-nav-item-main { display: contents; }

.oa-dash-nav-item .ico {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.65);
    color: #1565c0;
    box-shadow: 0 1px 2px rgba(21, 101, 192, 0.06);
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.oa-dash-nav-item .oa-nav-svg {
    width: 16px;
    height: 16px;
    display: block;
}

.oa-dash-nav-item-text {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.oa-dash-nav-go { display: none; }

.oa-dash-nav-item:hover {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(255, 255, 255, 0.9);
    color: #0d2744;
    box-shadow: 0 4px 14px rgba(21, 101, 192, 0.1);
}

.oa-dash-nav-item:hover .ico {
    background: #fff;
    color: #0d47a1;
    box-shadow: 0 2px 8px rgba(21, 101, 192, 0.14);
    filter: none;
    transform: none;
}

.oa-dash-nav-item.is-ready { color: #0d2744; font-weight: 500; }
.oa-dash-nav-item.is-soon { display: none; }

.oa-dash-side-foot {
    padding: 10px 8px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.4);
    background: linear-gradient(0deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.05));
}

.oa-dash-logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid rgba(21, 101, 192, 0.18);
    color: #1565c0;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(21, 101, 192, 0.08);
    transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.oa-dash-logout-btn:hover {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #e11d48;
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.12);
}

.oa-dash-logout-btn svg {
    flex-shrink: 0;
}

/* Select / toolbar trên dashboard embed */
.oa-dash .oa-ov-period {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
}
.oa-dash .oa-crm-select {
    appearance: none;
    -webkit-appearance: none;
    min-width: 118px;
    height: 38px;
    padding: 0 34px 0 12px;
    border: 1px solid #c5d9ef;
    border-radius: 9px;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231565c0' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    color: #0f172a;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.oa-dash .oa-crm-select:focus {
    outline: none;
    border-color: #64b5f6;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.18);
}

.oa-dash-logout-ico { font-size: 14px; line-height: 1; }

/* Thu gọn sidebar — chỉ desktop */
@media (min-width: 961px) {
    .oa-dash-app.sidebar-collapsed .oa-dash-side-brand,
    .oa-dash-app.sidebar-collapsed .oa-dash-nav-section-label,
    .oa-dash-app.sidebar-collapsed .oa-dash-nav-item-text,
    .oa-dash-app.sidebar-collapsed .oa-dash-logout-text {
        display: none;
    }

    .oa-dash-app.sidebar-collapsed .oa-dash-side-head {
        flex-direction: column;
        align-items: center;
        padding: 12px 8px;
    }

    .oa-dash-app.sidebar-collapsed .oa-dash-side-brand-link {
        justify-content: center;
    }

    .oa-dash-app.sidebar-collapsed .oa-dash-nav-item {
        justify-content: center;
        padding: 8px;
    }

    .oa-dash-app.sidebar-collapsed .oa-dash-collapse-btn {
        margin-top: 4px;
    }
}

/* Overlay mobile */
.oa-dash-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    z-index: 90;
}

.oa-dash-app.side-open .oa-dash-overlay {
    display: block;
}

/* ── Body full width + aurora main ── */
.oa-dash-body {
    position: relative;
    min-width: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
    isolation: isolate;
    background:
        radial-gradient(ellipse 80% 50% at 12% -10%, rgba(66, 165, 245, 0.22), transparent 55%),
        radial-gradient(ellipse 60% 40% at 92% 8%, rgba(21, 101, 192, 0.12), transparent 50%),
        radial-gradient(ellipse 50% 35% at 70% 100%, rgba(144, 202, 249, 0.2), transparent 55%),
        linear-gradient(180deg, #f4f9fd 0%, #eef5fb 45%, #e8f2fa 100%);
}

.oa-dash-main-fx {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    background-image:
        radial-gradient(rgba(21, 101, 192, 0.07) 1px, transparent 1px);
    background-size: 22px 22px;
    opacity: 0.55;
    mask-image: linear-gradient(180deg, rgba(0,0,0,0.55), rgba(0,0,0,0.15) 70%, transparent);
    -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.55), rgba(0,0,0,0.15) 70%, transparent);
    animation: oa-main-aurora 18s ease-in-out infinite alternate;
}

.oa-dash-main-fx::before {
    content: "";
    position: absolute;
    width: 48%;
    height: 42%;
    top: -8%;
    left: -6%;
    background: radial-gradient(ellipse at center, rgba(66, 165, 245, 0.28), transparent 70%);
    filter: blur(28px);
    animation: oa-main-orb 22s ease-in-out infinite alternate;
}

.oa-dash-main-fx::after {
    content: "";
    position: absolute;
    width: 40%;
    height: 36%;
    right: -4%;
    bottom: 8%;
    background: radial-gradient(ellipse at center, rgba(21, 101, 192, 0.18), transparent 72%);
    filter: blur(32px);
    animation: oa-main-orb 26s ease-in-out infinite alternate-reverse;
}

@keyframes oa-main-aurora {
    from { transform: translate3d(0, 0, 0); opacity: 0.45; }
    to { transform: translate3d(0, -12px, 0); opacity: 0.65; }
}

@keyframes oa-main-orb {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(18px, 14px, 0) scale(1.08); }
}

.oa-dash-top,
.oa-dash-main {
    position: relative;
    z-index: 1;
}

.oa-dash-top {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(207, 224, 242, 0.9);
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8), 0 4px 20px rgba(21, 101, 192, 0.06);
}

.oa-dash-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    place-items: center;
}

.oa-dash-greet {
    display: block;
    font-size: 12px;
    color: var(--blue-dark);
    font-weight: 700;
    margin-bottom: 2px;
}

.oa-dash-role {
    display: inline-block;
    margin-top: 2px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    color: #0b3d6e;
    background: rgba(25, 118, 210, 0.12);
}

.oa-dash-top h1 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #0d2744;
}

.oa-dash-top-user {
    margin-left: auto;
}

.oa-dash-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #42a5f5, #1565c0);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 15px;
}

.oa-dash-main {
    flex: 1;
    width: 100%;
    max-width: none;
    padding: 22px 24px 40px;
}

/* Banner */
.oa-dash-banner {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background:
        linear-gradient(125deg, #0d47a1 0%, #1565c0 38%, #1e88e5 72%, #42a5f5 100%);
    color: #fff;
    border-radius: calc(var(--radius) + 2px);
    padding: 26px 28px;
    margin-bottom: 22px;
    box-shadow:
        0 12px 36px rgba(21, 101, 192, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
    animation: oa-banner-in 0.55s ease both;
}

.oa-dash-banner-glow {
    position: absolute;
    inset: -40% -20% auto 40%;
    height: 160%;
    background:
        radial-gradient(ellipse at 30% 40%, rgba(255, 255, 255, 0.28), transparent 55%),
        radial-gradient(ellipse at 80% 60%, rgba(144, 202, 249, 0.35), transparent 50%);
    pointer-events: none;
    animation: oa-banner-glow 12s ease-in-out infinite alternate;
}

.oa-dash-banner-copy,
.oa-dash-banner-aside {
    position: relative;
    z-index: 1;
}

.oa-dash-banner-kicker {
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.88;
}

.oa-dash-banner h2 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
    text-shadow: 0 1px 0 rgba(13, 71, 161, 0.25);
}

.oa-dash-banner p {
    font-size: 13px;
    opacity: 0.92;
    line-height: 1.55;
    max-width: 520px;
}

@keyframes oa-banner-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes oa-banner-glow {
    from { transform: translate3d(0, 0, 0) rotate(0deg); }
    to { transform: translate3d(-24px, 10px, 0) rotate(4deg); }
}

.oa-dash-banner-aside {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.oa-dash-banner-brand {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 14px;
    padding: 10px 12px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.oa-dash-brand-emblem {
    position: relative;
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
}

.oa-dash-brand-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid transparent;
    pointer-events: none;
}

.oa-dash-brand-ring--outer {
    inset: 0;
    border-top-color: rgba(255, 255, 255, 0.95);
    border-right-color: rgba(255, 255, 255, 0.2);
    animation: oa-brand-spin 10s linear infinite;
}

.oa-dash-brand-ring--inner {
    inset: 9px;
    border-bottom-color: rgba(255, 255, 255, 0.75);
    border-left-color: rgba(255, 255, 255, 0.15);
    animation: oa-brand-spin 6.5s linear infinite reverse;
}

.oa-dash-brand-core {
    position: relative;
    z-index: 1;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.08));
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    display: grid;
    place-items: center;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18);
}

@keyframes oa-brand-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .oa-dash-brand-ring--outer,
    .oa-dash-brand-ring--inner,
    .oa-dash-main-fx,
    .oa-dash-main-fx::before,
    .oa-dash-main-fx::after,
    .oa-dash-banner,
    .oa-dash-banner-glow {
        animation: none !important;
    }
    .oa-dash-brand-ring--outer,
    .oa-dash-brand-ring--inner {
        border-color: rgba(255, 255, 255, 0.35);
    }
    .oa-dash-card--ready:hover {
        transform: none;
    }
}

.oa-dash-banner-stat {
    flex-shrink: 0;
    text-align: center;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 12px;
    padding: 14px 22px;
}

.oa-dash-banner-stat .num {
    display: block;
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
}

.oa-dash-banner-stat .lbl {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.8;
    margin-top: 4px;
}

/* Section blocks */
.oa-dash-block {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(207, 224, 242, 0.95);
    border-radius: var(--radius);
    margin-bottom: 18px;
    box-shadow: 0 4px 18px rgba(21, 101, 192, 0.06);
    overflow: hidden;
    scroll-margin-top: 80px;
    backdrop-filter: blur(8px);
}

.oa-dash-block-head {
    padding: 14px 20px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    background: linear-gradient(180deg, #f8fbff 0%, #f1f7fc 100%);
}

.oa-dash-block-title {
    display: flex;
    align-items: center;
    gap: 14px;
}

.oa-dash-block-bar {
    width: 4px;
    height: 36px;
    border-radius: 4px;
    flex-shrink: 0;
}

.oa-dash-block--overview .oa-dash-block-bar { background: #2196f3; }
.oa-dash-block--sales .oa-dash-block-bar { background: #5c6bc0; }
.oa-dash-block--ops .oa-dash-block-bar { background: #00897b; }
.oa-dash-block--finance .oa-dash-block-bar { background: #43a047; }
.oa-dash-block--hr .oa-dash-block-bar { background: #8e24aa; }
.oa-dash-block--system .oa-dash-block-bar { background: #3949ab; }

.oa-dash-block-title h2 {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.2;
}

.oa-dash-block-title p {
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
    margin-top: 2px;
}

.oa-dash-block-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px;
}

.oa-dash-block-grid--single {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1px;
    padding: 0;
    background: var(--border);
}

.oa-dash-block-grid--single .oa-dash-card {
    border-radius: 0;
}

/* Carousel — lướt ngang khi tràn, xuống hàng 2 khi đủ rộng */
.oa-dash-carousel {
    position: relative;
    padding: 0 4px 12px;
}

.oa-dash-carousel-track {
    overflow: hidden;
    margin: 0 40px;
}

.oa-dash-carousel.has-scroll .oa-dash-carousel-track {
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.oa-dash-carousel.has-scroll .oa-dash-carousel-track::-webkit-scrollbar {
    display: none;
}

.oa-dash-carousel.has-scroll .oa-dash-block-grid {
    flex-wrap: nowrap;
    width: max-content;
    min-width: 100%;
}

.oa-dash-carousel.has-wrap .oa-dash-block-grid {
    flex-wrap: wrap;
}

.oa-dash-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--blue-dark);
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.12);
    cursor: pointer;
    display: none;
    place-items: center;
    transition: background 0.15s, opacity 0.15s;
}

.oa-dash-carousel.has-scroll .oa-dash-carousel-btn {
    display: grid;
}

.oa-dash-carousel-btn:hover:not(:disabled) {
    background: var(--blue-light);
    border-color: #90caf9;
}

.oa-dash-carousel-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.oa-dash-carousel-prev { left: 8px; }
.oa-dash-carousel-next { right: 8px; }

.oa-dash-carousel-hint {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 16px 8px;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
}

.oa-dash-carousel.has-scroll .oa-dash-carousel-hint {
    display: flex;
}

.oa-dash-carousel-dots {
    display: flex;
    gap: 5px;
}

.oa-dash-carousel-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #cbd5e1;
    transition: background 0.15s, transform 0.15s;
}

.oa-dash-carousel-dot.active {
    background: var(--blue);
    transform: scale(1.2);
}

.oa-dash-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    padding: 18px 20px;
    scroll-margin-top: 96px;
    transition: background 0.18s, border-color 0.18s, box-shadow 0.18s, transform 0.18s;
    flex: 0 0 260px;
    width: 260px;
    border: 1px solid rgba(207, 224, 242, 0.95);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(21, 101, 192, 0.06);
    position: relative;
}

.oa-dash-card--ready {
    cursor: pointer;
}

.oa-dash-card--ready:hover {
    border-color: #90caf9;
    box-shadow: var(--shadow-lift);
    transform: translateY(-3px);
    background: #fff;
}

.oa-dash-card-stretch {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
    text-decoration: none;
}

.oa-dash-card-top,
.oa-dash-card h3,
.oa-dash-card p {
    position: relative;
    z-index: 2;
    pointer-events: none;
}

.oa-dash-card-top .oa-dash-open {
    pointer-events: auto;
}

.oa-dash-carousel.has-wrap .oa-dash-card {
    flex: 1 1 240px;
    width: auto;
    max-width: 100%;
}

.oa-dash-block-grid--single .oa-dash-card {
    flex: none;
    width: auto;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.oa-dash-card:hover {
    background: #f8fbff;
}

.oa-dash-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.oa-dash-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: #2563eb;
    background: #eff6ff;
}

.oa-dash-card-icon .oa-nav-svg {
    width: 18px;
    height: 18px;
}

.oa-dash-block--overview .oa-dash-card-icon { background: #e3f2fd; color: #1565c0; }
.oa-dash-block--sales .oa-dash-card-icon { background: #e8eaf6; color: #3949ab; }
.oa-dash-block--ops .oa-dash-card-icon { background: #e0f2f1; color: #00695c; }
.oa-dash-block--finance .oa-dash-card-icon { background: #e8f5e9; color: #2e7d32; }
.oa-dash-block--hr .oa-dash-card-icon { background: #f3e5f5; color: #7b1fa2; }
.oa-dash-block--system .oa-dash-card-icon { background: #e8eaf6; color: #283593; }

.oa-dash-card h3 {
    font-size: 14px;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 5px;
}

.oa-dash-card p {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.5;
}

.oa-dash-open {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #1565c0;
    background: #e3f2fd;
    padding: 4px 9px;
    border-radius: 999px;
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    z-index: 3;
}

.oa-dash-open:hover {
    background: #bbdefb;
    color: #0d47a1;
}

.oa-dash-soon {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #1565c0;
    background: #e3f2fd;
    padding: 4px 9px;
    border-radius: 999px;
    white-space: nowrap;
}

/* Desktop: nút thu gọn trên topbar */
@media (min-width: 961px) {
    .oa-dash-collapse-btn-top {
        display: grid;
    }

    .oa-dash-side-head .oa-dash-collapse-btn {
        display: none;
    }
}

/* Responsive mobile */
@media (max-width: 960px) {
    .oa-dash-app,
    .oa-dash-app.sidebar-collapsed {
        grid-template-columns: 1fr;
    }

    .oa-dash-side {
        position: fixed;
        left: 0;
        top: 0;
        width: min(var(--side-w), 88vw);
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        z-index: 100;
    }

    .oa-dash-app.side-open .oa-dash-side {
        transform: translateX(0);
    }

    .oa-dash-menu-btn {
        display: grid;
    }

    .oa-dash-collapse-btn,
    .oa-dash-collapse-btn-top {
        display: none !important;
    }

    .oa-dash-main {
        padding: 16px;
    }

    .oa-dash-top {
        padding: 12px 16px;
    }

    .oa-dash-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 18px;
    }

    .oa-dash-banner-aside {
        align-self: stretch;
        justify-content: space-between;
    }

    .oa-dash-carousel-track {
        margin: 0 36px;
    }

    .oa-dash-carousel.has-scroll .oa-dash-block-grid {
        flex-wrap: nowrap;
    }

    .oa-dash-card {
        flex: 0 0 min(78vw, 280px);
        width: min(78vw, 280px);
        scroll-snap-align: start;
    }

    .oa-dash-carousel.has-wrap .oa-dash-card {
        flex: 0 0 min(78vw, 280px);
        width: min(78vw, 280px);
    }
}
