/* =====================================================
   POST PRODUCTION WORKFLOW MANAGEMENT SYSTEM
   Netflix-Style Dark Theme
   ===================================================== */

/* ===== CSS VARIABLES ===== */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a2e;
    --bg-card-hover: #222240;
    --bg-sidebar: #0d0d15;
    --bg-input: #1e1e30;
    --bg-modal: #16162a;

    --text-primary: #e8e8f0;
    --text-secondary: #9898b0;
    --text-muted: #6a6a80;
    --text-white: #ffffff;

    --accent-primary: #e50914;
    --accent-secondary: #b81d24;
    --accent-gradient: linear-gradient(135deg, #e50914 0%, #b81d24 100%);
    --accent-blue: #3b82f6;
    --accent-green: #10b981;
    --accent-yellow: #f59e0b;
    --accent-purple: #8b5cf6;
    --accent-pink: #ec4899;
    --accent-orange: #f97316;
    --accent-cyan: #06b6d4;

    --border-color: rgba(255, 255, 255, 0.06);
    --border-light: rgba(255, 255, 255, 0.1);

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(229, 9, 20, 0.15);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 50%;

    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
    --header-height: 70px;

    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ===== LIGHT THEME VARIABLES ===== */
[data-theme="light"] {
    --bg-primary: #f2f2f7;
    /* Apple style gray background */
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f9f9fb;
    --bg-sidebar: #ffffff;
    --bg-input: #f4f4f5;
    --bg-modal: #ffffff;

    --text-primary: #1c1c1e;
    /* Almost black */
    --text-secondary: #636366;
    /* Dark gray */
    --text-muted: #8e8e93;
    --text-white: #000000;
    /* Used for headings */

    --accent-primary: #ff3b30;
    /* Apple red */
    --accent-secondary: #d70015;
    --accent-gradient: linear-gradient(135deg, #ff3b30 0%, #ff2d55 100%);
    --accent-blue: #007aff;
    --accent-green: #34c759;
    --accent-yellow: #ffcc00;
    --accent-purple: #af52de;
    --accent-pink: #ff2d55;
    --accent-orange: #ff9500;
    --accent-cyan: #32ade6;

    --border-color: rgba(0, 0, 0, 0.1);
    /* Visible border */
    --border-light: rgba(0, 0, 0, 0.15);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    /* Softer shadow */
    --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 20px rgba(255, 59, 48, 0.15);
}

/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-secondary);
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    opacity: 0.3;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ===== LAYOUT ===== */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 24px;
    padding-top: calc(var(--header-height) + 24px);
    transition: margin-left var(--transition-normal);
    min-height: 100vh;
}

.main-content.sidebar-collapsed {
    margin-left: var(--sidebar-collapsed);
}

/* ===== SIDEBAR ===== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: width var(--transition-normal), transform var(--transition-normal);
    overflow: hidden;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar-logo {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
    min-height: var(--header-height);
}

.sidebar-logo .logo-icon {
    width: 36px;
    height: 36px;
    background: var(--accent-gradient);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    color: white;
    flex-shrink: 0;
}

.sidebar-logo .logo-text {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-white);
    white-space: nowrap;
    overflow: hidden;
    transition: opacity var(--transition-fast);
}

.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-section-title,
.sidebar.collapsed .user-info-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
    overflow-x: hidden;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    padding: 16px 12px 8px;
    white-space: nowrap;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    margin-bottom: 2px;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
}

.nav-item:hover {
    background: var(--border-color);
    color: var(--text-white);
}

.nav-item.active {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
}

.nav-item .nav-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.nav-label {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.sidebar-toggle {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
}

.sidebar-toggle-btn {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    font-size: 16px;
}

.sidebar-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
}

.sidebar-user {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: white;
    flex-shrink: 0;
}

.user-info-text .user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.user-info-text .user-role {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ===== HEADER ===== */
.top-header {
    position: fixed;
    top: 0;
    right: 0;
    left: var(--sidebar-width);
    height: var(--header-height);
    background: rgba(var(--bg-primary-rgb, 10, 10, 15), 0.85);
    /* Fallback */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 900;
    transition: left var(--transition-normal);
}

[data-theme="light"] .top-header {
    background: rgba(255, 255, 255, 0.85);
}

.top-header.sidebar-collapsed {
    left: var(--sidebar-collapsed);
}

.header-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-white);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-fast);
    font-family: var(--font-family);
}

.header-btn:hover {
    background: var(--border-color);
    color: var(--text-white);
}

/* ===== STAT CARDS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.stat-card:nth-child(1)::before {
    background: var(--accent-primary);
}

.stat-card:nth-child(2)::before {
    background: var(--accent-blue);
}

.stat-card:nth-child(3)::before {
    background: var(--accent-green);
}

.stat-card:nth-child(4)::before {
    background: var(--accent-purple);
}

.stat-card:nth-child(5)::before {
    background: var(--accent-yellow);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-light);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
}

.stat-card:nth-child(1) .stat-icon {
    background: rgba(229, 9, 20, 0.15);
    color: var(--accent-primary);
}

.stat-card:nth-child(2) .stat-icon {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
}

.stat-card:nth-child(3) .stat-icon {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
}

.stat-card:nth-child(4) .stat-icon {
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent-purple);
}

.stat-card:nth-child(5) .stat-icon {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-yellow);
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-white);
    line-height: 1;
    margin-bottom: 6px;
}

.stat-card .stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ===== DASHBOARD GRID ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 28px;
}

.dashboard-grid.full {
    grid-template-columns: 1fr;
}

/* ===== CARDS ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.card:hover {
    border-color: var(--border-light);
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-white);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-body {
    padding: 24px;
}

.card-body.no-padding {
    padding: 0;
}

/* ===== CHART CONTAINER ===== */
.chart-container {
    position: relative;
    height: 300px;
    padding: 16px;
}

/* ===== ACTIVITY FEED ===== */
.activity-list {
    list-style: none;
}

.activity-item {
    padding: 14px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: background var(--transition-fast);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    background: var(--accent-primary);
    margin-top: 7px;
    flex-shrink: 0;
}

.activity-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.activity-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

.activity-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===== PROJECT CARDS ===== */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all var(--transition-normal);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.project-card[data-type="Film"]::before {
    background: var(--accent-primary);
}

.project-card[data-type="Dizi"]::before {
    background: var(--accent-blue);
}

.project-card[data-type="Reklam"]::before {
    background: var(--accent-yellow);
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-light);
}

.project-card .project-type-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.badge-film {
    background: rgba(229, 9, 20, 0.15);
    color: var(--accent-primary);
}

.badge-dizi {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
}

.badge-reklam {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-yellow);
}

.project-card .project-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 8px;
}

.project-card .project-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-card .project-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.project-card .project-members {
    display: flex;
    align-items: center;
}

.project-card .member-avatar {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: white;
    margin-left: -8px;
    border: 2px solid var(--bg-card);
}

.project-card .member-avatar:first-child {
    margin-left: 0;
}

.project-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.status-aktif {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
}

.status-tamamlandi {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
}

.status-beklemede {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-yellow);
}

.status-iptal {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* ===== PROGRESS BARS ===== */
.progress-bar-wrapper {
    width: 100%;
    margin: 8px 0;
}

.progress-bar-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 12px;
}

.progress-bar-label .label-name {
    color: var(--text-secondary);
    font-weight: 500;
}

.progress-bar-label .label-value {
    color: var(--text-primary);
    font-weight: 600;
}

.progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.progress-bar .progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.progress-fill.red {
    background: var(--accent-gradient);
}

.progress-fill.blue {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.progress-fill.green {
    background: linear-gradient(135deg, #10b981, #059669);
}

.progress-fill.purple {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.progress-fill.yellow {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.progress-fill.cyan {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* ===== WORKFLOW PIPELINE ===== */
.workflow-pipeline {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.pipeline-step {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px;
    position: relative;
    transition: all var(--transition-normal);
}

.pipeline-step:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
}

.pipeline-step .step-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 8px;
}

.pipeline-step .step-assignee {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pipeline-step .step-status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 8px;
}

/* ===== TRELLO BOARD ===== */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px 0;
    min-height: 60vh;
}

.kanban-column {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    min-height: 400px;
}

.kanban-column-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.kanban-column-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-white);
    display: flex;
    align-items: center;
    gap: 8px;
}

.kanban-column-count {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}

.column-todo .kanban-column-header {
    border-top: 3px solid var(--accent-yellow);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.column-progress .kanban-column-header {
    border-top: 3px solid var(--accent-blue);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.column-done .kanban-column-header {
    border-top: 3px solid var(--accent-green);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.kanban-cards {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    min-height: 50px;
}

.kanban-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 10px;
    cursor: grab;
    transition: all var(--transition-fast);
}

.kanban-card:active {
    cursor: grabbing;
}

.kanban-card:hover {
    border-color: var(--border-light);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.kanban-card.sortable-ghost {
    opacity: 0.4;
    background: rgba(229, 9, 20, 0.1);
}

.kanban-card .card-task-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 8px;
}

.kanban-card .card-task-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
}

.kanban-card .card-assignee {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.kanban-card .card-progress {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-green);
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font-family);
    transition: all var(--transition-fast);
    outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.15);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239898b0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

.form-select option {
    background: var(--bg-card);
    color: var(--text-primary);
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-primary);
    cursor: pointer;
}

.form-check label {
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    line-height: 1.4;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 2px 8px rgba(229, 9, 20, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 4px 16px rgba(229, 9, 20, 0.4);
    transform: translateY(-1px);
    color: white;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
}

/* ===== TABLE ===== */
.table-wrapper {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.02);
}

.data-table td {
    font-size: 14px;
    color: var(--text-secondary);
}

.data-table tbody tr {
    transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.data-table .actions-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-modal);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.modal-header {
    padding: 24px 28px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-white);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    transition: color var(--transition-fast);
}

.modal-close:hover {
    color: var(--text-white);
}

.modal-body {
    padding: 28px;
}

.modal-footer {
    padding: 20px 28px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ===== LOGIN PAGE ===== */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(229, 9, 20, 0.08) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    pointer-events: none;
}

.login-wrapper::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.06) 0%, transparent 70%);
    bottom: -100px;
    left: -100px;
    pointer-events: none;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
    box-shadow: var(--shadow-lg);
}

.login-logo {
    text-align: center;
    margin-bottom: 36px;
}

.login-logo .logo-icon {
    width: 56px;
    height: 56px;
    background: var(--accent-gradient);
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    color: white;
    margin-bottom: 16px;
}

.login-logo h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 6px;
}

.login-logo p {
    font-size: 14px;
    color: var(--text-muted);
}

/* ===== ALERTS ===== */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeIn 0.3s ease;
}

.alert-success {
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-error {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.12);
    color: var(--accent-yellow);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.alert-info {
    background: rgba(59, 130, 246, 0.12);
    color: var(--accent-blue);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* ===== TABS ===== */
.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
    overflow-x: auto;
}

.tab-btn {
    padding: 12px 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    transition: color var(--transition-fast);
    white-space: nowrap;
    font-family: var(--font-family);
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--accent-primary);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-primary);
    border-radius: 1px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* ===== REVISION LIST ===== */
.revision-list {
    list-style: none;
}

.revision-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
}

.revision-item:last-child {
    border-bottom: none;
}

.revision-marker {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: rgba(229, 9, 20, 0.15);
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 2px;
}

.revision-content .revision-note {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1.5;
}

.revision-content .revision-meta {
    font-size: 12px;
    color: var(--text-muted);
}

/* ===== NOTES ===== */
.note-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
    transition: border-color var(--transition-fast);
}

.note-item:hover {
    border-color: var(--border-light);
}

.note-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.note-author {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.note-date {
    font-size: 11px;
    color: var(--text-muted);
}

.note-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== BADGES ===== */
.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.badge-admin {
    background: rgba(229, 9, 20, 0.15);
    color: var(--accent-primary);
}

.badge-user {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state .empty-text {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

.slide-up {
    animation: slideUp 0.5s ease;
}

/* ===== PAGE HEADER ===== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-white);
}

.page-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===== DETAIL INFO GRID ===== */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.info-item {
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.info-item .info-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.info-item .info-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-white);
}

/* ===== TEAM MEMBERS ===== */
.team-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.team-member-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-secondary);
}

.team-member-tag .tag-avatar {
    width: 22px;
    height: 22px;
    border-radius: var(--radius-full);
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
    color: white;
}

/* ===== MOBILE HAMBURGER ===== */
.mobile-toggle {
    display: none;
    position: fixed;
    top: 18px;
    left: 16px;
    z-index: 1100;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-white);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
}

.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
}

/* ===== LOADING SPINNER ===== */
.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== TOAST ===== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 14px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 280px;
}

.toast.success {
    border-left: 3px solid var(--accent-green);
}

.toast.error {
    border-left: 3px solid #ef4444;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .kanban-board {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: flex;
    }

    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
        z-index: 1100;
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .mobile-overlay.active {
        display: block;
    }

    .main-content {
        margin-left: 0;
        padding: 16px;
        padding-top: calc(var(--header-height) + 16px);
    }

    .main-content.sidebar-collapsed {
        margin-left: 0;
    }

    .top-header {
        left: 0;
        padding-left: 60px;
    }

    .top-header.sidebar-collapsed {
        left: 0;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-card {
        padding: 18px;
    }

    .stat-card .stat-value {
        font-size: 24px;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .workflow-pipeline {
        grid-template-columns: 1fr 1fr;
    }

    .login-card {
        padding: 32px 24px;
    }

    .info-grid {
        grid-template-columns: 1fr 1fr;
    }

    .header-title {
        font-size: 16px;
    }

    .modal {
        margin: 12px;
        max-width: calc(100% - 24px);
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .workflow-pipeline {
        grid-template-columns: 1fr;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .tabs {
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }
}

/* ===== UTILITY ===== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: var(--text-muted);
}

.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;
}

.align-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-1 {
    gap: 8px;
}

.gap-2 {
    gap: 16px;
}

.w-100 {
    width: 100%;
}

.hidden {
    display: none !important;
}