/**
 * CRM & ERP System - Stylesheet
 */

/* ===== CSS Variables ===== */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;
    
    --bg-color: #f1f5f9;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    
    --sidebar-width: 260px;
    --header-height: 70px;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 12px;
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-color);
    background-color: var(--bg-color);
    min-height: 100vh;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    color: var(--primary-dark);
}

/* ===== Login Page ===== */
.login-page {
    background: radial-gradient(circle at top right, #1f4fb3 0%, #0d2352 45%, #08152f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-container {
    width: 100%;
    max-width: 980px;
    padding: 20px;
}

.login-box {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(2, 8, 23, 0.35);
}

.login-brand-panel {
    background: linear-gradient(170deg, #f8fbff 0%, #e8f1ff 100%);
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid #dbe7ff;
}

.login-brand-image {
    width: 100%;
    max-width: 360px;
    margin-bottom: 18px;
    object-fit: contain;
}

.login-brand-panel h1 {
    font-size: 34px;
    line-height: 1.1;
    color: #0f2a5f;
    margin: 0 0 8px;
}

.login-brand-panel p {
    color: #2452aa;
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 600;
}

.login-brand-panel small {
    color: #334155;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.login-form-panel {
    padding: 42px 34px;
}

.login-form-panel h2 {
    margin: 0 0 6px;
    font-size: 28px;
    color: #0f172a;
}

.login-subtitle {
    color: #64748b;
    margin: 0 0 18px;
}

.login-info {
    margin-top: 20px;
    padding: 14px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    font-size: 12px;
    color: #475569;
}

.login-info p {
    margin: 3px 0;
}

.login-form-panel .form-group input {
    height: 44px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
}

.login-form-panel .form-group input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.login-form-panel .btn.btn-primary {
    height: 44px;
    border-radius: 10px;
    font-weight: 700;
}

/* ===== Header ===== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0;
    text-decoration: none;
    cursor: pointer;
    height: calc(var(--header-height) - 8px);
    width: 180px;
    max-width: 38vw;
    overflow: hidden;
}
.logo:hover {
    opacity: 0.9;
}

.logo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-menu {
    position: relative;
}

.user-name {
    cursor: pointer;
    padding: 8px 12px;
    border-radius: var(--radius);
    transition: background 0.2s;
}

.user-name:hover {
    background: var(--bg-color);
}

.user-name small {
    color: var(--text-muted);
}

.user-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    margin-top: 5px;
}

.user-menu:hover .user-dropdown {
    display: block;
}

.user-dropdown a {
    display: block;
    padding: 10px 15px;
    color: var(--text-color);
}

.user-dropdown a:hover {
    background: var(--bg-color);
}

/* ===== Navigation ===== */
.main-navigation {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    background: var(--card-bg);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    z-index: 100;
}

.nav-menu {
    list-style: none;
    padding: 15px 0;
}

.nav-item {
    margin: 2px 10px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: var(--text-color);
    border-radius: var(--radius);
    transition: all 0.2s;
}

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

.nav-item.active .nav-link {
    background: var(--primary-color);
    color: white;
}

.nav-inline-tabs {
    margin: 6px 10px 12px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.nav-inline-tab {
    display: inline-block;
    padding: 6px 10px;
    font-size: 0.84rem;
    text-decoration: none;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: #fff;
}
.nav-inline-tab:hover {
    color: var(--primary-color);
    border-color: #bcd6ff;
    background: #eef4ff;
}
.nav-inline-tab.active {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
}

.nav-group-head {
    display: flex;
    align-items: stretch;
    gap: 0;
    border-radius: var(--radius);
    overflow: hidden;
}

.nav-group-head > .nav-link {
    flex: 1;
    min-width: 0;
}

.nav-group-chevron {
    flex: 0 0 38px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.2s, color 0.2s, transform 0.2s;
    border-radius: 0 var(--radius) var(--radius) 0;
}

.nav-group-chevron::before {
    content: '▼';
    display: block;
    transform: rotate(0deg);
    transition: transform 0.2s ease;
}

.nav-item-group:not(.is-expanded) .nav-group-chevron::before {
    transform: rotate(-90deg);
}

.nav-group-chevron:hover {
    background: var(--bg-color);
    color: var(--primary-color);
}

.nav-item-group.active .nav-group-chevron {
    color: rgba(255, 255, 255, 0.85);
}

.nav-item-group.active .nav-group-chevron:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.nav-item-group.active > .nav-group-head {
    background: var(--primary-color);
}

.nav-item-group.active > .nav-group-head > a.nav-link {
    background: transparent;
    color: white;
}

.nav-admin-label.nav-link {
    flex: 1;
    cursor: default;
    pointer-events: none;
}

.nav-item-group.active > .nav-group-head > .nav-admin-label.nav-link {
    background: transparent;
    color: white;
}

.nav-item-group .nav-submenu {
    list-style: none;
    margin: 4px 0 6px 0;
    padding: 4px 0 0 0;
    margin-left: 22px;
    display: none;
    gap: 6px;
    flex-wrap: wrap;
    border-left: 2px solid var(--border-color);
    padding-left: 8px;
}

.nav-item-group.is-expanded .nav-submenu {
    display: flex;
}

.nav-item-group .nav-sublink {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    font-size: 0.92em;
    color: var(--text-color);
    opacity: 0.92;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: #fff;
    white-space: nowrap;
}

.nav-item-group .nav-sublink .nav-icon {
    display: none;
}

.nav-item-group .nav-subitem.active .nav-sublink,
.nav-item-group .nav-sublink:hover {
    background: #e9f2ff;
    color: var(--primary-color);
    opacity: 1;
    border-color: #bcd6ff;
}

.nav-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.nav-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 24px;
    min-width: 24px;
}

.nav-count-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--danger-color);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--card-bg);
    font-variant-numeric: tabular-nums;
    pointer-events: none;
}

.nav-item.active .nav-count-badge {
    box-shadow: 0 0 0 2px var(--primary-color);
}

/* ===== Main Content ===== */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    padding: 25px;
    min-height: calc(100vh - var(--header-height));
}

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

.page-header h1 {
    font-size: 24px;
    font-weight: 600;
}

.page-actions {
    display: flex;
    gap: 10px;
}

/* ===== Data-Table Enhancements ===== */
.table-bulk-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 8px 0;
    padding: 8px 10px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}
.table-bulk-left {
    font-size: 0.9rem;
    color: #374151;
}
.table-bulk-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.table-select-col {
    width: 34px;
    text-align: center;
}
.data-table tr.row-selected {
    background: #eef6ff !important;
}
.sortable-th {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 18px !important;
}
.sortable-th::after {
    content: '↕';
    position: absolute;
    right: 6px;
    color: #9ca3af;
    font-size: 0.8rem;
}
.sortable-th.sort-asc::after {
    content: '↑';
    color: var(--primary-color);
}
.sortable-th.sort-desc::after {
    content: '↓';
    color: var(--primary-color);
}

/* ===== Invoice/Order Summary Bar ===== */
.invoice-summary-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.invoice-summary-year .inline-form {
    display: flex;
    align-items: center;
    gap: 8px;
}
.invoice-summary-year label {
    font-size: 0.9rem;
    color: var(--text-muted);
}
.invoice-summary-year select {
    min-width: 92px;
    padding: 6px 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: #fff;
}
.invoice-summary-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.summary-chip {
    font-size: 0.82rem;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid transparent;
    white-space: nowrap;
}
.summary-chip-green { background: #e8f7ea; border-color: #b6e3be; color: #1e7e34; }
.summary-chip-red { background: #fdecec; border-color: #f0c1c1; color: #b02a37; }
.summary-chip-yellow { background: #fff7e3; border-color: #f2df9a; color: #8a6d00; }
.summary-chip-blue { background: #e9f2ff; border-color: #bdd7ff; color: #245fbd; }

.invoice-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}
.invoice-status-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    padding: 8px 10px;
}
.invoice-status-label {
    font-size: 0.86rem;
    color: #374151;
}
.invoice-status-label span {
    color: #9ca3af;
    font-size: 0.8rem;
}
.invoice-status-value {
    margin-top: 3px;
    font-weight: 700;
    color: #111827;
}
.invoice-card-open { border-left: 4px solid #ef4444; }
.invoice-card-paid { border-left: 4px solid #22c55e; }
.invoice-card-partial { border-left: 4px solid #f59e0b; }
.invoice-card-overdue { border-left: 4px solid #dc2626; }
.invoice-card-draft { border-left: 4px solid #6b7280; }
.order-card-draft { border-left: 4px solid #9ca3af; }
.order-card-confirmed { border-left: 4px solid #3b82f6; }
.order-card-progress { border-left: 4px solid #f59e0b; }
.order-card-completed { border-left: 4px solid #22c55e; }
.order-card-cancelled { border-left: 4px solid #ef4444; }

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

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

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #475569;
    color: white;
}

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

.btn-warning {
    background: var(--warning-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

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

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
}

.btn-link {
    background: transparent;
    color: var(--primary-color);
}

.btn-link:hover {
    text-decoration: underline;
}

/* ===== Alerts ===== */
.alert {
    padding: 15px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-info {
    background: #cffafe;
    color: #155e75;
    border: 1px solid #a5f3fc;
}

/* ===== Filter Bar ===== */
.filter-bar {
    background: var(--card-bg);
    padding: 15px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.filter-bar form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
}

.filter-group input,
.filter-group select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
}

/* ===== Data Table ===== */
.data-table-container {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: var(--bg-color);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tbody tr:hover {
    background: #f8fafc;
}

.data-table .actions {
    display: flex;
    gap: 5px;
}

.data-table .text-center {
    text-align: center;
    color: var(--text-muted);
    padding: 30px;
}

/* ===== Status Badges ===== */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-active {
    background: #d1fae5;
    color: #065f46;
}

.status-inactive {
    background: #e2e8f0;
    color: #475569;
}

.status-prospect {
    background: #dbeafe;
    color: #1e40af;
}

.status-draft {
    background: #f3f4f6;
    color: #6b7280;
}

.status-sent {
    background: #dbeafe;
    color: #1e40af;
}

.status-accepted,
.status-confirmed,
.status-paid {
    background: #d1fae5;
    color: #065f46;
}

.status-paid-skonto {
    background: #dcfce7;
    color: #14532d;
    border: 1px solid #86efac;
}

.status-rejected,
.status-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.status-in_progress {
    background: #fef3c7;
    color: #92400e;
}

.status-overdue {
    background: #fee2e2;
    color: #991b1b;
}

.status-partially_paid {
    background: #fef3c7;
    color: #92400e;
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.page-info {
    color: var(--text-muted);
}

/* ===== Forms ===== */
.form-container {
    background: var(--card-bg);
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.form-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
}

.form-section {
    margin-bottom: 25px;
}

.form-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 13px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
}

/* ===== Detail View ===== */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.detail-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.detail-card.full-width {
    grid-column: 1 / -1;
}

.detail-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-color);
}

.detail-table {
    width: 100%;
}

.detail-table th,
.detail-table td {
    padding: 8px 0;
    text-align: left;
}

.detail-table th {
    width: 40%;
    color: var(--text-muted);
    font-weight: 500;
}

/* ===== Notes ===== */
.note-form {
    margin-bottom: 20px;
}

.notes-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.note-item {
    padding: 15px;
    background: var(--bg-color);
    border-radius: var(--radius);
}

.note-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.note-author {
    font-weight: 500;
}

.note-content {
    color: var(--text-color);
}

/* ===== Dashboard Cards ===== */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-icon.blue {
    background: #dbeafe;
}

.stat-icon.green {
    background: #d1fae5;
}

.stat-icon.red {
    background: #fee2e2;
}

.stat-icon.yellow {
    background: #fef3c7;
}

.stat-info h4 {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 5px;
}

.stat-info p {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-color);
}

/* Kompakte Wartungs-Kacheln (z. B. Dashboard-Widgets) */
.dashboard-stats.dashboard-stats--compact {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.dashboard-stats.dashboard-stats--compact .stat-card {
    padding: 16px;
    gap: 12px;
}

.dashboard-stats.dashboard-stats--compact .stat-icon {
    width: 44px;
    height: 44px;
    font-size: 20px;
}

.dashboard-stats.dashboard-stats--compact .stat-info h4 {
    font-size: 13px;
}

.dashboard-stats.dashboard-stats--compact .stat-info p {
    font-size: 22px;
}

.dashboard-widget .dashboard-stats.dashboard-stats--compact {
    margin-bottom: 12px;
}

a.stat-card.stat-card--link {
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}

a.stat-card.stat-card--link:hover {
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

a.dash-mini-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 8px;
}

a.dash-mini-card-link:hover .dash-mini-card {
    border-color: #bcd6ff;
    box-shadow: var(--shadow-sm);
}

a.ov-line-link {
    display: block;
    text-decoration: none;
    color: inherit;
    margin: 8px 0;
    border-radius: 6px;
    padding: 4px 6px;
    margin-left: -6px;
    margin-right: -6px;
}

a.ov-line-link:hover {
    background: #f8fafc;
}

a.pill--dash-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

a.pill--dash-link:hover {
    border-color: #bcd6ff;
}

/* ===== Footer ===== */
.main-footer {
    margin-left: var(--sidebar-width);
    padding: 20px 25px;
    border-top: 1px solid var(--border-color);
    background: var(--card-bg);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 12px;
}

/* ===== Print Styles ===== */
@media print {
    .main-header,
    .main-navigation,
    .main-footer,
    .page-actions,
    .filter-bar,
    .actions {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0;
        margin-top: 0;
    }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    :root {
        --header-height: 55px;
    }

    .logo-image {
        width: 100%;
        height: 100%;
    }

    .logo {
        width: 100px;
        max-width: 52vw;
    }

    .login-box {
        grid-template-columns: 1fr;
    }

    .login-brand-panel {
        border-right: 0;
        border-bottom: 1px solid #dbe7ff;
        padding: 26px 22px;
    }

    .login-form-panel {
        padding: 24px 20px;
    }

    .main-navigation {
        width: 60px;
    }
    
    .nav-text {
        display: none;
    }
    
    .main-content {
        margin-left: 60px;
    }
    
    .main-footer {
        margin-left: 60px;
    }
    
    .form-sections {
        grid-template-columns: 1fr;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Wartungsmodul (Kartenköpfe & Filter-Tabs) ===== */
.detail-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}
.detail-card-head h3 {
    margin-bottom: 0;
}
.maintenance-tab-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    align-items: center;
}
.maintenance-type-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
}
.maintenance-type-grid .detail-card {
    margin: 0;
    min-width: 120px;
    flex: 1 1 120px;
}
.text-right {
    text-align: right;
}
.text-muted {
    color: var(--text-muted);
}
small.text-muted {
    font-size: 0.88em;
}
textarea.form-textarea-code {
    width: 100%;
    font-family: ui-monospace, Consolas, monospace;
    font-size: 13px;
    line-height: 1.45;
}