/* ================================================================== */
/* postkarten-pxl — Pixel Ads GmbH Dashboard                         */
/* ================================================================== */

:root {
    /* Markenfarben */
    --schwarz:        #333333;
    --gold:           #f6ab17;
    --rot:            #d21f27;
    --gold-hover:     #e88c14;
    --rot-hover:      #ae1b26;
    --beige:          #faf8f3;

    /* Abgeleitete Farben */
    --white:          #ffffff;
    --gray-50:        #f9fafb;
    --gray-100:       #f3f4f6;
    --gray-200:       #e5e7eb;
    --gray-300:       #d1d5db;
    --gray-400:       #9ca3af;
    --gray-500:       #6b7280;
    --gray-600:       #4b5563;
    --gray-700:       #374151;
    --text:           var(--schwarz);
    --text-muted:     var(--gray-500);
    --border:         var(--gray-200);
    --bg:             var(--beige);
    --card-bg:        var(--white);

    /* Status */
    --success:        #16a34a;
    --success-bg:     #f0fdf4;
    --warn:           #ca8a04;
    --warn-bg:        #fefce8;
    --info:           #2563eb;
    --info-bg:        #eff6ff;
    --danger:         var(--rot);
    --danger-bg:      #fef2f2;

    /* Schatten */
    --shadow-sm:      0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow:         0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md:      0 4px 6px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-lg:      0 10px 15px rgba(0, 0, 0, 0.08), 0 4px 6px rgba(0, 0, 0, 0.04);

    /* Radien */
    --radius:         8px;
    --radius-sm:      4px;
    --radius-lg:      12px;

    /* Typografie */
    --font:           'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-mono:      'SF Mono', 'Cascadia Code', 'Fira Code', Consolas, monospace;
}

/* ================================================================== */
/* Reset + Basis                                                      */
/* ================================================================== */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 15px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.5;
    min-height: 100vh;
}

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

img {
    display: block;
    max-width: 100%;
}

/* ================================================================== */
/* Hilfklassen                                                        */
/* ================================================================== */

.mt-sm  { margin-top: 0.5rem; }
.mt-md  { margin-top: 1rem; }
.mt-lg  { margin-top: 1.5rem; }
.mb-sm  { margin-bottom: 0.5rem; }
.mb-md  { margin-bottom: 1rem; }
.mb-lg  { margin-bottom: 1.5rem; }
.ml-md  { margin-left: 1rem; }
.hidden { display: none !important; }

/* ================================================================== */
/* Header                                                             */
/* ================================================================== */

.app-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: var(--schwarz);
    color: var(--white);
    padding: 0 1.5rem;
    height: 56px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.header-logo img {
    height: 30px;
    width: auto;
}

.header-title {
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0.9;
}

.header-nav {
    display: flex;
    gap: 0;
    margin-left: 2rem;
    overflow-x: auto;
    flex: 1;
}

.nav-tab {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0 1rem;
    height: 56px;
    display: flex;
    align-items: center;
    border-bottom: 3px solid transparent;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
    text-decoration: none;
}

.nav-tab:hover {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

.nav-tab.active {
    color: var(--white);
    border-bottom-color: var(--gold);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
    margin-left: auto;
}

.header-user {
    font-size: 0.8125rem;
    opacity: 0.7;
}

/* ================================================================== */
/* Main                                                               */
/* ================================================================== */

.app-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* ================================================================== */
/* Tab-Panels                                                         */
/* ================================================================== */

.tab-panel {
    display: none;
}
.tab-panel.active {
    display: block;
}

/* ================================================================== */
/* Page Header                                                        */
/* ================================================================== */

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

.page-header h2 {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--schwarz);
}

/* ================================================================== */
/* Cards                                                              */
/* ================================================================== */

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem;
    border: 1px solid var(--border);
}

.card-heading {
    font-size: 1rem;
    font-weight: 600;
    color: var(--schwarz);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-100);
}

/* ================================================================== */
/* Statistik-Karten                                                   */
/* ================================================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.stats-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--schwarz);
    line-height: 1.2;
}

.stat-success { color: var(--success); }
.stat-warn    { color: var(--warn); }
.stat-info    { color: var(--info); }
.stat-danger  { color: var(--danger); }

/* ================================================================== */
/* Tabellen                                                           */
/* ================================================================== */

.table-scroll {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table th {
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    padding: 0.625rem 0.75rem;
    border-bottom: 2px solid var(--gray-200);
    white-space: nowrap;
    user-select: none;
}

.data-table th.sortable {
    cursor: pointer;
}
.data-table th.sortable:hover {
    color: var(--schwarz);
}
.data-table th.sortable::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 0.375rem;
    vertical-align: middle;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid var(--gray-300);
}
.data-table th.sort-asc::after {
    border-top: none;
    border-bottom: 4px solid var(--schwarz);
}
.data-table th.sort-desc::after {
    border-top: 4px solid var(--schwarz);
}

.data-table td {
    padding: 0.625rem 0.75rem;
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}

.data-table tbody tr:hover {
    background: var(--gray-50);
}

.data-table tbody tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.015);
}
.data-table tbody tr:nth-child(even):hover {
    background: var(--gray-50);
}

.table-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem 1rem !important;
    font-style: italic;
}

.table-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

/* ================================================================== */
/* Buttons                                                            */
/* ================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    font-family: var(--font);
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem 1.125rem;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
    white-space: nowrap;
    line-height: 1.4;
}
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--gold);
    color: var(--schwarz);
    border-color: var(--gold);
}
.btn-primary:hover:not(:disabled) {
    background: var(--gold-hover);
    border-color: var(--gold-hover);
}

.btn-danger {
    background: var(--rot);
    color: var(--white);
    border-color: var(--rot);
}
.btn-danger:hover:not(:disabled) {
    background: var(--rot-hover);
    border-color: var(--rot-hover);
}

.btn-outline {
    background: transparent;
    color: var(--schwarz);
    border-color: var(--gray-300);
}
.btn-outline:hover:not(:disabled) {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.btn-outline-light {
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    border-color: rgba(255, 255, 255, 0.3);
    padding: 0.3rem 0.75rem;
    font-size: 0.8125rem;
}
.btn-outline-light:hover:not(:disabled) {
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.6);
}

.btn-sm {
    font-size: 0.75rem;
    padding: 0.25rem 0.625rem;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    padding: 0.375rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    line-height: 1;
}
.btn-icon:hover {
    background: var(--gray-100);
    color: var(--schwarz);
}

/* ================================================================== */
/* Formulare                                                          */
/* ================================================================== */

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    flex: 1;
    min-width: 0;
}

.form-group label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-600);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="url"],
.form-group select,
.form-group textarea {
    font-family: var(--font);
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--text);
    transition: border-color 0.15s, box-shadow 0.15s;
    width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(246, 171, 23, 0.15);
}

.form-group input::placeholder {
    color: var(--gray-400);
}

.form-group input[type="range"] {
    appearance: auto;
    accent-color: var(--gold);
}

.form-row {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.form-group-btn {
    flex: 0 0 auto;
    justify-content: flex-end;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.checkbox-group {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    padding-top: 0.25rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    accent-color: var(--gold);
    width: 16px;
    height: 16px;
}

/* ================================================================== */
/* Badges                                                             */
/* ================================================================== */

.badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.2rem 0.5rem;
    border-radius: 9999px;
    white-space: nowrap;
}

.badge-success {
    background: var(--success-bg);
    color: var(--success);
}
.badge-warn {
    background: var(--warn-bg);
    color: var(--warn);
}
.badge-info {
    background: var(--info-bg);
    color: var(--info);
}
.badge-danger {
    background: var(--danger-bg);
    color: var(--danger);
}
.badge-muted {
    background: var(--gray-100);
    color: var(--gray-500);
}

/* ================================================================== */
/* Modal                                                              */
/* ================================================================== */

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 200;
    align-items: center;
    justify-content: center;
}
.modal-overlay.open {
    display: flex;
}

.modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
}

.modal-header h3 {
    font-size: 1.125rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
.modal-close:hover {
    color: var(--schwarz);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--gray-100);
    margin-top: 1rem;
}

/* ================================================================== */
/* Pagination                                                         */
/* ================================================================== */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding-top: 1rem;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.5rem;
    font-family: var(--font);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text);
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.page-btn:hover:not(:disabled):not(.page-btn-active) {
    background: var(--gray-50);
    border-color: var(--gray-300);
}
.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.page-btn-active {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--schwarz);
    font-weight: 700;
}
.page-btn-ellipsis {
    border: none;
    background: none;
    cursor: default;
    color: var(--gray-400);
}

/* ================================================================== */
/* Fortschrittsbalken                                                 */
/* ================================================================== */

.progress-bar-container {
    margin: 0.5rem 0;
}

.progress-bar {
    height: 10px;
    background: var(--gray-200);
    border-radius: 9999px;
    overflow: hidden;
    display: flex;
}

.progress-bar-fill {
    height: 100%;
    transition: width 0.4s ease;
    border-radius: 9999px;
}

.progress-bar-primary {
    background: var(--gold);
}

.progress-bar-generiert {
    background: var(--gold);
}

.progress-bar-geschrieben {
    background: var(--success);
}

.progress-bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.375rem;
}

/* ================================================================== */
/* Fortschrittsschritte (Kundenansicht)                               */
/* ================================================================== */

.progress-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 1.5rem 0;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--gray-400);
}
.progress-step-done {
    color: var(--success);
}

.progress-step-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--gray-200);
    border: 3px solid var(--gray-300);
}
.progress-step-done .progress-step-dot {
    background: var(--success);
    border-color: var(--success);
}

.progress-step-line {
    flex: 1;
    height: 3px;
    background: var(--gray-200);
    min-width: 40px;
    margin-bottom: 1.5rem;
}
.progress-step-line-done {
    background: var(--success);
}

/* ================================================================== */
/* Filter-Bar                                                         */
/* ================================================================== */

.filter-bar {
    padding: 1rem 1.25rem;
}

.filter-bar .form-row {
    flex-wrap: wrap;
}

/* ================================================================== */
/* Maschine-Status                                                    */
/* ================================================================== */

.machine-status {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.9375rem;
}

.machine-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.machine-online {
    background: var(--success);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2);
}

.machine-offline {
    background: var(--gray-300);
}

.machine-busy {
    background: var(--gold);
    box-shadow: 0 0 0 3px rgba(246, 171, 23, 0.2);
}

/* ================================================================== */
/* Settings-Grid                                                      */
/* ================================================================== */

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* ================================================================== */
/* Scan-Live                                                          */
/* ================================================================== */

.scan-live-page .scan-controls {
    display: flex;
    gap: 0.5rem;
}

.scan-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.scan-phase {
    font-weight: 600;
    font-size: 0.9375rem;
}

.scan-counter {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.scan-current {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.scan-log {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    line-height: 1.6;
    background: var(--schwarz);
    color: #e0e0e0;
    padding: 1rem;
    border-radius: var(--radius-sm);
    max-height: 320px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

/* ================================================================== */
/* Toast-Benachrichtigungen                                           */
/* ================================================================== */

.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 300;
    display: flex;
    flex-direction: column-reverse;
    gap: 0.5rem;
}

.toast {
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: var(--shadow-md);
    animation: toastIn 0.25s ease;
    max-width: 400px;
}

.toast-success {
    background: var(--success);
    color: var(--white);
}

.toast-error {
    background: var(--rot);
    color: var(--white);
}

.toast-info {
    background: var(--schwarz);
    color: var(--white);
}

.toast-out {
    animation: toastOut 0.2s ease forwards;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(12px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(8px); }
}

/* ================================================================== */
/* Flash-Nachrichten                                                  */
/* ================================================================== */

.flash-container {
    margin-bottom: 1rem;
}

.flash {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.flash-error   { background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(210, 31, 39, 0.15); }
.flash-success { background: var(--success-bg); color: var(--success); border: 1px solid rgba(22, 163, 74, 0.15); }
.flash-info    { background: var(--info-bg); color: var(--info); border: 1px solid rgba(37, 99, 235, 0.15); }

/* ================================================================== */
/* Hint / Hilfstext                                                   */
/* ================================================================== */

.hint-text {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.save-status {
    font-size: 0.8125rem;
    color: var(--success);
    font-weight: 500;
}

/* ================================================================== */
/* Login-Seite                                                        */
/* ================================================================== */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--beige);
}

.login-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.login-heading {
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.login-subheading {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.login-error {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid rgba(210, 31, 39, 0.15);
    border-radius: var(--radius-sm);
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    text-align: left;
}

.login-form .form-group {
    text-align: left;
    margin-bottom: 1rem;
}

.login-form .btn-block {
    margin-top: 0.5rem;
}

.login-footer {
    margin-top: 1.5rem;
    font-size: 0.75rem;
    color: var(--gray-400);
}

/* ================================================================== */
/* Kundenansicht                                                      */
/* ================================================================== */

.kunde-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--beige);
}

.kunde-header {
    display: flex;
    justify-content: center;
    padding: 2rem 1rem 1rem;
}

.kunde-main {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 0 1rem 2rem;
}

.kunde-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2.5rem;
    width: 100%;
    max-width: 640px;
}

.kunde-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.kunde-subtitle {
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.kunde-status-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.kunde-branche {
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-transform: capitalize;
}

.kunde-section-heading {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--schwarz);
}

.kunde-progress-section {
    margin-bottom: 2rem;
}

.kunde-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    text-align: center;
}

.kunde-stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem;
    border-radius: var(--radius);
    background: var(--beige);
}

.kunde-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--schwarz);
}

.kunde-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.kunde-footer {
    text-align: center;
    padding: 1.5rem;
    font-size: 0.8125rem;
    color: var(--gray-400);
}

/* ================================================================== */
/* Responsive                                                         */
/* ================================================================== */

@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .app-header {
        flex-wrap: wrap;
        height: auto;
        padding: 0.75rem 1rem;
        gap: 0.5rem;
    }

    .header-nav {
        order: 3;
        width: 100%;
        margin-left: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-top: 0.5rem;
    }

    .nav-tab {
        height: auto;
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
        border-bottom-width: 2px;
    }

    .app-main {
        padding: 1rem;
    }

    .form-row {
        flex-direction: column;
        gap: 0.75rem;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .stats-grid,
    .stats-grid-4 {
        grid-template-columns: 1fr 1fr;
    }

    .kunde-stats {
        grid-template-columns: 1fr;
    }

    .progress-steps {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .progress-step-line {
        display: none;
    }

    .modal {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
    }

    .scan-live-page .scan-controls {
        flex-wrap: wrap;
    }
}
