/* ═══════════════════════════════════════════════════════════════════════════
   BOA Dashboard — Mission Control
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Shell ──────────────────────────────────────────────────────────────── */
.dashboard {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f1f5f9;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.dash-header {
    position: sticky;
    top: 0;
    z-index: 200;
    height: 54px;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 14px;
    box-shadow: 0 2px 12px rgba(30, 58, 138, .4);
    flex-shrink: 0;
}

.dash-logo {
    font-size: 1.2rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: .06em;
    flex-shrink: 0;
}

.dash-logo-sep {
    width: 1px;
    height: 18px;
    background: rgba(255,255,255,.25);
    flex-shrink: 0;
}

.dash-company {
    font-size: .88rem;
    font-weight: 700;
    color: rgba(255,255,255,.85);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-header-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.dash-user {
    font-size: .82rem;
    font-weight: 600;
    color: rgba(255,255,255,.85);
}

.dash-date {
    font-size: .78rem;
    color: rgba(255,255,255,.5);
}

.dash-logout-btn {
    font-size: .78rem;
    color: rgba(255,255,255,.65);
    text-decoration: none;
    padding: 4px 10px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 20px;
    transition: all .15s;
    display: flex;
    align-items: center;
    gap: 5px;
}
.dash-logout-btn:hover {
    background: rgba(255,255,255,.15);
    color: #fff;
    text-decoration: none;
}

/* ── Search wrap (sticky below header) ──────────────────────────────────── */
.dash-search-wrap {
    position: sticky;
    top: 54px;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    padding: 14px 24px;
    flex-shrink: 0;
}

/* ── Search row ─────────────────────────────────────────────────────────── */
.dash-search-row {
    display: flex;
    align-items: stretch;
    flex-wrap: nowrap;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    max-width: 920px;
    transition: border-color .15s, box-shadow .15s;
}

.dash-search-row:focus-within {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,.1);
    background: #fff;
}

/* Module pill (left) */
.dash-mod-pill {
    display: flex !important;
    align-items: center !important;
    gap: 8px;
    padding: 0 16px;
    background: #2563eb !important;
    color: #fff !important;
    font-size: .8rem;
    font-weight: 700;
    white-space: nowrap;
    min-width: 136px;
    border: none !important;
    cursor: default;
    flex-shrink: 0;
    transition: background .2s;
    box-shadow: none !important;
    border-radius: 0 !important;
    --pico-background-color: #2563eb;
    --pico-color: #fff;
}

.dash-mod-pill.empty {
    background: #e2e8f0 !important;
    color: #94a3b8 !important;
    --pico-background-color: #e2e8f0;
    --pico-color: #94a3b8;
    font-weight: 500;
}

.dash-mod-pill .pill-chevron {
    font-size: .6rem;
    opacity: .6;
    margin-left: auto;
}

/* Search icon */
.dash-search-icon {
    padding: 0 10px 0 14px;
    color: #94a3b8;
    font-size: .88rem;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* Input */
.dash-search-input {
    flex: 1 1 0 !important;
    width: auto !important;
    border: none !important;
    background: transparent !important;
    padding: 12px 10px;
    font-size: .9rem;
    color: #1e293b;
    outline: none;
    min-width: 0;
    box-shadow: none !important;
    --pico-border-width: 0;
    --pico-background-color: transparent;
    --pico-color: #1e293b;
}

.dash-search-input::placeholder { color: #94a3b8; }
.dash-search-input:disabled { cursor: default; }

/* Mode radios */
.dash-mode-radios {
    display: flex;
    gap: 10px;
    padding: 0 14px;
    border-left: 1px solid #e2e8f0;
    align-items: center;
    flex-shrink: 0;
}

.dash-mode-radios label {
    font-size: .74rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    white-space: nowrap;
    margin: 0;
}

.dash-mode-radios input[type="radio"] {
    margin: 0;
    accent-color: #2563eb;
    width: 12px;
    height: 12px;
    --pico-border-width: 0;
}

/* Submit button */
.dash-search-submit {
    padding: 0 20px;
    background: #2563eb !important;
    color: #fff !important;
    border: none !important;
    cursor: pointer;
    font-size: .95rem;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background .15s;
    flex-shrink: 0;
    border-radius: 0 !important;
    box-shadow: none !important;
    --pico-background-color: #2563eb;
    --pico-color: #fff;
}

.dash-search-submit:hover:not(:disabled) { background: #1e40af !important; }
.dash-search-submit:disabled { background: #cbd5e1 !important; color: #fff !important; cursor: not-allowed; }

/* ── Action buttons row ─────────────────────────────────────────────────── */
.dash-actions-row {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    flex-wrap: wrap;
    max-width: 920px;
    align-items: center;
}

.dash-action-btn {
    padding: 5px 13px;
    font-size: .76rem;
    font-weight: 500;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #475569;
    text-decoration: none;
    cursor: pointer;
    transition: all .12s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    line-height: 1;
    height: 28px;
}

.dash-action-btn:hover {
    border-color: var(--act-color, #2563eb);
    background: var(--act-bg, #dbeafe);
    color: var(--act-dark, #1e40af);
    text-decoration: none;
}

.dash-action-btn.primary {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
    font-weight: 700;
}
.dash-action-btn.primary:hover {
    background: #1e40af;
    border-color: #1e40af;
    color: #fff;
    text-decoration: none;
}

.dash-actions-sep {
    width: 1px;
    height: 18px;
    background: #e2e8f0;
    flex-shrink: 0;
}

/* ── Module grid ─────────────────────────────────────────────────────────── */
.dash-grid {
    flex: 1;
    padding: 20px 24px 110px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

/* ── Category ───────────────────────────────────────────────────────────── */
.dash-cat { display: flex; flex-direction: column; gap: 8px; }

.dash-cat-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dash-cat-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dash-cat-label {
    font-size: .68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #94a3b8;
}

.dash-cat-line {
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.dash-cat-modules {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* ── Module card ─────────────────────────────────────────────────────────── */
.dash-mod-card {
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px;
    padding: 7px 13px;
    background: #fff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 10px;
    cursor: pointer;
    transition: all .15s;
    font-size: .83rem;
    font-weight: 500;
    color: #334155 !important;
    white-space: nowrap;
    user-select: none;
    box-shadow: none !important;
    /* PicoCSS button overrides */
    --pico-background-color: #fff;
    --pico-color: #334155;
    --pico-border-color: #e2e8f0;
    --pico-box-shadow: none;
}

.dash-mod-card i {
    font-size: .85rem;
    width: 15px;
    text-align: center;
    flex-shrink: 0;
    color: #94a3b8 !important;
    transition: color .15s;
}

.dash-mod-card:hover {
    border-color: var(--cat-color) !important;
    background: var(--cat-bg) !important;
    color: var(--cat-dark) !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,.08) !important;
}

.dash-mod-card:hover i { color: var(--cat-color) !important; }

.dash-mod-card.active {
    border-color: var(--cat-color) !important;
    background: var(--cat-color) !important;
    color: #fff !important;
    font-weight: 700;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--cat-color) 40%, transparent) !important;
    transform: translateY(-1px);
}

.dash-mod-card.active i { color: rgba(255,255,255,.8) !important; }

/* ── Bottom dock (fixed) ─────────────────────────────────────────────────── */
.dash-dock {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 150;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 24px;
    box-shadow: 0 -4px 20px rgba(0,0,0,.08);
}

.dock-item {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 18px;
    border-radius: 10px;
    font-size: .82rem;
    font-weight: 600;
    text-decoration: none;
    transition: all .15s;
    border: 1.5px solid transparent;
    white-space: nowrap;
}

.dock-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,.14);
    text-decoration: none;
}

.dock-item.agenda    { background:#dbeafe; color:#1e40af; }
.dock-item.agenda:hover    { background:#2563eb; color:#fff; }
.dock-item.werkbon   { background:#fef3c7; color:#92400e; }
.dock-item.werkbon:hover   { background:#f59e0b; color:#fff; }
.dock-item.transport { background:#d1fae5; color:#065f46; }
.dock-item.transport:hover { background:#10b981; color:#fff; }
.dock-item.waste     { background:#fee2e2; color:#991b1b; }
.dock-item.waste:hover     { background:#ef4444; color:#fff; }
.dock-item.sql       { background:#f1f5f9; color:#475569; border-color:#e2e8f0; }
.dock-item.sql:hover       { background:#475569; color:#fff; border-color:#475569; }
.dock-item.logout    { color:#ef4444; border-color:#fecaca; }
.dock-item.logout:hover    { background:#ef4444; color:#fff; border-color:#ef4444; }

/* ── Related module highlight (on grid cards) ───────────────────────────── */
.dash-mod-card.related {
    border-color: var(--cat-color);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--cat-color) 18%, transparent);
    background: color-mix(in srgb, var(--cat-color) 5%, #fff);
}

/* ── "Zie ook" related chips row ─────────────────────────────────────────── */
.dash-related-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
    max-width: 920px;
}

.dash-related-label {
    font-size: .68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #94a3b8;
    flex-shrink: 0;
    padding-right: 2px;
}

.dash-related-chip {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    padding: 3px 10px 3px 7px !important;
    font-size: .74rem !important;
    font-weight: 500 !important;
    border-radius: 20px !important;
    background: #fff !important;
    border: 1.5px solid #e2e8f0 !important;
    color: #475569 !important;
    cursor: pointer !important;
    transition: all .12s !important;
    white-space: nowrap !important;
    line-height: 1.4 !important;
    box-shadow: none !important;
    /* reset PicoCSS button vars */
    --pico-background-color: #fff;
    --pico-color: #475569;
    --pico-border-color: #e2e8f0;
}

.dash-related-chip:hover {
    border-color: var(--chip-color, #2563eb) !important;
    background: color-mix(in srgb, var(--chip-color, #2563eb) 8%, #fff) !important;
    color: var(--chip-color, #2563eb) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 6px rgba(0,0,0,.08) !important;
}

.chip-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .dash-header { padding: 0 16px; }
    .dash-search-wrap { padding: 12px 16px; }
    .dash-grid { padding: 16px 16px 100px; gap: 16px; }
    .dash-company { display: none; }
}

@media (max-width: 640px) {
    .dash-date { display: none; }
    .dash-mode-radios { display: none; }
    .dash-mod-pill { min-width: 100px; font-size: .75rem; padding: 0 12px; }
    .dock-item .dock-label { display: none; }
    .dock-item { padding: 10px 14px; }
    .dash-actions-row { gap: 5px; }
    .dash-action-btn { font-size: .72rem; padding: 4px 10px; }
}

@media (max-width: 420px) {
    .dash-search-row { border-radius: 10px; }
    .dash-mod-pill { min-width: 80px; }
}
