:root {
    /* Color palette (requested) */
    --main: #2C347B;           /* main color */
    --main-600: #23295F;       /* darker main for hover */
    --main-700: #1C214B;       /* even darker */
    --sub: #ADC7D9;            /* sub color */
    --sub-600: #8DB1C7;        /* darker sub */
    --highlight: #A01916;      /* highlight color (danger) */
    --highlight-700: #7F1110;  /* darker highlight */

    --bg: #F7F9FC;             /* app background */
    --surface: #FFFFFF;        /* cards/surfaces */
    --text: #1F2937;           /* slate-800 */
    --muted: #6B7280;          /* slate-500 */
    --border: #E5E7EB;         /* slate-200 */
}

/* Base */
* { box-sizing: border-box; }
html { height: 100%; }
body { min-height: 100vh; display:flex; flex-direction: column; font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; margin: 0; color: var(--text); background: var(--bg); }
body > main { flex: 1 0 auto; display:block; }

/* Navbar */
.navbar {
    display:flex; gap:1rem; align-items:center; padding:0.75rem 1rem;
    background: linear-gradient(180deg, var(--main), var(--main-600));
    color: #fff;
}
.navbar a { color: #fff; text-decoration:none; font-weight:500; }
.navbar a:hover { text-decoration: underline; }
.navbar .spacer { flex:1; }
.navbar a.nav-item-spacing { margin-right: 1.5em; }

/* Dropdown (Untermenü) – Text nicht weiß auf weißem Hintergrund */
.navbar .dropdown-menu { background: var(--surface); border: 1px solid var(--border); }
.navbar .dropdown-item { color: var(--text); }
.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus { color: #111827; background-color: rgba(44,52,123,0.08); }

/* Layout */
.container { max-width: 1800px; margin: 1rem auto; padding: 0 1rem; }
.footer { padding: 1rem; border-top:1px solid var(--border); color: var(--muted); text-align:center; background: var(--surface); }

/* Buttons */
.btn {
    display:inline-block; padding:0.55rem 1rem; border-radius:8px; text-decoration:none; border:1px solid transparent; cursor:pointer;
    font-weight:600; transition: background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.btn:focus { outline: 2px solid var(--sub); outline-offset: 1px; }
.btn-primary { background: var(--main); color:#fff; }
.btn-primary:hover { background: var(--main-600); }
.btn-secondary { background: var(--sub); color: #0f172a; border-color: rgba(0,0,0,.05); }
.btn-secondary:hover { background: var(--sub-600); }
.btn-outline-primary { background: transparent; color: var(--main); border-color: var(--main); }
.btn-outline-primary:hover { background: rgba(44,52,123,0.08); }
.btn-outline-danger { background: transparent; color: var(--highlight); border-color: var(--highlight); }
.btn-outline-danger:hover { background: rgba(160,25,22,0.08); color: var(--highlight-700); border-color: var(--highlight-700); }
.btn-sm { padding: 0.35rem 0.6rem; font-size: .9rem; border-radius:6px; }

/* Forms */
.form { max-width:680px; }
.form-row { display:flex; flex-direction:column; gap:0.35rem; margin-bottom:1rem; }
.form-row input, .form-row textarea, .form-control { padding:0.6rem 0.65rem; border:1px solid #d1d5db; border-radius:8px; background:#fff; color:var(--text); }
.form-row label, .form-label { font-weight:600; color:#374151; }
.form-row input:focus, .form-row textarea:focus, .form-control:focus { outline: 2px solid var(--sub); border-color: var(--main); }
.form-row input.invalid, .form-row textarea.invalid { border-color: var(--highlight); background:#FEF2F2; }
.form-actions { margin-top:1rem; }
.small { font-size: .875rem; }

/* Alerts */
.alert { padding:0.75rem 1rem; margin:0.75rem 0; border-radius:10px; border:1px solid var(--border); background: var(--surface); }
.alert.success, .alert-success { background:#ECFDF5; color:#065F46; border-color:#10B981; }
.alert.error, .alert-danger { background:#FEF2F2; color:#991B1B; border-color:#EF4444; }

/* Cards */
.card { background: var(--surface); border:1px solid var(--border); border-radius:12px; }
.card .card-body { padding: 1rem; }
.card-title { margin: 0 0 .75rem 0; font-size:1.05rem; }
.shadow-sm { box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 1px 1px rgba(0,0,0,0.02); }

/* Tables */
.table-responsive { overflow:auto; max-height: 70vh; }
.table { width:100%; border-collapse: collapse; }
.table th, .table td { padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.table thead th { position: sticky; top: 0; background: var(--sub); color:#0f172a; z-index: 1; text-align:left; }
.align-middle td, .align-middle th { vertical-align: middle; }

/* Badges */
.badge { display:inline-block; padding: .25rem .5rem; border-radius:7px; font-size: .75rem; font-weight:600; }
.bg-success { background:#10B981; color:#052e27; }
.bg-danger { background: var(--highlight); color:#fff; }
.bg-secondary { background:#E5E7EB; color:#111827; }

/* Typography & Utilities */
.text-end { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.mb-0 { margin-bottom: 0; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.25rem; }
.mt-auto { margin-top: auto; }
.d-inline { display:inline; }
.d-flex { display:flex; }
.d-grid { display:grid; }
.gap-2 { gap: .5rem; }
.g-2 { gap: .5rem; }
.g-3 { gap: 1rem; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }

/* Simple grid */
.row { display:flex; flex-wrap: wrap; gap: 1rem; }
.col-12 { flex: 1 0 100%; }
.col-sm-9 { flex: 1 0 75%; }
.col-sm-3 { flex: 1 0 23%; }
.col-md-8, .col-md-4 { flex: 1 0 100%; }
@media (min-width: 768px) {
    .col-md-8 { flex: 0 0 calc(66.666% - .5rem); }
    .col-md-4 { flex: 0 0 calc(33.333% - .5rem); }
}
