/* ==========================================================================
   SIGMA OpsHub Super App - Modern CSS Design System
   ========================================================================== */

:root {
    /* Color Palette */
    --bg-dark: #0b0f19;
    --bg-card: rgba(18, 26, 44, 0.75);
    --bg-card-hover: rgba(26, 36, 60, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(99, 102, 241, 0.3);

    /* Accents */
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: rgba(99, 102, 241, 0.15);
    --secondary: #10b981;
    --secondary-hover: #059669;
    
    /* Status Colors */
    --status-todo: #64748b;
    --status-progress: #3b82f6;
    --status-done: #10b981;
    --status-overdue: #ef4444;

    /* Priorities */
    --priority-high: #f43f5e;
    --priority-med: #f59e0b;
    --priority-low: #10b981;

    /* Text Colors */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* Shadows & Glassmorphism */
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --backdrop-blur: blur(16px);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    /* Fonts */
    --font-heading: 'Outfit', -apple-system, sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, sans-serif;
}

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

body {
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* 1. DARK MODE (DEFAULT) */
body.dark-mode {
    --bg-dark: #0b0f19;
    --bg-card: rgba(18, 26, 44, 0.75);
    --bg-card-hover: rgba(26, 36, 60, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(99, 102, 241, 0.3);
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: rgba(99, 102, 241, 0.15);
    --secondary: #10b981;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 85% 85%, rgba(16, 185, 129, 0.08) 0%, transparent 40%);
    background-attachment: fixed;
}

/* 2. LIGHT MODE */
body.light-mode {
    --bg-dark: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-card-hover: rgba(255, 255, 255, 1);
    --border-color: rgba(0, 0, 0, 0.08);
    --border-highlight: rgba(79, 70, 229, 0.4);
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: rgba(79, 70, 229, 0.12);
    --secondary: #059669;
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 85% 85%, rgba(16, 185, 129, 0.06) 0%, transparent 40%);
    background-attachment: fixed;
}

body.light-mode .sidebar {
    background: rgba(255, 255, 255, 0.95);
    border-right-color: rgba(0, 0, 0, 0.08);
}
body.light-mode .form-control,
body.light-mode .form-select,
body.light-mode .search-box input {
    background: #ffffff;
    color: #0f172a;
    border-color: #cbd5e1;
}
body.light-mode .modal-card {
    background: #ffffff;
    color: #0f172a;
}
body.light-mode .kanban-column {
    background: rgba(241, 245, 249, 0.9);
}
body.light-mode .cal-day {
    background: #ffffff;
}
body.light-mode .cal-day.other-month {
    background: #f8fafc;
}
body.light-mode .nav-item {
    color: #475569;
}
body.light-mode .nav-item:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #0f172a;
}

/* 3. PINK MODE */
body.pink-mode {
    --bg-dark: #1f0b18;
    --bg-card: rgba(45, 16, 36, 0.8);
    --bg-card-hover: rgba(60, 22, 48, 0.9);
    --border-color: rgba(244, 114, 182, 0.2);
    --border-highlight: rgba(244, 114, 182, 0.5);
    --primary: #ec4899;
    --primary-hover: #db2777;
    --primary-light: rgba(236, 72, 153, 0.2);
    --secondary: #f43f5e;
    --text-primary: #fdf2f8;
    --text-secondary: #f472b6;
    --text-muted: #9d174d;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(236, 72, 153, 0.2) 0%, transparent 45%),
        radial-gradient(circle at 85% 85%, rgba(244, 114, 182, 0.12) 0%, transparent 45%);
    background-attachment: fixed;
}
body.pink-mode .sidebar {
    background: rgba(28, 10, 22, 0.92);
}

/* 4. BLUE MODE */
body.blue-mode {
    --bg-dark: #071527;
    --bg-card: rgba(14, 34, 61, 0.8);
    --bg-card-hover: rgba(20, 48, 85, 0.9);
    --border-color: rgba(56, 189, 248, 0.2);
    --border-highlight: rgba(56, 189, 248, 0.5);
    --primary: #0284c7;
    --primary-hover: #0369a1;
    --primary-light: rgba(2, 132, 199, 0.2);
    --secondary: #38bdf8;
    --text-primary: #f0f9ff;
    --text-secondary: #7dd3fc;
    --text-muted: #0284c7;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(14, 165, 233, 0.2) 0%, transparent 45%),
        radial-gradient(circle at 85% 85%, rgba(56, 189, 248, 0.12) 0%, transparent 45%);
    background-attachment: fixed;
}
body.blue-mode .sidebar {
    background: rgba(9, 23, 42, 0.92);
}

/* 5. YELLOW MODE */
body.yellow-mode {
    --bg-dark: #1c190b;
    --bg-card: rgba(43, 37, 16, 0.85);
    --bg-card-hover: rgba(60, 52, 22, 0.95);
    --border-color: rgba(245, 158, 11, 0.25);
    --border-highlight: rgba(245, 158, 11, 0.5);
    --primary: #d97706;
    --primary-hover: #b45309;
    --primary-light: rgba(245, 158, 11, 0.2);
    --secondary: #fbbf24;
    --text-primary: #fffbeb;
    --text-secondary: #fcd34d;
    --text-muted: #b45309;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(245, 158, 11, 0.18) 0%, transparent 45%),
        radial-gradient(circle at 85% 85%, rgba(251, 191, 36, 0.1) 0%, transparent 45%);
    background-attachment: fixed;
}
body.yellow-mode .sidebar {
    background: rgba(23, 20, 8, 0.92);
}

/* App Layout */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 270px;
    background: rgba(13, 18, 30, 0.9);
    border-right: 1px solid var(--border-color);
    backdrop-filter: var(--backdrop-blur);
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 100;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.brand-logo {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.brand-text h2 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.brand-text h2 span {
    color: var(--primary);
}

.badge-superapp {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--secondary);
    background: rgba(16, 185, 129, 0.15);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    margin-top: 4px;
    display: inline-block;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.nav-item.active .nav-icon {
    stroke: #fff;
}

.nav-badge {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.sidebar-footer {
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 32px 40px;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

/* Topbar */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.topbar-left h1 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 4px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box svg {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
}

.search-box input {
    background: rgba(18, 26, 44, 0.8);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 10px 16px 10px 40px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.88rem;
    width: 240px;
    transition: all 0.2s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    width: 280px;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Glass Card */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-glass);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.glass-card:hover {
    border-color: var(--border-highlight);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.45);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.14);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-outline:hover {
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-text {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.85rem;
}

.btn-text:hover {
    text-decoration: underline;
}

/* Tabs Toggle */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

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

/* KPI Cards Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.kpi-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
}

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-blue { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.icon-green { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.icon-amber { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.icon-purple { background: rgba(139, 92, 246, 0.15); color: #8b5cf6; }

.kpi-details {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.kpi-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.kpi-value {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 2px 0;
}

.kpi-trend {
    font-size: 0.75rem;
    font-weight: 500;
}

.kpi-trend.positive { color: var(--secondary); }
.kpi-trend.neutral { color: var(--text-secondary); }

.progress-bar-sm {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-top: 6px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary), #34d399);
    border-radius: var(--radius-full);
    transition: width 0.4s ease;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 1024px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .sidebar { width: 80px; padding: 16px 8px; }
    .brand-text, .nav-item span, .user-info, .badge-superapp { display: none; }
    .nav-item { justify-content: center; }
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.widget-header h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
}

.flex-row { display: flex; }
.gap-lg { gap: 24px; }
.align-center { align-items: center; }

/* Donut Chart SVG */
.donut-chart-container {
    position: relative;
    width: 130px;
    height: 130px;
    flex-shrink: 0;
}

.donut-chart {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 3.8;
}

.circle-fill {
    fill: none;
    stroke: var(--secondary);
    stroke-width: 3.8;
    stroke-linecap: round;
    transition: stroke-dasharray 0.8s ease;
}

.donut-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.donut-percent {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    display: block;
}

.donut-sub {
    font-size: 0.68rem;
    color: var(--text-muted);
}

/* Status Breakdown */
.status-breakdown {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-full);
}

.dot-done { background-color: var(--status-done); }
.dot-progress { background-color: var(--status-progress); }
.dot-todo { background-color: var(--status-todo); }
.dot-overdue { background-color: var(--status-overdue); }

.status-name { flex: 1; color: var(--text-secondary); }
.status-count { font-weight: 700; color: var(--text-primary); }

/* Workload Item */
.workload-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.workload-name { width: 110px; font-size: 0.85rem; font-weight: 500; }
.workload-bar-wrap { flex: 1; height: 8px; background: rgba(255, 255, 255, 0.08); border-radius: var(--radius-full); overflow: hidden; }
.workload-bar { height: 100%; background: var(--primary); border-radius: var(--radius-full); }
.workload-count { font-size: 0.8rem; font-weight: 600; width: 45px; text-align: right; color: var(--text-muted); }

/* Table */
.mt-lg { margin-top: 24px; }
.mt-md { margin-top: 16px; }
.subtitle-sm { font-size: 0.8rem; color: var(--text-muted); }

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.88rem;
}

.table th {
    padding: 12px 16px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Badges & Tags */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-outline {
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.badge-high { background: rgba(244, 63, 94, 0.15); color: var(--priority-high); }
.badge-med { background: rgba(245, 158, 11, 0.15); color: var(--priority-med); }
.badge-low { background: rgba(16, 185, 129, 0.15); color: var(--priority-low); }

.badge-todo { background: rgba(100, 116, 139, 0.2); color: #cbd5e1; }
.badge-progress { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.badge-done { background: rgba(16, 185, 129, 0.2); color: #34d399; }

/* Controls Bar */
.controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.view-toggle {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.toggle-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.toggle-btn.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

.form-select {
    background: rgba(18, 26, 44, 0.8);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.85rem;
    outline: none;
}

.form-select:focus {
    border-color: var(--primary);
}

/* Kanban Board */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 900px) {
    .kanban-board { grid-template-columns: 1fr; }
}

.kanban-column {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px;
    display: flex;
    flex-direction: column;
    min-height: 500px;
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.col-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.col-title h3 {
    font-size: 0.95rem;
    font-weight: 600;
}

.col-count {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-weight: 700;
}

.kanban-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

/* Kanban Card */
.task-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.task-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.task-card.priority-High::before { background-color: var(--priority-high); }
.task-card.priority-Medium::before { background-color: var(--priority-med); }
.task-card.priority-Low::before { background-color: var(--priority-low); }

.task-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-highlight);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.task-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.task-card-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.task-card-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.task-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.task-assignee {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.task-due {
    display: flex;
    align-items: center;
    gap: 4px;
}

.task-promo-tag {
    font-size: 0.7rem;
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    margin-top: 6px;
    display: inline-block;
}

/* Calendar Styling */
.calendar-wrapper {
    padding: 24px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.calendar-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.calendar-controls h2 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    min-width: 180px;
    text-align: center;
}

.calendar-legend {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.85rem;
}

.legend-item { display: flex; align-items: center; gap: 6px; color: var(--text-secondary); }
.legend-dot { width: 8px; height: 8px; border-radius: var(--radius-full); }
.task-dot { background: var(--primary); }
.promo-dot { background: #ec4899; }

.calendar-grid-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.8rem;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.calendar-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--border-color);
    margin-top: 8px;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.cal-day {
    background: rgba(15, 23, 42, 0.9);
    min-height: 110px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cal-day.other-month { opacity: 0.35; }
.cal-day.today { background: rgba(99, 102, 241, 0.08); border: 1px solid var(--primary); }

.day-number {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.cal-event {
    font-size: 0.72rem;
    padding: 3px 6px;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    font-weight: 500;
}

.cal-event.event-task { background: rgba(99, 102, 241, 0.25); color: #a5b4fc; border-left: 2px solid var(--primary); }
.cal-event.event-promo { background: rgba(236, 72, 153, 0.25); color: #f472b6; border-left: 2px solid #ec4899; }

/* Promotions Grid */
.section-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.promos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.promo-card {
    position: relative;
    overflow: hidden;
}

.promo-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.promo-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
}

.promo-dates {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.promo-linked-tasks {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
}

.promo-linked-tasks h4 {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* Modals */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    width: 100%;
    max-width: 520px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(18, 26, 44, 0.95);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.modal-header h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.btn-close:hover { color: var(--text-primary); }

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-row { display: flex; gap: 12px; }
.col-6 { flex: 1; }

.form-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-control {
    background: rgba(10, 15, 26, 0.8);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.88rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

/* Sync Option Card */
.sync-option-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: var(--radius-md);
}

.sync-icon { font-size: 1.75rem; }
.sync-info { flex: 1; }
.sync-info h4 { font-size: 0.92rem; font-weight: 600; }
.sync-info p { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }

.hidden { display: none !important; }

/* Resource Portal Styles */
.resource-filter-bar {
    margin-bottom: 24px;
}

.category-pills {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.pill-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pill-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.pill-btn.active {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
    font-weight: 600;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.resource-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 220px;
    position: relative;
    overflow: hidden;
}

.resource-badge-format {
    display: inline-block;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.format-PDF { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.format-PNG { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.format-MP4 { background: rgba(168, 85, 247, 0.2); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }
.format-ZIP { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }

.resource-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.resource-icon-box {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.resource-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.resource-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 16px;
}

.resource-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
}

.resource-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Design Approvals Module */
.badge-amber { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }

.approvals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.approval-card {
    display: flex;
    flex-direction: column;
}

.approval-preview-box {
    width: 100%;
    height: 160px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 14px;
    border: 1px solid var(--border-color);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.approval-preview-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.approval-preview-placeholder {
    font-size: 2.5rem;
}

.approval-card-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.level-path-stepper {
    margin: 14px 0;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.stepper-header {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 6px;
}

.stepper-steps {
    display: flex;
    align-items: center;
    gap: 8px;
}

.step-chip {
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
}

.step-chip.completed { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.step-chip.current { background: rgba(245, 158, 11, 0.25); color: #fbbf24; border: 1px solid #f59e0b; }

.revision-feedback-box {
    background: rgba(244, 63, 94, 0.1);
    border-left: 3px solid var(--priority-high);
    padding: 10px;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    color: #fca5a5;
    margin-bottom: 12px;
}

/* Admin Panel */
.admin-section {
    animation: fadeIn 0.2s ease;
}

.level-path-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.level-path-card-title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.level-stages-wrap {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.stage-badge {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.3);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 600;
}

/* Custom Dashboard Panel Toggle Config */
.config-toggle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}

.config-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.config-info h4 { font-size: 0.92rem; font-weight: 600; }
.config-info p { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }

/* Toggle Switch UI */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: .3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider { background-color: var(--primary); }
input:checked + .slider:before { transform: translateX(20px); }

