:root {
    --bg: #f4f6f9;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --text: #111827;
    --muted: #697386;
    --line: #e5e9f0;
    --primary: #111827;
    --primary-contrast: #ffffff;
    --accent: #f27a21;
    --success: #14804a;
    --danger: #b42318;
    --info: #2563eb;
    --shadow: 0 18px 45px rgba(15, 23, 42, .08);
    --radius: 20px;
    --sidebar: 228px;
    --topbar: 76px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-theme="dark"] {
    --bg: #0b0f17;
    --surface: #121824;
    --surface-2: #181f2d;
    --text: #f8fafc;
    --muted: #9ba7b8;
    --line: #252e3d;
    --primary: #f8fafc;
    --primary-contrast: #111827;
    --shadow: 0 18px 45px rgba(0, 0, 0, .32);
}

* { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
[hidden] { display: none !important; }

.workspace-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--sidebar) 1fr;
    grid-template-rows: var(--topbar) 1fr;
}

.topbar {
    grid-column: 1 / -1;
    position: sticky;
    top: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: var(--sidebar) minmax(260px, 620px) 1fr;
    align-items: center;
    gap: 28px;
    height: var(--topbar);
    padding: 0 24px;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.brand-lockup { display: inline-flex; align-items: center; gap: 12px; }
.brand-lockup span:last-child { display: grid; line-height: 1.05; }
.brand-lockup small { color: var(--muted); font-size: 12px; margin-top: 4px; }
.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: var(--primary);
    color: var(--primary-contrast);
    font-weight: 800;
    letter-spacing: -.04em;
    position: relative;
}
.brand-mark::after {
    content: "";
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 7px;
    height: 2px;
    border-radius: 99px;
    background: var(--accent);
}

.command-trigger {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 13px;
    border: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--muted);
    cursor: pointer;
}
kbd {
    border: 1px solid var(--line);
    border-bottom-width: 2px;
    background: var(--surface);
    padding: 3px 7px;
    border-radius: 7px;
    font-size: 11px;
    color: var(--muted);
}

.topbar-actions { justify-self: end; display: flex; gap: 10px; }
.icon-button, .avatar-button {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    border: 1px solid var(--line);
    background: var(--surface);
    cursor: pointer;
}
.avatar-button { background: var(--primary); color: var(--primary-contrast); font-weight: 800; }

.sidebar {
    position: sticky;
    top: var(--topbar);
    height: calc(100vh - var(--topbar));
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px 14px;
    border-right: 1px solid var(--line);
    background: var(--surface);
}
.sidebar nav { display: grid; gap: 6px; }
.nav-item {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 14px;
    border-radius: 12px;
    color: var(--muted);
    font-weight: 650;
}
.nav-item span { width: 20px; text-align: center; font-size: 17px; }
.nav-item:hover, .nav-item.active { background: var(--surface-2); color: var(--text); }
.nav-item.active { box-shadow: inset 3px 0 0 var(--accent); }
.nav-button { border: 0; background: transparent; cursor: pointer; text-align: left; }

.main-content { min-width: 0; padding: 38px; }
.hero-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}
.hero-row h1 { font-size: clamp(32px, 4vw, 48px); letter-spacing: -.045em; margin: 6px 0; }
.hero-row p { margin: 0; color: var(--muted); font-size: 18px; }

.eyebrow {
    color: var(--accent);
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: .12em;
}

.button {
    min-height: 44px;
    border: 0;
    border-radius: 12px;
    padding: 0 16px;
    font-weight: 750;
    cursor: pointer;
}
.button.primary { background: var(--primary); color: var(--primary-contrast); }
.button.secondary { background: var(--surface-2); border: 1px solid var(--line); }
.button.full { width: 100%; }

.mission-card, .panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.mission-card { padding: 24px; margin-bottom: 22px; }
.panel { padding: 22px; min-width: 0; }
.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}
.section-heading h2 { margin: 3px 0 0; font-size: 20px; letter-spacing: -.025em; }
.live-pill { display: inline-flex; align-items: center; gap: 7px; color: var(--success); font-size: 12px; font-weight: 800; }
.live-pill i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 5px color-mix(in srgb, currentColor 15%, transparent); }

.mission-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.mission-item {
    min-height: 138px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 17px;
    border-radius: 16px;
    background: var(--surface-2);
    border: 1px solid var(--line);
}
.mission-item strong { display: block; margin-bottom: 7px; }
.mission-item p { margin: 0; color: var(--muted); line-height: 1.45; font-size: 14px; }
.mission-item button { align-self: flex-start; margin-top: 15px; border: 0; background: none; color: var(--info); padding: 0; font-weight: 750; cursor: pointer; }
.severity { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 14px; background: var(--surface); }
.skeleton-card { min-height: 138px; border-radius: 16px; background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.dashboard-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.span-2 { grid-column: span 2; }
.app-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.app-card {
    min-height: 94px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
    padding: 15px;
    border-radius: 15px;
    border: 1px solid var(--line);
    background: var(--surface-2);
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease;
}
.app-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.app-card strong, .app-card small { display: block; }
.app-card small { color: var(--muted); margin-top: 4px; }
.app-icon, .file-badge {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: var(--surface);
    border: 1px solid var(--line);
    font-weight: 800;
}
.text-button { border: 0; background: none; color: var(--info); font-weight: 750; cursor: pointer; }

.empty-state { text-align: center; padding: 18px 8px 4px; }
.empty-state > span { font-size: 30px; }
.empty-state strong { display: block; margin: 10px 0 6px; }
.empty-state p { color: var(--muted); line-height: 1.45; font-size: 14px; }

.recent-list, .activity-list { display: grid; gap: 8px; }
.recent-list a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 12px;
}
.recent-list a:hover { background: var(--surface-2); }
.recent-list strong, .recent-list small { display: block; }
.recent-list small { color: var(--muted); margin-top: 3px; }
.activity-list > div {
    display: grid;
    grid-template-columns: 12px 1fr auto;
    align-items: start;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}
.activity-list > div:last-child { border-bottom: 0; }
.activity-list strong, .activity-list small { display: block; }
.activity-list small, .activity-list time { color: var(--muted); margin-top: 4px; font-size: 13px; }
.activity-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; background: var(--muted); }
.activity-dot.success { background: var(--success); }
.activity-dot.info { background: var(--info); }

.command-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    padding: 10vh 18px 18px;
    background: rgba(5, 10, 18, .56);
    backdrop-filter: blur(9px);
}
.command-dialog {
    width: min(680px, 100%);
    margin: 0 auto;
    overflow: hidden;
    border-radius: 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: 0 30px 100px rgba(0, 0, 0, .35);
}
.command-input-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 16px; border-bottom: 1px solid var(--line); }
.command-input-row input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 17px; }
.command-results { padding: 10px; max-height: 420px; overflow: auto; }
.command-result, .command-hint button {
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 13px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    text-align: left;
    cursor: pointer;
}
.command-result:hover, .command-hint button:hover { background: var(--surface-2); }
.command-result small { color: var(--muted); }
.command-hint { padding: 8px; }
.command-hint strong { display: block; color: var(--muted); padding: 6px 12px 9px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }

.floating-action {
    position: fixed;
    right: 28px;
    bottom: 28px;
    z-index: 25;
    width: 54px;
    height: 54px;
    border: 0;
    border-radius: 18px;
    background: var(--primary);
    color: var(--primary-contrast);
    font-size: 27px;
    box-shadow: var(--shadow);
    cursor: pointer;
}

.login-layout { min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr; }
.login-visual {
    display: flex;
    align-items: flex-end;
    padding: 64px;
    background:
        radial-gradient(circle at 20% 20%, rgba(242,122,33,.32), transparent 28%),
        linear-gradient(135deg, #0b0f17, #172033);
    color: white;
}
.login-copy { max-width: 620px; }
.login-copy h1 { font-size: clamp(42px, 6vw, 76px); line-height: .98; letter-spacing: -.06em; margin: 44px 0 20px; }
.login-copy p { max-width: 520px; font-size: 20px; line-height: 1.55; color: #c4ccda; }
.login-panel { display: grid; place-items: center; padding: 30px; background: var(--bg); }
.login-card, .installer-card { width: min(430px, 100%); display: grid; gap: 21px; padding: 34px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.login-card h2, .installer-card h1 { margin: 4px 0; font-size: 30px; letter-spacing: -.04em; }
.muted { color: var(--muted); }
.stack { display: grid; gap: 18px; }
label { display: grid; gap: 8px; font-weight: 700; font-size: 14px; }
input {
    min-height: 48px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--text);
    padding: 0 13px;
    outline: 0;
}
input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 13%, transparent); }
.notice { padding: 13px 15px; border-radius: 12px; font-size: 14px; }
.notice.danger { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); color: var(--danger); }
.notice.success { background: color-mix(in srgb, var(--success) 10%, var(--surface)); color: var(--success); }
.installer { display: grid; place-items: center; padding: 30px; }
.installer-card { margin: 4vh auto; }

@media (max-width: 1050px) {
    :root { --sidebar: 82px; }
    .brand-lockup span:last-child, .nav-item:not(.nav-button) { font-size: 0; }
    .nav-item span { font-size: 18px; }
    .nav-item { justify-content: center; }
    .topbar { grid-template-columns: var(--sidebar) minmax(240px, 1fr) auto; }
    .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .span-2 { grid-column: span 2; }
    .mission-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    :root { --topbar: 68px; }
    .workspace-shell { display: block; padding-bottom: 76px; }
    .topbar { grid-template-columns: auto 1fr auto; height: var(--topbar); padding: 0 14px; gap: 12px; }
    .topbar .brand-lockup span:last-child { display: none; }
    .command-trigger span { font-size: 0; }
    .command-trigger span::after { content: "Zoeken…"; font-size: 14px; }
    .command-trigger kbd { display: none; }
    .sidebar {
        position: fixed;
        z-index: 40;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: auto;
        height: 70px;
        padding: 8px;
        border-right: 0;
        border-top: 1px solid var(--line);
    }
    .sidebar nav { grid-template-columns: repeat(5, 1fr); }
    .sidebar nav .nav-item:nth-child(n+6), .sidebar-footer { display: none; }
    .nav-item { min-height: 52px; }
    .main-content { padding: 24px 16px; }
    .hero-row { align-items: flex-start; flex-direction: column; }
    .hero-row .button { width: 100%; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .span-2 { grid-column: span 1; }
    .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .login-layout { grid-template-columns: 1fr; }
    .login-visual { min-height: 34vh; padding: 32px 24px; }
    .login-copy h1 { font-size: 42px; margin-top: 28px; }
    .login-copy p { font-size: 16px; }
    .login-panel { padding: 20px 14px; }
    .floating-action { bottom: 88px; right: 18px; }
}
@import url('/assets/css/sprint2.css?v=2.0');

/* Foundation Build 18.1: account navigation and real button states */
.topbar-actions{position:relative}
.account-menu{position:absolute;right:0;top:calc(100% + 12px);z-index:80;min-width:250px;padding:10px;background:var(--surface,#fff);border:1px solid var(--border,#e5e7eb);border-radius:16px;box-shadow:0 18px 45px rgba(15,23,42,.18)}
.account-menu[hidden]{display:none!important}
.account-menu-user{display:flex;flex-direction:column;gap:2px;padding:10px 12px 12px;border-bottom:1px solid var(--border,#e5e7eb);margin-bottom:6px}
.account-menu-user small{color:var(--muted,#64748b);overflow-wrap:anywhere}
.account-menu>a{display:flex;align-items:center;min-height:40px;padding:8px 12px;border-radius:10px;color:inherit;text-decoration:none;font-weight:650}
.account-menu>a:hover,.account-menu>a:focus-visible{background:var(--soft,#f1f5f9)}
.account-menu hr{border:0;border-top:1px solid var(--border,#e5e7eb);margin:6px 0}
.button[href]{text-decoration:none}
.drag-handle{display:inline-flex;align-items:center;justify-content:center;cursor:grab;user-select:none}


/* Foundation Build 18.2: universal page navigation */
.global-nav-open{overflow:hidden}
.global-nav-top-button{font-size:19px;font-weight:800}
.global-nav-overlay{position:fixed;inset:0;z-index:250;display:grid;grid-template-columns:1fr minmax(320px,440px)}
.global-nav-overlay[hidden]{display:none!important}
.global-nav-backdrop{grid-column:1;background:rgba(5,10,18,.58);border:0;backdrop-filter:blur(7px);cursor:default}
.global-nav-drawer{grid-column:2;display:flex;flex-direction:column;min-width:0;height:100vh;background:var(--surface);border-left:1px solid var(--line);box-shadow:-28px 0 70px rgba(15,23,42,.22);overflow:hidden}
.global-nav-header{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px;border-bottom:1px solid var(--line)}
.global-nav-identity{display:flex;align-items:center;gap:12px;min-width:0}.global-nav-identity>span:last-child{display:flex;flex-direction:column;min-width:0}.global-nav-identity small{margin-top:3px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.global-nav-search{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:10px;margin:16px 20px 4px;padding:0 13px;border:1px solid var(--line);border-radius:13px;background:var(--surface-2)}
.global-nav-search input{width:100%;min-height:44px;padding:0;border:0;background:transparent;box-shadow:none!important}
.global-nav-sections{flex:1;overflow:auto;padding:8px 20px 22px}.global-nav-section{margin-top:18px}.global-nav-section h2{margin:0 0 9px;color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.09em}
.global-nav-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.global-nav-link{display:flex;align-items:center;gap:10px;min-height:48px;padding:10px 11px;border:1px solid transparent;border-radius:12px;background:var(--surface-2);text-decoration:none}.global-nav-link>span{display:grid;place-items:center;width:28px;height:28px;border-radius:9px;background:var(--surface);border:1px solid var(--line);font-size:14px}.global-nav-link strong{font-size:13px}.global-nav-link:hover,.global-nav-link:focus-visible{border-color:color-mix(in srgb,var(--accent) 48%,var(--line));transform:translateY(-1px)}.global-nav-link.active{border-color:color-mix(in srgb,var(--accent) 55%,var(--line));background:color-mix(in srgb,var(--accent) 9%,var(--surface))}
.global-nav-footer{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;padding:16px 20px;border-top:1px solid var(--line);background:var(--surface-2)}.global-nav-footer>a{display:flex;flex-direction:column;min-width:0}.global-nav-footer>a strong,.global-nav-footer>a small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.global-nav-footer>a small{margin-top:3px;color:var(--muted)}.global-nav-footer form{margin:0}.global-nav-footer button{min-height:38px;padding:0 13px;border:1px solid var(--line);border-radius:10px;background:var(--surface);cursor:pointer;font-weight:750}
.global-nav-floating-trigger{position:fixed;z-index:190;right:18px;top:16px;display:flex;align-items:center;gap:8px;min-height:42px;padding:0 13px;border:1px solid var(--line);border-radius:13px;background:var(--surface);color:var(--text);box-shadow:var(--shadow);cursor:pointer}.global-nav-floating-trigger span{font-size:18px}.global-nav-floating-trigger strong{font-size:13px}
@media(max-width:760px){.global-nav-overlay{grid-template-columns:1fr}.global-nav-backdrop{grid-column:1;grid-row:1}.global-nav-drawer{grid-column:1;grid-row:1;width:min(92vw,420px);justify-self:end}.global-nav-grid{grid-template-columns:1fr}.global-nav-top-button{display:inline-grid!important}.topbar-actions{gap:6px}.topbar-actions>.icon-button{width:39px;height:39px}}
