/* Root Variables & Color Tokens */
:root {
    /* Color Palette */
    --bg-dark-base: #0b0f19;
    --bg-dark-surface: #121826;
    --bg-glass-card: rgba(18, 24, 38, 0.7);
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glass-focus: rgba(99, 102, 241, 0.4);
    
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    /* Branding */
    --accent-indigo: #6366f1;
    --accent-violet: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, var(--accent-indigo) 0%, var(--accent-violet) 100%);
    --accent-glow: rgba(99, 102, 241, 0.25);
    
    /* Status Colors */
    --status-todo: #3b82f6;
    --status-todo-glow: rgba(59, 130, 246, 0.15);
    --status-progress: #f59e0b;
    --status-progress-glow: rgba(245, 158, 11, 0.15);
    --status-review: #a855f7;
    --status-review-glow: rgba(168, 85, 247, 0.15);
    --status-completed: #10b981;
    --status-completed-glow: rgba(16, 185, 129, 0.15);
    --status-overdue: #ef4444;
    --status-overdue-glow: rgba(239, 68, 68, 0.15);
    
    /* Avatar Colors */
    --theme-purple: #8b5cf6;
    --theme-blue: #3b82f6;
    --theme-cyan: #06b6d4;
    --theme-emerald: #10b981;
    --theme-amber: #f59e0b;
    --theme-crimson: #ef4444;

    /* Typo & Layout Constants */
    --font-sans: 'Inter', 'Noto Sans Thai', sans-serif;
    --sidebar-width: 280px;
    --header-height: 80px;
    --border-radius-lg: 16px;
    --border-radius-md: 10px;
    --border-radius-sm: 6px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-premium: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-dark-base);
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.12) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.1) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark-base);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-sm);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

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

/* Sidebar Navigation */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(10, 14, 23, 0.95);
    border-right: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.sidebar-brand {
    height: var(--header-height);
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-glass);
}

.brand-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-md);
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 0 15px var(--accent-glow);
}

.brand-name {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
}

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

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

.nav-section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
    padding-left: 12px;
    margin-bottom: 8px;
    font-weight: 600;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--border-radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

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

.nav-item.active {
    color: #fff;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.2);
    box-shadow: inset 0 0 10px rgba(99, 102, 241, 0.1);
}

.nav-item i {
    width: 20px;
    height: 20px;
}

.sidebar-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-glass);
}

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

.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

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

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

/* Main Content Area */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-header {
    height: var(--header-height);
    border-bottom: 1px solid var(--border-glass);
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(10, 14, 23, 0.4);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 90;
}

.header-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}

.header-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

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

/* Profile Switcher */
.profile-switcher-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.switcher-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.select-container {
    position: relative;
    display: flex;
    align-items: center;
}

.select-container select {
    appearance: none;
    background: var(--bg-dark-surface);
    border: 1px solid var(--border-glass);
    color: #fff;
    padding: 10px 40px 10px 16px;
    border-radius: var(--border-radius-md);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.select-container select:focus {
    outline: none;
    border-color: var(--border-glass-focus);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.15);
}

.select-arrow {
    position: absolute;
    right: 14px;
    color: var(--text-secondary);
    pointer-events: none;
    width: 16px;
    height: 16px;
}

/* Glassmorphism Card Style */
.glass {
    background: var(--bg-glass-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-premium);
}

/* Content Body */
.content-body {
    padding: 40px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* View Panels */
.view-panel {
    display: none;
    animation: fadeIn 0.4s ease-out forwards;
    flex: 1;
}

.view-panel.active {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

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

/* Metrics Cards */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.metric-card {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition-smooth);
}

.metric-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.15);
}

.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.25rem;
}

.metric-icon i {
    width: 22px;
    height: 22px;
}

.metric-icon.blue { background: rgba(59, 130, 246, 0.15); border: 1px solid rgba(59, 130, 246, 0.3); color: #3b82f6; }
.metric-icon.amber { background: rgba(245, 158, 11, 0.15); border: 1px solid rgba(245, 158, 11, 0.3); color: #f59e0b; }
.metric-icon.purple { background: rgba(168, 85, 247, 0.15); border: 1px solid rgba(168, 85, 247, 0.3); color: #a855f7; }
.metric-icon.emerald { background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.3); color: #10b981; }
.metric-icon.crimson { background: rgba(239, 68, 68, 0.15); border: 1px solid rgba(239, 68, 68, 0.3); color: #ef4444; }

.error-card {
    border: 1px solid rgba(239, 68, 68, 0.15);
    background: rgba(239, 68, 68, 0.04);
}

.metric-value {
    display: block;
    font-size: 1.85rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

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

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

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

.chart-card {
    padding: 30px;
    min-height: 350px;
    display: flex;
    flex-direction: column;
}

.chart-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 24px;
}

.chart-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* SVG Chart styles */
.chart-svg {
    width: 100%;
    height: 100%;
    max-height: 250px;
}

/* Tables Layout */
.dashboard-tables-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 1024px) {
    .dashboard-tables-grid {
        grid-template-columns: 1fr;
    }
}

.table-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: hidden;
}

.table-card.full-width {
    grid-column: span 2;
}

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

.table-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-card-title i {
    width: 20px;
    height: 20px;
}

.icon-urgent { color: var(--status-overdue); }
.icon-review { color: var(--status-review); }

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

.app-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

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

.app-table td {
    padding: 16px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.app-table tbody tr {
    transition: var(--transition-smooth);
}

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

.text-right {
    text-align: right;
}

/* Badge styling */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge.todo { background: var(--status-todo-glow); color: var(--status-todo); border: 1px solid rgba(59, 130, 246, 0.2); }
.badge.progress { background: var(--status-progress-glow); color: var(--status-progress); border: 1px solid rgba(245, 158, 11, 0.2); }
.badge.review { background: var(--status-review-glow); color: var(--status-review); border: 1px solid rgba(168, 85, 247, 0.2); }
.badge.completed { background: var(--status-completed-glow); color: var(--status-completed); border: 1px solid rgba(16, 185, 129, 0.2); }
.badge.overdue { background: var(--status-overdue-glow); color: var(--status-overdue); border: 1px solid rgba(239, 68, 68, 0.2); }

.badge.priority-high { background: rgba(239, 68, 68, 0.1); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.2); }
.badge.priority-medium { background: rgba(245, 158, 11, 0.1); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.2); }
.badge.priority-low { background: rgba(59, 130, 246, 0.1); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.2); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--border-radius-md);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    color: #fff;
}

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

.btn-primary {
    background: var(--accent-gradient);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

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

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

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

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

.btn-block {
    display: flex;
    width: 100%;
}

.btn-icon-only {
    padding: 8px;
    border-radius: var(--border-radius-sm);
}

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

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

/* Filter Bar */
.filter-bar {
    padding: 20px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

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

.filter-group label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.filter-group.search {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.filter-group.search input {
    width: 100%;
    background: var(--bg-dark-surface);
    border: 1px solid var(--border-glass);
    padding: 10px 16px 10px 42px;
    border-radius: var(--border-radius-md);
    color: #fff;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.filter-group.search input:focus {
    outline: none;
    border-color: var(--border-glass-focus);
}

.search-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    width: 18px;
    height: 18px;
}

.filter-group select {
    background: var(--bg-dark-surface);
    border: 1px solid var(--border-glass);
    color: #fff;
    padding: 10px 16px;
    border-radius: var(--border-radius-md);
    font-family: var(--font-sans);
    font-size: 0.9rem;
}

/* Team Workload View Specifics */
.team-layout-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
}

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

.form-card {
    padding: 24px;
    height: fit-content;
}

.form-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 20px;
}

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

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

.form-group input[type="text"],
.form-group input[type="date"],
.form-group textarea {
    background: rgba(10, 14, 23, 0.5);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-md);
    padding: 12px;
    color: #fff;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--border-glass-focus);
    background: rgba(10, 14, 23, 0.8);
}

.form-row {
    display: flex;
    gap: 20px;
}

.col-6 {
    flex: 0 0 calc(50% - 10px);
}

/* Color Picker */
.color-picker-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}

.color-swatch-label {
    position: relative;
    cursor: pointer;
    display: block;
    aspect-ratio: 1;
}

.color-swatch-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.swatch-checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: var(--swatch-color);
    border-radius: 50%;
    border: 3px solid transparent;
    transition: var(--transition-smooth);
}

.color-swatch-label:hover .swatch-checkmark {
    transform: scale(1.15);
}

.color-swatch-label input:checked ~ .swatch-checkmark {
    border-color: #fff;
    box-shadow: 0 0 10px var(--swatch-color);
}

.member-cards-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cards-header-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
}

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

/* Member Card */
.member-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.member-card-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: var(--member-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.member-card-name {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.member-card-role {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.member-card-stats {
    display: flex;
    width: 100%;
    border-top: 1px solid var(--border-glass);
    padding-top: 16px;
    justify-content: space-around;
}

.member-stat-item {
    display: flex;
    flex-direction: column;
}

.member-stat-val {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
}

.member-stat-lbl {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.member-delete-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}

.member-delete-btn:hover {
    color: var(--status-overdue);
    background: rgba(239, 68, 68, 0.1);
}

/* Kanban Board Styling */
.kanban-board-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.board-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.board-badge {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
}

.board-member-name {
    font-size: 1.15rem;
    font-weight: 600;
    color: #fff;
}

.board-member-role {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.kanban-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    align-items: start;
    min-height: calc(100vh - 280px);
}

@media (max-width: 1100px) {
    .kanban-board {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 650px) {
    .kanban-board {
        grid-template-columns: 1fr;
    }
}

.kanban-column {
    background: rgba(10, 14, 23, 0.3);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-lg);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: calc(100vh - 220px);
    overflow-y: auto;
}

.kanban-column-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.column-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.column-dot.dot-todo { background-color: var(--status-todo); box-shadow: 0 0 8px var(--status-todo); }
.column-dot.dot-progress { background-color: var(--status-progress); box-shadow: 0 0 8px var(--status-progress); }
.column-dot.dot-review { background-color: var(--status-review); box-shadow: 0 0 8px var(--status-review); }
.column-dot.dot-completed { background-color: var(--status-completed); box-shadow: 0 0 8px var(--status-completed); }

.column-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    flex: 1;
}

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

.kanban-cards-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 150px;
}

/* Kanban Card */
.kanban-card {
    background: var(--bg-glass-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-md);
    padding: 16px;
    cursor: grab;
    transition: var(--transition-smooth);
    position: relative;
    user-select: none;
}

.kanban-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

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

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

.kanban-card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.4;
    margin-bottom: 8px;
    cursor: pointer;
}

.kanban-card-title:hover {
    color: var(--accent-indigo);
    text-decoration: underline;
}

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

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

.kanban-card-due {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.kanban-card-due.due-soon {
    color: var(--status-progress);
}

.kanban-card-due.due-overdue {
    color: var(--status-overdue);
    font-weight: 600;
}

.kanban-card-due i {
    width: 14px;
    height: 14px;
}

/* User Assignee Dot */
.kanban-card-assignee {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--member-color);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* PDF card download icon */
.pdf-download-badge {
    background: transparent;
    border: none;
    color: var(--status-overdue);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    padding: 4px;
    border-radius: 4px;
}

.pdf-download-badge:hover {
    background: rgba(239, 68, 68, 0.1);
    transform: scale(1.1);
}

.pdf-download-badge i {
    width: 16px;
    height: 16px;
}

.card-title-container {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
}

/* Quick Status Shift buttons on card */
.card-nav-buttons {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: var(--transition-smooth);
    position: absolute;
    right: 12px;
    bottom: 12px;
}

.kanban-card:hover .card-nav-buttons {
    opacity: 1;
}

.btn-shift {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    padding: 4px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-shift:hover {
    background: rgba(99, 102, 241, 0.2);
    color: #fff;
}

/* Modal Window styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(5, 8, 15, 0.75);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.modal-content {
    width: 600px;
    max-width: 90vw;
    border: 1px solid var(--border-glass);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    animation: scaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

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

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

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
}

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

.modal-close-btn:hover {
    color: #fff;
}

#task-form {
    padding: 24px;
}

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

.text-required {
    color: var(--status-overdue);
}

/* PDF Upload & Preview layout */
.pdf-upload-container {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(10, 14, 23, 0.3);
    border: 1px dashed var(--border-glass);
    padding: 12px;
    border-radius: var(--border-radius-md);
}

.file-select-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 250px;
}

.pdf-badge-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: var(--border-radius-md);
    padding: 10px 16px;
    margin-top: 12px;
    animation: fadeIn 0.3s ease-out;
}

.pdf-file-info {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.pdf-preview-icon {
    color: #f87171;
    width: 20px;
    height: 20px;
}

.pdf-preview-name {
    font-size: 0.85rem;
    color: #fca5a5;
    font-weight: 500;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    max-width: 320px;
}

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

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-download {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}
.btn-download:hover {
    background: rgba(16, 185, 129, 0.2);
}

.btn-delete {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}
.btn-delete:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* Toast System styling */
.toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 2000;
}

.toast {
    min-width: 280px;
    padding: 16px 20px;
    border-radius: var(--border-radius-md);
    background: #121826;
    border: 1px solid var(--border-glass);
    color: #fff;
    box-shadow: var(--shadow-premium);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.toast.success {
    border-left: 4px solid var(--status-completed);
}

.toast.error {
    border-left: 4px solid var(--status-overdue);
}

.toast.info {
    border-left: 4px solid var(--status-todo);
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast-closing {
    animation: slideOut 0.3s ease-in forwards;
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

.toast-icon {
    width: 20px;
    height: 20px;
}

.toast.success .toast-icon { color: var(--status-completed); }
.toast.error .toast-icon { color: var(--status-overdue); }
.toast.info .toast-icon { color: var(--status-todo); }

.toast-message {
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.4;
}
