/* RESET & BASE STYLES */
:root {
    /* Color Palette */
    --bg-dark: #090d16;
    --bg-panel: rgba(15, 23, 42, 0.6);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Neon Highlight Accent Colors */
    --primary: #6366f1; /* Indigo */
    --primary-glow: rgba(99, 102, 241, 0.3);
    
    --accent: #f43f5e; /* Rose */
    --accent-glow: rgba(244, 63, 94, 0.3);
    
    /* Priorities & Calendar Ribbons */
    --priority-high: #ef4444; /* Red */
    --priority-high-bg: rgba(239, 68, 68, 0.15);
    
    --priority-medium: #f59e0b; /* Amber */
    --priority-medium-bg: rgba(245, 158, 11, 0.15);
    
    --priority-low: #10b981; /* Emerald */
    --priority-low-bg: rgba(16, 185, 129, 0.15);
    
    /* Leave / Holiday Types */
    --holiday-public: #ef4444;   /* Public Holiday (Red) */
    --holiday-vacation: #eab308; /* Annual Leave (Yellow) */
    --holiday-sick: #06b6d4;     /* Sick Leave (Cyan) */
    --holiday-other: #a855f7;    /* Other (Purple) */
    
    /* Glassmorphic border glow */
    --glass-glow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --glass-border: 1px solid rgba(255, 255, 255, 0.07);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Outfit', 'Sarabun', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

/* APP LAYOUT */
.app-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

/* SIDEBAR STYLES */
.sidebar {
    background-color: rgba(11, 17, 32, 0.85);
    border-right: var(--glass-border);
    display: flex;
    flex-direction: column;
    padding: 24px;
    height: 100vh;
    position: sticky;
    top: 0;
    backdrop-filter: blur(20px);
    z-index: 10;
}

.sidebar-header {
    margin-bottom: 32px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.logo-icon i {
    color: #fff;
    width: 22px;
    height: 22px;
}

.logo-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: linear-gradient(to right, #fff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-subtitle {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: auto; /* Push stats to bottom */
}

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

.nav-item i {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

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

.nav-item:hover i {
    transform: translateX(3px);
}

.nav-item.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(168, 85, 247, 0.05));
    border-left: 3px solid var(--primary);
    font-weight: 600;
}

.nav-item.active i {
    color: var(--primary);
}

/* SIDEBAR STATS WIDGET */
.sidebar-stats {
    background: rgba(255, 255, 255, 0.02);
    border: var(--glass-border);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 24px;
}

.stats-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin-bottom: 12px;
    font-weight: 600;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.stat-card:last-child {
    margin-bottom: 0;
}

.stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon.pending {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--priority-medium);
}

.stat-icon.completed {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--priority-low);
}

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

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

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

.stat-info-progress {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.progress-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.progress-bar-container {
    height: 6px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
    width: 100%;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #a855f7);
    border-radius: 3px;
    transition: width 0.6s ease;
}

.sidebar-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    border-top: var(--border-color);
    padding-top: 16px;
    margin-top: 12px;
}

.user-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    box-shadow: 0 0 8px currentColor;
}

.user-status-dot.online {
    color: #10b981;
    background-color: #10b981;
}

.user-status-dot.offline {
    color: #f59e0b;
    background-color: #f59e0b;
}

.user-status-dot.cloud {
    color: #3b82f6;
    background-color: #3b82f6;
}

.user-status-text {
    font-size: 11px;
    color: var(--text-muted);
}

/* MAIN CONTENT STYLES */
.main-content {
    padding: 32px 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    height: 100vh;
    overflow-y: auto;
}

/* TOP BAR */
.top-bar {
    display: flex;
    justify-content: flex-end; /* Push role selector to the right */
    align-items: center;
    border-bottom: var(--border-color);
    padding-bottom: 20px;
}

/* Let's make top-bar a row with left and right sections */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.view-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

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

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.date-indicator {
    background-color: rgba(255, 255, 255, 0.03);
    border: var(--glass-border);
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
}

.date-indicator i {
    width: 14px;
    height: 14px;
}

.role-selector-container {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: rgba(255, 255, 255, 0.03);
    border: var(--glass-border);
    padding: 4px 4px 4px 14px;
    border-radius: 12px;
}

.role-label {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.role-label i {
    width: 14px;
    height: 14px;
}

.role-select {
    background-color: rgba(15, 23, 42, 0.8);
    border: var(--glass-border);
    color: #fff;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.role-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

/* TAB DISPLAY */
.tab-content {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

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

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

/* BUTTONS */
.btn {
    border: none;
    outline: none;
    border-radius: 10px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 8px;
}

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

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

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: var(--glass-border);
}

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

.btn-accent {
    background: linear-gradient(135deg, #a855f7, #7c3aed);
    color: #fff;
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.25);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(168, 85, 247, 0.4);
}

.btn-danger {
    background-color: rgba(239, 68, 68, 0.15);
    color: var(--priority-high);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background-color: rgba(239, 68, 68, 0.3);
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    justify-content: center;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.03);
    border: var(--glass-border);
    color: var(--text-secondary);
}

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

.btn-icon i {
    width: 16px;
    height: 16px;
}

/* 1. CALENDAR VIEW STYLE */
.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

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

.calendar-month-year {
    font-size: 18px;
    font-weight: 700;
    min-width: 160px;
    text-align: center;
}

.calendar-actions {
    display: flex;
    gap: 10px;
}

.calendar-card {
    background: var(--bg-panel);
    border: var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-glow);
    padding: 20px;
    backdrop-filter: blur(16px);
}

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

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-auto-rows: minmax(130px, auto);
    gap: 6px;
}

.calendar-day-cell {
    background-color: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.025);
    border-radius: 12px;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    transition: all 0.25s ease;
    overflow: hidden;
    position: relative;
    min-height: 130px;
}

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

.calendar-day-cell.other-month {
    opacity: 0.3;
}

.calendar-day-cell.today {
    background-color: rgba(99, 102, 241, 0.05);
    border: 1.5px solid var(--primary);
    box-shadow: inset 0 0 10px rgba(99, 102, 241, 0.1);
}

.calendar-day-cell.selected {
    background-color: rgba(255, 255, 255, 0.06);
    border-color: var(--text-secondary);
}

.day-number-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.day-number {
    font-size: 14px;
    font-weight: 700;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.calendar-day-cell.today .day-number {
    background-color: var(--primary);
    color: #fff;
    box-shadow: 0 0 10px var(--primary-glow);
}

/* Dynamic Content in Cells */
.cell-events {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
}

.cell-events::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* Ribbons for Holidays & Leaves */
.holiday-ribbon {
    font-size: 10px;
    padding: 3px 6px;
    border-radius: 4px;
    color: #fff;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 4px;
    line-height: 1.2;
}

.holiday-ribbon.public {
    background-color: rgba(239, 68, 68, 0.25);
    border-left: 3px solid var(--holiday-public);
    color: #fca5a5;
}

.holiday-ribbon.vacation {
    background-color: rgba(234, 179, 8, 0.2);
    border-left: 3px solid var(--holiday-vacation);
    color: #fef08a;
}

.holiday-ribbon.sick {
    background-color: rgba(6, 182, 212, 0.2);
    border-left: 3px solid var(--holiday-sick);
    color: #c7d2fe;
}

.holiday-ribbon.other {
    background-color: rgba(168, 85, 247, 0.2);
    border-left: 3px solid var(--holiday-other);
    color: #e9d5ff;
}

/* Task Cards inside cells */
.calendar-task-pill {
    font-size: 10px;
    padding: 3px 6px;
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-left: 3.5px solid var(--border-col, var(--text-secondary));
    color: var(--text-primary);
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    transition: all 0.2s ease;
}

.calendar-task-pill:hover {
    background-color: rgba(255, 255, 255, 0.07);
    transform: scale(1.02);
}

.calendar-task-pill.completed {
    opacity: 0.55;
    text-decoration: line-through;
    border-left-color: var(--priority-low);
}

.task-pill-member {
    font-size: 8px;
    background-color: rgba(255, 255, 255, 0.08);
    padding: 1px 4px;
    border-radius: 3px;
    color: var(--text-secondary);
}

/* Calendar Legend Styling */
.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 16px;
    background-color: rgba(255, 255, 255, 0.01);
    padding: 12px 18px;
    border-radius: 12px;
    border: var(--glass-border);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

.legend-dot.holiday-public { background-color: var(--holiday-public); }
.legend-dot.holiday-vacation { background-color: var(--holiday-vacation); }
.legend-dot.holiday-sick { background-color: var(--holiday-sick); }
.legend-dot.priority-high { background-color: var(--priority-high); }
.legend-dot.priority-medium { background-color: var(--priority-medium); }
.legend-dot.priority-low { background-color: var(--priority-low); }

/* 2. KANBAN BOARD STYLE */
.kanban-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.kanban-filter-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.badge {
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.25);
    color: #818cf8;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}

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

.kanban-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    align-items: start;
    min-height: 600px;
}

.kanban-column {
    background-color: rgba(15, 23, 42, 0.4);
    border: var(--glass-border);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 75vh;
    transition: all 0.3s ease;
}

.kanban-column.drag-over {
    background-color: rgba(99, 102, 241, 0.05);
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

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

.column-title {
    font-size: 14px;
    font-weight: 700;
}

.column-count {
    background-color: rgba(255, 255, 255, 0.05);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    color: var(--text-secondary);
}

.kanban-column-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    flex-grow: 1;
    min-height: 150px;
    padding-bottom: 20px;
}

/* Kanban Cards styling */
.kanban-card {
    background-color: rgba(30, 41, 59, 0.55);
    border: var(--glass-border);
    border-radius: 12px;
    padding: 14px;
    cursor: grab;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    user-select: none;
    position: relative;
    overflow: hidden;
}

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

.kanban-card.dragging {
    opacity: 0.4;
    transform: scale(0.98);
}

.kanban-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.kanban-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: var(--priority-color, var(--text-secondary));
}

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

.card-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
}

.card-priority-badge {
    font-size: 9px;
    text-transform: uppercase;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

.card-priority-badge.high {
    background-color: var(--priority-high-bg);
    color: #fca5a5;
}

.card-priority-badge.medium {
    background-color: var(--priority-medium-bg);
    color: #fef08a;
}

.card-priority-badge.low {
    background-color: var(--priority-low-bg);
    color: #a7f3d0;
}

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

.card-dates-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.card-dates-row i {
    width: 12px;
    height: 12px;
}

.card-progress-section {
    margin-bottom: 14px;
}

.card-progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.card-progress-bar-bg {
    height: 4px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    overflow: hidden;
}

.card-progress-bar-fill {
    height: 100%;
    background-color: var(--primary);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.card-footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 8px;
}

.card-member-tag {
    display: flex;
    align-items: center;
    gap: 6px;
}

.member-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    background-color: var(--avatar-bg, var(--primary));
}

.member-name {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}

.btn-card-edit {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px;
    border-radius: 4px;
    transition: all 0.2s;
}

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

.btn-card-edit i {
    width: 14px;
    height: 14px;
}

/* 3. HOLIDAYS VIEW STYLES */
.holidays-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.holidays-card-panel {
    background: var(--bg-panel);
    border: var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--glass-glow);
}

.holidays-card-panel h4 {
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 600;
}

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

.holiday-item-card {
    background-color: rgba(255, 255, 255, 0.02);
    border: var(--glass-border);
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.holiday-item-card:hover {
    background-color: rgba(255, 255, 255, 0.04);
}

.holiday-item-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.holiday-item-title {
    font-size: 14px;
    font-weight: 600;
}

.holiday-item-date {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.holiday-item-date i {
    width: 10px;
    height: 10px;
}

.holiday-item-badge {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 600;
}

.holiday-item-badge.public { background-color: rgba(239, 68, 68, 0.15); color: var(--holiday-public); }
.holiday-item-badge.vacation { background-color: rgba(234, 179, 8, 0.15); color: var(--holiday-vacation); }
.holiday-item-badge.sick { background-color: rgba(6, 182, 212, 0.15); color: var(--holiday-sick); }
.holiday-item-badge.other { background-color: rgba(168, 85, 247, 0.15); color: var(--holiday-other); }

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

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

.modal-card {
    background-color: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    width: 100%;
    max-width: 550px;
    padding: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-backdrop.open .modal-card {
    transform: scale(1);
}

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

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    transition: all 0.2s;
}

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

.btn-close i {
    width: 18px;
    height: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

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

.form-group label span.required {
    color: var(--priority-high);
}

.form-group input[type="text"],
.form-group select,
.form-group textarea,
.form-group input[type="date"] {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: all 0.2s ease;
    width: 100%;
}

select option {
    background-color: #0f172a;
    color: #f8fafc;
}


.form-group input[type="text"]:focus,
.form-group select:focus,
.form-group textarea:focus,
.form-group input[type="date"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
    background-color: rgba(255, 255, 255, 0.05);
}

.form-group textarea {
    resize: vertical;
}

/* Range input styling */
.progress-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.progress-val-display {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
}

.form-group input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.08);
    outline: none;
    margin-top: 8px;
}

.form-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 0 8px var(--primary-glow);
    transition: transform 0.1s;
}

.form-group input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
    margin-top: 10px;
}

.footer-right-buttons {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

/* 4. SETTINGS VIEW STYLES */
.members-table-container table tr {
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

.members-table-container table tr:hover {
    background-color: rgba(255, 255, 255, 0.015);
}

.members-table-container table td {
    padding: 14px 8px;
    vertical-align: middle;
}

/* Color Swatches picker styling */
.color-swatch-label input[type="radio"]:checked + .color-swatch {
    border-color: #fff !important;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    transform: scale(1.15);
}

.color-swatch {
    transition: all 0.2s ease;
}

.color-swatch:hover {
    transform: scale(1.1);
}

/* LOGIN SCREEN STYLE */
.login-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-dark);
    background-image: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 80%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 1;
    transition: opacity 0.5s ease, visibility 0.5s;
    visibility: visible;
}

.login-backdrop.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.login-card {
    background-color: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(20px);
    border: var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--glass-glow);
    animation: loginCardAppear 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

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

/* Shake Animation for incorrect password */
.shake-card.shake {
    animation: shakeAnim 0.4s ease-in-out;
}

@keyframes shakeAnim {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-10px); }
    40%, 80% { transform: translateX(10px); }
}

/* Custom Multiselect Checkbox styles */
.multiselect-dropdown.open {
    display: block !important;
}

.multiselect-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-primary);
    transition: background-color 0.2s;
}

.multiselect-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.multiselect-item input[type="checkbox"] {
    accent-color: var(--primary);
    cursor: pointer;
    width: 14px;
    height: 14px;
}

.assignee-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: rgba(255, 255, 255, 0.05);
    border: var(--glass-border);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    color: var(--text-primary);
    transition: background-color 0.2s;
}

.assignee-chip:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

/* LOADING STATE SPINNER STYLES */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 11000; /* above login portal */
}

.spinner-container {
    background-color: rgba(30, 41, 59, 0.9);
    border: var(--glass-border);
    padding: 30px 40px;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--glass-glow);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(99, 102, 241, 0.2);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* RESPONSIVE LAYOUT */
@media (max-width: 1200px) {
    .kanban-board {
        grid-template-columns: repeat(2, 1fr);
    }
    .kanban-column {
        max-height: none;
    }
}

@media (max-width: 900px) {
    .app-container {
        grid-template-columns: 1fr;
    }
    .sidebar {
        display: none; /* In a real product we would have a hamburger menu, but let's optimize for desktop dashboard view as primary */
    }
}
