/* ==========================================================================
   Auth page — přihlášení & registrace
   Vrstva za vrstvou · Split layout (Varianta B)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600;700;800;900&family=Manrope:wght@400;500;600;700;800&display=swap');

/* Local tokens — use WP preset vars where available */
.vzv-auth {
    --au-orange:      var(--wp--preset--color--accent-1, #f95738);
    --au-orange-hov:  #e04520;
    --au-amber:       var(--wp--preset--color--accent-2, #f5b342);
    --au-navy:        var(--wp--preset--color--contrast, #0d3b66);
    --au-navy-dark:   var(--wp--preset--color--contrast-2, #0a0338);
    --au-navy-3:      var(--wp--preset--color--contrast-3, #343550);
    --au-cream:       var(--wp--preset--color--base, #f9f7f3);
    --au-line:        var(--wp--preset--color--base-3, #eeede8);
    --au-mid:         var(--wp--preset--color--mid, #9f9caf);
    --au-white:       #ffffff;

    /* gradient stops without WP equivalents */
    --au-purple:      #38275F;
    --au-purple-deep: #0F1F47;

    --au-font-d: 'Montserrat', system-ui, sans-serif;
    --au-font-b: 'Manrope', system-ui, sans-serif;

    --au-r-sm: 8px;
    --au-r-md: 10px;
    --au-r-lg: 14px;
}

/* ---------- Page wrapper ---------- */
.vzv-auth {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    font-family: var(--au-font-b);
    background: var(--au-cream);
    -webkit-font-smoothing: antialiased;
    color: var(--au-navy);
}

.vzv-auth__stage {
    width: 100%;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    min-height: 100vh;
}

/* ---------- Left: gradient hero panel ---------- */
.vzv-auth__left {
    position: relative;
    overflow: hidden;
    background: radial-gradient(ellipse at 70% 60%, var(--au-amber) 0%, var(--au-purple) 55%, var(--au-purple-deep) 100%);
    color: var(--au-white);
    display: flex;
    flex-direction: column;
    padding: 36px 48px 40px;
}

.vzv-auth__left-glow {
    position: absolute;
    width: 520px; height: 520px;
    right: -120px; bottom: -140px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245,179,66,.45) 0%, transparent 60%);
    filter: blur(28px);
    pointer-events: none;
}

.vzv-auth__left-lattice {
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(60deg,  rgba(255,255,255,.04) 0 1px, transparent 1px 22px),
        repeating-linear-gradient(120deg, rgba(255,255,255,.04) 0 1px, transparent 1px 22px);
    pointer-events: none;
}

.vzv-auth__schematic {
    position: absolute;
    right: -30px; bottom: -40px;
    opacity: .78;
    pointer-events: none;
}

/* Wordmark */
.vzv-auth__wordmark {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--au-font-d);
    font-weight: 800;
    font-size: 15px;
    letter-spacing: -.01em;
    color: var(--au-white);
    text-decoration: none;
}

.vzv-auth__wordmark-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--au-orange);
    flex-shrink: 0;
}

/* Tagline block */
.vzv-auth__tagline {
    position: relative;
    z-index: 1;
    margin-top: auto;
    margin-bottom: auto;
}

.vzv-auth__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.18);
    font-family: var(--au-font-b);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255,255,255,.85);
    margin-bottom: 24px;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.vzv-auth__badge svg {
    color: var(--au-amber);
    flex-shrink: 0;
}

.vzv-auth__h1 {
    font-family: var(--au-font-d);
    color: var(--au-white);
    font-size: 52px;
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -.02em;
    margin: 0 0 18px;
    max-width: 460px;
}

.vzv-auth__h1 em {
    font-style: normal;
    color: var(--au-amber);
}

.vzv-auth__desc {
    color: rgba(255,255,255,.78);
    font-size: 17px;
    line-height: 1.55;
    max-width: 440px;
    margin: 0 0 36px;
}

.vzv-auth__desc strong {
    color: var(--au-white);
    font-weight: 700;
}

/* Quote card */
.vzv-auth__quote {
    display: flex;
    gap: 14px;
    padding: 16px 18px;
    background: rgba(255,255,255,.10);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.16);
    border-radius: var(--au-r-lg);
    max-width: 440px;
}

.vzv-auth__quote-avatar {
    flex: 0 0 44px;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--au-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--au-font-d);
    font-weight: 800;
    font-size: 17px;
    color: var(--au-white);
}

.vzv-auth__quote-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.vzv-auth__quote-text {
    font-family: var(--au-font-d);
    font-weight: 500;
    font-style: italic;
    font-size: 14.5px;
    line-height: 1.45;
    color: var(--au-white);
    margin: 0;
}

.vzv-auth__quote-text strong {
    font-style: normal;
    color: var(--au-amber);
    font-weight: 700;
}

.vzv-auth__quote-author {
    font-family: var(--au-font-b);
    color: rgba(255,255,255,.6);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    margin: 0;
}

/* Left footer */
.vzv-auth__left-footer {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(255,255,255,.55);
    font-size: 12px;
    gap: 16px;
    margin-top: 32px;
}

.vzv-auth__left-footer a {
    color: rgba(255,255,255,.7);
    text-decoration: none;
}

.vzv-auth__left-footer a:hover {
    color: var(--au-white);
}

/* ---------- Right: form panel ---------- */
.vzv-auth__right {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 32px 48px;
    background: var(--au-white);
}

.vzv-auth__back {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0;
}

.vzv-auth__back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--au-orange);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: color .15s;
}

.vzv-auth__back-link:hover {
    color: var(--au-orange-hov);
}

.vzv-auth__form-wrap {
    margin: auto;
    width: 100%;
    max-width: 420px;
}

.vzv-auth__form-wrap h2 {
    font-family: var(--au-font-d);
    font-size: 30px;
    font-weight: 700;
    color: var(--au-navy);
    margin: 0 0 8px;
    letter-spacing: -.01em;
    line-height: 1.15;
}

.vzv-auth__subtitle {
    font-size: 15px;
    color: var(--au-mid);
    margin: 0 0 28px;
    line-height: 1.5;
}

/* ---------- Form ---------- */
.vzv-auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Tabs */
.vzv-auth-tabs {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--au-cream);
    border-radius: var(--au-r-md);
    padding: 4px;
    border: 1px solid var(--au-line);
}

.vzv-auth-tabs__ind {
    position: absolute;
    top: 4px; bottom: 4px; left: 4px;
    width: calc(50% - 4px);
    background: var(--au-white);
    border-radius: calc(var(--au-r-md) - 2px);
    box-shadow: 0 1px 4px rgba(13,59,102,.12);
    transition: transform .2s ease;
    pointer-events: none;
}

.vzv-auth-tabs[data-mode="register"] .vzv-auth-tabs__ind {
    transform: translateX(100%);
}

.vzv-auth-tabs button {
    position: relative;
    z-index: 1;
    background: transparent;
    border: none;
    padding: 10px 16px;
    font-family: var(--au-font-d);
    font-size: 14px;
    font-weight: 700;
    color: var(--au-mid);
    cursor: pointer;
    border-radius: calc(var(--au-r-md) - 2px);
    transition: color .2s;
}

.vzv-auth-tabs button[aria-selected="true"] {
    color: var(--au-navy);
}

/* Error banner */
.vzv-auth-err {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    background: #fff2f0;
    border: 1px solid #ffc5be;
    border-radius: var(--au-r-md);
    font-size: 14px;
    color: #b5281c;
    line-height: 1.45;
    align-items: flex-start;
}

.vzv-auth-err svg {
    flex-shrink: 0;
    margin-top: 1px;
    color: #e74c3c;
}

.vzv-auth-err div {
    flex: 1;
}

/* Field */
.vzv-auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.vzv-auth-field__label {
    font-size: 13px;
    font-weight: 700;
    color: var(--au-navy);
    letter-spacing: .01em;
}

.vzv-auth-field__label .req {
    color: var(--au-orange);
    margin-left: 2px;
}

.vzv-auth-field__inp {
    position: relative;
    display: flex;
    align-items: center;
    height: 48px;
    background: var(--au-white);
    border: 1.5px solid var(--au-line);
    border-radius: var(--au-r-md);
    transition: border-color .15s, box-shadow .15s;
}

.vzv-auth-field__inp:focus-within {
    border-color: var(--au-orange);
    box-shadow: 0 0 0 3px rgba(249,87,56,.12);
}

.vzv-auth-field--error .vzv-auth-field__inp {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231,76,60,.10);
}

.vzv-auth-field__icon {
    position: absolute;
    left: 14px;
    color: var(--au-mid);
    display: flex;
    pointer-events: none;
    flex-shrink: 0;
}

.vzv-auth-field__inp input {
    width: 100%;
    height: 100%;
    padding: 0 14px 0 42px;
    background: transparent;
    border: none;
    outline: none;
    font-family: var(--au-font-b);
    font-size: 15px;
    color: var(--au-navy);
}

.vzv-auth-field__inp input::placeholder {
    color: var(--au-mid);
}

.vzv-auth-field__inp input[type="password"] {
    padding-right: 46px;
}

.vzv-auth-field__toggle {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    color: var(--au-mid);
    border-radius: var(--au-r-sm);
    transition: color .15s;
    flex-shrink: 0;
}

.vzv-auth-field__toggle:hover {
    color: var(--au-navy);
}

.vzv-auth-field__error {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #e74c3c;
    font-weight: 500;
}

/* Password strength meter */
.vzv-auth-pw {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.vzv-auth-pw__bars {
    display: flex;
    gap: 4px;
    flex: 1;
}

.vzv-auth-pw__bars span {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: var(--au-line);
    transition: background .25s;
}

.vzv-auth-pw__bars.s-1 span:nth-child(1)          { background: #e74c3c; }
.vzv-auth-pw__bars.s-2 span:nth-child(-n+2)        { background: var(--au-amber); }
.vzv-auth-pw__bars.s-3 span:nth-child(-n+3)        { background: #27ae60; }
.vzv-auth-pw__bars.s-4 span                        { background: #27ae60; }

.vzv-auth-pw__label {
    font-size: 12px;
    color: var(--au-mid);
    font-weight: 600;
    min-width: 58px;
    text-align: right;
}

/* Checkbox */
.vzv-auth-check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--au-navy-3);
    user-select: none;
    line-height: 1.45;
}

.vzv-auth-check input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0; height: 0;
    pointer-events: none;
}

.vzv-auth-check__box {
    width: 18px; height: 18px;
    border-radius: 4px;
    border: 1.5px solid var(--au-line);
    background: var(--au-white);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .15s, border-color .15s;
    color: transparent;
}

.vzv-auth-check input:checked ~ .vzv-auth-check__box {
    background: var(--au-navy);
    border-color: var(--au-navy);
    color: var(--au-white);
}

.vzv-auth-check a {
    color: var(--au-orange);
    text-decoration: none;
}

.vzv-auth-check a:hover {
    text-decoration: underline;
}

/* Inline row (remember + forgot) */
.vzv-auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.vzv-auth-link {
    color: var(--au-orange);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.vzv-auth-link:hover {
    text-decoration: underline;
}

/* Submit */
.vzv-auth-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 50px;
    padding: 0 24px;
    width: 100%;
    border-radius: var(--au-r-md);
    background: var(--au-orange);
    color: var(--au-white);
    font-family: var(--au-font-d);
    font-weight: 700;
    font-size: 16px;
    border: none;
    cursor: pointer;
    transition: background .15s, transform .1s;
}

.vzv-auth-submit:hover:not(:disabled) { background: var(--au-orange-hov); }
.vzv-auth-submit:active:not(:disabled) { transform: translateY(1px); }
.vzv-auth-submit:disabled { opacity: .7; cursor: not-allowed; }

/* Spinner */
.vzv-auth-spinner {
    width: 18px; height: 18px;
    border: 2.5px solid rgba(255,255,255,.35);
    border-top-color: var(--au-white);
    border-radius: 50%;
    animation: vzv-auth-spin .7s linear infinite;
    flex-shrink: 0;
}

@keyframes vzv-auth-spin { to { transform: rotate(360deg); } }

/* Mode switch link */
.vzv-auth-switch {
    text-align: center;
    font-size: 14px;
    color: var(--au-mid);
}

.vzv-auth-switch a {
    color: var(--au-orange);
    font-weight: 600;
    text-decoration: none;
}

.vzv-auth-switch a:hover { text-decoration: underline; }

/* ---------- Mode-driven visibility ---------- */
.vzv-auth__h1-login, .vzv-auth__h1-register { display: none; }
.vzv-auth[data-mode="login"]    .vzv-auth__h1-login    { display: block; }
.vzv-auth[data-mode="register"] .vzv-auth__h1-register { display: block; }

.vzv-auth__h2-login, .vzv-auth__h2-register { display: none; }
.vzv-auth[data-mode="login"]    .vzv-auth__h2-login    { display: block; }
.vzv-auth[data-mode="register"] .vzv-auth__h2-register { display: block; }

.vzv-auth__sub-login, .vzv-auth__sub-register { display: none; }
.vzv-auth[data-mode="login"]    .vzv-auth__sub-login    { display: block; }
.vzv-auth[data-mode="register"] .vzv-auth__sub-register { display: block; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .vzv-auth__stage {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .vzv-auth__left {
        padding: 28px 28px 32px;
    }

    .vzv-auth__h1 { font-size: 36px; }
    .vzv-auth__schematic { display: none; }
    .vzv-auth__tagline { margin: 24px 0; }
    .vzv-auth__right { padding: 28px 24px 40px; }
}

@media (max-width: 480px) {
    .vzv-auth__h1 { font-size: 28px; }
    .vzv-auth__desc,
    .vzv-auth__quote { display: none; }
    .vzv-auth__right { padding: 20px 16px 32px; }
}
