/* ---------- Dienst-PC (Windows 11 look) ---------- */

#pc {
    --pc-accent: #005fb8;
    --pc-accent-2: #1975c5;
    --pc-mica: #f3f3f3;
    --pc-card: #fbfbfb;
    --pc-white: #fff;
    --pc-line: #e5e5e5;
    --pc-stroke: #d1d1d1;
    --pc-text: #1a1a1a;
    --pc-muted: #5f5f5f;
    --pc-subtle: rgba(0, 0, 0, 0.0373);
    --pc-red: #c42b1c;
    --pc-green: #0f7b0f;
    --pc-orange: #9d5d00;

    position: absolute;
    inset: 0;
    font-family: 'Segoe UI Variable Text', 'Segoe UI', Tahoma, sans-serif;
    font-size: 14px;
    color: var(--pc-text);
    user-select: none;
    transition: opacity 160ms;
}

#pc.hidden { display: block !important; opacity: 0; pointer-events: none; }

#pc button, #pc input, #pc select, #pc textarea { font: inherit; color: inherit; }
#pc input, #pc select, #pc textarea { user-select: text; }

/* Desktop + wallpaper */

.win-desktop {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background:
        radial-gradient(ellipse 60% 70% at 72% 60%, rgba(0, 120, 212, 0.55), transparent 70%),
        radial-gradient(ellipse 50% 60% at 30% 35%, rgba(92, 165, 230, 0.45), transparent 70%),
        linear-gradient(160deg, #0b2a4a 0%, #0e3a66 45%, #0a2340 100%);
}

/* Patrol car laptop: wallpaper fades out, the game stays visible behind the window */
#pc.in-vehicle .win-desktop {
    background:
        radial-gradient(ellipse 60% 70% at 72% 60%, rgba(0, 120, 212, 0.18), transparent 70%),
        linear-gradient(160deg, rgba(11, 42, 74, 0.38) 0%, rgba(10, 35, 64, 0.32) 100%);
}

#pc.in-vehicle .win-login { background: rgba(8, 24, 44, 0.45); }
#pc.in-vehicle .pc-window { background: rgba(243, 243, 243, 0.9); }
#pc.in-vehicle .pc-main { background: rgba(249, 249, 249, 0.94); }
#pc.in-vehicle .win-taskbar { background: rgba(238, 241, 246, 0.72); }

/* Sign-in screen */

.win-login {
    position: absolute;
    inset: 0 0 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #fff;
    background: rgba(8, 24, 44, 0.55);
    backdrop-filter: blur(24px);
    z-index: 5;
    animation: win-fade 200ms ease-out;
}

.win-login-crest { width: 190px; padding: 10px 14px; border-radius: 8px; background: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3); }
.win-login-state { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.8; margin-bottom: 26px; }

.win-login-avatar {
    width: 96px;
    height: 96px;
    padding: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
}

.win-login b { font-size: 26px; font-weight: 600; margin-top: 6px; }
.win-login-msg { display: flex; align-items: center; gap: 12px; font-size: 15px; margin-top: 18px; }

.win-dots { position: relative; width: 22px; height: 22px; }
.win-dots i {
    position: absolute;
    left: 50%;
    top: 0;
    width: 3px;
    height: 3px;
    margin-left: -1.5px;
    border-radius: 50%;
    background: #fff;
    transform-origin: 1.5px 11px;
    animation: win-orbit 1.6s cubic-bezier(0.5, 0.15, 0.5, 0.85) infinite;
}
.win-dots i:nth-child(2) { animation-delay: 0.12s; }
.win-dots i:nth-child(3) { animation-delay: 0.24s; }
.win-dots i:nth-child(4) { animation-delay: 0.36s; }
.win-dots i:nth-child(5) { animation-delay: 0.48s; }

@keyframes win-orbit { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@keyframes win-fade { from { opacity: 0; } to { opacity: 1; } }

/* Taskbar */

.win-taskbar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(238, 241, 246, 0.86);
    backdrop-filter: blur(30px) saturate(1.4);
    border-top: 1px solid rgba(255, 255, 255, 0.6);
    z-index: 10;
}

.win-tb-apps { display: flex; gap: 4px; }

.win-tb-app {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    display: grid;
    place-items: center;
}

.win-tb-app:hover { background: rgba(255, 255, 255, 0.7); }
.win-tb-app img { width: 26px; height: 26px; }

.win-tb-app::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 6px;
    height: 3px;
    margin-left: -3px;
    border-radius: 2px;
    background: #8a8a8a;
    transition: width 150ms, margin 150ms;
}

.win-tb-app.active { background: rgba(255, 255, 255, 0.7); }
.win-tb-app.active::after { width: 16px; margin-left: -8px; background: var(--pc-accent); }

.win-tray {
    position: absolute;
    right: 8px;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
}

.win-place { color: #333; }
.win-clock { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.3; padding: 0 6px; }

.pc-spin {
    width: 12px;
    height: 12px;
    border: 2px solid rgba(0, 95, 184, 0.25);
    border-top-color: var(--pc-accent);
    border-radius: 50%;
    animation: spin 700ms linear infinite;
    visibility: hidden;
}

.pc-spin.active { visibility: visible; }

/* App window */

.pc-window {
    position: absolute;
    left: 50%;
    top: calc(50% - 24px);
    display: flex;
    flex-direction: column;
    width: min(1240px, 94vw);
    height: min(780px, calc(100vh - 96px));
    transform: translate(-50%, -50%);
    background: var(--pc-mica);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.28), 0 2px 21px rgba(0, 0, 0, 0.22);
    transition: transform 180ms cubic-bezier(0.1, 0.9, 0.2, 1), opacity 140ms;
}

.pc-window.hidden { display: flex !important; opacity: 0; pointer-events: none; transform: translate(-50%, -48%) scale(0.97); }
.pc-window.minimized { opacity: 0; pointer-events: none; transform: translate(-50%, 30%) scale(0.6); }

.pc-window.maximized {
    left: 0;
    top: 0;
    width: 100%;
    height: calc(100% - 48px);
    transform: none;
    border-radius: 0;
    border: 0;
}

.pc-titlebar {
    display: flex;
    align-items: center;
    height: 32px;
    padding-left: 12px;
    flex-shrink: 0;
}

.pc-appicon { width: 16px; height: 16px; margin-right: 10px; }
.pc-apptitle { flex: 1; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-apptitle span { color: var(--pc-muted); margin-left: 4px; }
.pc-apptitle span::before { content: '– '; }

.pc-caption { display: flex; height: 100%; }

.pc-caption button {
    width: 46px;
    height: 100%;
    display: grid;
    place-items: center;
}

.pc-caption button:hover { background: rgba(0, 0, 0, 0.06); }
.pc-caption button.close:hover { background: var(--pc-red); color: #fff !important; }
.pc-caption svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1; }

/* Body: sidebar (like Windows Settings) + content */

.pc-body { flex: 1; display: flex; min-height: 0; }

.pc-side {
    width: 250px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    padding: 4px 8px 12px;
    overflow-y: auto;
}

.pc-side-logo { width: 190px; margin: 6px 10px 14px; }

.pc-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px 14px;
}

.pc-user img { width: 40px; height: 40px; padding: 5px; border-radius: 50%; background: var(--pc-white); border: 1px solid var(--pc-line); }
.pc-user b { display: block; font-size: 14px; font-weight: 600; }
.pc-user small { display: block; font-size: 12px; color: var(--pc-muted); }

.pc-nav button {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    height: 36px;
    padding: 0 12px;
    margin-bottom: 3px;
    border-radius: 4px;
    text-align: left;
}

.pc-nav button:hover { background: var(--pc-subtle); }
.pc-nav button.active { background: rgba(0, 0, 0, 0.055); font-weight: 600; }

.pc-nav button.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    bottom: 9px;
    width: 3px;
    border-radius: 2px;
    background: var(--pc-accent);
}

.pc-nav svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pc-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #f9f9f9;
    border-top: 1px solid var(--pc-line);
    border-left: 1px solid var(--pc-line);
    border-top-left-radius: 8px;
}

.pc-head {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 20px 32px 10px;
    flex-shrink: 0;
}

.pc-head h2 { font-size: 28px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pc-back { width: 32px; height: 32px; border-radius: 4px; display: grid; place-items: center; }
.pc-back:hover { background: var(--pc-subtle); }
.pc-back svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; }

.pc-view { flex: 1; overflow-y: auto; padding: 6px 32px 28px; }
.pc-view::-webkit-scrollbar { width: 6px; }
.pc-view::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.3); border-radius: 3px; }

/* Cards and grid */

.pc-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
}

.pc-card {
    background: var(--pc-white);
    border: 1px solid var(--pc-line);
    border-radius: 6px;
    margin-bottom: 12px;
}

.pc-grid .pc-card { margin-bottom: 0; }
.pc-card.span-2 { grid-column: 1 / -1; }
.pc-card.is-wanted { border-color: #e8a59e; background: #fdf3f2; }

.pc-card > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 44px;
    padding: 6px 16px;
}

.pc-card h3 { font-size: 14px; font-weight: 600; }
.pc-card-b { padding: 0 16px 14px; }
.pc-card > .pc-card-b:first-child { padding-top: 14px; }

.pc-kv {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 7px 0;
    border-bottom: 1px solid #f0f0f0;
}

.pc-kv:last-child { border-bottom: 0; }
.pc-kv span { color: var(--pc-muted); flex-shrink: 0; }
.pc-kv b { font-weight: 400; text-align: right; word-break: break-word; }

.pc-name { font-size: 20px; font-weight: 600; margin-bottom: 6px; }
.pc-empty { padding: 8px 0; color: var(--pc-muted); }
.pc-hint { margin: -4px 0 14px; color: var(--pc-muted); font-size: 12px; }
.pc-card .pc-hint { margin: 8px 0 0; }
.pc-text { white-space: pre-wrap; word-break: break-word; line-height: 1.5; }
.pc-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; font-size: 12px; color: var(--pc-muted); }

.pc-note { padding: 8px 0; border-bottom: 1px solid #f0f0f0; }
.pc-note:first-child { padding-top: 0; }
.pc-note:last-child { border-bottom: 0; }

.pc-row-btns { display: flex; gap: 8px; margin-top: 10px; }

#pc .red { color: var(--pc-red) !important; }
#pc .green { color: var(--pc-green) !important; }
#pc .orange { color: var(--pc-orange) !important; }

/* InfoBar (error severity) */
.pc-alert {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 16px 10px 44px;
    margin-bottom: 12px;
    border: 1px solid #f1c3bd;
    border-radius: 4px;
    background: #fde7e9 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='8' fill='%23c42b1c'/%3E%3Cpath d='M5.5 5.5l5 5M10.5 5.5l-5 5' stroke='white' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat 16px 12px / 16px;
}

.pc-alert b { font-weight: 600; }
.pc-alert span { font-size: 13px; color: #3b3b3b; }

/* Buttons */

.pc-btn {
    height: 32px;
    padding: 0 12px;
    border: 1px solid var(--pc-stroke) !important;
    border-bottom-color: #b7b7b7 !important;
    border-radius: 4px;
    background: var(--pc-card) !important;
    color: var(--pc-text) !important;
    white-space: nowrap;
    text-align: center;
    flex-shrink: 0;
}

.pc-btn:hover { background: #f6f6f6 !important; }
.pc-btn:active { background: #f0f0f0 !important; color: var(--pc-muted) !important; }
.pc-btn.primary { background: var(--pc-accent) !important; border-color: #0051a1 !important; border-bottom-color: #003e7a !important; color: #fff !important; }
.pc-btn.primary:hover { background: var(--pc-accent-2) !important; }
.pc-btn.danger { color: var(--pc-red) !important; }
.pc-btn.ghost { border-color: transparent !important; background: transparent !important; }
.pc-btn.ghost:hover { background: var(--pc-subtle) !important; }
.pc-btn.small { height: 28px; padding: 0 10px; font-size: 13px; }

.pc-link { color: var(--pc-accent) !important; font-size: 12px; }
.pc-link:hover { text-decoration: underline; }
.pc-link.danger { color: var(--pc-red) !important; }

.pc-badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 10px;
    background: #ececec;
    color: var(--pc-muted);
    font-size: 12px;
    white-space: nowrap;
    vertical-align: middle;
}

.pc-badge.red { background: #fde7e9; color: var(--pc-red) !important; }
.pc-badge.blue { background: #e0eef9; color: var(--pc-accent); }
.pc-badge.st-draft { background: #fff4ce; color: var(--pc-orange); }
.pc-badge.st-closed { background: #dff6dd; color: var(--pc-green); }
.pc-badge.st-archived { background: #ececec; color: var(--pc-muted); }

/* Forms (Fluent text boxes) */

.pc-toolbar {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.pc-field { display: flex; flex-direction: column; gap: 6px; min-width: 150px; }
.pc-field.wide { flex: 1; min-width: 220px; }
.pc-field > span:first-child { font-size: 13px; }

#pc input:not([type="checkbox"]), #pc select, #pc textarea {
    width: 100%;
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--pc-line);
    border-bottom: 1px solid #8a8a8a;
    border-radius: 4px;
    background: var(--pc-white);
    outline: none;
}

#pc input:hover, #pc select:hover, #pc textarea:hover { background: #f9f9f9; }
#pc input:focus, #pc select:focus, #pc textarea:focus { background: #fff; border-bottom: 2px solid var(--pc-accent); }
#pc input::placeholder, #pc textarea::placeholder { color: #8a8a8a; }
#pc input.upper { text-transform: uppercase; }
#pc input.upper::placeholder { text-transform: none; }
#pc textarea { height: 110px; padding: 7px 10px; resize: vertical; line-height: 1.5; }
#pc textarea.tall { height: 220px; }
#pc input.pc-count { width: 58px; height: 28px; padding: 0 6px; }

.pc-check { display: flex; align-items: center; gap: 8px; height: 32px; cursor: pointer; }
.pc-check input { width: 18px; height: 18px; accent-color: var(--pc-accent); }

.pc-form { display: flex; flex-direction: column; gap: 12px; }
.pc-form.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.pc-form.cols .wide { grid-column: 1 / -1; }

.pc-inline { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.pc-field .pc-inline { margin-top: 0; }

.pc-chips { display: flex; flex-wrap: wrap; gap: 6px; }

.pc-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 4px 2px 10px;
    border: 1px solid var(--pc-line);
    border-radius: 12px;
    background: #f5f5f5;
    font-size: 12px;
}

.pc-chip button { width: 18px; height: 18px; border-radius: 50%; color: var(--pc-muted) !important; text-align: center; line-height: 1; }
.pc-chip button:hover { background: #e2e2e2; }

.pc-results {
    margin-top: 8px;
    border: 1px solid var(--pc-line);
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    background: var(--pc-white);
}

.pc-results button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border-bottom: 1px solid #f0f0f0;
    text-align: left;
}

.pc-results button:hover { background: #f5f5f5; }
.pc-results button span { color: var(--pc-muted); font-size: 12px; flex: 1; }

.pc-editor .pc-card { margin-bottom: 12px; }
.pc-editor-btns { display: flex; justify-content: flex-end; gap: 8px; padding: 4px 0 10px; }

/* Tables (list view) */

.pc-table, .pc-doc-table { width: 100%; border-collapse: collapse; }
.pc-table th { padding: 6px 8px; font-size: 12px; font-weight: 400; text-align: left; color: var(--pc-muted); border-bottom: 1px solid var(--pc-line); }
.pc-table td, .pc-doc-table td { padding: 7px 8px; border-bottom: 1px solid #f3f3f3; vertical-align: middle; }
.pc-table tr:last-child td, .pc-doc-table tr:last-child td { border-bottom: 0; }
.pc-table tbody tr:not(.static), .pc-doc-table tr[data-link] { cursor: pointer; }
.pc-table tbody tr:not(.static):hover, .pc-doc-table tr[data-link]:hover { background: #f5f5f5; }
.pc-doc-table select { width: auto !important; height: 28px !important; }
.pc-doc-table th { padding: 4px 8px; font-size: 11px; font-weight: 400; text-align: left; color: var(--pc-muted); border-bottom: 1px solid var(--pc-line); }
.pc-doc-table tfoot td { border-top: 1px solid #999; font-weight: 600; }

#pc td.grow { width: 100%; }
#pc .nowrap { white-space: nowrap; }
#pc .mono { font-family: Consolas, 'Cascadia Mono', 'Courier New', monospace; font-size: 13px; white-space: nowrap; }

/* Tabs (pivot) */

.pc-tabs { display: flex; gap: 2px; margin-bottom: 14px; }
.pc-tabs button { position: relative; padding: 8px 12px; color: var(--pc-muted) !important; border-radius: 4px; }
.pc-tabs button:hover { background: var(--pc-subtle); color: var(--pc-text) !important; }
.pc-tabs button.active { color: var(--pc-text) !important; font-weight: 600; }
.pc-tabs button.active::after { content: ''; position: absolute; left: 50%; bottom: 0; width: 16px; height: 3px; margin-left: -8px; border-radius: 2px; background: var(--pc-accent); }

/* Dashboard */

.pc-welcome { font-size: 15px; margin-bottom: 14px; color: var(--pc-muted); }
.pc-welcome small { margin-left: 6px; }
.pc-welcome small::before { content: '· '; }

.pc-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 14px; }

.pc-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid var(--pc-line);
    border-radius: 6px;
    background: var(--pc-white);
    text-align: left;
}

.pc-stat:hover { background: #f9f9f9; }
.pc-stat b { font-size: 28px; font-weight: 600; line-height: 1.1; }
.pc-stat span { font-size: 12px; color: var(--pc-muted); }
.pc-stat.red b { color: var(--pc-red); }
.pc-stat.orange b { color: var(--pc-orange); }

.pc-quick { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }

.pc-bulletin { padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.pc-bulletin:first-child { padding-top: 0; }
.pc-bulletin:last-child { border-bottom: 0; }
.pc-bulletin b { display: block; margin-bottom: 2px; font-weight: 600; }
.pc-bulletin.high b { color: var(--pc-red); }
.pc-bulletin.big { padding: 14px 16px; margin-bottom: 10px; border: 1px solid var(--pc-line); border-radius: 6px; background: var(--pc-white); }
.pc-bulletin.big.high { border-color: #f1c3bd; background: #fdf3f2; }

/* Report as an official document (Word-like page) */

.pc-doc-tools { display: flex; gap: 8px; margin-bottom: 14px; }

.pc-doc {
    max-width: 820px;
    padding: 40px 56px 48px;
    background: #fff;
    border: 1px solid #dadada;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    font-family: Arial, 'Segoe UI', sans-serif;
    font-size: 13.5px;
}

.pc-doc-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 14px;
    border-bottom: 1px solid #222;
}

.pc-doc-crest { display: flex; align-items: center; gap: 14px; }
.pc-doc-crest img { width: 78px; }
.pc-doc-crest small { display: block; font-size: 11px; color: #444; }
.pc-doc-crest b { display: block; font-size: 17px; margin: 1px 0; }

.pc-doc-head small { display: block; font-size: 11px; color: #555; }
.pc-doc-file { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.pc-doc-type { margin-top: 22px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: #555; }
.pc-doc-title { margin: 2px 0 12px; font-size: 20px; }
.pc-doc-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; margin-bottom: 6px; }
.pc-doc h4 { margin: 20px 0 6px; padding-bottom: 3px; border-bottom: 1px solid #bbb; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }

.pc-plate-big { padding: 6px 0 10px; }

.pc-linkrow { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 0; text-align: left; }
button.pc-linkrow b { color: var(--pc-accent); }
.pc-linkrow span { color: var(--pc-muted); font-size: 12px; flex: 1; }

/* ContentDialog */

.pc-dialog-bg {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    z-index: 20;
}

.pc-dialog {
    width: 460px;
    max-height: 85%;
    overflow-y: auto;
    background: var(--pc-white);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.19), 0 2px 21px rgba(0, 0, 0, 0.15);
    animation: pc-pop 160ms cubic-bezier(0.1, 0.9, 0.2, 1);
}

@keyframes pc-pop { from { transform: scale(1.05); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.pc-dialog h3 { padding: 24px 24px 12px; font-size: 20px; font-weight: 600; }
.pc-dialog-text { white-space: pre-line; padding: 0 24px 12px; line-height: 1.5; user-select: text; }
.pc-dialog .pc-form { padding: 0 24px 16px; }

.pc-dialog-btns {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 20px 24px;
    background: #f3f3f3;
    border-top: 1px solid var(--pc-line);
}

.pc-dialog-btns .pc-btn { min-width: 110px; }
.pc-dialog-btns .pc-btn.ghost { border: 1px solid var(--pc-stroke) !important; background: var(--pc-card) !important; }

/* Toast (Windows notification style, bottom right) */

.pc-toast {
    position: absolute;
    right: 16px;
    bottom: 16px;
    min-width: 260px;
    padding: 12px 16px 12px 18px;
    border: 1px solid var(--pc-line);
    border-left: 4px solid var(--pc-accent);
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
    transform: translateX(20px);
    opacity: 0;
    transition: transform 160ms, opacity 160ms;
    pointer-events: none;
    z-index: 30;
}

.pc-toast.show { transform: translateX(0); opacity: 1; }
.pc-toast.error { border-left-color: var(--pc-red); }
.pc-toast.success { border-left-color: var(--pc-green); }

@media (max-width: 1150px) {
    .pc-stats { grid-template-columns: repeat(3, 1fr); }
    .pc-side { width: 210px; }
    .pc-side-logo { width: 160px; }
}

@media (prefers-reduced-motion: reduce) {
    #pc, .pc-window, .pc-dialog, .pc-toast, .win-login, .win-dots i { transition: none; animation: none; }
}

/* ---------- Desktop apps: Notizen, Taschenrechner ---------- */

.pc-window { z-index: 1; }
.win-taskbar { z-index: 9999; }

.win-tb-app svg { width: 24px; height: 24px; fill: none; stroke: var(--pc-accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.win-tb-app.idle::after { display: none; }

.win-mini {
    position: absolute;
    display: flex;
    flex-direction: column;
    background: var(--pc-mica);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.26), 0 2px 16px rgba(0, 0, 0, 0.2);
    transition: opacity 140ms, transform 160ms cubic-bezier(0.1, 0.9, 0.2, 1);
}

.win-mini.minimized { opacity: 0; pointer-events: none; transform: translateY(40%) scale(0.6); }
.win-mini.notes { width: 520px; height: 440px; }
.win-mini.calc { width: 320px; height: 470px; }

.win-mini-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 32px;
    padding-left: 12px;
    flex-shrink: 0;
    font-size: 12px;
    cursor: default;
}

.win-mini-bar > svg { width: 16px; height: 16px; fill: none; stroke: var(--pc-accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.win-mini-bar > span { flex: 1; }

#notes-text {
    flex: 1;
    margin: 0 4px;
    padding: 12px 14px;
    resize: none;
    border: 1px solid var(--pc-line);
    border-radius: 4px 4px 0 0;
    background: var(--pc-white);
    font-family: Consolas, 'Cascadia Mono', monospace;
    font-size: 14px;
    line-height: 1.5;
    outline: none;
}

.win-mini-status { display: flex; justify-content: space-between; padding: 5px 12px; font-size: 12px; color: var(--pc-muted); }

.pcalc-screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-end;
    padding: 8px 16px 12px;
    overflow: hidden;
}

.pcalc-screen small { min-height: 18px; font-size: 13px; color: var(--pc-muted); }
.pcalc-screen b { font-size: 42px; font-weight: 600; white-space: nowrap; }

.pcalc-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; padding: 0 4px 4px; }

.pcalc-keys button {
    display: grid;
    place-items: center;
    height: 52px;
    border-radius: 4px;
    background: var(--pc-white);
    border: 1px solid var(--pc-line);
    font-size: 18px;
}

.pcalc-keys button:hover { background: #f6f6f6; }
.pcalc-keys button.fn { background: var(--pc-card); font-size: 15px; }
.pcalc-keys button.op { background: #f9f9f9; }
.pcalc-keys button[data-k="="] { background: var(--pc-accent); border-color: #0051a1; color: #fff !important; }
.pcalc-keys button[data-k="="]:hover { background: var(--pc-accent-2); }

/* Logs */

.pc-table td.details { max-width: 420px; white-space: pre-wrap; word-break: break-word; color: var(--pc-muted); font-size: 12px; }

/* Bürgerdienste */
.svc-lic {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px solid #f0f0f0;
}
.svc-lic span { color: var(--pc-muted); flex: 1; }
.svc-lic .pc-link { margin-left: 4px; }
.svc-clean { color: var(--pc-green); font-weight: 600; }

/* ======================================================================
   Wallpaper (Einstellungen > Hintergrund)
   ====================================================================== */

.win-wall {
    position: absolute;
    inset: 0 0 48px;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.win-wall img { max-width: 62vw; max-height: 58vh; object-fit: contain; user-select: none; }
.win-wall span { display: none; }

/* Landespolizei-Logo: light, like the official letterhead */
#pc[data-wall="logo"] .win-desktop {
    background:
        radial-gradient(ellipse 70% 60% at 50% 45%, #ffffff 0%, rgba(255, 255, 255, 0) 70%),
        linear-gradient(170deg, #f4f8fc 0%, #dfe9f4 55%, #c8d8ea 100%);
}
#pc[data-wall="logo"] .win-wall { display: flex; }
#pc[data-wall="logo"] .win-wall img { width: min(760px, 62vw); filter: drop-shadow(0 6px 18px rgba(0, 60, 120, 0.12)); }

/* Polizeistern on dark blue */
#pc[data-wall="star"] .win-desktop {
    background:
        radial-gradient(circle at 50% 46%, rgba(76, 160, 230, 0.45) 0%, rgba(11, 42, 74, 0) 42%),
        linear-gradient(160deg, #081c33 0%, #0c2f55 50%, #071a30 100%);
}
#pc[data-wall="star"] .win-wall { display: flex; flex-direction: column; gap: 18px; }
#pc[data-wall="star"] .win-wall img { width: min(380px, 34vh); filter: drop-shadow(0 10px 40px rgba(0, 0, 0, 0.45)); }
#pc[data-wall="star"] .win-wall span { display: block; color: #fff; font-size: 22px; font-weight: 300; letter-spacing: 0.32em; text-transform: uppercase; opacity: 0.85; }

/* Patrol car: no wallpaper, the game stays visible */
#pc.in-vehicle .win-wall { display: none !important; }
#pc.in-vehicle[data-wall] .win-desktop {
    background:
        radial-gradient(ellipse 60% 70% at 72% 60%, rgba(0, 120, 212, 0.18), transparent 70%),
        linear-gradient(160deg, rgba(11, 42, 74, 0.38) 0%, rgba(10, 35, 64, 0.32) 100%);
}

/* ======================================================================
   Accent colours and font size (Einstellungen)
   ====================================================================== */

#pc[data-accent="navy"]   { --pc-accent: #1f3a8a; --pc-accent-2: #2f4fa8; }
#pc[data-accent="teal"]   { --pc-accent: #00796b; --pc-accent-2: #138a7c; }
#pc[data-accent="green"]  { --pc-accent: #107c10; --pc-accent-2: #2a8f2a; }
#pc[data-accent="purple"] { --pc-accent: #6b2fb3; --pc-accent-2: #7d45c2; }
#pc[data-accent="orange"] { --pc-accent: #b35300; --pc-accent-2: #c86410; }

#pc:not([data-accent="blue"]) .pc-btn.primary,
#pc:not([data-accent="blue"]) .pcalc-keys button[data-k="="] { border-color: transparent !important; }

.pc-view { zoom: var(--pc-zoom, 1); }

/* ======================================================================
   Dark theme (Einstellungen > Darstellung)
   ====================================================================== */

#pc[data-theme="dark"] {
    --pc-mica: #202020;
    --pc-card: #2d2d2d;
    --pc-white: #2b2b2b;
    --pc-line: #3b3b3b;
    --pc-stroke: #474747;
    --pc-text: #f3f3f3;
    --pc-muted: #ababab;
    --pc-subtle: rgba(255, 255, 255, 0.06);
    --pc-red: #ff99a4;
    --pc-green: #6ccb5f;
    --pc-orange: #fce100;
    --pc-accent: #4cc2ff;
    --pc-accent-2: #6fd0ff;
    color-scheme: dark;
}
#pc[data-theme="dark"][data-accent="navy"]   { --pc-accent: #8fa8ff; --pc-accent-2: #a7bbff; }
#pc[data-theme="dark"][data-accent="teal"]   { --pc-accent: #4fd1c0; --pc-accent-2: #72dccd; }
#pc[data-theme="dark"][data-accent="green"]  { --pc-accent: #6ccb5f; --pc-accent-2: #86d67b; }
#pc[data-theme="dark"][data-accent="purple"] { --pc-accent: #c5a3ff; --pc-accent-2: #d3b8ff; }
#pc[data-theme="dark"][data-accent="orange"] { --pc-accent: #ffa35a; --pc-accent-2: #ffb67a; }

#pc[data-theme="dark"] .pc-main { background: #272727; }
#pc[data-theme="dark"] .pc-nav button.active { background: rgba(255, 255, 255, 0.07); }
#pc[data-theme="dark"] .pc-caption button:hover { background: rgba(255, 255, 255, 0.08); }
#pc[data-theme="dark"] .pc-view::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.25); }
#pc[data-theme="dark"] .pc-btn { border-bottom-color: #3a3a3a !important; }
#pc[data-theme="dark"] .pc-btn:hover { background: #353535 !important; }
#pc[data-theme="dark"] .pc-btn:active { background: #2a2a2a !important; }
#pc[data-theme="dark"] .pc-btn.primary,
#pc[data-theme="dark"] .pcalc-keys button[data-k="="] { color: #000 !important; border-color: transparent !important; }
#pc[data-theme="dark"] input:not([type="checkbox"]), #pc[data-theme="dark"] select, #pc[data-theme="dark"] textarea { border-bottom-color: #9a9a9a; }
#pc[data-theme="dark"] input:hover, #pc[data-theme="dark"] select:hover, #pc[data-theme="dark"] textarea:hover { background: #323232; }
#pc[data-theme="dark"] input:focus, #pc[data-theme="dark"] select:focus, #pc[data-theme="dark"] textarea:focus { background: #1f1f1f; }
#pc[data-theme="dark"] .pc-table td, #pc[data-theme="dark"] .pc-doc-table td,
#pc[data-theme="dark"] .pc-kv, #pc[data-theme="dark"] .pc-note, #pc[data-theme="dark"] .pc-bulletin,
#pc[data-theme="dark"] .svc-lic, #pc[data-theme="dark"] .pc-results button { border-bottom-color: #353535; }
#pc[data-theme="dark"] .pc-table tbody tr:not(.static):hover,
#pc[data-theme="dark"] .pc-doc-table tr[data-link]:hover,
#pc[data-theme="dark"] .pc-results button:hover,
#pc[data-theme="dark"] .pc-stat:hover,
#pc[data-theme="dark"] .pcalc-keys button:hover { background: #333; }
#pc[data-theme="dark"] .pcalc-keys button.op { background: #303030; }
#pc[data-theme="dark"] .pc-chip { background: #333; }
#pc[data-theme="dark"] .pc-chip button:hover { background: #444; }
#pc[data-theme="dark"] .pc-badge { background: #3a3a3a; }
#pc[data-theme="dark"] .pc-badge.red { background: #442726; }
#pc[data-theme="dark"] .pc-badge.blue { background: #1b3a52; }
#pc[data-theme="dark"] .pc-badge.st-draft { background: #433519; }
#pc[data-theme="dark"] .pc-badge.st-closed { background: #213a1f; }
#pc[data-theme="dark"] .pc-badge.st-archived { background: #3a3a3a; }
#pc[data-theme="dark"] .pc-card.is-wanted, #pc[data-theme="dark"] .pc-bulletin.big.high { border-color: #6b3330; background: #3a2422; }
#pc[data-theme="dark"] .pc-alert { border-color: #6b3330; background-color: #442726; }
#pc[data-theme="dark"] .pc-alert span { color: #d8d8d8; }
#pc[data-theme="dark"] .pc-dialog { border-color: rgba(255, 255, 255, 0.08); }
#pc[data-theme="dark"] .pc-dialog-btns { background: #202020; }
#pc[data-theme="dark"] .pc-toast { background: #2b2b2b; }
#pc[data-theme="dark"] .win-taskbar { background: rgba(32, 32, 32, 0.88); border-top-color: rgba(255, 255, 255, 0.08); color: #f3f3f3; }
#pc[data-theme="dark"] .win-tb-app:hover, #pc[data-theme="dark"] .win-tb-app.active { background: rgba(255, 255, 255, 0.09); }
#pc[data-theme="dark"] .win-place { color: #ddd; }
#pc[data-theme="dark"] .pc-window, #pc[data-theme="dark"] .win-mini { border-color: rgba(255, 255, 255, 0.1); }
#pc[data-theme="dark"].in-vehicle .pc-window { background: rgba(32, 32, 32, 0.92); }
#pc[data-theme="dark"].in-vehicle .pc-main { background: rgba(39, 39, 39, 0.95); }
#pc[data-theme="dark"].in-vehicle .win-taskbar { background: rgba(32, 32, 32, 0.75); }

/* Paper documents stay white in the dark theme */
#pc[data-theme="dark"] .pc-doc {
    --pc-text: #1a1a1a;
    --pc-muted: #5f5f5f;
    --pc-line: #e5e5e5;
    --pc-white: #fff;
    --pc-red: #c42b1c;
    --pc-green: #0f7b0f;
    --pc-orange: #9d5d00;
    --pc-accent: #005fb8;
    color: #1a1a1a;
    color-scheme: light;
}
#pc[data-theme="dark"] .pc-doc .pc-badge { background: #ececec; }
#pc[data-theme="dark"] .pc-doc .pc-badge.red { background: #fde7e9; }
#pc[data-theme="dark"] .pc-doc .pc-badge.st-draft { background: #fff4ce; }
#pc[data-theme="dark"] .pc-doc .pc-badge.st-closed { background: #dff6dd; }
#pc[data-theme="dark"] .pc-doc .pc-doc-table td { border-bottom-color: #f3f3f3; }
#pc[data-theme="dark"] .pc-doc .pc-doc-table tr[data-link]:hover { background: #f5f5f5; }

/* ======================================================================
   Report search: text snippet under the subject
   ====================================================================== */

.pc-snippet { display: block; margin-top: 2px; font-size: 12px; color: var(--pc-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 520px; }

/* ======================================================================
   Photos and evidence
   ====================================================================== */

.pc-evidence { max-width: 820px; margin-top: 14px; }

.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }

.ev-tile {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--pc-line);
    border-radius: 6px;
    background: var(--pc-card);
    text-align: left;
    transition: border-color 120ms, box-shadow 120ms;
}
.ev-tile:hover { border-color: var(--pc-accent); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12); }
.ev-thumb { aspect-ratio: 4 / 3; display: grid; place-items: center; background: #1c1c1c; }
.ev-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ev-tile b { padding: 6px 8px 0; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-tile small { padding: 0 8px 7px; font-size: 11px; color: var(--pc-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ev-drop {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    padding: 12px;
    border: 1px dashed var(--pc-stroke);
    border-radius: 6px;
    color: var(--pc-muted);
    font-size: 12px;
    text-align: center;
}
.ev-drop.over { border-color: var(--pc-accent); color: var(--pc-accent); background: var(--pc-subtle); }

/* Image viewer */
.ev-viewer {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    background: rgba(10, 10, 10, 0.92);
    color: #fff;
    z-index: 30;
    animation: win-fade 140ms ease-out;
}
.ev-viewer header { display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
.ev-viewer header div { flex: 1; min-width: 0; }
.ev-viewer header b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-viewer header small { font-size: 12px; opacity: 0.7; }
.ev-viewer .pc-btn { height: 30px; }
.ev-stage { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; padding: 0 64px 18px; }
.ev-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 2px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); }
.ev-nav {
    position: absolute;
    top: 50%;
    width: 44px;
    height: 44px;
    margin-top: -22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    display: grid;
    place-items: center;
}
.ev-nav:hover { background: rgba(255, 255, 255, 0.22); }
.ev-nav.prev { left: 12px; }
.ev-nav.next { right: 12px; }
.ev-nav svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ev-x { width: 36px; height: 30px; border-radius: 4px; display: grid; place-items: center; }
.ev-x:hover { background: rgba(255, 255, 255, 0.12); }
.ev-x svg { width: 12px; height: 12px; fill: none; stroke: #fff; stroke-width: 1.4; }

/* ======================================================================
   Statistics
   ====================================================================== */

.pc-stats.st-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pc-stats.st-kpis .pc-stat { cursor: default; }
.pc-stats.st-kpis .pc-stat:hover { background: var(--pc-white); }

.st-chart { position: relative; padding-top: 18px; }
.st-max { position: absolute; top: 0; left: 0; font-size: 11px; color: var(--pc-muted); }
.st-cols {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 170px;
    border-bottom: 1px solid var(--pc-stroke);
    border-top: 1px dashed var(--pc-line);
}
.st-col { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; }
.st-col i { display: block; width: 100%; min-height: 1px; border-radius: 4px 4px 0 0; background: var(--pc-accent); opacity: 0.85; transition: opacity 100ms; }
.st-col i.zero { background: var(--pc-line); opacity: 1; }
.st-col:hover i { opacity: 1; }
.st-col::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    border-radius: 4px;
    background: #1f1f1f;
    color: #fff;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    z-index: 2;
}
.st-col:hover::after { opacity: 1; }
.st-axis { display: flex; gap: 2px; margin-top: 4px; font-size: 11px; color: var(--pc-muted); }
.st-axis span { flex: 1; text-align: center; white-space: nowrap; overflow: visible; }

.st-bars { display: flex; flex-direction: column; gap: 8px; }
.st-bar { display: grid; grid-template-columns: minmax(0, 42%) 1fr auto; align-items: center; gap: 10px; font-size: 13px; }
.st-bar > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-bar > div { height: 10px; border-radius: 0 4px 4px 0; background: var(--pc-subtle); overflow: hidden; }
.st-bar > div i { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--pc-accent); }
.st-bar > b { min-width: 28px; text-align: right; font-variant-numeric: tabular-nums; }

/* ======================================================================
   Einstellungen (settings app)
   ====================================================================== */

.win-mini.settings { width: 560px; height: 600px; }
.set-body { flex: 1; overflow-y: auto; padding: 4px 16px 16px; }
.set-body::-webkit-scrollbar { width: 6px; }
.set-body::-webkit-scrollbar-thumb { background: rgba(127, 127, 127, 0.4); border-radius: 3px; }

.set-group { margin-top: 14px; }
.set-group > h4 { margin: 0 0 8px; font-size: 14px; font-weight: 600; }

.set-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    margin-bottom: 4px;
    border: 1px solid var(--pc-line);
    border-radius: 6px;
    background: var(--pc-white);
}
.set-row > div:first-child { flex: 1; min-width: 0; }
.set-row b { display: block; font-weight: 400; }
.set-row small { display: block; font-size: 12px; color: var(--pc-muted); }
#pc .set-row select { width: 170px; }
.set-row.wall { flex-direction: column; align-items: stretch; }

.set-seg { display: flex; border: 1px solid var(--pc-stroke); border-radius: 4px; overflow: hidden; flex-shrink: 0; }
.set-seg button { padding: 5px 12px; font-size: 13px; }
.set-seg button + button { border-left: 1px solid var(--pc-stroke); }
.set-seg button:hover { background: var(--pc-subtle); }
.set-seg button.active { background: var(--pc-accent); color: #fff !important; }
#pc[data-theme="dark"] .set-seg button.active { color: #000 !important; }

.set-swatches { display: flex; gap: 8px; flex-shrink: 0; }
.set-swatches button { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; box-shadow: inset 0 0 0 2px var(--pc-white); }
.set-swatches button.active { border-color: var(--pc-text); }

.set-walls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.set-walls button { display: flex; flex-direction: column; gap: 6px; font-size: 12px; text-align: center; color: var(--pc-muted) !important; }
.set-walls button i { display: grid; place-items: center; height: 78px; border-radius: 6px; border: 2px solid var(--pc-line); overflow: hidden; }
.set-walls button i img { max-width: 80%; max-height: 70%; }
.set-walls button.active i { border-color: var(--pc-accent); }
.set-walls button.active { color: var(--pc-text) !important; font-weight: 600; }
.set-walls .w-logo { background: linear-gradient(170deg, #f4f8fc, #c8d8ea); }
.set-walls .w-star { background: radial-gradient(circle at 50% 46%, rgba(76, 160, 230, 0.5), transparent 55%), linear-gradient(160deg, #081c33, #0c2f55); }
.set-walls .w-classic { background: radial-gradient(ellipse 60% 70% at 72% 60%, rgba(0, 120, 212, 0.55), transparent 70%), linear-gradient(160deg, #0b2a4a, #0e3a66 45%, #0a2340); }

.set-toggle { position: relative; width: 40px; height: 20px; border-radius: 10px; border: 1px solid var(--pc-muted); flex-shrink: 0; transition: background 120ms; }
.set-toggle::after { content: ''; position: absolute; top: 3px; left: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--pc-muted); transition: left 120ms, background 120ms; }
.set-toggle.on { background: var(--pc-accent); border-color: var(--pc-accent); }
.set-toggle.on::after { left: 23px; background: #fff; }
#pc[data-theme="dark"] .set-toggle.on::after { background: #000; }

.set-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; font-size: 12px; color: var(--pc-muted); }

/* Sidebar logo stays readable in the dark theme */
#pc[data-theme="dark"] .pc-side-logo { padding: 8px 10px; border-radius: 6px; background: #fff; }
.ev-tools { display: flex; gap: 8px; }

/* FAST-ID result on the person page */
.pc-info { display: flex; gap: 12px; align-items: baseline; padding: 10px 14px; margin-bottom: 12px; border: 1px solid #b7dcb3; border-left: 4px solid var(--pc-green); border-radius: 4px; background: #eef8ec; }
.pc-info b { font-weight: 600; }
.pc-info span { font-size: 13px; }
#pc[data-theme="dark"] .pc-info { border-color: #2f5a2b; background: #213a1f; }

/* Bundesfrei: Personalverwaltung, Dienstzeiten, Waffenregister (2026-11-14) */
.pc-stats.hr-kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.pc-stat.muted b { color: var(--pc-muted); font-size: 20px; }
.pc-doc .pc-stats.hr-kpis { margin: 4px 0 12px; }
.pc-doc .pc-stat { padding: 10px 12px; }
.pc-doc .pc-stat b { font-size: 20px; }
.pc-doc-tools.hr-tools { flex-wrap: wrap; }
.pc-doc-tools .hr-sep { width: 1px; margin: 0 6px; background: var(--pc-line); }
.pc-doc-tools .pc-btn.active { border-color: var(--pc-accent); color: var(--pc-accent); }
.pc-alert.warn { border-color: #f3d38a; background: #fff8e6; }
.pc-alert.warn b { color: var(--pc-orange); }
.hr-file .pc-table, .pc-doc .pc-table { margin-bottom: 4px; }
.hr-note { display: block; margin-top: 2px; font-size: 12px; color: var(--pc-muted); }
input[type="date"], input[type="number"] { font: inherit; }

/* Bundesfrei: Benachrichtigungen, Berichtskontrolle, Admin-Menü (2026-11-14) */
.pc-main { position: relative; }
.pc-head h2 { flex: 1; min-width: 0; }
.pc-bell { position: relative; width: 44px; height: 44px; margin-left: auto; border-radius: 4px; display: grid; place-items: center; flex-shrink: 0; }
.pc-bell:hover { background: var(--pc-subtle); }
.pc-bell:focus-visible { outline: 2px solid var(--pc-accent); outline-offset: 2px; }
.pc-bell svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.pc-bell-n { position: absolute; top: 6px; right: 4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--pc-red); color: #fff; font-size: 12px; font-weight: 600; line-height: 18px; text-align: center; }
.pc-bell-n.hidden { display: none; }
.pc-notif { position: absolute; top: 64px; right: 24px; z-index: 30; width: 400px; max-width: calc(100% - 48px); max-height: calc(100% - 88px); display: flex; flex-direction: column;
    background: var(--pc-white); border: 1px solid var(--pc-line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14); animation: pc-notif-in 150ms ease-out; }
@keyframes pc-notif-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.pc-notif.hidden { display: none; }
.pc-notif-head, .pc-notif-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; flex-shrink: 0; }
.pc-notif-head { border-bottom: 1px solid var(--pc-line); }
.pc-notif-head b { font-size: 16px; font-weight: 600; }
.pc-notif-foot { border-top: 1px solid var(--pc-line); justify-content: center; }
.pc-notif-list { overflow-y: auto; }
.pc-notif-list .pc-empty { padding: 16px; }
.pc-notif-list.page { padding: 0; }
.pc-notif-item { position: relative; display: flex; gap: 12px; width: 100%; padding: 12px 32px 12px 16px; text-align: left; border-bottom: 1px solid var(--pc-line); min-height: 44px; }
.pc-notif-item:last-child { border-bottom: 0; }
.pc-notif-item:hover { background: var(--pc-subtle); }
.pc-notif-item.unread { background: #f2f7fc; }
.pc-notif-item.unread:hover { background: #e8f1fa; }
.pc-notif-ic { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: #ececec; color: var(--pc-muted); }
.pc-notif-ic svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pc-notif-ic.green { background: #dff6dd; }
.pc-notif-ic.red { background: #fde7e9; }
.pc-notif-ic.orange { background: #fff4ce; }
.pc-notif-ic.blue { background: #e0eef9; color: var(--pc-accent); }
.pc-notif-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pc-notif-body b { font-weight: 600; line-height: 1.3; }
.pc-notif-body span { font-size: 14px; color: #3b3b3b; line-height: 1.4; overflow-wrap: anywhere; }
.pc-notif-body small { font-size: 12px; color: var(--pc-muted); }
.pc-notif-dot { position: absolute; top: 18px; right: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--pc-accent); }

.pc-badge.st-pending { background: #e0eef9; color: var(--pc-accent); }
.pc-badge.st-revision { background: #fff4ce; color: var(--pc-orange); }
.pc-badge.st-approved { background: #dff6dd; color: var(--pc-green); }
.pc-badge.st-rejected { background: #fde7e9; color: var(--pc-red) !important; }
.pc-info.blue { border-color: #b4d3ee; border-left-color: var(--pc-accent); background: #eef5fc; }
.pc-alert.clickable { cursor: pointer; }
.pc-rv-banner .pc-rv-note { white-space: pre-wrap; font-size: 14px; color: var(--pc-text); padding: 4px 0; }
.pc-review-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 12px;
    border: 1px solid #b4d3ee; border-left: 4px solid var(--pc-accent); border-radius: 4px; background: #eef5fc; }
.pc-review-bar > div:first-child { display: flex; flex-direction: column; gap: 2px; }
.pc-review-bar b { font-weight: 600; }
.pc-review-bar span { font-size: 14px; }
.pc-review-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.pc-rv-history { margin-top: 12px; }
.pc-tabs button small { margin-left: 4px; padding: 0 6px; border-radius: 8px; background: #ececec; font-size: 12px; font-weight: 400; }

.pc-dialog.wide { width: min(760px, calc(100% - 48px)); }
.pc-dialog-html { padding: 0 24px 16px; max-height: 60vh; overflow-y: auto; }
.pc-version h4 { margin: 12px 0 4px; font-weight: 600; }
.pc-version ul { padding-left: 18px; }
.pc-checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 2px 16px; }
.pc-checks .pc-check { height: auto; min-height: 32px; align-items: flex-start; padding: 4px 0; }
.pc-checks .pc-check input { margin-top: 2px; flex-shrink: 0; }
.pc-checks .pc-check small { display: block; font-size: 12px; color: var(--pc-muted); }
.ad-perms td { vertical-align: middle; }
.ad-perms .ad-grade select { min-width: 260px; }
.ad-sort { display: flex; gap: 4px; }
.pc-icon-btn { width: 32px; height: 32px; border-radius: 4px; display: grid; place-items: center; border: 1px solid var(--pc-stroke) !important; background: var(--pc-card) !important; }
.pc-icon-btn:hover:not(:disabled) { background: #f6f6f6 !important; }
.pc-icon-btn:disabled { opacity: 0.4; cursor: default; }
.pc-icon-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pc-table tr.muted td { color: var(--pc-muted); }
.ad-snapshot { white-space: pre-wrap; word-break: break-word; font-family: Consolas, monospace; font-size: 12px; line-height: 1.4; padding: 12px; border-radius: 4px; background: #f3f3f3; user-select: text; }
.pc-table tr[data-absence] { cursor: pointer; }

#pc[data-theme="dark"] .pc-notif { background: #2b2b2b; border-color: #3a3a3a; }
#pc[data-theme="dark"] .pc-notif-item.unread { background: #1f2c38; }
#pc[data-theme="dark"] .pc-notif-item.unread:hover { background: #253545; }
#pc[data-theme="dark"] .pc-notif-body span { color: #d8d8d8; }
#pc[data-theme="dark"] .pc-notif-ic { background: #3a3a3a; }
#pc[data-theme="dark"] .pc-notif-ic.green { background: #213a1f; }
#pc[data-theme="dark"] .pc-notif-ic.red { background: #442726; }
#pc[data-theme="dark"] .pc-notif-ic.orange { background: #433519; }
#pc[data-theme="dark"] .pc-notif-ic.blue { background: #1b3a52; }
#pc[data-theme="dark"] .pc-badge.st-pending { background: #1b3a52; }
#pc[data-theme="dark"] .pc-badge.st-revision { background: #433519; }
#pc[data-theme="dark"] .pc-badge.st-approved { background: #213a1f; }
#pc[data-theme="dark"] .pc-badge.st-rejected { background: #442726; }
#pc[data-theme="dark"] .pc-info.blue, #pc[data-theme="dark"] .pc-review-bar { border-color: #2d4f6e; background: #1b2e40; }
#pc[data-theme="dark"] .pc-alert.warn { border-color: #6b5520; background: #3a2f17; }
#pc[data-theme="dark"] .pc-icon-btn { border-color: #444 !important; background: #2b2b2b !important; }
#pc[data-theme="dark"] .ad-snapshot { background: #1f1f1f; }
#pc[data-theme="dark"] .pc-tabs button small { background: #3a3a3a; }
@media (prefers-reduced-motion: reduce) { .pc-notif { animation: none; } }
.ad-perms { table-layout: fixed; }
.ad-perms td:first-child { width: 46%; }
.ad-perms td:nth-child(2) { width: 290px; }

/* Bundesfrei: Web-Zugang (2026-11-14) */
.wa-code { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px; margin-bottom: 12px; border-radius: 6px; background: #eef5fc; text-align: center; user-select: text; }
.wa-code b { font-size: 28px; font-weight: 600; letter-spacing: 0.12em; color: var(--pc-accent); }
.wa-code small { font-size: 12px; color: var(--pc-muted); }
.wa-steps { padding-left: 20px; line-height: 1.6; }
.wa-list { padding-left: 18px; line-height: 1.6; }
#pc[data-theme="dark"] .wa-code { background: #1b2e40; }
