:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --bg: #f4f5fb;
    --card-bg: #ffffff;
    --text: #1f2333;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --error-bg: #fee2e2;
    --error-text: #b91c1c;
    --success-bg: #dcfce7;
    --success-text: #15803d;
    --radius: 14px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #6366f1 0%, #818cf8 45%, #f4f5fb 100%);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

/* ============================================================
   Landing Page
   ============================================================ */

body.landing {
    display: block;
    padding: 0;
    background: var(--bg);
}

/* ── Navbar ─────────────────────────────────────────────── */
.landing-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    height: 68px;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: transparent;
    border-bottom: 1px solid rgba(255,255,255,0.10);
    transition: background 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.landing-nav.scrolled {
    background: #fff;
    border-bottom-color: var(--border);
    box-shadow: 0 1px 12px rgba(0,0,0,0.08);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    transition: color 0.28s;
}

.landing-nav.scrolled .nav-brand { color: var(--text); }

.nav-logo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    border: 1.5px solid rgba(255,255,255,0.35);
    transition: background 0.28s, border-color 0.28s;
}

.landing-nav.scrolled .nav-logo {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-outline {
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255,255,255,0.55);
    width: auto;
    padding: 8px 22px;
    font-size: 14px;
    font-weight: 500;
    margin-top: 0;
    border-radius: 8px;
    transition: background 0.18s, border-color 0.18s, color 0.18s;
}

.btn-outline:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.8);
    color: #fff;
}

.landing-nav.scrolled .btn-outline {
    color: var(--text);
    border-color: #d1d5db;
}

.landing-nav.scrolled .btn-outline:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: var(--text);
}

/* ── Hero ────────────────────────────────────────────────── */
.landing-hero {
    min-height: 94vh;
    display: flex;
    align-items: center;
    color: #fff;
    padding: 120px 24px 80px;
    position: relative;
    background:
        linear-gradient(160deg, rgba(20,10,65,0.88) 0%, rgba(79,46,229,0.72) 100%),
        url('../images/stadium.jpg') center 42% / cover no-repeat;
    background-color: #1a0a4a;
}

.landing-hero::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 80px;
    background: linear-gradient(to bottom, transparent, var(--bg));
    pointer-events: none;
}

.hero-inner {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 12px;
    position: relative;
    z-index: 1;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.65);
    margin-bottom: 16px;
}

.hero-eyebrow-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #a5b4fc;
    display: inline-block;
}

.hero-title {
    margin: 0 0 20px;
    font-size: 52px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.1;
}

.hero-title span {
    color: #a5b4fc;
}

.hero-subtitle {
    margin: 0 0 36px;
    max-width: 540px;
    font-size: 17px;
    line-height: 1.8;
    color: rgba(255,255,255,0.78);
}

.btn-hero {
    background: #fff;
    color: var(--primary);
    width: auto;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    margin-top: 0;
    box-shadow: 0 4px 18px rgba(0,0,0,0.22);
    border-radius: 10px;
}

.btn-hero:hover {
    background: #ede9fe;
    color: var(--primary-dark);
}

/* ── Features ────────────────────────────────────────────── */
.landing-features-section {
    background: var(--bg);
    padding: 0 24px 72px;
}

.landing-features-heading {
    text-align: center;
    padding: 60px 0 40px;
}

.landing-features-heading h2 {
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 10px;
}

.landing-features-heading p {
    font-size: 15px;
    color: var(--text-muted);
    margin: 0;
}

.landing-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.feature-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 32px 26px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    transition: box-shadow 0.18s, transform 0.18s;
}

.feature-card:hover {
    box-shadow: 0 8px 28px rgba(79,46,229,0.10);
    transform: translateY(-2px);
}

.feature-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: #ede9fe;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
}

.feature-card h3 {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 700;
}

.feature-card p {
    margin: 0;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.65;
}

/* ── Modal ───────────────────────────────────────────────── */
.modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(31, 35, 51, 0.55);
    backdrop-filter: blur(3px);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-backdrop.active {
    display: flex;
}

.modal-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 40px 36px;
    width: 100%;
    max-width: 420px;
    position: relative;
    box-shadow: 0 24px 60px rgba(31, 35, 51, 0.22);
    animation: modalIn 0.18s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(-16px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-card h2 {
    margin: 0 0 6px;
    font-size: 24px;
    font-weight: 700;
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--text-muted);
    cursor: pointer;
    width: auto;
    padding: 4px 8px;
    margin: 0;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text);
    background: var(--bg);
    border-radius: 6px;
}

.landing-footer {
    text-align: center;
    padding: 24px 24px 36px;
    font-size: 13px;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    background: #fff;
}

@media (max-width: 700px) {
    .landing-features { grid-template-columns: 1fr; }
    .hero-title { font-size: 34px; }
    .landing-hero { padding: 100px 0 60px; min-height: 80vh; }
    .hero-inner { padding: 0 20px; }
    .landing-nav { padding: 0 20px; }
}

/* ============================================================
   Auth pages (login.php, register.php standalone)
   ============================================================ */

.wrapper {
    width: 100%;
    max-width: 420px;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 40px 36px;
    box-shadow: 0 20px 45px rgba(31, 35, 51, 0.18);
}

.card h1 {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 700;
}

.card p.subtitle {
    margin: 0 0 28px;
    color: var(--text-muted);
    font-size: 14px;
}

.form-group {
    margin-bottom: 18px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    transition: border-color 0.15s, box-shadow 0.15s;
    background: #fafafe;
    box-sizing: border-box;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background: #fff;
}

input[type="file"] {
    width: 100%;
    padding: 9px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-muted);
    background: #fafafe;
    box-sizing: border-box;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}

input[type="file"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

input[type="file"]::file-selector-button {
    padding: 6px 16px;
    margin-right: 12px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s;
}

input[type="file"]::file-selector-button:hover {
    background: var(--primary-dark);
}

/* Spinner bei number-Feldern dezent halten */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    opacity: .5;
}

/* Dropdowns – einheitliches Design wie Texteingaben */
select {
    width: 100%;
    padding: 12px 36px 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    background-color: #fafafe;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}

select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background-color: #fff;
}

select:disabled {
    opacity: .55;
    cursor: not-allowed;
}

button.btn {
    width: 100%;
    padding: 13px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    margin-top: 6px;
}

button.btn:hover {
    background: var(--primary-dark);
}

.alert {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 20px;
}

.alert-error {
    background: var(--error-bg);
    color: var(--error-text);
}

.alert-success {
    background: var(--success-bg);
    color: var(--success-text);
}

.footer-link {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-muted);
}

.footer-link a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.footer-link a:hover {
    text-decoration: underline;
}

/* Dashboard */
.dashboard-card {
    max-width: 560px;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 14px;
}

.user-info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.user-info-row:last-child {
    border-bottom: none;
}

.user-info-row span:first-child {
    color: var(--text-muted);
}

.btn-secondary {
    background: #f3f4f6;
    color: var(--text);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

/* ============================================================
   App Layout (eingeloggte Seiten)
   ============================================================ */

body.app {
    display: block;
    padding: 0;
    background: #f4f5fb;
}

/* App-Navbar */
.app-nav {
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 28px;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 32px;
}

.app-nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
}

.app-nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 4px;
    flex: 1;
}

.app-nav-link {
    display: block;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: background 0.12s, color 0.12s;
}

.app-nav-link:hover {
    background: var(--bg);
    color: var(--text);
}

.app-nav-link.active {
    background: #ede9fe;
    color: var(--primary-dark);
    font-weight: 600;
}

.app-nav-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.app-nav-username {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.app-nav-username-link {
    text-decoration: none;
    transition: color 0.12s;
}

.app-nav-username-link:hover {
    color: var(--primary);
}

.app-avatar-link {
    text-decoration: none;
    transition: opacity 0.12s, box-shadow 0.12s;
}

.app-avatar-link:hover {
    opacity: 0.85;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.25);
}

.app-nav-admin {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    background: #ede9fe;
    padding: 3px 10px;
    border-radius: 20px;
    text-decoration: none;
}

.app-nav-logout {
    background: none;
    border: 1.5px solid var(--border);
    color: var(--text-muted);
    padding: 5px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    width: auto;
    margin: 0;
    transition: border-color 0.12s, color 0.12s;
}

.app-nav-logout:hover {
    border-color: #9ca3af;
    color: var(--text);
    background: none;
}

/* Avatar */
.app-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.app-avatar--lg {
    width: 56px;
    height: 56px;
    font-size: 22px;
}

/* Content area */
.app-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 28px 60px;
}

/* Welcome hero */
.welcome-hero {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 36px;
}

.welcome-hero h1 {
    margin: 0 0 4px;
    font-size: 26px;
    font-weight: 700;
}

.welcome-hero p {
    margin: 0;
    color: var(--text-muted);
    font-size: 15px;
}

/* Schnellzugriff-Kacheln */
.app-tiles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.tile {
    display: flex;
    align-items: center;
    gap: 18px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 22px;
    text-decoration: none;
    color: var(--text);
    transition: box-shadow 0.15s, border-color 0.15s;
}

.tile:hover {
    box-shadow: 0 4px 18px rgba(99, 102, 241, 0.12);
    border-color: #c4b5fd;
}

.tile-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.tile h3 {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 700;
}

.tile p {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
}

/* Unterseiten */
.page-header {
    margin-bottom: 28px;
}

.page-header h1 {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 700;
}

.page-header p {
    margin: 0;
    color: var(--text-muted);
    font-size: 15px;
}

.content-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 28px;
}

.empty-state {
    margin: 0;
    color: var(--text-muted);
    font-size: 15px;
    text-align: center;
    padding: 24px 0;
}

/* FAQs */
.faq-item {
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item summary {
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::after {
    content: '+';
    font-size: 20px;
    color: var(--text-muted);
    font-weight: 400;
}

.faq-item[open] summary::after {
    content: '−';
}

.faq-item p {
    margin: 12px 0 0;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.65;
}

.faq-item a {
    color: var(--primary);
}

/* ============================================================
   Helfer-Registrierungsformular
   ============================================================ */

.form-section {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 28px 24px;
    margin-bottom: 20px;
}

.section-title {
    margin: 0 0 20px;
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    background: #fafafe;
    transition: border-color 0.15s, box-shadow 0.15s;
}

textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background: #fff;
}

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

.check-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fafafe;
    transition: border-color 0.12s, background 0.12s;
}

.check-item:hover {
    border-color: var(--primary);
    background: #f5f3ff;
}

.check-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    flex-shrink: 0;
}

/* Drag & Drop Dropzone */
.dropzone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 40px 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    background: #fafafe;
}

.dropzone:hover,
.dropzone.drag-over {
    border-color: var(--primary);
    background: #f5f3ff;
}

.dropzone-inner p {
    margin: 0;
    font-size: 14px;
    color: var(--text-muted);
}

.dropzone-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
}

.file-preview-list {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-preview-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
}

.preview-remove {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
    width: auto;
    padding: 0 4px;
    line-height: 1;
}

.preview-remove:hover {
    color: var(--error-text);
}

/* Detail-Ansicht (Admin) */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.detail-rows {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 11px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row > span:first-child {
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
    min-width: 120px;
}

@media (max-width: 700px) {
    .form-row-2 { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
    .checkbox-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   Dienstplan
   ============================================================ */

.schedule-view-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 680px;
    table-layout: fixed;
}

.schedule-view-table th {
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    padding: 10px 12px;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.schedule-view-table td {
    padding: 13px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.schedule-view-table tr:last-child td {
    border-bottom: none;
}

.schedule-view-table .time-cell {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    color: var(--text-muted);
}

.schedule-view-table .day-cell {
    text-align: center;
    color: var(--text-muted);
}

.schedule-view-table .day-cell.day-active {
    color: var(--primary);
    font-weight: 700;
    font-size: 16px;
}

.personnel-cell {
    min-width: 0;
    overflow: hidden;
}

.personnel-cell-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.personnel-tag {
    background: #ede9fe;
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

/* Admin: Abteilungsverwaltung */
.dept-manager {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dept-add-form {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.dept-add-form input[type="text"] {
    flex: 1;
    max-width: 320px;
}

.dept-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dept-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f3f4f6;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 10px 6px 14px;
    font-size: 14px;
    font-weight: 500;
}

.dept-item form {
    margin: 0;
}

.dept-item .btn-small {
    padding: 2px 8px;
    font-size: 16px;
    line-height: 1;
}

/* Admin: Schicht-Formular */
.shift-form-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 16px;
}

.day-checkboxes {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.day-check {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.day-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* Mehrfachauswahl: kein Pfeil-Icon, kein appearance:none */
.personnel-select {
    padding: 8px 10px;
    background-image: none;
    -webkit-appearance: listbox;
    -moz-appearance: listbox;
    appearance: auto;
    cursor: default;
}

.schedule-table .day-cell {
    text-align: center;
    color: var(--primary);
    font-weight: 700;
}

@media (max-width: 700px) {
    .shift-form-grid {
        grid-template-columns: 1fr;
    }
}

/* Download-Liste */
.file-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.file-item:last-child {
    border-bottom: none;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.file-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.file-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.file-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

.file-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 3px;
}

.btn-download {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    width: auto;
    margin: 0;
    display: inline-block;
}

.btn-download:hover {
    background: var(--primary-dark);
}

/* ── Hamburger Button ─────────────────────────────────────── */
.app-nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 4px;
    width: auto;
    margin: 0 0 0 12px;
}

.app-nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.22s, opacity 0.22s;
}

.app-nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.app-nav-hamburger.open span:nth-child(2) { opacity: 0; }
.app-nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.app-nav-mobile-user { display: none; }

/* ── Dashboard Section Header ──────────────────────────────── */
.dashboard-section-header {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
    margin: 28px 0 12px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.dashboard-section-header span {
    font-size: 15px;
}

/* ── News ──────────────────────────────────────────────────── */
.news-card {
    margin-bottom: 20px;
}

.news-card-header {
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.news-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--text);
    line-height: 1.35;
}

.news-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.news-body {
    font-size: 15px;
    line-height: 1.75;
    color: var(--text);
    white-space: pre-wrap;
}

.news-images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.news-img-link {
    display: block;
    border-radius: 10px;
    overflow: hidden;
    flex: 1 1 200px;
    max-width: 340px;
}

.news-img {
    display: block;
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: opacity 0.15s;
}

.news-img-link:hover .news-img { opacity: .88; }

.news-docs {
    list-style: none;
    padding: 0;
    margin: 14px 0 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.news-doc-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--primary);
    text-decoration: none;
    padding: 6px 12px;
    background: #f5f3ff;
    border: 1px solid #ddd6fe;
    border-radius: 8px;
}

.news-doc-link:hover { background: #ede9fe; }

.news-doc-size {
    color: var(--text-muted);
    font-size: 12px;
    margin-left: 4px;
}

/* ── List Filter ───────────────────────────────────────────── */
.filter-row {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    align-items: center;
}

.list-filter {
    flex: 1;
    padding: 9px 14px 9px 36px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cline x1='11' y1='11' x2='15' y2='15'/%3E%3C/svg%3E") 11px center / 16px no-repeat;
    color: var(--text);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.list-filter:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}

.filter-select {
    padding: 9px 32px 9px 12px;
    border-radius: 8px;
    width: auto;
}

.filter-empty {
    display: none;
    padding: 14px 0;
    color: var(--text-muted);
    font-size: 14px;
    text-align: center;
}

/* ── Mobile Responsive ────────────────────────────────────── */
@media (max-width: 700px) {

    /* App-Nav */
    .app-nav { position: relative; }
    .app-nav-inner { gap: 8px; padding: 0 16px; }
    .app-nav-hamburger { display: flex; }
    .app-nav-username { display: none; }
    .app-nav-admin { display: none; }

    .app-nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px; left: 0; right: 0;
        background: #fff;
        border-bottom: 2px solid var(--border);
        box-shadow: 0 8px 20px rgba(0,0,0,0.10);
        padding: 8px 12px 14px;
        z-index: 200;
        gap: 2px;
    }

    .app-nav-menu.open { display: flex; }

    .app-nav-link {
        padding: 12px 14px;
        border-radius: 10px;
        font-size: 15px;
    }

    .app-nav-mobile-user {
        display: flex;
        flex-direction: column;
        border-top: 1px solid var(--border);
        margin-top: 6px;
        padding-top: 6px;
    }

    .app-nav-mobile-logout {
        background: none;
        border: none;
        cursor: pointer;
        font-family: inherit;
        text-align: left;
        color: var(--text-muted);
        width: 100%;
    }

    /* Content */
    .app-tiles { grid-template-columns: 1fr; }
    .app-content { padding: 24px 16px 40px; }

    /* Admin wrapper & cards */
    .admin-wrapper { padding: 20px 14px 40px; }
    .admin-card { padding: 18px 14px; }
    .admin-header { flex-direction: column; align-items: flex-start; gap: 14px; }
    .admin-header > div:last-child { display: flex; flex-wrap: wrap; gap: 8px; }

    /* Admin nav – horizontal scroll */
    .admin-topnav { padding: 0 12px; gap: 8px; overflow-x: auto; }
    .admin-topnav-links { overflow-x: auto; flex-shrink: 0; gap: 0; }
    .admin-topnav-brand span { display: none; }
    .admin-topnav-right .admin-topnav-link { display: none; }

    /* Admin tables – horizontal scroll */
    .admin-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    .admin-table td,
    .admin-table th { white-space: normal; }

    .admin-table .sd-actions,
    .admin-table td:last-child { white-space: nowrap; }

    /* Stammdaten inline edit */
    .stammdaten-table .sd-edit-form { flex-direction: column; align-items: flex-start; }

    /* Schedule */
    .schedule-view-table { min-width: 480px; }

    /* Dienstplan grouped display */
    .content-card { overflow-x: auto; }

    /* Files */
    .file-item { flex-direction: column; align-items: flex-start; gap: 10px; }
    .file-name { word-break: break-word; white-space: normal; }

    /* Helfer form */
    .form-section { padding: 18px 14px; }
    .dropzone { padding: 20px 12px; }

    /* Detail grid already 1-col */
    .detail-row { flex-direction: column; gap: 2px; }
    .detail-row span:first-child { color: var(--text-muted); font-size: 12px; }

    /* Shift form grid */
    .shift-form-grid { grid-template-columns: 1fr !important; }

    /* Day checkboxes wrap tighter */
    .day-checkboxes { gap: 10px; }

    /* Personnel tags – allow wrapping */
    .personnel-cell { min-width: unset; }

    /* Alerts */
    .alert { font-size: 13px; padding: 10px 14px; }

    /* Filter row */
    .filter-row { flex-direction: column; align-items: stretch; }
    .filter-row select { width: 100%; }
}
