/* Imperastro.World — gemeinsame Stile für Landingpage, Auth und Dashboard */

:root {
    /* Default-Theme = anthrazit (entspricht der bisherigen Dunkel-Optik). Die
       theme-*-Klassen unten überschreiben die Variablen pro Theme. */
    --bg:        #0f1116;
    --bg-card:   #161922;
    --bg-input:  #1d2230;
    --border:    #2a2f3d;
    --text:      #e7e9ee;
    --text-mute: #9aa1b3;
    --accent:    #c9a868;       /* warmes Gold — passt zur Astronomie */
    --accent-h:  #d8ba7c;
    --error:     #ff8480;
    --ok:        #8ad094;
    --radius:    10px;
    --radius-lg: 18px;
    --maxw:      1080px;

    /* Hero-Image-URL — relativ zum CSS-Pfad, damit der Basis-Pfad egal ist */
    --hero-image: url('../images/IMPERASTRO-World_v1.webp');
}

/* ============ Themes (auf body) — identische Namen wie in der Karten-Sidebar ============ */
body.theme-light {
    --bg:        #f5f6fa;
    --bg-card:   #ffffff;
    --bg-input:  #f0f1f5;
    --border:    rgba(0, 0, 0, 0.10);
    --text:      #1a1d29;
    --text-mute: #6a7080;
    --accent:    #4f8cff;
    --accent-h:  #6ea8ff;
}
body.theme-anthracite {
    --bg:        #0e1320;
    --bg-card:   #161c2c;
    --bg-input:  #1d2538;
    --border:    rgba(255, 255, 255, 0.10);
    --text:      #e8eaf2;
    --text-mute: #8b91a8;
    --accent:    #6ea8ff;
    --accent-h:  #8fbaff;
}

@font-face {
    font-family: 'Barlow';
    src: url('../fonts/barlow/Barlow-Regular.ttf') format('truetype');
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: 'Barlow';
    src: url('../fonts/barlow/Barlow-Medium.ttf') format('truetype');
    font-weight: 500;
    font-display: swap;
}
@font-face {
    font-family: 'Barlow';
    src: url('../fonts/barlow/Barlow-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Barlow', system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-h); text-decoration: underline; }

.iw-shell { min-height: 100vh; display: flex; flex-direction: column; }
.iw-main  { flex: 1; padding: 32px 20px; }
.iw-container { max-width: var(--maxw); margin: 0 auto; }

/* ============ Header ============ */
.iw-header {
    border-bottom: 1px solid var(--border);
    padding: 14px 20px;
}
.iw-header .iw-container {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.iw-brand {
    font-weight: 600; font-size: 1.05rem; letter-spacing: 0.04em;
    color: var(--text); text-decoration: none; text-transform: uppercase;
}
.iw-brand:hover { color: var(--text); text-decoration: none; }
.iw-nav { display: flex; gap: 16px; align-items: center; }
.iw-nav a { color: var(--text-mute); font-size: 0.95rem; }
.iw-nav a:hover { color: var(--text); text-decoration: none; }

/* ============ Footer ============ */
.iw-footer {
    border-top: 1px solid var(--border);
    padding: 18px 20px;
    color: var(--text-mute); font-size: 0.85rem;
}
.iw-footer .iw-container {
    display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.iw-footer a { color: var(--text-mute); }
.iw-footer a:hover { color: var(--text); }

/* ============ Karten / Formulare ============ */
.iw-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
}
.iw-auth { max-width: 460px; margin: 24px auto; }
.iw-auth h1 { margin: 0 0 18px; font-weight: 600; font-size: 1.6rem; }
.iw-auth p.iw-sub { color: var(--text-mute); margin: -10px 0 18px; }

.iw-form label {
    display: block; margin: 14px 0 6px; font-size: 0.9rem; color: var(--text-mute);
}
.iw-form input[type=email],
.iw-form input[type=password],
.iw-form input[type=text],
.iw-form input[type=date],
.iw-form input[type=time] {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 11px 13px;
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
}
.iw-form input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(201, 168, 104, 0.18);
}

.iw-btn {
    display: inline-block;
    background: var(--accent);
    color: #1a1a1a;
    border: 0;
    padding: 12px 20px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    transition: background-color 120ms ease, transform 120ms ease;
}
.iw-btn:hover { background: var(--accent-h); color: #1a1a1a; text-decoration: none; }
.iw-btn--block { display: block; width: 100%; margin-top: 18px; text-align: center; }
.iw-btn--ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}
.iw-btn--ghost:hover { background: var(--bg-input); color: var(--text); }
.iw-btn--lg { padding: 14px 28px; font-size: 1.05rem; }
.iw-btn--outline-light {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.55);
}
.iw-btn--outline-light:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-color: #fff;
}

.iw-link-row {
    display: flex; justify-content: space-between; margin-top: 12px;
    font-size: 0.9rem;
}
.iw-link-row a { color: var(--text-mute); }
.iw-link-row a:hover { color: var(--accent); }

/* ============ Flash-Meldungen ============ */
.iw-alert {
    padding: 12px 14px;
    border-radius: var(--radius);
    margin-bottom: 14px;
    font-size: 0.95rem;
}
.iw-alert--error { background: rgba(255, 132, 128, 0.12); color: var(--error); border: 1px solid rgba(255, 132, 128, 0.35); }
.iw-alert--ok    { background: rgba(138, 208, 148, 0.12); color: var(--ok);    border: 1px solid rgba(138, 208, 148, 0.35); }
.iw-alert--info  { background: rgba(201, 168, 104, 0.12); color: var(--accent); border: 1px solid rgba(201, 168, 104, 0.35); }

/* ============ Hero-Modus (Landingpage) ============
   Vollbild-Hintergrundbild mit dunklem Gradient-Overlay, Header transparent darüber. */
.iw-page-hero { background: #000; }
.iw-page-hero .iw-shell {
    min-height: 100vh;
    background: var(--hero-image) center/cover no-repeat fixed;
    position: relative;
}
.iw-page-hero .iw-shell::before {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(180deg,
                rgba(8,10,18,0.55) 0%,
                rgba(8,10,18,0.30) 35%,
                rgba(8,10,18,0.70) 100%);
    pointer-events: none;
    z-index: 0;
}
.iw-page-hero .iw-header,
.iw-page-hero .iw-main,
.iw-page-hero .iw-footer { position: relative; z-index: 1; }

.iw-page-hero .iw-header {
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}
.iw-page-hero .iw-brand { color: #fff; }
.iw-page-hero .iw-nav a { color: rgba(255, 255, 255, 0.78); }
.iw-page-hero .iw-nav a:hover { color: #fff; }
.iw-page-hero .iw-nav .iw-btn--ghost {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.45);
}
.iw-page-hero .iw-nav .iw-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.10);
    border-color: #fff;
}

.iw-page-hero .iw-main {
    display: flex; align-items: center;
    min-height: calc(100vh - 60px - 60px); /* abzgl. Header/Footer */
}
.iw-page-hero .iw-footer {
    background: transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.65);
}
.iw-page-hero .iw-footer a { color: rgba(255, 255, 255, 0.65); }
.iw-page-hero .iw-footer a:hover { color: #fff; }

/* Hero-Inhalt */
.iw-hero-full {
    color: #fff;
    text-align: center;
    padding: 60px 16px;
    max-width: 880px;
    margin: 0 auto;
}
.iw-hero-full h1 {
    font-size: clamp(2.4rem, 6vw, 4rem);
    line-height: 1.05; font-weight: 600;
    margin: 0 0 18px;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.55);
    letter-spacing: 0.005em;
}
.iw-hero-full .iw-lead {
    font-size: clamp(1rem, 1.7vw, 1.25rem);
    color: rgba(255, 255, 255, 0.88);
    margin: 0 auto 36px;
    max-width: 680px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}
.iw-hero-full .iw-hero-actions {
    display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
}

/* ============ Auth-Modus (Login/Register/…) ============
   Vollbild-Hintergrundbild, zentrale weiße Karte mit Form. */
.iw-page-auth { background: #000; }
.iw-page-auth .iw-shell {
    min-height: 100vh;
    background: var(--hero-image) center/cover no-repeat fixed;
    position: relative;
}
.iw-page-auth .iw-shell::before {
    content: "";
    position: absolute; inset: 0;
    /*
    background: linear-gradient(180deg,
                rgba(8,10,18,0.50) 0%,
                rgba(8,10,18,0.35) 50%,
                rgba(8,10,18,0.70) 100%);

     */
    pointer-events: none;
    z-index: 0;
}
.iw-page-auth .iw-header,
.iw-page-auth .iw-main,
.iw-page-auth .iw-footer { position: relative; z-index: 1; }

.iw-page-auth .iw-header {
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}
.iw-page-auth .iw-brand { color: #fff; }
.iw-page-auth .iw-nav a { color: rgba(255, 255, 255, 0.78); }
.iw-page-auth .iw-nav a:hover { color: #fff; }
.iw-page-auth .iw-nav .iw-btn--ghost {
    color: #fff; border-color: rgba(255, 255, 255, 0.45);
}

.iw-page-auth .iw-main {
    display: flex; align-items: center; justify-content: center;
    padding: 40px 16px;
}
.iw-page-auth .iw-footer {
    background: transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.65);
}
.iw-page-auth .iw-footer a { color: rgba(255, 255, 255, 0.65); }
.iw-page-auth .iw-footer a:hover { color: #fff; }

/* Auth-Karte: weißer Kasten mit dezent transparentem Hintergrund */
.iw-page-auth .iw-auth { margin: 0 auto; width: 100%; }
.iw-page-auth .iw-card {
    background: rgba(255, 255, 255, 0.97);
    color: #1a1d29;
    border: 0;
    border-radius: var(--radius-lg);
    padding: 36px 36px 32px;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    animation: iw-card-fade 0.55s ease-out;
}
@keyframes iw-card-fade {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.iw-page-auth .iw-card h1 {
    font-weight: 600; color: #1a1d29; text-align: center;
    margin: 0 0 8px; font-size: 1.5rem;
}
.iw-page-auth .iw-card p.iw-sub {
    color: #6a7080; text-align: center; margin: 0 0 22px;
}
.iw-page-auth .iw-form label { color: #6a7080; }
.iw-page-auth .iw-form input[type=email],
.iw-page-auth .iw-form input[type=password],
.iw-page-auth .iw-form input[type=text] {
    background: #f5f6fa;
    border: 1px solid #dfe2eb;
    color: #1a1d29;
}
.iw-page-auth .iw-form input:focus {
    background: #fff;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(201, 168, 104, 0.22);
}
.iw-page-auth .iw-link-row a { color: #6a7080; }
.iw-page-auth .iw-link-row a:hover { color: var(--accent); }
.iw-page-auth .iw-text-mute { color: #6a7080; }

/* Logo über der Auth-Karte */
.iw-auth-brand {
    text-align: center; margin: 0 auto 22px;
    display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.iw-auth-brand .iw-auth-brand-mark {
    font-family: 'Barlow', system-ui, sans-serif;
    color: #fff; font-weight: 600; font-size: 1.4rem;
    letter-spacing: 0.18em; text-transform: uppercase;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}
.iw-auth-brand .iw-auth-brand-sub {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem; max-width: 380px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* ============ Features (Landingpage unter dem Hero) ============ */
.iw-features {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 22px; margin: 48px 0;
}
.iw-feature h3 { margin: 0 0 6px; font-size: 1.05rem; font-weight: 600; }
.iw-feature p  { margin: 0; color: var(--text-mute); }

/* ============ Pricing ============ */
.iw-pricing {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px; margin: 30px 0;
}
.iw-plan {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}
.iw-plan--accent { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(201,168,104,.10); }
.iw-plan h3 { margin: 0 0 6px; font-size: 1.2rem; font-weight: 600; }
.iw-plan .iw-price { font-size: 1.8rem; font-weight: 600; margin: 6px 0 4px; }
.iw-plan .iw-price small { font-size: 0.85rem; color: var(--text-mute); font-weight: 400; }
.iw-plan ul { list-style: none; padding: 0; margin: 14px 0 18px; }
.iw-plan li { padding: 6px 0; color: var(--text-mute); }
.iw-plan li::before { content: "✓ "; color: var(--accent); margin-right: 4px; }

/* ============ Dashboard ============ */
.iw-dash-grid { display: grid; gap: 18px; }

/* Welcome-Hero im Dashboard */
.iw-dash-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 50px 28px;
    background: var(--hero-image) top/cover no-repeat;
    color: #fff;
}
.iw-dash-hero h2 {
    margin: 0 0 6px; font-weight: 600; font-size: 1.5rem;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}
.iw-dash-hero p {
    margin: 0 0 18px; color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}
.iw-dash-hero .iw-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Stat-Karten — kompaktere Cards mit Icon-Slot + KPI */
.iw-dash-stats {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}
.iw-stat {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
}
.iw-stat-label { font-size: 0.8rem; color: var(--text-mute); text-transform: uppercase; letter-spacing: 0.06em; }
.iw-stat-value { font-size: 1.5rem; font-weight: 600; margin-top: 4px; }
.iw-stat-meta  { font-size: 0.85rem; color: var(--text-mute); margin-top: 2px; }
.iw-stat--accent .iw-stat-value { color: var(--accent); }

/* Widget-Karten — Dashboard-Sektionen mit Titel-Zeile */
.iw-widget {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}
.iw-widget-head {
    display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
    margin: -4px 0 12px;
}
.iw-widget-head h3 { margin: 0; font-size: 1.05rem; font-weight: 600; }
.iw-widget-head a  { font-size: 0.85rem; color: var(--text-mute); }
.iw-widget-head a:hover { color: var(--accent); text-decoration: none; }

/* Liste-Items im Dashboard */
.iw-list { list-style: none; padding: 0; margin: 0; }
.iw-list li {
    padding: 10px 0;
    border-top: 1px solid var(--border);
    display: flex; justify-content: space-between; gap: 10px; align-items: center;
}
.iw-list li:first-child { border-top: 0; }

/* Quick-Action-Buttons im Dashboard */
.iw-quick-actions {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}
.iw-quick {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    color: var(--text);
    text-decoration: none;
    transition: border-color 120ms ease, transform 120ms ease;
    display: block;
}
.iw-quick:hover {
    border-color: var(--accent);
    text-decoration: none; color: var(--text);
    transform: translateY(-1px);
}
.iw-quick-title { font-weight: 600; }
.iw-quick-sub   { font-size: 0.85rem; color: var(--text-mute); margin-top: 2px; }

/* Generic row layout (compat zu altem dashboard.php) */
.iw-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }

/* ============ Topbar-Theme-Toggle ============
   Kleines Icon-Button in der Nav, dass zwischen Hell und Anthrazit umschaltet. */
.iw-theme-toggle-form { margin: 0; display: inline-flex; }
.iw-theme-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-mute);
    cursor: pointer;
    padding: 0;
    transition: color 120ms ease, border-color 120ms ease, background-color 120ms ease;
}
.iw-theme-toggle:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.04);
}
/* Hero- und Auth-Modus: Icon weiß gegen das Hintergrundbild */
.iw-page-hero .iw-theme-toggle,
.iw-page-auth .iw-theme-toggle {
    color: rgba(255, 255, 255, 0.78);
    border-color: rgba(255, 255, 255, 0.35);
}
.iw-page-hero .iw-theme-toggle:hover,
.iw-page-auth .iw-theme-toggle:hover {
    color: #fff;
    border-color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

/* ============ Utility ============ */
.iw-text-mute { color: var(--text-mute); }
.iw-text-center { text-align: center; }
.iw-mt-0 { margin-top: 0; }
.iw-mt-1 { margin-top: 8px; }
.iw-mt-2 { margin-top: 16px; }
.iw-mt-3 { margin-top: 24px; }
.iw-mb-0 { margin-bottom: 0; }
