/* =========================================================
   MBS Designset â exakt uebernommen aus mbs-tokens.css /
   app/templates/base.html.twig des Reisekostenportals
   (Stand 16.07.2026, direkt aus dem Quellprojekt abgeglichen)
   ========================================================= */
:root {
    --navy: #001f5c;
    --navy-light: #e8eef4;
    --green: #a5c500;
    --green-dark: #233a00;
    --green-tint: #eef4cc;
    --amber-tint: #fef3e2;
    --amber-text: #633806;
    --red-tint: #fde8ea;
    --red-text: #791f1f;
    --gray-bg: #f4f5f7;
    --border: #d8dde3;
    --text: #1a1f24;
    --text-muted: #5a6b7d;
    --text-faint: #8a94a0;

    --font-sans: 'Segoe UI', Arial, sans-serif;
    --fs-h1: 22px; --fs-h2: 16px; --fs-body: 13px; --fs-small: 11px; --fs-tiny: 10px;
    --fw-regular: 400; --fw-medium: 500; --fw-semibold: 600;

    --radius-card: 12px; --radius-box: 8px; --radius-pill: 999px;
    --border-hair: 0.5px solid var(--border);
    --clip-ribbon: polygon(0 0, 100% 0, 92% 100%, 0 100%);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font-sans);
    background: #eef0f3;
    color: var(--text);
    font-size: var(--fs-body);
    line-height: 1.5;
}

a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }

h1 { font-size: var(--fs-h1); font-weight: var(--fw-semibold); color: var(--navy); margin: 0 0 4px; }
h2 { font-size: var(--fs-h2); font-weight: var(--fw-medium); color: var(--navy); margin: 0 0 12px; }
small, .text-small { font-size: var(--fs-small); color: var(--text-faint); }

/* ---- App-Shell mit persistenter Navigation (wie im Reisekostenportal) ---- */
.app-shell { display: flex; min-height: 100vh; }
.app-sidebar {
    width: 212px;
    background: var(--navy);
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex-shrink: 0;
}
.app-sidebar .brand {
    display: flex; align-items: center; gap: 10px;
    color: #fff; font-size: 15px; font-weight: 600; padding: 0 6px;
}
.app-sidebar .brand:hover { text-decoration: none; }
.app-sidebar .brand-logo { width: 26px; height: 26px; border-radius: 6px; background: #fff; padding: 2px; object-fit: contain; flex-shrink: 0; display: block; }
.app-sidebar .brand-ribbon { height: 5px; background: var(--green); clip-path: polygon(0 0, 100% 0, 90% 100%, 0 100%); margin: 10px 6px 16px; }

.nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; color: #b7c8e6; font-size: 13.5px; text-decoration: none; }
.nav-item:hover { background: #12306a; color: #e6edf3; text-decoration: none; }
.nav-item.active { background: var(--green); color: var(--green-dark); font-weight: 600; }
.nav-item i { font-size: 18px; }
.nav-item.nav-sub { padding-left: 30px; font-size: 12.5px; color: #9db4c9; }
.nav-item.nav-sub.active { color: var(--green-dark); }
.nav-parent { display: flex; align-items: center; }
.nav-parent .nav-item { flex: 1; }
.nav-toggle { background: none; border: none; color: #9db4c9; cursor: pointer; padding: 8px 10px; display: flex; align-items: center; border-radius: 8px; }
.nav-toggle:hover { background: #12306a; color: #e6edf3; }
.nav-toggle i { font-size: 16px; transition: transform .15s ease; }
.nav-toggle.open i { transform: rotate(90deg); }
.nav-submenu { display: none; flex-direction: column; gap: 3px; }
.nav-submenu.open { display: flex; }
.app-sidebar .spacer { margin-top: auto; }

.app-user { display: flex; align-items: center; gap: 9px; padding: 12px 6px 2px; border-top: .5px solid #23407a; margin-top: 8px; }
.app-user .av { width: 30px; height: 30px; border-radius: 50%; background: var(--green); color: var(--green-dark); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; flex-shrink: 0; }
.app-user .nm { flex: 1; color: #e6edf3; font-size: 12.5px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-user .nm small { display: block; color: #9db4c9; font-size: 11px; }
.app-user a.logout { color: #9db4c9; font-size: 17px; display: flex; align-items: center; text-decoration: none; padding: 6px 4px; }
.app-user a.logout:hover { color: #fff; }

.app-main { flex: 1; min-width: 0; }

@media (max-width: 720px) {
    .app-shell { flex-direction: column; }
    .app-sidebar { width: 100%; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px; padding: 12px; }
    .app-sidebar .brand-ribbon, .app-sidebar .spacer { display: none; }
    .app-sidebar .brand { margin-right: 8px; }
    .app-user { border-top: none; margin: 0; padding: 0; }
    .app-user .nm { display: none; }
}

.page-accent {
    height: 6px; width: 100px; margin-bottom: 18px;
    background: var(--green); clip-path: var(--clip-ribbon); border-radius: 2px;
}

.container { max-width: 1100px; margin: 32px auto; padding: 0 32px 48px; }

/* ---- Karten ---- */
.card {
    background: #fff;
    border: var(--border-hair);
    border-radius: var(--radius-card);
    padding: 22px 24px;
    margin-bottom: 22px;
}
.card h1, .card h2.chapter-title {
    color: var(--navy);
    font-size: var(--fs-h1);
    margin: 0 0 18px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--green);
}

.section-label {
    font-size: var(--fs-small); font-weight: 600; color: var(--text-faint); letter-spacing: .06em;
    text-transform: uppercase; margin-bottom: 12px; display: flex; align-items: center; gap: 8px;
}

/* ---- Hinweisboxen ---- */
.flash, .box {
    border-radius: 10px;
    padding: 13px 18px;
    margin-bottom: 16px;
    font-size: var(--fs-body);
    line-height: 1.5;
    border-left: 5px solid var(--green);
}
.flash-success, .box-info { background: var(--green-tint); color: var(--green-dark); }
.flash-error, .box-error { background: var(--red-tint); color: var(--red-text); border-left-color: #c0555a; }
.box-warn { background: var(--amber-tint); color: var(--amber-text); border-left-color: #e7b95c; }

/* ---- Formulare ---- */
form .row { margin-bottom: 16px; }
label { display: block; font-weight: 600; margin-bottom: 6px; font-size: var(--fs-body); color: var(--text); }

input[type=text], input[type=email], input[type=password], textarea, select {
    width: 100%;
    padding: 9px 12px;
    border: var(--border-hair);
    border-radius: var(--radius-box);
    font-size: var(--fs-body);
    font-family: inherit;
    background: #fff;
    color: var(--text);
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px var(--navy-light);
}
textarea { resize: vertical; min-height: 70px; }

.checkbox-row, .choice-row { display: flex; align-items: center; gap: 8px; }
.choice-list { display: flex; gap: 18px; flex-wrap: wrap; }
.choice-list label { font-weight: 400; margin: 0; }

/* ---- Buttons (Pillenform, wie mbs-tokens.css) ---- */
button, .btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--navy);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    font-size: var(--fs-body);
    font-weight: var(--fw-medium);
    cursor: pointer;
    font-family: inherit;
}
button:hover, .btn:hover { background: #002a7a; text-decoration: none; color: #fff; }
.btn-accent { background: var(--green); color: var(--green-dark); }
.btn-accent:hover { background: #92b000; color: var(--green-dark); }
.btn-secondary { background: #fff; color: var(--navy); border: 1.5px solid var(--navy); }
.btn-secondary:hover { background: var(--navy-light); color: var(--navy); }
.btn-danger { background: #fff; color: var(--red-text); border: 1.5px solid var(--red-text); }
.btn-danger:hover { background: var(--red-tint); color: var(--red-text); }
.btn-sm { padding: 6px 14px; font-size: var(--fs-small); }

/* ---- Tabellen ---- */
table { width: 100%; border-collapse: collapse; font-size: var(--fs-body); }
th, td { text-align: left; padding: 10px 12px; border-bottom: var(--border-hair); vertical-align: top; }
th { color: var(--navy); font-weight: 600; font-size: var(--fs-small); text-transform: uppercase; letter-spacing: .04em; }
tr:last-child td { border-bottom: none; }

/* ---- Badges / Chips ---- */
.tag, .badge {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: var(--fs-small); font-weight: 600; padding: 3px 10px; border-radius: var(--radius-pill); margin-right: 4px;
}
.tag, .badge-navy { background: var(--navy-light); color: var(--navy); }
.badge-green { background: var(--green-tint); color: var(--green-dark); }
.badge-amber { background: var(--amber-tint); color: var(--amber-text); }
.badge-red { background: var(--red-tint); color: var(--red-text); }

.muted { color: var(--text-muted); font-size: var(--fs-body); }

.actions { display: flex; gap: 10px; margin-top: 20px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; gap: 16px; flex-wrap: wrap; }
.toolbar h1 { margin-bottom: 0; }

/* ---- Login ---- */
.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-box { width: 360px; text-align: center; }
.login-box .logo-img {
    width: 84px; height: 84px; border-radius: 12px; background: #fff;
    border: var(--border-hair); padding: 6px; object-fit: contain; margin: 0 auto 16px; display: block;
}
.login-box h1 { text-align: center; border: none; padding: 0; font-size: 20px; }
.login-box .subtitle { color: var(--text-faint); font-size: 12.5px; margin: -12px 0 20px; }
.login-box .ribbon {
    height: 5px; width: 140px; margin: 0 auto 22px;
    background: var(--green); clip-path: polygon(0 0, 100% 0, 90% 100%, 0 100%);
}
.login-box form { text-align: left; }

/* ---- Startseite ---- */
.home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.home-tile { display: block; background: #fff; border: var(--border-hair); border-radius: var(--radius-card); padding: 20px; }
.home-tile:hover { border-color: var(--navy); text-decoration: none; box-shadow: 0 2px 10px rgba(0,31,92,.08); }
.home-tile .ic {
    width: 34px; height: 34px; border-radius: 9px; background: var(--green-tint); color: var(--green-dark);
    display: flex; align-items: center; justify-content: center; font-size: 18px; margin-bottom: 10px;
}
.home-tile h2 { margin-bottom: 6px; font-size: 15px; }
