/*
 * Taxelo Online — Portal-Styles. Look-and-Feel an Setup-Wizard + Admin-Header
 * der Taxelo-Desktop-App (taxelo-app) angeglichen:
 *   - Blauer Header-Balken (#0460A2)
 *   - Card-/Form-/Button-Stil aus setup.css
 *   - Taxelo-CI-Palette: #0460A2 Primary (=Header), #1e8e3e Success,
 *     #d93025 Error, #5f6368 Sekundaer-Text
 *   - Maax-Schriftart (entity-CI) wird aus /fonts/ ausgeliefert
 * Kein externes Framework, kein JS.
 */

@font-face {
    font-family: 'Maax';
    src: url('/fonts/Maax-entity.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Maax';
    src: url('/fonts/Maax-Medium-entity.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'Maax', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
    background: #f8f9fa;
    color: #202124;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: #0460A2;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* ---------- Shell / Header / Footer ---------- */

.portal-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.portal-header {
    background: #0460A2;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.portal-header-brand {
    font-size: 22px;
    font-weight: 500;
    color: #ffffff;
    text-decoration: none;
    letter-spacing: 0.2px;
}
.portal-header-brand:hover {
    text-decoration: none;
    color: #ffffff;
    opacity: 0.9;
}

.portal-header-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.portal-header-nav a {
    color: rgba(255, 255, 255, 0.85);
    padding: 8px 14px;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}
.portal-header-nav a:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    text-decoration: none;
}

.portal-header-nav .button {
    /* Header-Button-Variante: weiss-auf-blau */
    background: rgba(255, 255, 255, 0.0);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.45);
    padding: 6px 14px;
    font-size: 13px;
}
.portal-header-nav .button:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.portal-main {
    flex: 1;
    max-width: 1024px;
    width: 100%;
    margin: 0 auto;
    padding: 32px 24px 64px;
}

.portal-footer {
    background: #ffffff;
    border-top: 1px solid #e8eaed;
    padding: 16px 24px;
    font-size: 12px;
    color: #5f6368;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.portal-footer-links a {
    color: #5f6368;
    margin-left: 16px;
}
.portal-footer-links a:hover {
    color: #202124;
}

/* ---------- Landing ---------- */

.landing {
    max-width: 720px;
    margin: 48px auto 0;
    background: #ffffff;
    border-radius: 8px;
    padding: 48px 56px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    text-align: center;
}

.landing-title {
    font-size: 32px;
    font-weight: 500;
    margin: 0 0 16px;
    color: #202124;
}

.landing-pitch {
    font-size: 15px;
    color: #5f6368;
    margin: 0 0 32px;
    line-height: 1.6;
}

.landing-pitch-secondary {
    margin: 28px 0 0;
    font-size: 13px;
    color: #80868b;
    line-height: 1.5;
}

/* ---------- Card ---------- */

.card {
    background: #ffffff;
    border-radius: 8px;
    padding: 24px 28px;
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3),
                0 1px 3px 1px rgba(60, 64, 67, 0.15);
    margin-bottom: 20px;
}

.card-title {
    font-size: 18px;
    font-weight: 500;
    margin: 0 0 12px;
    color: #202124;
}

.card-subtitle {
    font-size: 13px;
    color: #5f6368;
    margin: 0 0 16px;
    line-height: 1.5;
}

/* ---------- Buttons ---------- */

.button {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    line-height: 1.2;
    transition: background 0.2s, box-shadow 0.2s, color 0.2s;
}
.button:hover {
    text-decoration: none;
}

.button-primary {
    background: #0460A2;
    color: #ffffff;
}
.button-primary:hover {
    background: #034a80;
    color: #ffffff;
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3),
                0 1px 3px 1px rgba(60, 64, 67, 0.15);
}
.button-primary:disabled {
    background: #b9c8d8;
    cursor: not-allowed;
}

.button-secondary {
    background: #ffffff;
    color: #0460A2;
    border-color: #dadce0;
}
.button-secondary:hover {
    background: #f8f9fa;
    color: #0460A2;
}

.button-danger {
    background: #ffffff;
    color: #d93025;
    border-color: #dadce0;
}
.button-danger:hover {
    background: #fce8e6;
    color: #d93025;
}

.button-compact {
    /* Variante fuer In-Table-Aktionen + Zurueck-Links */
    font-size: 13px;
    padding: 6px 16px;
}

/* ---------- DATEV-Login-Button (gemaess DATEV Design Guidelines) ---------- */
/* Variante: weiss/hell mit farbigem Logo. Schwarzes Logo auf hellem Hintergrund
   ist laut DATEV NICHT erlaubt, farbiges Logo auf gruenem Hintergrund ebenfalls nicht.
   Schrift Noto Sans Display 16px medium (Google Font), Textfarbe #2C3335, Labels
   immer mit "DATEV" in Versalien. Logo-Asset wird unveraendert ausgeliefert. */

.datev-login-button {
    /* DesignGuidelines.pdf S.2 "5. Button — Alle DATEV Vorgaben umgesetzt":
       Logo+Text als zentrierter Block (justify-content: center), kompakte
       Buttonform mit subtiler Drop-Shadow. Die links-buendige Variante
       unter "Vorgaben teilweise umgesetzt" ist explizit als Abweichung
       deklariert -> NICHT verwenden. */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-width: 240px;
    padding: 12px 20px;
    background: #F6F7F9;
    color: #2C3335;
    border: 1px solid #E6EBED;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 1px 1px rgba(0, 0, 0, 0.04);
    font-family: "Noto Sans Display", "Maax", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.datev-login-button:hover {
    background: #E6EBED;
    color: #2C3335;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}

.datev-login-button:focus-visible {
    outline: 2px solid #0460A2;
    outline-offset: 2px;
}

.datev-login-button-logo {
    /* DATEV-Logo zwischen 16-32px hoch, nicht verzerrt, Schutzraum 1/4 Logobreite.
       Logo darf nicht modifiziert werden — kein filter/fill-Override. */
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.datev-login-button-label {
    /* "DATEV" muss als Versalien im Wording erscheinen — wir liefern es bereits
       gross im Template, daher hier kein text-transform noetig. */
}

/* ---------- Form ---------- */

.form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 520px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-field label {
    font-size: 13px;
    color: #5f6368;
    font-weight: 500;
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="password"],
.form-field input[type="number"],
.form-field select {
    padding: 10px 12px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    background: #ffffff;
    color: #202124;
}

.form-field input:focus,
.form-field select:focus {
    outline: none;
    border-color: #0460A2;
    box-shadow: 0 0 0 1px #0460A2;
}

.form-field input:disabled,
.form-field input[readonly] {
    background: #f1f3f4;
    color: #5f6368;
}

.form-field-hint {
    font-size: 12px;
    color: #5f6368;
    line-height: 1.45;
}

.form-field-required {
    color: #d93025;
    font-weight: 500;
    margin-left: 2px;
}

.form-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.form-section-title {
    font-size: 14px;
    font-weight: 500;
    color: #5f6368;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 16px 0 4px;
}
.form-section-title:first-child {
    margin-top: 0;
}

/* ---------- Alerts ---------- */

.alert {
    padding: 12px 14px;
    border-radius: 4px;
    font-size: 13px;
    margin-bottom: 16px;
    line-height: 1.5;
}
.alert-success {
    background: #e6f4ea;
    color: #137333;
    border: 1px solid #ceead6;
}
.alert-error {
    background: #fce8e6;
    color: #c5221f;
    border: 1px solid #f6c1bd;
}
.alert ul {
    margin: 8px 0 0 18px;
    padding: 0;
}

/* ---------- Table ---------- */

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.table th,
.table td {
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid #f1f3f4;
    vertical-align: top;
}
.table thead th {
    background: #f8f9fa;
    border-bottom: 1px solid #dadce0;
    font-weight: 500;
    color: #5f6368;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.table tbody tr:hover {
    background: #fafbfc;
}
.table tbody tr:last-child td {
    border-bottom: none;
}
.table tbody th {
    /* Tabellen mit Label-Spalte (Bestellungs-Detail) */
    color: #5f6368;
    font-weight: 500;
    width: 200px;
    text-transform: none;
    letter-spacing: 0;
    font-size: 14px;
    background: transparent;
    border-bottom: 1px solid #f1f3f4;
}

/* ---------- Misc ---------- */

.empty-hint {
    color: #5f6368;
    font-size: 14px;
    padding: 12px 0;
    line-height: 1.5;
}

.back-link-row {
    margin-bottom: 16px;
}

/* ---------- Dashboard 2-Spalten-Row ---------- */

.dashboard-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: stretch;
}

.dashboard-row > .card {
    margin-bottom: 0;
}

@media (max-width: 760px) {
    .dashboard-row {
        grid-template-columns: 1fr;
    }
}

/* ---------- App-Download-Card (Dashboard) ---------- */

.app-download-info {
    background: #f8f9fa;
    border: 1px solid #e8eaed;
    border-radius: 8px;
    padding: 16px 18px;
    margin: 0 0 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.app-download-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    margin: 0;
}

.app-download-chips > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.app-download-chips dt {
    font-size: 11px;
    font-weight: 500;
    color: #80868b;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin: 0;
}

.app-download-chips dd {
    font-size: 14px;
    font-weight: 500;
    color: #202124;
    margin: 0;
}

.app-download-hash-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 10px;
    border-top: 1px solid #e8eaed;
}

.app-download-hash-label {
    font-size: 11px;
    font-weight: 500;
    color: #80868b;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.app-download-hash {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 11px;
    word-break: break-all;
    color: #3c4043;
    line-height: 1.4;
}

/* "Download fuer Windows"-Button mit Windows-Logo links vom Text.
   Taxelo-CI-Blau (#0460A2 = Header-Farbe). */
.button-download-windows {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 22px;
    background: #0460A2;
    color: #ffffff;
    border: 1px solid #0460A2;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 120ms, transform 120ms;
}

.button-download-windows:hover {
    background: #034a80;
    border-color: #034a80;
    color: #ffffff;
}

.button-download-windows:active {
    transform: translateY(1px);
}

.button-download-windows svg {
    width: 22px;
    height: 22px;
    color: #ffffff;
    flex-shrink: 0;
}

/* ---------- Static-Page Body (Impressum, Datenschutz) ---------- */

.prose {
    max-width: 720px;
    background: #ffffff;
    border-radius: 8px;
    padding: 32px 40px;
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3),
                0 1px 3px 1px rgba(60, 64, 67, 0.15);
}
.prose h1 {
    font-size: 26px;
    font-weight: 500;
    margin: 0 0 16px;
    color: #202124;
}
.prose h2 {
    font-size: 18px;
    font-weight: 500;
    margin: 24px 0 8px;
    color: #202124;
}
.prose p {
    font-size: 14px;
    color: #3c4043;
    margin: 0 0 12px;
    line-height: 1.6;
}
.prose ul {
    margin: 0 0 12px 20px;
    color: #3c4043;
    font-size: 14px;
    line-height: 1.6;
}
