/* Auth / Install page styling */

:root {
    --ss-primary: #2b3a55;
    --ss-accent: #3d7ce0;
    --ss-bg: #f4f6fb;
}

.auth-body {
    background: radial-gradient(circle at top left, #eef3fc 0%, var(--ss-bg) 45%, #e8edf8 100%);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    padding: 16px;
}

.auth-footer {
    margin-top: 18px;
    text-align: center;
    font-size: 0.78rem;
    color: #98a2b8;
}

/* ---------------------------------------------------------------------
   Simple single-card layout - still used by install.php.
--------------------------------------------------------------------- */
.auth-wrap {
    width: 100%;
    max-width: 420px;
}

.auth-card {
    border: 1px solid rgba(43, 58, 85, 0.06);
    border-radius: 20px;
    box-shadow: 0 20px 50px -20px rgba(43, 58, 85, 0.28), 0 2px 8px rgba(43, 58, 85, 0.04);
}

.auth-card .card-body {
    padding: 2.25rem 2rem;
}

@media (min-width: 480px) {
    .auth-card .card-body { padding: 2.75rem 2.5rem; }
}

.auth-mark {
    width: 56px;
    height: 56px;
    margin: 0 auto 1.25rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--ss-accent), var(--ss-primary));
    color: #fff;
    font-size: 1.6rem;
    box-shadow: 0 8px 20px -6px rgba(61, 124, 224, 0.55);
}

/* ---------------------------------------------------------------------
   Split-panel login layout - assets/js: index.php #auth-view.
   Desktop/tablet: brand panel + form panel side by side, framed as one
   card. Mobile: brand panel collapses away, form panel goes full width.
--------------------------------------------------------------------- */
.auth-shell {
    width: 100%;
    max-width: 960px;
    min-height: 560px;
    display: flex;
    border-radius: 24px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 30px 70px -30px rgba(43, 58, 85, 0.35), 0 4px 14px rgba(43, 58, 85, 0.05);
}

.auth-side {
    flex: 0 0 42%;
    background:
        radial-gradient(circle at 15% 15%, rgba(255, 255, 255, 0.12) 0%, transparent 45%),
        linear-gradient(155deg, var(--ss-accent) 0%, var(--ss-primary) 100%);
    color: #fff;
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-side-mark {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.16);
    font-size: 1.5rem;
    margin-bottom: 1.75rem;
}

.auth-side-title {
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.85rem;
}

.auth-side-lede {
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.55;
    margin-bottom: 2rem;
}

.auth-side-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.auth-side-features li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.92);
}

.auth-side-features i {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.14);
    font-size: 0.95rem;
}

.auth-form-panel {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 2rem;
}

.auth-form-inner {
    width: 100%;
    max-width: 340px;
}

.auth-mobile-mark {
    display: none;
    width: 52px;
    height: 52px;
    margin: 0 auto 1.25rem;
    border-radius: 14px;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--ss-accent), var(--ss-primary));
    color: #fff;
    font-size: 1.5rem;
    box-shadow: 0 8px 20px -6px rgba(61, 124, 224, 0.55);
}

@media (min-width: 861px) {
    .auth-body { padding: 32px; }
}

@media (max-width: 860px) {
    .auth-shell {
        max-width: 420px;
        min-height: 0;
        border-radius: 20px;
    }
    .auth-side { display: none; }
    .auth-form-panel { padding: 2.25rem 1.75rem; }
    .auth-mobile-mark { display: flex; }
}

@media (min-width: 480px) and (max-width: 860px) {
    .auth-form-panel { padding: 2.75rem 2.5rem; }
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ss-primary);
    text-align: center;
    margin-bottom: 0.25rem;
}

.auth-subtitle {
    text-align: center;
    color: #8790a3;
    font-size: 0.9rem;
    margin-bottom: 1.75rem;
}

.auth-field .form-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ss-primary);
    margin-bottom: 0.35rem;
}

.auth-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-group > i {
    position: absolute;
    left: 14px;
    color: #a3acc0;
    font-size: 1rem;
    pointer-events: none;
}

.auth-input-group .form-control {
    padding: 0.65rem 0.9rem 0.65rem 2.5rem;
    border-radius: 10px;
    border: 1px solid #e2e6ef;
    background: #fbfcfe;
    font-size: 0.95rem;
}

.auth-input-group .form-control:focus {
    border-color: var(--ss-accent);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(61, 124, 224, 0.15);
}

.auth-card .btn-primary,
.auth-form-panel .btn-primary {
    background-color: var(--ss-accent);
    border-color: var(--ss-accent);
    border-radius: 10px;
    padding: 0.65rem 1rem;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.auth-card .btn-primary:hover,
.auth-card .btn-primary:focus,
.auth-form-panel .btn-primary:hover,
.auth-form-panel .btn-primary:focus {
    background-color: #2f66c2;
    border-color: #2f66c2;
}

.auth-link {
    color: var(--ss-accent);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
}

.auth-link:hover {
    text-decoration: underline;
}

/* OTP step */
.auth-otp-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(61, 124, 224, 0.12);
    color: var(--ss-accent);
    font-size: 1.4rem;
}

.auth-otp-text {
    text-align: center;
    color: #6b7385;
    font-size: 0.88rem;
    margin-bottom: 1.25rem;
}

.auth-otp-input {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.5rem;
    padding: 0.65rem 0.5rem 0.65rem 0.9rem;
    border-radius: 10px;
    border: 1px solid #e2e6ef;
    background: #fbfcfe;
}

.auth-otp-input:focus {
    border-color: var(--ss-accent);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(61, 124, 224, 0.15);
}

/* Show/hide toggle attached to every password input - see assets/js/password-toggle.js */
.password-field-wrap {
    position: relative;
}

.password-field-wrap .pw-toggle-target {
    padding-right: 2.5rem;
}

.password-toggle-btn {
    position: absolute;
    top: 50%;
    right: 0.5rem;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: none;
    background: none;
    color: #8a93a6;
    cursor: pointer;
}

.password-toggle-btn:hover,
.password-toggle-btn:focus-visible {
    color: var(--ss-primary);
}

.password-toggle-btn i {
    font-size: 1rem;
    transition: transform 0.15s ease;
}

@keyframes pw-icon-pop {
    0% { transform: scale(0.6); opacity: 0.4; }
    60% { transform: scale(1.25); }
    100% { transform: scale(1); opacity: 1; }
}

.password-toggle-btn.pw-pop i {
    animation: pw-icon-pop 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}
