/* ============================================================
   WorkFlow Pro — Premium Dark Theme
   ============================================================ */

/* === CSS VARIABLES === */
:root {
    /* Background */
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: #1a1f35;
    --bg-card-hover: #1f2541;
    --bg-input: #151b2e;
    --bg-sidebar: #0d1225;
    --bg-navbar: rgba(17, 24, 39, 0.85);

    /* Glass */
    --glass-bg: rgba(26, 31, 53, 0.6);
    --glass-border: rgba(99, 102, 241, 0.15);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);

    /* Text */
    --text-primary: #e5e7eb;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --text-white: #ffffff;

    /* Brand */
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.3);
    --accent-soft: rgba(99, 102, 241, 0.1);

    /* Status Colors */
    --status-new: #38bdf8;
    --status-progress: #6366f1;
    --status-hold: #f59e0b;
    --status-blocked: #ef4444;
    --status-waiting: #f97316;
    --status-approval: #eab308;
    --status-revision: #a855f7;
    --status-completed: #22c55e;
    --status-cancelled: #6b7280;

    /* Priority Colors */
    --priority-low: #6b7280;
    --priority-normal: #38bdf8;
    --priority-high: #f59e0b;
    --priority-urgent: #ef4444;

    /* Borders / Misc */
    --border-color: rgba(255, 255, 255, 0.06);
    --border-light: rgba(255, 255, 255, 0.1);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.4);
    --sidebar-width: 260px;
}

/* === RESET & BASE === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

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

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}
a:hover { color: var(--accent-hover); }

/* === LAYOUT === */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.page-content {
    padding: 28px;
    flex: 1;
}

/* === SIDEBAR === */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s ease;
}

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

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 24px;
    filter: drop-shadow(0 0 8px var(--accent-glow));
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-close {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 0;
    overflow-y: auto;
}

.nav-section {
    padding: 0 16px;
    margin-bottom: 8px;
}

.nav-section-title {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 8px 12px;
    margin-bottom: 2px;
}

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

.nav-item:hover {
    background: var(--accent-soft);
    color: var(--text-primary);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.15));
    color: var(--accent-hover);
    box-shadow: inset 3px 0 0 var(--accent);
}

.nav-icon {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

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

.sidebar-footer-text {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    backdrop-filter: blur(4px);
}

/* === TOP NAVBAR === */
.top-navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 28px;
    background: var(--bg-navbar);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
}

.sidebar-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.sidebar-toggle span {
    width: 22px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: var(--transition);
}

.navbar-title h1 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
}

.navbar-right {
    margin-left: auto;
}

.user-menu {
    position: relative;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-light);
    background: var(--glass-bg);
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-primary);
}
.user-menu-btn:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #a78bfa);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: white;
}

.user-info {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 600;
}

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

.dropdown-arrow {
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: slideDown 0.2s ease;
}

.user-dropdown.show {
    display: block;
}

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

.dropdown-header {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.dropdown-header strong { font-size: 0.9rem; }
.dropdown-header small { color: var(--text-muted); font-size: 0.75rem; }

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: var(--transition);
}
.dropdown-item:hover {
    background: var(--accent-soft);
    color: var(--text-primary);
}
.dropdown-item.text-danger { color: #ef4444; }
.dropdown-item.text-danger:hover { background: rgba(239, 68, 68, 0.1); }

/* === CARDS === */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    border-color: var(--glass-border);
    box-shadow: var(--shadow-md);
}

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

.card-header h2 {
    font-size: 1rem;
    font-weight: 600;
}

.card-body {
    padding: 22px;
}

.card-footer {
    padding: 14px 22px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* === STAT CARDS (Dashboard) === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--stat-color, var(--accent));
    opacity: 0.8;
}

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

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    background: var(--stat-bg, var(--accent-soft));
    flex-shrink: 0;
}

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

.stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text-white);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 500;
}

.stat-overdue { --stat-color: var(--status-blocked); --stat-bg: rgba(239, 68, 68, 0.1); }
.stat-new { --stat-color: var(--status-new); --stat-bg: rgba(56, 189, 248, 0.1); }
.stat-progress { --stat-color: var(--status-progress); --stat-bg: rgba(99, 102, 241, 0.1); }
.stat-hold { --stat-color: var(--status-hold); --stat-bg: rgba(245, 158, 11, 0.1); }
.stat-approval { --stat-color: var(--status-approval); --stat-bg: rgba(234, 179, 8, 0.1); }
.stat-completed { --stat-color: var(--status-completed); --stat-bg: rgba(34, 197, 94, 0.1); }
.stat-revision { --stat-color: var(--status-revision); --stat-bg: rgba(168, 85, 247, 0.1); }

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #818cf8);
    color: white;
    box-shadow: 0 2px 8px var(--accent-glow);
}
.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-secondary);
    border-color: var(--border-light);
}
.btn-secondary:hover:not(:disabled) {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--accent);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
}
.btn-danger:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.25);
}

.btn-success {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border-color: rgba(34, 197, 94, 0.3);
}
.btn-success:hover:not(:disabled) {
    background: rgba(34, 197, 94, 0.25);
}

.btn-sm {
    padding: 5px 12px;
    font-size: 0.78rem;
}

.btn-lg {
    padding: 12px 28px;
    font-size: 0.95rem;
}

.btn-block {
    width: 100%;
}

.btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* === FORMS === */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-label .required {
    color: #ef4444;
    margin-left: 2px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-control::placeholder {
    color: var(--text-muted);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

select.form-control {
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    padding-right: 36px;
}

select.form-control option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* === TABLES === */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    padding: 12px 16px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

td {
    padding: 12px 16px;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: var(--bg-card-hover);
}

/* === STATUS BADGES === */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.status-new { background: rgba(56, 189, 248, 0.12); color: var(--status-new); border: 1px solid rgba(56, 189, 248, 0.25); }
.status-progress { background: rgba(99, 102, 241, 0.12); color: var(--status-progress); border: 1px solid rgba(99, 102, 241, 0.25); }
.status-hold { background: rgba(245, 158, 11, 0.12); color: var(--status-hold); border: 1px solid rgba(245, 158, 11, 0.25); }
.status-blocked { background: rgba(239, 68, 68, 0.12); color: var(--status-blocked); border: 1px solid rgba(239, 68, 68, 0.25); }
.status-waiting { background: rgba(249, 115, 22, 0.12); color: var(--status-waiting); border: 1px solid rgba(249, 115, 22, 0.25); }
.status-approval { 
    background: rgba(234, 179, 8, 0.12); 
    color: var(--status-approval); 
    border: 1px solid rgba(234, 179, 8, 0.25);
    animation: pulseApproval 2s ease-in-out infinite;
}
.status-revision { background: rgba(168, 85, 247, 0.12); color: var(--status-revision); border: 1px solid rgba(168, 85, 247, 0.25); }
.status-completed { background: rgba(34, 197, 94, 0.12); color: var(--status-completed); border: 1px solid rgba(34, 197, 94, 0.25); }
.status-cancelled { background: rgba(107, 114, 128, 0.12); color: var(--status-cancelled); border: 1px solid rgba(107, 114, 128, 0.25); }

@keyframes pulseApproval {
    0%, 100% { box-shadow: 0 0 0 0 rgba(234, 179, 8, 0.3); }
    50% { box-shadow: 0 0 0 6px rgba(234, 179, 8, 0); }
}

/* Priority Badges */
.priority-low { background: rgba(107, 114, 128, 0.12); color: var(--priority-low); border: 1px solid rgba(107, 114, 128, 0.25); }
.priority-normal { background: rgba(56, 189, 248, 0.12); color: var(--priority-normal); border: 1px solid rgba(56, 189, 248, 0.25); }
.priority-high { background: rgba(245, 158, 11, 0.12); color: var(--priority-high); border: 1px solid rgba(245, 158, 11, 0.25); }
.priority-urgent { 
    background: rgba(239, 68, 68, 0.15); 
    color: var(--priority-urgent); 
    border: 1px solid rgba(239, 68, 68, 0.3);
    animation: pulseUrgent 1.5s ease-in-out infinite;
}

@keyframes pulseUrgent {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}

/* === ALERTS === */
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 18px;
    animation: slideIn 0.3s ease;
    border: 1px solid;
}

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

.alert-success { background: rgba(34, 197, 94, 0.1); color: #4ade80; border-color: rgba(34, 197, 94, 0.25); }
.alert-error { background: rgba(239, 68, 68, 0.1); color: #f87171; border-color: rgba(239, 68, 68, 0.25); }
.alert-warning { background: rgba(245, 158, 11, 0.1); color: #fbbf24; border-color: rgba(245, 158, 11, 0.25); }
.alert-info { background: rgba(56, 189, 248, 0.1); color: #38bdf8; border-color: rgba(56, 189, 248, 0.25); }

.alert-icon { font-size: 1.1rem; }
.alert-close {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.6;
    padding: 0 4px;
}
.alert-close:hover { opacity: 1; }

/* === TASK CARDS (Worker Panel) === */
.task-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 16px;
}

.task-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.task-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.task-card.priority-card-urgent::before { background: var(--priority-urgent); }
.task-card.priority-card-high::before { background: var(--priority-high); }
.task-card.priority-card-normal::before { background: var(--priority-normal); }
.task-card.priority-card-low::before { background: var(--priority-low); }

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

.task-card.task-locked {
    opacity: 0.55;
    pointer-events: none;
    position: relative;
}

.task-card.task-locked::after {
    content: '🔒 Kilitli — Önkoşul bekleniyor';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.85);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 600;
    pointer-events: auto;
    white-space: nowrap;
    z-index: 5;
}

.task-card.task-overdue {
    border-color: rgba(239, 68, 68, 0.35);
    box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.1);
}

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

.task-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-white);
    line-height: 1.4;
}

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

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

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

.task-due {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.task-due.overdue {
    color: #ef4444;
    font-weight: 600;
}

/* === FILTER BAR === */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    padding: 18px 22px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-group label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.filter-group select,
.filter-group input {
    padding: 8px 12px;
    font-size: 0.82rem;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    outline: none;
    min-width: 160px;
    transition: var(--transition);
}

.filter-group select:focus,
.filter-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

/* === TASK DETAIL === */
.detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

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

.detail-section-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.detail-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
}

.detail-value {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* === COMMENTS === */
.comment-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comment-item {
    padding: 14px 16px;
    background: var(--bg-input);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.comment-author {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent-hover);
}

.comment-date {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.comment-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* === HISTORY TIMELINE === */
.timeline {
    position: relative;
    padding-left: 24px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-light);
}

.timeline-item {
    position: relative;
    padding: 0 0 20px 16px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--bg-card);
}

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

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

.timeline-date {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.timeline-change {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.timeline-comment {
    margin-top: 4px;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}

/* === PAGINATION === */
.pagination {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin-top: 24px;
}

.page-link {
    padding: 8px 14px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.page-link:hover {
    background: var(--accent-soft);
    color: var(--accent-hover);
    border-color: var(--accent);
}

.page-link.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* === EMPTY STATE === */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.1rem;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.empty-state p {
    font-size: 0.85rem;
}

/* === LOGIN PAGE === */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15), transparent 70%);
    top: -200px;
    right: -200px;
    pointer-events: none;
}

.login-page::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.1), transparent 70%);
    bottom: -100px;
    left: -100px;
    pointer-events: none;
}

.login-box {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 40px;
    position: relative;
    z-index: 1;
    box-shadow: var(--shadow-lg);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-header .logo-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 12px;
}

.login-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
}

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

/* === SETUP PAGE === */
.setup-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    padding: 20px;
}

.setup-box {
    width: 100%;
    max-width: 500px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

/* === MODAL === */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

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

.modal {
    width: 90%;
    max-width: 520px;
    max-height: 80vh;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalIn 0.25s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(-10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

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

.modal-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}

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

.modal-body {
    padding: 22px;
    overflow-y: auto;
}

.modal-footer {
    padding: 14px 22px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* === DEPENDENCY INFO === */
.dependency-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    color: #fbbf24;
    margin-bottom: 14px;
}

.lock-icon { font-size: 1.1rem; }

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

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .sidebar-close {
        display: block;
    }
    .sidebar-overlay.show {
        display: block;
    }
    .main-content {
        margin-left: 0;
    }
    .sidebar-toggle {
        display: flex;
    }
    .page-content {
        padding: 16px;
    }
    .top-navbar {
        padding: 12px 16px;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .task-cards {
        grid-template-columns: 1fr;
    }
    .filter-bar {
        flex-direction: column;
    }
    .filter-group select,
    .filter-group input {
        min-width: 100%;
    }
    .user-info {
        display: none;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .login-box {
        padding: 28px 20px;
    }
}

/* === UTILITIES === */
/* === UTILITIES === */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-danger { color: #ef4444 !important; }
.text-success { color: #22c55e !important; }
.text-warning { color: #f59e0b !important; }
.text-muted { color: var(--text-muted) !important; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.d-flex { display: flex; }
.gap-2 { gap: 16px; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.w-full { width: 100%; }

/* === BOOTSTRAP TO DARK THEME ADAPTERS === */
body {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
}

.text-dark {
    color: var(--text-primary) !important;
}

.bg-light {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

.bg-white {
    background-color: var(--bg-card) !important;
    color: var(--text-primary) !important;
}

.card-header.bg-white {
    background-color: var(--bg-card) !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.card-header.bg-primary, 
.card-header.bg-info, 
.card-header.bg-dark {
    background-color: var(--bg-sidebar) !important;
    border-bottom: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

.list-group-item {
    background-color: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

.list-group-item-action:hover, 
.list-group-item-action:focus {
    background-color: var(--bg-card-hover) !important;
    color: var(--text-white) !important;
}

.form-select, 
select.form-select,
.form-control {
    background-color: var(--bg-input) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-light) !important;
}

.form-select:focus,
.form-control:focus {
    background-color: var(--bg-input) !important;
    color: var(--text-white) !important;
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px var(--accent-glow) !important;
}

.form-select option {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

.table {
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

.table > :not(caption) > * > * {
    background-color: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border-bottom-color: var(--border-color) !important;
}

.table-light, 
thead.table-light th,
thead th,
.table > thead th,
.table > thead td {
    background-color: var(--bg-secondary) !important;
    color: var(--text-secondary) !important;
    border-bottom-color: var(--border-color) !important;
}

.table-hover tbody tr:hover td,
.table-hover tbody tr:hover th {
    background-color: var(--bg-card-hover) !important;
    color: var(--text-white) !important;
}

.dropdown-menu {
    background-color: var(--bg-card) !important;
    border-color: var(--border-light) !important;
    box-shadow: var(--glass-shadow) !important;
}

.dropdown-item {
    color: var(--text-secondary) !important;
}

.dropdown-item:hover, 
.dropdown-item:focus {
    background-color: var(--accent-soft) !important;
    color: var(--text-primary) !important;
}

.dropdown-divider {
    border-color: var(--border-color) !important;
}

.modal-content {
    background-color: var(--bg-card) !important;
    border-color: var(--border-light) !important;
    color: var(--text-primary) !important;
    box-shadow: var(--shadow-lg) !important;
}

.modal-header, 
.modal-footer {
    border-color: var(--border-color) !important;
}

.btn-light {
    background-color: var(--bg-input) !important;
    color: var(--text-secondary) !important;
    border-color: var(--border-light) !important;
}

.btn-light:hover {
    background-color: var(--bg-card-hover) !important;
    color: var(--text-primary) !important;
    border-color: var(--accent) !important;
}

/* Timeline specific improvements */
.timeline-schedule h6.text-dark {
    color: var(--text-white) !important;
}
.timeline-schedule .border-bottom {
    border-bottom-color: var(--border-color) !important;
}

/* Custom Scrollbar for premium dark theme */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

