/* ================================================================
   base.css – Variablen, Reset & geteilte Komponenten
   Bonnermann & Hüls Portal  ·  Light Theme
   ================================================================ */

/* ── Variables ──────────────────────────────────────────────────── */
:root {
    --red:          #c0001e;
    --red-dark:     #950018;
    --red-light:    #e8001f;

    /* Texte */
    --text-primary:   #1c1c1c;
    --text-secondary: #6a6a6a;
    --text-on-accent: #ffffff;

    /* Flächen */
    --bg-body:    #f8f5f5;
    --bg-card:    #ffffff;
    --bg-input:   rgba(0, 0, 0, 0.04);

    /* Ränder */
    --border:     rgba(0, 0, 0, 0.10);
    --border-input: rgba(0, 0, 0, 0.15);

    /* Schatten */
    --shadow-sm:  0 2px 8px  rgba(0, 0, 0, 0.07);
    --shadow-md:  0 6px 24px rgba(0, 0, 0, 0.09);
    --shadow-lg:  0 16px 48px rgba(0, 0, 0, 0.11);

    --radius:     10px;
    --transition: 0.2s ease;
}

/* ── Reset ──────────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    min-height: 100%;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
}

/* ── Background ─────────────────────────────────────────────────── */
.bg {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 46%, rgba(249, 232, 235, 0.50) 0%, transparent 55%),
        linear-gradient(150deg, #ffffff 0%, #f8f2f3 100%);
    z-index: 0;
}

/* Name-Wasserzeichen (per data-watermark-Attribut gesetzt) */
.bg::after {
    content: attr(data-watermark);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 7rem;
    font-weight: 500;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: #1a0008;
    opacity: 0.15;
    white-space: nowrap;
    padding-top: 0.65rem;
    border-top: 5px solid rgba(192, 0, 30, 0.18);
    pointer-events: none;
}

/* ── Form: Label ────────────────────────────────────────────────── */
label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 0.45rem;
}

/* ── Form: Input & Select ───────────────────────────────────────── */
input[type="text"],
input[type="password"],
input[type="email"],
select {
    width: 100%;
    padding: 0.7rem 0.95rem;
    background: var(--bg-input);
    border: 1px solid var(--border-input);
    border-radius: calc(var(--radius) - 2px);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color var(--transition),
                background    var(--transition),
                box-shadow    var(--transition);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
select:focus {
    border-color: var(--red);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(192, 0, 30, 0.12);
}

input::placeholder { color: rgba(0, 0, 0, 0.28); }

input:disabled,
select:disabled {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
    border-style: dashed;
    color: var(--text-secondary);
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
}

select option {
    background: #fff;
    color: var(--text-primary);
}

/* ── Form: Select wrapper (custom arrow) ────────────────────────── */
.select-wrapper { position: relative; }
.select-wrapper::after {
    content: '';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left:  5px solid transparent;
    border-right: 5px solid transparent;
    border-top:   6px solid var(--text-secondary);
    pointer-events: none;
}

/* ── Form group ─────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.2rem; }

/* ── Button: Primary ────────────────────────────────────────────── */
.btn-primary {
    width: 100%;
    padding: 0.78rem 1rem;
    margin-top: 0.4rem;
    background: var(--red);
    border: none;
    border-radius: calc(var(--radius) - 2px);
    color: var(--text-on-accent);
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background   var(--transition),
                transform    var(--transition),
                box-shadow   var(--transition);
}
.btn-primary:hover {
    background: var(--red-light);
    box-shadow: 0 4px 18px rgba(192, 0, 30, 0.30);
}
.btn-primary:active {
    background: var(--red-dark);
    transform: translateY(1px);
}

/* ── Alerts ─────────────────────────────────────────────────────── */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    border-radius: calc(var(--radius) - 2px);
    padding: 0.75rem 0.9rem;
    margin-bottom: 1.2rem;
    font-size: 0.87rem;
    line-height: 1.45;
}
.alert__icon { flex-shrink: 0; }

.alert-error {
    background: rgba(192, 0, 30, 0.07);
    border: 1px solid rgba(192, 0, 30, 0.22);
    color: #a0001a;
}
.alert-success {
    background: rgba(22, 163, 74, 0.08);
    border: 1px solid rgba(22, 163, 74, 0.25);
    color: #166534;
}
