/*
 * Corporate Design Feldsaaten Freudenberger (angelehnt an www.freudenberger.net)
 * Wird NACH dem Tailwind-Build geladen und funktioniert ohne Node/Vite-Build.
 * - Firmengrün #009036, Myriad Pro (falls installiert) sonst Arial
 * - Die Akzentfarbe "blue" der Views wird auf eine Grün-Skala umgeleitet (Tailwind-v4-Variablen)
 * - Weiße Kopfzeile mit weichem Schatten, Verlaufsleiste Grün→Schwarz, grüne Fußzeile
 */
:root {
    --brand: #009036;
    --brand-dark: #007a2e;
    --brand-darker: #005c22;
    --ink: #141414;

    --font-sans: 'Myriad Pro', MyriadPro, Arial, Helvetica, sans-serif;

    --color-blue-50: #ebf7ef;
    --color-blue-100: #d2eedb;
    --color-blue-200: #a6dcb8;
    --color-blue-300: #6fc48e;
    --color-blue-400: #33a862;
    --color-blue-500: #00994a;
    --color-blue-600: #009036;
    --color-blue-700: #007a2e;
    --color-blue-800: #006327;
    --color-blue-900: #0a4d22;
    --color-blue-950: #042b12;

    --radius-lg: 0.25rem;
    --radius-xl: 0.25rem;
    --radius-2xl: 0.375rem;
}

html, body { font-family: var(--font-sans); }
body { color: var(--ink); display: flex; flex-direction: column; min-height: 100vh; }

h1, h2 { text-transform: uppercase; font-weight: 700; letter-spacing: 0.01em; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 3px solid var(--brand); outline-offset: 2px;
}

/* Karten: weicher Schatten statt Rahmenlinie wie auf der Website */
.shadow-sm { box-shadow: 0 0 20px 0 rgb(0 0 0 / 0.08) !important; }

/* Buttons und Eingabefelder */
.primary-button { background-color: var(--brand); font-weight: 600; border-radius: 0.25rem; }
.primary-button:hover { background-color: var(--brand-dark); }
.field { border-radius: 0.25rem; background: #fff; }
.field:focus { border-color: var(--brand); }

/* Kopfzeile */
.site-header { position: relative; z-index: 10; background: #fff; box-shadow: 0 0 20px 0 rgb(0 0 0 / 0.2); }
.site-header-inner { max-width: 72rem; margin: 0 auto; padding: 0.75rem 1.5rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; }
.site-brand { display: flex; align-items: center; gap: 0.75rem; color: var(--ink); text-decoration: none; }
.site-brand img { width: 56px; height: 56px; flex: none; }
.site-brand-title { display: block; font-size: 1.125rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; line-height: 1.2; }
.site-brand-sub { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: #64748b; line-height: 1.3; }

.main-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; }
.main-nav form { margin: 0; }
.main-nav a, .main-nav button {
    font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
    color: #334155; text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit;
}
.main-nav a:hover, .main-nav button:hover { color: var(--brand); }
.nav-count { margin-left: 0.25rem; border-radius: 0.25rem; background: var(--color-blue-100); color: var(--color-blue-900); padding: 0.1rem 0.4rem; }
.role-badge { border-radius: 0.25rem; background: var(--brand); color: #fff; padding: 0.2rem 0.6rem; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }

.brand-stripe { height: 6px; background: linear-gradient(90deg, var(--brand) 0%, var(--brand) 55%, #000 100%); }

/* Inhalt und Meldungen */
.site-main { flex: 1 0 auto; width: 100%; box-sizing: border-box; }
.flash-ok { border: 1px solid var(--color-blue-200); background: var(--color-blue-50); color: var(--color-blue-900); }

/* Fußzeile */
.site-footer { background: var(--brand); color: #fff; }
.site-footer-inner { max-width: 72rem; margin: 0 auto; padding: 1rem 1.5rem; font-size: 0.875rem; }

@media (max-width: 640px) {
    .site-brand img { width: 44px; height: 44px; }
    .main-nav { gap: 0.5rem 0.75rem; }
}

/* Microsoft-Anmeldung (Entra ID) */
.ms-button { display: flex; align-items: center; justify-content: center; gap: 0.75rem; width: 100%; box-sizing: border-box;
    padding: 0.7rem 1rem; border: 1px solid #8c8c8c; border-radius: 0.25rem; background: #fff; color: #5e5e5e;
    font-weight: 600; text-decoration: none; }
.ms-button:hover { background: #f3f3f3; color: #1b1b1b; }
.ms-logo { width: 21px; height: 21px; flex: none; }
.local-login summary { cursor: pointer; font-size: 0.875rem; color: #475569; }
.local-login summary:hover { color: var(--brand); }
.entra-badge { display: inline-block; margin-top: 0.25rem; border-radius: 0.25rem; background: #eef2f7; color: #334155; padding: 0.1rem 0.45rem; font-size: 0.72rem; font-weight: 600; }

/* Persönliche Übersicht (Mitarbeiter / Prüfer) */
.dash-eyebrow { margin: 0 0 0.4rem; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--brand-dark); }
.dash-welcome { margin-top: 0.5rem; color: #475569; }
.dash-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin: 2rem 0 0; }
.dash-kpi { margin: 0; background: #fff; border-radius: 0.25rem; padding: 1rem 1.25rem; box-shadow: 0 0 20px 0 rgb(0 0 0 / 0.08); border-top: 4px solid var(--brand); }
.dash-kpi dt { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #64748b; }
.dash-kpi dd { margin: 0.35rem 0 0; font-size: 2rem; font-weight: 700; line-height: 1; color: var(--ink); }
.dash-kpi.is-alert { border-top-color: #b91c1c; }
.dash-kpi.is-alert dd { color: #b91c1c; }
.dash-kpi.is-highlight { background: var(--color-blue-50); }
.dash-card { margin-top: 2rem; background: #fff; border-radius: 0.25rem; padding: 1.5rem; box-shadow: 0 0 20px 0 rgb(0 0 0 / 0.08); }
.dash-card h2 { font-size: 1.05rem; margin: 0; }
.dash-card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid #e2e8f0; }
.dash-card-head a, .dash-more a, .dash-link { color: var(--brand-dark); font-weight: 600; font-size: 0.875rem; text-decoration: none; }
.dash-card-head a:hover, .dash-more a:hover, .dash-link:hover { text-decoration: underline; }
.dash-item { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; padding: 1rem 0; border-bottom: 1px solid #f1f5f9; }
.dash-item:last-of-type { border-bottom: 0; }
.dash-item-main { flex: 1 1 18rem; min-width: 0; }
.dash-item-title { margin: 0; font-weight: 600; }
.dash-code { display: inline-block; margin-right: 0.35rem; border-radius: 0.25rem; background: #f1f5f9; padding: 0.05rem 0.4rem; font-size: 0.8rem; font-weight: 700; color: #334155; }
.dash-item-meta { margin: 0.25rem 0 0; font-size: 0.875rem; color: #64748b; }
.dash-due { margin: 0.25rem 0 0; font-size: 0.875rem; color: #475569; }
.dash-due.is-soon { color: #92400e; font-weight: 600; }
.dash-due.is-overdue { color: #b91c1c; font-weight: 700; }
.dash-action { display: inline-block; text-decoration: none; white-space: nowrap; }
.dash-result { border-radius: 0.25rem; padding: 0.2rem 0.6rem; font-size: 0.8rem; font-weight: 700; }
.dash-result.is-passed { background: var(--color-blue-100); color: var(--color-blue-900); }
.dash-result.is-failed { background: #fee2e2; color: #991b1b; }
.dash-empty { margin: 1rem 0 0; color: #64748b; }
.dash-more { margin: 0.75rem 0 0; font-size: 0.875rem; color: #64748b; }
.dash-buttons { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }
.dash-buttons .primary-button { display: inline-block; text-decoration: none; }
@media (max-width: 768px) { .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
