:root {
    --blue: #011E41;
    --blue2: #033b75;
    --green: #46A758;
    --green-dark: #328244;
    --bg: #f3f6fa;
    --card: #ffffff;
    --text: #102033;
    --muted: #667085;
    --border: #e4eaf1;
    --shadow: 0 14px 35px rgba(1, 30, 65, 0.10);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: linear-gradient(180deg, #f7f9fc 0%, #eef3f8 100%);
    color: var(--text);
}

.top-header {
    background: linear-gradient(135deg, var(--blue), var(--blue2));
    color: #ffffff;
    padding: 10px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 12px 28px rgba(1, 30, 65, 0.22);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 260px;
}

.header-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.header-logo-box {
    background: transparent;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-logo-box img {
    height: 50px;
    width: auto;
    display: block;
    object-fit: contain;
}

.header-title-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.brand {
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
}

.subtitle {
    font-size: 11px;
    color: #c8f0d0;
    margin-top: 4px;
}

nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

nav a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    padding: 8px 11px;
    border-radius: 999px;
    transition: 0.18s ease;
}

nav a:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #bff2ca;
}

.page {
    padding: 24px;
    max-width: 1500px;
    margin: 0 auto;
}

.footer {
    max-width: 1500px;
    margin: 20px auto 0;
    padding: 0 24px 24px;
    color: #7b8794;
    font-size: 13px;
}

h1 {
    color: var(--blue);
    margin: 0 0 8px;
    font-size: 30px;
}

h2 {
    color: var(--blue);
}

.intro {
    color: var(--muted);
    margin: 0 0 22px;
    font-size: 15px;
}

.page-header,
.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    margin-bottom: 22px;
}

.action-btn,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--green), var(--green-dark));
    color: #ffffff;
    border: none;
    border-radius: 14px;
    padding: 12px 18px;
    font-weight: 800;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(70, 167, 88, 0.22);
    transition: 0.18s ease;
}

.action-btn:hover,
button:hover {
    transform: translateY(-1px);
}

.action-btn.secondary {
    background: linear-gradient(135deg, var(--blue), var(--blue2));
}

.danger-btn {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
}

.welcome-box {
    background:
        radial-gradient(circle at top right, rgba(70, 167, 88, 0.34), transparent 32%),
        linear-gradient(135deg, var(--blue), var(--blue2));
    border-radius: 24px;
    padding: 28px;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.welcome-box h1 {
    color: #ffffff;
    font-size: 32px;
}

.welcome-box p {
    margin: 10px 0 0;
    color: #dcecff;
}

.welcome-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}

.card {
    background: var(--card);
    border-radius: 20px;
    padding: 22px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: var(--blue);
}

.card.green::before {
    background: var(--green);
}

.card.warning::before {
    background: #f59e0b;
}

.card.dark::before {
    background: #334155;
}

.card span {
    display: block;
    color: var(--muted);
    margin-bottom: 10px;
    font-size: 14px;
}

.card strong {
    font-size: 36px;
    color: var(--blue);
}

.dashboard-link-card {
    text-decoration: none;
    color: inherit;
    transition: 0.18s ease;
}

.dashboard-link-card:hover {
    transform: translateY(-3px);
    border-color: rgba(70, 167, 88, 0.45);
}

.dashboard-sections,
.detail-grid,
.form-grid,
.template-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.dashboard-box,
.form-card,
.detail-card,
.table-wrapper,
.template-card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.dashboard-box,
.form-card,
.detail-card,
.template-card {
    padding: 24px;
}

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

.dashboard-box-header h2 {
    margin: 0;
    font-size: 20px;
}

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

.fleet-table thead {
    background: linear-gradient(135deg, var(--blue), var(--blue2));
    color: #ffffff;
}

.fleet-table th,
.fleet-table td {
    padding: 14px 15px;
    text-align: left;
    border-bottom: 1px solid #edf2f7;
    font-size: 14px;
}

.fleet-table tbody tr:hover {
    background: #f1f7f3;
}

.table-link {
    color: var(--green-dark);
    font-weight: 800;
    text-decoration: none;
}

.status {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    text-transform: capitalize;
}

.status.aktiv {
    background: #dcfce7;
    color: #166534;
}

.status.inaktiv {
    background: #fff7ed;
    color: #c2410c;
}

.status.bestellt {
    background: #dbeafe;
    color: #1d4ed8;
}

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

.status.verlaengert {
    background: #ede9fe;
    color: #6d28d9;
}

.status.archiviert {
    background: #e5e7eb;
    color: #374151;
}

label {
    display: block;
    margin-bottom: 7px;
    font-weight: 800;
    color: var(--blue);
}

input,
select,
textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #d5dce3;
    border-radius: 14px;
    font-size: 15px;
    background: #f9fafb;
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--green);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(70, 167, 88, 0.13);
}

textarea {
    resize: vertical;
}

.search-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: end;
}

.search-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-actions .action-btn,
.search-actions button {
    white-space: nowrap;
}

.section-title {
    margin-top: 30px;
    margin-bottom: 18px;
    font-size: 18px;
    font-weight: 800;
    color: var(--blue);
    padding-bottom: 10px;
    border-bottom: 2px solid #edf2f7;
}

.detail-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.detail-card h3 {
    margin: 0 0 20px;
    color: var(--blue);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 0;
    border-bottom: 1px solid #edf2f7;
}

.detail-row span {
    color: var(--muted);
}

.note-box {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    min-height: 120px;
    line-height: 1.5;
}

.mini-table {
    display: grid;
    gap: 12px;
}

.mini-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #edf2f7;
    border-radius: 16px;
    padding: 14px;
}

.mini-row small {
    color: var(--muted);
}

.mini-row-link {
    text-decoration: none;
    color: inherit;
    transition: 0.18s ease;
}

.mini-row-link:hover {
    transform: translateX(3px);
    border-color: rgba(70, 167, 88, 0.35);
    background: #f1f7f3;
}

.empty-box {
    background: #f9fafb;
    border-radius: 14px;
    padding: 18px;
    color: var(--muted);
}

.success-box {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
    border-radius: 16px;
    padding: 14px 16px;
    font-weight: 800;
    margin-bottom: 18px;
}

.alert-error {
    margin-bottom: 18px;
    padding: 13px 14px;
    background: #ffe5e5;
    color: #9b1c1c;
    border-radius: 12px;
    font-weight: 800;
}

.compact-card {
    margin-bottom: 22px;
}

.one-action-grid {
    grid-template-columns: 1fr auto;
    align-items: end;
}

.form-action-bottom button {
    white-space: nowrap;
}

.checklist-list {
    grid-template-columns: repeat(2, 1fr);
}

.checklist-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 22px;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text);
    display: flex;
    justify-content: space-between;
    gap: 18px;
    transition: 0.18s ease;
}

.checklist-card:hover {
    transform: translateY(-2px);
    border-color: rgba(70, 167, 88, 0.45);
}

.progress-area {
    min-width: 150px;
    text-align: right;
}

.progress-area strong {
    display: block;
    color: var(--blue);
    font-size: 22px;
    margin-bottom: 8px;
}

.compact-progress {
    min-width: 95px;
}

.progress-bar {
    width: 100%;
    height: 9px;
    background: #e8eef5;
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(135deg, var(--green), var(--green-dark));
}

.progress-bar.large {
    height: 14px;
}

.progress-box {
    margin-bottom: 22px;
}

.checklist-detail {
    display: grid;
    gap: 12px;
}

.check-item {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 8px 20px rgba(1, 30, 65, 0.06);
    cursor: pointer;
}

.check-item input {
    width: 22px;
    height: 22px;
    accent-color: var(--green);
}

.check-item small {
    color: var(--muted);
}

.template-card h2 {
    margin: 0 0 10px;
    font-size: 20px;
}

.template-card pre {
    white-space: pre-wrap;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
    margin: 0;
}

.template-subject {
    background: #eef6f0;
    color: var(--green-dark);
    border-radius: 12px;
    padding: 10px 12px;
    font-weight: 800;
    margin-bottom: 14px;
}

.admin-hero {
    background:
        radial-gradient(circle at top right, rgba(70, 167, 88, 0.28), transparent 30%),
        linear-gradient(135deg, var(--blue), var(--blue2));
    color: #ffffff;
    border-radius: 26px;
    padding: 30px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.admin-badge {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    padding: 7px 12px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 12px;
    margin-bottom: 14px;
}

.admin-hero h2 {
    color: #ffffff;
    margin: 0 0 8px;
    font-size: 30px;
}

.admin-hero p {
    margin: 0;
    color: #dcecff;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.admin-tile {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 24px;
    text-decoration: none;
    color: var(--text);
    box-shadow: var(--shadow);
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 18px;
    align-items: center;
    transition: 0.18s ease;
}

.admin-tile:hover {
    transform: translateY(-3px);
    border-color: rgba(70, 167, 88, 0.45);
}

.admin-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: #eef6f0;
    color: var(--green-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

.admin-tile h2 {
    margin: 0 0 6px;
    font-size: 21px;
}

.admin-tile p {
    margin: 0;
    color: var(--muted);
}

.admin-tile strong {
    font-size: 28px;
    color: var(--blue);
}

/* Login */
.login-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(70, 167, 88, 0.32), transparent 34%),
        linear-gradient(135deg, var(--blue), var(--blue2) 48%, var(--green));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-page {
    width: 100%;
    max-width: 980px;
    height: 560px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 32px;
    display: grid;
    grid-template-columns: 1fr 410px;
    overflow: hidden;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(14px);
}

.login-left {
    padding: 38px;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-logo-box {
    width: 170px;
    background: #ffffff;
    padding: 10px 14px;
    border-radius: 16px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.18);
    margin-bottom: 22px;
}

.login-logo-box img {
    width: 100%;
    height: auto;
    display: block;
}

.login-left h1 {
    margin: 0;
    font-size: 42px;
    line-height: 1.05;
    color: #ffffff;
}

.login-left p {
    margin: 10px 0 0;
    font-size: 18px;
    color: #d7f5de;
}

.login-car-box {
    margin-top: 22px;
    width: 100%;
    height: 155px;
    border-radius: 20px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-car-box img {
    width: auto;
    height: 130px;
    max-width: 100%;
    object-fit: contain;
    display: block;
}

.login-card {
    background: #ffffff;
    padding: 42px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-card h2 {
    margin: 0;
    color: var(--blue);
    font-size: 32px;
}

.login-card-subtitle {
    margin: 8px 0 24px;
    color: var(--muted);
    font-size: 15px;
}

/* Mobile */
@media (max-width: 1100px) {
    .top-header {
        align-items: flex-start;
        flex-direction: column;
    }

    nav {
        width: 100%;
        justify-content: flex-start;
    }

    .login-page {
        max-width: 900px;
        grid-template-columns: 1fr 380px;
    }
}

@media (max-width: 900px) {
    .page {
        padding: 18px;
    }

    .welcome-box,
    .page-header,
    .detail-header {
        display: block;
    }

    .welcome-actions {
        margin-top: 18px;
    }

    .dashboard-grid,
    .dashboard-sections,
    .form-grid,
    .detail-grid,
    .template-grid,
    .checklist-list,
    .admin-grid {
        grid-template-columns: 1fr;
    }

    .one-action-grid,
    .search-row {
        grid-template-columns: 1fr;
    }

    .search-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .checklist-card {
        display: block;
    }

    .progress-area {
        text-align: left;
        margin-top: 16px;
    }

    .login-page {
        height: auto;
        grid-template-columns: 1fr;
    }

    .login-left {
        padding: 30px;
    }

    .login-card {
        padding: 34px;
    }

    .login-left h1 {
        font-size: 40px;
    }

    .login-car-box {
        height: 130px;
    }

    .login-car-box img {
        height: 105px;
    }

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

    .fleet-table {
        min-width: 760px;
    }

    .admin-tile {
        grid-template-columns: 1fr;
    }
}