/* ============================================================
   VIEWS (generic dashboard pages)
   (split from style.css, lines 420-715)
   ============================================================ */

/* ======================================================
   VIEWS (pages inside dashboard)
   ====================================================== */
.view { display: none; }
.view.active { display: block; }

/* ── Stats Row ──────────────────────────────────────────────── */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}
.stat-card {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: border-color var(--transition);
}
.stat-card:hover { border-color: var(--border-hover); }
.stat-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-3);
    margin-bottom: 10px;
}
.stat-value {
    font-family: var(--font-head);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}
.stat-sub { font-size: 0.78rem; color: var(--text-3); margin-top: 6px; }

/* ── Filter bar ─────────────────────────────────────────────── */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.filter-bar select,
.filter-bar input {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 8px 14px;
    color: var(--text-1);
    font-size: 0.88rem;
    outline: none;
    transition: border-color var(--transition);
}
.filter-bar select:focus,
.filter-bar input:focus { border-color: var(--accent); }
.filter-bar select { appearance: none; padding-right: 28px; }
.filter-spacer { flex: 1; }

/* ── Task Table ─────────────────────────────────────────────── */
.task-table-wrap {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.task-table {
    width: 100%;
    border-collapse: collapse;
}
.task-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-3);
    border-bottom: 1px solid var(--border);
    background: var(--bg-3);
    white-space: nowrap;
}
.task-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    vertical-align: middle;
}
.task-table tr:last-child td { border-bottom: none; }
.task-table tbody tr {
    cursor: pointer;
    transition: background var(--transition);
}
.task-table tbody tr:hover { background: var(--bg-3); }

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}
.badge-open         { background: var(--bg-4);  color: var(--state-open); }
.badge-in_progress  { background: var(--info-dim);      color: var(--info); }
.badge-ready_for_review { background: var(--accent-dim); color: var(--state-ready); }
.badge-on_hold      { background: var(--warning-dim);  color: var(--state-on-hold); }
.badge-done         { background: var(--success-dim);   color: var(--success); }
.badge-aborted      { background: var(--danger-dim);    color: var(--danger); }
.badge-low          { background: var(--success-dim); color: var(--prio-low); }
.badge-medium       { background: var(--info-dim);       color: var(--prio-medium); }
.badge-high         { background: var(--warning-dim);    color: var(--prio-high); }
.badge-critical     { background: var(--danger-dim);     color: var(--danger); }

/* ── Notification Center ───────────────────────────────────── */
.notif-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
#notif-bell {
    position: relative;
    font-size: 1.05rem;
}
.notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 99px;
    background: var(--danger);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
}
.notif-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 360px;
    max-height: 480px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    flex-direction: column;
    overflow: hidden;
    z-index: 200;
}
/* "Expandable like the task view" — reuses the shared resizable side-drawer
   look (see initResizablePanel in watch.js) instead of the small dropdown. */
.notif-panel.expanded {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: var(--custom-drawer-width, 420px);
    max-height: none;
    border-radius: 0;
    border-left: 1px solid var(--border);
    border-top: none; border-right: none; border-bottom: none;
    box-shadow: var(--shadow-lg);
    z-index: 211;
}
.notif-panel:not(.expanded) .drawer-resize-controls,
.notif-panel:not(.expanded) .drawer-resize-handle { display: none; }
.notif-actions { display: flex; gap: 8px; margin-top: 8px; }
.notif-tabs {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding: 6px 8px;
    gap: 4px;
    flex-shrink: 0;
}
.notif-tab {
    background: none;
    border: none;
    color: var(--text-3);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}
.notif-tab:hover { background: var(--bg-3); color: var(--text-1); }
.notif-tab.active { background: var(--bg-3); color: var(--text-1); }
.notif-mark-all {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 8px;
}
.notif-mark-all:hover { text-decoration: underline; }
.notif-list {
    overflow-y: auto;
    flex: 1;
}
.notif-empty {
    padding: 32px 16px;
    text-align: center;
    color: var(--text-3);
    font-size: 0.85rem;
}
.notif-item {
    position: relative;
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--border);
}
.notif-item:last-child { border-bottom: none; }
.notif-item-body {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    flex: 1;
    cursor: pointer;
    transition: background var(--transition);
    min-width: 0;
}
.notif-item-body:hover { background: var(--bg-3); }
.notif-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    background: var(--bg-3);
}
.notif-item-text { min-width: 0; flex: 1; }
.notif-item-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-1);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.notif-item-msg {
    font-size: 0.78rem;
    color: var(--text-2);
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.notif-item-time {
    font-size: 0.7rem;
    color: var(--text-3);
    margin-top: 4px;
}
.notif-count {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 99px;
    background: var(--accent-dim);
    color: var(--accent);
    font-size: 0.68rem;
    font-weight: 700;
}
.notif-dismiss {
    flex-shrink: 0;
    width: 30px;
    background: none;
    border: none;
    border-right: 1px solid var(--border);
    color: var(--text-3);
    cursor: pointer;
    font-size: 0.85rem;
    transition: background var(--transition), color var(--transition);
}
.notif-dismiss:hover { background: var(--danger-dim); color: var(--danger); }

/* ── Task UID ───────────────────────────────────────────────── */
.task-uid {
    font-family: 'Courier New', monospace;
    font-size: 0.78rem;
    color: var(--text-3);
    background: var(--bg-3);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

/* ── Assignee chip ──────────────────────────────────────────── */
.assignee-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
}
.assignee-chip .user-avatar { width: 24px; height: 24px; font-size: 0.65rem; }

