/* Admin-dashboard — udvidet stats kun for admin-rollen */

.admin-dashboard {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--rule-2);
}

.admin-dashboard-header {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 16px;
}

.admin-dashboard-header h2 {
    font-family: "Fraunces", Georgia, serif;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--cream);
    margin: 0;
}

.admin-period-note {
    font-family: "Geist Mono", ui-monospace, monospace;
    font-size: 11px;
    color: var(--cream-mute);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

#admin-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}

.ad-card {
    /* genbruger .dash-card men kan også stå alene */
}

.ad-card--warn {
    background: linear-gradient(rgba(255, 180, 0, 0.06), rgba(255, 180, 0, 0.01));
    border-color: rgba(255, 180, 0, 0.3);
}

/* Chip-badges */
.ad-chip-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 6px;
    font-family: "Geist Mono", ui-monospace, monospace;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.05em;
    background: rgba(255, 255, 255, 0.08);
    color: var(--cream);
}
.ad-chip-badge.ad-chip-intel { background: rgba(150, 150, 150, 0.25); color: #c8c8c8; }
.ad-chip-badge.ad-chip-m1 { background: rgba(80, 140, 220, 0.25); color: #a3c8ff; }
.ad-chip-badge.ad-chip-m2 { background: rgba(120, 180, 100, 0.25); color: #b8e0a8; }
.ad-chip-badge.ad-chip-m3 { background: rgba(180, 130, 200, 0.25); color: #d9b3e6; }
.ad-chip-badge.ad-chip-m4 { background: rgba(232, 115, 74, 0.3); color: #ffb89a; }

/* Bars (maskinpark) */
.ad-bars {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 12px 0 14px;
}
.ad-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
}
.ad-bar-label {
    width: 40px;
    color: var(--cream-mute);
    font-family: "Geist Mono", ui-monospace, monospace;
    letter-spacing: 0.04em;
}
.ad-bar-track {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    overflow: hidden;
}
.ad-bar-fill {
    height: 100%;
    border-radius: 3px;
    background: var(--cream-mute);
    transition: width 0.3s;
}
.ad-bar-fill.ad-chip-intel { background: #a0a0a0; }
.ad-bar-fill.ad-chip-m1 { background: #6ea0d9; }
.ad-bar-fill.ad-chip-m2 { background: #84b566; }
.ad-bar-fill.ad-chip-m3 { background: #b380cd; }
.ad-bar-fill.ad-chip-m4 { background: #f0855c; }
.ad-bar-count {
    font-family: "Geist Mono", ui-monospace, monospace;
    font-size: 11px;
    color: var(--cream);
    font-variant-numeric: tabular-nums;
    min-width: 32px;
    text-align: right;
}

/* Pill-rows (gruppe-count) */
.ad-group-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0 4px;
}
.ad-pill {
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.06);
    color: var(--cream);
}
.ad-pill--aktiv { background: rgba(110, 190, 130, 0.18); color: #9fdcaf; }
.ad-pill--ledig { background: rgba(150, 150, 150, 0.2); color: #cccccc; }
.ad-pill--workflow { background: rgba(232, 115, 74, 0.2); color: #ffa97e; }
.ad-pill--pension { background: rgba(255, 142, 142, 0.18); color: #ff8e8e; }

/* Top-list rows */
.ad-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 12px;
}
.ad-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 5px;
    font-size: 12px;
    transition: background 0.1s;
}
.ad-row--clickable {
    cursor: pointer;
}
.ad-row--clickable:hover {
    background: rgba(255, 255, 255, 0.05);
}
.ad-row-rank {
    color: var(--cream-mute);
    font-family: "Geist Mono", ui-monospace, monospace;
    font-size: 10px;
    width: 22px;
}
.ad-row-tag {
    font-family: "Geist Mono", ui-monospace, monospace;
    color: var(--cream);
    flex: 0 0 auto;
    min-width: 110px;
    font-size: 11px;
}
.ad-row-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    overflow: hidden;
}
.ad-row-bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
}
.ad-row-days {
    font-family: "Geist Mono", ui-monospace, monospace;
    color: var(--accent);
    font-weight: 600;
    font-size: 11px;
    min-width: 36px;
    text-align: right;
}
.ad-row-lane {
    flex: 1;
    color: var(--cream-mute);
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ad-more {
    color: var(--cream-mute);
    padding: 6px 8px 0;
    font-size: 11px;
}

/* Chip-tabel */
.ad-chip-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 12px;
}
.ad-chip-table thead th {
    text-align: left;
    font-family: "Geist Mono", ui-monospace, monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--cream-mute);
    font-weight: 600;
    padding: 6px 8px;
    border-bottom: 1px solid var(--rule-2);
}
.ad-chip-table tbody td {
    padding: 8px;
    border-bottom: 1px solid var(--rule-2);
    vertical-align: middle;
}
.ad-chip-table tbody tr:last-child td {
    border-bottom: none;
}
.ad-chip-table .ad-num {
    text-align: right;
    font-family: "Geist Mono", ui-monospace, monospace;
}
.ad-rating {
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.ad-rating--high { background: rgba(110, 190, 130, 0.2); color: #9fdcaf; }
.ad-rating--mid { background: rgba(232, 180, 100, 0.2); color: #ffd28a; }
.ad-rating--low { background: rgba(255, 142, 142, 0.18); color: #ff8e8e; }

/* Produktion-dot (samme som dashboard) */
.ad-prod-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ad-row-tag--wide {
    min-width: 0;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ad-row-warn {
    color: #ffae6e;
    font-weight: 600;
    font-size: 11px;
    font-family: "Geist Mono", ui-monospace, monospace;
    min-width: 32px;
    text-align: right;
}
.ad-row-ok {
    color: #9fdcaf;
    font-size: 12px;
    min-width: 32px;
    text-align: right;
}

/* MAC-tildelings-stats */
.ad-mac-stats {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 10px;
    border-top: 1px solid var(--rule-2);
}
.ad-mac-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}
.ad-mac-label {
    color: var(--cream-mute);
}
.ad-mac-val {
    font-family: "Geist Mono", ui-monospace, monospace;
    color: var(--cream);
    font-weight: 600;
}
.ad-mac-val--ok { color: #9fdcaf; }
.ad-mac-val--warn { color: #ff8e8e; }

/* FCP-fordeling — kompakt segmenteret bjælke (v0.7.77) */
.ad-fcp-vs { font-size: 22px; opacity: 0.55; }
.ad-seg-bar {
    display: flex;
    height: 20px;
    border-radius: 6px;
    overflow: hidden;
    margin: 10px 0 8px;
    background: rgba(242, 237, 226, 0.08);
}
.ad-seg {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    font-variant-numeric: tabular-nums;
    min-width: 0;
    transition: width 0.3s ease;
}
.ad-seg--old   { background: #4a90d9; }
.ad-seg--new   { background: #2d8a4e; }
.ad-seg--untag { background: #5a5a5a; color: #cfcabd; }
.ad-seg-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 11px;
    color: var(--cream-mute, #b8b2a4);
    margin-bottom: 6px;
}
.ad-seg-key { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.ad-seg-key i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex-shrink: 0; }

/* v0.7.78 — Klar til opgradering-linje i FCP-fordeling */
.ad-upgrade-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; font-size: 12px; color: var(--cream-mute, #b8b2a4); margin: 2px 0 6px; }
.ad-upgrade-num { font-weight: 700; color: #2d8a4e; font-size: 14px; }
.ad-upgrade-sub { font-size: 11px; opacity: 0.7; width: 100%; }
