@charset "UTF-8";

/* =========================================
   Grundfarben & Utilities
========================================= */

:root {
    --green: #2E4F20;
    --green-dark: #233a18;
    --green-soft: #edf3ea;
    --red: #b91c1c;
    --border: #e5e7eb;
    --text-main: #111827;
    --text-muted: #6b7280;
    --bg-soft: #f9fafb;
}

/* Generische Text-Utilities */
.text-center { text-align: center; }
.mt-2 { margin-top: 0.75rem; }

/* =========================================
   Auth Wrapper: Login / Registrierung / Reset
========================================= */

.auth {
    max-width: 480px;
    margin: 3rem auto;
    padding: 2rem 2.25rem;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.09);
    box-sizing: border-box;
}

.auth h1 {
    font-size: 1.9rem;
    line-height: 1.2;
    margin: 0 0 0.6rem;
    font-weight: 650;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.auth-subtitle {
    margin: 0 0 1.6rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Formular-Grundlayout */
.form {
    margin-top: 0.5rem;
}

.form .field {
    margin-bottom: 1rem;
}

.form .field label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
    color: var(--text-main);
}

.form .field input,
.form .field select,
.form .field textarea {
    width: 100%;
    max-width: 100%;
    padding: 0.7rem 0.85rem;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    font-size: 0.95rem;
    color: var(--text-main);
    background-color: var(--bg-soft);
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        background-color 0.15s ease,
        transform 0.06s ease;
    box-sizing: border-box;
}

.form .field input:focus,
.form .field select:focus,
.form .field textarea:focus {
    outline: none;
    border-color: var(--green);
    background-color: #ffffff;
    box-shadow: 0 0 0 1px var(--green), 0 0 0 4px rgba(46, 79, 32, 0.16);
    transform: translateY(-1px);
}

/* Fehlermeldungen unter Feldern */
.form .field .errorlist,
.form .field .error {
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: var(--red);
}

/* Django Messages */
.messages {
    margin-bottom: 1.1rem;
    list-style: none;
    padding: 0;
}

.messages li {
    font-size: 0.9rem;
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    margin-bottom: 0.5rem;
}

.messages li.success {
    background: #ecfdf3;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.messages li.error {
    background: #fef2f2;
    color: var(--red);
    border: 1px solid #fecaca;
}

/* Hinweistext im Login-Feld */
.field-hint {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

.field-hint a {
    color: var(--green);
    text-decoration: underline;
}

/* Sekundäre Links unter Formularen */
.auth-footer {
    margin-top: 1.4rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--green);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Auth etwas kompakter, wenn nötig */
.auth--narrow .form {
    margin-top: 0.25rem;
}

/* =========================================
   Buttons – Hauptfarbe Grün
========================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.7rem 1.6rem;
    border-radius: 999px;
    border: none;
    background: var(--green);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(46, 79, 32, 0.35);
    transition:
        background 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.08s ease;
}

.btn:hover {
    background: var(--green-dark);
    box-shadow: 0 14px 30px rgba(35, 58, 24, 0.45);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 7px 18px rgba(35, 58, 24, 0.35);
}

.btn-secondary {
    background: #ffffff;
    color: var(--green);
    border: 1px solid var(--green);
    box-shadow: 0 6px 16px rgba(46, 79, 32, 0.18);
}

.btn-secondary:hover {
    background: var(--green-soft);
}

.btn-outline {
    background: transparent;
    color: #374151;
    border: 1px solid #d1d5db;
    box-shadow: none;
}

.btn-outline:hover {
    background: #f3f4f6;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
}

/* =========================================
   Konto-Dashboard / Admin-Panel
   Tabs: Profil – Passwort – Bestellungen
========================================= */

.account-page {
    max-width: 1100px;
    margin: 2.2rem auto 3rem;
    padding: 0 10px;               /* nur ~10px Abstand zu den Rändern */
    box-sizing: border-box;
}

/* Kopfbereich */
.account-header h1 {
    font-size: 1.9rem;
    margin: 0 0 0.4rem;
    font-weight: 650;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.account-subtitle {
    margin: 0 0 1.2rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Tabs-Bar */
.account-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.2rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

.account-tab {
    position: relative;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 999px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition:
        background 0.15s ease,
        color 0.15s ease,
        border-color 0.15s ease;
}

.account-tab:hover {
    background: var(--green-soft);
    color: var(--green);
}

.account-tab--active {
    background: var(--green);
    color: #ffffff;
    border-color: var(--green);
}

/* Layout für Inhalt */
.account-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(0, 1.1fr);
    gap: 1.5rem;
}

/* Karten */
.account-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.3rem 1.3rem;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
    box-sizing: border-box;
}

.account-card-side {
    align-self: flex-start;
}

.account-section-title {
    font-size: 1rem;
    margin: 0 0 0.7rem;
    font-weight: 600;
    color: var(--text-main);
}

.account-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.9rem;
}

/* Tabs-Inhalt: nur aktive Sektion anzeigen */
.account-tab-content {
    display: none;
}

.account-tab-content.active {
    display: block;
}

/* =========================================
   Profil-Formular (Persönliche Daten)
========================================= */

.account-form .field {
    margin-bottom: 0.85rem;
}

.account-form .field label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    color: var(--text-main);
}

.account-form .field input,
.account-form .field select {
    width: 100%;
    max-width: 100%;
    padding: 0.55rem 0.75rem;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    font-size: 0.93rem;
    background-color: var(--bg-soft);
    box-sizing: border-box;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        background-color 0.15s ease,
        transform 0.06s ease;
}

.account-form .field input:focus,
.account-form .field select:focus {
    outline: none;
    border-color: var(--green);
    background-color: #ffffff;
    box-shadow: 0 0 0 1px var(--green), 0 0 0 4px rgba(46, 79, 32, 0.16);
    transform: translateY(-1px);
}

.field-row {
    display: flex;
    gap: 0.75rem;
}

.field-inline {
    flex: 1;
}

.account-actions {
    margin-top: 1.2rem;
}

/* =========================================
   Passwort-Tab (Passwort ändern)
========================================= */

.password-info {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.9rem;
}

.password-form .field {
    margin-bottom: 0.9rem;
}

/* =========================================
   Bestellungen-Tab (Orders)
========================================= */

.orders {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
}

.orders th,
.orders td {
    padding: 0.45rem 0.4rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.orders thead th {
    font-weight: 600;
    color: #374151;
    background: #f9fafb;
}

.order-status {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 500;
}

.order-status--open {
    background: #ecfdf3;
    color: #166534;
}

.order-status--pending {
    background: #fffbeb;
    color: #92400e;
}

.order-status--cancelled {
    background: #fef2f2;
    color: var(--red);
}

.orders-empty {
    font-size: 0.9rem;
    color: var(--text-muted);
    padding: 0.7rem 0;
}

/* Divider / Seitenaktionen */
.account-side-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}

.account-divider {
    margin: 1.1rem 0 0.8rem;
    border: 0;
    border-top: 1px solid var(--border);
}

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

@media (max-width: 900px) {
    .auth {
        margin: 2.3rem 10px;
        padding: 1.6rem 1.7rem;
    }

    .account-page {
        margin: 1.8rem auto 2.6rem;
    }

    .account-layout {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .account-card {
        padding: 1.1rem 1.1rem;
    }

    .account-header h1 {
        font-size: 1.6rem;
    }
}

@media (max-width: 600px) {
    .field-row {
        flex-direction: column;
    }

    .auth {
        padding: 1.4rem 1.4rem;
    }

    .account-header h1 {
        font-size: 1.4rem;
    }

    /* Tabs auf Mobile kompakt & über die volle Breite */
    .account-tabs {
        gap: 0.3rem;
        margin-bottom: 0.7rem;
        padding-bottom: 0.15rem;
        overflow-x: visible;        /* meist keine Scrollbar nötig */
        justify-content: space-between;
    }

    .account-tab {
        flex: 1;
        text-align: center;
        padding: 0.4rem 0.5rem;
        font-size: 0.8rem;
        border-radius: 999px;
    }
}
.billing-toggle label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.billing-toggle input[type="checkbox"] {
    margin: 0;
    width: 18px;
    height: 18px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
}

.checkbox-label {
    font-size: 0.95rem;
    color: #111827;
    font-weight: 500;
}
