/* =============================================================================
   NEXTEKK Project Board – style.css  (light theme)
   ============================================================================= */

/* ─── CSS Variables ─────────────────────────────────────────────────────────── */
:root {
    --navy:        #1e293b;   /* sidebar – stays dark slate */
    --navy2:       #ffffff;   /* panel bg */
    --navy3:       #f1f5f9;   /* subtle fill / input bg */
    --blue:        #3b82f6;
    --blue-light:  #60a5fa;
    --blue-muted:  rgba(59,130,246,0.08);
    --green:       #16a34a;
    --yellow:      #d97706;
    --red:         #dc2626;
    --text:        #0f172a;
    --text-muted:  #64748b;
    --text-dim:    #94a3b8;
    --border:      #e2e8f0;
    --sidebar-w:   220px;
    --sidebar-w-c: 64px;   /* collapsed */
    --bg:          #f8fafc;
    --panel-bg:    #ffffff;
    --radius:      10px;
    --shadow:      0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --font:        'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ─── Reset ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--text); background: var(--bg); }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-light); }
img { max-width: 100%; }
ul { list-style: none; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ─── Login page ─────────────────────────────────────────────────────────────── */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(145deg, #1e293b 0%, #1e3a5f 100%); }
.login-wrap  { width: 100%; max-width: 420px; padding: 24px; }
.login-card  {
    background: #ffffff;
    border: none;
    border-top: none;
    border-radius: 16px;
    padding: 40px 36px;
    text-align: center;
    box-shadow: 0 16px 48px rgba(0,0,0,0.28);
}
.login-logo-wrap { margin-bottom: 24px; }
.login-logo      { height: 52px; object-fit: contain; }
.login-title     { font-size: 1.6rem; font-weight: 800; color: var(--navy); margin-bottom: 6px; letter-spacing: -0.5px; }
.login-sub       { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 28px; }
.login-alert     { background: rgba(220,38,38,0.07); border: 1px solid rgba(220,38,38,0.25); color: var(--red); border-radius: 8px; padding: 10px 16px; font-size: 0.85rem; margin-bottom: 20px; }
.login-disclaimer { margin-top: 24px; font-size: 0.75rem; color: var(--text-dim); line-height: 1.5; }

.btn-ms-login {
    display: inline-flex; align-items: center; gap: 10px;
    background: var(--blue); color: white;
    border: none; border-radius: 8px;
    padding: 12px 24px;
    font-size: 0.9rem; font-weight: 600;
    cursor: pointer; text-decoration: none;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(59,130,246,0.3);
}
.btn-ms-login:hover { background: var(--blue-light); color: white; box-shadow: 0 4px 12px rgba(59,130,246,0.4); }

/* ─── App layout ─────────────────────────────────────────────────────────────── */
.app-body { display: flex; min-height: 100vh; }
.app-main  { flex: 1; margin-left: var(--sidebar-w); transition: margin-left 0.25s; overflow-x: hidden; }
.app-content { padding: 28px 32px; max-width: 1400px; }

/* ─── Sidebar (dark – stays dark on light theme) ────────────────────────────── */
.sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: var(--sidebar-w);
    background: #1e293b;
    border-right: 1px solid rgba(255,255,255,0.06);
    display: flex; flex-direction: column;
    z-index: 100;
    transition: width 0.25s;
    overflow: hidden;
}
.sidebar--collapsed { width: var(--sidebar-w-c); }
.sidebar--collapsed ~ .app-main { margin-left: var(--sidebar-w-c); }

.sidebar__logo {
    display: flex; align-items: center; gap: 10px;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    min-height: 64px;
    overflow: hidden;
    white-space: nowrap;
}
.sidebar__logo img { height: 32px; object-fit: contain; flex-shrink: 0; }
.sidebar__logo-text { font-size: 0.78rem; font-weight: 700; color: #94a3b8; letter-spacing: 1px; text-transform: uppercase; }
.sidebar--collapsed .sidebar__logo-text { display: none; }

.sidebar-nav { flex: 1; padding: 12px 0; overflow-y: auto; overflow-x: hidden; }
.sidebar-nav__item { }
.sidebar-nav__link {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 18px;
    color: #94a3b8;
    font-size: 0.88rem; font-weight: 500;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}
.sidebar-nav__link svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-nav__link:hover  { background: rgba(255,255,255,0.07); color: #e2e8f0; }
.sidebar-nav__link.active { background: rgba(59,130,246,0.2); color: #93c5fd; border-right: 3px solid #3b82f6; }
.sidebar--collapsed .sidebar-nav__link span { display: none; }
.sidebar--collapsed .sidebar-nav__link { justify-content: center; padding: 12px; }

.sidebar-nav__divider  { height: 1px; background: rgba(255,255,255,0.07); margin: 8px 0; }
.sidebar-nav__section  { padding: 6px 18px; font-size: 0.68rem; color: #475569; text-transform: uppercase; letter-spacing: 1px; white-space: nowrap; }
.sidebar--collapsed .sidebar-nav__section { display: none; }

.sidebar__footer {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 10px 14px;
    display: flex; flex-direction: column; gap: 8px;
    overflow: hidden;
}
.sidebar__user { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; }
.sidebar__avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(59,130,246,0.25); color: #93c5fd;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; font-weight: 700; flex-shrink: 0;
}
.sidebar__user-info { flex: 1; min-width: 0; overflow: hidden; }
.sidebar__user-name  { font-size: 0.82rem; font-weight: 600; color: #f1f5f9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar__user-role  { font-size: 0.7rem; color: #64748b; }
.sidebar__footer-bottom { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid rgba(255,255,255,0.06); padding-top: 8px; }
.sidebar__version { font-size: 0.78rem; font-weight: 300; color: #94a3b8; }
.sidebar__logout       { color: #64748b; display: flex; align-items: center; gap: 5px; transition: color 0.15s; white-space: nowrap; }
.sidebar__logout svg   { width: 15px; height: 15px; }
.sidebar__logout:hover { color: #f87171; }
.sidebar__logout-label { font-size: 0.78rem; font-weight: 500; }
.sidebar--collapsed .sidebar__user-info,
.sidebar--collapsed .sidebar__footer-bottom { display: none; }
.sidebar--collapsed .sidebar__footer { align-items: center; }
.sidebar--collapsed .sidebar__user   { justify-content: center; }
.sidebar--collapsed .sidebar__footer { justify-content: center; }

.sidebar__toggle {
    position: absolute; top: 50%; right: -12px;
    transform: translateY(-50%);
    width: 24px; height: 24px;
    background: #2d3a4f; border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%; color: #94a3b8;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 10;
    transition: background 0.15s;
}
.sidebar__toggle:hover { background: var(--blue); color: white; }
.sidebar__toggle svg { width: 14px; height: 14px; }

/* ─── Page header ────────────────────────────────────────────────────────────── */
.page-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.page-title { font-size: 1.5rem; font-weight: 700; color: var(--text); }
.page-sub   { font-size: 0.82rem; color: var(--text-muted); margin-top: 2px; }

/* ─── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 18px; border-radius: 8px;
    font-size: 0.85rem; font-weight: 600; font-family: var(--font);
    border: none; cursor: pointer; text-decoration: none;
    transition: all 0.2s; white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; }
.btn-primary   { background: var(--blue); color: white; }
.btn-primary:hover { background: var(--blue-light); color: white; }
.btn-secondary { background: var(--panel-bg); color: var(--text-muted); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--navy3); color: var(--text); }
.btn-danger    { background: rgba(220,38,38,0.07); color: var(--red); border: 1px solid rgba(220,38,38,0.2); }
.btn-danger:hover { background: rgba(220,38,38,0.14); }
.btn-sm { padding: 5px 12px; font-size: 0.78rem; }
.btn-ghost   { background: none; border: none; color: var(--text-muted); padding: 4px 8px; }
.btn-ghost:hover { color: var(--text); background: var(--navy3); border-radius: 6px; }
.btn-success { background: var(--green); color: white; }
.btn-success:hover { background: #15803d; color: white; }

/* ─── Stat cards ─────────────────────────────────────────────────────────────── */
.stat-row { display: flex; gap: 14px; margin-bottom: 24px; flex-wrap: wrap; }
.stat-card {
    flex: 1; min-width: 120px;
    background: var(--panel-bg);
    border: 1px solid var(--border);
    border-left: 4px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    box-shadow: var(--shadow);
}
.stat-card--green  { border-left-color: var(--green); }
.stat-card--yellow { border-left-color: var(--yellow); }
.stat-card--red    { border-left-color: var(--red); }
.stat-card--link   { cursor: pointer; text-decoration: none; display: block; transition: box-shadow 0.15s, transform 0.1s; }
.stat-card--link:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); transform: translateY(-1px); }
.stat-card__value  { font-size: 2rem; font-weight: 700; line-height: 1; color: var(--text); }
.stat-card__label  { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }

/* ─── Two-column layout ──────────────────────────────────────────────────────── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

/* ─── Panel ──────────────────────────────────────────────────────────────────── */
.panel { background: var(--panel-bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.panel__header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.panel__title  { font-size: 0.95rem; font-weight: 700; color: var(--text); }
.panel__link   { font-size: 0.78rem; color: var(--blue); }
.panel__body   { padding: 16px 20px; }

/* ─── Task list ──────────────────────────────────────────────────────────────── */
.task-list { }
.task-list__item { border-bottom: 1px solid var(--border); }
.task-list__item:last-child { border-bottom: none; }
.task-list__link {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 20px;
    color: var(--text); text-decoration: none;
    transition: background 0.15s;
}
.task-list__link:hover { background: var(--navy3); }
.task-list__status {
    width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.task-status--todo        { background: var(--text-dim); }
.task-status--in-progress { background: var(--blue); }
.task-status--blocked     { background: var(--red); }
.task-status--done        { background: var(--green); }
.task-list__name    { flex: 1; font-size: 0.87rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-list__project { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; margin-right: 8px; }
.task-list__due     { font-size: 0.72rem; padding: 2px 8px; border-radius: 10px; white-space: nowrap; font-weight: 600; margin: 4px 8px 4px 20px; display: inline-block; }
.task-list__due.rag-green  { background: rgba(22,163,74,0.1);  color: var(--green); }
.task-list__due.rag-yellow { background: rgba(217,119,6,0.1);  color: var(--yellow); }
.task-list__due.rag-red    { background: rgba(220,38,38,0.1);  color: var(--red); }

/* ─── Project list ───────────────────────────────────────────────────────────── */
.project-list { }
.project-list__item { border-bottom: 1px solid var(--border); }
.project-list__item:last-child { border-bottom: none; }
.project-list__link {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 20px;
    color: var(--text); text-decoration: none;
    transition: background 0.15s;
}
.project-list__link:hover { background: var(--navy3); }
.project-list__rag  { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.rag-dot--green  { background: var(--green); }
.rag-dot--yellow { background: var(--yellow); }
.rag-dot--red    { background: var(--red); }
.project-list__info  { flex: 1; min-width: 0; }
.project-list__name  { font-size: 0.95rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.project-list__client{ font-size: 0.74rem; color: var(--text-muted); }
.project-list__right { display: flex; align-items: center; gap: 6px; }
.progress-mini { width: 80px; height: 6px; background: var(--navy3); border-radius: 3px; overflow: hidden; }
.progress-mini__fill { height: 100%; border-radius: 3px; }
.rag-bg--green  { background: var(--green); }
.rag-bg--yellow { background: var(--yellow); }
.rag-bg--red    { background: var(--red); }
.progress-mini__pct { font-size: 0.72rem; color: var(--text-muted); min-width: 30px; text-align: right; }

/* ─── RAG badges ─────────────────────────────────────────────────────────────── */
.rag-badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 10px; border-radius: 20px;
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px;
}
.rag-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; }
.rag-green  { background: rgba(22,163,74,0.1);  color: #15803d; border: 1px solid rgba(22,163,74,0.3); }
.rag-green::before  { background: var(--green); }
.rag-yellow { background: rgba(217,119,6,0.1);  color: #b45309; border: 1px solid rgba(217,119,6,0.3); }
.rag-yellow::before { background: var(--yellow); }
.rag-red    { background: rgba(220,38,38,0.08); color: #b91c1c; border: 1px solid rgba(220,38,38,0.25); }
.rag-red::before    { background: var(--red); }

/* ─── Forms ──────────────────────────────────────────────────────────────────── */
.form-group  { margin-bottom: 18px; }
.form-row    { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
label { display: block; font-size: 0.76rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 6px; }
input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    background: var(--panel-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    padding: 9px 12px;
    font-size: 0.88rem;
    font-family: var(--font);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }
select option { background: white; }
textarea { resize: vertical; min-height: 80px; }

.form-actions { display: flex; gap: 10px; justify-content: flex-end; padding-top: 16px; border-top: 1px solid var(--border); margin-top: 20px; }

/* ─── Table ───────────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--navy3); }
td { padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 0.87rem; color: var(--text); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--navy3); }

/* ─── Alert / Flash ──────────────────────────────────────────────────────────── */
.alert {
    padding: 12px 16px; border-radius: 8px;
    font-size: 0.87rem; margin-bottom: 20px;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.alert-success { background: rgba(22,163,74,0.08);  color: #15803d;  border: 1px solid rgba(22,163,74,0.25); }
.alert-danger   { background: rgba(220,38,38,0.07);  color: #b91c1c;  border: 1px solid rgba(220,38,38,0.2); }
.alert-info     { background: rgba(59,130,246,0.07);  color: var(--blue); border: 1px solid rgba(59,130,246,0.2); }
.alert-dismissible .btn-close { background: none; border: none; color: inherit; cursor: pointer; font-size: 1.1rem; opacity: 0.7; }
.alert-dismissible .btn-close:hover { opacity: 1; }

/* ─── Empty state ────────────────────────────────────────────────────────────── */
.empty-state {
    text-align: center; padding: 48px 20px;
    color: var(--text-dim);
}
.empty-state svg { width: 40px; height: 40px; margin-bottom: 12px; stroke: var(--text-dim); }
.empty-state p { font-size: 0.9rem; }

/* ─── Task status badge ──────────────────────────────────────────────────────── */
.status-badge {
    display: inline-block; padding: 3px 10px;
    border-radius: 20px; font-size: 0.72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.8px;
}
.status-todo        { background: var(--navy3); color: var(--text-muted); border: 1px solid var(--border); }
.status-in-progress { background: rgba(59,130,246,0.08); color: var(--blue); border: 1px solid rgba(59,130,246,0.25); }
.status-blocked     { background: rgba(220,38,38,0.07); color: #b91c1c; border: 1px solid rgba(220,38,38,0.2); }
.status-done        { background: rgba(22,163,74,0.08); color: #15803d; border: 1px solid rgba(22,163,74,0.25); }

/* ─── Comments ───────────────────────────────────────────────────────────────── */
.comment-list { }
.comment { display: flex; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.comment:last-child { border-bottom: none; }
.comment__avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--navy3); color: var(--blue); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 0.78rem; font-weight: 700; flex-shrink: 0; }
.comment__body { flex: 1; }
.comment__meta { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 4px; }
.comment__meta strong { color: var(--text); }
.comment__text { font-size: 0.87rem; color: var(--text); line-height: 1.5; white-space: pre-wrap; }

/* ─── Project card (board view) ──────────────────────────────────────────────── */
.project-card {
    background: var(--panel-bg);
    border-radius: 12px;
    border: 1px solid var(--border);
    border-left: 5px solid var(--border);
    padding: 18px 20px;
    position: relative;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-shadow: var(--shadow);
}
.project-card.rag-green  { border-left-color: var(--green);  box-shadow: 0 1px 4px rgba(22,163,74,0.12); }
.project-card.rag-yellow { border-left-color: var(--yellow); box-shadow: 0 1px 4px rgba(217,119,6,0.12); }
.project-card.rag-red    { border-left-color: var(--red);    box-shadow: 0 1px 4px rgba(220,38,38,0.12); }

/* ─── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .app-content { padding: 20px 16px; }
    .stat-row { flex-wrap: wrap; }
    .stat-card { min-width: calc(50% - 7px); }
    .page-title { font-size: 1.2rem; }
}

/* ─── Form classes (named variants for explicit form-* classes) ──────────────── */
.form-label   { display: block; font-size: 0.76rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 6px; }
.form-input   { width: 100%; background: var(--panel-bg); border: 1px solid var(--border); border-radius: 8px; color: var(--text); padding: 9px 12px; font-size: 0.88rem; font-family: var(--font); outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
.form-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }
.form-select  { width: 100%; background: var(--panel-bg); border: 1px solid var(--border); border-radius: 8px; color: var(--text); padding: 9px 12px; font-size: 0.88rem; font-family: var(--font); outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
.form-select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }
.form-textarea{ width: 100%; background: var(--panel-bg); border: 1px solid var(--border); border-radius: 8px; color: var(--text); padding: 9px 12px; font-size: 0.88rem; font-family: var(--font); outline: none; resize: vertical; min-height: 80px; transition: border-color 0.2s, box-shadow 0.2s; }
.form-textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }
.form-actions--right { justify-content: flex-end; }
.required { color: var(--red); }

/* ─── Form page (create/edit wrapper) ───────────────────────────────────────── */
.form-page { max-width: 640px; }
.form-card { background: var(--panel-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }

/* ─── Client group + project cards ──────────────────────────────────────────── */
.client-group        { margin-bottom: 36px; }
.client-group__name  { font-size: 0.7rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 14px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.project-cards       { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }

.project-card                 { background: var(--panel-bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: box-shadow 0.2s; box-shadow: var(--shadow); }
.project-card:hover           { box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.project-card--green          { border-top: 3px solid var(--green); }
.project-card--yellow         { border-top: 3px solid var(--yellow); }
.project-card--red            { border-top: 3px solid var(--red); }
.project-card__header         { padding: 16px 18px 10px; }
.project-card__title-row      { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.project-card__name           { font-size: 0.95rem; font-weight: 700; color: var(--text); text-decoration: none; flex: 1; }
.project-card__name:hover     { color: var(--blue); }
.project-card__body           { padding: 0 18px 14px; }
.project-card__progress       { margin-bottom: 10px; }
.project-card__meta           { display: flex; flex-direction: column; gap: 4px; font-size: 0.78rem; color: var(--text-muted); }
.project-card__meta span      { display: flex; align-items: center; gap: 6px; }
.project-card__meta svg       { width: 13px; height: 13px; flex-shrink: 0; }
.project-card__actions        { display: flex; gap: 4px; padding: 8px 14px; border-top: 1px solid var(--border); background: var(--navy3); }

/* ─── Progress bar (full width) ─────────────────────────────────────────────── */
.progress-bar             { width: 100%; height: 6px; background: var(--navy3); border-radius: 3px; overflow: hidden; margin-bottom: 4px; }
.progress-bar__fill       { height: 100%; border-radius: 3px; transition: width 0.3s; }
.progress-bar__label      { font-size: 0.72rem; color: var(--text-muted); }

/* ─── Project detail summary strip ─────────────────────────────────────────── */
.project-summary-strip    { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; background: var(--panel-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 20px; margin-bottom: 20px; box-shadow: var(--shadow); }
.summary-item             { display: flex; align-items: center; gap: 8px; }
.summary-item--progress   { gap: 10px; }
.summary-label            { font-size: 0.72rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.8px; }
.summary-value            { font-size: 0.88rem; color: var(--text); font-weight: 600; }
.project-description      { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; padding: 16px 20px; }

/* ─── Generic badge (for status on project detail) ──────────────────────────── */
.badge                    { display: inline-block; padding: 2px 9px; border-radius: 12px; font-size: 0.72rem; font-weight: 700; text-transform: capitalize; }
.badge--active            { background: rgba(59,130,246,0.08);  color: var(--blue);    border: 1px solid rgba(59,130,246,0.25); }
.badge--on-hold           { background: rgba(217,119,6,0.08);  color: #b45309;        border: 1px solid rgba(217,119,6,0.25); }
.badge--completed         { background: rgba(22,163,74,0.08);  color: #15803d;        border: 1px solid rgba(22,163,74,0.25); }
.badge--cancelled         { background: var(--navy3);           color: var(--text-muted); border: 1px solid var(--border); }

/* ─── Priority badge ─────────────────────────────────────────────────────────── */
.priority-badge             { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.7px; min-width: 64px; text-align: center; }
.priority-badge--low        { background: var(--navy3); color: var(--text-muted); border: 1px solid var(--border); }
.priority-badge--medium     { background: rgba(59,130,246,0.08); color: var(--blue); border: 1px solid rgba(59,130,246,0.25); }
.priority-badge--high       { background: rgba(234,88,12,0.08); color: #ea580c; border: 1px solid rgba(234,88,12,0.25); }
.priority-badge--critical   { background: rgba(220,38,38,0.09); color: #b91c1c; border: 1px solid rgba(220,38,38,0.3); }

/* ─── Label chips ────────────────────────────────────────────────────────────── */
.label-chip          { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 0.68rem; font-weight: 600; white-space: nowrap; color: #fff; }
.label-chips         { display: flex; flex-wrap: wrap; gap: 4px; }
.label-checkboxes    { display: flex; flex-wrap: wrap; gap: 8px; }
.label-check         { display: flex; align-items: center; gap: 5px; cursor: pointer; font-size: 0.82rem; }
.label-check input   { cursor: pointer; }
.label-swatch        { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* ─── Status badge variants (named with --) ─────────────────────────────────── */
.status-badge             { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; min-width: 90px; text-align: center; }
.status-badge--todo       { background: var(--navy3); color: var(--text-muted); border: 1px solid var(--border); }
.status-badge--in-progress{ background: rgba(59,130,246,0.08); color: var(--blue); border: 1px solid rgba(59,130,246,0.25); }
.status-badge--blocked    { background: rgba(220,38,38,0.07); color: #b91c1c; border: 1px solid rgba(220,38,38,0.2); }
.status-badge--done       { background: rgba(22,163,74,0.08); color: #15803d; border: 1px solid rgba(22,163,74,0.25); }

/* ─── Data table (panels that use <table>) ───────────────────────────────────── */
.data-table               { width: 100%; border-collapse: collapse; }
.data-table th            { text-align: left; font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--navy3); white-space: nowrap; }
.data-table td            { padding: 11px 16px; border-bottom: 1px solid var(--border); font-size: 0.87rem; color: var(--text); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td   { background: var(--navy3); }
.table-actions            { text-align: right; white-space: nowrap; width: 1%; }
.table-actions__wrap      { display: flex; gap: 4px; justify-content: flex-end; }
.task-link                { color: var(--text); font-weight: 500; text-decoration: none; }
.task-link:hover          { color: var(--blue); }
.has-notes                { color: var(--text-dim); display: inline-flex; align-items: center; margin-left: 4px; }
.has-notes svg            { width: 12px; height: 12px; }

/* ─── Button xs + danger ghost ──────────────────────────────────────────────── */
.btn-xs               { padding: 3px 8px; font-size: 0.72rem; min-width: 80px; text-align: center; justify-content: center; }
.btn-danger-ghost     { color: var(--text-dim) !important; }
.btn-danger-ghost:hover { color: var(--red) !important; background: rgba(220,38,38,0.07) !important; }

/* ─── Inline form (add-task row, add-member row) ─────────────────────────────── */
.inline-form          { padding: 12px 16px; border-top: 1px solid var(--border); background: var(--navy3); }
.inline-form__row     { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inline-form__row .form-input,
.inline-form__row .form-select { flex: 1; min-width: 120px; margin: 0; }

/* ─── Team member list ───────────────────────────────────────────────────────── */
.member-list              { padding: 0 20px; }
.member-list__item        { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.member-list__item:last-child { border-bottom: none; }
.member-avatar            { width: 32px; height: 32px; border-radius: 50%; background: var(--navy3); color: var(--blue); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 700; flex-shrink: 0; }
.member-info              { flex: 1; min-width: 0; }
.member-name              { font-size: 0.88rem; font-weight: 600; color: var(--text); }
.member-role              { font-size: 0.72rem; color: var(--text-dim); text-transform: capitalize; }
.member-remove-form       { display: flex; }
.panel__footer            { padding: 12px 16px; border-top: 1px solid var(--border); background: var(--navy3); }

/* ─── Filter tabs ────────────────────────────────────────────────────────────── */
.filter-tabs              { display: flex; gap: 4px; margin-bottom: 20px; flex-wrap: wrap; }
.filter-tab               { padding: 6px 14px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; color: var(--text-muted); text-decoration: none; border: 1px solid transparent; transition: all 0.15s; }
.filter-tab:hover         { color: var(--text); background: var(--navy3); border-color: var(--border); }
.filter-tab--active       { background: var(--blue-muted); color: var(--blue); border-color: rgba(59,130,246,0.25); }

/* ─── Task layout (detail page) ─────────────────────────────────────────────── */
.task-layout              { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
.task-main                { display: flex; flex-direction: column; gap: 16px; }
.task-sidebar             { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 20px; }
@media (max-width: 900px)  { .task-layout { grid-template-columns: 1fr; } .task-sidebar { position: static; } }
.page-header__actions     { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ─── Quick status buttons ───────────────────────────────────────────────────── */
.quick-status-form        { display: flex; align-items: center; gap: 8px; padding: 12px 16px; flex-wrap: wrap; }
.quick-status-label       { font-size: 0.75rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.8px; margin-right: 4px; }
.panel--flat              { background: var(--panel-bg); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.status-btn--todo         { border: 1px solid var(--border) !important; }
.status-btn--in-progress  { border: 1px solid rgba(59,130,246,0.35) !important; color: var(--blue) !important; }
.status-btn--blocked      { border: 1px solid rgba(220,38,38,0.35) !important; color: #b91c1c !important; }
.status-btn--done         { border: 1px solid rgba(22,163,74,0.35) !important; color: #15803d !important; }

/* ─── Task detail meta ───────────────────────────────────────────────────────── */
.task-description         { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; padding: 16px 20px; white-space: pre-wrap; }
.task-meta-grid           { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 14px 20px; border-top: 1px solid var(--border); }
.meta-item                { display: flex; flex-direction: column; gap: 3px; }
.meta-label               { font-size: 0.68rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.8px; }
.meta-list                { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; padding: 16px 20px; align-items: baseline; }
.meta-list dt             { font-size: 0.72rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.8px; white-space: nowrap; }
.meta-list dd             { font-size: 0.87rem; color: var(--text); }

/* ─── Badge count (e.g. "Comments 3") ───────────────────────────────────────── */
.badge-count              { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; background: var(--navy3); border: 1px solid var(--border); border-radius: 10px; font-size: 0.7rem; color: var(--text-muted); margin-left: 6px; font-weight: 600; }

/* ─── Task count pills (project detail strip) ────────────────────────────────── */
.task-count               { padding: 2px 8px; border-radius: 10px; font-size: 0.72rem; font-weight: 600; margin-right: 4px; }
.task-count--in-progress  { background: rgba(59,130,246,0.08); color: var(--blue); }
.task-count--blocked      { background: rgba(220,38,38,0.07); color: #b91c1c; }
.task-count--done         { background: rgba(22,163,74,0.08); color: #15803d; }

/* ─── Comment form ───────────────────────────────────────────────────────────── */
.comment-form             { padding: 14px 20px; border-top: 1px solid var(--border); }
.comment__time            { margin-left: 8px; color: var(--text-dim); font-weight: 400; }

/* ─── Attachment list ────────────────────────────────────────────────────────── */
.attachment-list          { padding: 0 20px; }
.attachment-item          { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.attachment-item:last-child { border-bottom: none; }
.attachment-item > svg    { width: 16px; height: 16px; color: var(--text-dim); flex-shrink: 0; }
.attachment-info          { flex: 1; min-width: 0; }
.attachment-name          { font-size: 0.85rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.attachment-name:hover    { color: var(--blue); }
.attachment-meta          { font-size: 0.72rem; color: var(--text-dim); }
.upload-form              { padding: 12px 16px; border-top: 1px solid var(--border); background: var(--navy3); }

/* ─── Empty state small ──────────────────────────────────────────────────────── */
.empty-state--sm          { padding: 24px 20px; }
.empty-state--sm svg      { width: 28px; height: 28px; }

/* ─── Checklist count chip (task lists) ─────────────────────────────────────── */
.cl-count              { display: inline-flex; align-items: center; gap: 3px; font-size: 0.68rem; font-weight: 600; padding: 1px 7px; border-radius: 10px; margin-left: 6px; vertical-align: middle; background: var(--navy3); color: var(--text-muted); border: 1px solid var(--border); white-space: nowrap; }
.cl-count svg          { width: 10px; height: 10px; }
.cl-count--done        { background: rgba(22,163,74,0.08); color: #15803d; border-color: rgba(22,163,74,0.25); }

/* ─── Checklist ──────────────────────────────────────────────────────────────── */
.checklist                  { list-style: none; padding: 0; margin: 0; }
.checklist__item            { display: flex; align-items: center; gap: 10px; padding: 8px 20px; border-bottom: 1px solid var(--border); transition: background 0.1s; }
.checklist__item:last-child { border-bottom: none; }
.checklist__item:hover      { background: var(--navy3); }
.checklist__item--done .checklist__text { text-decoration: line-through; color: var(--text-dim); }
.checklist__check           { display: flex; align-items: flex-start; gap: 10px; flex: 1; cursor: pointer; min-width: 0; }
.checklist__check input[type="checkbox"] { width: 16px; height: 16px; margin-top: 2px; flex-shrink: 0; cursor: pointer; accent-color: var(--blue); }
.checklist__text            { font-size: 0.87rem; color: var(--text); line-height: 1.45; word-break: break-word; }
.checklist__delete          { background: none; border: none; color: var(--text-dim); cursor: pointer; padding: 3px; border-radius: 4px; display: flex; align-items: center; opacity: 0; transition: opacity 0.15s, color 0.15s, background 0.15s; flex-shrink: 0; }
.checklist__delete svg      { width: 14px; height: 14px; }
.checklist__item:hover .checklist__delete { opacity: 1; }
.checklist__delete:hover    { color: var(--red); background: rgba(220,38,38,0.07); }
.checklist__progress        { padding: 10px 20px 4px; }
.checklist__progress-label  { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 5px; display: flex; justify-content: space-between; }
.checklist__add             { display: flex; gap: 8px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--border); background: var(--navy3); }
.checklist__add .form-input { flex: 1; padding: 7px 10px; font-size: 0.87rem; }

/* ─── Utility ────────────────────────────────────────────────────────────────── */
.text-muted               { color: var(--text-muted); }
.text-sm                  { font-size: 0.8rem; }

/* ─── Badge status variants ──────────────────────────────────────────────────── */
.badge--inactive          { background: var(--navy3); color: var(--text-muted); border: 1px solid var(--border); }
.row--inactive td         { opacity: 0.55; }

/* ─── Notification bell (sidebar nav item) ───────────────────────────────────── */
.sidebar-nav__bell {
    width: 100%; background: none; border: none; cursor: pointer; text-align: left;
    color: #94a3b8;
}
.sidebar-nav__bell:hover { background: rgba(255,255,255,0.07); color: #e2e8f0; }
.notif-bell-wrap { position: relative; display: inline-flex; flex-shrink: 0; }
.notif-badge {
    position: absolute; top: -5px; right: -7px;
    min-width: 16px; height: 16px; padding: 0 4px;
    background: var(--red); color: #fff;
    border-radius: 8px; font-size: 0.6rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    line-height: 1;
}
.notif-badge--hidden { display: none; }

/* ─── Notification panel (drawer to the right of sidebar) ───────────────────── */
.notif-panel {
    position: fixed; top: 0; bottom: 0;
    width: 300px;
    background: var(--panel-bg);
    border-right: 1px solid var(--border);
    border-left: 1px solid var(--border);
    z-index: 99;
    display: flex; flex-direction: column;
    box-shadow: 4px 0 20px rgba(0,0,0,0.1);
}
.notif-panel[hidden] { display: none; }
.notif-panel__header {
    display: flex; align-items: center; gap: 8px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.notif-panel__title { font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); flex: 1; }
.notif-panel__close {
    background: none; border: none; cursor: pointer;
    color: var(--text-muted); display: flex; align-items: center; padding: 2px;
}
.notif-panel__close:hover { color: var(--text); }
.notif-panel__close svg { width: 15px; height: 15px; }
.notif-panel__body { flex: 1; overflow-y: auto; padding: 6px 0; }

.notif-item {
    padding: 12px 16px; border-bottom: 1px solid var(--border);
    cursor: pointer; transition: background 0.15s;
}
.notif-item:hover { background: var(--navy3); }
.notif-item--unread { border-left: 3px solid var(--blue); padding-left: 13px; }
.notif-item__title  { font-size: 0.78rem; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.notif-item__msg    { font-size: 0.8rem; color: var(--text-muted); line-height: 1.4; margin-bottom: 4px; }
.notif-item__time   { font-size: 0.7rem; color: var(--text-dim); }
.notif-empty { padding: 40px 16px; text-align: center; color: var(--text-dim); }
.notif-empty svg { width: 28px; height: 28px; margin-bottom: 10px; opacity: 0.4; }
.notif-empty p { font-size: 0.85rem; }

/* ─── Kanban board (Planner-style) ──────────────────────────────────────────── */
.kanban-board             { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 24px; align-items: flex-start; min-height: calc(100vh - 260px); }

/* Column */
.kanban-col               { flex: 1; min-width: 272px; max-width: 340px; display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.kanban-col__header       { display: flex; align-items: center; gap: 10px; padding: 13px 16px; color: #fff; flex-shrink: 0; }
.kanban-col--todo         .kanban-col__header { background: #475569; }
.kanban-col--in-progress  .kanban-col__header { background: #2563eb; }
.kanban-col--blocked      .kanban-col__header { background: #dc2626; }
.kanban-col--done         .kanban-col__header { background: #16a34a; }
.kanban-col__title        { flex: 1; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.3px; }
.kanban-col__count        { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; background: rgba(255,255,255,0.22); border-radius: 11px; font-size: 0.72rem; font-weight: 700; }
.kanban-col__add-btn      { background: rgba(255,255,255,0.18); border: none; color: #fff; border-radius: 6px; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background 0.15s; flex-shrink: 0; }
.kanban-col__add-btn svg  { width: 14px; height: 14px; }
.kanban-col__add-btn:hover { background: rgba(255,255,255,0.32); }

/* Column body */
.kanban-col__body         { flex: 1; background: #f1f5f9; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 120px; transition: background 0.15s; }
.kanban-col__body.drag-over { background: #dbeafe; outline: 2px dashed rgba(59,130,246,0.45); outline-offset: -5px; }
.kanban-col__empty        { padding: 24px 12px; text-align: center; font-size: 0.78rem; color: #94a3b8; border: 1.5px dashed #cbd5e1; border-radius: 8px; flex: 1; pointer-events: none; user-select: none; }

/* Inline add-task form (inside column body, at top) */
.kanban-add-form          { background: var(--panel-bg); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; box-shadow: var(--shadow); }
.kanban-add-form input,
.kanban-add-form select   { width: 100%; background: var(--navy3); border: 1px solid var(--border); border-radius: 6px; color: var(--text); padding: 7px 10px; font-size: 0.84rem; font-family: var(--font); outline: none; margin-bottom: 6px; }
.kanban-add-form input:focus,
.kanban-add-form select:focus { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(59,130,246,0.12); }
.kanban-add-form__row     { display: flex; gap: 6px; margin-top: 4px; }

/* ─── Kanban card ────────────────────────────────────────────────────────────── */
.kanban-card              { background: var(--panel-bg); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; cursor: grab; box-shadow: 0 1px 2px rgba(0,0,0,0.06); transition: box-shadow 0.15s, transform 0.1s, opacity 0.15s; }
.kanban-card:hover        { box-shadow: 0 4px 14px rgba(0,0,0,0.1); transform: translateY(-1px); }
.kanban-card:active       { cursor: grabbing; }
.kanban-card--dragging    { opacity: 0.35; transform: rotate(1deg); }

/* Label color strip across the top of the card */
.kanban-card__strip       { display: flex; height: 5px; }
.kanban-card__strip span  { flex: 1; }

/* Card body */
.kanban-card__body        { padding: 11px 13px 10px; }
.kanban-card__name        { display: block; font-size: 0.88rem; font-weight: 600; color: var(--text); text-decoration: none; line-height: 1.45; margin-bottom: 6px; }
.kanban-card__name:hover  { color: var(--blue); }
.kanban-card__labels      { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }

/* Card footer: badges left, avatar right */
.kanban-card__footer      { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 6px; }
.kanban-card__chips       { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.kanban-card__due         { display: inline-flex; align-items: center; gap: 3px; font-size: 0.7rem; font-weight: 600; padding: 2px 7px; border-radius: 10px; white-space: nowrap; }
.kanban-card__due svg     { width: 10px; height: 10px; }
.kanban-card__due.rag-green  { background: rgba(22,163,74,0.1);  color: #15803d; }
.kanban-card__due.rag-yellow { background: rgba(217,119,6,0.1);  color: #b45309; }
.kanban-card__due.rag-red    { background: rgba(220,38,38,0.1);  color: #b91c1c; }
.kanban-card__avatar      { width: 26px; height: 26px; border-radius: 50%; background: #dbeafe; color: #1d4ed8; display: inline-flex; align-items: center; justify-content: center; font-size: 0.62rem; font-weight: 700; flex-shrink: 0; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--border); }

/* ─── Milestones ─────────────────────────────────────────────────────────────── */
.milestone-grid                   { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; padding: 16px 20px; }
.milestone-card                   { position: relative; background: var(--navy3); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; padding-bottom: 36px; }
.milestone-card--complete         { border-color: rgba(34,197,94,0.35); }
.milestone-card__header           { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.milestone-card__icon             { width: 32px; height: 32px; border-radius: 8px; background: rgba(59,130,246,0.1); color: var(--blue); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.milestone-card--complete .milestone-card__icon { background: rgba(34,197,94,0.1); color: var(--green); }
.milestone-card__icon svg         { width: 16px; height: 16px; }
.milestone-card__name             { flex: 1; min-width: 0; font-weight: 700; font-size: 0.9rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.milestone-card__meta             { margin-bottom: 10px; }
.milestone-card__meta-date        { font-size: 0.76rem; }
.milestone-card__edit-btn         { position: absolute; bottom: 8px; right: 10px; }
.milestone-card__due              { font-size: 0.76rem; color: var(--text-muted); white-space: nowrap; }
.milestone-card__due.rag-red      { color: var(--red); }
.milestone-card__due.rag-yellow   { color: var(--yellow); }
.milestone-card__due.rag-green    { color: var(--green); }
.milestone-card__days-left        { font-size: 0.72rem; font-weight: 600; margin-left: 6px; }
.milestone-card__days-left.rag-red    { color: var(--red); }
.milestone-card__days-left.rag-yellow { color: var(--yellow); }
.milestone-card__days-left.rag-green  { color: var(--green); }
.milestone-complete-badge         { display: inline-flex; align-items: center; gap: 4px; font-size: 0.74rem; font-weight: 600; color: var(--green); }
.milestone-complete-badge svg     { width: 13px; height: 13px; flex-shrink: 0; }
.milestone-card__progress         { display: flex; flex-direction: column; gap: 4px; margin-bottom: 6px; }
.milestone-card__pct              { font-size: 0.75rem; color: var(--text-muted); }
.milestone-card__desc             { font-size: 0.8rem; color: var(--text-muted); margin-top: 6px; }
.milestone-chip          { display: inline-flex; align-items: center; gap: 4px; font-size: 0.72rem; font-weight: 600; padding: 2px 8px; border-radius: 10px; background: rgba(59,130,246,0.1); color: #1d4ed8; }
.milestone-chip svg      { flex-shrink: 0; }

/* ─── Task Dependencies ──────────────────────────────────────────────────────── */
.dep-blocked-banner      { display: flex; align-items: center; gap: 8px; background: rgba(220,38,38,0.07); border: 1px solid rgba(220,38,38,0.2); border-radius: 8px; padding: 10px 16px; margin: 0 20px 12px; font-size: 0.84rem; color: var(--red); font-weight: 500; }
.dep-blocked-banner svg  { width: 16px; height: 16px; flex-shrink: 0; }

/* Dependency graph */
.dep-graph               { display: flex; align-items: center; gap: 12px; padding: 16px 20px; flex-wrap: wrap; }
.dep-graph__col          { display: flex; flex-direction: column; gap: 8px; }
.dep-graph__label        { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 2px; }
.dep-graph__arrow        { color: var(--text-dim); flex-shrink: 0; }
.dep-graph__arrow svg    { width: 20px; height: 20px; }

/* Dependency node */
.dep-node                { display: flex; align-items: center; gap: 8px; background: var(--navy3); border: 1.5px solid var(--border); border-radius: 8px; padding: 8px 12px; min-width: 160px; max-width: 240px; position: relative; }
.dep-node--current       { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 600; }
.dep-node--current .dep-node__name  { color: #fff; }
.dep-node--current .dep-node__status{ color: rgba(255,255,255,0.75); }
.dep-node--done          { border-color: var(--green); }
.dep-node--done .dep-node__status-dot { background: var(--green); }
.dep-node--in-progress   { border-color: var(--blue); }
.dep-node--in-progress .dep-node__status-dot { background: var(--blue); }
.dep-node--blocked       { border-color: var(--red); }
.dep-node--blocked .dep-node__status-dot { background: var(--red); }
.dep-node--todo .dep-node__status-dot { background: var(--text-dim); }
.dep-node--waiting       { opacity: 0.7; }
.dep-node__status-dot    { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--text-dim); }
.dep-node__name          { flex: 1; font-size: 0.82rem; font-weight: 600; color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dep-node__name:hover    { color: var(--blue); }
.dep-node__name--current { pointer-events: none; }
.dep-node__status        { font-size: 0.7rem; color: var(--text-muted); white-space: nowrap; }
.dep-node__remove        { background: none; border: none; cursor: pointer; color: var(--text-dim); font-size: 1rem; line-height: 1; padding: 2px 4px; border-radius: 4px; }
.dep-node__remove:hover  { background: rgba(220,38,38,0.12); color: var(--red); }

/* Dep add row */
.dep-add                 { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.dep-add__label          { font-size: 0.82rem; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.dep-empty               { padding: 16px 20px; font-size: 0.84rem; color: var(--text-muted); }

/* Lock icon in project task list */
.dep-lock                { display: inline-flex; align-items: center; color: var(--red); cursor: help; }
.dep-lock svg            { width: 13px; height: 13px; }

/* ─── @mentions ──────────────────────────────────────────────────────────────── */
.mention                 { display: inline-block; padding: 1px 5px; border-radius: 4px; background: rgba(59,130,246,0.1); color: #1d4ed8; font-weight: 600; }
.mention-wrap            { position: relative; }
.mention-dropdown        { position: absolute; z-index: 50; background: var(--panel-bg); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,0.12); min-width: 200px; max-height: 200px; overflow-y: auto; bottom: calc(100% + 4px); left: 0; }
.mention-option          { padding: 9px 14px; font-size: 0.86rem; cursor: pointer; color: var(--text); }
.mention-option:hover    { background: var(--navy3); color: var(--blue); }
.mention-hint            { font-size: 0.74rem; color: var(--text-dim); }

/* ─── Reports ────────────────────────────────────────────────────────────────── */

/* Hub cards */
.report-hub             { display: flex; flex-direction: column; gap: 14px; max-width: 780px; }
.report-card            { display: flex; align-items: center; gap: 18px; background: var(--panel-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 20px; text-decoration: none; color: var(--text); box-shadow: var(--shadow); transition: box-shadow 0.15s, transform 0.12s; }
.report-card:hover      { box-shadow: 0 4px 16px rgba(0,0,0,0.1); transform: translateY(-1px); color: var(--text); }
.report-card__icon      { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.report-card__icon svg  { width: 22px; height: 22px; stroke: #fff; }
.report-card__icon--blue   { background: var(--blue); }
.report-card__icon--purple { background: #7c3aed; }
.report-card__icon--red    { background: var(--red); }
.report-card__body      { flex: 1; }
.report-card__title     { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.report-card__desc      { font-size: 0.84rem; color: var(--text-muted); line-height: 1.45; margin-bottom: 10px; }
.report-card__tags      { display: flex; flex-wrap: wrap; gap: 5px; }
.report-card__tags span { font-size: 0.72rem; font-weight: 600; background: var(--navy3); color: var(--text-muted); border-radius: 20px; padding: 2px 9px; }
.report-card__arrow     { flex-shrink: 0; color: var(--text-dim); }
.report-card__arrow svg { width: 18px; height: 18px; }

/* Stat cards */
.report-stats           { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.report-stat            { background: var(--panel-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 22px; min-width: 110px; box-shadow: var(--shadow); }
.report-stat__value     { font-size: 1.75rem; font-weight: 800; color: var(--text); line-height: 1.1; }
.report-stat__label     { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; margin-top: 3px; }
.report-stat--green     { border-top: 3px solid var(--green); }
.report-stat--green .report-stat__value { color: var(--green); }
.report-stat--yellow    { border-top: 3px solid var(--yellow); }
.report-stat--yellow .report-stat__value { color: var(--yellow); }
.report-stat--red       { border-top: 3px solid var(--red); }
.report-stat--red .report-stat__value { color: var(--red); }

/* Filters row */
.report-filters         { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.report-filters select  { background: var(--panel-bg); border: 1px solid var(--border); border-radius: 6px; color: var(--text); padding: 7px 12px; font-size: 0.84rem; font-family: var(--font); outline: none; cursor: pointer; }
.report-filters select:focus { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(59,130,246,0.12); }

/* Table */
.report-table-wrap      { background: var(--panel-bg); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; }
.report-table           { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.report-table thead tr  { border-bottom: 2px solid var(--border); }
.report-table th        { padding: 11px 14px; text-align: left; font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); white-space: nowrap; }
.report-table td        { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.report-table tbody tr:last-child td { border-bottom: none; }
.report-table tbody tr:hover { background: var(--navy3); }
.report-table__num      { text-align: center; }
.report-table__wide     { min-width: 140px; }

/* Progress bar in table */
.report-progress        { display: flex; align-items: center; gap: 8px; }
.report-progress__bar   { height: 6px; background: var(--blue); border-radius: 3px; flex-shrink: 0; }
.report-progress        { position: relative; }
.report-progress__bar   { display: inline-block; height: 6px; background: var(--blue); border-radius: 3px; min-width: 2px; }
.report-progress span   { font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; }

/* Workload bar */
.workload-bar           { height: 8px; background: var(--navy3); border-radius: 4px; overflow: hidden; width: 100%; }
.workload-bar__fill     { height: 100%; background: var(--blue); border-radius: 4px; transition: width 0.4s ease; }
.workload-bar__fill--danger { background: var(--red); }

/* User cell */
.report-user            { display: flex; align-items: center; gap: 10px; }
.report-user--inline    { gap: 6px; }
.report-user__avatar    { width: 32px; height: 32px; border-radius: 50%; background: #dbeafe; color: #1d4ed8; display: flex; align-items: center; justify-content: center; font-size: 0.68rem; font-weight: 700; flex-shrink: 0; }
.report-user__avatar--sm { width: 24px; height: 24px; font-size: 0.6rem; }
.report-user__name      { font-weight: 600; font-size: 0.86rem; }
.report-user__email     { font-size: 0.76rem; color: var(--text-muted); }

/* Role chip */
.role-chip              { font-size: 0.72rem; font-weight: 600; padding: 2px 9px; border-radius: 20px; background: var(--navy3); color: var(--text-muted); }

/* Overdue badge */
.overdue-badge          { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 2px 8px; border-radius: 10px; }
.overdue--low           { background: rgba(217,119,6,0.1); color: #b45309; }
.overdue--high          { background: rgba(220,38,38,0.1); color: #b91c1c; }
.overdue--critical      { background: #dc2626; color: #fff; }

/* Success empty state */
.empty-state--success i, .empty-state--success svg { color: var(--green); }
.empty-state--success h3 { font-size: 1rem; font-weight: 700; color: var(--text); margin-top: 8px; }

/* Utility */
.text-red               { color: var(--red); }
.font-bold              { font-weight: 700; }
.text-muted             { color: var(--text-muted); }

/* Print footer */
.report-footer          { margin-top: 24px; font-size: 0.75rem; color: var(--text-muted); }

/* ─── Print / PDF ─────────────────────────────────────────────────────────────── */
@media print {
    .no-print               { display: none !important; }
    .print-only             { display: inline !important; }
    .app-body               { display: block !important; }
    .sidebar, #notifPanel   { display: none !important; }
    .app-main               { margin-left: 0 !important; padding: 0 !important; }
    .app-content            { padding: 0 !important; max-width: none !important; }
    .report-table-wrap      { box-shadow: none; border: 1px solid #ccc; }
    .report-table tbody tr:hover { background: transparent; }
    .report-stat            { box-shadow: none; }
    .page-header__back      { display: none !important; }
    a                       { color: var(--text) !important; text-decoration: none !important; }
    .report-footer          { display: block !important; border-top: 1px solid #ccc; padding-top: 8px; margin-top: 16px; }
}

@media screen {
    .print-only             { display: none; }
}

/* ─── Gantt / Timeline ───────────────────────────────────────────────────────── */
.gantt-legend             { display:flex; align-items:center; gap:14px; margin-bottom:10px; flex-wrap:wrap; font-size:12px; color:var(--text-muted); }
.gantt-legend-item        { display:flex; align-items:center; gap:5px; }
.gantt-legend-swatch      { width:14px; height:10px; border-radius:3px; display:inline-block; flex-shrink:0; }
.gantt-legend-diamond     { width:10px; height:10px; background:var(--yellow); transform:rotate(45deg); border-radius:1px; flex-shrink:0; }
.gantt-legend-today-swatch{ width:2px; height:14px; background:#ef4444; border-radius:1px; display:inline-block; flex-shrink:0; }

.gantt-outer              { overflow:auto; max-height:calc(100vh - 290px); border:1px solid var(--border); border-radius:var(--radius); background:var(--panel-bg); }
.gantt-table              { border-collapse:collapse; table-layout:fixed; }

/* Sticky header */
.gantt-table thead        { position:sticky; top:0; z-index:10; }
.gantt-th-name--month     { height:28px; background:var(--navy3); border-bottom:1px solid var(--border); border-right:2px solid var(--border); padding:0 10px; font-size:11px; font-weight:600; color:var(--text-muted); text-transform:uppercase; letter-spacing:0.05em; vertical-align:middle; }
.gantt-th-name--week      { height:22px; background:var(--navy3); border-bottom:2px solid var(--border); border-right:2px solid var(--border); }
.gantt-th-bar             { padding:0; vertical-align:top; }
.gantt-hdr-inner          { position:relative; overflow:hidden; }
.gantt-month-lbl          { position:absolute; top:0; height:28px; line-height:28px; padding-left:6px; font-size:11px; font-weight:600; color:var(--text); border-left:1px solid var(--border); white-space:nowrap; overflow:hidden; background:var(--navy3); }
.gantt-week-lbl           { position:absolute; top:2px; font-size:10px; color:var(--text-muted); padding-left:3px; border-left:1px solid var(--border); height:18px; line-height:18px; white-space:nowrap; background:var(--navy3); }

/* Sticky name column */
.gantt-td-name            { position:sticky; left:0; z-index:3; width:260px; min-width:260px; max-width:260px; background:var(--panel-bg); border-right:2px solid var(--border); padding:0 8px; vertical-align:middle; }
.gantt-th-name--month,
.gantt-th-name--week      { position:sticky; left:0; z-index:11; width:260px; min-width:260px; max-width:260px; }

/* Bar column */
.gantt-td-bar             { padding:0; position:relative; height:38px; background:var(--panel-bg); }

/* Task rows */
.gantt-task-row:hover .gantt-td-name { background:#eff6ff; }
.gantt-task-row:hover .gantt-td-bar  { background:var(--blue-muted); }
.gantt-task-row .gantt-td-bar        { border-top:1px solid var(--border); }
.gantt-task-row .gantt-td-name       { border-top:1px solid var(--border); }
.gantt-task-row--done .gantt-td-name { color:var(--text-muted); }

/* Milestone row */
.gantt-milestone-row .gantt-td-name,
.gantt-milestone-row .gantt-td-bar   { background:#fffbeb; border-top:1px solid #fde68a; border-bottom:1px solid #fde68a; height:32px; }
.gantt-td-milestone                  { display:flex !important; align-items:center; gap:5px; padding:0 8px; }
.gantt-flag-icon                     { width:13px; height:13px; color:var(--yellow); flex-shrink:0; }
.gantt-milestone-name                { font-size:12px; font-weight:600; color:var(--yellow); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; flex:1; min-width:0; }
.gantt-milestone-date                { font-size:11px; color:var(--text-muted); font-weight:400; white-space:nowrap; }

/* Section separator */
.gantt-section-row .gantt-td-name,
.gantt-section-row .gantt-td-bar     { background:var(--navy3); border-top:2px solid var(--border); }
.gantt-section-lbl                   { font-size:11px; font-weight:600; color:var(--text-muted); text-transform:uppercase; letter-spacing:0.05em; padding:4px 10px; }

/* Name cell content */
.gantt-name-cell          { display:flex; align-items:center; gap:6px; }
.gantt-avatar             { width:22px; height:22px; border-radius:50%; background:var(--blue); color:#fff; font-size:9px; font-weight:700; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.gantt-task-link          { font-size:13px; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; flex:1; min-width:0; }
.gantt-task-link:hover    { color:var(--blue); }

/* Bar */
.gantt-bar                { position:absolute; top:7px; height:22px; border-radius:4px; display:flex; align-items:center; overflow:hidden; cursor:pointer; text-decoration:none; box-shadow:0 1px 3px rgba(0,0,0,0.18); transition:filter .15s, box-shadow .15s; }
.gantt-bar:hover          { filter:brightness(1.08); box-shadow:0 2px 6px rgba(0,0,0,0.22); }
.gantt-bar-lbl            { font-size:11px; color:#fff; font-weight:600; padding:0 6px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* Today line */
.gantt-today-line         { position:absolute; top:0; bottom:0; width:2px; background:#ef4444; opacity:0.65; z-index:2; pointer-events:none; }

/* Milestone diamond marker */
.gantt-ms-diamond         { position:absolute; top:50%; width:12px; height:12px; background:var(--yellow); transform:translate(-50%,-50%) rotate(45deg); border-radius:1px; z-index:2; border:2px solid #92400e; }

/* No dates note */
.gantt-no-dates           { font-size:11px; color:var(--text-dim); padding-left:8px; }

/* ─── Modal ──────────────────────────────────────────────────────────────────── */
.modal                    { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; }
.modal[hidden]            { display: none; }
.modal__backdrop          { position: absolute; inset: 0; background: rgba(0,0,0,0.4); backdrop-filter: blur(2px); }
.modal__box               { position: relative; background: var(--panel-bg); border: 1px solid var(--border); border-radius: 12px; padding: 28px; max-width: 440px; width: 90%; box-shadow: 0 8px 32px rgba(0,0,0,0.12); }
.modal__title             { font-size: 1.05rem; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.modal__body              { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 20px; line-height: 1.5; }
.modal__actions           { display: flex; gap: 10px; justify-content: flex-end; padding-top: 16px; border-top: 1px solid var(--border); }
