/* ---------------------------------------------------------------------
   dataNet - Theme "light" (angelehnt an uiengine.eu: weisser Hintergrund
   mit weichen Farbverlauf-Blobs, dunkelblaue Headlines, Pill-Buttons)
   Gleiche Klassenstruktur wie theme-dark.css und theme-violet.css -
   nur die CSS-Datei wechselt (siehe config.php: 'theme' => 'light').
   --------------------------------------------------------------------- */

:root {
    --bg: #ffffff;
    --bg-soft: #f7f8fc;
    --surface: #ffffff;
    --border: #e7e9f2;
    --text: #16213e;
    --text-muted: #5b6478;

    --accent: #2563eb;          /* Eyebrow-/Link-Blau */
    --accent-2: #fb7185;        /* Button-Verlauf: Rosa... */
    --accent-3: #f97316;        /* ...zu Orange */
    --accent-grad: linear-gradient(120deg, var(--accent-2), var(--accent-3));
    --accent-grad-soft: linear-gradient(120deg, #eef2ff, #fff1f2 60%, #fff7ed);

    --success-bg: #ecfdf5;
    --success-border: #34d399;
    --success-text: #056a4d;

    --error-bg: #fef2f4;
    --error-border: #f87171;
    --error-text: #a5233a;

    --warn-bg: #fff8e6;
    --warn-border: #f5c451;
    --warn-text: #8a6414;

    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(22, 33, 62, 0.04), 0 12px 32px rgba(22, 33, 62, 0.07);
    --shadow-lg: 0 18px 40px rgba(251, 113, 133, 0.22);
}

* { box-sizing: border-box; }

/* Zwei weiche, grosse Farbverlauf-"Blobs" oben links (blau/tuerkis) und
   unten rechts (orange/pink) - fest positioniert, hinter dem Inhalt,
   stark weichgezeichnet. Genau die uiengine.eu-Optik. */
body {
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 2.5rem 1rem 4rem;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

body::before, body::after {
    content: "";
    position: fixed;
    width: 640px;
    height: 640px;
    border-radius: 50%;
    filter: blur(90px);
    z-index: -1;
    opacity: .55;
}
body::before {
    top: -280px;
    left: -280px;
    background: radial-gradient(circle at 30% 30%, #7dd3fc, #38bdf8 45%, transparent 72%);
}
body::after {
    bottom: -280px;
    right: -280px;
    background: radial-gradient(circle at 70% 70%, #fb923c, #f472b6 50%, transparent 72%);
}

.wrap { max-width: 760px; margin: 0 auto; position: relative; }
.wrap.wide { max-width: 1040px; }
.wrap.narrow { max-width: 480px; }

/* Eyebrow wie im Vorbild: schlichter blauer, fett/gross geschriebener
   Kleintext OHNE Badge-Hintergrund. */
.eyebrow {
    display: block;
    color: var(--accent);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: .6rem;
}

h1 {
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 .5rem;
    letter-spacing: -0.02em;
    color: var(--text);
}

header.page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1.5rem;
}

.meta { color: var(--text-muted); font-size: .85rem; }

/* --- Karten --- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.75rem;
}

/* --- Formulare --- */
label {
    display: block;
    margin-top: 1.1rem;
    margin-bottom: .35rem;
    color: var(--text);
    font-size: .85rem;
    font-weight: 600;
}
label:first-of-type { margin-top: 0; }

input[type=text],
input[type=password],
select,
textarea {
    width: 100%;
    background: var(--bg-soft);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: .7rem .85rem;
    font-family: inherit;
    font-size: .95rem;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
input[type=text]:focus,
input[type=password]:focus,
select:focus,
textarea:focus {
    outline: none;
    background: #fff;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
textarea { font-family: ui-monospace, "SF Mono", Consolas, monospace; min-height: 260px; resize: vertical; }

.row { display: flex; gap: 1rem; flex-wrap: wrap; }
.row > div { flex: 1; min-width: 160px; }

.hint { color: var(--text-muted); font-size: .8rem; margin-top: .5rem; }
.hint code, .footnote code {
    background: var(--bg-soft); border: 1px solid var(--border);
    padding: .05rem .4rem; border-radius: 5px; font-size: .85em;
}

/* --- Buttons: grosse, volle Pillenform wie "Jetzt herunterladen" --- */
button, a.btn, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    background: var(--accent-grad);
    color: #fff;
    border: none;
    padding: .8rem 1.8rem;
    border-radius: 999px;
    font-size: .95rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: transform .12s, box-shadow .12s, opacity .12s;
}
button:hover, a.btn:hover, .btn:hover { transform: translateY(-1px); box-shadow: 0 22px 44px rgba(251, 113, 133, 0.28); }
button:active, a.btn:active, .btn:active { transform: translateY(0); }
button:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

.btn.secondary {
    background: #fff;
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: none;
}
.btn.secondary:hover { border-color: var(--text); box-shadow: 0 6px 16px rgba(22, 33, 62, 0.08); }

.btn.block { display: flex; width: 100%; margin-top: 1.4rem; }

/* --- Meldungen --- */
.notice { border-radius: var(--radius-sm); padding: .9rem 1.1rem; margin-top: 1rem; font-size: .9rem; }
.notice.error   { background: var(--error-bg);   border: 1px solid var(--error-border);   color: var(--error-text); }
.notice.success { background: var(--success-bg); border: 1px solid var(--success-border); color: var(--success-text); }
.notice.warn    { background: var(--warn-bg);    border: 1px solid var(--warn-border);    color: var(--warn-text); }
.notice a { color: inherit; font-weight: 700; }
.notice strong { display: block; margin-bottom: .3rem; }

.field-copy { display: flex; gap: .5rem; align-items: center; margin-top: .4rem; }
.field-copy a { color: var(--accent); word-break: break-all; font-weight: 600; }

/* --- Datei-/Upload-spezifisch --- */
.dropzone {
    margin-top: 1rem;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 2.4rem 1rem;
    text-align: center;
    color: var(--text-muted);
    cursor: pointer;
    background: var(--bg-soft);
    transition: border-color .15s, background .15s, color .15s;
}
.dropzone.drag { border-color: var(--accent-3); background: var(--accent-grad-soft); color: var(--text); }
.dropzone input[type=file] { display: none; }

#filelist { margin-top: .75rem; font-size: .85rem; }
#filelist div { display: flex; justify-content: space-between; padding: .35rem 0; border-bottom: 1px solid var(--border); }

#progress-wrap { margin-top: 1rem; display: none; }
#progress-bar-bg { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 999px; height: 10px; overflow: hidden; }
#progress-bar { background: var(--accent-grad); height: 100%; width: 0%; transition: width .15s; border-radius: 999px; }
#progress-text { font-size: .8rem; color: var(--text-muted); margin-top: .35rem; text-align: right; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.1rem; margin-top: 1.4rem; }
.grid .card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.grid .preview {
    background: var(--bg-soft);
    display: flex; align-items: center; justify-content: center;
    height: 160px; overflow: hidden;
    padding: 14px; box-sizing: border-box;
}
.grid .preview img, .grid .preview video {
    max-width: 100%; max-height: 100%; object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(22, 33, 62, 0.10);
}
.grid .preview img { cursor: zoom-in; }
.grid .preview img:hover { box-shadow: 0 4px 14px rgba(22, 33, 62, 0.18); }
.grid .file-icon { font-size: 2.6rem; }
.grid .info { padding: .9rem 1rem; font-size: .82rem; }
.grid .name { font-weight: 700; word-break: break-all; margin-bottom: .25rem; }
.grid .sub { color: var(--text-muted); }
.grid a.dl {
    display: block; text-align: center; text-decoration: none;
    background: var(--bg-soft); color: var(--accent); font-weight: 700;
    padding: .65rem; font-size: .85rem; border-top: 1px solid var(--border);
    box-shadow: none; border-radius: 0;
}
.grid a.dl:hover { background: var(--accent-grad-soft); transform: none; }

/* --- Code-Vorschau: helle Karte mit "Browser-Fenster"-Punkten oben,
   wie im Vorbild - statt eines dunklen Terminal-Looks. --- */
.code-window {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.code-window .dots { display: flex; gap: .4rem; padding: .8rem 1rem; }
.code-window .dots span { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.code-window .dots span:nth-child(1) { background: #fb7185; }
.code-window .dots span:nth-child(2) { background: #e7e9f2; }
.code-window .dots span:nth-child(3) { background: #e7e9f2; }
.code-window pre {
    margin: 0; background: var(--bg-soft); border: none; border-radius: 0;
    border-top: 1px solid var(--border);
    box-shadow: none; padding: 1.1rem;
}
pre {
    background: #14162a;
    border-radius: var(--radius);
    padding: 1.1rem;
    overflow: auto;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
pre code { background: none !important; }

/* --- Passwort-Sperre --- */
.lock-box { text-align: center; margin-top: 4rem; }
.lock-box .card { display: inline-block; text-align: left; min-width: 280px; }
.lock-box h1 { text-align: center; }
.lock-box .eyebrow { text-align: center; }

/* --- Footer-Hinweis --- */
.footnote { margin-top: 2.5rem; color: var(--text-muted); font-size: .82rem; }

/* --- kleine Ergebnis-/Fehlerseiten (delete.php etc.) --- */
.center-page { max-width: 460px; margin: 4rem auto 0; text-align: center; }
.center-page .card { display: inline-block; padding: 2.2rem 2.4rem; }
.center-page .icon { font-size: 2.2rem; margin-bottom: .5rem; }

@media (max-width: 560px) {
    body { padding: 1.5rem 1rem 3rem; }
    body::before, body::after { width: 380px; height: 380px; filter: blur(60px); }
    h1 { font-size: 1.5rem; }
}

/* --- Lightbox (Bildvorschau vergroessern) --- */
.lightbox {
    position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1000;
    background: rgba(22, 33, 62, 0.82);
    display: flex; align-items: center; justify-content: center;
    padding: 3vh 3vw; cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img {
    max-width: 100%; max-height: 100%;
    border-radius: var(--radius);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
    cursor: default;
}
.lightbox-close {
    position: fixed; top: 1.2rem; right: 1.4rem;
    background: rgba(255, 255, 255, 0.9); color: var(--text);
    border: none; width: 40px; height: 40px; border-radius: 50%;
    font-size: 1.1rem; line-height: 1; cursor: pointer;
    box-shadow: var(--shadow);
}
