/* base.css – Grundlayout & Variablen */
:root {
    /* Main Style */
    --color-primary: #38bdf8;
    --color-primary-dark: #2088d8;
    --color-primary-light: #4fc08d;
    --color-primary-lighter: #90cdf4;
    --color-primary-lightest: rgba(156, 163, 175, 0.16);
    --color-error: #ef4444;
    --color-success: #00947e;
    --color-success-soft: #bbf7d0;
    --color-warning: #f59e0b;
    --color-info: #3b82f6;
    --color-border: #4a5568;
    --color-bg-gradient-start: #0f172a;
    --color-bg-gradient-end: rgba(30, 41, 59, 0.3);
    --color-text: #9ca3af;
    --shadow-soft: 0 1px 2px 0 rgb(0 0 0 / 0.05);

    --color-text-primary: #c5c5c5;
    --color-text-lead:#cbd5f5;
    --color-text-muted: rgba(220, 217, 217, 0.69);

    --color-surface:          rgba(15, 23, 42, 0.9);
    --color-border-subtle:    rgba(148, 163, 184, 0.4);

    --color-badge-success-bg:     rgba(34, 197, 94, 0.1);
    --color-badge-success-border: rgba(34, 197, 94, 0.6);
    --color-badge-success-text:   #bbf7d0;

    --color-link-primary: #38bdf8;
    --color-button-bg: rgba(66, 162, 230, 0.57);
    --color-button-bg-secondary: rgba(196, 199, 202, 0.5);

    --color-profile-header-bg: rgba(30, 41, 59, 0.42);
    --color-profile-contact-tile-title: rgba(156, 163, 175, 0.89);
    --color-profile-header-text: #e5e7eb;
    --color-profile-contact-tile-bg: rgba(30, 41, 59, 0.05);
    --color-profile-contact-tile-border: #4a5568;
    --color-profile-contact-header-bg: #1e293b;


    --shadow-profile-tile: 0 1px 2px 0 rgb(0 0 0 / 0.05);

    /* Modal CSS */
    --shadow-modal-dialog: 5px 5px 20px rgba(97, 97, 97, 0.28);
    --border-modal-dialog: 1px solid rgba(66, 65, 65, 0.69);
    --color-form-controls-bg: rgba(8, 23, 42, 0.8);

    /* Profile Contact Tiles */
    --color-primary-contact-background: rgba(197, 221, 255, 0.35);
    --border-radius-primary-contact-tile: 10px;
    --text-color-primary-contact-tile: #f3f4f6;

    /* Admin Styles */
    --card-bg: rgba(8, 23, 42, 0.8);
    --border-color: #4a5568;

}

/* Light Theme Overrides */

:root[data-theme="light"] {
    --color-primary: #2f3030;
    --color-primary-dark: #605f5f;
    --color-primary-light: #717171;
    --color-primary-lighter: #7c7c7c;
    --color-primary-lightest: rgba(156, 163, 175, 0.16);
    --color-bg-gradient-start: #e0e0e0;
    --color-bg-gradient-end: rgba(122, 125, 129, 0.85);

    --color-text-primary: #0f172a;
    --color-text-lead: #0f111e;
    --color-text: #334155;
    --color-text-muted: rgba(15, 23, 42, 0.65);

    --color-surface: rgba(159, 157, 157, 0.92);
    --color-border: rgba(15, 23, 42, 0.18);
    --color-border-subtle: rgba(15, 23, 42, 0.18);

    --color-badge-success-bg: rgba(34, 72, 197, 0.1);
    --color-badge-success-border: rgba(34, 67, 197, 0.6);
    --color-badge-success-text: #bbc7f7;

    --color-profile-header-bg: rgb(116 118 121 / 0.53);
    --color-profile-header-text: #0f172a;
    --color-profile-contact-header-bg: rgba(5, 32, 73, 0.63);

    --color-profile-contact-tile-title: rgba(15, 23, 42, 0.85);
    --color-profile-contact-tile-bg: rgba(90, 101, 177, 0.09);
    --color-profile-contact-tile-border: rgba(15, 23, 42, 0.18);

    --color-primary-contact-background: rgba(56, 189, 248, 0.18);
    --text-color-primary-contact-tile: #0f172a;

    --color-link-primary: #11171b;
    --color-button-bg: #afc6d691;

    --color-form-controls-bg: rgba(193, 197, 208, 0.59);
}

/* Box-Sizing-Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    height: 100vh;
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--color-text-primary);
    background: linear-gradient(
            135deg,
            var(--color-bg-gradient-start),
            var(--color-bg-gradient-end)
    );
}
a  {
    color: var(--color-link-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 0.75rem;
    padding: 0.2rem 0.3rem;
    &:hover {
        color: var(--color-primary);
        text-decoration: underline;

    }
}

/* zentriertes Layout (Landing, Login, Wartung, SignUp, …) */
.layout-centered {
    display: flex;
    align-items: stretch;
    justify-content: center;
}

/* generischer Wrapper zur Breitenbegrenzung */
.page-wrapper {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    height: 100%;
    justify-content: center;
}

/* Body-Scroll sperren, wenn ein Modal offen ist */
body.modal-open {
    overflow: hidden;
}

/* Overlay */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: var(--color-surface);
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
}

/* Zustand: sichtbar */
.modal.modal--active {
    display: flex;
}

/* Dialog */
.modal__dialog {
    background: var(--color-surface);
    max-width: 600px;
    width: 100%;
    border-radius: 8px;
    border: var(--border-modal-dialog);
    padding: 1.5rem;
    box-shadow: var(--shadow-modal-dialog);
}

/*Modal Buttons*/
.modal-summary-actions{
    display: flex;
    justify-content: flex-end;
    padding: 1rem 0 0 0;
}
/* Header/Footer – rein kosmetisch */
.modal__header,
.modal__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

.modal__header {
    margin-bottom: 1rem;
}

.modal__footer {
    margin-top: 1rem;
}

.modal__close {
    border: none;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}
.pw-rules {
    margin: .5rem 0 0;
    padding-left: 1.1rem;
    font-size: .65rem;
}

.pw-rule {
    margin: .25rem 0;
    color: #b23b3b; /* rot */
}

.pw-rule.pw-ok {
    color: #1f7a3a; /* grün */
}

.pw-match {
    margin-top: .5rem;
    font-size: .65rem;
}

.pw-match.pw-bad {
    color: #b23b3b;
}

.pw-match.pw-ok {
    color: #1f7a3a;
}

.muted {
    opacity: 0.85;
}

/*-- Breadcrumb and Footer --*/
.layout-shell {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
}

.layout-shell__main {
    flex: 1 1 auto;
}

.layout-shell__bottom {
    flex: 0 0 auto;
}

:root {
    --pad: 16px;
    --bg: #0b1220;
    --panel: rgba(255,255,255,0.08);
    --text: #e9eef7;
    --muted: rgba(233,238,247,0.75);
    --border: rgba(255,255,255,0.16);
    --shadow: 0 10px 30px rgba(0,0,0,0.35);
    --radius: 14px;
    --header-h: 64px;
    --footer-h: 64px;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: radial-gradient(1200px 600px at 20% 10%, #1b2b57, var(--bg));
    color: var(--text);
    line-height: 1.5;
}

html, body { height: 100%; }

body { overflow: hidden; }

/* App-Layout: Header & Footer immer sichtbar, Main scrollt dazwischen */
.app-main{
    position: fixed;
    top: var(--header-h);
    bottom: var(--footer-h);
    left: 0;
    right: 0;
    overflow: auto;
    padding: 22px 0;
}

.app-footer{
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--footer-h);
    z-index: 100;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(10, 18, 32, 0.75);
    border-top: 1px solid var(--border);
}

.app-footer .footer-inner{
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    overflow: auto;
}

/* Zentrierter Seitenrahmen */
.container {
    width: 100vw;
    height: 100%;
    margin: 0 auto;
    padding: 0 var(--pad);
}

header {
    position: sticky;
    z-index: 10;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(10, 18, 32, 0.75);
    border-bottom: 1px solid var(--border);
}
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    backdrop-filter: blur(100px);
    -webkit-backdrop-filter: blur(100px);
}
/* Header-Inhalt */
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 64px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    letter-spacing: 0.2px;
}
.brand-badge {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border-style: outset;
    border-width: 1px;
    background: linear-gradient(135deg, rgba(237, 213, 58, 0.2), rgba(34, 197, 94, 0.2));
    box-shadow: var(--shadow);
    image-resolution: from-image;
}
.brand small { color: var(--muted); font-weight: 500; }

/* Hamburger Button */
.hamburger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.06);
    color: var(--text);
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0,0,0,0.18);
}
.hamburger:focus-visible {
    outline: 2px solid rgba(124, 58, 237, 0.9);
    outline-offset: 2px;
}
.hamburger-lines {
    width: 18px;
    height: 12px;
    position: relative;
}
.hamburger-lines span {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform 180ms ease, top 180ms ease, opacity 180ms ease;
}
.hamburger-lines span:nth-child(1) { top: 0; }
.hamburger-lines span:nth-child(2) { top: 5px; }
.hamburger-lines span:nth-child(3) { top: 10px; }

/* Offcanvas Menü */
.menu {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 20;
}
.menu[aria-hidden="false"] {
    pointer-events: auto;
}
.menu-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
    opacity: 0;
    transition: opacity 180ms ease;
}
.menu[aria-hidden="false"] .menu-backdrop {
    opacity: 1;
}
.menu-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(360px, 92vw);
    height: 100%;
    background: rgba(12, 18, 32, 0.95);
    border-left: 1px solid var(--border);
    box-shadow: var(--shadow);
    transform: translateX(12px);
    opacity: 0;
    transition: transform 180ms ease, opacity 180ms ease;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.menu[aria-hidden="false"] .menu-panel {
    transform: translateX(0);
    opacity: 1;
}

.menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.menu-title {
    font-weight: 700;
    margin: 0;
}
.menu-close {
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.06);
    color: var(--text);
    border-radius: 12px;
    padding: 10px 12px;
    cursor: pointer;
}

nav a {
    display: block;
    padding: 12px 12px;
    border-radius: 12px;
    color: var(--text);
    text-decoration: none;
    border: 1px solid transparent;
    background: rgba(255,255,255,0.04);
}
nav a:hover {
    border-color: rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.07);
}
.hint {
    color: var(--muted);
    font-size: 0.95rem;
}

/* Main: volle Breite, aber Inhalt zentriert */
main {
    padding: 22px 0;
}

.hero {
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.06);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
    margin: 18px 0;
}
.hero h1 { margin: 0 0 6px 0; font-size: 1.35rem; }
.hero p { margin: 0; color: var(--muted); }

/* Cards */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
    margin-top: 14px;
}
.card {
    /* background: var(--color-surface); */
    border-radius: 16px;
    /* box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45); */
    padding: 1rem 1rem;
    /* border: 1px solid var(--color-border-subtle); */
    position: relative;
    height: 100%;
    width: 100%;
}
.card img {
    display: block;
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: rgba(255,255,255,0.08);
}
.card .body {
    padding: 12px 12px 14px;
}
.card .body h3 {
    margin: 0 0 6px;
    font-size: 1rem;
}
.card .body p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

/* Loader */
.loader-wrap {
    margin: 18px 0 4px;
    display: grid;
    place-items: center;
}
.loader {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 3px solid rgba(255,255,255,0.18);
    border-top-color: rgba(255,255,255,0.9);
    animation: spin 0.9s linear infinite;
    display: none;
}
.auth-actions {
    display: flex;
    justify-content: flex-end;
    padding: 0.5rem 0.25rem;
}
.loader[data-show="true"] { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.app-footer .footer-inner {
    padding: 18px 0;
    color: var(--muted);
    font-size: 0.95rem;
}

/* Kleine Screens: Brandtext etwas kompakter */
@media (max-width: 420px) {
    .brand strong { display: none; }
}