/* ============================================================
   Praćenje Gradilišta — Dark Theme CSS
   ============================================================ */

:root {
    --bg-primary:    #0f172a;
    --bg-secondary:  #1e293b;
    --bg-card:       #1e293b;
    --bg-hover:      #2d3f55;
    --border:        #334155;
    --text-primary:  #f1f5f9;
    --text-secondary:#94a3b8;
    --text-muted:    #64748b;
    --accent-blue:   #3b82f6;
    --accent-green:  #22c55e;
    --accent-yellow: #f59e0b;
    --accent-red:    #ef4444;
    --accent-purple: #8b5cf6;
    --radius:        8px;
    --shadow:        0 4px 6px -1px rgba(0,0,0,0.3);
    --sidebar-width: 240px;
}

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

html { font-size: 16px; }

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    display: flex;
}

/* ---- Sidebar ---- */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0; top: 0; bottom: 0;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 18px;
    border-bottom: 1px solid var(--border);
}
.brand-icon { font-size: 1.6rem; }
.brand-text  { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); line-height: 1.3; }

.nav-links { list-style: none; padding: 12px 8px; flex: 1; }
.nav-links li { margin-bottom: 2px; }
.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}
.nav-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-link:hover  { background: var(--bg-hover); color: var(--text-primary); }
.nav-link.active { background: rgba(59,130,246,0.15); color: var(--accent-blue); }

.sidebar-footer {
    padding: 16px 18px;
    border-top: 1px solid var(--border);
}
.version-badge {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'IBM Plex Mono', monospace;
}

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

.top-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 50;
}
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
}
.menu-toggle svg { width: 22px; height: 22px; }
.page-title { font-size: 1.1rem; font-weight: 600; flex: 1; }
.header-right { display: flex; align-items: center; gap: 12px; }
.today-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(59,130,246,0.12);
    border: 1px solid rgba(59,130,246,0.3);
    color: var(--accent-blue);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
}

.content-area { padding: 24px; flex: 1; }

/* ---- Cards ---- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: var(--shadow);
}
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.card-title { font-size: 1rem; font-weight: 600; color: var(--text-primary); }

/* ---- Stats Grid ---- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.stat-label { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.stat-value { font-size: 2rem; font-weight: 700; line-height: 1; }
.stat-sub   { font-size: 0.78rem; color: var(--text-secondary); }
.stat-blue   { color: var(--accent-blue); }
.stat-green  { color: var(--accent-green); }
.stat-yellow { color: var(--accent-yellow); }
.stat-red    { color: var(--accent-red); }

/* ---- Status Badges ---- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.status-active      { background: rgba(34,197,94,0.15);  color: #86efac; border: 1px solid rgba(34,197,94,0.4); }
.status-active::before { background: var(--accent-green); }
.status-completed   { background: rgba(59,130,246,0.15); color: #93c5fd; border: 1px solid rgba(59,130,246,0.4); }
.status-completed::before { background: var(--accent-blue); }
.status-on-hold     { background: rgba(245,158,11,0.15); color: #fcd34d; border: 1px solid rgba(245,158,11,0.4); }
.status-on-hold::before { background: var(--accent-yellow); }
.status-cancelled   { background: rgba(239,68,68,0.15);  color: #fca5a5; border: 1px solid rgba(239,68,68,0.4); }
.status-cancelled::before { background: var(--accent-red); }
.status-pending     { background: rgba(71,85,105,0.3);   color: #94a3b8; border: 1px solid rgba(71,85,105,0.5); }
.status-pending::before { background: #475569; }
.status-in-progress { background: rgba(59,130,246,0.15); color: #93c5fd; border: 1px solid rgba(59,130,246,0.4); }
.status-in-progress::before { background: var(--accent-blue); animation: pulse 2s infinite; }
.status-delayed     { background: rgba(239,68,68,0.15);  color: #fca5a5; border: 1px solid rgba(239,68,68,0.4); }
.status-delayed::before { background: var(--accent-red); }

@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    transition: opacity 0.15s, background 0.15s;
    white-space: nowrap;
    line-height: 1.2;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn:hover { opacity: 0.85; }
.btn-primary   { background: var(--accent-blue);   color: #fff; }
.btn-success   { background: var(--accent-green);  color: #fff; }
.btn-warning   { background: var(--accent-yellow); color: #0f172a; }
.btn-danger    { background: var(--accent-red);    color: #fff; }
.btn-secondary { background: var(--bg-hover);      color: var(--text-primary); border-color: var(--border); }
.btn-sm { padding: 5px 11px; font-size: 0.8rem; }
.btn-icon { padding: 7px; border-radius: var(--radius); }

/* ---- Forms ---- */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full-width { grid-column: 1 / -1; }
label { font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.04em; }
input[type="text"],
input[type="date"],
input[type="number"],
select,
textarea {
    background: #0f172a;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    padding: 9px 12px;
    font-size: 0.92rem;
    font-family: inherit;
    width: 100%;
    transition: border-color 0.15s;
}
input[type="text"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}
input[type="color"] {
    width: 50px;
    height: 40px;
    padding: 2px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: #0f172a;
    cursor: pointer;
}
textarea { resize: vertical; min-height: 90px; }
select option { background: #1e293b; }
.form-hint { font-size: 0.78rem; color: var(--text-muted); }

/* Slider */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--border);
    border: none;
    padding: 0;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--accent-blue);
    cursor: pointer;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
}
input[type="range"]:focus { box-shadow: none; }
.range-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9rem;
    color: var(--accent-blue);
    font-weight: 600;
    min-width: 40px;
    text-align: right;
}

/* Color row */
.color-row { display: flex; align-items: center; gap: 10px; }
.color-swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.color-swatch {
    width: 26px; height: 26px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.15s;
}
.color-swatch:hover, .color-swatch.selected { border-color: #fff; transform: scale(1.15); }

/* ---- Tables ---- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th {
    text-align: left;
    padding: 10px 14px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
td {
    padding: 11px 14px;
    border-bottom: 1px solid rgba(51,65,85,0.5);
    color: var(--text-secondary);
    vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.02); }
.td-primary { color: var(--text-primary); font-weight: 500; }

/* ---- Progress Bar ---- */
.progress-wrap { display: flex; align-items: center; gap: 8px; }
.progress-bar {
    flex: 1;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    min-width: 60px;
}
.progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
}
.progress-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.78rem;
    color: var(--text-muted);
    min-width: 32px;
}

/* ---- Gantt Chart ---- */
.gantt-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.gantt-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}
.gantt-wrapper {
    position: relative;
    overflow-x: auto;
    overflow-y: visible;
}
.gantt-inner {
    min-width: 900px;
}

/* Gantt header (time axis) */
.gantt-header {
    display: flex;
    border-bottom: 2px solid var(--border);
    background: #162032;
    position: sticky;
    top: 0;
    z-index: 20;
}
.gantt-labels-col {
    width: 240px;
    flex-shrink: 0;
    padding: 10px 14px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-right: 1px solid var(--border);
}
.gantt-timeline-col { flex: 1; position: relative; }
.gantt-months-row {
    display: flex;
    border-bottom: 1px solid var(--border);
}
.gantt-month {
    border-right: 1px solid var(--border);
    padding: 4px 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
    white-space: nowrap;
}
.gantt-weeks-row { display: flex; }
.gantt-week {
    border-right: 1px solid rgba(51,65,85,0.4);
    padding: 3px 2px;
    font-size: 0.65rem;
    color: var(--text-muted);
    text-align: center;
    font-family: 'IBM Plex Mono', monospace;
}

/* Gantt body */
.gantt-body { position: relative; }

.gantt-project-row {
    display: flex;
    background: rgba(30,41,59,0.8);
    border-bottom: 1px solid var(--border);
}
.gantt-project-row:hover { background: rgba(45,63,85,0.6); }

.gantt-phase-row {
    display: flex;
    border-bottom: 1px solid rgba(51,65,85,0.4);
    min-height: 38px;
}
.gantt-phase-row:hover { background: rgba(255,255,255,0.02); }

.gantt-label {
    width: 240px;
    flex-shrink: 0;
    padding: 9px 14px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
}
.gantt-label.project-label {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.85rem;
}
.gantt-label.indent {
    padding-left: 26px;
    font-size: 0.8rem;
}
.project-color-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.label-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Bar area */
.gantt-bars {
    flex: 1;
    position: relative;
    min-height: 38px;
}
.gantt-grid-lines {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.gantt-grid-line {
    position: absolute;
    top: 0; bottom: 0;
    width: 1px;
    background: rgba(51,65,85,0.3);
}

/* The actual bar */
.gantt-bar {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    overflow: hidden;
    cursor: pointer;
    transition: filter 0.15s;
    min-width: 4px;
    z-index: 5;
}
.gantt-bar:hover { filter: brightness(1.2); z-index: 10; }

.gantt-bar.bar-completed  { background: var(--accent-green); }
.gantt-bar.bar-in-progress { }  /* color set inline */
.gantt-bar.bar-delayed    { background: var(--accent-red); }
.gantt-bar.bar-pending    { background: #334155; }

.bar-progress-fill {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    background: rgba(0,0,0,0.2);
    border-radius: 4px 0 0 4px;
    pointer-events: none;
}
.bar-label {
    position: relative;
    z-index: 1;
    font-size: 0.65rem;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    padding: 0 5px;
    white-space: nowrap;
    overflow: hidden;
    font-family: 'IBM Plex Mono', monospace;
}

/* Today line */
.gantt-today-line {
    position: absolute;
    top: 0; bottom: 0;
    width: 2px;
    background: var(--accent-red);
    z-index: 30;
    pointer-events: none;
}
.today-label {
    position: absolute;
    top: 4px;
    left: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--accent-red);
    white-space: nowrap;
    font-family: 'IBM Plex Mono', monospace;
    background: var(--bg-primary);
    padding: 1px 4px;
    border-radius: 3px;
}

/* Tooltip */
.gantt-tooltip {
    position: fixed;
    background: #0a1628;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 0.82rem;
    color: var(--text-primary);
    pointer-events: none;
    z-index: 9999;
    max-width: 260px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    line-height: 1.5;
}
.tooltip-title { font-weight: 700; margin-bottom: 6px; font-size: 0.88rem; }
.tooltip-row { display: flex; justify-content: space-between; gap: 16px; color: var(--text-secondary); }
.tooltip-val { color: var(--text-primary); font-family: 'IBM Plex Mono', monospace; font-size: 0.8rem; }

/* ---- Project card (list view) ---- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}
.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    transition: box-shadow 0.2s, border-color 0.2s;
    text-decoration: none;
    display: block;
}
.project-card:hover {
    border-color: rgba(59,130,246,0.4);
    box-shadow: 0 0 0 1px rgba(59,130,246,0.15), var(--shadow);
}
.project-card-header {
    height: 6px;
}
.project-card-body { padding: 18px; }
.project-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.project-card-location {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.project-card-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}
.meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text-secondary);
}
.meta-label { color: var(--text-muted); min-width: 70px; }

/* ---- Alerts / Flash messages ---- */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.alert-success { background: rgba(34,197,94,0.12); border: 1px solid rgba(34,197,94,0.3); color: #86efac; }
.alert-error   { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.3); color: #fca5a5; }
.alert-info    { background: rgba(59,130,246,0.12); border: 1px solid rgba(59,130,246,0.3); color: #93c5fd; }

/* ---- Breadcrumb ---- */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 18px;
}
.breadcrumb a { color: var(--accent-blue); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { color: var(--border); }

/* ---- Page section headers ---- */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}
.section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}
.section-sub {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ---- Empty state ---- */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state h3 { font-size: 1rem; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state p { font-size: 0.88rem; }

/* ---- View mode tabs ---- */
.view-tabs {
    display: flex;
    background: var(--bg-primary);
    border-radius: var(--radius);
    padding: 3px;
    gap: 2px;
    border: 1px solid var(--border);
}
.view-tab {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border: none;
    background: none;
    transition: background 0.15s, color 0.15s;
}
.view-tab:hover { color: var(--text-secondary); }
.view-tab.active { background: var(--bg-card); color: var(--text-primary); }

/* ---- Filter select ---- */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.filter-bar select {
    width: auto;
    min-width: 140px;
    padding: 6px 10px;
    font-size: 0.84rem;
}

/* ---- Utility ---- */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.justify-between { justify-content: space-between; }
.text-muted { color: var(--text-muted); font-size: 0.85rem; }
.text-mono { font-family: 'IBM Plex Mono', monospace; }
.font-bold { font-weight: 700; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0,0,0,0.5);
    }
    .main-content {
        margin-left: 0;
    }
    .menu-toggle { display: flex; }
    .content-area { padding: 16px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .gantt-label { width: 160px; font-size: 0.75rem; }
    .projects-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .form-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Frappe Gantt — Dark theme overrides
   ============================================================ */

.fgantt-scroll-wrap {
    overflow-x: auto;
    padding: 8px 0 4px;
}

/* SVG grid */
.gantt .grid-background { fill: #0f172a; }
.gantt .grid-header      { fill: #162032; stroke: #334155; stroke-width: 1.4; }
.gantt .grid-row         { fill: #1e293b; }
.gantt .grid-row:nth-child(even) { fill: #162032; }
.gantt .row-line         { stroke: #334155; }
.gantt .tick             { stroke: #334155; stroke-width: 0.5; }
.gantt .tick.thick       { stroke: #475569; stroke-width: 1.5; }
.gantt .today-highlight  { fill: rgba(239, 68, 68, 0.08); }

/* Default bar colours (overridden per-task by JS) */
.gantt .bar              { fill: #334155; rx: 4; stroke: none; }
.gantt .bar-progress     { fill: #3b82f6; rx: 4; }
.gantt .bar-invalid      { fill: transparent; stroke: #ef4444; stroke-dasharray: 5; stroke-width: 1; }

/* Bar labels */
.gantt .bar-label        { fill: #f1f5f9; font-family: 'IBM Plex Sans', sans-serif; font-size: 11px; font-weight: 600; }
.gantt .bar-label.big    { fill: #94a3b8; }

/* Timeline text */
.gantt .lower-text  { fill: #94a3b8; font-family: 'IBM Plex Mono', monospace; font-size: 11px; }
.gantt .upper-text  { fill: #64748b; font-family: 'IBM Plex Sans', sans-serif; font-size: 11px; font-weight: 600; }

/* Dependency arrows */
.gantt .arrow { fill: none; stroke: #475569; stroke-width: 1.4; }

/* Project header bar */
.gantt .fgantt-project .bar       { fill: #475569; opacity: 0.4; }
.gantt .fgantt-project .bar-label { fill: #f1f5f9; font-weight: 700; font-size: 12px; }

/* Phase status bar defaults (JS overrides per-project color) */
.gantt .fgantt-completed  .bar          { fill: #22c55e; }
.gantt .fgantt-completed  .bar-progress { fill: #16a34a; }
.gantt .fgantt-in_progress .bar         { fill: #3b82f6; }
.gantt .fgantt-in_progress .bar-progress{ fill: #2563eb; }
.gantt .fgantt-delayed    .bar          { fill: #ef4444; }
.gantt .fgantt-delayed    .bar-progress { fill: #dc2626; }
.gantt .fgantt-pending    .bar          { fill: #334155; }
.gantt .fgantt-pending    .bar-progress { fill: #475569; }

/* Popup */
.gantt .popup-wrapper {
    background: #0a1628;
    border: 1px solid #334155;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    padding: 0;
    min-width: 220px;
}
.gantt .popup-wrapper .title,
.gantt .popup-wrapper .subtitle { display: none; }
.gantt .pointer { display: none; }

.fgantt-popup { padding: 12px 14px; }
.fgantt-popup-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 8px;
    line-height: 1.3;
}
.fgantt-popup-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    font-size: 0.78rem;
    color: #94a3b8;
    margin-bottom: 4px;
}
.fgantt-popup-row strong { color: #f1f5f9; font-family: 'IBM Plex Mono', monospace; font-size: 0.76rem; }
