/*
 * Reni Daily.AI - CSS Design System & Layouts
 * Beautiful Premium Glassmorphism, Neon Highlights, Dark Cyber Theme, 
 * Mobile Responsiveness, and Printable Stylesheets.
 */

:root {
    --bg-dark: #070b13;
    --bg-card: rgba(18, 26, 45, 0.5);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f0f4f9;
    --text-secondary: #9aa8bd;
    --accent-cyan: #00f2fe;
    --accent-blue: #4facfe;
    --accent-magenta: #ff2e93;
    --accent-amber: #ffb800;
    --accent-green: #00e676;
    --accent-purple: #c56cf0;
    --card-glow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Outfit', 'Noto Sans Thai', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.01);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-cyan);
}

/* -------------------------------------------------------------
   1. APP STRUCTURE & LAYOUT
   ------------------------------------------------------------- */

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: 280px;
    background: rgba(13, 20, 35, 0.95);
    border-right: 1px solid var(--border-color);
    padding: 24px;
    display: flex;
    flex-direction: column;
    z-index: 100;
    flex-shrink: 0;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    color: #070b13;
    font-weight: 700;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.4);
}

/* AI Processing Pulse & Glow Animations */
@keyframes aiPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 15px rgba(0, 242, 254, 0.4);
        filter: hue-rotate(0deg);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 30px rgba(255, 46, 147, 0.8), 0 0 50px rgba(0, 242, 254, 0.5);
        filter: hue-rotate(45deg);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 15px rgba(0, 242, 254, 0.4);
        filter: hue-rotate(0deg);
    }
}

.logo-icon.ai-loading, .logo-icon-sm.ai-loading {
    animation: aiPulse 1.2s infinite ease-in-out;
    background: linear-gradient(135deg, var(--accent-magenta) 0%, var(--accent-cyan) 100%) !important;
}

body.ai-processing-mode::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    box-shadow: inset 0 0 0 3px var(--accent-cyan);
    z-index: 9999;
    animation: screenGlowPulse 1.5s infinite ease-in-out;
}

@keyframes screenGlowPulse {
    0%, 100% {
        box-shadow: inset 0 0 15px rgba(0, 242, 254, 0.2), inset 0 0 0 2px var(--accent-cyan);
        opacity: 0.5;
    }
    50% {
        box-shadow: inset 0 0 35px rgba(255, 46, 147, 0.5), inset 0 0 0 3px var(--accent-magenta);
        opacity: 1;
    }
}

@keyframes sparkles-pulse {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.8; }
    50% { transform: scale(1.3) rotate(180deg); opacity: 1; filter: drop-shadow(0 0 10px var(--accent-cyan)); }
}

.lucide-animate-spin {
    animation: sparkles-pulse 1.5s infinite ease-in-out;
    display: inline-block;
}

.sidebar-logo h2 {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.sidebar-logo span {
    color: var(--accent-cyan);
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.menu-item {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 12px 16px;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
}

.menu-item i {
    width: 20px;
    height: 20px;
    transition: var(--transition);
}

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

.menu-item.active {
    background: linear-gradient(90deg, rgba(0, 242, 254, 0.1) 0%, rgba(79, 172, 254, 0.02) 100%);
    border-left: 3px solid var(--accent-cyan);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    padding-left: 13px;
    color: var(--accent-cyan);
}

.sidebar-divider {
    height: 1px;
    background: var(--border-color);
    margin: 16px 0;
}

.sidebar-section {
    margin-bottom: 24px;
}

.sidebar-section h3 {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 1px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-section h3 button {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 2px;
}

.sidebar-section h3 button:hover {
    color: var(--accent-cyan);
}

.sidebar-projects-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 180px;
    overflow-y: auto;
}

.project-item-sidebar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.project-item-sidebar:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

.project-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.settings-section .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.settings-section label {
    font-size: 11px;
    color: var(--text-secondary);
}

.input-api-wrapper {
    display: flex;
    gap: 6px;
}

.input-api-wrapper input {
    flex: 1;
    background: rgba(7, 11, 19, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 8px;
    font-size: 12px;
    font-family: inherit;
}

.input-api-wrapper input:focus {
    border-color: var(--accent-cyan);
    outline: none;
}

.input-api-wrapper button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-api-wrapper button:hover {
    background: var(--accent-cyan);
    color: #070b13;
}

.settings-section small {
    font-size: 10px;
    color: var(--text-secondary);
    line-height: 1.2;
}

.sidebar-footer {
    margin-top: auto;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Header & Navigation */
.mobile-header {
    display: none;
}

.mobile-nav-bar {
    display: none;
}

/* Main Area Layout */
.main-content {
    flex: 1;
    padding: 32px 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    overflow-y: auto;
    height: 100vh;
}

/* Global App Header inside Main */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
    flex-wrap: wrap;
    gap: 16px;
}

.header-info h1 {
    font-size: 28px;
    font-weight: 600;
    background: linear-gradient(135deg, #ffffff 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

/* Filter controls in header */
.global-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 4px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
}

.filter-item label {
    color: var(--accent-cyan);
    display: flex;
    align-items: center;
}

.filter-item select {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
}

.filter-item select:focus {
    outline: none;
}

/* -------------------------------------------------------------
   2. GLASS PANELS & REUSABLE UTILITIES
   ------------------------------------------------------------- */

.glass-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--card-glow);
    transition: var(--transition);
}

.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ai-badge {
    background: rgba(0, 242, 254, 0.1);
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 242, 254, 0.2);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px;
    color: var(--text-secondary);
    gap: 12px;
}

.empty-state i {
    width: 48px;
    height: 48px;
    color: rgba(255, 255, 255, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-blue) 100%);
    color: #070b13;
    border: none;
    border-radius: var(--border-radius);
    padding: 12px 24px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 242, 254, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 12px 24px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

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

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 50%;
    transition: var(--transition);
}

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

.w-100 {
    width: 100%;
}

/* -------------------------------------------------------------
   3. BRAIN DUMP VOICE & TEXT PARSER
   ------------------------------------------------------------- */

.parser-box {
    padding: 24px;
}

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

.recording-timer {
    font-family: monospace;
    font-size: 16px;
    color: var(--accent-magenta);
    font-weight: 700;
    animation: pulse-timer 1s infinite alternate;
}

@keyframes pulse-timer {
    from { opacity: 0.5; }
    to { opacity: 1; }
}

.parser-body {
    display: flex;
    gap: 24px;
    align-items: center;
}

/* Voice Recorder Layout */
.voice-recorder-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    max-width: 320px;
}

.record-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-magenta) 0%, var(--accent-purple) 100%);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 0 20px rgba(255, 46, 147, 0.3);
    transition: var(--transition);
}

.record-btn i {
    width: 32px;
    height: 32px;
}

.record-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255, 46, 147, 0.6);
}

/* Glowing Pulse Rings */
.record-btn .pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(255, 46, 147, 0.4);
    animation: ripple 1.5s linear infinite;
    z-index: -1;
    display: none; /* Controlled by JS during record active */
}

@keyframes ripple {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.8); opacity: 0; }
}

.record-btn.recording {
    background: var(--accent-magenta);
    animation: recording-glow 1.5s ease-in-out infinite alternate;
}

.record-btn.recording .pulse-ring {
    display: block;
}

@keyframes recording-glow {
    from { box-shadow: 0 0 15px rgba(255, 46, 147, 0.4); }
    to { box-shadow: 0 0 35px rgba(255, 46, 147, 0.8); }
}

#record-instructions {
    font-size: 13px;
    color: var(--text-secondary);
}

.waveform-canvas {
    width: 100%;
    height: 40px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    display: none; /* Managed by JS to show during record */
}

/* Separator divider */
.parser-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 120px;
    color: rgba(255, 255, 255, 0.15);
    font-size: 12px;
    position: relative;
    padding: 0 10px;
}

.parser-divider::before, .parser-divider::after {
    content: '';
    width: 1px;
    background: rgba(255, 255, 255, 0.08);
    flex: 1;
}

.parser-divider span {
    padding: 8px 0;
}

/* Quick Text Area Layout */
.text-input-area {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.text-input-area textarea {
    width: 100%;
    height: 100px;
    background: rgba(7, 11, 19, 0.4);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 16px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    resize: none;
    transition: var(--transition);
}

.text-input-area textarea:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.15);
}

.text-action-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.demo-scenarios {
    display: flex;
    align-items: center;
    gap: 10px;
}

.demo-scenarios label {
    font-size: 11px;
    color: var(--text-secondary);
}

.demo-scenarios select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
}

/* -------------------------------------------------------------
   4. TABS AND PANES (FADE TRANSITION)
   ------------------------------------------------------------- */

.tab-pane {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.tab-pane.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* -------------------------------------------------------------
   TAB 0: PREMIUM CYBER-GLASSMOPRHIC DASHBOARD
   ------------------------------------------------------------- */

.dashboard-container {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 6px 0;
    animation: fadeIn 0.5s ease-out;
}

.dashboard-kpi-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    padding: 22px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--card-glow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.kpi-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.kpi-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5), 0 0 15px 0 rgba(0, 242, 254, 0.05);
}

.kpi-card.active {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.25);
    background: rgba(255, 255, 255, 0.05);
}

.kpi-card#kpi-card-blocked.active {
    border-color: var(--accent-magenta);
    box-shadow: 0 0 20px rgba(255, 46, 147, 0.25);
}

.kpi-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.kpi-icon-wrapper i {
    width: 26px;
    height: 26px;
}

.kpi-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.kpi-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.kpi-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.kpi-sub {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 400;
}

/* 3-Column Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: start;
}

.dashboard-col {
    background: rgba(10, 16, 32, 0.35);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--card-glow);
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    min-height: 480px;
}

.dashboard-col::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 20px;
    right: 20px;
    height: 2px;
    border-radius: 4px;
}

#dash-col-daily::before {
    background: linear-gradient(90deg, var(--accent-magenta), transparent);
}

#dash-col-weekly::before {
    background: linear-gradient(90deg, var(--accent-cyan), transparent);
}

#dash-col-monthly::before {
    background: linear-gradient(90deg, var(--accent-purple), transparent);
}

.dash-col-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding-bottom: 12px;
}

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

.col-title-wrap i {
    width: 20px;
    height: 20px;
}

.col-title-wrap h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.dash-col-badge {
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}

.badge-red {
    background: rgba(255, 46, 147, 0.15);
    color: var(--accent-magenta);
}

.badge-blue {
    background: rgba(0, 242, 254, 0.15);
    color: var(--accent-cyan);
}

.badge-purple {
    background: rgba(197, 108, 240, 0.15);
    color: var(--accent-purple);
}

.dash-col-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.dash-col-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    max-height: 520px;
    padding-right: 4px;
}

.empty-state-small {
    padding: 32px 16px;
    text-align: center;
    color: rgba(255, 255, 255, 0.15);
    border: 1px dashed rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Print Signature and Executive Add-ons */
.report-signature-block {
    display: none;
    margin-top: 60px;
    page-break-inside: avoid;
    justify-content: space-between;
    gap: 40px;
}

.sig-line {
    display: flex;
    flex-direction: column;
    gap: 45px;
    font-size: 12px;
    width: 220px;
    border-top: 1px solid #777777;
    padding-top: 8px;
}

@media print {
    .report-signature-block {
        display: flex !important;
    }
}

/* -------------------------------------------------------------
   TAB 1: MINDSTREAM FEED (CHRONOLOGICAL FEED)
   ------------------------------------------------------------- */

.stream-feed-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.log-item-card {
    padding: 24px;
}

.log-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.log-time {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.log-item-body {
    margin-bottom: 20px;
}

.raw-transcript-box {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.015);
    border-left: 3px solid var(--accent-magenta);
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
}

/* Custom Audio Player Node */
.audio-player-node {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 30px;
    margin-top: 12px;
    width: fit-content;
}

.audio-player-node button {
    background: var(--accent-magenta);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.audio-player-node .play-progress {
    font-size: 11px;
    font-family: monospace;
    color: var(--text-secondary);
}

/* Dispatched tasks inside log card */
.log-dispatched-box {
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

.log-dispatched-box h4 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-cyan);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dispatched-tasks-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Standard Task Card */
.task-card {
    background: rgba(7, 11, 19, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    transition: var(--transition);
}

.task-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.task-card-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.btn-checkbox {
    background: transparent;
    border: 2px solid var(--text-secondary);
    width: 20px;
    height: 20px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    transition: var(--transition);
}

.task-card.completed .btn-checkbox {
    border-color: var(--accent-green);
    background: var(--accent-green);
    color: #070b13;
}

.task-card.completed .task-title {
    text-decoration: line-through;
    color: var(--text-secondary);
}

.task-title {
    font-size: 14px;
    font-weight: 500;
}

.task-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.project-tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    color: #070b13;
    font-weight: 600;
}

.category-tag {
    font-size: 11px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 2px 8px;
    border-radius: 12px;
    color: var(--text-secondary);
}

.due-tag {
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.due-tag.overdue {
    color: var(--accent-magenta);
}

.due-tag.today {
    color: var(--accent-amber);
}

.due-tag.upcoming {
    color: var(--accent-blue);
}

.project-source-tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.project-source-tag.true-source {
    background: rgba(0, 230, 118, 0.1);
    color: var(--accent-green);
    border: 1px solid rgba(0, 230, 118, 0.2);
}

.project-source-tag.direct-source {
    background: rgba(197, 108, 240, 0.1);
    color: var(--accent-purple);
    border: 1px solid rgba(197, 108, 240, 0.2);
}

.assignee-tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.assignee-tag.safe-tag {
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.2), rgba(79, 172, 254, 0.2));
    color: #fff;
    text-shadow: 0 0 4px rgba(0, 242, 254, 0.8);
    border: 1px solid rgba(0, 242, 254, 0.6);
    box-shadow: 0 0 8px rgba(0, 242, 254, 0.4);
}

.assignee-tag.ju-tag {
    background: linear-gradient(135deg, rgba(255, 184, 0, 0.2), rgba(255, 46, 147, 0.2));
    color: #fff;
    text-shadow: 0 0 4px rgba(255, 184, 0, 0.8);
    border: 1px solid rgba(255, 184, 0, 0.6);
    box-shadow: 0 0 8px rgba(255, 184, 0, 0.4);
}

.assignee-tag.new-tag {
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.2), rgba(197, 108, 240, 0.2));
    color: #fff;
    text-shadow: 0 0 4px rgba(79, 172, 254, 0.8);
    border: 1px solid rgba(79, 172, 254, 0.6);
    box-shadow: 0 0 8px rgba(79, 172, 254, 0.4);
}

.assignee-tag.other-tag {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.waiting-tag {
    font-size: 11px;
    background: rgba(255, 46, 147, 0.1);
    color: var(--accent-magenta);
    border: 1px solid rgba(255, 46, 147, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.task-actions {
    display: flex;
    gap: 4px;
}

/* -------------------------------------------------------------
   TAB 2: CALENDAR DASHBOARD
   ------------------------------------------------------------- */

.calendar-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.calendar-main {
    padding: 24px;
}

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

.calendar-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.calendar-grid-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-weight: 600;
}

.calendar-grid-cells {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-cell {
    min-height: 80px;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 6px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
}

.calendar-cell:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

.calendar-cell.inactive {
    opacity: 0.3;
}

.calendar-cell.active-day {
    border-color: var(--accent-cyan);
    background: rgba(0, 242, 254, 0.02);
}

.calendar-cell.today-cell {
    border: 2px solid var(--accent-blue);
}

.cell-num {
    font-size: 12px;
    font-weight: 600;
    align-self: flex-end;
}

.cell-indicators {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 4px;
}

.cell-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

/* Side day drawer */
.day-task-drawer {
    padding: 24px;
    height: 100%;
}

.day-task-drawer h3 {
    font-size: 18px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.day-tasks-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
}

.empty-text {
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
    padding: 24px 0;
}

.unscheduled-tasks-panel {
    background: rgba(13, 20, 35, 0.4);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
}

.unscheduled-tasks-panel h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.unscheduled-tasks-panel .unscheduled-tasks-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 4px;
}

.mt-4 {
    margin-top: 16px;
}


/* -------------------------------------------------------------
   TAB 3: KANBAN BOARD
   ------------------------------------------------------------- */

.quick-add-todo-bar {
    padding: 16px;
    background: rgba(13, 20, 35, 0.4);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.quick-add-inputs {
    display: flex;
    gap: 12px;
    align-items: center;
}

.quick-add-inputs input {
    flex: 2;
    background: rgba(7, 11, 19, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
}

.quick-add-inputs input:focus {
    border-color: var(--accent-cyan);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 242, 254, 0.2);
}

.quick-add-inputs select {
    flex: 1;
    background: rgba(7, 11, 19, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}

.quick-add-inputs select:focus {
    border-color: var(--accent-magenta);
    outline: none;
}

.quick-add-inputs button {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.kanban-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.kanban-column {
    background: rgba(13, 20, 35, 0.4);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 500px;
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.column-header h3 {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.column-header .badge {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.pending-dot { background: var(--accent-cyan); }
.completed-dot { background: var(--accent-green); }

.kanban-cards-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    overflow-y: auto;
    max-height: 600px;
}

/* -------------------------------------------------------------
   TAB 4: PROJECT MATRIX
   ------------------------------------------------------------- */

.project-matrix-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.project-card {
    padding: 24px;
    border-top: 4px solid var(--accent-cyan);
}

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

.project-title h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.project-title span {
    font-size: 11px;
    font-family: monospace;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
}

/* -------------------------------------------------------------
   7. PRINTING EXECUTIVE REPORT STYLESHEET
   ------------------------------------------------------------- */

@media print {
    /* Hide everything that is NOT the report preview content */
    body {
        background: #ffffff !important;
        color: #000000 !important;
        font-family: 'Inter', 'Noto Sans Thai', sans-serif;
        font-size: 12pt;
    }

    .sidebar, .mobile-header, .mobile-nav-bar, .app-header, 
    .brain-dump-container, .report-config, .preview-header,
    .modal-overlay {
        display: none !important;
    }

    .app-container {
        display: block;
    }

    .main-content {
        padding: 0 !important;
        height: auto !important;
        overflow: visible !important;
    }

    .tab-view-container {
        display: block !important;
    }

    .tab-pane {
        display: none !important;
    }

    #tab-reports {
        display: block !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .report-layout {
        display: block !important;
    }

    .report-preview {
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
        padding: 0 !important;
        backdrop-filter: none !important;
    }

    .preview-content-box {
        background: transparent !important;
        border: none !important;
        color: #000000 !important;
        padding: 0 !important;
        max-height: none !important;
        overflow: visible !important;
    }

    /* Executive report printable aesthetics */
    .executive-report-rendered {
        color: #000000 !important;
    }

    .executive-report-rendered h1 {
        font-size: 24pt !important;
        color: #000000 !important;
        font-weight: 700;
        border-bottom: 2pt solid #000000;
        padding-bottom: 8px;
    }

    .executive-report-rendered h2 {
        font-size: 14pt !important;
        color: #000000 !important;
        border-left: 4pt solid #555555 !important;
        padding-left: 8pt !important;
        margin-top: 24pt !important;
        page-break-after: avoid;
    }

    .executive-report-rendered th {
        background: #f0f0f0 !important;
        color: #000000 !important;
        border-bottom: 1pt solid #000000 !important;
    }

    .executive-report-rendered td {
        border-bottom: 0.5pt solid #dddddd !important;
        color: #000000 !important;
    }

    .executive-report-rendered td .status-indicator {
        border: 1px solid #777777 !important;
        background: transparent !important;
        color: #000000 !important;
        font-weight: 600;
    }
}
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--text-secondary);
}

.project-progress-circle {
    position: relative;
    width: 48px;
    height: 48px;
}

.project-progress-circle svg {
    width: 48px;
    height: 48px;
    transform: rotate(-90deg);
}

.project-progress-circle circle {
    fill: none;
    stroke-width: 4;
}

.project-progress-circle .circle-bg {
    stroke: rgba(255, 255, 255, 0.05);
}

.project-progress-circle .circle-val {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    transition: stroke-dashoffset 1s ease;
}

.progress-text {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

.project-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.project-stat-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: 8px;
}

.project-stat-item label {
    font-size: 11px;
    color: var(--text-secondary);
    display: block;
}

.project-stat-item span {
    font-size: 16px;
    font-weight: 600;
}

/* -------------------------------------------------------------
   TAB 5: EXPORT & REPORT LAYOUT
   ------------------------------------------------------------- */

.report-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 24px;
}

.report-config {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.report-config h3 {
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 120px;
    overflow-y: auto;
    background: rgba(7, 11, 19, 0.3);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.checkbox-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    background: rgba(7, 11, 19, 0.3);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.checkbox-group label, .checkbox-grid label {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-secondary);
}

.checkbox-group input[type="checkbox"], .checkbox-grid input[type="checkbox"] {
    accent-color: var(--accent-cyan);
}

.form-group select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
}

/* Report Preview Node */
.report-preview {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 500px;
}

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

.preview-actions {
    display: flex;
    gap: 8px;
}

.preview-content-box {
    background: rgba(7, 11, 19, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 24px;
    flex: 1;
    overflow-y: auto;
    max-height: 520px;
}

.report-empty-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: var(--text-secondary);
    gap: 12px;
}

.report-empty-preview i {
    width: 48px;
    height: 48px;
    color: rgba(255, 255, 255, 0.05);
}

/* Rendered Executive Report styles */
.executive-report-rendered {
    color: #ffffff;
    line-height: 1.6;
}

.executive-report-rendered h1 {
    font-size: 22px;
    text-align: center;
    margin-bottom: 6px;
    color: var(--accent-cyan);
}

.executive-report-rendered .report-meta {
    font-size: 12px;
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.executive-report-rendered h2 {
    font-size: 16px;
    border-left: 3px solid var(--accent-blue);
    padding-left: 8px;
    margin: 20px 0 10px 0;
    color: #ffffff;
}

.executive-report-rendered table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
}

.executive-report-rendered th, .executive-report-rendered td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 13px;
}

.executive-report-rendered th {
    background: rgba(255, 255, 255, 0.02);
    color: var(--accent-cyan);
    font-weight: 600;
}

.executive-report-rendered td .status-indicator {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
}

.executive-report-rendered td .status-indicator.pending {
    background: rgba(0, 242, 254, 0.1);
    color: var(--accent-cyan);
}

.executive-report-rendered td .status-indicator.completed {
    background: rgba(0, 230, 118, 0.1);
    color: var(--accent-green);
}

/* -------------------------------------------------------------
   5. MODAL SYSTEM
   ------------------------------------------------------------- */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(7, 11, 19, 0.85);
    backdrop-filter: blur(8px);
    display: none; /* JS toggled */
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    width: 100%;
    max-width: 480px;
    padding: 24px;
}

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

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

.modal-body input[type="text"] {
    background: rgba(7, 11, 19, 0.5);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    width: 100%;
}

.modal-body input[type="text"]:focus {
    outline: none;
    border-color: var(--accent-cyan);
}

.modal-body input[type="color"] {
    background: transparent;
    border: none;
    width: 50px;
    height: 40px;
    cursor: pointer;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* -------------------------------------------------------------
   6. MOBILE RESPONSIVE ADAPTATIONS
   ------------------------------------------------------------- */

@media (max-width: 1024px) {
    .calendar-layout, .report-layout {
        grid-template-columns: 1fr;
    }
    .calendar-side-panel {
        margin-top: 16px;
    }
}

@media (max-width: 768px) {
    /* Hide desktop Sidebar */
    .sidebar {
        display: none;
    }

    /* Show mobile top Header */
    .mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: #0d1423;
        border-bottom: 1px solid var(--border-color);
        padding: 16px 24px;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        height: 60px;
    }

    .mobile-logo {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .logo-icon-sm {
        width: 32px;
        height: 32px;
        border-radius: 8px;
        background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
        color: #070b13;
        font-weight: 700;
        font-size: 18px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-logo h2 {
        font-size: 17px;
        font-weight: 600;
    }

    .mobile-logo span {
        color: var(--accent-cyan);
    }

    .mobile-menu-btn {
        background: transparent;
        border: none;
        color: var(--text-primary);
        cursor: pointer;
    }

    /* Sidebar as overlay on mobile if toggled */
    .sidebar.mobile-open {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        background: #0d1423;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.7);
        animation: slide-in 0.3s forwards;
    }

    @keyframes slide-in {
        from { transform: translateX(-100%); }
        to { transform: translateX(0); }
    }

    /* Relocate Main panel offset for mobile */
    .main-content {
        padding: 80px 16px 80px 16px; /* Offset top for Header, bottom for Bottom bar */
        height: calc(100vh - 60px);
    }

    .app-header {
        gap: 8px;
    }

    .header-info h1 {
        font-size: 22px;
    }

    .global-filters {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    /* Core Parser Layout Mobile */
    .parser-body {
        flex-direction: column;
    }

    .voice-recorder-area {
        max-width: 100%;
        width: 100%;
    }

    .parser-divider {
        flex-direction: row;
        width: 100%;
        height: auto;
        padding: 10px 0;
    }

    .parser-divider::before, .parser-divider::after {
        width: auto;
        height: 1px;
    }

    .parser-divider span {
        padding: 0 12px;
    }

    /* Show Mobile Bottom Navigation */
    .mobile-nav-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(13, 20, 35, 0.95);
        border-top: 1px solid var(--border-color);
        height: 64px;
        z-index: 1000;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        justify-content: space-around;
        align-items: center;
    }

    .mobile-nav-item {
        background: transparent;
        border: none;
        color: var(--text-secondary);
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        font-family: inherit;
        font-size: 11px;
        cursor: pointer;
        padding: 8px;
        flex: 1;
    }

    .mobile-nav-item.active {
        color: var(--accent-cyan);
    }

    .mobile-nav-item i {
        width: 20px;
        height: 20px;
        transition: var(--transition);
    }

    .mobile-nav-item.active i {
        transform: translateY(-2px);
    }

    /* Kanban on Mobile - Single Column visible or stacked */
    .kanban-layout {
        grid-template-columns: 1fr;
    }

    .kanban-column {
        min-height: auto;
    }
}

/* -------------------------------------------------------------
   6. PREMIUM LIGHT GLASSMORPHIC THEME OVERRIDES
   ------------------------------------------------------------- */
body.light-theme {
    --bg-dark: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.65);
    --border-color: rgba(0, 0, 0, 0.06);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --card-glow: 0 10px 30px -10px rgba(100, 116, 139, 0.12), 0 1px 3px rgba(100, 116, 139, 0.05);
    background-color: var(--bg-dark);
}

/* Sidebar styling for light theme */
body.light-theme .sidebar {
    background: rgba(255, 255, 255, 0.85);
    border-right: 1px solid rgba(0, 0, 0, 0.06);
}

body.light-theme .menu-item {
    color: #334155;
}

body.light-theme .menu-item:hover {
    background: rgba(79, 172, 254, 0.1);
    color: #0284c7;
}

body.light-theme .menu-item.active {
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.15), rgba(0, 242, 254, 0.15));
    color: #0284c7;
}

/* Quick filters & input styling */
body.light-theme input[type="text"],
body.light-theme input[type="date"],
body.light-theme select,
body.light-theme textarea {
    background: rgba(255, 255, 255, 0.9) !important;
    color: #0f172a !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
}

body.light-theme input::placeholder,
body.light-theme textarea::placeholder {
    color: #94a3b8 !important;
}

body.light-theme input[type="text"]:focus,
body.light-theme select:focus,
body.light-theme textarea:focus {
    border-color: var(--accent-blue) !important;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.25) !important;
}

body.light-theme .filter-item {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

body.light-theme .filter-item select {
    background: transparent !important;
    border: none !important;
}

/* Stream Log layout & boxes */
body.light-theme .raw-transcript-box {
    background: rgba(0, 0, 0, 0.02) !important;
    color: #334155 !important;
    border-left: 3px solid var(--accent-blue) !important;
}

body.light-theme .log-dispatched-box {
    background: rgba(0, 0, 0, 0.01) !important;
    border-top: 1px solid rgba(0, 0, 0, 0.05) !important;
}

body.light-theme .log-dispatched-box h4 {
    color: #475569;
}

body.light-theme .task-card-mini {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    box-shadow: 0 2px 8px rgba(100, 116, 139, 0.06) !important;
}

body.light-theme .task-card-mini:hover {
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.1) !important;
}

body.light-theme .task-title {
    color: #1e293b;
}

body.light-theme .task-meta {
    color: #64748b;
}

/* Calendar elements */
body.light-theme .calendar-grid .day-cell {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(0, 0, 0, 0.04);
    color: #334155;
}

body.light-theme .calendar-grid .day-cell.today {
    background: rgba(0, 242, 254, 0.08);
    border-color: var(--accent-cyan);
    color: #0f172a;
    font-weight: 700;
}

body.light-theme .calendar-grid .day-cell.other-month {
    color: #cbd5e1;
    background: rgba(0, 0, 0, 0.01);
}

body.light-theme .calendar-grid .day-cell.has-tasks {
    background: rgba(79, 172, 254, 0.04);
}

/* Kanban System */
body.light-theme .kanban-column {
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

body.light-theme .column-header h3 {
    color: #1e293b;
}

/* Dashboard */
body.light-theme .dashboard-column h3 {
    color: #1e293b;
}

body.light-theme .stat-card {
    background: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

body.light-theme .stat-number {
    color: #0f172a;
}

/* Modal windows */
body.light-theme .modal-box {
    background: rgba(255, 255, 255, 0.98);
    color: #0f172a;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

body.light-theme .modal-header h3 {
    color: #0f172a;
}

body.light-theme .modal-body label {
    color: #334155;
}

/* Mobile responsive bars */
body.light-theme .mobile-header {
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    color: #0f172a;
}

body.light-theme .mobile-header h2 {
    color: #0f172a;
}

body.light-theme .mobile-bottom-nav {
    background: rgba(255, 255, 255, 0.95);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

body.light-theme .mobile-nav-item {
    color: #64748b;
}

body.light-theme .mobile-nav-item.active {
    color: var(--accent-blue);
}

/* Micro-animations */
@keyframes spin-slow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.spin-slow {
    animation: spin-slow 2s linear infinite;
}

/* Theme Toggle Icons */
body.light-theme #btn-theme-toggle .sun-icon {
    display: none !important;
}
body.light-theme #btn-theme-toggle .moon-icon {
    display: block !important;
}
body:not(.light-theme) #btn-theme-toggle .sun-icon {
    display: block !important;
}
body:not(.light-theme) #btn-theme-toggle .moon-icon {
    display: none !important;
}

/* System Update Logs Box inside Stream Cards */
.system-updates-box {
    margin-top: 14px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.015);
    border: 1px dashed rgba(255, 255, 255, 0.08);
    border-radius: 8px;
}
.system-updates-box h5 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-magenta);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
}
.system-updates-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.system-updates-list li {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.4;
}
.system-updates-list li i {
    width: 14px;
    height: 14px;
    margin-top: 2px;
    flex-shrink: 0;
}
.system-updates-list li span {
    word-break: break-word;
}

/* Progress Ring Styles */
.progress-ring {
    transform: rotate(0deg);
}
.progress-ring-circle {
    filter: drop-shadow(0 0 6px rgba(0, 242, 254, 0.6));
    transition: stroke-dashoffset 0.35s ease-in-out;
}
.progress-ring-circle-bg {
    stroke: rgba(255, 255, 255, 0.05);
}
body.light-theme .progress-ring-circle-bg {
    stroke: rgba(0, 0, 0, 0.05);
}

/* Global Search Input styles inside filters */
.filter-item.search-filter {
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(0, 242, 254, 0.2);
    transition: all 0.3s ease;
}
.filter-item.search-filter:focus-within {
    background: rgba(0, 242, 254, 0.03);
    border: 1px solid var(--accent-cyan);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.15);
}
body.light-theme .filter-item.search-filter {
    background: rgba(0, 0, 0, 0.02);
    border: 1px dashed rgba(0, 180, 216, 0.3);
}
body.light-theme .filter-item.search-filter:focus-within {
    background: rgba(0, 180, 216, 0.04);
    border: 1px solid #00b4d8;
}

/* Overdue Task cards styles inside modal */
.overdue-conflict-card {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.overdue-conflict-card .overdue-badge {
    background: rgba(255, 46, 147, 0.08);
    color: var(--accent-magenta);
    border: 1px solid rgba(255, 46, 147, 0.2);
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
}
.overdue-conflict-card select.overdue-reschedule-select {
    padding: 8px 12px;
    background: rgba(7, 11, 19, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    min-width: 140px;
}
body.light-theme .overdue-conflict-card select.overdue-reschedule-select {
    background: #ffffff;
    color: #0f172a;
}
.overdue-action-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px dashed rgba(255, 255, 255, 0.06);
    padding-top: 10px;
    flex-wrap: wrap;
    gap: 12px;
}
body.light-theme .overdue-action-row {
    border-top: 1px dashed rgba(0, 0, 0, 0.06);
}

/* Mobile responsive fixes */
@media (max-width: 768px) {
    .global-filters {
        gap: 8px;
    }
    .filter-item.search-filter {
        max-width: 100%;
        width: 100%;
    }
    .overdue-action-row {
        flex-direction: column;
        align-items: stretch;
    }
    .overdue-action-row select.overdue-reschedule-select {
        width: 100%;
    }
}

/* Sales Reps Assignee Quick Filters on Dashboard */
.dashboard-assignee-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}
.assignee-tabs-title {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-secondary);
    width: 100%;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.assignee-tab-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 30px;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}
.assignee-tab-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}
.assignee-tab-btn.active {
    background: rgba(0, 242, 254, 0.08);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    font-weight: 700;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.15);
}
body.light-theme .assignee-tab-btn {
    background: rgba(0, 0, 0, 0.02);
    color: #64748b;
    border-color: rgba(0, 0, 0, 0.08);
}
body.light-theme .assignee-tab-btn:hover {
    background: rgba(0, 0, 0, 0.04);
    color: #0f172a;
}
body.light-theme .assignee-tab-btn.active {
    background: rgba(0, 180, 216, 0.08);
    border-color: #00b4d8;
    color: #00b4d8;
    box-shadow: 0 0 8px rgba(0, 180, 216, 0.12);
}



