/* ===== Grundlayout ===== */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 20px;
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f5f5;
    color: #222;
}

table {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}  
/* ===== Farben (DB-Style) ===== */
:root {
    --db-red: #d40511;
    --db-red-dark: #b4040f;
    --light-gray: #f2f2f2;
    --border-gray: #ddd;
    --white: #ffffff;
    --text-gray: #555;
    --bg-gray: #f5f5f5;
}

/* ===== Topbar ===== */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.topbar strong {
    font-size: 20px;
    color: var(--db-red);
}

/* ===== Button-Leiste ===== */
.action-box {
    text-align: right;
}

.action-box .username {
    margin-bottom: 10px;
    font-weight: bold;
}

.action-box button {
    width: 180px;
    padding: 10px;
    margin-bottom: 8px;
    border: none;
    background: var(--db-red);
    color: var(--white);
    font-size: 14px;
    cursor: pointer;
}

.action-box button:hover {
    background: var(--db-red-dark);
}

/* ===== Tabellen ===== */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
}

th {
    background: var(--db-red);
    color: var(--white);
    text-align: left;
    padding: 12px;
}

td {
    padding: 10px;
    border-bottom: 1px solid var(--border-gray);
}

/* ===== Status-Farben ===== */
/* Bestellung erfasst, noch nichts passiert */
.status-aufgegeben {
    background: #ffbfbf;   /* hellgrau */
}

/* In Bearbeitung / bestellt */
.status-bestellt {
    background: #bedfff;   /* ruhiges hellblau */
}

/* Ware ist da, kann abgeholt werden */
.status-abholbereit {
    background: #ffedb4;   /* dezentes Gelb */
}

/* Abgeschlossen */
.status-uebergeben {
    background: #ceffd2;   /* ruhiges grün */
}


/* ===== Formulare ===== */
input, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-gray);
    font-size: 14px;
}

textarea {
    resize: vertical;
}

button.inline {
    width: auto;
    padding: 6px 10px;
    font-size: 13px;
}

/* ===== Login ===== */
.login-container {
    width: 400px;
    max-width: calc(100% - 40px);
    padding: 30px;
    background: #ffffff;
    border-top: 6px solid var(--db-red);
    text-align: center;

    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.login-container h1 {
    margin-top: 0;
    color: var(--db-red);
    text-align: center;
}
/* ===== Bestellformular ===== */
.order-form {
    margin-top: 20px;
}

select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-gray);
    font-size: 14px;
    background: #fff;
}

/* ===== Button-Pyramide ===== */
.button-pyramid {
    margin-top: 25px;
    text-align: center;
}

.button-pyramid .primary {
    width: 100%;
    padding: 12px;
    background: var(--db-red);
    color: #fff;
    border: none;
    font-size: 15px;
    cursor: pointer;
}

.button-pyramid .primary:hover {
    background: var(--db-red-dark);
}

.button-pyramid .secondary-row {
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
}

.button-pyramid .secondary-row button {
    width: 48%;
    padding: 10px 0;
    background: #fff;
    border: 1px solid var(--db-red);
    color: var(--db-red);
    font-size: 14px;
    cursor: pointer;
}

.button-pyramid .secondary-row button:hover {
    background: var(--db-red);
    color: #fff;
}


.button-pyramid .secondary-row a:hover {
    background: var(--db-red);
    color: #fff;
}

/* ===== Action-Grid (2 Buttons nebeneinander) ===== */
.action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 8px;
}

.action-grid form {
    margin: 0;
}

.action-grid .btn {
    width: 100%;
}


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

button{
    border-radius: 15px;
}

.btn {
    display: block;
    width: 150px;
    padding: 10px;
    margin-bottom: 8px;
    border: none;
    font-size: 14px;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: var(--db-red);
    color: #fff;
}

.btn-primary:hover {
    background: var(--db-red-dark);
}

.btn-secondary {
    background: #fff;
    color: var(--db-red);
    border: 1px solid var(--db-red);
}

.btn-secondary:hover {
    background: var(--db-red);
    color: #fff;
}

/* ===== Action-Box rechts ===== */
.action-box {
    text-align: right;
}

.action-box a {
    text-decoration: none;
}

button.inline {
    background: var(--db-red);
    color: #fff;
    border: none;
    padding: 4px 7px;
    font-size: 10px;
    border-radius: 8px;
    cursor: pointer;
}

button.inline:hover {
    background: var(--db-red-dark);
}


/* Detailansicht Tabellenaufteilung */
table.detail-view th {
    width: 30%;
    white-space: nowrap;
        font-weight: 600;
}

table.detail-view td {
    width: 70%;
}

/* ===== Login Formular Ergänzungen ===== */

.login-success {
    margin-bottom: 14px;
    padding: 10px;
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 13px;
    text-align: center;
    border: 1px solid #a5d6a7;
    border-radius: 4px;
}

.form-group {
    margin-bottom: 16px;
    text-align: left;
}

.login-container label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--text-gray);
}

.login-container input[type="text"],
.login-container input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-gray);
    font-size: 14px;
}

.login-container input:focus {
    outline: none;
    border-color: var(--db-red);
}

/* Login Button */
.login-container button {
    width: 100%;
    padding: 12px;
    background: var(--db-red);
    color: #fff;
    border: none;
    font-size: 15px;
    cursor: pointer;
}

.login-container button:hover {
    background: var(--db-red-dark);
}

/* Fehlermeldung Login */
.login-error {
    margin-bottom: 14px;
    padding: 10px;
    background: #fdecec;
    color: var(--db-red);
    font-size: 13px;
    text-align: center;
    border: 1px solid #f5c2c2;
    border-radius: 4px;
}

/* Login Footer */
.footer-text {
    margin-top: 18px;
    text-align: center;
    font-size: 12px;
    color: #777;
}

/* ===== Mitarbeiter Dashboard Topbar ===== */
.employee-topbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: flex-start;
}

.employee-topbar .topbar-left {
    text-align: left;
}

.employee-topbar .topbar-center {
    text-align: center;
    font-weight: bold;
    margin-top: 4px;
}

.employee-topbar .topbar-right {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}


.employee-topbar .topbar-right .btn {
    width: 180px;
}

/* Bestell-Link mit Icon */
a.order-link {
    color: #333;
    text-decoration: none;
    font-weight: 500;

    padding-right: 18px;
    background-image: url('/assets/icons/link.svg');
    background-repeat: no-repeat;
    background-position: right center;
    background-size: 12px 12px;
}

a.order-link:hover {
    color: var(--db-red);
}



/* Mobile Fallback für Login */
@media (max-height: 500px) {
    .login-container {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        margin: 40px auto;
    }
}
