/**
 * Kleingarten-Wertermittlung — Modern Minimal Design
 */

/* ================================================================
   VARIABLEN & RESET
   ================================================================ */
:root {
    --primary:        #059669;
    --primary-dark:   #047857;
    --primary-light:  #ecf5f1;

    --secondary:      #f9fafb;
    --text:           #111827;
    --text-light:     #6b7280;
    --text-lighter:   #9ca3af;
    --border:         #e5e7eb;

    --gray-100:       #f3f4f6;
    --gray-700:       #374151;

    --success:        #10b981;
    --success-light:  #d1fae5;
    --success-dark:   #065f46;
    --success-bg:     #ecfdf5;
    --success-bg-alt: #f0fdf4;

    --error:          #dc2626;
    --error-mid:      #ef4444;
    --error-border:   #fca5a5;
    --error-bg:       #fef2f2;
    --error-bg-deep:  #fee2e2;
    --error-dark:     #7f1d1d;

    --warning:        #f59e0b;
    --warning-light:  #fef3c7;
    --warning-dark:   #92400e;
    --warning-bg:     #fffbeb;
    --warning-bg-alt: #78350f;

    --info:           #3b82f6;
    --info-light:     #dbeafe;
    --info-dark:      #1e40af;
    --info-bg:        #eff6ff;
    --info-text-dark: #1e3a8a;

    --radius:         8px;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html { font-size: 16px; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--secondary);
    color: var(--text);
    line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 600;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover { color: var(--text); }


/* ================================================================
   LAYOUT
   ================================================================ */


.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.page-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.page-description {
    color: var(--text-light);
    font-size: 0.9rem;
}


/* ================================================================
   HEADER & NAV
   ================================================================ */
.app-header {
    background: white;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Top Bar */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .875rem 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: .6rem;
    text-decoration: none;
}
.logo-icon {
    width: 36px; height: 36px;
    background: var(--primary);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 10px rgba(5,150,105,.3);
    flex-shrink: 0;
}
.logo-icon i { color: white; font-size: 1.05rem; }
.logo-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -.3px;
    white-space: nowrap;
}
.logo-accent { color: var(--primary); }

/* User Section */
.user-section {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.user-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    font-size: .75rem;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    letter-spacing: .5px;
    box-shadow: 0 2px 8px rgba(5,150,105,.25);
    text-decoration: none;
    cursor: pointer;
    transition: opacity .15s;
}
.user-avatar:hover { opacity: .85;color: var(--primary-light); }

.user-info {
    text-align: right;
    line-height: 1.3;
}
.user-name {
    font-size: .875rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}
.role-badge {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    padding: .15rem .5rem;
    border-radius: 20px;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-top: .1rem;
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: white;
    color: var(--text-light);
    text-decoration: none;
    transition: all .15s;
    flex-shrink: 0;
    font-size: 1rem;
}
.btn-logout:hover {
    background: var(--error-bg);
    border-color: var(--error-border);
    color: var(--error-mid);
}

/* Navigation Wrapper — full width background */
.navbar-wrapper {
    width: 100%;
}

/* Navigation */
.navbar-menu {
    display: flex;
    padding: .5rem 1.5rem;
    gap: .35rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    max-width: 1200px;
    margin: 0 auto;
}
.navbar-menu::-webkit-scrollbar { display: none; }

.nav-item {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .875rem;
    border-radius: 10px;
    color: var(--text-light);
    text-decoration: none;
    font-size: .875rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all .15s;
    min-height: 38px;
    border: 1px solid transparent;
    cursor: pointer;
}
.nav-item i { font-size: .95rem; }
.nav-item:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: rgba(5,150,105,.15);
}
.nav-item--active {
    background: var(--primary);
    color: white !important;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(5,150,105,.3);
    border-color: var(--primary);
}
.nav-item--active:hover {
    background: var(--primary-dark);
    color: white !important;
}
.nav-item--active i { color: white !important; }


/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
    min-height: 38px;
    user-select: none;
    white-space: nowrap;
}

.btn--primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
.btn--primary:hover { background: var(--primary-dark); border-color: var(--primary-dark);color: var(--primary-light); }

.btn--secondary {
    background: white;
    color: var(--text);
    border-color: var(--border);
}
.btn--secondary:hover { background: var(--secondary); border-color: var(--text-lighter); }

.btn--danger {
    background: white;
    color: var(--error);
    border-color: var(--border);
}
.btn--danger:hover { background: var(--error-bg); border-color: var(--error); }

.btn--small {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    min-height: 32px;
}

.btn--block { width: 100%; }


/* ================================================================
   CARDS
   ================================================================ */
.card {
    background: white;
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text);
}


/* ================================================================
   FORMULARE
   ================================================================ */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 1rem;
}

.form-label,
.form-group label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-input,
.form-group input,
.form-group select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: inherit;
    background: white;
    transition: border-color 0.15s;
    min-height: 38px;
    -webkit-appearance: none;
    appearance: none;
}

.form-input:hover,
.form-group input:hover,
.form-group select:hover { border-color: var(--text-lighter); }

.form-input:focus,
.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(5,150,105,.1);
}

.form-input::placeholder,
.form-group input::placeholder { color: var(--text-lighter); }

.form-group input[readonly] { background: #f9fafb; color: var(--text-lighter); }

select.form-input,
.form-group select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23059669' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.1em 1.1em;
    padding-right: 2rem;
}

.hint {
    font-size: 0.75rem;
    color: var(--text-lighter);
}

.form-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
}


/* ================================================================
   ALERTS
   ================================================================ */
.alert {
    padding: 0.875rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.875rem;
    border-left: 3px solid;
}

.alert--success { background: var(--success-bg); border-color: var(--success); color: var(--success-dark); }
.alert--error   { background: var(--error-bg); border-color: var(--error);   color: var(--error-dark); }
.alert--warning { background: var(--warning-bg); border-color: var(--warning);  color: var(--warning-bg-alt); }


/* ================================================================
   TABELLEN
   ================================================================ */
.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    font-size: 0.875rem;
}

.table thead {
    background: var(--secondary);
    border-bottom: 1px solid var(--border);
}

.table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border);
}

.table tbody tr:hover { background: var(--primary-light); }
.table tr:last-child td { border-bottom: none; }


/* ================================================================
   BADGES & ICONS
   ================================================================ */
.badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge--entwurf      { background: var(--warning-light); color: var(--warning-dark); }
.badge--abgeschlossen { background: var(--primary-light); color: var(--success-dark); }

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    color: var(--text-light);
    background: transparent;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.9rem;
}
.icon-btn:hover { background: var(--secondary); color: var(--primary); }


/* ================================================================
   LOGIN
   ================================================================ */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}

.login-container {
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    width: 100%;
    max-width: 380px;
    padding: 2rem;
}

.login-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.login-logo   { font-size: 2.25rem; margin-bottom: 0.75rem; }
.login-title  { font-size: 1.375rem; font-weight: 700; color: var(--text); margin-bottom: 0.4rem; }
.login-subtitle { color: var(--text-light); font-size: 0.875rem; }


/* ================================================================
   FOOTER
   ================================================================ */
.app-footer {
    background: white;
    border-top: 1px solid var(--border);
    padding: 1.25rem 1.5rem;
    text-align: center;
    color: var(--text-lighter);
    font-size: 0.8rem;
    margin-top: 2rem;
}


/* ================================================================
   UTILITY
   ================================================================ */
.text-center { text-align: center; }
.text-muted  { color: var(--text-light); }


/* ================================================================
   STATS BAR
   ================================================================ */
.stats-bar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 1.25rem;
    box-shadow: 0 4px 12px rgba(5,150,105,0.15);
}

.stat {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    color: white;
}

.stat i { font-size: 1.75rem; opacity: 0.9; }
.stat-value { font-size: 1.5rem; font-weight: 700; }
.stat-label { font-size: 0.78rem; opacity: 0.85; margin-top: 0.15rem; }


/* ================================================================
   QUICK ACTIONS
   ================================================================ */
.quick-actions { margin-bottom: 1.5rem; }

.quick-actions-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.875rem;
}

.quick-action-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 0.875rem;
    text-align: center;
    color: var(--text);
    text-decoration: none;
    transition: all 0.15s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 120px;
}

.quick-action-card i { font-size: 1.5rem; color: var(--primary); }
.quick-action-card span { font-weight: 500; font-size: 0.875rem; }

.quick-action-card:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(5,150,105,0.1);
}


/* ================================================================
   WIZARD — Shell & Navigation
   ================================================================ */
.wiz-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Top Bar */
.wiz-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: white;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    height: 52px;
    flex-shrink: 0;
}

.wiz-topbar-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    overflow: hidden;
}

.wiz-logo {
    width: 28px; height: 28px;
    background: var(--primary);
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.wiz-logo i { color: white; font-size: 0.95rem; }

.wiz-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}

.wiz-subtitle {
    font-size: 0.78rem;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wiz-step-counter {
    font-size: 0.75rem;
    color: var(--text-light);
    background: var(--gray-100);
    padding: 0.2rem 0.55rem;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

.wiz-cancel {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.82rem;
    color: var(--text-light);
    text-decoration: none;
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: white;
    transition: all 0.15s;
    flex-shrink: 0;
    white-space: nowrap;
}
.wiz-cancel:hover { color: var(--error-mid); border-color: var(--error-border); background: #fff7f7; }

/* Progress Bar */
.wiz-progress {
    position: sticky;
    top: 52px;
    z-index: 99;
    height: 3px;
    background: var(--border);
    flex-shrink: 0;
}
.wiz-progress-fill {
    height: 3px;
    background: var(--primary);
    border-radius: 0 2px 2px 0;
    transition: width 0.3s ease;
}

/* Tab Navigation */
.wiz-tabs {
    position: sticky;
    top: 55px;
    z-index: 98;
    display: flex;
    background: white;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    flex-shrink: 0;
    scrollbar-width: none;
}
.wiz-tabs::-webkit-scrollbar { display: none; }

.wiz-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.6rem 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-lighter);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    min-width: 80px;
    transition: color 0.15s;
}
.wiz-tab:hover:not(.disabled) { color: var(--text); }
.wiz-tab.active  { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.wiz-tab.done    { color: var(--primary); }
.wiz-tab.disabled { opacity: 0.4; pointer-events: none; }

.wiz-tab-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px; height: 18px;
    border-radius: 50%;
    font-size: 0.68rem;
    font-weight: 700;
    background: var(--border);
    color: var(--text-lighter);
    flex-shrink: 0;
}
.wiz-tab.active .wiz-tab-num { background: var(--primary); color: white; }
.wiz-tab.done .wiz-tab-num   { background: var(--success-light); color: var(--primary); }

/* Content */
/* Container (normale Seiten) */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
    min-height: calc(100vh - 120px);
}

/* Wizard Body */
.wiz-body {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
}


/* ================================================================
   WIZARD — Formular-Elemente
   ================================================================ */
.section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-light);
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }

/* Obstgehölze Zeilen */
.row-obst {
    display: grid;
    grid-template-columns: 1fr 80px 80px 34px;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.35rem;
}

/* Inputs in .row-obst — gleiche Styles wie .form-group input */
.row-obst select,
.row-obst input {
    min-width: 0;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: inherit;
    background: white;
    transition: border-color 0.15s;
    min-height: 38px;
    -webkit-appearance: none;
    appearance: none;
}
.row-obst input:hover,
.row-obst select:hover { border-color: var(--text-lighter); }
.row-obst input:focus,
.row-obst select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(5,150,105,.1);
}
.row-obst select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23059669' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.1em 1.1em;
    padding-right: 2rem;
}

/* ── Searchable Obstgehölze Dropdown ── */
.obst-select-wrap { position: relative; width: 100%; }
.obst-search {
    width: 100%; min-width: 0;
    padding: .45rem .75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: .875rem;
    font-family: inherit;
    background: white;
    min-height: 38px;
    transition: border-color .15s;
    cursor: text;
}
.obst-search:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(5,150,105,.1); }
.obst-dropdown {
    position: absolute;
    top: calc(100% + 2px);
    left: 0; right: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
    max-height: 260px;
    overflow-y: auto;
    z-index: 9999;
}
.obst-group {
    padding: .3rem .75rem;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-lighter);
    background: #f9fafb;
    border-bottom: 1px solid var(--gray-100);
    position: sticky; top: 0;
}
.obst-option {
    padding: .4rem .75rem;
    font-size: .875rem;
    cursor: pointer;
    color: var(--text);
    border-bottom: 1px solid #f9fafb;
}
.obst-option:hover, .obst-option.highlighted { background: var(--primary-light); color: var(--primary); }
.obst-option.selected { font-weight: 600; color: var(--primary); }
.obst-no-results { padding: .75rem; font-size: .875rem; color: var(--text-lighter); text-align: center; }

.btn-del {
    width: 32px; height: 32px;
    background: none;
    border: 1px solid var(--error-border);
    border-radius: 6px;
    color: var(--error-mid);
    cursor: pointer;
    font-size: 1rem;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.btn-del:hover { background: var(--error-bg-deep); }

/* Wizard Navigation */
.wizard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}


/* ================================================================
   ABSCHLUSS-TAB (Tab 5)
   ================================================================ */

/* Kopfdaten */
.kopf-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}
.kopf-item {
    padding: 0.6rem 1rem;
    border-right: 1px solid var(--gray-100);
}
.kopf-item:last-child { border-right: none; }
.kopf-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-lighter); margin-bottom: 0.2rem; }
.kopf-val   { font-size: 0.9rem; font-weight: 600; color: var(--text); }

/* Gruppentrennlinie */
.gruppe-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-lighter);
    padding: 0.5rem 0 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.5rem;
}
.gruppe-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* Kategorie-Cards */
.kat-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 0.6rem;
    overflow: hidden;
}
.kat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 1rem;
    border-bottom: 1px solid var(--gray-100);
    background: #f9fafb;
}
.kat-card-titel {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
}
.kat-card-titel i { color: var(--primary); font-size: 0.95rem; }
.kat-card-summe {
    font-family: monospace;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary);
    background: var(--success-light);
    padding: 0.15rem 0.55rem;
    border-radius: 5px;
}
.kat-card-body { padding: 0.25rem 0; }

/* Detailzeilen */
.kat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 1rem;
    font-size: 0.82rem;
    gap: 1rem;
}
.kat-row + .kat-row { border-top: 1px solid #f9fafb; }
.kat-row-label { color: var(--text-light); flex: 1; }
.kat-row-val   { font-family: monospace; color: var(--text); white-space: nowrap; }
.kat-row-val.bold { font-weight: 700; }

/* Obstgehölze Tabelle */
.obst-table { width: 100%; font-size: 0.8rem; }
.obst-table th {
    padding: 0.35rem 1rem;
    text-align: left;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-lighter);
    background: #f9fafb;
    border-bottom: 1px solid var(--gray-100);
}
.obst-table td {
    padding: 0.4rem 1rem;
    border-bottom: 1px solid #f9fafb;
    color: var(--gray-700);
}
.obst-table tr:last-child td { border-bottom: none; }
.obst-table td.mono { font-family: monospace; text-align: right; }
.obst-table td.name { color: var(--text); font-weight: 500; }

/* Gesamtbox */
.gesamt-box {
    background: var(--success-bg-alt);
    border: 2px solid var(--primary);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1.25rem 0;
}
.gesamt-label  { font-size: 0.9rem; font-weight: 600; color: var(--success-dark); display: flex; align-items: center; gap: 0.4rem; }
.gesamt-betrag { font-size: 1.5rem; font-weight: 700; font-family: monospace; color: var(--primary); }

/* Unterschriften */
.sig-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.sig-container {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    background: white;
    cursor: crosshair;
    touch-action: none;
    overflow: hidden;
}
.sig-container canvas {
    display: block;
    width: 100%;
    height: 260px;
}
.sig-name {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    margin-bottom: 0.4rem;
}
.sig-footer { display: flex; gap: 0.5rem; margin-top: 0.4rem; align-items: center; }
.btn-clear-sig {
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.2rem 0.6rem;
    font-size: 0.78rem;
    cursor: pointer;
    color: var(--text-lighter);
}
.btn-clear-sig:hover { background: var(--error-bg-deep); border-color: var(--error-border); color: var(--error-mid); }
.sig-status { font-size: 0.75rem; color: var(--primary); }


/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (min-width: 768px) {
    .page-title { font-size: 2rem; }
}

@media (max-width: 1024px) {
    /* Wizard Tabs: nur Icons */
    .wiz-tab-label { display: none; }
    .wiz-tab { min-width: 50px; }
    .wiz-topbar { padding: 0 1rem; }
    .wiz-subtitle { display: none; }

    /* Nav: Icon + Label untereinander */
    .nav-item {
        flex-direction: column;
        gap: .2rem;
        padding: .4rem .6rem;
        min-height: 48px;
        font-size: .65rem;
        justify-content: center;
    }
    .nav-item i { font-size: 1.1rem; }
    .nav-label { font-size: .65rem; line-height: 1; }
}

@media (max-width: 768px) {
    /* Formulare */
    .form-grid-2,
    .form-grid-3 { grid-template-columns: 1fr; }
    .row-obst { grid-template-columns: 1fr 70px 70px 34px; }
}

@media (max-width: 640px) {
    /* Abschluss-Tab */
    .kopf-grid { grid-template-columns: 1fr 1fr; }
    .kopf-item { border-bottom: 1px solid var(--gray-100); }
    .kopf-item:nth-child(even) { border-right: none; }
    .sig-grid { grid-template-columns: 1fr; }
    .obst-table th:nth-child(3),
    .obst-table td:nth-child(3),
    .obst-table th:nth-child(4),
    .obst-table td:nth-child(4) { display: none; }
    .gesamt-betrag { font-size: 1.25rem; }
}

@media (max-width: 480px) {
    .page-title { font-size: 1.5rem; }
    .card { padding: 1rem; }
    .table th, .table td { padding: 0.625rem 0.5rem; }
    .form-buttons { flex-direction: column; }

    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.875rem;
        padding: 1rem;
    }
    .stat-value { font-size: 1.25rem; }

    .quick-actions-grid { grid-template-columns: repeat(2, 1fr); }
    .quick-action-card  { min-height: 100px; padding: 0.875rem; }
    .quick-action-card i { font-size: 1.35rem; }

    .foto-grid { grid-template-columns: repeat(3, 1fr); gap: .5rem; }
}


/* ================================================================
   BEWERTUNGSLISTE (bewertungen.php)
   ================================================================ */

/* Desktop: Tabelle sichtbar, Cards versteckt */
.bew-table-wrap { display: block; }
.bew-cards      { display: none; }

/* Tablet/Mobile: Cards sichtbar, Tabelle versteckt */
@media (max-width: 1100px) {
    .bew-table-wrap { display: none; }
    .bew-cards      { display: flex; flex-direction: column; gap: .75rem; }
}

.bew-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.bew-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: .5rem;
}
.bew-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}
.bew-card-sub {
    font-size: .8rem;
    color: var(--text-light);
    margin-top: .15rem;
}
.bew-card-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .35rem .75rem;
    font-size: .82rem;
}
.bew-card-meta-item  { display: flex; flex-direction: column; gap: .1rem; }
.bew-card-meta-label { font-size: .72rem; color: var(--text-light); text-transform: uppercase; letter-spacing: .04em; }
.bew-card-meta-val   { font-weight: 500; color: var(--text); }

.bew-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: .5rem;
    border-top: 1px solid var(--gray-100);
    gap: .5rem;
}
.bew-card-wert {
    font-family: monospace;
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
}
.bew-card-actions { display: flex; gap: .35rem; }

/* Such-/Filterbar */
.search-bar-grid { display: grid; grid-template-columns: 1fr 160px auto; gap: .75rem; align-items: end; }

/* Sichtbarkeit Mobile/Desktop */
.hide-mobile { display: inline; }
.show-mobile { display: none; }

@media (max-width: 600px) {
    .search-bar-grid { grid-template-columns: 1fr auto; }
    .search-bar-status { display: none; }
    .hide-mobile { display: none; }
    .show-mobile { display: inline; }
}


/* ── Tab-Navigation ── */
.tabs-nav-wrap {
    position: relative;
    margin-bottom: 1.5rem;
}
.tabs-nav-wrap::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 2px;
    width: 48px;
    background: linear-gradient(to right, transparent, white);
    pointer-events: none;
    border-radius: 0 var(--radius) 0 0;
}
.tabs-nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    border-bottom: 2px solid var(--border);
    overflow-x: scroll;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    will-change: scroll-position;
}
.tabs-nav::-webkit-scrollbar { display: none; }
.tabs-nav a {
    display: inline-block;
    padding: .5rem 1rem;
    font-size: .875rem;
    font-weight: 500;
    color: var(--text-light);
    text-decoration: none;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: var(--radius) var(--radius) 0 0;
    background: transparent;
    transition: background .15s, color .15s;
    position: relative;
    bottom: -2px;
}
.tabs-nav a:hover { background: var(--gray-100); color: var(--text); }
.tabs-nav a.active {
    background: white;
    color: var(--primary);
    border-color: var(--border);
    border-bottom-color: white;
    font-weight: 600;
}
.tab-badge {
    display: inline-block;
    font-size: .7rem;
    background: var(--gray-100);
    color: var(--text-light);
    border-radius: 10px;
    padding: 1px 6px;
    margin-left: 4px;
}
.tabs-nav a.active .tab-badge { background: var(--success-light); color: var(--primary); }


/* ================================================================
   PREISTABELLE (stammdaten-laubenpreise.php)
   ================================================================ */
.preis-table { width: 100%; border-collapse: collapse; }
.preis-table th {
    background: #f9fafb;
    font-size: .78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--text-light);
    padding: .6rem 1rem;
    border-bottom: 2px solid var(--border);
    text-align: left;
    white-space: nowrap;
}
.preis-table td {
    padding: .45rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.preis-table tr:last-child td { border-bottom: none; }
.preis-table tr:hover td { background: #f9fafb; }
.preis-table tr.band-sep td { border-top: 2px dashed var(--border); }

.preis-input {
    width: 110px;
    text-align: right;
    padding: .35rem .6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: .875rem;
    font-family: monospace;
    background: white;
    transition: border-color .15s;
}
.preis-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(5,150,105,.1);
}


/* ================================================================
   OBSTGEHÖLZE-TABELLE (stammdaten-obstgehoelze.php)
   ================================================================ */
.obst-table td.nr {
    color: var(--text-light);
    font-size: .8rem;
    width: 36px;
    text-align: center;
}

.f-name  { width: 100%; min-width: 220px; }
.f-unit  { width: 70px; text-align: center; }
.f-preis,
.f-pflege { width: 90px; text-align: right; font-family: monospace; }

.tbl-input {
    padding: .3rem .5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: .875rem;
    background: white;
    transition: border-color .15s;
    width: 100%;
}
.tbl-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(5,150,105,.1);
}

.pflege-ja { background: var(--success-light) !important; color: var(--success-dark); }

.pflege-btn {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .25rem .6rem;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: .8rem;
    cursor: pointer;
    background: white;
    color: var(--text-light);
    transition: all .15s;
    white-space: nowrap;
}
.pflege-btn.active {
    background: var(--success-light);
    border-color: var(--primary);
    color: var(--success-dark);
    font-weight: 600;
}


/* ================================================================
   MAXIMALWERTE-TABELLE (stammdaten-maximalwerte.php)
   ================================================================ */
.max-table { width: 100%; border-collapse: collapse; }
.max-table th {
    background: #f9fafb;
    font-size: .78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--text-light);
    padding: .6rem 1rem;
    border-bottom: 2px solid var(--border);
    text-align: left;
}
.max-table td {
    padding: .55rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.max-table tr:last-child td { border-bottom: none; }
.max-table tr:hover td { background: #f9fafb; }
.max-table tr.group-sep td { border-top: 2px solid var(--border); }

.sub { padding-left: 2rem !important; color: var(--text-light); font-size: .875rem; }

.num-input {
    width: 100px;
    text-align: right;
    padding: .35rem .6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: .875rem;
    font-family: monospace;
    background: white;
    transition: border-color .15s;
}
.num-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(5,150,105,.1);
}
.num-input:disabled {
    background: var(--gray-100);
    color: var(--text-light);
    cursor: not-allowed;
    border-color: var(--border);
}

.schluessel-select {
    padding: .35rem .6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: .85rem;
    background: white;
    color: var(--text);
    cursor: pointer;
}
.schluessel-select:focus { outline: none; border-color: var(--primary); }

/* Farbige Badges */
.badge--gruen { background: var(--success-light); color: var(--success-dark); }
.badge--blau  { background: var(--info-light); color: var(--info-dark); }
.badge--grau  { background: var(--gray-100); color: var(--text-light); }


/* ================================================================
   SAVE-BAR (Admin-Stammdaten)
   ================================================================ */
.save-bar {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    background: #f9fafb;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}


/* ================================================================
   DIVERSES
   ================================================================ */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.alert--info {
    background: var(--info-bg);
    border-color: var(--info);
    color: var(--info-text-dark);
}

.text-light { color: var(--text-light); }

.login-form { display: flex; flex-direction: column; gap: 1rem; }


/* ================================================================
   STAMMDATEN
   ================================================================ */
.stammdaten-grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 1.5rem;
    align-items: start;
}

.stammdaten-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .stammdaten-grid {
        grid-template-columns: 1fr;
    }
    .stammdaten-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .stammdaten-card .btn { width: 100%; justify-content: center; }
}


/* ================================================================
   FOTO-UPLOAD KOMPONENTE
   ================================================================ */

.foto-upload-box { margin-top: .5rem; }

/* Upload-Label / Drop-Zone */
.foto-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: 1.1rem 1rem;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    background: #fafafa;
    cursor: pointer;
    transition: all .15s;
    text-align: center;
    color: var(--text-light);
    margin-top: .75rem;
}
.foto-upload-label:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}
.foto-upload-label i     { font-size: 1.5rem; }
.foto-upload-label span  { font-size: .875rem; font-weight: 500; }
.foto-upload-label small { font-size: .75rem; color: var(--text-lighter); }

/* Foto-Grid */
.foto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: .75rem;
    margin-bottom: .5rem;
}

/* Einzelne Foto-Kachel */
.foto-thumb {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--gray-100);
    aspect-ratio: 4/3;
}
.foto-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
}
.foto-thumb-del {
    position: absolute;
    top: 4px; right: 4px;
    width: 26px; height: 26px;
    background: rgba(0,0,0,.55);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: .85rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s;
    line-height: 1;
}
.foto-thumb-del:hover { background: var(--error-mid); }

/* Upload-Fortschritt */
.foto-progress {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .5rem .75rem;
    background: var(--primary-light);
    border-radius: var(--radius);
    font-size: .82rem;
    color: var(--primary);
    margin-top: .5rem;
}
.foto-progress-bar {
    height: 4px;
    flex: 1;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}
.foto-progress-bar::after {
    content: '';
    position: absolute;
    left: -40%;
    top: 0; bottom: 0;
    width: 40%;
    background: var(--primary);
    border-radius: 2px;
    animation: progressSlide .8s linear infinite;
}
@keyframes progressSlide {
    to { left: 100%; }
}

/* Lightbox */
.foto-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.85);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.foto-lightbox.open { display: flex; }
.foto-lightbox img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: var(--radius);
    object-fit: contain;
}
.foto-lightbox-close {
    position: absolute;
    top: 1rem; right: 1rem;
    width: 40px; height: 40px;
    background: rgba(255,255,255,.15);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.foto-lightbox-close:hover { background: rgba(255,255,255,.3); }



/* ================================================================
   IPAD APP EXPERIENCE (Touch-Geräte 768–1366px)
   ================================================================ */
@media only screen
and (min-width: 768px)
and (max-width: 1366px)
and (pointer: coarse) {

    html { font-size: 18px !important; }

    .container, .wiz-body {
        max-width: 1000px !important;
        padding: 2rem !important;
    }

    /* Header */
    .header-top { padding: 1.1rem 2rem !important; max-width: 1200px !important; }
    .logo-icon  { width: 44px !important; height: 44px !important; }
    .logo-text  { font-size: 1.3rem !important; }
    .user-avatar { width: 44px !important; height: 44px !important; font-size: .9rem !important; }
    .user-name  { font-size: 1rem !important; }
    .role-badge { font-size: .78rem !important; }
    .btn-logout { width: 44px !important; height: 44px !important; font-size: 1.15rem !important; }

    /* Navigation */
    .navbar-menu { padding: .6rem 2rem !important; gap: .5rem !important; max-width: 1200px !important; }
    .nav-item { min-height: 48px !important; font-size: 1rem !important; padding: .6rem 1.1rem !important; border-radius: 12px !important; }

    /* Titel */
    .page-title { font-size: 2.25rem !important; }
    .page-description { font-size: 1rem !important; }

    /* Cards */
    .card { padding: 1.75rem !important; border-radius: 12px !important; }

    /* Formulare */
    .form-group { margin-bottom: 1.35rem !important; }
    .form-group label { font-size: 1rem !important; }
    .form-input,
    .form-group input,
    .form-group select,
    .row-obst input,
    .obst-search { min-height: 56px !important; font-size: 1.05rem !important; padding: .9rem 1rem !important; border-radius: 10px !important; }
    .hint { font-size: .9rem !important; }

    /* Buttons */
    .btn { min-height: 56px !important; font-size: 1rem !important; padding: .9rem 1.4rem !important; border-radius: 10px !important; }

    /* Wizard */
    .wiz-topbar { height: 64px !important; }
    .wiz-progress { top: 64px !important; }
    .wiz-tabs { top: 67px !important; }
    .wiz-title { font-size: 1.15rem !important; }
    .wiz-tab { min-height: 60px !important; font-size: .95rem !important; }
    .wiz-tab-num { width: 28px !important; height: 28px !important; font-size: .85rem !important; }
    .wizard-nav { margin-top: 2rem !important; padding-top: 1.5rem !important; }
    .section-title { font-size: 1rem !important; margin-bottom: 1.5rem !important; }

    /* Stats */
    .stats-bar { padding: 1.75rem !important; }
    .stat i { font-size: 2rem !important; }
    .stat-value { font-size: 1.8rem !important; }
    .stat-label { font-size: .9rem !important; }

    /* Quick Actions */
    .quick-action-card { min-height: 140px !important; }
    .quick-action-card i { font-size: 2rem !important; }
    .quick-action-card span { font-size: 1rem !important; }

    /* Tabellen */
    .table th, .table td { padding: 1rem !important; }

    /* Abschluss */
    .kat-card-titel { font-size: 1rem !important; }
    .kat-card-summe { font-size: 1rem !important; }
    .kat-row { font-size: .95rem !important; }
    .gesamt-betrag { font-size: 2rem !important; }


    /* Upload */
    .foto-upload-label { min-height: 140px !important; }
    .foto-upload-label i { font-size: 2rem !important; }
    .foto-upload-label span { font-size: 1rem !important; }

    /* Unterschriften */
    .sig-grid { grid-template-columns: 1fr !important; }

    /* Tabs Stammdaten */
    .tabs-nav a { min-height: 48px !important; display: flex !important; align-items: center !important; font-size: .95rem !important; }
}
/* ================================================================
   STAT CARDS (Dashboard index.php)
   ================================================================ */

.stat-cards {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    flex: 1;
    min-width: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1rem;
    display: flex;
    align-items: center;
    gap: .875rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    text-decoration: none;
    color: inherit;
    transition: box-shadow .15s;
}
.stat-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.stat-card__icon {
    font-size: 1.4rem;
    color: var(--primary);
    flex-shrink: 0;
    line-height: 1;
}
.stat-card__value {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1;
    color: var(--text);
}
.stat-card__label {
    font-size: .75rem;
    color: var(--text-light);
    margin-top: .2rem;
}

.stat-card--warn {
    border-color: #fde047;
    background: #fefce8;
}
.stat-card--warn .stat-card__icon,
.stat-card--warn .stat-card__value {
    color: #d97706;
}
.stat-card--warn:hover {
    background: #fef9c3;
    box-shadow: 0 2px 8px rgba(217,119,6,.15);
}

/* ── Tabellen-Hilfsklassen ── */
.col-right  { text-align: right; }
.col-center { text-align: center; }
.nowrap     { white-space: nowrap; }
.td-sm      { font-size: .875rem; }
.td-mono    { font-family: monospace; font-size: .875rem; }

.badge--green  { background: var(--success-light); color: var(--success-dark); }
.badge--yellow { background: var(--warning-light); color: var(--warning-dark); }

.card--flush {
    padding: 0;
    overflow: hidden;
}
.card--flush .card-header {
    padding: .875rem 1.25rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0;
}
.card--flush .card-header h3 {
    margin: 0;
    font-size: 1rem;
}
.card--flush .card-header h3 i {
    color: var(--primary);
}

.card-header__link {
    font-size: .82rem;
    color: var(--primary);
    text-decoration: none;
}

.card-header-row {
    padding: .875rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.card-header-row h3 {
    margin: 0;
    font-size: 1rem;
}
.card-header-row h3 i {
    color: var(--primary);
}

/* ── Abhaken / Eingangsqueue ── */
.badge-neu {
    display: inline-flex;
    align-items: center;
    font-size: .65rem;
    font-weight: 700;
    padding: .15rem .5rem;
    border-radius: 20px;
    background: var(--warning);
    color: white;
    vertical-align: middle;
    margin-left: .4rem;
    letter-spacing: .03em;
}

.btn-abhaken {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .78rem;
    font-weight: 600;
    padding: .25rem .6rem;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    transition: opacity .15s;
    white-space: nowrap;
}
.btn-abhaken:hover        { opacity: .8; }
.btn-abhaken--neu         { background: var(--warning-light); color: var(--warning-dark); }
.btn-abhaken--gesehen     { background: var(--success-light); color: var(--success-dark); }
.btn-abhaken--loading     { background: var(--gray-100); color: var(--text-light); pointer-events: none; }

/* ── Snackbar ── */
.snackbar {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    z-index: 99999;
    min-width: 300px;
    max-width: min(520px, calc(100vw - 2rem));
    background: #1f2937;
    color: white;
    border-radius: 12px;
    padding: .875rem 1rem;
    display: flex;
    align-items: center;
    gap: .75rem;
    box-shadow: 0 8px 32px rgba(0,0,0,.25), 0 2px 8px rgba(0,0,0,.15);
    transition: transform .35s cubic-bezier(.34,1.56,.64,1), opacity .25s ease;
    opacity: 0;
    overflow: hidden;
}
.snackbar.snackbar--show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
.snackbar.snackbar--hide {
    transform: translateX(-50%) translateY(120%);
    opacity: 0;
    transition: transform .25s ease, opacity .2s ease;
}
.snackbar__icon  { font-size: 1.1rem; flex-shrink: 0; line-height: 1; }
.snackbar__msg   { flex: 1; font-size: .875rem; font-weight: 500; line-height: 1.4; }
.snackbar__close {
    background: none; border: none; color: rgba(255,255,255,.5);
    cursor: pointer; font-size: .85rem; padding: .2rem; flex-shrink: 0; line-height: 1; transition: color .15s;
}
.snackbar__close:hover { color: white; }
.snackbar__progress {
    position: absolute; bottom: 0; left: 0; height: 3px;
    border-radius: 0 0 12px 12px; width: 100%;
    transform-origin: left; transform: scaleX(1); transition: transform linear;
}
.snackbar--success { background: var(--success-dark); }
.snackbar--success .snackbar__progress { background: var(--success); }
.snackbar--success .snackbar__icon     { color: var(--success); }
.snackbar--error   { background: var(--error-dark); }
.snackbar--error .snackbar__progress   { background: var(--error-mid); }
.snackbar--error .snackbar__icon       { color: var(--error-mid); }
.snackbar--warning { background: var(--warning-bg-alt); }
.snackbar--warning .snackbar__progress { background: var(--warning); }
.snackbar--warning .snackbar__icon     { color: var(--warning); }
.snackbar--info    { background: var(--info-text-dark); }
.snackbar--info .snackbar__progress    { background: var(--info); }
.snackbar--info .snackbar__icon        { color: var(--info); }

@media (max-width: 480px) {
    .snackbar {
        bottom: 1rem; min-width: 0;
        left: 1rem; right: 1rem;
        transform: translateX(0) translateY(120%);
        max-width: none;
    }
    .snackbar.snackbar--show { transform: translateX(0) translateY(0); }
    .snackbar.snackbar--hide { transform: translateX(0) translateY(120%); }
}

/* ── Gutachter-Transfer Button ── */
.btn-user-transfer {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px; height: 22px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: white;
    color: var(--text-light);
    cursor: pointer;
    font-size: .75rem;
    margin-left: .25rem;
    vertical-align: middle;
    transition: all .15s;
}
.btn-user-transfer:hover {
    background: var(--info-bg);
    border-color: var(--info-light);
    color: var(--info);
}

/* iPad stat-cards */
@media only screen and (min-width: 768px) and (max-width: 1366px) and (pointer: coarse) {
    .stat-cards       { gap: 1.25rem; }
    .stat-card        { padding: 1.5rem 1.25rem; }
    .stat-card__icon  { font-size: 1.75rem; }
    .stat-card__value { font-size: 2rem; }
    .stat-card__label { font-size: .9rem; }
}

@media (max-width: 480px) {
    .stat-cards       { flex-wrap: wrap; gap: .75rem; }
    .stat-card        { flex: 1 1 calc(50% - .375rem); }
    .stat-card__value { font-size: 1.35rem; }
}