/* --- Premium Dark Glassmorphism CSS Design System --- */

:root {
    /* Base Color Palette */
    --bg-dark: #070a13;
    --bg-panel: rgba(13, 20, 38, 0.45);
    --bg-card: rgba(20, 30, 55, 0.6);
    --bg-input: rgba(10, 15, 30, 0.7);
    --border-color: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    
    /* Text Colors */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    
    /* Functional Colors */
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.25);
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.2);
    --warning: #f59e0b;
    --warning-glow: rgba(245, 158, 11, 0.2);
    --danger: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.25);
    
    /* Team Brand HSL Colors */
    /* HIBC-IT: Neon Blue */
    --hibc-it-primary: hsl(200, 100%, 54%);
    --hibc-it-glow: hsla(200, 100%, 54%, 0.3);
    --hibc-it-bg: hsla(200, 100%, 54%, 0.06);
    
    /* HIBC-SDEV: Purple */
    --hibc-sdev-primary: hsl(265, 90%, 64%);
    --hibc-sdev-glow: hsla(265, 90%, 64%, 0.3);
    --hibc-sdev-bg: hsla(265, 90%, 64%, 0.06);
    
    /* HDEV-IT: Emerald */
    --hdev-it-primary: hsl(150, 84%, 47%);
    --hdev-it-glow: hsla(150, 84%, 47%, 0.3);
    --hdev-it-bg: hsla(150, 84%, 47%, 0.06);
    
    /* HLGF-IT: Amber Gold */
    --hlgf-it-primary: hsl(38, 92%, 52%);
    --hlgf-it-glow: hsla(38, 92%, 52%, 0.3);
    --hlgf-it-bg: hsla(38, 92%, 52%, 0.06);

    /* UI Tokens */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    --font-sans: 'Outfit', 'Sarabun', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* --- Base Resets & Layout --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(at 0% 0%, hsla(220, 90%, 15%, 0.4) 0px, transparent 50%),
        radial-gradient(at 100% 100%, hsla(260, 80%, 12%, 0.4) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: var(--font-sans);
    min-height: 100vh;
    padding: 1.5rem;
    overflow-x: hidden;
    line-height: 1.5;
}

.app-container {
    max-width: 1720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* --- Typography --- */
h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.025em; }
h2 { font-size: 1.35rem; font-weight: 600; }
h3 { font-size: 0.95rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }

/* --- Scrollbar Customization --- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* --- Header Section --- */
.app-header {
    background: var(--bg-panel);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    padding: 1.25rem 1.75rem;
    border-radius: var(--radius-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    box-shadow: var(--shadow-md);
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}

.logo-text h1 {
    line-height: 1.2;
}

.logo-text p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.data-actions {
    display: flex;
    gap: 0.5rem;
}

/* --- Buttons System --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.15rem;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #2563eb);
    color: white;
    box-shadow: 0 4px 12px var(--primary-glow);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, #4f46e5, var(--primary));
}

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

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
    background: var(--danger);
    color: white;
    box-shadow: 0 4px 12px var(--danger-glow);
}

.btn-text {
    background: transparent;
    color: var(--text-muted);
    border: none;
    padding: 0.5rem 0.75rem;
}

.btn-text:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.04);
}

.btn-upload {
    margin-bottom: 0;
}

/* --- Stats Cards Overview --- */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.stat-card {
    background: var(--bg-panel);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}

.stat-subtext {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 0.25rem;
}

.stat-progress-bar {
    width: 85%;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.6s ease;
}

.fill-emerald { background: var(--success); box-shadow: 0 0 8px var(--success); }
.fill-violet { background: #8b5cf6; box-shadow: 0 0 8px rgba(139, 92, 246, 0.6); }

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

.icon-blue { background: rgba(59, 130, 246, 0.1); color: var(--primary); }
.icon-emerald { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.icon-amber { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.icon-violet { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }

/* --- Filter Area --- */
.filters-container {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.search-box {
    position: relative;
    flex-grow: 1;
    min-width: 280px;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    pointer-events: none;
}

.search-box input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.65rem 1rem 0.65rem 2.5rem;
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.15);
}

.filters-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.filter-item label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.filter-item select {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.55rem 1.75rem 0.55rem 0.75rem;
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
    background-size: 0.9rem;
}

.filter-item select:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.5);
}

/* --- BU Monitoring Board Grid --- */
.bu-grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    align-items: start;
}

@media (max-width: 1400px) {
    .bu-grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .bu-grid-container {
        grid-template-columns: 1fr;
    }
}

.bu-column {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 700px;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

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

.bu-title-wrapper {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.bu-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.bu-progress-radial {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: conic-gradient(rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.05) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-size: 0.75rem;
    font-weight: 700;
}

.bu-progress-radial::before {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    background: #0e1628;
    border-radius: 50%;
    z-index: 1;
}

.progress-percent {
    position: relative;
    z-index: 2;
}

.bu-sections {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    gap: 1.5rem;
    flex-grow: 1;
}

.bu-section-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    padding-bottom: 0.4rem;
}

.section-title h3 {
    color: var(--text-muted);
}

.task-count {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    padding: 0.1rem 0.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    min-height: 120px;
    transition: var(--transition);
}

/* --- Team Styling Customization --- */
/* Team 1: HIBC-IT (Blue) */
.team-hibc-it .bu-indicator {
    background: var(--hibc-it-primary);
    box-shadow: 0 0 10px var(--hibc-it-primary);
}
.team-hibc-it .bu-header {
    background: linear-gradient(to bottom, rgba(59, 130, 246, 0.03), transparent);
}
.team-hibc-it .bu-progress-radial {
    color: var(--hibc-it-primary);
}

/* Team 2: HIBC-SDEV (Purple) */
.team-hibc-sdev .bu-indicator {
    background: var(--hibc-sdev-primary);
    box-shadow: 0 0 10px var(--hibc-sdev-primary);
}
.team-hibc-sdev .bu-header {
    background: linear-gradient(to bottom, rgba(139, 92, 246, 0.03), transparent);
}
.team-hibc-sdev .bu-progress-radial {
    color: var(--hibc-sdev-primary);
}

/* Team 3: HDEV-IT (Emerald) */
.team-hdev-it .bu-indicator {
    background: var(--hdev-it-primary);
    box-shadow: 0 0 10px var(--hdev-it-primary);
}
.team-hdev-it .bu-header {
    background: linear-gradient(to bottom, rgba(16, 185, 129, 0.03), transparent);
}
.team-hdev-it .bu-progress-radial {
    color: var(--hdev-it-primary);
}

/* Team 4: HLGF-IT (Amber Gold) */
.team-hlgf-it .bu-indicator {
    background: var(--hlgf-it-primary);
    box-shadow: 0 0 10px var(--hlgf-it-primary);
}
.team-hlgf-it .bu-header {
    background: linear-gradient(to bottom, rgba(245, 158, 11, 0.03), transparent);
}
.team-hlgf-it .bu-progress-radial {
    color: var(--hlgf-it-primary);
}

/* --- Task Cards Styles --- */
.task-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.9rem 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.task-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: transparent;
    transition: var(--transition);
}

.task-card:hover {
    transform: translateY(-2.5px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
    background: rgba(28, 37, 59, 0.85);
}

/* Left side accent line per team on hover */
.team-hibc-it .task-card:hover::before { background: var(--hibc-it-primary); }
.team-hibc-sdev .task-card:hover::before { background: var(--hibc-sdev-primary); }
.team-hdev-it .task-card:hover::before { background: var(--hdev-it-primary); }
.team-hlgf-it .task-card:hover::before { background: var(--hlgf-it-primary); }

.task-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}

.task-card-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
    line-height: 1.35;
    word-break: break-word;
}

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

.task-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.25rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.task-meta-left {
    display: flex;
    gap: 0.4rem;
}

.task-assignee {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.assignee-avatar {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 700;
}

.task-due-date {
    font-size: 0.75rem;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.task-due-date.overdue {
    color: #fca5a5;
    font-weight: 500;
}

/* Badge System */
.badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
}

.badge-priority-high { background: rgba(239, 68, 68, 0.15); color: #fca5a5; }
.badge-priority-medium { background: rgba(245, 158, 11, 0.15); color: #fcd34d; }
.badge-priority-low { background: rgba(59, 130, 246, 0.15); color: #93c5fd; }

.badge-status-todo { background: rgba(255, 255, 255, 0.05); color: var(--text-muted); }
.badge-status-progress { background: rgba(59, 130, 246, 0.12); color: #60a5fa; }
.badge-status-done { background: rgba(16, 185, 129, 0.15); color: #34d399; }

/* Empty Placeholder */
.empty-task-placeholder {
    border: 1px dashed rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    font-size: 0.8rem;
    text-align: center;
    gap: 0.4rem;
}

.empty-task-placeholder svg {
    opacity: 0.4;
}

/* --- Modals --- */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(4, 7, 15, 0.75);
    backdrop-filter: blur(8px);
    -webkit-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-container {
    background: #0f162a;
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 650px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.modal-backdrop.active .modal-container {
    transform: translateY(0);
}

.modal-header {
    background: var(--bg-panel);
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

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

.modal-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.col-12 { width: 100%; }
.col-6 { width: calc(50% - 0.5rem); }
.col-4 { width: calc(33.333% - 0.667rem); }

@media (max-width: 576px) {
    .col-6, .col-4 {
        width: 100%;
    }
}

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

.form-group label .required {
    color: var(--danger);
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.65rem 0.85rem;
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.15);
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 0.95rem;
    padding-right: 2rem;
}

.form-group textarea {
    resize: vertical;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    margin-top: 0.5rem;
    padding-top: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-right {
    display: flex;
    gap: 0.5rem;
}

/* Animations and tweaks */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* --- Excel Button Styling --- */
.btn-emerald {
    background: linear-gradient(135deg, var(--success), #047857);
    color: white;
    box-shadow: 0 4px 12px var(--success-glow);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-emerald:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #059669, var(--success));
}

/* --- User Profile & Logout Area --- */
.user-profile-widget {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-left: 0.75rem;
    border-left: 1px solid var(--border-color);
    margin-left: 0.5rem;
}

.user-name-tag {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-xl);
    white-space: nowrap;
}

.btn-logout {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    background: rgba(239, 68, 68, 0.08);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.2);
}

.btn-logout:hover {
    background: var(--danger);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 10px var(--danger-glow);
}

/* --- Login Page Overlay --- */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-dark);
    background-image: 
        radial-gradient(at 0% 0%, hsla(220, 90%, 15%, 0.4) 0px, transparent 50%),
        radial-gradient(at 100% 100%, hsla(260, 80%, 12%, 0.4) 0px, transparent 50%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1.5rem;
}

.login-box {
    background: var(--bg-panel);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 420px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2.25rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.login-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.login-header h2 {
    font-size: 1.6rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-main), var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.login-body {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.login-error-msg {
    font-size: 0.8rem;
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.25);
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-md);
    text-align: center;
    font-weight: 500;
    display: none; /* Controlled by JS */
}

/* Extras and Animations */
.logo-icon-spin svg {
    animation: spin 12s linear infinite;
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}
