/* ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
   GSOM ??? Premium Business Theme v4
   Navy sidebar ?? Light content ?? Professional dashboard
   ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --sidebar-w: 260px;
    --topbar-h: 62px;

    /* Brand */
    --accent: #e8a308;
    --accent-light: #fbbf24;
    --accent-dark: #b37d00;

    /* Sidebar */
    --nav-bg: #0f1b35;
    --nav-hover: rgba(255, 255, 255, 0.06);
    --nav-active: rgba(232, 163, 8, 0.12);
    --nav-border: rgba(255, 255, 255, 0.08);
    --nav-text: rgba(255, 255, 255, 0.7);

    /* Content */
    --page-bg: #f0f2f7;
    --card-bg: #ffffff;
    --card-border: #e2e6ef;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.06);
    --card-radius: 18px;
    --topbar-bg: #ffffff;

    /* Text */
    --heading: #1a1f36;
    --body-text: #3c4257;
    --muted: #8792a2;

    /* Status */
    --blue: #3b82f6;
    --green: #10b981;
    --cyan: #06b6d4;
    --purple: #7c3aed;
    --red: #ef4444;
    --orange: #f97316;
}

* {
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    box-sizing: border-box;
}

body {
    background: var(--page-bg);
    color: var(--body-text);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-size: 0.94rem;
    line-height: 1.6;
    letter-spacing: -0.01em;
}

/* ????????????????????????????????????????????? LAYOUT ????????????????????????????????????????????? */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ????????????????????????????????????????????? SIDEBAR ????????????????????????????????????????????? */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-w);
    background: linear-gradient(180deg, #0a0f1e 0%, #141832 40%, #1a1145 100%);
    display: flex;
    flex-direction: column;
    z-index: 1050;
    transition: transform 0.3s ease;
    overflow: hidden;
    border-right: 1px solid rgba(99, 102, 241, 0.15);
}

.sidebar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 0%, rgba(99, 102, 241, 0.18) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 100%, rgba(139, 92, 246, 0.15) 0%, transparent 55%);
    pointer-events: none;
    z-index: 0;
}

.sidebar>* {
    position: relative;
    z-index: 1;
}

.sidebar-header {
    padding: 24px 24px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid rgba(99, 102, 241, 0.12);
}

.sidebar-logo {
    width: 44px;
    height: auto;
    border-radius: 14px;
    background: rgba(99, 102, 241, 0.12);
    padding: 6px;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.sidebar-brand {
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 2.5px;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.08);
}

.sidebar-nav {
    flex: 1;
    padding: 20px 14px;
    overflow-y: auto;
}

.sidebar-nav::-webkit-scrollbar {
    width: 3px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 16px;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    letter-spacing: 0.2px;
    transition: all 0.25s ease;
    margin-bottom: 3px;
    position: relative;
    border: 1px solid transparent;
}

.sidebar-link:hover {
    background: rgba(99, 102, 241, 0.1);
    backdrop-filter: blur(8px);
    color: rgba(255, 255, 255, 0.95);
    border-color: rgba(99, 102, 241, 0.15);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.08);
}

.sidebar-link.active {
    background: rgba(232, 163, 8, 0.18);
    backdrop-filter: blur(10px);
    color: var(--accent-light);
    font-weight: 600;
    border-color: rgba(232, 163, 8, 0.2);
    box-shadow: 0 4px 20px rgba(232, 163, 8, 0.15);
}

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 3px;
    border-radius: 0 6px 6px 0;
    background: linear-gradient(180deg, var(--accent), var(--accent-light));
    box-shadow: 0 0 8px rgba(232, 163, 8, 0.3);
}

.sidebar-link i {
    font-size: 1.08rem;
    width: 22px;
    text-align: center;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.sidebar-link:hover i {
    opacity: 1;
}

.sidebar-link.active i {
    color: var(--accent-light);
    opacity: 1;
}

.sidebar-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
    margin: 16px 12px;
}

.sidebar-section {
    padding: 10px 16px 8px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: rgba(255, 255, 255, 0.2);
}

/* Sub-navigation links */
.sidebar-sub {
    padding: 2px 0 4px 0;
    margin-left: 24px;
    border-left: 2px solid rgba(255, 255, 255, 0.05);
}

.sidebar-sublink {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 14px;
    margin-left: 8px;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.25s;
}

.sidebar-sublink:hover {
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.04);
}

.sidebar-sublink.active {
    color: var(--accent-light);
    font-weight: 600;
}

.sidebar-sublink i {
    font-size: 0.85rem;
    width: 18px;
    text-align: center;
}


.sidebar-badge {
    margin-left: auto;
    font-size: 0.62rem;
    padding: 2px 8px;
    border-radius: 20px;
    background: var(--green);
    color: #fff;
    font-weight: 700;
}

/* ?????? Notification sidebar link (enhanced) ?????? */
.sidebar-notif-link {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.07));
    border: 1px solid rgba(99, 102, 241, 0.1) !important;
    backdrop-filter: blur(8px);
    margin-top: 4px;
}

.sidebar-notif-link:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(139, 92, 246, 0.14));
    border-color: rgba(99, 102, 241, 0.22) !important;
}

.sidebar-notif-link.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.16));
    border-color: rgba(99, 102, 241, 0.28) !important;
    color: #c4b5fd;
    box-shadow: 0 2px 16px rgba(99, 102, 241, 0.1);
}

.sidebar-notif-link.active::before {
    background: linear-gradient(180deg, #6366f1, #8b5cf6);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

.sidebar-notif-link.active i {
    color: #c4b5fd;
}

.notif-badge-pill {
    margin-left: auto;
    font-size: 0.58rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 20px;
    background: linear-gradient(135deg, #ef4444, #f87171);
    color: #fff;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
    animation: notif-pulse 2.5s ease-in-out infinite;
    min-width: 20px;
    text-align: center;
    letter-spacing: 0.3px;
}

@keyframes notif-pulse {

    0%,
    100% {
        box-shadow: 0 0 6px rgba(239, 68, 68, 0.3);
    }

    50% {
        box-shadow: 0 0 18px rgba(239, 68, 68, 0.7);
    }
}

.sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(12px);
}

.sidebar-brand-footer {
    padding: 16px 24px 8px;
}

.sidebar-brand-footer .text-warning {
    color: var(--accent-light) !important;
    font-size: 1rem;
    letter-spacing: 1.5px;
    text-shadow: 0 0 16px rgba(232, 163, 8, 0.15);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.sidebar-user i {
    font-size: 1.4rem;
    color: var(--accent-light);
}

.sidebar-user-name {
    font-weight: 600;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.2px;
}

.sidebar-user-role {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.25);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

/* ????????????????????????????????????????????? MAIN ????????????????????????????????????????????? */
.main-content {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--page-bg);
}

/* ????????????????????????????????????????????? TOPBAR ????????????????????????????????????????????? */
.topbar {
    height: var(--topbar-h);
    padding: 0 32px;
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid rgba(226, 230, 239, 0.6);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.topbar-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--heading);
    letter-spacing: -0.02em;
}

.topbar-right {
    margin-left: auto;
    color: var(--muted);
}

/* ????????????????????????????????????????????? CONTENT ????????????????????????????????????????????? */
.content-area {
    padding: 28px 32px;
    flex: 1;
}

/* ????????????????????????????????????????????? CARDS ????????????????????????????????????????????? */
.glass-card,
.card.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    color: var(--body-text);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.glass-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05), 0 12px 40px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.card-section-title {
    font-weight: 800;
    font-size: 0.88rem;
    color: var(--heading);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--card-border);
    letter-spacing: -0.01em;
    text-transform: none;
}

/* ????????????????????????????????????????????? KPI CARDS ????????????????????????????????????????????? */
.kpi-card-v2 {
    border-radius: var(--card-radius);
    padding: 24px 22px;
    display: flex;
    align-items: center;
    gap: 18px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    box-shadow: var(--card-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.kpi-card-v2:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04), 0 12px 36px rgba(0, 0, 0, 0.1);
}

.kpi-blue .kpi-icon {
    background: #eff6ff;
    color: var(--blue);
}

.kpi-green .kpi-icon {
    background: #ecfdf5;
    color: var(--green);
}

.kpi-cyan .kpi-icon {
    background: #ecfeff;
    color: var(--cyan);
}

.kpi-purple .kpi-icon {
    background: #f5f3ff;
    color: var(--purple);
}

.kpi-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.kpi-number {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    color: var(--heading);
    letter-spacing: -0.03em;
}

.kpi-unit {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--muted);
    margin-left: 3px;
}

.kpi-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
    margin-top: 4px;
    letter-spacing: 0.01em;
}

.kpi-sub {
    font-size: 0.72rem;
    color: #aab2c0;
}

/* ????????????????????????????????????????????? ALERT LISTS ????????????????????????????????????????????? */
.alert-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.alert-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
}

.alert-item.danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert-item i {
    font-size: 1rem;
}

.status-ok {
    display: flex;
    align-items: center;
    padding: 14px;
    border-radius: 10px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    font-weight: 500;
    font-size: 0.9rem;
}

/* ????????????????????????????????????????????? QUICK ACTIONS ????????????????????????????????????????????? */
.quick-action-v2 {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 20px;
    border-radius: var(--card-radius);
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    box-shadow: var(--card-shadow);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

.quick-action-v2:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04), 0 12px 36px rgba(0, 0, 0, 0.1);
}

.qa-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 14px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.quick-action-v2:hover .qa-icon {
    transform: scale(1.12) rotate(-3deg);
}

.qa-blue {
    background: #eff6ff;
    color: var(--blue);
}

.qa-green {
    background: #ecfdf5;
    color: var(--green);
}

.qa-amber {
    background: #fffbeb;
    color: #d97706;
}

.qa-label {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--heading);
}

.qa-desc {
    font-size: 0.78rem;
    color: var(--muted);
    margin-top: 4px;
}

/* ????????????????????????????????????????????? FOOTER ????????????????????????????????????????????? */
.main-footer {
    border-top: 1px solid var(--card-border);
    background: var(--card-bg);
    padding: 16px 0;
    color: var(--muted);
}

.main-footer .text-warning {
    color: var(--accent) !important;
}

/* ????????????????????????????????????????????? TABLES ????????????????????????????????????????????? */
.table {
    --bs-table-bg: transparent;
    color: var(--body-text);
    font-size: 0.88rem;
}

.table thead th {
    border-bottom: 2px solid var(--card-border);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 1px;
    color: var(--muted);
    padding: 12px 14px;
}

.table tbody td {
    padding: 14px;
    color: var(--body-text);
    border-color: #f0f2f5;
    vertical-align: middle;
    font-weight: 450;
}

.table-hover tbody tr {
    transition: background-color 0.2s ease;
}

.table-hover tbody tr:hover {
    background-color: #f8fafc !important;
}

.list-group-item {
    background: transparent !important;
    border-color: var(--card-border) !important;
    color: var(--body-text) !important;
}

/* ????????????????????????????????????????????? STATUS DOTS ????????????????????????????????????????????? */
.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-dot.running {
    background: var(--green);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
    animation: pulse-dot 2s infinite;
}

.status-dot.stopped {
    background: #d1d5db;
}

.status-dot.error {
    background: var(--red);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

/* ????????????????????????????????????????????? FORMS ????????????????????????????????????????????? */
.form-control,
.form-select {
    background: #fff;
    border: 1.5px solid #d1d9e6;
    color: var(--body-text);
    border-radius: 12px;
    padding: 10px 16px;
    font-size: 0.88rem;
    font-weight: 450;
    transition: all 0.25s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(232, 163, 8, 0.15);
    background: #fff;
    color: var(--heading);
}

.form-control::placeholder {
    color: #a0aec0;
}

.form-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--heading);
    margin-bottom: 6px;
}

.form-check-input:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}

.input-group-text {
    background: #f7f9fc;
    border-color: #d1d9e6;
    color: var(--muted);
}

/* ????????????????????????????????????????????? BUTTONS ????????????????????????????????????????????? */
.btn {
    border-radius: 12px;
    padding: 10px 22px;
    font-weight: 600;
    font-size: 0.86rem;
    letter-spacing: -0.01em;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-warning,
.btn-warning:focus {
    color: #fff;
    font-weight: 700;
    background: linear-gradient(145deg, #e8a308, #d97706);
    border: none;
    box-shadow: 0 2px 8px rgba(232, 163, 8, 0.25);
}

.btn-warning:hover {
    background: linear-gradient(145deg, #fbbf24, #e8a308);
    color: #fff;
    box-shadow: 0 4px 14px rgba(232, 163, 8, 0.35);
    transform: translateY(-1px);
}

.btn-success {
    background: var(--green);
    border: none;
    color: #fff;
}

.btn-success:hover {
    background: #059669;
    color: #fff;
}

.btn-danger {
    background: var(--red);
    border: none;
    color: #fff;
}

.btn-danger:hover {
    background: #dc2626;
    color: #fff;
}

.btn-outline-secondary {
    border-color: var(--card-border);
    color: var(--muted);
}

.btn-outline-secondary:hover {
    background: #f7f9fc;
    border-color: #c5cad4;
    color: var(--heading);
}

.btn-outline-warning {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-outline-warning:hover {
    background: #fffbeb;
    border-color: var(--accent);
    color: var(--accent-dark);
}

.btn-outline-info {
    border-color: var(--cyan);
    color: var(--cyan);
}

.btn-outline-info:hover {
    background: #ecfeff;
    color: #0891b2;
}

/* ????????????????????????????????????????????? BADGES ????????????????????????????????????????????? */
.badge {
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.72rem;
}

/* ????????????????????????????????????????????? ALERTS ????????????????????????????????????????????? */
.alert {
    border-radius: 12px;
}

/* ????????????????????????????????????????????? PAGINATION ????????????????????????????????????????????? */
.page-link {
    background: #fff;
    border-color: var(--card-border);
    color: var(--body-text);
    border-radius: 8px;
    margin: 0 2px;
}

.page-item.active .page-link {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    font-weight: 700;
}

/* ????????????????????????????????????????????? PROGRESS ????????????????????????????????????????????? */
.progress {
    background: #e5e7eb;
    border-radius: 20px;
    height: 8px;
}

.progress-bar {
    background: linear-gradient(90deg, var(--accent), var(--orange));
    border-radius: 20px;
}

/* ????????????????????????????????????????????? CAMERAS ????????????????????????????????????????????? */
.cam-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 12px;
    background: #e5e7eb;
    border: 1px solid var(--card-border);
}

.cam-thumb-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 12px;
    background: #f0f2f5;
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 2rem;
}

/* ????????????????????????????????????????????? ROI ????????????????????????????????????????????? */
.roi-container {
    position: relative;
    display: inline-block;
    cursor: crosshair;
    border-radius: 12px;
    overflow: hidden;
}

.roi-container canvas {
    position: absolute;
    top: 0;
    left: 0;
}

/* ????????????????????????????????????????????? LOGIN ????????????????????????????????????????????? */
.login-bg {
    background: linear-gradient(135deg, #0f1b35 0%, #1e293b 50%, #0f1b35 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-bg .glass-card,
.login-bg .card.glass-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    color: #fff;
}

.login-bg .form-control {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.login-bg .form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent);
    color: #fff;
}

.login-bg .form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.login-bg .form-label {
    color: rgba(255, 255, 255, 0.8);
}

/* ????????????????????????????????????????????? SCROLLBAR ????????????????????????????????????????????? */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

/* ????????????????????????????????????????????? ANIMATIONS ????????????????????????????????????????????? */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.glass-card,
.kpi-card-v2,
.quick-action-v2 {
    animation: fadeInUp 0.35s ease-out both;
}

.row>[class*="col-"]:nth-child(2) .kpi-card-v2 {
    animation-delay: 0.05s;
}

.row>[class*="col-"]:nth-child(3) .kpi-card-v2 {
    animation-delay: 0.1s;
}

.row>[class*="col-"]:nth-child(4) .kpi-card-v2 {
    animation-delay: 0.15s;
}

/* ????????????????????????????????????????????? RESPONSIVE ????????????????????????????????????????????? */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 8px 0 30px rgba(0, 0, 0, 0.3);
    }

    .main-content {
        margin-left: 0;
    }

    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1040;
        display: none;
    }

    .sidebar-overlay.show {
        display: block;
    }
}

@media (max-width: 768px) {
    .content-area {
        padding: 20px 16px;
    }

    .kpi-number {
        font-size: 1.5rem;
    }

    .kpi-icon {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }
}

/* ????????????????????????????????????????????? UTILITIES ????????????????????????????????????????????? */
.border-danger {
    border-color: var(--red) !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--heading);
    letter-spacing: -0.02em;
    font-weight: 700;
}

.text-warning {
    color: var(--accent) !important;
}

.text-muted {
    color: var(--muted) !important;
}

.text-success {
    color: var(--green) !important;
}

.text-danger {
    color: var(--red) !important;
}

.text-info {
    color: var(--cyan) !important;
}

.text-primary {
    color: var(--blue) !important;
}

.text-secondary {
    color: var(--muted) !important;
}

a {
    color: var(--accent-dark);
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent);
}

/* ????????????????????????????????????????????? SMOOTH SELECTION ????????????????????????????????????????????? */
::selection {
    background: rgba(217, 119, 6, 0.15);
    color: var(--heading);
}