/* ============================================================
   Cipher Investigations — Download-Seite
   Farben 1:1 aus _Farben/CITheme.xaml (Default- + Gold-Palette,
   Error/Success für Meldungen). Schrift: EB Garamond (self-hosted).
   ============================================================ */

@font-face {
    font-family: "EB Garamond";
    src: url("../_Fonts/EBGaramond-Medium.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: "EB Garamond";
    src: url("../_Fonts/EBGaramond-MediumItalic.ttf") format("truetype");
    font-weight: 400;
    font-style: italic;
}
@font-face {
    font-family: "EB Garamond";
    src: url("../_Fonts/EBGaramond-SemiBold.ttf") format("truetype");
    font-weight: 600;
    font-style: normal;
}
@font-face {
    font-family: "EB Garamond";
    src: url("../_Fonts/EBGaramond-ExtraBold.ttf") format("truetype");
    font-weight: 800;
    font-style: normal;
}
@font-face {
    font-family: "EB Garamond";
    src: url("../_Fonts/EBGaramond-ExtraBoldItalic.ttf") format("truetype");
    font-weight: 800;
    font-style: italic;
}

:root {
    /* Default */
    --ci-bg-dark:        #332219;
    --ci-bg-light:       #DEC6A5;
    --ci-surface:        #6D3F1E;
    --ci-surface-light:  #F1EBE7;
    --ci-card-header:    #B8A383;
    --ci-border:         #3E3830;
    --ci-border-light:   #7A6D58;
    --ci-text-dark:      #000000;
    --ci-text-light:     #F0F0F0;
    --ci-brown-dark:     #28170A;
    --ci-brown-medium:   #5A2E30;

    /* Gold */
    --ci-gold:           #D4AF37;
    --ci-gold-light:     #DABD52;
    --ci-gold-border:    #7C651A;
    --ci-gold-text-dark: #3A2F0C;
    --ci-gold-text-light:#F5E8D1;

    /* Error / Success (Meldungen) */
    --ci-err:            #C24238;
    --ci-err-border:     #9A3A32;
    --ci-err-text-dark:  #4A1813;
    --ci-ok:             #6A9D6D;
    --ci-ok-border:      #4C7A4F;
    --ci-ok-text-dark:   #243826;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: "EB Garamond", Georgia, serif;
    font-size: 17px;
    line-height: 1.55;
    color: var(--ci-text-light);
    background-color: var(--ci-bg-dark);
    background-image: url("../_Bilder/CI_Texture_BackgroundDark.png");
    background-repeat: repeat;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Bilder nicht speicherbar/ziehbar (Gelegenheitsschutz) */
img {
    -webkit-user-drag: none;
    user-select: none;
    pointer-events: none;
}

.seite {
    width: 100%;
    max-width: 680px;
    padding: 34px 22px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

/* ---------------- Logo ---------------- */
.logo {
    width: min(430px, 86vw);
    height: auto;
    margin: 8px 0 26px;
    filter: drop-shadow(0 6px 18px rgba(0,0,0,.55));
}

/* ---------------- Karte (wie WPF-Login) ---------------- */
.karte {
    width: 100%;
    background:
        radial-gradient(90% 70% at 50% 42%, rgba(255,255,255,.28), transparent 70%),
        var(--ci-bg-light);
    border: 1px solid var(--ci-border-light);
    box-shadow: 0 10px 34px rgba(0,0,0,.5), inset 0 0 0 1px rgba(255,255,255,.18);
    color: var(--ci-brown-dark);
    padding: 30px 34px 28px;
    margin-bottom: 26px;
}

.karte h1 {
    font-size: 27px;
    font-weight: 800;
    color: var(--ci-brown-medium);
    margin: 0 0 4px;
    text-align: center;
}
.karte .untertitel {
    text-align: center;
    font-style: italic;
    color: var(--ci-surface);
    margin: 0 0 16px;
    font-size: 17px;
}
.karte .trenner {
    height: 2px;
    margin: 0 auto 18px;
    width: 150px;
    background: linear-gradient(90deg, transparent, var(--ci-gold), transparent);
}
.karte p { margin: 0 0 12px; }
.karte b { color: var(--ci-brown-medium); }

/* ---------------- Download-Bereich ---------------- */
.dl-titel {
    font-size: 21px;
    font-weight: 800;
    color: var(--ci-brown-medium);
    margin: 4px 0 10px;
}
.dl-hinweis {
    font-size: 15.5px;
    color: var(--ci-surface);
    font-style: italic;
    margin: 0 0 14px;
}

.dl-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: stretch;
}
.dl-form input[type="password"] {
    flex: 1;
    min-width: 200px;
    padding: 11px 13px;
    border: 1px solid var(--ci-border-light);
    background: var(--ci-surface-light);
    color: var(--ci-text-dark);
    font-family: "EB Garamond", Georgia, serif;
    font-size: 17px;
}
.dl-form input[type="password"]:focus {
    outline: none;
    border-color: var(--ci-gold-border);
    box-shadow: 0 0 0 2px rgba(212,175,55,.35);
}

.knopf {
    padding: 11px 26px;
    background: linear-gradient(180deg, var(--ci-card-header), #a8946f);
    border: 1px solid var(--ci-border-light);
    color: var(--ci-brown-dark);
    font-family: "EB Garamond", Georgia, serif;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.35);
    transition: filter .15s, transform .1s, background .2s;
}
.knopf:hover:not(:disabled) {
    background: linear-gradient(180deg, var(--ci-gold-light), var(--ci-gold));
    border-color: var(--ci-gold-border);
    color: var(--ci-gold-text-dark);
}
.knopf:active:not(:disabled) { transform: translateY(1px); }
.knopf:disabled { opacity: .6; cursor: default; }

/* Meldungen */
.meldung {
    display: none;
    margin-top: 14px;
    padding: 10px 14px;
    font-size: 16px;
    border: 1px solid;
}
.meldung.fehler {
    display: block;
    background: rgba(194,66,56,.14);
    border-color: var(--ci-err-border);
    color: var(--ci-err-text-dark);
}
.meldung.ok {
    display: block;
    background: rgba(106,157,109,.18);
    border-color: var(--ci-ok-border);
    color: var(--ci-ok-text-dark);
}

/* ---------------- Windows-Hinweis (auffällige Warn-Box) ---------------- */
.win-hinweis {
    margin-top: 24px;
    padding: 16px 18px 14px;
    background: rgba(212,149,56,.22);            /* ciWarningSurface, abgeschwächt */
    border: 2px solid #A06A2C;                    /* ciWarningBorder */
    border-left-width: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    font-size: 16px;
    color: #42300F;                               /* ciWarningTextDark */
}
.win-hinweis .wh-kopf {
    display: flex;
    align-items: center;
    gap: 9px;
    font-weight: 800;
    color: #42300F;
    margin-bottom: 8px;
    font-size: 18.5px;
}
.win-hinweis .wh-kopf .wh-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    background: #D49538;                          /* ciWarningSurface */
    border: 1px solid #A06A2C;
    border-radius: 50%;
    color: #F8F1E6;                               /* ciWarningTextLight */
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
}
.win-hinweis ol {
    margin: 8px 0 0;
    padding-left: 22px;
}
.win-hinweis li { margin-bottom: 3px; }

/* ---------------- Fußzeile ---------------- */
.fuss {
    text-align: center;
    padding: 10px 0 26px;
    font-style: italic;
    font-size: 15px;
    color: var(--ci-card-header);
}
.fuss a {
    color: var(--ci-gold);
    text-decoration: none;
}
.fuss a:hover { text-decoration: underline; color: var(--ci-gold-light); }

@media (max-width: 520px) {
    .karte { padding: 24px 20px; }
    .dl-form { flex-direction: column; }
}
