﻿/* ============================================
   أصول CRM - Design System
   Dark Tech Theme - Matching elosool.com
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* ---- Landing Identity (Harmovest / CRM ELosool) ---- */
    --osool-red: #FF4340;
    --osool-green: #00CA75;
    --osool-green-dark: #004931;
    --osool-gold: #CCB478;
    --osool-gold-dark: #B0944D;
    --osool-cyan: #00E5FF;
    --osool-bg: #000000;
    --osool-bg-1: #212121;
    --osool-surface: #2A2A2A;
    --osool-border: #333333;
    --osool-text: #FFFFFF;
    --osool-text-1: #E9ECF3;
    --osool-text-muted: #939599;
    --osool-tab-bg: rgba(0, 73, 49, 0.22);
    --osool-tab-border: #004931;

    /* ---- Brand Colors ---- */
    --accent: var(--osool-cyan);
    --accent-hover: #33EBFF;
    --accent-light: rgba(0, 229, 255, 0.12);
    --accent-glow: rgba(0, 229, 255, 0.35);
    --accent-gradient: linear-gradient(135deg, var(--osool-cyan), #00B8D4);
    --brand: var(--osool-green-dark);
    --brand-dark: var(--osool-green-dark);
    --brand-light: var(--osool-tab-bg);
    --gold: var(--osool-gold);

    /* ---- Dark Backgrounds ---- */
    --bg-body: var(--osool-bg);
    --bg-main: var(--osool-bg);
    --bg-card: var(--osool-bg-1);
    --bg-card-hover: var(--osool-surface);
    --bg: var(--osool-bg-1);
    --bg-dark: var(--osool-bg);
    --bg-glass: rgba(33, 33, 33, 0.85);
    --bg-elevated: var(--osool-surface);
    --surface: var(--osool-surface);
    --surface-2: #1a1a1a;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: var(--osool-border);

    /* ---- Text Colors ---- */
    --text-primary: var(--osool-text);
    --text-secondary: var(--osool-text-1);
    --text-light: var(--osool-text-1);
    --text-muted: var(--osool-text-muted);

    /* ---- Borders ---- */
    --border: var(--osool-border);
    --border-light: #2a2a2a;
    --border-accent: rgba(0, 229, 255, 0.28);

    /* ---- Status Colors ---- */
    --success: var(--osool-green);
    --success-light: rgba(0, 202, 117, 0.15);
    --danger: var(--osool-red);
    --danger-light: rgba(255, 67, 64, 0.15);
    --warning: var(--osool-gold);
    --warning-light: rgba(204, 180, 120, 0.15);
    --info: var(--osool-cyan);
    --info-light: rgba(0, 229, 255, 0.12);

    /* ---- Chrome (Header + Sidebar) — landing black + gold ---- */
    --osool-chrome-bg:
        linear-gradient(180deg, rgba(0, 0, 0, 0.94) 0%, rgba(14, 11, 6, 0.98) 55%, rgba(8, 7, 4, 0.99) 100%);
    --osool-chrome-border: rgba(204, 180, 120, 0.38);
    --osool-chrome-glow: rgba(204, 180, 120, 0.5);
    --osool-chrome-tab-bg: rgba(204, 180, 120, 0.14);
    --osool-chrome-tab-border: var(--osool-gold-dark);
    --panel-blue-bg: var(--osool-chrome-bg);
    --panel-blue-border: var(--osool-chrome-border);
    --panel-blue-line: linear-gradient(90deg, transparent, rgba(204, 180, 120, 0.55), rgba(176, 148, 77, 0.35), transparent);
    --panel-blue-top-line: linear-gradient(90deg, transparent, rgba(204, 180, 120, 0.42), transparent);
    --app-chrome-bg: linear-gradient(135deg, var(--osool-gold-dark) 0%, #8a7340 100%);

    /* ---- Spacing ---- */
    --gap-xs: 4px;
    --gap-sm: 8px;
    --gap-md: 16px;
    --gap-lg: 24px;
    --gap-xl: 32px;

    /* ---- Sizing ---- */
    --sidebar-width: 200px;
    --sidebar-collapsed: 72px;
    --header-height: 64px;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;

    /* ---- Shadows ---- */
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(0, 229, 255, 0.15);

    /* ---- Fonts ---- */
    --font: 'Cairo', 'Inter', sans-serif;

    /* ---- Transitions ---- */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

/* ============ RESET & BASE ============ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 14px;
}

body {
    font-family: var(--font);
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    width: 100%;
    min-height: 100vh;
}

/* ============ CUSTOM SCROLLBAR ============ */
/* Works in Chrome, Edge, Safari */
::-webkit-scrollbar {
    width: 12px !important;
    height: 12px !important;
}

::-webkit-scrollbar-track {
    background: var(--osool-bg) !important;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--osool-green-dark), var(--osool-cyan)) !important;
    border-radius: 6px;
    border: 2px solid var(--osool-bg);
    transition: background 0.2s;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--osool-cyan), #33EBFF) !important;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin !important;
    scrollbar-color: var(--osool-cyan) var(--osool-bg) !important;
}

html, body {
    scrollbar-width: thin !important;
    scrollbar-color: var(--osool-cyan) var(--osool-bg) !important;
}

/* ============ ANIMATED BACKGROUND ============ */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    opacity: 0.16;
    background:
        linear-gradient(120deg, rgba(6, 14, 34, 0.95) 0%, rgba(8, 22, 54, 0.92) 38%, rgba(6, 34, 66, 0.90) 100%),
        radial-gradient(ellipse at 82% 14%, rgba(0, 229, 255, 0.08) 0%, transparent 48%),
        radial-gradient(ellipse at 22% 90%, rgba(59, 130, 246, 0.07) 0%, transparent 52%);
    background-blend-mode: normal, screen, screen;
}

/* Floating orbs */
.animated-bg::before,
.animated-bg::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
}

.animated-bg::before {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 229, 255, 0.12), transparent 70%);
    top: -10%;
    right: -5%;
    animation: orbFloat1 20s ease-in-out infinite;
}

.animated-bg::after {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08), transparent 70%);
    bottom: -10%;
    left: -5%;
    animation: orbFloat2 25s ease-in-out infinite;
}

/* Particle dots */
.animated-bg-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    animation: particleRise linear infinite;
}

.particle:nth-child(1) {
    width: 3px; height: 3px;
    background: rgba(0, 229, 255, 0.5);
    left: 10%;
    animation-duration: 18s;
    animation-delay: 0s;
}
.particle:nth-child(2) {
    width: 2px; height: 2px;
    background: rgba(255, 107, 61, 0.4);
    left: 25%;
    animation-duration: 22s;
    animation-delay: 3s;
}
.particle:nth-child(3) {
    width: 4px; height: 4px;
    background: rgba(0, 229, 255, 0.3);
    left: 40%;
    animation-duration: 20s;
    animation-delay: 6s;
}
.particle:nth-child(4) {
    width: 2px; height: 2px;
    background: rgba(59, 130, 246, 0.4);
    left: 55%;
    animation-duration: 24s;
    animation-delay: 2s;
}
.particle:nth-child(5) {
    width: 3px; height: 3px;
    background: rgba(0, 229, 255, 0.35);
    left: 70%;
    animation-duration: 19s;
    animation-delay: 5s;
}
.particle:nth-child(6) {
    width: 2px; height: 2px;
    background: rgba(255, 107, 61, 0.45);
    left: 85%;
    animation-duration: 21s;
    animation-delay: 1s;
}
.particle:nth-child(7) {
    width: 3px; height: 3px;
    background: rgba(59, 130, 246, 0.3);
    left: 15%;
    animation-duration: 23s;
    animation-delay: 7s;
}
.particle:nth-child(8) {
    width: 2px; height: 2px;
    background: rgba(0, 229, 255, 0.4);
    left: 60%;
    animation-duration: 17s;
    animation-delay: 4s;
}
.particle:nth-child(9) {
    width: 4px; height: 4px;
    background: rgba(0, 229, 255, 0.25);
    left: 35%;
    animation-duration: 26s;
    animation-delay: 8s;
}
.particle:nth-child(10) {
    width: 2px; height: 2px;
    background: rgba(59, 130, 246, 0.35);
    left: 80%;
    animation-duration: 20s;
    animation-delay: 10s;
}
.particle:nth-child(11) {
    width: 3px; height: 3px;
    background: rgba(0, 229, 255, 0.3);
    left: 48%;
    animation-duration: 22s;
    animation-delay: 9s;
}
.particle:nth-child(12) {
    width: 2px; height: 2px;
    background: rgba(255, 107, 61, 0.4);
    left: 92%;
    animation-duration: 19s;
    animation-delay: 6s;
}

/* Grid lines overlay */
.animated-bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(0, 229, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 255, 0.015) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridMove 30s linear infinite;
}

/* Scanning line effect */
.animated-bg-scan {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.animated-bg-scan::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 229, 255, 0.08), rgba(0, 229, 255, 0.15), rgba(0, 229, 255, 0.08), transparent);
    animation: scanLine 8s ease-in-out infinite;
}

/* Keyframes */
@keyframes orbFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(-60px, 80px) scale(1.1); }
    50% { transform: translate(-30px, 150px) scale(0.95); }
    75% { transform: translate(40px, 60px) scale(1.05); }
}

@keyframes orbFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(50px, -70px) scale(1.05); }
    50% { transform: translate(80px, -120px) scale(0.9); }
    75% { transform: translate(30px, -50px) scale(1.1); }
}

@keyframes particleRise {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) scale(1);
        opacity: 0;
    }
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

@keyframes scanLine {
    0% { top: -2px; }
    50% { top: 100%; }
    100% { top: -2px; }
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
}

ul,
ol {
    list-style: none;
}

input,
select,
textarea,
button {
    font-family: var(--font);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* ============ LAYOUT ============ */
.app-layout {
    display: flex;
    min-height: 100vh;
    background: transparent;
    position: relative;
    z-index: 1;
    overflow-x: hidden; /* Safe wrapper clipping */
    width: 100%;
}

.app-layout::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(180deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.95) 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: none;
    animation: appBgFloat 36s ease-in-out infinite;
    transform-origin: center;
}

@keyframes appBgFloat {
    0%, 100% { transform: scale(1) translateY(0); }
    50% { transform: scale(1.01) translateY(-2px); }
}

.main-content {
    flex: 1;
    margin-right: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: var(--transition);
    background: rgba(0, 0, 0, 0.55);
    position: relative;
    container-type: inline-size;
    container-name: mainpane;
}

/* Premium dot pattern overlay on main content */
.main-content::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: var(--sidebar-width);
    bottom: 0;
    background-image:
        radial-gradient(rgba(0, 229, 255, 0.015) 1px, transparent 1px);
    background-size: 42px 42px;
    pointer-events: none;
    z-index: 0;
}

.main-content>* {
    position: relative;
    z-index: 1;
}

.page-content {
    padding: var(--gap-lg);
    flex: 1;
}

/* ============ HEADER ============ */
.header {
    min-height: var(--header-height);
    height: auto;
    background: var(--panel-blue-bg);
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    border-bottom: 1px solid var(--panel-blue-border);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    padding: 10px var(--gap-lg);
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 90;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55), 0 1px 0 rgba(204, 180, 120, 0.28);
    color: #ffffff;
    min-width: 0;
    overflow: visible;
}

[dir="rtl"] .header {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "tools user";
}

[dir="ltr"] .header {
    grid-template-areas: "user tools";
}

[dir="ltr"] .header-left {
    grid-area: user;
}

[dir="ltr"] .header-right {
    grid-area: tools;
}

[dir="rtl"] .header-left {
    grid-area: user;
}

[dir="rtl"] .header-right {
    grid-area: tools;
}

.header::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: var(--panel-blue-line);
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--panel-blue-top-line);
    opacity: 0.7;
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--gap-md);
    min-width: 0;
    overflow: hidden;
    justify-content: flex-end;
}

[dir="rtl"] .header-right {
    justify-content: flex-start;
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--gap-md);
    flex-shrink: 0;
    z-index: 2;
}

.header-brand-title {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    font-size: 1.06rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0;
    line-height: 1;
    padding: 7px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(20, 16, 8, 0.72), rgba(32, 26, 12, 0.55));
    border: 1px solid rgba(204, 180, 120, 0.38);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04), 0 0 14px rgba(204, 180, 120, 0.12);
    flex-shrink: 0;
}

.brand-title-inner {
    display: inline-block;
    white-space: nowrap;
    line-height: 1.25;
    font-size: inherit;
    font-weight: inherit;
}

.brand-osool-word,
.brand-rest-word {
    display: inline;
    line-height: inherit;
    font-size: inherit;
    font-weight: inherit;
    font-family: var(--font);
    vertical-align: unset;
    transform: none;
    padding: 0;
    margin: 0;
}

.brand-osool-word {
    color: var(--osool-gold, #CCB478);
    text-shadow: 0 0 8px rgba(204, 180, 120, 0.28);
}

.brand-rest-word {
    color: #ffffff;
    letter-spacing: 0.04em;
}

.header-news-strip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 420px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(131, 230, 255, 0.32);
    background: linear-gradient(135deg, rgba(12, 31, 62, 0.65), rgba(18, 64, 99, 0.52));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 6px 16px rgba(2, 8, 28, 0.25);
    min-height: 38px;
    overflow: hidden;
}

.news-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
    font-size: 0.72rem;
    font-weight: 800;
    color: #ffffff;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(141, 233, 255, 0.18);
    border: 1px solid rgba(141, 233, 255, 0.35);
    line-height: 1;
}

.news-ticker-window {
    position: relative;
    overflow: hidden;
    display: block;
    width: 100%;
    height: 20px;
    mask-image: linear-gradient(to left, transparent 0%, #000 10%, #000 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to left, transparent 0%, #000 10%, #000 90%, transparent 100%);
}

.news-ticker-text {
    position: absolute;
    top: 50%;
    right: 0;
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.96);
    line-height: 1.2;
    white-space: nowrap;
    padding-inline-start: 24px;
    will-change: transform;
    transform: translate(100%, -50%);
}

.news-ticker-text.news-marquee {
    animation: tradingTickerMove 12s linear 1 forwards;
}

@keyframes tradingTickerMove {
    0% { transform: translate(100%, -50%); }
    12% { transform: translate(0, -50%); }
    88% { transform: translate(0, -50%); }
    100% { transform: translate(calc(-100% - 32px), -50%); }
}

.header-search {
    position: relative;
    width: 230px;
    flex: 0 0 230px;
}

.header-search input {
    width: 100%;
    padding: 9px 16px;
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: var(--radius);
    font-size: 0.85rem;
    background: rgba(8, 17, 29, 0.82);
    color: var(--text-primary);
    font-weight: 700;
    transition: var(--transition);
}

.header-search input::placeholder {
    color: rgba(255, 255, 255, 0.86);
    font-weight: 700;
}

.header-search input:focus {
    border-color: var(--accent);
    outline: none;
    background: rgba(10, 20, 34, 0.92);
    box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.15), 0 0 18px rgba(0, 229, 255, 0.18);
}

.header-user {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.01);
    transition: var(--transition);
}

.header-user:hover {
    background: rgba(0, 229, 255, 0.08);
    border-color: rgba(0, 229, 255, 0.2);
}

.header-user-info {
    text-align: left;
}

.header-user-name {
    font-weight: 800;
    font-size: 0.85rem;
    color: #ffffff;
}

.header-user-role {
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
}

.header-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(15, 26, 41, 0.88), rgba(9, 17, 28, 0.88));
    border: 1px solid rgba(0, 229, 255, 0.15);
    cursor: pointer;
    position: relative;
    transition: var(--transition);
    font-size: 0.95rem;
    font-weight: 800;
}

.header-icon:hover {
    color: var(--osool-gold, #CCB478);
    border-color: rgba(204, 180, 120, 0.55);
    background: linear-gradient(135deg, rgba(204, 180, 120, 0.16), rgba(176, 148, 77, 0.1));
    box-shadow: 0 6px 20px rgba(204, 180, 120, 0.18);
    transform: translateY(-1px);
}

.header-icon .badge-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    border: 2px solid var(--bg-card);
}

.header-icon .badge-count {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ef4444, #f97316);
    color: #ffffff;
    font-size: 0.62rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-card);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.45);
    line-height: 1;
}

/* ============ USER DROPDOWN MENU ============ */
.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 220px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 229, 255, 0.1);
    padding: 8px;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
}

[dir="rtl"] .user-dropdown {
    right: auto;
    left: 0;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-dropdown-item i {
    width: 18px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.user-dropdown-item:hover {
    background: var(--bg-hover);
    color: var(--accent);
}

.user-dropdown-item:hover i {
    color: var(--accent);
}

.user-dropdown-logout {
    color: #ef4444;
}

.user-dropdown-logout i {
    color: #ef4444;
}

.user-dropdown-logout:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.user-dropdown-logout:hover i {
    color: #dc2626;
}

.user-dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 0;
}

.notifications-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 360px;
    max-width: min(86vw, 360px);
    max-height: 430px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45), 0 0 20px rgba(0, 229, 255, 0.1);
    z-index: 1100;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    backdrop-filter: blur(18px);
}

[dir="rtl"] .notifications-dropdown {
    right: auto;
    left: 0;
}

.notifications-dropdown-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 12px;
    border-bottom: 1px solid var(--border);
    font-size: 0.86rem;
    font-weight: 800;
    color: var(--text-primary);
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.1), rgba(0, 229, 255, 0.03));
}

.notifications-dropdown-header i {
    color: var(--accent);
}

.notifications-dropdown-body {
    overflow: auto;
    max-height: 375px;
}

.notification-item {
    display: flex;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    flex-shrink: 0;
}

.notification-item.event-login .notification-item-icon {
    background: rgba(16, 185, 129, 0.16);
    color: #10b981;
}

.notification-item.event-logout .notification-item-icon {
    background: rgba(245, 158, 11, 0.18);
    color: #f59e0b;
}

.notification-item.event-close .notification-item-icon {
    background: rgba(239, 68, 68, 0.16);
    color: #ef4444;
}

.notification-item-content {
    min-width: 0;
}

.notification-item-title {
    font-size: 0.83rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-item-event {
    color: var(--accent);
    margin-inline-start: 4px;
}

.notification-item-sub {
    font-size: 0.74rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.notifications-empty {
    padding: 16px;
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.presence-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 360px;
    max-width: min(86vw, 360px);
    max-height: 430px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45), 0 0 20px rgba(0, 229, 255, 0.1);
    z-index: 1100;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    backdrop-filter: blur(18px);
}

[dir="rtl"] .presence-dropdown {
    right: auto;
    left: 0;
}

.presence-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 11px 12px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.1), rgba(0, 229, 255, 0.03));
}

.presence-dropdown-title {
    font-size: 0.86rem;
    font-weight: 800;
    color: var(--text-primary);
}

.presence-dropdown-title i {
    color: var(--accent);
    margin-left: 4px;
}

.presence-dropdown-summary {
    font-size: 0.73rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.presence-dropdown-body {
    overflow: auto;
    max-height: 375px;
}

.presence-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.presence-item:last-child {
    border-bottom: none;
}

.presence-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.presence-item.online .presence-dot {
    background: #10b981;
    box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.16);
}

.presence-item.offline .presence-dot {
    background: #6b7280;
    box-shadow: 0 0 0 5px rgba(107, 114, 128, 0.16);
}

.presence-main {
    min-width: 0;
    flex: 1;
}

.presence-name {
    font-size: 0.84rem;
    font-weight: 800;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.presence-sub {
    font-size: 0.74rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.presence-status-chip {
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid transparent;
}

.presence-item.online .presence-status-chip {
    color: #10b981;
    background: rgba(16, 185, 129, 0.14);
    border-color: rgba(16, 185, 129, 0.28);
}

.presence-item.offline .presence-status-chip {
    color: #9ca3af;
    background: rgba(156, 163, 175, 0.12);
    border-color: rgba(156, 163, 175, 0.22);
}

.mobile-toggle {
    display: none;
}

/* ============ USER AVATAR ============ */
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--accent-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px var(--accent-glow);
}

/* ============ PAGE HEADER ============ */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--gap-lg);
    flex-wrap: wrap;
    gap: var(--gap-md);
}

.page-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-title i {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.3));
}

.page-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.page-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font);
    text-decoration: none;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--osool-green-dark), #006443);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 73, 49, 0.45);
    border: 1px solid rgba(0, 202, 117, 0.25);
}

.btn-primary:hover {
    filter: brightness(1.12);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 202, 117, 0.3);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    filter: brightness(1.15);
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}

.btn-outline:hover {
    background: var(--accent-light);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 12px 28px;
    font-size: 0.9rem;
}

/* ============ HEADER ACTION BUTTONS (Link Call Style) ============ */
.btn-add {
    background: linear-gradient(135deg, var(--osool-green), #00a85e);
    color: white;
    border: none;
}

.btn-add:hover {
    box-shadow: 0 5px 15px rgba(0, 202, 117, 0.4);
    transform: translateY(-2px);
}

.btn-import {
    background: linear-gradient(135deg, #00E5FF, #00BCD4);
    color: white;
    border: none;
}

.btn-import:hover {
    box-shadow: 0 5px 15px rgba(0, 229, 255, 0.4);
    transform: translateY(-2px);
}

.btn-export {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    border: none;
}

.btn-export:hover {
    box-shadow: 0 5px 15px rgba(251, 191, 36, 0.4);
    transform: translateY(-2px);
}

.btn-distribute {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: white;
    border: none;
}

.btn-distribute:hover {
    box-shadow: 0 5px 15px rgba(240, 147, 251, 0.4);
    transform: translateY(-2px);
}

.btn-delete-all {
    background: linear-gradient(135deg, #f56565, #c53030);
    color: white;
    border: none;
}

.btn-delete-all:hover {
    box-shadow: 0 5px 15px rgba(245, 101, 101, 0.4);
    transform: translateY(-2px);
}

.btn-icon {
    padding: 8px;
    width: 34px;
    height: 34px;
}

.w-full {
    width: 100%;
}

/* ============ TABLE ACTION BUTTONS (Link Call Style) ============ */
.table-action-btn {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.table-action-btn:hover {
    transform: translateY(-3px);
}

.whatsapp-btn {
    background: linear-gradient(135deg, #25D366, #128C7E);
}

.whatsapp-btn:hover {
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
}

.call-btn {
    background: linear-gradient(135deg, #4facfe, #00c6ff);
}

.call-btn:hover {
    box-shadow: 0 5px 15px rgba(79, 172, 254, 0.4);
}

.edit-btn {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.edit-btn:hover {
    box-shadow: 0 5px 15px rgba(251, 191, 36, 0.4);
}

.delete-btn {
    background: linear-gradient(135deg, #f56565, #c53030);
}

.delete-btn:hover {
    box-shadow: 0 5px 15px rgba(245, 101, 101, 0.4);
}

/* ============ CARDS ============ */
.card {
    background:
        linear-gradient(145deg, rgba(20, 32, 58, 0.42) 0%, rgba(10, 18, 34, 0.34) 100%),
        repeating-linear-gradient(0deg, rgba(255,255,255,0.02) 0 1px, transparent 1px 4px),
        repeating-linear-gradient(90deg, rgba(255,255,255,0.015) 0 1px, transparent 1px 4px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-lg);
    padding: var(--gap-lg);
    transition: var(--transition);
    backdrop-filter: blur(10px) saturate(115%);
    -webkit-backdrop-filter: blur(10px) saturate(115%);
    position: relative;
    overflow: hidden;
    animation: cardFadeIn 0.5s ease both;
}

.card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 229, 255,0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover {
    border-color: rgba(0, 229, 255, 0.35);
    box-shadow: 0 8px 40px rgba(0, 229, 255, 0.08), 0 0 0 1px rgba(0, 229, 255,0.1);
    transform: translateY(-2px);
}

.card:hover::after {
    opacity: 1;
}

@keyframes cardFadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--gap-md);
    padding-bottom: var(--gap-md);
    border-bottom: 1px solid var(--border-light);
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
}

/* ============ STATS GRID ============ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--gap-md);
    margin-bottom: var(--gap-lg);
}

.stat-card {
    background:
        linear-gradient(145deg, rgba(20, 32, 58, 0.42) 0%, rgba(10, 18, 34, 0.34) 100%),
        repeating-linear-gradient(0deg, rgba(255,255,255,0.02) 0 1px, transparent 1px 4px),
        repeating-linear-gradient(90deg, rgba(255,255,255,0.015) 0 1px, transparent 1px 4px);
    border: 1px solid rgba(255,255,255,0.14);
    border-top: 3px solid var(--card-accent, var(--accent));
    border-radius: var(--radius-lg);
    padding: var(--gap-lg);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px) saturate(115%);
    -webkit-backdrop-filter: blur(10px) saturate(115%);
    animation: statCardIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.2s; }
.stat-card:nth-child(5) { animation-delay: 0.25s; }

@keyframes statCardIn {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at top center, var(--card-glow, rgba(0,229,255,0.06)) 0%, transparent 70%);
    pointer-events: none;
    transition: var(--transition);
}

/* Inner glow effect */
.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    transition: var(--transition);
}

/* Variant CSS custom properties */
.stat-card.primary {
    --card-accent: var(--accent);
    --card-glow: rgba(0, 229, 255, 0.12);
}

.stat-card.success {
    --card-accent: var(--success);
    --card-glow: rgba(16, 185, 129, 0.12);
}

.stat-card.danger {
    --card-accent: var(--danger);
    --card-glow: rgba(239, 68, 68, 0.12);
}

.stat-card.warning {
    --card-accent: var(--warning);
    --card-glow: rgba(245, 158, 11, 0.12);
}

.stat-card.info {
    --card-accent: var(--info);
    --card-glow: rgba(59, 130, 246, 0.12);
}

.stat-card.primary::after {
    box-shadow: 0 0 30px 5px rgba(0, 229, 255, 0.15);
}

.stat-card.success::after {
    box-shadow: 0 0 30px 5px rgba(16, 185, 129, 0.12);
}

.stat-card.danger::after {
    box-shadow: 0 0 30px 5px rgba(239, 68, 68, 0.12);
}

.stat-card.warning::after {
    box-shadow: 0 0 30px 5px rgba(245, 158, 11, 0.12);
}

.stat-card.info::after {
    box-shadow: 0 0 30px 5px rgba(59, 130, 246, 0.12);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--card-accent, var(--accent));
    box-shadow: 0 8px 32px var(--card-glow, rgba(0,229,255,0.15));
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 1.2rem;
}

.stat-card.primary .stat-icon {
    background: var(--accent-light);
    color: var(--accent);
}

.stat-card.success .stat-icon {
    background: var(--success-light);
    color: var(--success);
}

.stat-card.danger .stat-icon {
    background: var(--danger-light);
    color: var(--danger);
}

.stat-card.warning .stat-icon {
    background: var(--warning-light);
    color: var(--warning);
}

.stat-card.info .stat-icon {
    background: var(--info-light);
    color: var(--info);
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 4px;
    color: var(--card-accent, var(--text-primary));
    text-shadow: 0 0 14px var(--card-glow, rgba(0,229,255,0.3));
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    margin-top: 8px;
}

.stat-badge.up {
    background: var(--success-light);
    color: var(--success);
}

.stat-badge.down {
    background: var(--danger-light);
    color: var(--danger);
}

/* ============ GRID LAYOUTS ============ */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap-lg);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap-lg);
}

/* ============ TABS ============ */
.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: var(--gap-lg);
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 5px;
    overflow-x: auto;
    border: 1px solid var(--border);
}

.tab {
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
    color: var(--text-secondary);
}

.tab:hover {
    background: var(--bg);
    color: var(--text-primary);
}

.tab.active {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 2px 10px var(--accent-glow);
}

/* ============ TABLE ============ */
.table-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--panel-blue-border);
    border-radius: var(--radius-lg);
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 10px 30px rgba(2, 10, 28, 0.28);
}

.table-wrapper::before {
    content: '';
    position: sticky;
    top: 0;
    display: block;
    height: 1px;
    background: var(--panel-blue-line);
    z-index: 3;
}

.table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--gap-md) var(--gap-lg);
    border-bottom: 1px solid var(--panel-blue-border);
    flex-wrap: wrap;
    gap: var(--gap-sm);
}

.table-search {
    position: relative;
    width: 280px;
}

.table-search input {
    width: 100%;
    padding: 9px 16px 9px 38px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    background: var(--bg);
    color: var(--text-primary);
    transition: var(--transition);
}

.table-search input:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-light);
}

.table-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.table-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

.data-table thead {
    background: var(--panel-blue-bg);
}

.data-table th {
    padding: 12px 16px;
    text-align: right;
    font-weight: 700;
    font-size: 0.78rem;
    color: #d9ebff;
    text-transform: none;
    letter-spacing: 0;
    border-bottom: 1px solid var(--panel-blue-border);
    backdrop-filter: blur(20px);
    vertical-align: middle;
    line-height: 1.3;
}

.data-table td {
    padding: 14px 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--panel-blue-border);
    vertical-align: middle;
}

.data-table td strong,
.data-table td b {
    color: #ffffff;
}

.data-table tbody tr {
    transition: all 0.25s ease;
}

.data-table tbody tr:nth-child(even) {
    background: rgba(10, 24, 52, 0.2);
}

.data-table tbody tr:hover {
    background:
        radial-gradient(circle at 88% 50%, rgba(56, 190, 255, 0.12), transparent 42%),
        linear-gradient(90deg, rgba(15, 39, 86, 0.65), rgba(17, 52, 100, 0.65));
    box-shadow: inset 3px 0 0 var(--accent), inset 0 0 0 1px rgba(64, 211, 255, 0.22);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* ============ FORMS ============ */
.form-group {
    margin-bottom: var(--gap-md);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap-md);
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.form-input,
.form-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    background: var(--bg);
    color: var(--text-primary);
    transition: var(--transition);
    font-family: var(--font);
}

.form-input:focus,
.form-select:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-light);
}

.form-input::placeholder {
    color: var(--text-light);
}

textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

.form-select {
    cursor: pointer;
}

.form-select option {
    background: var(--bg-card);
    color: var(--text-primary);
}

/* ============ BADGES ============ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--panel-blue-bg);
    border: 1px solid var(--panel-blue-border);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.badge-primary {
    color: var(--accent);
    border-color: rgba(0, 229, 255, 0.35);
}

.badge-success {
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.35);
}

.badge-danger {
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.35);
}

.badge-warning {
    color: var(--warning);
    border-color: rgba(245, 158, 11, 0.35);
}

.badge-neutral {
    color: var(--text-secondary);
    border-color: var(--panel-blue-border);
}

/* ============ PAGINATION ============ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--gap-md) var(--gap-lg);
    border-top: 1px solid var(--border-light);
    flex-wrap: wrap;
    gap: 10px;
}

.pagination-info {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.pagination-btns {
    display: flex;
    gap: 4px;
}

.pagination-btn {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 600;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.pagination-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.pagination-btn.active {
    background: var(--accent-gradient);
    color: white;
    border-color: var(--accent);
    box-shadow: 0 2px 8px var(--accent-glow);
}

.pagination-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ============ MODAL ============ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: linear-gradient(145deg, rgba(26, 26, 26, 0.96), rgba(18, 18, 18, 0.98));
    border: 1px solid rgba(0, 229, 255, 0.1);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 540px;
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.6), 0 0 80px rgba(0, 229, 255, 0.06);
    transform: translateY(20px) scale(0.97);
    transition: var(--transition);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    overflow: hidden;
}

.modal::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent), var(--accent-hover), transparent);
    opacity: 0.7;
}

.modal-overlay.active .modal {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    background: var(--bg);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--danger);
    border-color: var(--danger);
    background: var(--danger-light);
}

.modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 10px;
    justify-content: flex-start;
}

/* ============ PROGRESS BAR ============ */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 10px;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px var(--accent-glow);
}

/* ============ UPLOAD AREA ============ */
.upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 50px 30px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg);
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--accent);
    background: var(--accent-light);
    box-shadow: inset 0 0 30px rgba(0, 229, 255, 0.05);
}

.upload-area i {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 14px;
    display: block;
}

.upload-area h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.upload-area p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ============ EMPTY STATE ============ */
.empty-state {
    text-align: center;
    padding: 40px;
}

.empty-state i {
    font-size: 3rem;
    color: var(--text-light);
    margin-bottom: 14px;
}

.empty-state h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.empty-state p {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* ============ CHART ============ */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* ============ ACTIVITY ITEMS ============ */
.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.activity-details {
    flex: 1;
}

.activity-text {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-primary);
}

.activity-time {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ============ TOAST ============ */
.toast-container {
    position: fixed;
    top: 80px;
    left: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease-out;
    min-width: 280px;
    backdrop-filter: blur(20px);
}

.toast.success {
    border-color: var(--success);
}

.toast.success::before {
    content: '✓';
    color: var(--success);
    font-weight: 800;
}

.toast.error {
    border-color: var(--danger);
}

.toast.error::before {
    content: '✗';
    color: var(--danger);
    font-weight: 800;
}

.toast.warning {
    border-color: var(--warning);
}

.toast.warning::before {
    content: '⚠';
    color: var(--warning);
}

.toast.info {
    border-color: var(--info);
}

.toast.info::before {
    content: 'ℹ';
    color: var(--info);
}

@keyframes slideIn {
    from {
        transform: translateX(-40px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============ WELCOME SECTION ============ */
.welcome-section {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.94) 0%, rgba(18, 14, 8, 0.9) 48%, rgba(10, 8, 4, 0.95) 100%);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: var(--gap-lg);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(204, 180, 120, 0.28);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: cardFadeIn 0.6s ease both;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(204, 180, 120, 0.08);
}

.welcome-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(204, 180, 120, 0.22), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.welcome-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: 5%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(176, 148, 77, 0.16), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.welcome-icon {
    font-size: 3rem;
    margin-bottom: 8px;
}

/* ============================================
   STARRY SKY BACKGROUND WITH AURORA EFFECT
   ============================================ */

/* Starry night sky layer */
.starry-sky {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -10;
    overflow: hidden;
    background: radial-gradient(ellipse at top, #0a0620 0%, #050212 100%);
    pointer-events: none;
}

/* Aurora lights effect */
.starry-sky::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 30%, rgba(0, 229, 255, 0.12) 0%, transparent 35%),
        radial-gradient(ellipse at 80% 60%, rgba(139, 92, 246, 0.15) 0%, transparent 40%),
        radial-gradient(ellipse at 50% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 35%);
    animation: auroraMove 25s ease-in-out infinite;
    opacity: 0.6;
}

/* Aurora shimmer overlay */
.starry-sky::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(135deg, rgba(0, 229, 255, 0.03) 0%, transparent 30%, rgba(139, 92, 246, 0.04) 60%, transparent 100%);
    animation: auroraShimmer 20s ease-in-out infinite alternate;
}

/* Stars container */
.stars {
    position: absolute;
    width: 100%;
    height: 100%;
}

/* Star - base class */
.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 3px rgba(255, 255, 255, 0.8);
}

/* Generate many stars with varying sizes and positions */
.star-tiny {
    width: 1px;
    height: 1px;
    animation: twinkle 3s ease-in-out infinite;
}

.star-small {
    width: 2px;
    height: 2px;
    animation: twinkle 4s ease-in-out infinite;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.9);
}

.star-medium {
    width: 3px;
    height: 3px;
    animation: twinkle 5s ease-in-out infinite;
    box-shadow: 0 0 6px rgba(255, 255, 255, 1);
}

.star-large {
    width: 4px;
    height: 4px;
    animation: twinkle 6s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(255, 255, 255, 1);
}

/* Colored stars (aurora effect) */
.star-orange {
    background: #00E5FF;
    box-shadow: 0 0 6px rgba(0, 229, 255, 0.8);
}

.star-purple {
    background: #8B5CF6;
    box-shadow: 0 0 6px rgba(139, 92, 246, 0.8);
}

.star-blue {
    background: #3B82F6;
    box-shadow: 0 0 6px rgba(59, 130, 246, 0.8);
}

/* Shooting star */
.shooting-star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    box-shadow: 0 0 2px white, 0 0 10px rgba(255, 255, 255, 0.5);
    animation: shoot 3s linear infinite;
}

/* Animations */
@keyframes twinkle {
    0%, 100% { 
        opacity: 0.3;
        transform: scale(1);
    }
    50% { 
        opacity: 1;
        transform: scale(1.2);
    }
}

@keyframes auroraMove {
    0%, 100% {
        transform: translateX(0%) translateY(0%) rotate(0deg);
    }
    25% {
        transform: translateX(-10%) translateY(-5%) rotate(2deg);
    }
    50% {
        transform: translateX(5%) translateY(10%) rotate(-1deg);
    }
    75% {
        transform: translateX(-5%) translateY(-10%) rotate(1deg);
    }
}

@keyframes auroraShimmer {
    0% {
        opacity: 0.3;
    }
    100% {
        opacity: 0.6;
    }
}

@keyframes shoot {
    0% {
        transform: translateY(-50vh) translateX(100vw);
        opacity: 1;
    }
    70% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) translateX(-100vw);
        opacity: 0;
    }
}

.welcome-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 4px;
    position: relative;
    z-index: 1;
    color: #fff;
}

.welcome-subtitle {
    font-size: 0.9rem;
    color: rgba(204, 180, 120, 0.75);
    position: relative;
    z-index: 1;
}

/* ============ TOGGLE ============ */
.toggle {
    width: 44px;
    height: 24px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: var(--transition);
}

.toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--text-secondary);
    transition: var(--transition);
}

.toggle.active {
    background: var(--accent);
    border-color: var(--accent);
}

.toggle.active::after {
    right: 22px;
    background: white;
}

/* ============ CHECKBOX ============ */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-wrapper input[type="checkbox"] {
    accent-color: var(--accent);
    width: 16px;
    height: 16px;
}

/* Header adapts to main pane width (sidebar reduces usable space) */
@container mainpane (max-width: 1180px) {
    .header-brand-title { display: none; }
}

@container mainpane (max-width: 980px) {
    .header-news-strip { display: none; }
    .header-left { gap: 8px; }
    .header-icon { width: 36px; height: 36px; }
}

@container mainpane (max-width: 900px) {
    .header-brand-title { display: none; }
}

@container mainpane (max-width: 820px) {
    #onlinePeopleBtn,
    #pageHelpBtn,
    #pwaInstallBtn { display: none !important; }
}

@container mainpane (max-width: 680px) {
    #langBtn { display: none !important; }
    .header-user-info { display: none; }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1200px) {
    .stats-grid { grid-template-columns: repeat(3, 1fr); }
    .header-news-strip {
        max-width: 280px;
    }
    .header-brand-title { font-size: 0.95rem; padding: 5px 11px; }
    .header-search {
        width: 200px;
        flex-basis: 200px;
    }
}

@media (max-width: 1100px) {
    .header-brand-title { display: none; }
    .header-news-strip { max-width: 240px; }
    .header-left { gap: 8px; }
    .header-icon { width: 36px; height: 36px; }
}

@media (max-width: 992px) {
    .main-content {
        margin-right: 0;
        width: 100%;
    }
    .main-content::before { right: 0; }
    .grid-2 { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: 1fr 1fr; }
    .header-brand-title { display: none; }
    .header-news-strip {
        display: inline-flex;
        flex: 1 1 auto;
        min-width: 0;
        max-width: none;
        padding: 5px 8px;
        min-height: 34px;
    }
    .news-label {
        font-size: 0.65rem;
        padding: 3px 7px;
    }
    .news-label i { display: none; }
    .news-ticker-text { font-size: 0.72rem; }
    .header-search { display: none; }
    .mobile-toggle { display: flex; }
    .header { padding: 0 var(--gap-md); }
    .header-icon:not(.mobile-toggle) { display: none; }
    .header-left .header-icon { display: flex; }
    .page-title { font-size: 1.2rem; }
}

@media (max-width: 768px) {
    :root { --header-height: 56px; }

    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .form-row { grid-template-columns: 1fr; }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .page-actions { width: 100%; }
    .page-actions .btn { flex: 1; justify-content: center; }

    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .table-wrapper table { min-width: 600px; }

    .table-toolbar {
        flex-direction: column;
        gap: 8px;
    }
    .table-search { width: 100%; }
    .table-filters { width: 100%; overflow-x: auto; }

    .modal-overlay { align-items: flex-end; padding: 0; }
    .modal {
        margin: 0;
        border-radius: 16px 16px 0 0;
        max-height: 90vh;
        overflow-y: auto;
        width: 100%;
        max-width: 100%;
    }
    .modal-footer { flex-direction: column; gap: 8px; }
    .modal-footer .btn { width: 100%; justify-content: center; }

    .card { padding: var(--gap-md); }
    .stat-card { padding: 16px; }
    .stat-value { font-size: 1.6rem; }

    .btn { min-height: 42px; }
    .form-control { min-height: 44px; font-size: 16px !important; }
    select.form-control { font-size: 16px; }

    .tabs { overflow-x: auto; display: flex; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
    .tab { white-space: nowrap; padding: 8px 14px; font-size: 0.8rem; flex-shrink: 0; }

    .welcome-section { padding: 20px; }
    .welcome-title { font-size: 1.2rem; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .page-content { padding: 12px; }
    .stat-card { flex-direction: row; align-items: center; gap: 12px; }
    .stat-icon { width: 42px; height: 42px; font-size: 1.1rem; flex-shrink: 0; }
    .stat-value { font-size: 1.5rem; }

    .page-title { font-size: 1.1rem; }
    .page-title i { font-size: 1rem; }

    .header-user-info { display: none; }
    .header .header-left { gap: 6px; }

    .btn-sm { padding: 7px 12px; font-size: 0.78rem; min-height: 34px; }

    .modal { padding: var(--gap-md); }
    .modal-header { padding-bottom: 12px; }
    .modal-body { padding: 12px 0; }
    .modal-footer { padding-top: 12px; }
}

/* ============ PAGE HELP MODAL ============ */
.page-help-overlay .modal.page-help-modal {
    max-width: 640px;
    max-height: min(88vh, 820px);
    display: flex;
    flex-direction: column;
}
.page-help-overlay .modal-body {
    overflow-y: auto;
    flex: 1;
    padding: 8px 4px 16px;
}
.page-help-intro {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 16px;
    padding: 12px 14px;
    background: rgba(0, 229, 255, 0.06);
    border: 1px solid rgba(0, 229, 255, 0.12);
    border-radius: 12px;
}
.page-help-section {
    margin-bottom: 16px;
}
.page-help-section-title {
    font-size: 0.82rem;
    font-weight: 800;
    color: #7dd3fc;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.page-help-section-title i {
    font-size: 0.75rem;
    opacity: 0.85;
}
.page-help-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.page-help-list li {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.65;
    padding: 8px 12px 8px 28px;
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 10px;
}
.page-help-list li::before {
    content: '•';
    position: absolute;
    right: 12px;
    color: var(--accent);
    font-weight: 800;
}
html[dir="ltr"] .page-help-list li {
    padding: 8px 28px 8px 12px;
}
html[dir="ltr"] .page-help-list li::before {
    right: auto;
    left: 12px;
}
.page-help-role {
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.8rem;
    line-height: 1.6;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: #fcd34d;
}
.page-help-role strong { display: block; margin-bottom: 4px; }
#pageHelpBtn.header-icon-help {
    color: #7dd3fc;
    border-color: rgba(125, 211, 252, 0.25);
}
#pageHelpBtn.header-icon-help:hover {
    background: rgba(125, 211, 252, 0.12);
    color: #bae6fd;
}

@media (max-width: 360px) {
    .page-content { padding: 8px; }
    .stats-grid { gap: 8px; }
}

/* ============ LINK CALL DIALPAD (PORTED) ============ */
.link-call-modal .num-btn {
    width: 65px;
    height: 65px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin: 0 auto;
}

.link-call-modal .num-btn:hover {
    background: linear-gradient(145deg, #4facfe, #00c6ff);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.4);
    color: white;
}

.link-call-modal .num-btn:hover span {
    color: white;
}

.link-call-modal .num-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.link-call-modal .num-btn span {
    font-size: 26px;
    font-weight: 600;
    color: #fff;
    line-height: 1;
}

.link-call-modal .num-btn small {
    font-size: 10px;
    color: #4facfe;
    margin-top: 2px;
    font-weight: 500;
    line-height: 1;
}

.link-call-modal .num-btn:hover small {
    color: rgba(255, 255, 255, 0.9);
}

.link-call-start-btn:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 12px 35px rgba(79, 172, 254, 0.6) !important;
}

.link-call-del-btn:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #ff4757 !important;
}

.call-pulse-anim {
    animation: pulseCall 1.5s infinite;
}

@keyframes pulseCall {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(67, 233, 123, 0.7);
        opacity: 1;
    }

    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 15px rgba(67, 233, 123, 0);
        opacity: 0;
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(67, 233, 123, 0);
        opacity: 0;
    }
}

/* ============================================
   INTERACTIVE CANVAS PARTICLE SYSTEM
   ============================================ */
#crmParticleCanvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -5;
    pointer-events: none;
}

/* ============================================
   PREMIUM FLOATING GRADIENT ORBS
   (replaces static animated-bg orbs)
   ============================================ */
.premium-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    z-index: -6;
    pointer-events: none;
    animation: premiumOrbFloat 14s ease-in-out infinite alternate;
}
.premium-orb-1 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(0, 229, 255, 0.25), transparent 70%);
    top: -10%; right: -8%;
    animation-duration: 16s;
}
.premium-orb-2 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.2), transparent 70%);
    bottom: -15%; left: -5%;
    animation-duration: 20s;
    animation-delay: -5s;
}
.premium-orb-3 {
    width: 350px; height: 350px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15), transparent 70%);
    top: 40%; left: 40%;
    animation-duration: 12s;
    animation-delay: -3s;
}
@keyframes premiumOrbFloat {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -40px) scale(1.1); }
    66% { transform: translate(-20px, 30px) scale(0.9); }
    100% { transform: translate(-20px, 20px) scale(0.95); }
}

/* ============================================
   ENHANCED PAGE CONTENT ENTRANCE
   ============================================ */
.page-content > * {
    animation: contentFadeUp 0.5s ease both;
}
.page-content > *:nth-child(1) { animation-delay: 0.05s; }
.page-content > *:nth-child(2) { animation-delay: 0.1s; }
.page-content > *:nth-child(3) { animation-delay: 0.15s; }
.page-content > *:nth-child(4) { animation-delay: 0.2s; }
.page-content > *:nth-child(5) { animation-delay: 0.25s; }
.page-content > *:nth-child(6) { animation-delay: 0.3s; }

@keyframes contentFadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   ENHANCED TABLE WRAPPER
   ============================================ */
.table-wrapper {
    background:
        linear-gradient(145deg, rgba(20, 32, 58, 0.42) 0%, rgba(10, 18, 34, 0.34) 100%),
        repeating-linear-gradient(0deg, rgba(255,255,255,0.02) 0 1px, transparent 1px 4px),
        repeating-linear-gradient(90deg, rgba(255,255,255,0.015) 0 1px, transparent 1px 4px);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: var(--radius-lg);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    backdrop-filter: blur(10px) saturate(115%);
    -webkit-backdrop-filter: blur(10px) saturate(115%);
    box-shadow: 0 4px 24px rgba(0,0,0,0.2);
    position: relative;
}

.table-wrapper::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 229, 255,0.2), transparent);
    z-index: 1;
}

/* ============================================
   ENHANCED FORM INPUTS
   ============================================ */
.form-input:focus,
.form-select:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-light), 0 0 20px rgba(0, 229, 255,0.06);
    background: rgba(0, 229, 255, 0.02);
}

/* ============================================
   ENHANCED TABS
   ============================================ */
.tab.active {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 16px rgba(0, 229, 255, 0.35);
    position: relative;
}

/* ============================================
   GLASS BADGE GLOW
   ============================================ */
.badge-primary {
    color: var(--accent);
    border-color: rgba(0, 229, 255, 0.35);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03), 0 0 12px rgba(0, 229, 255, 0.08);
}
.badge-success {
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.35);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03), 0 0 12px rgba(16, 185, 129, 0.08);
}
.badge-danger {
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.35);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03), 0 0 12px rgba(239, 68, 68, 0.08);
}
.badge-warning {
    color: var(--warning);
    border-color: rgba(245, 158, 11, 0.35);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03), 0 0 12px rgba(245, 158, 11, 0.08);
}

/* ============================================
   STAT VALUE COUNT UP
   ============================================ */
.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 4px;
    color: var(--text-primary);
    background: linear-gradient(135deg, #fff, #ddd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   ENHANCED WELCOME HERO - LOGO SECTION
   ============================================ */
.welcome-section .welcome-logo {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    filter: drop-shadow(0 0 20px rgba(204, 180, 120, 0.45));
    animation: logoFloat 4s ease-in-out infinite;
}

.welcome-section .welcome-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ============ MOBILE BOTTOM NAV ============ */
:root {
    --mobile-bottom-nav-height: 62px;
}

.mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900;
    display: none;
    align-items: stretch;
    gap: 0;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
    background: rgba(10, 14, 22, 0.98);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.34);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.mobile-bottom-nav::-webkit-scrollbar {
    display: none;
}

.mobile-bottom-nav-item {
    flex: 0 0 auto;
    min-width: 68px;
    max-width: 92px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 8px;
    border-radius: 12px;
    color: #8ea7bc;
    text-decoration: none;
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 1.15;
    text-align: center;
    transition: color 0.2s ease, background 0.2s ease;
}

.mobile-bottom-nav-item i {
    font-size: 1.05rem;
}

.mobile-bottom-nav-img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.mobile-bottom-nav-item span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.mobile-bottom-nav-item.active {
    color: #9deeff;
    background: rgba(0, 229, 255, 0.10);
}

body.has-mobile-bottom-nav .page-content {
    padding-bottom: calc(var(--gap-lg) + var(--mobile-bottom-nav-height) + env(safe-area-inset-bottom, 0px));
}

body.has-mobile-bottom-nav .mobile-bottom-nav {
    display: flex !important;
}

@media (max-width: 1024px) {
    .mobile-bottom-nav {
        display: flex;
    }
}

body.mobile-sidebar-open .main-content,
body.mobile-sidebar-open .mobile-bottom-nav,
body.mobile-sidebar-open #mobileFabMenu {
    display: none !important;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
/* WhatsApp / complaint header notification pulse (Golden Host parity) */
.messages-dropdown .header-message-item:hover {
    background: rgba(215, 25, 32, 0.08) !important;
}

.header-icon.msg-btn-alert {
    animation: msgBtnPulse 0.55s ease-in-out 4;
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55);
}

.header-icon.notif-btn-alert {
    animation: notifBtnPulse 0.55s ease-in-out 4;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55);
}

@keyframes msgBtnPulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55); transform: scale(1); }
    50% { box-shadow: 0 0 0 10px rgba(37, 211, 102, 0); transform: scale(1.08); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); transform: scale(1); }
}

@keyframes notifBtnPulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55); transform: scale(1); }
    50% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); transform: scale(1.08); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); transform: scale(1); }
}
