/**
 * Kormuth Silvia — frontend styles
 *
 * Layouts:
 *   .ks-login-screen     — login wall (neprihlásená alebo bez práv)
 *     .ks-login-bg       — secesné pozadie
 *     .ks-login-card     — glass card s formom
 *
 *   .ks-split            — splitscreen pre prihlásenú admin
 *     .ks-web            — ľavá 60% iframe webu
 *     .ks-panel          — pravá 40% dashboard
 *       .ks-welcome      — greeting hlavička
 *       .ks-cards        — grid 2×4 kariet
 *
 * Tón: rovnaký ako zvyšok webu — Cormorant Garamond, gold accents,
 * krémové / kávové farby, glass effects.
 */

/* ════════════════════ RESET PRE FULL-SCREEN ════════════════════ */
html, body.kormuth-silvia-page {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    background: #0d0a08;
}
body.kormuth-silvia-page {
    font-family: 'Jost', sans-serif;
    color: #f4ede2;
}

/* ════════════════════ LOGIN SCREEN ════════════════════ */
.ks-login-screen {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 1;
}
.ks-login-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(184, 149, 103, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(214, 167, 135, 0.12) 0%, transparent 50%),
        linear-gradient(135deg, #1a1410 0%, #2a1f17 50%, #1a1410 100%);
    z-index: -1;
}
.ks-login-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60"><circle cx="30" cy="30" r="0.8" fill="%23b89567" opacity="0.18"/></svg>');
    opacity: 0.4;
}
.ks-login-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    padding: 56px 44px 44px;
    background: rgba(20, 14, 10, 0.65);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(184, 149, 103, 0.3);
    border-radius: 6px;
    text-align: center;
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.ks-login-crown {
    font-size: 44px;
    margin-bottom: 18px;
    line-height: 1;
    filter: drop-shadow(0 4px 16px rgba(184, 149, 103, 0.4));
}
.ks-login-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 38px;
    font-weight: 300;
    color: #f4ede2;
    margin: 0 0 8px;
    letter-spacing: 0.02em;
}
.ks-login-subtitle {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-size: 18px;
    font-weight: 300;
    color: #d4b890;
    margin: 0 0 32px;
    letter-spacing: 0.02em;
}
#ks-login-form {
    text-align: left;
}
#ks-login-form p {
    margin: 0 0 14px;
}
#ks-login-form label {
    display: block;
    font-family: 'Jost', sans-serif;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #d4b890;
    margin-bottom: 6px;
    font-weight: 500;
}
#ks-login-form input[type="text"],
#ks-login-form input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    font-family: 'Jost', sans-serif;
    font-size: 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(184, 149, 103, 0.35);
    border-radius: 3px;
    color: #f4ede2;
    box-sizing: border-box;
    transition: border-color .3s ease, background-color .3s ease;
}
#ks-login-form input[type="text"]:focus,
#ks-login-form input[type="password"]:focus {
    outline: none;
    border-color: rgba(184, 149, 103, 0.7);
    background: rgba(0, 0, 0, 0.45);
}
#ks-login-form .forgetmenot {
    margin-top: 6px;
}
#ks-login-form .forgetmenot label {
    text-transform: none;
    letter-spacing: 0;
    font-size: 13px;
    color: #b8a890;
    cursor: pointer;
}
#ks-login-form .forgetmenot input {
    margin-right: 8px;
    accent-color: #b89567;
}
#ks-login-form .submit {
    margin-top: 20px;
}
#ks-login-form input[type="submit"] {
    width: 100%;
    padding: 14px;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 0.04em;
    background: linear-gradient(135deg, #b89567 0%, #d4b890 100%);
    color: #1a1410;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: transform .3s ease, box-shadow .3s ease;
}
#ks-login-form input[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(184, 149, 103, 0.3);
}
.ks-login-help {
    margin: 20px 0 0;
    font-size: 13px;
    color: #b8a890;
    line-height: 1.5;
}
.ks-login-help a {
    color: #d4b890;
    text-decoration: underline;
    text-decoration-color: rgba(212, 184, 144, 0.4);
    text-underline-offset: 3px;
}
.ks-login-help a:hover {
    color: #f4ede2;
}

/* ════════════════════ SPLITSCREEN ════════════════════ */
.ks-split {
    position: fixed;
    inset: 0;
    display: grid;
    grid-template-columns: 60% 40%;
    background: #0d0a08;
}

/* ── ĽAVÁ STRANA: iframe webu ── */
.ks-web {
    position: relative;
    background: #1a1410;
    overflow: hidden;
}
.ks-web-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}
.ks-web-label {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 10;
    padding: 6px 12px;
    background: rgba(20, 14, 10, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(184, 149, 103, 0.25);
    border-radius: 3px;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.ks-web-label-text {
    font-family: 'Jost', sans-serif;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #d4b890;
    font-weight: 500;
}

/* ── PRAVÁ STRANA: dashboard panel ── */
.ks-panel {
    position: relative;
    background:
        radial-gradient(ellipse at 30% 0%, rgba(184, 149, 103, 0.12) 0%, transparent 60%),
        linear-gradient(180deg, #1a1410 0%, #0d0a08 100%);
    border-left: 1px solid rgba(184, 149, 103, 0.25);
    overflow-y: auto;
    overflow-x: hidden;
}
.ks-panel::before {
    /* jemný dotted overlay */
    content: "";
    position: absolute;
    inset: 0;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60"><circle cx="30" cy="30" r="0.6" fill="%23b89567" opacity="0.12"/></svg>');
    pointer-events: none;
    z-index: 0;
}
.ks-panel-scroll {
    position: relative;
    z-index: 1;
    padding: 48px 36px 32px;
    min-height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

/* ── Welcome hlavička ── */
.ks-welcome {
    text-align: center;
    margin-bottom: 36px;
}
.ks-welcome-ornament {
    display: block;
    font-size: 22px;
    color: #b89567;
    opacity: 0.7;
    margin-bottom: 12px;
    line-height: 1;
}
.ks-welcome-greeting {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 38px;
    font-weight: 300;
    color: #f4ede2;
    margin: 0 0 4px;
    letter-spacing: 0.02em;
    line-height: 1.1;
}
.ks-welcome-name {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-size: 22px;
    font-weight: 400;
    color: #d4b890;
    margin: 0 0 26px;
    letter-spacing: 0.03em;
}
.ks-welcome-question {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 18px;
    font-weight: 400;
    color: #c4b8a0;
    margin: 0;
    letter-spacing: 0.01em;
    line-height: 1.4;
}
.ks-welcome-question::before,
.ks-welcome-question::after {
    content: "—";
    color: rgba(184, 149, 103, 0.5);
    margin: 0 10px;
}

/* ── Grid kariet ── */
.ks-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
    flex: 1;
}
.ks-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 22px 14px 20px;
    background: rgba(184, 149, 103, 0.04);
    border: 1px solid rgba(184, 149, 103, 0.3);
    border-radius: 4px;
    color: #f4ede2;
    text-decoration: none;
    transition:
        transform .3s cubic-bezier(.2,.8,.2,1),
        border-color .3s ease,
        background-color .3s ease,
        box-shadow .3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.ks-card::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #d4b890, transparent);
    transition: width .35s ease;
}
.ks-card:hover {
    transform: translateY(-3px);
    background-color: rgba(184, 149, 103, 0.1);
    border-color: rgba(184, 149, 103, 0.6);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.ks-card:hover::before {
    width: 70%;
}
.ks-card-icon {
    font-size: 30px;
    line-height: 1;
    margin-bottom: 10px;
    display: block;
    transition: transform .3s cubic-bezier(.2,.8,.2,1);
}
.ks-card:hover .ks-card-icon {
    transform: scale(1.12) rotate(-3deg);
}
.ks-card-label {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 19px;
    font-weight: 500;
    color: #f4ede2;
    margin-bottom: 4px;
    letter-spacing: 0.02em;
    line-height: 1.2;
}
.ks-card-note {
    font-family: 'Jost', sans-serif;
    font-size: 10.5px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #b89567;
    opacity: 0.85;
    line-height: 1.4;
}

/* ── Footer logout ── */
.ks-panel-footer {
    text-align: center;
    padding-top: 18px;
    border-top: 1px solid rgba(184, 149, 103, 0.15);
}
.ks-logout {
    font-family: 'Jost', sans-serif;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #b8a890;
    text-decoration: none;
    padding: 6px 12px;
    transition: color .3s ease;
}
.ks-logout:hover {
    color: #d4b890;
}

/* ════════════════════ MOBILE BREAKPOINT ════════════════════ */
@media (max-width: 900px) {
    .ks-split {
        grid-template-columns: 1fr;
    }
    .ks-web {
        display: none;  /* na mobile schováme web preview */
    }
    .ks-panel {
        border-left: none;
    }
    .ks-panel-scroll {
        padding: 36px 24px 28px;
    }
    .ks-welcome-greeting { font-size: 32px; }
    .ks-welcome-name { font-size: 19px; }
    .ks-welcome-question::before,
    .ks-welcome-question::after { margin: 0 6px; }
    .ks-cards {
        gap: 10px;
    }
    .ks-card {
        padding: 18px 10px 16px;
    }
    .ks-card-icon { font-size: 26px; }
    .ks-card-label { font-size: 17px; }
    .ks-card-note { font-size: 9.5px; letter-spacing: 0.08em; }
}
@media (max-width: 420px) {
    .ks-cards {
        grid-template-columns: 1fr;
    }
}

/* ════════════════════ REDUCED MOTION ════════════════════ */
@media (prefers-reduced-motion: reduce) {
    .ks-card,
    .ks-card-icon,
    .ks-card::before,
    #ks-login-form input[type="submit"] {
        transition: none;
    }
    .ks-card:hover,
    #ks-login-form input[type="submit"]:hover {
        transform: none;
    }
    .ks-card:hover .ks-card-icon {
        transform: none;
    }
}
