:root {
    /* Premium Suba-Arch iOS Dark Theme */
    --bg-main: #000000; /* Pure black for OLED iOS feel */
    --bg-sidebar: #1C1C1E; /* iOS secondary background */
    --bg-card: rgba(28, 28, 30, 0.65); /* Translucent for glass effect */
    --bg-card-hover: rgba(44, 44, 46, 0.8);
    
    --text-primary: #FFFFFF;
    --text-secondary: #8E8E93; /* iOS standard gray */
    --text-muted: #636366;
    
    /* Suba-Arch Yellow/Gold Accent */
    --primary: #F2C94C; 
    --primary-glow: rgba(242, 201, 76, 0.3);
    
    --success: #34C759; /* iOS Green */
    --warning: #FF9F0A; /* iOS Orange */
    --danger: #FF3B30; /* iOS Red */
    --info: #0A84FF; /* iOS Blue */
    
    --border: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.08);
    
    --shadow-glass: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
    
    /* iOS Rounded Corners */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 24px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Outfit', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Layout */
.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.logo {
    padding: 24px;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    border-bottom: 1px solid var(--border);
}

.logo i {
    color: var(--primary);
    font-size: 28px;
    filter: drop-shadow(0 0 8px var(--primary-glow));
}

.nav-menu {
    flex: 1;
    padding: 20px 16px;
    overflow-y: auto;
}

.nav-section {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    margin: 20px 0 10px 12px;
    letter-spacing: 1px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.nav-item i {
    font-size: 20px;
}

.nav-item:hover, .nav-item.active {
    background-color: var(--bg-card);
    color: var(--primary);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.15) 0%, transparent 100%);
    border-left: 3px solid var(--primary);
}

.user-profile {
    padding: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--info));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: white;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

.user-info .name {
    font-weight: 600;
    font-size: 14px;
}

.user-info .role {
    font-size: 12px;
    color: var(--text-muted);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* Header */
.top-header {
    padding: 24px 32px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid var(--border);
    background: rgba(11, 14, 20, 0.8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.page-title h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 4px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 14px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    padding: 8px 16px;
    border-radius: 20px;
    color: var(--text-secondary);
}

.search-bar input {
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-family: inherit;
    width: 200px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.icon-btn:hover {
    background: var(--bg-card-hover);
    color: var(--primary);
}

.primary-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

/* Sections */
.view-section {
    padding: 32px;
    animation: fadeIn 0.4s ease forwards;
}

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

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

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

.kpi-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.2);
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.icon-box.primary { background: rgba(59, 130, 246, 0.1); color: var(--primary); }
.icon-box.success { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.icon-box.danger { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.icon-box.info { background: rgba(139, 92, 246, 0.1); color: var(--info); }

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}
.badge.success { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.badge.warning { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.badge.danger { background: rgba(239, 68, 68, 0.15); color: var(--danger); }

.kpi-card h3 {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 8px;
}

.kpi-value {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
}

.kpi-value .target {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.progress-container {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-bar {
    height: 100%;
    border-radius: 3px;
    box-shadow: 0 0 10px currentColor;
}

.kpi-footer {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
}

.kpi-footer .weight {
    color: var(--text-muted);
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-glass);
}

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

.card-header h3 {
    font-size: 16px;
    font-weight: 500;
}

.glass-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    outline: none;
    font-family: inherit;
}

.chart-container {
    position: relative;
    height: 250px;
    width: 100%;
}

.score-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
}

.big-score {
    font-size: 64px;
    font-weight: 700;
    color: var(--danger);
    text-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
    line-height: 1;
    position: relative;
    margin-bottom: 16px;
}

.score-target {
    position: absolute;
    bottom: -10px;
    right: -20px;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    color: var(--text-secondary);
    font-weight: 500;
    text-shadow: none;
}

.predikat-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

.predikat-badge.grade-d {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.score-desc {
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 16px;
}

/* Kanban Board */
.kanban-header {
    margin-bottom: 24px;
}

.filters {
    display: flex;
    gap: 12px;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: rgba(255,255,255,0.05);
}

.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.kanban-board {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 16px;
    min-height: calc(100vh - 200px);
}

.kanban-column {
    flex: 1;
    min-width: 280px;
    background: rgba(18, 24, 34, 0.6);
    border-radius: 12px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

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

.column-header h3 {
    font-size: 15px;
    font-weight: 600;
}

.count {
    background: rgba(255, 255, 255, 0.1);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.column-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
}

.kanban-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 16px;
    cursor: grab;
    transition: transform 0.2s;
}

.kanban-card:active {
    cursor: grabbing;
}

.kanban-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255,255,255,0.2);
}

.kanban-card.success {
    background: linear-gradient(145deg, var(--bg-card), rgba(16, 185, 129, 0.05));
    border-left: 3px solid var(--success);
}

.card-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.tag {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
}

.source-ig { background: rgba(217, 70, 239, 0.15); color: #D946EF; }
.source-wa { background: rgba(16, 185, 129, 0.15); color: #10B981; }
.source-web { background: rgba(59, 130, 246, 0.15); color: #3B82F6; }
.source-ref { background: rgba(245, 158, 11, 0.15); color: #F59E0B; }
.type-build { border: 1px solid var(--glass-border); color: var(--text-secondary); }
.type-design { border: 1px solid var(--glass-border); color: var(--text-secondary); }

.kanban-card h4 {
    font-size: 14px;
    margin-bottom: 8px;
}

.budget {
    font-size: 13px;
    color: var(--success);
    font-weight: 500;
    margin-bottom: 12px;
}

.deal-value {
    font-size: 16px;
    font-weight: 700;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    padding-top: 12px;
}

/* Member View */
.member-profile-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
    background: var(--bg-card);
    padding: 32px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
}

.member-avatar {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--info), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: white;
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.3);
}

.member-info h2 {
    font-size: 24px;
    margin-bottom: 4px;
}

.member-info p {
    color: var(--text-secondary);
}

.member-kpi-list {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
}

.list-header, .list-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    padding: 16px 24px;
    align-items: center;
}

.list-header {
    background: rgba(0, 0, 0, 0.2);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border);
}

.list-row {
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

.list-row:last-child {
    border-bottom: none;
}

.list-row:hover {
    background: rgba(255, 255, 255, 0.02);
}

.col-indicator { font-weight: 500; }
.col-target { color: var(--text-secondary); }
.col-actual { font-weight: 600; }

/* Responsive */
@media (max-width: 1024px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

/* ================= CEO Global Dashboard ================= */
.ceo-health-banner {
    background: linear-gradient(135deg, rgba(28, 28, 30, 0.8), rgba(242, 201, 76, 0.05));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    box-shadow: var(--shadow-glass);
}

.health-score {
    display: flex;
    align-items: center;
    gap: 24px;
}

.health-number {
    font-size: 84px;
    font-weight: 700;
    line-height: 1;
    color: var(--primary);
    text-shadow: 0 0 30px var(--primary-glow);
}

.health-text h3 {
    font-size: 24px;
    margin-bottom: 4px;
}
.health-text p {
    color: var(--text-secondary);
}

.division-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.division-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: transform 0.2s ease;
}
.division-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255,255,255,0.2);
}
.div-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.div-header h4 {
    font-size: 16px;
    font-weight: 600;
}
.div-status {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 12px;
    background: rgba(255,255,255,0.1);
}

/* ================= Slide-out Internal Chat ================= */
.chat-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(2px);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.chat-overlay.active {
    opacity: 1;
    visibility: visible;
}

.chat-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    height: 100vh;
    background: rgba(20, 20, 22, 0.95);
    backdrop-filter: blur(20px);
    border-left: 1px solid var(--border);
    z-index: 100;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
}
.chat-panel.active {
    transform: translateX(0);
}

.chat-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(28, 28, 30, 0.5);
}
.chat-header h3 {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}
.online-dot {
    width: 8px; height: 8px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--success);
}
.close-chat-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    transition: color 0.2s;
}
.close-chat-btn:hover { color: white; }

.chat-body {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chat-bubble {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 85%;
}
.chat-bubble.me {
    align-self: flex-end;
}
.chat-bubble.other {
    align-self: flex-start;
}
.chat-sender {
    font-size: 11px;
    color: var(--text-muted);
    margin-left: 12px;
}
.chat-bubble.me .chat-sender {
    text-align: right;
    margin-right: 12px;
    margin-left: 0;
}
.chat-text {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.4;
}
.chat-bubble.me .chat-text {
    background: var(--primary);
    color: black;
    border-bottom-right-radius: 4px;
    font-weight: 500;
}
.chat-bubble.other .chat-text {
    background: rgba(255,255,255,0.08);
    color: white;
    border-bottom-left-radius: 4px;
}
.system-msg {
    align-self: center;
    font-size: 11px;
    color: var(--warning);
    background: rgba(255, 159, 10, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    text-align: center;
    margin: 8px 0;
}

.chat-input-area {
    padding: 16px 24px;
    border-top: 1px solid var(--glass-border);
    background: rgba(28, 28, 30, 0.5);
    display: flex;
    gap: 12px;
}
.chat-input-area input {
    flex: 1;
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 12px 16px;
    color: white;
    font-family: inherit;
    outline: none;
}
.chat-input-area button {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    color: black;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}
.chat-input-area button:hover {
    transform: scale(1.05);
}
/* Chat trigger button */
.chat-trigger {
    position: relative;
}
.chat-trigger .badge-count {
    position: absolute;
    top: 0; right: 0;
    background: var(--danger);
    color: white;
    font-size: 9px;
    font-weight: 700;
    width: 16px; height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-main);
}

/* ================= Phase 7-10 UI Components ================= */

/* Universal Clock-In Header */
.header-clock-in {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    margin-right: 16px;
}
.header-clock-in button {
    background: var(--success);
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}
.header-clock-in button:hover {
    transform: scale(1.05);
}

/* Export Buttons */
.export-btn-group {
    display: flex;
    gap: 8px;
}
.export-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.1);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}
.export-btn:hover {
    background: rgba(255,255,255,0.2);
}
.export-btn.sheets { color: #34A853; }
.export-btn.slides { color: #FBBC04; }

/* Floating AI Assistant (Apple Intelligence Style) */
.ai-floating-btn {
    position: fixed;
    bottom: 30px;
    left: 290px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1C1C1E, #2C2C2E);
    border: 2px solid transparent;
    background-clip: padding-box;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 20px rgba(242, 201, 76, 0.3);
    color: var(--primary);
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.ai-floating-btn::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    background: linear-gradient(135deg, #FF3B30, #F2C94C, #34C759, #007AFF, #AF52DE);
    z-index: -1;
    border-radius: 50%;
    animation: glow-spin 4s linear infinite;
    opacity: 0.7;
}
@keyframes glow-spin {
    100% { transform: rotate(360deg); }
}
.ai-floating-btn:hover {
    transform: scale(1.1);
}

.ai-panel {
    position: fixed;
    bottom: 100px;
    left: 290px;
    width: 350px;
    height: 450px;
    background: rgba(20, 20, 22, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    z-index: 999;
    display: flex;
    flex-direction: column;
    transform: translateY(20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.ai-panel.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}
.ai-panel-header {
    padding: 16px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(90deg, rgba(255,255,255,0.05), transparent);
}
.ai-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #F2C94C, #AF52DE);
    display: flex;
    align-items: center;
    justify-content: center;
    color: black;
    font-size: 18px;
}

/* Notifications Dropdown */
.notif-dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    width: 320px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-glass);
    z-index: 100;
    display: none;
    flex-direction: column;
}
.notif-dropdown.active {
    display: flex;
}
.notif-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--glass-border);
    font-weight: 600;
    display: flex;
    justify-content: space-between;
}
.notif-item {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.notif-item:hover { background: rgba(255,255,255,0.05); }
.notif-icon {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
}
.notif-icon.warning { background: rgba(255, 159, 10, 0.2); color: var(--warning); }
.notif-icon.danger { background: rgba(255, 59, 48, 0.2); color: var(--danger); }
.notif-icon.primary { background: rgba(242, 201, 76, 0.2); color: var(--primary); }
.notif-content h5 { font-size: 13px; margin-bottom: 4px; }
.notif-content p { font-size: 11px; color: var(--text-secondary); }

/* Chat AI Tag */
.chat-bubble .chat-text .ai-tag {
    color: var(--primary);
    font-weight: 600;
    background: rgba(242, 201, 76, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

/* ================= Phase 11: Login & RBAC ================= */
#login-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg-main);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}
.login-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    padding: 40px;
    border-radius: var(--radius-xl);
    width: 400px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.login-card h2 { margin-bottom: 8px; font-weight: 600; }
.login-card p { color: var(--text-secondary); margin-bottom: 32px; font-size: 14px; }
.login-card select {
    width: 100%;
    padding: 12px;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--glass-border);
    color: white;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    font-size: 14px;
}
.login-card button {
    width: 100%;
    justify-content: center;
}

/* Hide elements based on role via JS class toggling */
.nav-item.hidden-role {
    display: none !important;
}
.nav-section.hidden-role {
    display: none !important;
}

/* ================= Phase 11: Operations & Finance UI ================= */
.gantt-container {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    overflow-x: auto;
}
.gantt-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}
.gantt-label {
    width: 150px;
    font-size: 13px;
    font-weight: 500;
}
.gantt-track {
    flex: 1;
    height: 30px;
    background: rgba(0,0,0,0.3);
    border-radius: 15px;
    position: relative;
    border: 1px solid var(--glass-border);
}
.gantt-bar {
    position: absolute;
    height: 100%;
    border-radius: 15px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    font-size: 11px;
    font-weight: 600;
    color: black;
}
.gantt-bar.survey { background: var(--warning); left: 0%; width: 20%; }
.gantt-bar.design { background: var(--primary); left: 20%; width: 40%; }
.gantt-bar.build { background: var(--success); left: 60%; width: 40%; }

.stage-gate-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.stage {
    display: flex;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    background: rgba(255,255,255,0.02);
}
.stage.active {
    border-color: var(--primary);
    background: rgba(242, 201, 76, 0.05);
}
.stage-icon {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
}
.stage.active .stage-icon { background: var(--primary); color: black; }

/* Finance UI */
.payroll-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.payroll-table th, .payroll-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}
.payroll-table th { color: var(--text-secondary); font-weight: 500; }
.payroll-table tr:hover td { background: rgba(255,255,255,0.02); }
