/* =============================================
   VIZBO PROSJEKTSTATUS – Design System
   Clean · Minimal · Black & White
   Inspired by vizbo.no
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-page: #f5f5f5;
    --bg-card: #ffffff;
    --bg-card-hover: #fafafa;
    --bg-surface: rgba(255,255,255,0.95);
    --bg-input: #f5f5f5;
    --bg-section: #f0f0f0;

    --border-primary: rgba(0,0,0,0.1);
    --border-subtle: rgba(0,0,0,0.06);
    --border-hover: rgba(0,0,0,0.2);

    --text-primary: #111111;
    --text-secondary: #555555;
    --text-muted: #999999;

    --accent: #111111;
    --accent-hover: #333333;
    --accent-bg: rgba(0,0,0,0.04);
    --gradient-primary: #111111;

    --space-xs: 4px; --space-sm: 8px; --space-md: 16px;
    --space-lg: 24px; --space-xl: 32px; --space-2xl: 48px;

    --radius-sm: 6px; --radius-md: 10px; --radius-lg: 14px;
    --radius-xl: 18px; --radius-full: 9999px;

    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 36px rgba(0,0,0,0.1);
    --shadow-card: 0 1px 3px rgba(0,0,0,0.04);
    --shadow-card-hover: 0 8px 24px rgba(0,0,0,0.08);

    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --duration: 0.2s;
    --topbar-height: 64px;
    --content-max-width: 1440px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--text-primary); text-decoration: underline; }
a:hover { color: var(--text-secondary); }
::selection { background: var(--accent); color: white; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 3px; }

.hidden { display: none !important; }
.screen { display: none; }
.screen.active { display: block; }
#login-screen.active { display: flex; }
.view { display: none; }
.view.active { display: block; }

/* ========== LOGIN ========== */
#login-screen {
    min-height: 100vh; height: 100vh;
    align-items: center; justify-content: center;
    background: #ffffff;
}

.login-card {
    position: relative; z-index: 1;
    width: 100%; max-width: 400px;
    padding: var(--space-2xl) var(--space-xl);
    animation: fadeIn 0.4s var(--ease);
}

.login-logo { text-align: center; margin-bottom: var(--space-xl); }
.login-logo img { height: 80px; margin-bottom: var(--space-md); }
.login-logo p { color: var(--text-muted); font-size: 14px; font-weight: 400; letter-spacing: 2px; text-transform: uppercase; }

.login-hint {
    text-align: center; color: var(--text-muted); font-size: 12px;
    margin-top: var(--space-lg); padding-top: var(--space-md);
    border-top: 1px solid var(--border-subtle);
}
.login-hint strong { color: var(--text-secondary); }

/* ========== FORMS ========== */
.form-group { margin-bottom: var(--space-md); }
.form-group label {
    display: block; font-size: 12px; font-weight: 500;
    color: var(--text-secondary); margin-bottom: 6px;
    text-transform: uppercase; letter-spacing: 0.5px;
}

.form-input, .form-select, .form-textarea {
    width: 100%; padding: 12px 14px;
    background: #fff; border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm); color: var(--text-primary);
    font-family: inherit; font-size: 14px;
    transition: border-color var(--duration) var(--ease);
    outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--accent);
}
.form-input::placeholder { color: var(--text-muted); }
.form-textarea { resize: vertical; min-height: 80px; }
.form-select {
    cursor: pointer; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23555' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); }
.form-checkbox { display: flex; align-items: center; gap: var(--space-sm); cursor: pointer; font-size: 14px; color: var(--text-secondary); }
.form-checkbox input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

.form-error {
    color: #c00; font-size: 13px; margin-top: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: rgba(200,0,0,0.04); border-radius: var(--radius-sm);
    border: 1px solid rgba(200,0,0,0.1);
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 20px; font-family: inherit; font-size: 13px; font-weight: 600;
    border: none; border-radius: var(--radius-sm); cursor: pointer;
    transition: all var(--duration) var(--ease); white-space: nowrap;
    letter-spacing: 0.2px;
}

.btn-primary {
    background: var(--accent); color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-secondary {
    background: #fff; color: var(--text-primary);
    border: 1px solid var(--border-primary);
}
.btn-secondary:hover { background: var(--bg-input); border-color: var(--border-hover); }

.btn-danger {
    background: #fff; color: #c00;
    border: 1px solid rgba(200,0,0,0.15);
}
.btn-danger:hover { background: rgba(200,0,0,0.04); }

.btn-ghost { background: transparent; color: var(--text-secondary); padding: 8px 12px; }
.btn-ghost:hover { color: var(--text-primary); background: var(--accent-bg); }

.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn-full { width: 100%; }

.btn-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; background: transparent; border: none;
    border-radius: var(--radius-sm); color: var(--text-muted); cursor: pointer;
    transition: all var(--duration) var(--ease); font-size: 16px;
}
.btn-icon:hover { background: var(--bg-input); color: var(--text-primary); }

/* ========== TOPBAR ========== */
.topbar {
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--topbar-height);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 var(--space-xl);
    background: rgba(255,255,255,0.92); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 100;
    transition: left 0.3s cubic-bezier(0.4,0,0.2,1);
}

.topbar-left { display: flex; align-items: center; }
.topbar-logo {
    display: flex; align-items: center; cursor: pointer;
    transition: opacity var(--duration) var(--ease);
}
.topbar-logo:hover { opacity: 0.6; }
.topbar-logo img { height: 38px; }

.topbar-center {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: 100%; max-width: 420px; padding: 0 16px; box-sizing: border-box;
}

.search-wrapper { position: relative; }
.search-wrapper svg {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    width: 15px; height: 15px; color: var(--text-muted); pointer-events: none;
}
.search-wrapper input {
    width: 100%; padding: 9px 16px 9px 40px;
    background: var(--bg-input); border: 1px solid transparent;
    border-radius: var(--radius-full); color: var(--text-primary);
    font-family: inherit; font-size: 13px; outline: none;
    transition: all var(--duration) var(--ease);
}
.search-wrapper input:focus { border-color: var(--border-primary); background: #fff; }
.search-wrapper input::placeholder { color: var(--text-muted); }

.topbar-right { display: flex; align-items: center; gap: var(--space-md); }

.theme-toggle {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border: 1px solid var(--border-subtle);
    border-radius: 50%; background: var(--bg-input); cursor: pointer;
    font-size: 16px; transition: all var(--duration) var(--ease);
    flex-shrink: 0;
}
.theme-toggle:hover { background: var(--border-primary); }

.user-menu { display: flex; align-items: center; gap: var(--space-sm); }
.user-avatar {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; background: var(--accent);
    border-radius: 50%; font-size: 13px; font-weight: 700; color: white;
}
.user-menu > span { font-size: 13px; font-weight: 500; color: var(--text-secondary); }

/* ========== MAIN CONTENT ========== */
.main-content {
    padding-top: calc(var(--topbar-height) + var(--space-xl));
    padding-left: var(--space-xl); padding-right: var(--space-xl);
    padding-bottom: var(--space-2xl);
    max-width: var(--content-max-width); margin: 0 auto;
}

/* ========== STATS ========== */
.stats-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md); margin-bottom: var(--space-lg);
}
.stat-card {
    background: var(--bg-card); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md); padding: var(--space-lg);
    display: flex; align-items: center; gap: var(--space-md);
    box-shadow: var(--shadow-card); transition: all var(--duration) var(--ease);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat-card.stat-active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.stat-icon {
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: var(--radius-sm);
    font-size: 20px; flex-shrink: 0;
}
.stat-value { font-size: 28px; font-weight: 800; line-height: 1; color: var(--text-primary); }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.3px; }

/* ========== FILTERS ========== */
.filters-bar {
    display: flex; align-items: center; gap: var(--space-md);
    margin-bottom: var(--space-lg); padding: 12px var(--space-md);
    background: var(--bg-card); border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle); box-shadow: var(--shadow-xs);
    flex-wrap: wrap;
}
.filter-group { display: flex; align-items: center; gap: 6px; }
.filter-group label {
    font-size: 11px; font-weight: 600; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap;
}
.filter-select {
    padding: 6px 28px 6px 10px; background: var(--bg-input);
    border: 1px solid var(--border-subtle); border-radius: var(--radius-sm);
    color: var(--text-primary); font-family: inherit; font-size: 13px;
    cursor: pointer; outline: none; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='%23555' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 8px center;
    transition: border-color var(--duration) var(--ease);
}
.filter-select:focus { border-color: var(--accent); }

.separator { width: 1px; height: 24px; background: var(--border-subtle); flex-shrink: 0; }
.filter-count { font-size: 12px; color: var(--text-muted); }

.view-toggle {
    display: flex; background: var(--bg-input); border-radius: var(--radius-sm);
    padding: 3px; gap: 2px; margin-left: auto;
}
.view-toggle-btn {
    padding: 5px 12px; border: none; border-radius: 4px;
    font-family: inherit; font-size: 12px; font-weight: 500;
    cursor: pointer; background: transparent; color: var(--text-muted);
    transition: all var(--duration) var(--ease); white-space: nowrap;
}
.view-toggle-btn.active { background: #fff; color: var(--text-primary); box-shadow: var(--shadow-sm); }
.view-toggle-btn:hover:not(.active) { color: var(--text-primary); }

/* ========== PROJECT CARDS ========== */
.projects-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: var(--space-md);
}
.project-card {
    background: var(--bg-card); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md); padding: var(--space-lg);
    cursor: pointer; transition: all var(--duration) var(--ease);
    display: flex; flex-direction: column; gap: 14px;
    position: relative; overflow: hidden; box-shadow: var(--shadow-card);
}
.project-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: var(--card-accent, var(--accent)); opacity: 0;
    transition: opacity var(--duration) var(--ease);
}
.project-card:hover {
    border-color: var(--border-hover); box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
}
.project-card:hover::before { opacity: 1; }

.project-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-sm); }
.project-card-title { font-size: 15px; font-weight: 700; line-height: 1.3; }
.project-card-client { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.project-card-body { flex: 1; }
.project-card-desc {
    font-size: 13px; color: var(--text-muted); line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.project-card-footer {
    display: flex; align-items: center; justify-content: space-between;
    gap: var(--space-sm); padding-top: 14px; border-top: 1px solid var(--border-subtle); flex-wrap: wrap;
}
.project-card-meta { display: flex; align-items: center; gap: var(--space-md); font-size: 11px; color: var(--text-muted); }
.project-card-meta-item { display: flex; align-items: center; gap: 4px; }
.project-card-tags { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.card-owner { display: flex; align-items: center; gap: 6px; }
.card-owner-avatar {
    width: 20px; height: 20px; border-radius: 50%;
    background: var(--accent); display: flex; align-items: center;
    justify-content: center; font-size: 9px; font-weight: 700; color: white;
}
.card-owner-name { font-size: 12px; color: var(--text-secondary); }

/* ========== BADGES ========== */
.status-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: var(--radius-full);
    font-size: 11px; font-weight: 600; white-space: nowrap;
}
.type-badge {
    display: inline-flex; padding: 3px 8px; border-radius: var(--radius-sm);
    font-size: 11px; font-weight: 500; background: var(--bg-section); color: var(--text-secondary);
    white-space: nowrap;
}
.early-badge {
    display: inline-flex; padding: 3px 8px; border-radius: var(--radius-sm);
    font-size: 11px; font-weight: 500; background: rgba(200,150,0,0.08); color: #a08000;
}
.revision-badge {
    display: inline-flex; align-items: center; gap: 3px; padding: 3px 8px;
    border-radius: var(--radius-sm); font-size: 11px; font-weight: 500;
    background: var(--bg-section); color: var(--text-secondary);
}
.revision-badge.warning { background: rgba(200,150,0,0.08); color: #a08000; }
.revision-badge.danger { background: rgba(200,0,0,0.06); color: #c00; }

/* ========== PROJECT DETAIL ========== */
.project-detail { animation: fadeIn 0.3s var(--ease); }
.project-detail-header {
    display: flex; align-items: center; gap: var(--space-md); margin-bottom: var(--space-xl);
}
.btn-back {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 14px; background: #fff;
    border: 1px solid var(--border-primary); border-radius: var(--radius-sm);
    color: var(--text-secondary); font-family: inherit; font-size: 13px;
    cursor: pointer; transition: all var(--duration) var(--ease);
}
.btn-back:hover { background: var(--bg-input); color: var(--text-primary); }
.project-detail-title { flex: 1; }
.project-detail-title h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.5px; }
.project-detail-title .project-client { font-size: 14px; color: var(--text-secondary); margin-top: 2px; }
.project-detail-actions { display: flex; gap: var(--space-sm); }

/* ========== PIPELINE STEPPER ========== */
.pipeline-container {
    background: var(--bg-card); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md); padding: var(--space-xl) var(--space-lg);
    margin-bottom: var(--space-xl); overflow-x: auto; box-shadow: var(--shadow-card);
}
.pipeline-stepper { display: flex; align-items: flex-start; min-width: 800px; }
.pipeline-step {
    display: flex; flex-direction: column; align-items: center;
    flex: 1; position: relative; cursor: pointer;
}
.pipeline-step:not(:last-child)::after {
    content: ''; position: absolute; top: 17px; left: calc(50% + 17px);
    width: calc(100% - 34px); height: 1px; background: var(--border-primary);
}
.pipeline-dot {
    width: 34px; height: 34px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; z-index: 1; transition: all 0.3s var(--ease);
    border: 2px solid transparent; background: var(--bg-input);
}
.pipeline-step.future .pipeline-dot {
    background: var(--bg-input); border-color: var(--border-subtle); opacity: 0.4;
}
.pipeline-step.visited .pipeline-dot {
    background: var(--accent-bg); border-color: var(--text-muted); opacity: 1;
}
.pipeline-step.completed .pipeline-dot {
    background: var(--accent); color: white;
}
.pipeline-step.active .pipeline-dot {
    width: 42px; height: 42px; font-size: 17px;
    box-shadow: 0 0 0 5px rgba(0,0,0,0.06);
    animation: pipelinePulse 2.5s ease-in-out infinite;
}
.pipeline-step.pause .pipeline-dot {
    background: #c00; color: white;
    box-shadow: 0 0 0 5px rgba(200,0,0,0.08);
    animation: pipelinePulse 2.5s ease-in-out infinite;
}
.pipeline-label {
    font-size: 10px; font-weight: 500; color: var(--text-muted);
    margin-top: 8px; text-align: center; white-space: nowrap;
}
.pipeline-step.active .pipeline-label { color: var(--text-primary); font-weight: 700; }
.pipeline-step.completed .pipeline-label, .pipeline-step.visited .pipeline-label { color: var(--text-secondary); }
.pipeline-step:hover .pipeline-dot { transform: scale(1.1); }
.pipeline-step:hover .pipeline-label { color: var(--text-primary); }

/* ========== PROJECT INFO ========== */
.project-info-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md); margin-bottom: var(--space-xl);
}
.info-card {
    background: var(--bg-card); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm); padding: 14px var(--space-lg);
}
.info-card-label {
    font-size: 10px; font-weight: 600; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px;
}
.info-card-value { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }

.project-actions { display: flex; gap: var(--space-sm); margin-bottom: var(--space-xl); flex-wrap: wrap; }
.project-description {
    font-size: 14px; color: var(--text-secondary); line-height: 1.7;
    padding: var(--space-lg); background: var(--bg-card);
    border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
    margin-bottom: var(--space-xl);
}

/* ========== DETAIL SECTIONS ========== */
.detail-section {
    background: var(--bg-card); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md); margin-bottom: var(--space-md); overflow: hidden;
}
.detail-section-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px var(--space-lg); border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-section);
}
.detail-section-title { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: var(--space-sm); }
.detail-section-body { padding: var(--space-lg); }
.detail-sections-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-md); margin-bottom: var(--space-md);
}

.item-list { list-style: none; }
.item-list-item {
    display: flex; align-items: flex-start; gap: var(--space-md);
    padding: 12px 0; border-bottom: 1px solid var(--border-subtle);
}
.item-list-item:last-child { border-bottom: none; padding-bottom: 0; }
.item-list-item:first-child { padding-top: 0; }
.item-icon {
    width: 30px; height: 30px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; flex-shrink: 0;
}
.item-content { flex: 1; }
.item-content-desc { font-size: 13px; font-weight: 500; }
.item-content-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.item-badge { padding: 3px 10px; border-radius: var(--radius-full); font-size: 11px; font-weight: 600; flex-shrink: 0; }

.empty-state { text-align: center; padding: var(--space-lg); color: var(--text-muted); font-size: 13px; }
.empty-state-icon { font-size: 24px; margin-bottom: var(--space-sm); opacity: 0.3; }

/* ========== HISTORY ========== */
.history-timeline { position: relative; padding-left: var(--space-xl); }
.history-timeline::before {
    content: ''; position: absolute; left: 14px; top: 0; bottom: 0;
    width: 1px; background: var(--border-primary);
}
.history-item { position: relative; padding-bottom: var(--space-lg); }
.history-item:last-child { padding-bottom: 0; }
.history-dot {
    position: absolute; left: calc(-1 * var(--space-xl) + 8px); top: 2px;
    width: 14px; height: 14px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 8px; z-index: 1; border: 2px solid var(--bg-card);
}
.history-content { padding-left: var(--space-sm); }
.history-header { display: flex; align-items: center; gap: var(--space-sm); margin-bottom: 2px; flex-wrap: wrap; }
.history-type { font-size: 12px; font-weight: 600; }
.history-user { font-size: 11px; color: var(--text-muted); }
.history-time { font-size: 11px; color: var(--text-muted); margin-left: auto; }
.history-note { font-size: 13px; color: var(--text-secondary); line-height: 1.5; margin-top: 4px; }
.history-status-change { display: flex; align-items: center; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.history-status-arrow { color: var(--text-muted); font-size: 12px; }

/* ========== GANTT ========== */
.gantt-wrapper {
    background: var(--bg-card); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md); box-shadow: var(--shadow-card); overflow: hidden;
}
.gantt-controls {
    display: flex; align-items: center; gap: 8px; padding: 8px 0; margin-bottom: 4px;
}
.gantt-scroll { overflow-x: auto; position: relative; scroll-behavior: smooth; cursor: grab; }
.gantt-scroll:active { cursor: grabbing; }
.gantt-chart { position: relative; min-width: 100%; }

.gantt-months-row {
    display: flex; position: sticky; top: 0; z-index: 6;
    background: var(--bg-card); border-bottom: 1px solid var(--border-subtle);
}
.gantt-month-cell {
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; color: var(--text-primary);
    padding: 10px 0; border-right: 1px solid var(--border-subtle);
    text-transform: uppercase; letter-spacing: 0.5px;
}
.gantt-weeks-row {
    display: flex; position: sticky; top: 36px; z-index: 5;
    background: var(--bg-section); border-bottom: 1px solid var(--border-primary);
}
.gantt-week-cell {
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 500; color: var(--text-muted);
    padding: 5px 0; border-right: 1px solid var(--border-subtle);
}
.gantt-week-cell.today { color: #c00; font-weight: 700; }

.gantt-body { position: relative; }
.gantt-row {
    display: flex; align-items: center;
    border-bottom: 1px solid var(--border-subtle);
    min-height: 48px; transition: background var(--duration) var(--ease);
}
.gantt-row:hover { background: var(--accent-bg); }

.gantt-label-cell {
    width: 220px; min-width: 220px; flex-shrink: 0;
    padding: 8px 16px; position: sticky; left: 0;
    background: var(--bg-card); z-index: 3;
    border-right: 1px solid var(--border-primary);
    display: flex; flex-direction: column; gap: 1px;
}
.gantt-row:hover .gantt-label-cell { background: rgba(0,0,0,0.01); }
.gantt-label-name { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gantt-label-client { font-size: 10px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.gantt-timeline-cell { flex: 1; position: relative; height: 48px; }

.gantt-bar {
    position: absolute; height: 24px; top: 12px;
    border-radius: 4px; cursor: pointer;
    transition: all 0.15s var(--ease);
    display: flex; align-items: center; padding: 0 8px;
    font-size: 10px; font-weight: 600; color: white;
    min-width: 4px; overflow: hidden;
}
.gantt-bar:hover { transform: scaleY(1.2); box-shadow: 0 4px 12px rgba(0,0,0,0.12); z-index: 2; }
.gantt-bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.gantt-today-line {
    position: absolute; top: 0; bottom: 0; width: 2px;
    background: #c00; z-index: 4; opacity: 0.5; pointer-events: none;
}
.gantt-today-line::before {
    content: 'I dag'; position: absolute; top: 4px; left: 6px;
    font-size: 9px; font-weight: 700; color: #c00;
    white-space: nowrap; text-transform: uppercase; letter-spacing: 0.5px;
}

.gantt-grid-line { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--border-subtle); pointer-events: none; }
.gantt-grid-line.month { background: var(--border-primary); }

/* ========== MODAL ========== */
.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1000; display: flex; align-items: center;
    justify-content: center; padding: var(--space-lg);
}
.modal-overlay.hidden { display: none; }
.modal-backdrop {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.25); backdrop-filter: blur(4px);
    animation: fadeIn 0.2s var(--ease);
}
.modal-container {
    position: relative; width: 100%; max-width: 500px;
    max-height: 85vh; overflow-y: auto;
    background: #fff; border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
    animation: modalIn 0.25s var(--ease);
}
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: var(--space-lg) var(--space-xl); border-bottom: 1px solid var(--border-subtle);
}
.modal-title { font-size: 16px; font-weight: 700; }
.modal-body { padding: var(--space-xl); }
.modal-footer { display: flex; justify-content: flex-end; gap: var(--space-sm); padding: var(--space-md) var(--space-xl) var(--space-xl); }

/* ========== TOAST ========== */
.toast-container {
    position: fixed; bottom: var(--space-lg); right: var(--space-lg);
    z-index: 2000; display: flex; flex-direction: column; gap: var(--space-sm);
}
.toast {
    padding: 12px var(--space-lg); background: #fff;
    border: 1px solid var(--border-primary); border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md); font-size: 13px;
    display: flex; align-items: center; gap: var(--space-sm);
    animation: slideInRight 0.3s var(--ease), fadeOut 0.3s var(--ease) 2.7s forwards;
    min-width: 260px;
}
.toast-success { border-left: 3px solid #22c55e; }
.toast-error { border-left: 3px solid #c00; }
.toast-info { border-left: 3px solid #111; }

.empty-dashboard { text-align: center; padding: var(--space-2xl); color: var(--text-muted); }
.empty-dashboard-icon { font-size: 48px; margin-bottom: var(--space-md); opacity: 0.2; }
.empty-dashboard h3 { font-size: 16px; color: var(--text-secondary); margin-bottom: var(--space-sm); }

/* ========== ANIMATIONS ========== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(60px); } to { opacity: 1; transform: translateX(0); } }
@keyframes pipelinePulse {
    0%,100% { box-shadow: 0 0 0 5px rgba(0,0,0,0.06); }
    50% { box-shadow: 0 0 0 8px rgba(0,0,0,0.03); }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1200px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) {
    .topbar-center { display: none; }
    .main-content { padding-left: var(--space-md); padding-right: var(--space-md); }
    .projects-grid { grid-template-columns: 1fr; }
    .project-detail-header { flex-wrap: wrap; }
    .detail-sections-grid { grid-template-columns: 1fr; }
    .gantt-label-cell { width: 160px; min-width: 160px; }
}
@media (max-width: 640px) {
    .stats-grid { grid-template-columns: 1fr; }
    .filters-bar { flex-direction: column; align-items: stretch; }
    .filter-group { width: 100%; }
    .view-toggle { margin-left: 0; width: 100%; }
    .view-toggle-btn { flex: 1; }
    .project-info-grid { grid-template-columns: 1fr 1fr; }
    .project-actions { flex-direction: column; }
    .project-actions .btn { width: 100%; }
}

/* ========== RISK ALERTS ========== */
.risk-alerts-container { margin-bottom: var(--space-lg); }
.risk-alerts-header {
    display: flex; align-items: center; gap: var(--space-sm);
    margin-bottom: var(--space-md); font-size: 14px; font-weight: 700;
}
.risk-alerts-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-sm);
}
.risk-card {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 12px var(--space-md); border-radius: var(--radius-sm);
    background: var(--bg-card); border: 1px solid var(--border-subtle);
    cursor: pointer; transition: all var(--duration) var(--ease);
}
.risk-card:hover { border-color: var(--border-hover); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.risk-card.overdue { border-left: 3px solid #dc2626; }
.risk-card.approaching { border-left: 3px solid #d97706; }
.risk-card.stale { border-left: 3px solid #9ca3af; }
.risk-card.revisions { border-left: 3px solid #ea580c; }
.risk-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.risk-content { flex: 1; min-width: 0; }
.risk-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.risk-desc { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ========== TEAM VIEW ========== */
.team-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: var(--space-md);
}
.team-card {
    background: var(--bg-card); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md); overflow: hidden;
    box-shadow: var(--shadow-card); transition: all var(--duration) var(--ease);
}
.team-card:hover { box-shadow: var(--shadow-md); }
.team-card-header {
    display: flex; align-items: center; gap: 12px;
    padding: var(--space-lg); border-bottom: 1px solid var(--border-subtle);
}
.team-avatar {
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--accent); display: flex; align-items: center;
    justify-content: center; font-size: 18px; font-weight: 700; color: white;
    flex-shrink: 0;
}
.team-name { font-size: 16px; font-weight: 700; }
.team-role { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.team-stats {
    display: grid; grid-template-columns: repeat(4, 1fr);
    border-bottom: 1px solid var(--border-subtle);
}
.team-stat {
    text-align: center; padding: 12px 8px;
    border-right: 1px solid var(--border-subtle);
}
.team-stat:last-child { border-right: none; }
.team-stat-value { font-size: 20px; font-weight: 800; }
.team-stat-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px; margin-top: 2px; }

.team-workload {
    padding: 12px var(--space-lg);
    border-bottom: 1px solid var(--border-subtle);
}
.team-workload-label {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 11px; color: var(--text-muted); margin-bottom: 6px;
    text-transform: uppercase; letter-spacing: 0.3px;
}
.workload-bar-bg {
    height: 6px; background: var(--bg-input); border-radius: 3px; overflow: hidden;
}
.workload-bar-fill {
    height: 100%; border-radius: 3px; transition: width 0.5s var(--ease);
}
.workload-bar-fill.low { background: #22c55e; }
.workload-bar-fill.medium { background: #d97706; }
.workload-bar-fill.high { background: #dc2626; }

.team-projects-list { padding: var(--space-md) var(--space-lg); }
.team-project-item {
    display: flex; align-items: center; gap: var(--space-sm);
    padding: 8px 0; border-bottom: 1px solid var(--border-subtle);
    cursor: pointer; transition: opacity var(--duration) var(--ease);
}
.team-project-item:hover { opacity: 0.7; }
.team-project-item:last-child { border-bottom: none; }
.team-project-name { flex: 1; font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-project-status { font-size: 11px; flex-shrink: 0; }

.team-empty { text-align: center; padding: var(--space-lg); color: var(--text-muted); font-size: 12px; }

/* ========== ACTIVITY FEED ========== */
.activity-container {
    margin-top: var(--space-xl);
    background: var(--bg-card); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md); overflow: hidden;
    box-shadow: var(--shadow-card);
}
.activity-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px var(--space-lg);
    background: var(--bg-section); border-bottom: 1px solid var(--border-subtle);
}
.activity-title { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: var(--space-sm); }
.activity-body { max-height: 400px; overflow-y: auto; }

.activity-item {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 12px var(--space-lg);
    border-bottom: 1px solid var(--border-subtle);
    transition: background var(--duration) var(--ease);
    cursor: pointer;
}
.activity-item:hover { background: var(--accent-bg); }
.activity-item:last-child { border-bottom: none; }
.activity-dot {
    width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
    margin-top: 6px;
}
.activity-text { flex: 1; min-width: 0; }
.activity-desc { font-size: 13px; line-height: 1.4; }
.activity-desc strong { font-weight: 600; }
.activity-meta {
    font-size: 11px; color: var(--text-muted); margin-top: 2px;
    display: flex; align-items: center; gap: var(--space-sm);
}
.activity-project-link { color: var(--text-secondary); font-weight: 500; }
.activity-empty { text-align: center; padding: var(--space-xl); color: var(--text-muted); font-size: 13px; }

/* ========== PHASE CHECKLIST ========== */
.phase-checklists { display: flex; flex-direction: column; gap: var(--space-sm); }
.phase-checklist-group { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); overflow: hidden; }
.phase-checklist-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px var(--space-md); cursor: pointer;
    transition: background var(--duration) var(--ease);
}
.phase-checklist-header:hover { background: var(--accent-bg); }
.phase-checklist-title { display: flex; align-items: center; gap: var(--space-sm); font-size: 13px; font-weight: 600; }
.phase-checklist-progress { font-size: 11px; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
.phase-progress-bar { width: 60px; height: 4px; background: var(--bg-input); border-radius: 2px; overflow: hidden; }
.phase-progress-fill { height: 100%; border-radius: 2px; background: #22c55e; transition: width 0.3s var(--ease); }
.phase-checklist-items { padding: 0 var(--space-md) 10px; display: none; }
.phase-checklist-group.open .phase-checklist-items { display: block; }
.phase-checklist-group.open .phase-checklist-header { border-bottom: 1px solid var(--border-subtle); }
.checklist-item {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 0; font-size: 13px; cursor: pointer;
    transition: opacity var(--duration) var(--ease);
}
.checklist-item:hover { opacity: 0.7; }
.checklist-item.done { text-decoration: line-through; color: var(--text-muted); }
.checklist-item input[type="checkbox"] {
    width: 16px; height: 16px; accent-color: #22c55e; cursor: pointer; flex-shrink: 0;
}
.checklist-add {
    display: flex; gap: var(--space-sm); padding: 8px 0 2px;
    border-top: 1px solid var(--border-subtle); margin-top: 4px;
}
.checklist-add input {
    flex: 1; border: 1px solid var(--border-subtle); border-radius: var(--radius-sm);
    padding: 4px 8px; font-size: 12px; background: var(--bg-input); color: var(--text-primary);
    font-family: inherit;
}
.checklist-add button {
    font-size: 11px; padding: 4px 10px; background: none; border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm); cursor: pointer; color: var(--text-secondary);
    transition: all var(--duration) var(--ease);
}
.checklist-add button:hover { background: var(--accent-bg); border-color: var(--border-hover); }

/* ========== COMMENT THREAD ========== */
.comments-section { margin-top: var(--space-md); }
.comment-thread {
    display: flex; flex-direction: column; gap: 2px;
    max-height: 400px; overflow-y: auto; padding: var(--space-sm) 0;
}
.comment-item {
    display: flex; gap: 10px; padding: 10px var(--space-md);
    transition: background var(--duration) var(--ease);
}
.comment-item:hover { background: var(--accent-bg); }
.comment-avatar {
    width: 30px; height: 30px; border-radius: 50%; background: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; color: white; flex-shrink: 0;
}
.comment-body { flex: 1; min-width: 0; }
.comment-header { display: flex; align-items: center; gap: var(--space-sm); margin-bottom: 2px; }
.comment-author { font-size: 12px; font-weight: 600; }
.comment-time { font-size: 11px; color: var(--text-muted); }
.comment-text { font-size: 13px; line-height: 1.5; color: var(--text-secondary); word-wrap: break-word; }
.comment-input-wrapper {
    display: flex; flex-direction: column; gap: var(--space-sm); padding: 14px var(--space-md);
    border-top: 1px solid var(--border-subtle); background: var(--bg-section);
}
.comment-input {
    width: 100%; border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
    padding: 12px 16px; font-size: 13px; background: var(--bg-input);
    color: var(--text-primary); font-family: inherit; resize: vertical; min-height: 48px;
    line-height: 1.5; box-sizing: border-box;
}
.comment-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }
.comment-send {
    align-self: flex-end; padding: 10px 24px; background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: white; border: none; border-radius: var(--radius-sm); font-size: 13px; font-weight: 700;
    cursor: pointer; transition: all var(--duration) var(--ease);
    letter-spacing: 0.3px; box-shadow: 0 2px 8px rgba(79,70,229,0.3);
}
.comment-send:hover { background: linear-gradient(135deg, #4f46e5, #4338ca); box-shadow: 0 4px 12px rgba(79,70,229,0.4); transform: translateY(-1px); }
.comment-empty { text-align: center; padding: var(--space-lg); color: var(--text-muted); font-size: 13px; }

/* ========== PROJECT LINKS ========== */
.project-links {
    display: flex; flex-direction: column; gap: var(--space-sm);
}
.project-link-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; background: var(--bg-section); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm); font-size: 13px;
    transition: all var(--duration) var(--ease);
}
.project-link-item:hover { border-color: var(--border-hover); }
.project-link-icon { font-size: 16px; flex-shrink: 0; }
.project-link-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px; }
.project-link-value {
    font-size: 13px; font-weight: 500; color: var(--text-primary);
    word-break: break-all;
}
.project-link-value a { color: var(--accent); text-decoration: none; }
.project-link-value a:hover { text-decoration: underline; }
.project-link-empty { color: var(--text-muted); font-style: italic; }

/* ========== NOTIFICATIONS ========== */
.notification-bell {
    position: relative; cursor: pointer; padding: 8px;
    border-radius: var(--radius-sm); transition: background var(--duration) var(--ease);
    display: flex; align-items: center; justify-content: center;
}
.notification-bell:hover { background: var(--bg-input); }
.notification-badge {
    position: absolute; top: 2px; right: 2px;
    background: #ef4444; color: white; font-size: 10px; font-weight: 700;
    min-width: 18px; height: 18px; border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 4px; line-height: 1;
}
.notification-panel {
    position: fixed; top: 56px; right: 16px; width: 380px; max-height: 480px;
    background: var(--bg-card); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md); box-shadow: var(--shadow-md);
    z-index: 1000; display: flex; flex-direction: column;
    overflow: hidden; animation: slideDown 0.2s var(--ease);
}
.notification-panel.hidden { display: none; }
.notification-panel-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px; border-bottom: 1px solid var(--border-subtle);
    font-size: 14px; font-weight: 600;
}
.notification-list { overflow-y: auto; max-height: 420px; }
.notification-item {
    display: flex; gap: 12px; padding: 12px 16px;
    border-bottom: 1px solid var(--border-subtle); cursor: pointer;
    transition: background var(--duration) var(--ease);
}
.notification-item:hover { background: var(--accent-bg); }
.notification-item.unread { background: rgba(99,102,241,0.06); }
.notification-item .comment-avatar { width: 32px; height: 32px; font-size: 13px; flex-shrink: 0; }
.notification-item-body { flex: 1; min-width: 0; }
.notification-item-title { font-size: 13px; font-weight: 500; margin-bottom: 2px; }
.notification-item-title strong { font-weight: 700; }
.notification-item-preview { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notification-item-time { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.notification-empty { text-align: center; padding: 32px 16px; color: var(--text-muted); font-size: 13px; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* ========== MENTION AUTOCOMPLETE ========== */
.mention-dropdown {
    position: absolute; bottom: 100%; left: 0; right: 0;
    background: var(--bg-card); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm); box-shadow: var(--shadow-md);
    max-height: 160px; overflow-y: auto; z-index: 100; display: none;
}
.mention-dropdown.visible { display: block; }
.mention-option {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px; cursor: pointer; font-size: 13px;
    transition: background var(--duration) var(--ease);
}
.mention-option:hover, .mention-option.active { background: var(--accent-bg); }
.mention-option .comment-avatar { width: 24px; height: 24px; font-size: 11px; flex-shrink: 0; }
.comment-text .mention { color: var(--accent); font-weight: 600; }
/* ========== PRESENCE / ONLINE ========== */
.presence-indicator {
    display: flex; align-items: center; gap: 6px;
}
.presence-avatars { display: flex; gap: 0; }
.presence-avatar {
    width: 28px; height: 28px; border-radius: 50%; background: #22c55e;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; color: white; position: relative;
    margin-left: -6px; border: 2px solid var(--bg-page);
    transition: transform var(--duration) var(--ease);
}
.presence-avatar:first-child { margin-left: 0; }
.presence-avatar:hover { transform: scale(1.15); z-index: 2; }
.presence-dot {
    position: absolute; bottom: -1px; right: -1px; width: 9px; height: 9px;
    background: #22c55e; border-radius: 50%; border: 2px solid var(--bg-page);
    animation: presencePulse 2s ease-in-out infinite;
}
.presence-count {
    font-size: 11px; color: #22c55e; font-weight: 600; white-space: nowrap;
}
@keyframes presencePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
    50% { box-shadow: 0 0 0 4px rgba(34,197,94,0); }
}
/* ========== PRESENCE / ONLINE ========== */

/* ========== ADMIN PANEL ========== */
.admin-users-list { display: flex; flex-direction: column; gap: 4px; }
.admin-user-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 10px; border-radius: var(--radius-sm);
    transition: background var(--duration) var(--ease);
}
.admin-user-row:hover { background: var(--accent-bg); }
.admin-user-info { display: flex; align-items: center; gap: 10px; }

/* ========== CHECKLIST TEMPLATES ========== */
.checklist-template-items {
    max-height: 200px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px;
    padding: 8px; background: var(--bg-section); border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
}
.checklist-template-item {
    display: flex; align-items: center; gap: 8px; font-size: 12px;
    padding: 4px 6px; border-radius: 4px; cursor: pointer;
    transition: background var(--duration) var(--ease);
}
.checklist-template-item:hover { background: var(--accent-bg); }
.checklist-template-item input[type="checkbox"] {
    width: 14px; height: 14px; accent-color: #22c55e; cursor: pointer; flex-shrink: 0;
}
/* ========== NOTES SIDE PANEL ========== */
.notes-sidepanel {
    position: fixed; top: 0; left: 0; height: 100vh;
    min-width: 420px; max-width: 80vw;
    background: var(--bg-card); border-right: 1px solid var(--border-subtle);
    box-shadow: 4px 0 24px rgba(0,0,0,0.15);
    z-index: 1000; display: flex; flex-direction: column;
    transform: translateX(-100%); transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}
.notes-sidepanel.open { transform: translateX(0); }
.notes-sidepanel.resizing { transition: none; }
.notes-sidepanel.pinned { position: fixed; }
.notes-resize-handle {
    position: absolute; top: 0; right: -4px; width: 8px; height: 100%;
    cursor: col-resize; z-index: 1001;
}
.notes-resize-handle:hover, .notes-resize-handle:active {
    background: var(--accent); opacity: 0.3; border-radius: 4px;
}
.app-wrapper { transition: margin-left 0.3s cubic-bezier(0.4,0,0.2,1); }
.app-wrapper.resizing { transition: none; }
.notes-sidepanel-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 12px; border-bottom: 1px solid var(--border-subtle);
    font-size: 13px; font-weight: 600; flex-shrink: 0;
}
.notes-header-actions { display: flex; align-items: center; gap: 4px; }
.notes-pin-btn {
    background: none; border: none; cursor: pointer; font-size: 14px;
    padding: 4px 6px; border-radius: 4px; opacity: 0.5;
    transition: all var(--duration) var(--ease);
}
.notes-pin-btn:hover { opacity: 1; background: var(--accent-bg); }
.notes-pin-btn.pinned { opacity: 1; color: var(--accent); }
/* Horizontal layout: tabs left, editor right */
.notes-panel-body {
    flex: 1; display: flex; flex-direction: row; min-height: 0; overflow: hidden;
}
.notes-tabs-column {
    width: 180px; min-width: 140px; flex-shrink: 0;
    border-right: 1px solid var(--border-subtle);
    display: flex; flex-direction: column; background: var(--bg-section);
}
.notes-tabs-header {
    padding: 8px 10px; display: flex; align-items: center; gap: 6px;
    border-bottom: 1px solid var(--border-subtle); flex-shrink: 0;
}
.notes-tabs-list { flex: 1; overflow-y: auto; }
.sidepanel-note-item {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 10px; cursor: pointer; font-size: 12px;
    transition: background var(--duration) var(--ease);
    border-bottom: 1px solid var(--border-subtle); position: relative;
}
.sidepanel-note-item:hover { background: var(--accent-bg); }
.sidepanel-note-item.active { background: var(--accent-bg); border-left: 3px solid var(--accent); }
.sidepanel-note-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sidepanel-note-title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidepanel-note-time { font-size: 10px; color: var(--text-muted); }
.sidepanel-note-delete {
    opacity: 0; background: none; border: none; cursor: pointer; font-size: 12px;
    padding: 2px 4px; border-radius: 4px; flex-shrink: 0;
    transition: all var(--duration) var(--ease); color: var(--text-muted);
}
.sidepanel-note-item:hover .sidepanel-note-delete { opacity: 1; }
.sidepanel-note-delete:hover { background: rgba(239,68,68,0.1); color: #ef4444; }
/* Folder styles */
.notes-folder-group { border-bottom: 1px solid var(--border-subtle); }
.notes-folder-header {
    display: flex; align-items: center; gap: 6px; padding: 8px 10px;
    font-size: 11px; font-weight: 600; color: var(--text-secondary); cursor: pointer;
    transition: background var(--duration) var(--ease); text-transform: uppercase; letter-spacing: 0.3px;
}
.notes-folder-header:hover { background: var(--accent-bg); }
.notes-folder-header svg { flex-shrink: 0; }
.notes-folder-name { flex: 1; }
.notes-folder-count { font-size: 10px; color: var(--text-muted); font-weight: 400; }
.notes-folder-delete {
    opacity: 0; background: none; border: none; cursor: pointer; font-size: 10px;
    padding: 2px; color: var(--text-muted); transition: opacity var(--duration);
}
.notes-folder-header:hover .notes-folder-delete { opacity: 1; }
.notes-folder-delete:hover { color: #ef4444; }
.notes-folder-items { display: none; }
.notes-folder-group.open .notes-folder-items { display: block; }
.notes-folder-group.open .notes-folder-header svg { transform: rotate(90deg); }
.notes-folder-items .sidepanel-note-item { padding-left: 24px; }
/* Drag & drop */
.sidepanel-note-item[draggable] { cursor: grab; }
.sidepanel-note-item[draggable]:active { cursor: grabbing; }
.notes-folder-header.drag-target { outline: 2px dashed var(--border-hover); outline-offset: -2px; }
.notes-folder-header.drag-over { background: var(--accent-bg); outline-color: var(--accent); }
/* Editor column */
.notes-editor-column {
    flex: 1; display: flex; flex-direction: column; min-width: 0;
}
.sidepanel-editor { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.sidepanel-editor-title {
    border: none; background: none; font-size: 15px; font-weight: 600;
    padding: 12px 16px 8px; color: var(--text-primary); font-family: inherit; outline: none;
    border-bottom: 1px solid var(--border-subtle); flex-shrink: 0;
}
.sidepanel-editor-content {
    flex: 1; padding: 12px 16px; font-size: 13px; line-height: 1.7;
    outline: none; overflow-y: auto; color: var(--text-primary);
    white-space: pre-wrap; word-wrap: break-word;
}
.sidepanel-editor-content:empty:before {
    content: 'Skriv her...'; color: var(--text-muted); pointer-events: none;
}
.sidepanel-editor-content img { max-width: 100%; border-radius: 4px; margin: 6px 0; display: block; }
.sidepanel-editor-footer {
    padding: 8px 12px; border-top: 1px solid var(--border-subtle);
    display: flex; align-items: center; justify-content: space-between;
    font-size: 11px; color: var(--text-muted); flex-shrink: 0;
}
.notes-panel-toggle {
    position: fixed; left: 0; top: 50%; transform: translateY(-50%);
    width: 56px; height: 96px; background: var(--bg-card); border: 1px solid var(--border-subtle);
    border-left: none; border-radius: 0 var(--radius-md) var(--radius-md) 0;
    cursor: pointer; z-index: 999; display: flex; align-items: center;
    justify-content: center; box-shadow: var(--shadow-md);
    transition: all var(--duration) var(--ease);
}
.notes-panel-toggle svg { width: 28px; height: 28px; }
.notes-panel-toggle:hover { background: var(--accent-bg); width: 64px; }

/* ========== COLLAPSIBLE SECTIONS ========== */
.section-toggle-btn {
    background: none; border: none; cursor: pointer; font-size: 14px;
    color: var(--text-muted); padding: 0 4px;
    transition: transform var(--duration) var(--ease);
}

/* ========== PROJECT TOC (RIGHT PANEL) ========== */
.project-toc-toggle {
    position: fixed; right: 0; top: 50%; transform: translateY(-50%);
    width: 56px; height: 96px; background: var(--bg-card); border: 1px solid var(--border-subtle);
    border-right: none; border-radius: var(--radius-md) 0 0 var(--radius-md);
    cursor: pointer; font-size: 28px; z-index: 998; display: flex; align-items: center;
    justify-content: center; box-shadow: var(--shadow-md); color: var(--text-secondary);
    transition: all var(--duration) var(--ease);
}
.project-toc-toggle:hover { background: var(--accent-bg); width: 64px; }
.project-toc-toggle.open { right: 220px; }
.project-toc {
    position: fixed; top: 0; right: 0; width: 220px; height: 100vh;
    background: var(--bg-card); border-left: 1px solid var(--border-subtle);
    box-shadow: -4px 0 24px rgba(0,0,0,0.1); z-index: 997;
    transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    display: flex; flex-direction: column;
}
.project-toc.open { transform: translateX(0); }
.project-toc-header {
    padding: 16px; font-size: 13px; font-weight: 600;
    border-bottom: 1px solid var(--border-subtle);
}
.project-toc-items { padding: 8px; flex: 1; overflow-y: auto; }
.project-toc-item {
    padding: 8px 12px; font-size: 12px; border-radius: var(--radius-sm);
    cursor: pointer; transition: all var(--duration) var(--ease);
    display: flex; align-items: center; justify-content: space-between;
}
.project-toc-item:hover { background: var(--accent-bg); }
.toc-item-label { flex: 1; display: flex; align-items: center; gap: 6px; }
.toc-visibility-btn {
    background: none; border: none; cursor: pointer; font-size: 14px;
    opacity: 0.4; padding: 2px 4px; border-radius: 4px;
    transition: all var(--duration) var(--ease);
}
.toc-visibility-btn:hover { opacity: 1; background: var(--bg-section); }
.project-toc-item.toc-hidden .toc-item-label {
    text-decoration: line-through; opacity: 0.4;
}
.project-toc-item.toc-hidden .toc-visibility-btn { opacity: 0.7; }

.section-toggle-btn:hover { color: var(--text-primary); }
.detail-section.collapsed > *:not(.detail-section-header) {
    display: none !important;
}
.detail-section-header { user-select: none; }
.detail-section-header:hover { opacity: 0.85; }

/* ========== NOTES PAGE ========== */
.notes-page {
    display: grid; grid-template-columns: 280px 1fr; gap: 0;
    height: calc(100vh - 100px); background: var(--bg-card);
    border-radius: var(--radius-md); border: 1px solid var(--border-subtle);
    overflow: hidden; box-shadow: var(--shadow-card);
}
.notes-sidebar {
    border-right: 1px solid var(--border-subtle); display: flex;
    flex-direction: column; overflow: hidden;
}
.notes-sidebar-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px; border-bottom: 1px solid var(--border-subtle);
}
.notes-sidebar-header h2 { font-size: 16px; margin: 0; }
.notes-list { overflow-y: auto; flex: 1; }
.notes-list-item {
    padding: 12px 16px; cursor: pointer; border-bottom: 1px solid var(--border-subtle);
    transition: background var(--duration) var(--ease);
}
.notes-list-item:hover { background: var(--accent-bg); }
.notes-list-item.active { background: var(--accent-bg); border-left: 3px solid var(--accent); }
.notes-list-title { font-size: 13px; font-weight: 600; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notes-list-preview { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notes-list-time { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.notes-editor { display: flex; flex-direction: column; overflow: hidden; }
.notes-editor-header {
    display: flex; align-items: center; gap: 12px; padding: 12px 20px;
    border-bottom: 1px solid var(--border-subtle);
}
.notes-title-input {
    flex: 1; font-size: 18px; font-weight: 700; border: none; background: none;
    color: var(--text-primary); outline: none; font-family: inherit; padding: 4px 0;
}
.notes-content-input {
    flex: 1; border: none; background: none; color: var(--text-primary);
    font-family: inherit; font-size: 14px; line-height: 1.8; padding: 20px;
    outline: none; overflow-y: auto; white-space: pre-wrap; word-wrap: break-word;
}
.notes-content-input:empty:before {
    content: attr(data-placeholder); color: var(--text-muted); pointer-events: none;
}
.note-inline-img {
    max-width: 100%; border-radius: var(--radius-sm); margin: 8px 0;
    cursor: pointer; display: block; border: 1px solid var(--border-subtle);
    transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.note-inline-img:hover { transform: scale(1.01); box-shadow: var(--shadow-md); }
.note-img-placeholder {
    padding: 16px; text-align: center; color: var(--text-muted);
    background: var(--bg-section); border-radius: var(--radius-sm);
    margin: 8px 0; font-size: 13px; border: 1px dashed var(--border-subtle);
}
.notes-editor-footer {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 20px; border-top: 1px solid var(--border-subtle);
    font-size: 11px; color: var(--text-muted);
}
.notes-empty-editor {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    height: 100%; color: var(--text-muted); text-align: center;
}
.notes-empty-editor h3 { margin: 0 0 8px; font-size: 16px; color: var(--text-secondary); }
.notes-empty-editor p { margin: 0 0 20px; font-size: 13px; }

/* Notes Attachments */
.notes-attachments {
    display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 20px;
    border-top: 1px solid var(--border-subtle); background: var(--bg-section);
}
.note-attachment {
    position: relative; width: 120px; height: 90px; border-radius: var(--radius-sm);
    overflow: hidden; border: 1px solid var(--border-subtle); cursor: pointer;
    transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.note-attachment:hover { transform: scale(1.03); box-shadow: var(--shadow-md); }
.note-attachment img { width: 100%; height: 100%; object-fit: cover; }
.note-attachment-remove {
    position: absolute; top: 4px; right: 4px; width: 22px; height: 22px;
    background: rgba(0,0,0,0.7); color: white; border: none; border-radius: 50%;
    font-size: 11px; cursor: pointer; display: flex; align-items: center;
    justify-content: center; opacity: 0; transition: opacity var(--duration) var(--ease);
}
.note-attachment:hover .note-attachment-remove { opacity: 1; }
.note-attachment-remove:hover { background: #ef4444; }
.notes-content-input.drag-over {
    border: 2px dashed var(--accent) !important; background: var(--accent-bg) !important;
}

@media (max-width: 768px) {
    .notes-page { grid-template-columns: 1fr; height: auto; }
    .notes-sidebar { max-height: 200px; border-right: none; border-bottom: 1px solid var(--border-subtle); }
    .notes-content-input { min-height: 300px; }
}

/* ========== TODO WIDGET (MIN DAG) ========== */
.todo-widget {
    background: var(--bg-card); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md); padding: var(--space-md);
    margin-bottom: var(--space-md); box-shadow: var(--shadow-card);
}
.todo-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.todo-title { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.myday-textarea {
    width: 100%; min-height: 120px; max-height: 400px; resize: vertical;
    border: 1px solid var(--border-subtle); border-radius: var(--radius-sm);
    padding: 10px 12px; font-size: 13px; line-height: 1.8;
    font-family: inherit; color: var(--text-primary); background: var(--bg-input);
    outline: none;
}
.myday-textarea:focus { border-color: var(--accent); }
.myday-rendered { min-height: 40px; padding: 4px 0; }
.myday-empty { text-align: center; padding: 16px; color: var(--text-muted); font-size: 13px; }
.myday-spacer { height: 8px; }
.myday-line { padding: 2px 0; }
.myday-text-line {
    font-size: 13px; font-weight: 600; color: var(--text-primary);
    padding: 4px 0 2px;
}
.myday-check-line {
    display: flex; align-items: center; gap: 10px; padding: 4px 4px;
    border-radius: var(--radius-sm); transition: background var(--duration) var(--ease);
}
.myday-check-line:hover { background: var(--accent-bg); }
.myday-checkbox {
    width: 18px; height: 18px; min-width: 18px;
    border-radius: 4px; border: 2px solid var(--border-hover);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 11px; font-weight: 700;
    transition: all var(--duration) var(--ease); user-select: none;
}
.myday-checkbox:hover { border-color: var(--accent); }
.myday-checkbox.checked { background: #22c55e; border-color: #22c55e; color: white; }
.myday-check-text { flex: 1; font-size: 13px; }
.myday-check-line.checked .myday-check-text {
    text-decoration: line-through; color: var(--text-muted);
}

/* ========== PIN PROJECTS ========== */
.project-card { position: relative; }
.pin-btn {
    position: absolute; top: 8px; right: 8px; z-index: 5;
    background: none; border: none; cursor: pointer; font-size: 14px;
    opacity: 0; transition: opacity var(--duration) var(--ease);
    padding: 4px; border-radius: var(--radius-sm);
}
.project-card:hover .pin-btn { opacity: 0.6; }
.pin-btn:hover { opacity: 1 !important; }
.pin-btn.active { opacity: 1; }
.project-card.pinned {
    border-color: var(--accent); box-shadow: var(--shadow-card), 0 0 0 1px var(--accent);
}

/* ========== PERSONAL NOTES ========== */
.personal-notes-section { border-left: 3px solid var(--accent); }
.personal-note-input {
    width: 100%; border: 1px solid var(--border-subtle); border-radius: var(--radius-sm);
    padding: 12px; font-size: 13px; background: var(--bg-input); color: var(--text-primary);
    font-family: inherit; resize: vertical; min-height: 80px; line-height: 1.6;
    transition: border-color var(--duration) var(--ease);
    box-sizing: border-box;
}
.personal-note-input:focus { outline: none; border-color: var(--accent); }
.personal-note-status { font-size: 11px; margin-top: 4px; min-height: 16px; }

/* ========== RESPONSIVE / MOBILE ========== */
@media (max-width: 768px) {
    .topbar-center { display: none; }
    .topbar { padding: 0 12px; }
    .topbar-right { gap: 6px; }
    .user-menu span { display: none; }
    .main-content { padding: 12px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .projects-grid { grid-template-columns: 1fr; }
    .project-info-grid { grid-template-columns: 1fr 1fr; }
    .detail-sections-grid { grid-template-columns: 1fr; }
    .filters-bar { flex-direction: column; gap: 8px; }
    .filters-bar .search-wrapper { width: 100%; }
    .modal-container { width: 95vw; max-width: 95vw; margin: 10px; }
    .notification-panel { width: calc(100vw - 24px); right: 12px; }
    .project-detail-header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .project-detail-actions { width: 100%; display: flex; gap: 8px; }
    .project-detail-actions .btn { flex: 1; }
    .pipeline-container { overflow-x: auto; }
    .btn-sm { min-height: 44px; }
    .todo-widget { margin-bottom: 12px; }
    h1 { font-size: 20px; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .project-info-grid { grid-template-columns: 1fr; }
    .topbar-right { gap: 4px; }
    #btn-new-project { font-size: 12px; padding: 6px 10px; }
}

/* ========== FEEDBACK CHAT WIDGET ========== */
.feedback-widget {
    position: fixed; bottom: 24px; right: 24px; z-index: 10000;
}
.feedback-fab {
    width: 56px; height: 56px; border-radius: 50%; border: none;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: white; cursor: pointer; box-shadow: 0 4px 16px rgba(79,70,229,0.4);
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s ease;
}
.feedback-fab:hover { transform: scale(1.1); box-shadow: 0 6px 24px rgba(79,70,229,0.5); }
.feedback-chat {
    display: none; position: absolute; bottom: 72px; right: 0;
    width: 380px; max-height: 520px; background: var(--bg-card);
    border: 1px solid var(--border-subtle); border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.2); overflow: hidden;
    flex-direction: column; animation: feedbackSlideUp 0.25s ease;
}
.feedback-chat.open { display: flex; }
@keyframes feedbackSlideUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
.feedback-chat-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: white;
}
.feedback-messages {
    flex: 1; padding: 16px; overflow-y: auto; max-height: 240px;
    display: flex; flex-direction: column; gap: 8px;
}
.feedback-bot-msg {
    background: var(--bg-section); border: 1px solid var(--border-subtle);
    padding: 12px 16px; border-radius: 12px 12px 12px 4px;
    font-size: 13px; line-height: 1.5; color: var(--text-secondary);
    max-width: 90%;
}
.feedback-user-msg {
    background: linear-gradient(135deg, #6366f1, #4f46e5); color: white;
    padding: 10px 14px; border-radius: 12px 12px 4px 12px;
    font-size: 13px; line-height: 1.4; max-width: 90%; align-self: flex-end;
    word-wrap: break-word;
}
.feedback-user-msg .feedback-msg-type {
    font-size: 10px; opacity: 0.7; margin-bottom: 4px; text-transform: uppercase;
    letter-spacing: 0.5px;
}
.feedback-input-area {
    padding: 12px 16px 16px; border-top: 1px solid var(--border-subtle);
    display: flex; flex-direction: column; gap: 10px;
}
.feedback-type-select {
    padding: 8px 12px; border: 1px solid var(--border-subtle); border-radius: var(--radius-sm);
    background: var(--bg-input); color: var(--text-primary); font-size: 12px;
    font-family: inherit; cursor: pointer;
}
.feedback-input {
    width: 100%; border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
    padding: 10px 14px; font-size: 13px; background: var(--bg-input);
    color: var(--text-primary); font-family: inherit; resize: vertical;
    min-height: 60px; line-height: 1.5; box-sizing: border-box;
}
.feedback-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }
.feedback-send-btn {
    padding: 10px 20px; background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: white; border: none; border-radius: var(--radius-sm); font-size: 13px;
    font-weight: 700; cursor: pointer; transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(79,70,229,0.3);
}
.feedback-send-btn:hover { background: linear-gradient(135deg, #4f46e5, #4338ca); transform: translateY(-1px); }
.feedback-send-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.feedback-badge {
    position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px;
    background: #dc2626; color: white; font-size: 10px; font-weight: 700;
    border-radius: 8px; display: flex; align-items: center; justify-content: center;
    padding: 0 4px;
}

/* ========== DARK MODE ========== */
[data-theme="dark"] {
    --bg-page: #0e0e0e;
    --bg-card: #1a1a1a;
    --bg-card-hover: #222222;
    --bg-surface: rgba(26,26,26,0.95);
    --bg-input: #222222;
    --bg-section: #1a1a1a;

    --border-primary: rgba(255,255,255,0.1);
    --border-subtle: rgba(255,255,255,0.06);
    --border-hover: rgba(255,255,255,0.2);

    --text-primary: #f0f0f0;
    --text-secondary: #aaaaaa;
    --text-muted: #666666;

    --accent: #f0f0f0;
    --accent-hover: #dddddd;
    --accent-bg: rgba(255,255,255,0.04);
    --gradient-primary: #f0f0f0;

    --shadow-xs: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.5);
    --shadow-lg: 0 12px 36px rgba(0,0,0,0.6);
    --shadow-card: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-card-hover: 0 8px 24px rgba(0,0,0,0.4);
}

[data-theme="dark"] #login-screen { background: #111111; }

[data-theme="dark"] .topbar { background: rgba(14,14,14,0.92); }

[data-theme="dark"] .form-input,
[data-theme="dark"] .form-select,
[data-theme="dark"] .form-textarea { background: var(--bg-input); }

[data-theme="dark"] .form-input:focus,
[data-theme="dark"] .form-select:focus,
[data-theme="dark"] .form-textarea:focus { background: #2a2a2a; }

[data-theme="dark"] .search-wrapper input:focus { background: #2a2a2a; }

[data-theme="dark"] .btn-primary { background: #f0f0f0; color: #111; }
[data-theme="dark"] .btn-primary:hover { background: #ddd; color: #111; }

[data-theme="dark"] .btn-secondary { background: #222; border-color: rgba(255,255,255,0.1); }
[data-theme="dark"] .btn-secondary:hover { background: #2a2a2a; border-color: rgba(255,255,255,0.2); }

[data-theme="dark"] .btn-back { background: #222; }
[data-theme="dark"] .btn-back:hover { background: #2a2a2a; }

[data-theme="dark"] .btn-danger { background: #222; color: #f87171; border-color: rgba(248,113,113,0.2); }
[data-theme="dark"] .btn-danger:hover { background: rgba(248,113,113,0.1); }

[data-theme="dark"] .modal-container { background: #1a1a1a; }
[data-theme="dark"] .modal-backdrop { background: rgba(0,0,0,0.6); }

[data-theme="dark"] .toast { background: #222; }

[data-theme="dark"] .view-toggle-btn.active { background: #333; }

[data-theme="dark"] .gantt-row:hover .gantt-label-cell { background: rgba(255,255,255,0.02); }

[data-theme="dark"] .user-avatar { background: #f0f0f0; color: #111; }

[data-theme="dark"] ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); }

[data-theme="dark"] .pipeline-step.active .pipeline-dot {
    box-shadow: 0 0 0 5px rgba(255,255,255,0.08);
}

@keyframes pipelinePulseDark {
    0%,100% { box-shadow: 0 0 0 5px rgba(255,255,255,0.08); }
    50% { box-shadow: 0 0 0 8px rgba(255,255,255,0.04); }
}

[data-theme="dark"] .pipeline-step.active .pipeline-dot {
    animation: pipelinePulseDark 2.5s ease-in-out infinite;
}

