:root {
    --bg: #0f1115;
    --surface: #181b22;
    --surface-2: #1f232c;
    --border: #2a2f3a;
    --text: #e7e9ee;
    --muted: #9aa1ad;
    --primary: #3b82f6;
    --primary-hover: #2f6fe0;
    --danger-bg: #3a1d22;
    --danger-text: #ffb4b4;
    --radius: 10px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

.phb-shell { min-height: 100vh; display: flex; flex-direction: column; }

.phb-topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 22px; background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.phb-brandmark { display: flex; align-items: center; gap: 10px; }
.phb-pill {
    font-size: 12px; padding: 2px 9px; border-radius: 999px;
    background: var(--surface-2); color: var(--muted); border: 1px solid var(--border);
}
.phb-topbar-right { display: flex; align-items: center; gap: 16px; }
.phb-user { color: var(--muted); font-size: 14px; }

.phb-locale, .phb-auth-locale { display: flex; gap: 8px; }
.phb-locale a, .phb-auth-locale a {
    color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 600;
}
.phb-locale a.is-active, .phb-auth-locale a.is-active { color: var(--primary); }

.phb-main { flex: 1; padding: 28px 22px; }
.phb-footer { padding: 14px 22px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--border); }

.phb-page { max-width: 980px; margin: 0 auto; }
.phb-h1 { font-size: 24px; margin: 0 0 4px; }
.phb-lead { color: var(--muted); margin: 0 0 24px; }

.phb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }

.phb-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 22px;
}
.phb-card-title { font-size: 16px; margin: 0 0 14px; }
.phb-muted { color: var(--muted); margin: 0; }

.phb-dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 0; }
.phb-dl dt { color: var(--muted); }
.phb-dl dd { margin: 0; }

/* Auth */
.phb-auth { display: flex; align-items: center; justify-content: center; min-height: 70vh; }
.phb-auth .phb-card { width: 100%; max-width: 380px; }
.phb-form { display: flex; flex-direction: column; gap: 14px; }
.phb-field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.phb-field span { color: var(--muted); }
.phb-field input {
    padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border);
    background: var(--surface-2); color: var(--text); font-size: 15px;
}
.phb-field input:focus { outline: none; border-color: var(--primary); }
.phb-check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.phb-auth-locale { justify-content: center; margin-top: 16px; }

.phb-btn {
    padding: 10px 16px; border-radius: 8px; border: 1px solid transparent;
    font-size: 14px; font-weight: 600; cursor: pointer;
}
.phb-btn-primary { background: var(--primary); color: #fff; }
.phb-btn-primary:hover { background: var(--primary-hover); }
.phb-btn-ghost { background: transparent; color: var(--muted); border-color: var(--border); }
.phb-btn-ghost:hover { color: var(--text); }

.phb-alert { padding: 10px 14px; border-radius: 8px; font-size: 14px; margin-bottom: 6px; }
.phb-alert-error { background: var(--danger-bg); color: var(--danger-text); }

form { margin: 0; }

/* ===== Admin-Layout (P2) ===== */
.phb-admin { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.phb-side {
    background: var(--surface); border-right: 1px solid var(--border);
    display: flex; flex-direction: column; padding: 18px 14px;
}
.phb-side-brand { display: flex; flex-direction: column; gap: 6px; margin-bottom: 22px; }
.phb-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.phb-nav a {
    color: var(--muted); text-decoration: none; padding: 9px 12px;
    border-radius: 8px; font-size: 14px; font-weight: 500;
}
.phb-nav a:hover { background: var(--surface-2); color: var(--text); }
.phb-nav a.is-active { background: var(--surface-2); color: var(--primary); }
.phb-side-foot { display: flex; flex-direction: column; gap: 12px; padding-top: 14px; border-top: 1px solid var(--border); }

.phb-content { padding: 26px 30px; max-width: 1100px; }
.phb-content-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.phb-content-head .phb-h1 { margin: 0; }

.phb-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.phb-table th { text-align: left; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.phb-table td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.phb-table a { color: var(--text); text-decoration: none; }
.phb-table a:hover { color: var(--primary); }
.phb-table-compact td, .phb-table-compact th { padding: 6px 8px; }
.phb-row-actions { display: flex; gap: 12px; align-items: center; white-space: nowrap; }
.phb-link-danger { background: none; border: none; color: #ff8888; cursor: pointer; font-size: 14px; padding: 0; }

.phb-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.phb-field textarea, .phb-field select {
    padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border);
    background: var(--surface-2); color: var(--text); font-size: 14px; font-family: inherit;
}
.phb-field textarea { resize: vertical; }
.phb-fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin: 16px 0; }
.phb-fieldset legend { color: var(--muted); padding: 0 6px; font-size: 13px; }
.phb-form-actions { display: flex; gap: 10px; align-items: center; margin-top: 18px; }
.phb-form-tight { flex-direction: row; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.phb-form-tight input { flex: 1; min-width: 120px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); }
.phb-hint { font-size: 12px; margin-top: 6px; }

.phb-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--border); }
.phb-dot-ok { background: #3ecf8e; }
.phb-tag { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.phb-tag-ok { color: #3ecf8e; border-color: #2c5e48; }

.phb-alert-ok { background: #16301f; color: #8ee9b3; }
.phb-alert-info { background: #16263a; color: #9ec9ff; }
.phb-alert ul { margin: 0; padding-left: 18px; }
.phb-pagination { margin-top: 16px; }

@media (max-width: 820px) {
    .phb-admin { grid-template-columns: 1fr; }
    .phb-form-grid { grid-template-columns: 1fr; }
}

/* ===== Bestellungen (P3) ===== */
.phb-orderhead { display: flex; align-items: center; justify-content: space-between; }
.phb-table tfoot td { border-bottom: none; padding-top: 10px; }
.phb-list { margin: 0; padding-left: 18px; }
.phb-list li { padding: 4px 0; }
optgroup { color: var(--muted); }
select { max-width: 100%; }
