
/* ========================================
   RIVAN – Black Glass / Slate Theme
======================================== */

:root {
    --color-primary: #aebed0;
    --color-primary-dark: #d5deea;
    --color-heading: #f1f3f6;
    --color-text: #e0e4ea;
    --color-muted: #a0a9b6;
    --color-border: rgba(210, 220, 235, 0.13);
    --color-background: #111111;
    --color-surface: rgba(43, 46, 52, 0.78);
    --color-success: #34d399;
    --color-danger: #fb7185;

    --radius: 16px;
    --shadow: 0 10px 32px rgba(0, 0, 0, 0.22);
    --shadow-hover: 0 16px 38px rgba(0, 0, 0, 0.32);
    --glass-border: 1px solid rgba(220, 228, 240, 0.12);
    --glass-background: rgba(43, 46, 52, 0.72);
    --glass-blur: blur(16px);
}

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

html {
    min-width: 320px;
    scroll-behavior: smooth;
    color-scheme: dark;
    background: #151619;
}

body {
    margin: 0;
    padding: 24px;
    background:
        radial-gradient(ellipse at 12% 0%,
            rgba(115, 127, 146, 0.15), transparent 43%),
        radial-gradient(ellipse at 92% 32%,
            rgba(76, 94, 116, 0.12), transparent 42%),
        linear-gradient(135deg, #151619 0%, #202329 52%, #29313b 100%);
    background-attachment: fixed;
    color: var(--color-text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
}

.page-content {
    width: 100%;
    max-width: 1200px;
    min-width: 0;
    margin: 0 auto;
    overflow-wrap: break-word;
}

p {
    margin-top: 0;
}

h1,
h2,
h3 {
    line-height: 1.3;
    color: var(--color-heading);
}

h1 {
    margin: 0 0 16px;
    font-size: clamp(26px, 3vw, 34px);
    letter-spacing: -0.7px;
}

h2 {
    margin: 30px 0 16px;
    font-size: clamp(20px, 2.2vw, 24px);
}

h3 {
    font-size: 17px;
}

hr {
    margin: 28px 0;
    border: 0;
    border-top: 1px solid var(--color-border);
}

/* Links und Tastaturfokus */

a {
    color: #c4d2e2;
    text-underline-offset: 3px;
}

a:hover {
    color: #ffffff;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #b9c9dc;
    outline-offset: 3px;
}

/* Navigation */

.main-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 32px;
    padding: 16px 22px;
    background: linear-gradient(
        120deg,
        rgba(35, 37, 42, 0.94),
        rgba(53, 62, 74, 0.84)
    );
    border: var(--glass-border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
}

.main-nav .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    text-decoration: none;
}

.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: linear-gradient(145deg, #8793a3, #4a515d);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 25px;
    font-weight: 800;
    box-shadow: inset 0 1px rgba(255,255,255,0.2);
}

.brand-name {
    color: #ffffff;
    font-size: 23px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.brand-subtitle {
    margin-left: 4px;
    padding-left: 14px;
    border-left: 1px solid rgba(255,255,255,0.20);
    color: #b9c1cc;
    font-size: 13px;
}

.nav-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

.main-nav .nav-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 15px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #d4d9e1;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.main-nav .nav-links a:hover {
    background: rgba(255,255,255,0.09);
    color: #ffffff;
}

.main-nav .nav-links a.active {
    background: rgba(222, 229, 238, 0.15);
    border-color: rgba(230, 236, 245, 0.16);
    color: #ffffff;
    box-shadow: inset 0 1px rgba(255,255,255,0.05);
}

/* Seitenüberschriften */

.page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 28px;
}

.page-heading h1 {
    margin: 0;
    font-size: clamp(27px, 3vw, 32px);
    font-weight: 800;
}

.page-description,
.dashboard-description {
    margin: 9px 0 0;
    color: var(--color-muted);
    font-size: 14px;
    line-height: 1.7;
}

.dashboard-eyebrow {
    margin: 0 0 10px;
    color: #b4becb;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

/* Dashboard-Kopfbereich */

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 30px;
    padding: 28px 30px;
    background: linear-gradient(
        130deg,
        rgba(47, 49, 55, 0.88),
        rgba(63, 75, 89, 0.72)
    );
    border: var(--glass-border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
}

.dashboard-header h1 {
    margin: 0;
    font-size: clamp(26px, 3vw, 34px);
    font-weight: 800;
}

.dashboard-date {
    display: flex;
    flex-shrink: 0;
    flex-direction: column;
    gap: 7px;
    padding: 15px 20px;
    background: rgba(22, 24, 28, 0.40);
    border: var(--glass-border);
    border-radius: 12px;
}

.dashboard-date span {
    color: var(--color-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.3px;
}

.dashboard-date strong {
    color: #e8edf4;
    font-size: 20px;
    font-weight: 800;
}

/* Dashboard-Karten */

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    width: 100%;
    margin: 28px 0 36px;
}

.dashboard-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    padding: 25px;
    background: var(--glass-background);
    border: var(--glass-border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.dashboard-card::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    content: "";
    background: linear-gradient(90deg, #747c87, #bac3ce);
}

.dashboard-card-blue::before {
    background: linear-gradient(90deg, #647f9f, #a9bfd8);
}

.dashboard-card-purple::before {
    background: linear-gradient(90deg, #80758e, #b4a8c4);
}

.dashboard-card-green::before {
    background: linear-gradient(90deg, #4c8973, #a0c9b6);
}

.dashboard-card h3 {
    margin: 0 0 18px;
    color: #b4bdc9;
    font-size: 15px;
    letter-spacing: 0.2px;
}

.dashboard-value {
    margin: 0 0 16px;
    color: #f1f3f6;
    font-size: clamp(26px, 3vw, 36px);
    font-weight: 700;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.dashboard-card-blue .dashboard-value {
    color: #c4d5e8;
}

.dashboard-card-purple .dashboard-value {
    color: #d2c8df;
}

.dashboard-card-green .dashboard-value {
    color: #a9d9c0;
}

.dashboard-card a {
    display: inline-block;
    margin-top: 4px;
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.dashboard-card a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.dashboard-card > span {
    color: var(--color-muted);
    font-size: 13px;
}

/* Formulare */

form {
    margin-bottom: 20px;
}

input,
select,
textarea {
    max-width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(205, 216, 230, 0.19);
    border-radius: 9px;
    background: rgba(22, 24, 28, 0.64);
    color: #f1f3f6;
    font: inherit;
    font-size: 14px;
}

input::placeholder,
textarea::placeholder {
    color: #929ba8;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #9aa9bb;
    box-shadow: 0 0 0 3px rgba(185, 201, 220, 0.09);
    outline: none;
}

label {
    display: block;
    margin-bottom: 7px;
    color: #d5dbe3;
    font-weight: 600;
}

form > div {
    margin-bottom: 16px;
}

form[name="customer"],
form[name="order"] {
    width: 100%;
    max-width: 650px;
    padding: clamp(18px, 4vw, 28px);
    background: var(--glass-background);
    border: var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
}

form[name="customer"] > div,
form[name="order"] > div {
    margin-bottom: 20px;
}

form[name="customer"] input,
form[name="customer"] select,
form[name="customer"] textarea,
form[name="order"] input,
form[name="order"] select,
form[name="order"] textarea {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 11px 13px;
    font-size: 15px;
}

form[name="customer"] button,
form[name="order"] button {
    min-height: 44px;
    padding: 10px 20px;
}

/* Buttons */

button,
.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    padding: 9px 16px;
    border: 1px solid rgba(226, 232, 240, 0.17);
    border-radius: 9px;
    background: linear-gradient(135deg, #626873, #454a53);
    color: #ffffff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

button:hover,
.primary-button:hover {
    background: linear-gradient(135deg, #777f8a, #555c67);
    color: #ffffff;
}

button:active,
.primary-button:active {
    transform: translateY(1px);
}

.action-link {
    display: inline-block;
    margin: 2px 5px 2px 0;
    padding: 7px 10px;
    border: 1px solid rgba(190, 205, 224, 0.15);
    border-radius: 7px;
    background: rgba(126, 148, 174, 0.15);
    color: #d6e3f2;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.action-link:hover {
    background: rgba(145, 169, 197, 0.25);
    color: #ffffff;
}

.action-form {
    display: inline-block;
    margin: 2px 0;
}

.action-form button {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 13px;
}

.delete-button {
    background: rgba(153, 42, 52, 0.82);
    border-color: rgba(255, 150, 160, 0.22);
    color: #fff1f2;
}

.delete-button:hover {
    background: #b83242;
}

.reset-link {
    padding: 10px;
    color: var(--color-muted);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.reset-link:hover {
    color: #ffffff;
}

/* Suchleiste */

.search-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
    padding: 16px;
    background: var(--glass-background);
    border: var(--glass-border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
}

.search-bar input {
    flex: 1;
    min-width: 220px;
    min-height: 42px;
    padding: 0 13px;
    border-radius: 9px;
    font: inherit;
}

/* Tabellen */

.table-wrapper {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    margin-bottom: 20px;
    background: rgba(35, 38, 43, 0.70);
    border: var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #626b78 #282b30;
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
}

.table-wrapper::-webkit-scrollbar {
    height: 8px;
}

.table-wrapper::-webkit-scrollbar-track {
    background: #282b30;
}

.table-wrapper::-webkit-scrollbar-thumb {
    background: #626b78;
    border-radius: 10px;
}

.table-wrapper table,
.page-content > table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: transparent;
    text-align: left;
}

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

.page-content > table {
    border: var(--glass-border);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.table-wrapper thead th,
.page-content > table th {
    padding: 16px 18px;
    background: rgba(175, 188, 205, 0.09);
    color: #bac3cf;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    white-space: nowrap;
    border-bottom: 1px solid var(--color-border);
}

.table-wrapper tbody td,
.page-content > table td {
    padding: 16px 18px;
    color: #e0e4ea;
    font-size: 14px;
    line-height: 1.5;
    vertical-align: middle;
    border-bottom: 1px solid rgba(220, 228, 240, 0.07);
}

.table-wrapper tbody tr,
.page-content > table tbody tr {
    transition: background-color 0.18s ease;
}

.table-wrapper tbody tr:hover,
.page-content > table tbody tr:hover {
    background: rgba(200, 214, 232, 0.055);
}

.table-wrapper tbody tr:last-child td,
.page-content > table tbody tr:last-child td {
    border-bottom: none;
}

.table-wrapper td a,
.page-content > table td a {
    color: #c5d5e8;
    font-weight: 600;
    text-decoration: none;
}

.table-wrapper td a:hover,
.page-content > table td a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.order-id,
.order-date {
    color: var(--color-muted) !important;
    white-space: nowrap;
}

.order-amount {
    color: #a7dfc0 !important;
    font-weight: 800;
    white-space: nowrap;
}

.muted-text {
    color: #929ba8;
}

.empty-table-message {
    padding: 32px !important;
    color: var(--color-muted) !important;
    text-align: center;
}

.table-wrapper:not(.orders-table-wrapper) table {
    min-width: 900px;
}

/* Bestellungen */

.orders-section-heading {
    margin: 30px 0 16px;
}

.orders-section-heading h2 {
    margin: 0;
    font-size: 21px;
    font-weight: 800;
}

.orders-section-heading p {
    margin: 6px 0 0;
    color: var(--color-muted);
    font-size: 13px;
}

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

.responsive-orders-table {
    width: 100%;
    min-width: 900px;
    border-collapse: separate;
    border-spacing: 0;
    text-align: left;
}

.responsive-orders-table .order-description {
    min-width: 140px;
    overflow-wrap: anywhere;
}

.responsive-orders-table .order-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.responsive-orders-table .action-form {
    display: inline-flex;
    flex-shrink: 0;
    margin: 0;
}

.responsive-orders-table .delete-button {
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 12px;
}

/* Statusfarben bewusst beibehalten */

.order-status {
    display: inline-flex;
    align-items: center;
    padding: 5px 11px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.status-offen,
.status-ausstehend {
    background: rgba(217, 119, 6, 0.19);
    border-color: rgba(251, 191, 36, 0.35);
    color: #fbbf24;
}

.status-in-bearbeitung {
    background: rgba(59, 130, 246, 0.18);
    border-color: rgba(96, 165, 250, 0.32);
    color: #93c5fd;
}

.status-abgeschlossen,
.status-erledigt,
.status-bezahlt {
    background: rgba(16, 185, 129, 0.17);
    border-color: rgba(52, 211, 153, 0.32);
    color: #6ee7b7;
}

.status-storniert,
.status-abgebrochen {
    background: rgba(225, 29, 72, 0.16);
    border-color: rgba(251, 113, 133, 0.32);
    color: #fda4af;
}

/* Dashboard: letzte Bestellungen */

.recent-orders-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin: 36px 0 18px;
}

.recent-orders-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
}

.recent-orders-header p {
    margin: 7px 0 0;
    color: var(--color-muted);
    font-size: 14px;
}

.recent-orders-link {
    color: #c5d5e8;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.recent-orders-link:hover {
    color: #ffffff;
}

/* Kundenverwaltung */

.customer-name-link {
    font-weight: 700;
}

.customer-order-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    min-height: 28px;
    padding: 0 6px;
    border: 1px solid rgba(190, 205, 224, 0.14);
    border-radius: 8px;
    background: rgba(126, 148, 174, 0.15);
    color: #d6e3f2;
    font-size: 13px;
    font-weight: 800;
}

/* Leere Zustände */

.empty-state {
    padding: 42px 24px;
    background: var(--glass-background);
    border: 1px dashed rgba(220, 228, 240, 0.20);
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
}

.empty-state-icon {
    font-size: 36px;
}

.empty-state h3 {
    margin: 14px 0 8px;
}

.empty-state p {
    margin: 0 0 18px;
    color: var(--color-muted);
    font-size: 14px;
}

/* Flash-Messages: erkennbare Farben behalten */

.flash-message {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 20px;
    padding: 14px 18px;
    border: 1px solid;
    border-radius: 10px;
    font-weight: 600;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.flash-success {
    background: rgba(22, 101, 52, 0.30);
    border-color: rgba(134, 239, 172, 0.35);
    color: #bbf7d0;
}

.flash-error {
    background: rgba(153, 27, 27, 0.30);
    border-color: rgba(252, 165, 165, 0.35);
    color: #fecaca;
}

.flash-warning {
    background: rgba(146, 64, 14, 0.30);
    border-color: rgba(252, 211, 77, 0.35);
    color: #fde68a;
}

/* Tablet */

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

    .dashboard-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .table-wrapper:not(.orders-table-wrapper) table {
        min-width: 1100px;
    }

    .responsive-orders-table {
        min-width: 900px;
    }
}

/* Smartphones */

@media (max-width: 640px) {
    body {
        padding: 12px;
        background-attachment: scroll;
    }

    .main-nav {
        align-items: stretch;
        gap: 15px;
        margin-bottom: 22px;
        padding: 16px;
        border-radius: 14px;
    }

    .main-nav .brand {
        flex-wrap: wrap;
    }

    .brand-subtitle {
        font-size: 12px;
    }

    .nav-links {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    .main-nav .nav-links a {
        min-width: 0;
        padding: 10px 5px;
        font-size: 13px;
    }

    h1,
    .page-heading h1 {
        font-size: 27px;
    }

    h2 {
        margin-top: 24px;
        font-size: 21px;
    }

    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 22px;
    }

    .dashboard-date {
        width: 100%;
    }

    .dashboard-cards {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
        margin: 20px 0 28px;
    }

    .dashboard-card {
        padding: 21px;
    }

    .search-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .search-bar input {
        width: 100%;
        min-width: 0;
    }

    .search-bar .primary-button {
        width: 100%;
    }

    form[name="customer"],
    form[name="order"] {
        padding: 18px;
    }

    .table-wrapper:not(.orders-table-wrapper) {
        border-radius: 12px;
    }

    .table-wrapper:not(.orders-table-wrapper) table {
        min-width: 1100px;
    }

    /* Bestellungen als Karten darstellen */
    .orders-table-wrapper {
        overflow: visible;
        border: none;
        background: transparent;
        box-shadow: none;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    .responsive-orders-table,
    .responsive-orders-table tbody {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .responsive-orders-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        clip-path: inset(50%);
    }

    .responsive-orders-table tbody tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 0 16px;
        margin-bottom: 16px;
        padding: 8px 16px;
        border: var(--glass-border);
        border-radius: 14px;
        background: linear-gradient(
            135deg,
            rgba(48, 50, 56, 0.95),
            rgba(54, 64, 76, 0.90)
        );
        box-shadow: var(--shadow);
        -webkit-backdrop-filter: var(--glass-blur);
        backdrop-filter: var(--glass-blur);
    }

    .responsive-orders-table tbody tr:hover {
        background: linear-gradient(
            135deg,
            rgba(55, 58, 65, 0.96),
            rgba(62, 72, 85, 0.92)
        );
    }

    .responsive-orders-table tbody td {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        min-width: 0;
        padding: 12px 0;
        overflow-wrap: anywhere;
        border-bottom: 1px solid rgba(220, 228, 240, 0.08);
        color: #e0e4ea;
        font-size: 13px;
    }

    .responsive-orders-table tbody td::before {
        content: attr(data-label);
        color: var(--color-muted);
        font-size: 10px;
        font-weight: 800;
        letter-spacing: 0.6px;
        text-transform: uppercase;
    }

    .responsive-orders-table tbody td[data-label="Bestellnummer"] {
        color: #d6e3f2;
        font-weight: 800;
    }

    .responsive-orders-table tbody td[data-label="Beschreibung"],
    .responsive-orders-table tbody td[data-label="Aktionen"] {
        grid-column: 1 / -1;
    }

    .responsive-orders-table tbody td[data-label="Aktionen"] {
        padding-top: 14px;
        border-bottom: none;
    }

    .responsive-orders-table .order-actions {
        display: flex;
        align-items: center;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    .responsive-orders-table .action-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin: 0;
        padding: 8px 10px;
        font-size: 12px;
    }

    .responsive-orders-table .action-form {
        display: inline-flex;
        margin: 0;
    }

    .responsive-orders-table .delete-button {
        min-height: 34px;
    }

    .responsive-orders-table tbody td.empty-table-message {
        display: block;
        grid-column: 1 / -1;
        padding: 24px 12px;
        border-bottom: none;
        text-align: center;
    }

    .responsive-orders-table tbody td.empty-table-message::before {
        content: none;
    }

    .recent-orders-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .flash-message {
        padding: 12px 14px;
    }
}

/* Sehr schmale Smartphones */

@media (max-width: 380px) {
    .brand-subtitle {
        width: 100%;
        margin-left: 54px;
        padding-left: 0;
        border-left: 0;
    }

    .nav-links {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 360px) {
    .responsive-orders-table tbody tr {
        grid-template-columns: minmax(0, 1fr);
    }

    .responsive-orders-table tbody td {
        grid-column: 1 / -1;
    }
}

/* Barrierefreiheit */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}



/* =========================================
   RIVAN – Silver Blue Glass Theme
   Saubere Ergänzung zum bestehenden CSS
========================================= */

:root {
    --color-background: #303d49;
    --color-surface: rgba(190, 208, 225, 0.09);
    --color-border: rgba(215, 229, 242, 0.19);

    --color-heading: #edf3f8;
    --color-text: #e0eaf3;
    --color-muted: #b9c6d3;

    --glass-background: rgba(190, 208, 225, 0.09);
    --glass-border: 1px solid rgba(215, 229, 242, 0.19);
    --glass-blur: blur(14px);
}

html {
    background: #303d49;
}

body {
    min-height: 100vh;
    color: var(--color-text);
    background:
        radial-gradient(
            ellipse at 12% 5%,
            rgba(161, 185, 207, 0.19),
            transparent 38%
        ),
        radial-gradient(
            ellipse at 88% 95%,
            rgba(104, 139, 168, 0.20),
            transparent 42%
        ),
        linear-gradient(
            160deg,
            #394653 0%,
            #28323d 40%,
            #344555 72%,
            #46596a 100%
        );
    background-attachment: fixed;
}

/* Navigation */
.main-nav {
    background: linear-gradient(
        115deg,
        rgba(91, 119, 144, 0.82),
        rgba(50, 67, 84, 0.92)
    );
    border-color: rgba(216, 231, 244, 0.19);
}

.main-nav .nav-links a.active {
    background: rgba(208, 226, 242, 0.18);
    border-color: rgba(230, 240, 248, 0.23);
}

/* Glas-Karten */
.dashboard-header,
.dashboard-card,
.search-bar,
.empty-state {
    background: linear-gradient(
        135deg,
        rgba(200, 216, 231, 0.12),
        rgba(127, 153, 177, 0.07)
    );
    border-color: var(--color-border);
}

/* Tabellen */
.table-wrapper {
    background: rgba(194, 212, 229, 0.055);
}

.table-wrapper thead th,
.page-content > table th {
    color: #edf4fa;
    background: linear-gradient(
        110deg,
        rgba(128, 157, 183, 0.24),
        rgba(82, 109, 133, 0.27)
    );
}

.table-wrapper tbody tr:nth-child(even),
.page-content > table tbody tr:nth-child(even) {
    background: rgba(202, 218, 232, 0.035);
}

/* Eingabefelder */
input,
select,
textarea {
    background: rgba(18, 27, 36, 0.42);
    border-color: rgba(199, 218, 235, 0.23);
}

select option {
    color: #edf3f8;
    background: #303d49;
}

/* Hauptbuttons */
button,
.primary-button {
    background: linear-gradient(135deg, #718ba3, #526c83);
    border-color: rgba(219, 234, 247, 0.28);
    box-shadow: 0 4px 12px rgba(9, 17, 27, 0.18);
}

button:hover,
.primary-button:hover {
    background: linear-gradient(135deg, #849fb7, #647f97);
    box-shadow: 0 6px 16px rgba(9, 17, 27, 0.25);
}

/* Aktionslinks */
.action-link {
    background: rgba(143, 176, 204, 0.13);
    border-color: rgba(180, 207, 230, 0.22);
}

.action-link:hover {
    background: rgba(157, 193, 222, 0.23);
}

/* Löschen bleibt rot */
.delete-button {
    color: #ffd9de;
    background: rgba(166, 54, 69, 0.42);
    border-color: rgba(255, 139, 154, 0.38);
}

.delete-button:hover {
    background: rgba(194, 57, 76, 0.68);
}

/* Statusfarben bleiben unterscheidbar */
.status-offen,
.status-ausstehend {
    color: #ffd27a;
    background: rgba(230, 157, 46, 0.17);
    border-color: rgba(255, 190, 79, 0.42);
}

.status-in-bearbeitung {
    color: #a9d5ff;
    background: rgba(68, 147, 221, 0.18);
    border-color: rgba(111, 184, 250, 0.42);
}

.status-abgeschlossen,
.status-erledigt,
.status-bezahlt {
    color: #9aefc1;
    background: rgba(44, 173, 111, 0.16);
    border-color: rgba(91, 224, 157, 0.40);
}

.status-storniert,
.status-abgebrochen {
    color: #ffb1bd;
    background: rgba(216, 65, 86, 0.16);
    border-color: rgba(255, 124, 143, 0.40);
}

/* Dezente Scrollbars */
* {
    scrollbar-color: #687f94 #293541;
    scrollbar-width: thin;
}

@media (max-width: 768px) {
    .dashboard-card,
    .dashboard-header,
    .table-wrapper,
    .search-bar,
    .empty-state {
        -webkit-backdrop-filter: blur(8px);
        backdrop-filter: blur(8px);
    }
}

