/* =============================================
   Sandvik Shares — Auth Pages Design System
   Colors: #16a34a green / #0b1610 dark / white
============================================= */
:root {
    --sv-green:       #16a34a;
    --sv-green-dark:  #0d5c2e;
    --sv-green-mid:   #1a7a3c;
    --sv-green-light: #22c55e;
    --sv-dark:        #0b1610;
    --sv-card-bg:     #0d1f15;
    --sv-border:      rgba(34, 197, 94, 0.18);
    --sv-text:        #e2f5ea;
    --sv-muted:       #6b9e7a;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background: var(--sv-dark);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--sv-text);
}

/* ---- Split-screen wrapper ---- */
.sv-auth-wrap {
    min-height: 100vh;
    display: flex;
    background: var(--sv-dark);
}

/* ---- Left hero panel ---- */
.sv-auth-hero {
    flex: 0 0 45%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 3.5rem 3rem;
    overflow: hidden;
}

.sv-auth-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 8s ease;
}

.sv-auth-hero:hover .sv-auth-hero-bg {
    transform: scale(1.04);
}

.sv-auth-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        160deg,
        rgba(11, 22, 16, 0.88) 0%,
        rgba(13, 92, 46, 0.55) 55%,
        rgba(11, 22, 16, 0.92) 100%
    );
    z-index: 1;
}

/* right-side fade to blend with form panel */
.sv-auth-hero::before {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 120px;
    background: linear-gradient(to right, transparent, var(--sv-dark));
    z-index: 2;
}

.sv-auth-hero-content {
    position: relative;
    z-index: 3;
}

.sv-auth-hero-logo img {
    height: 52px;
    object-fit: contain;
    margin-bottom: 2.5rem;
    filter: brightness(1.15);
}

.sv-auth-hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: var(--sv-green-light);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 50px;
    margin-bottom: 1.2rem;
}

.sv-auth-hero-tag span {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--sv-green-light);
    border-radius: 50%;
    animation: svPulse 2s infinite;
}

@keyframes svPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .4; transform: scale(.7); }
}

.sv-auth-hero-content h2 {
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1.25;
    color: #fff;
    margin-bottom: 1rem;
}

.sv-auth-hero-content h2 span {
    color: var(--sv-green-light);
}

.sv-auth-hero-content p {
    font-size: .95rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.65;
    max-width: 340px;
    margin-bottom: 2rem;
}

.sv-auth-hero-stats {
    display: flex;
    gap: 2rem;
}

.sv-auth-hero-stats .stat strong {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--sv-green-light);
}

.sv-auth-hero-stats .stat span {
    font-size: .75rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: .06em;
}

/* ---- Right form panel ---- */
.sv-auth-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 2rem;
    background: var(--sv-dark);
    overflow-y: auto;
}

/* ---- Auth card ---- */
.sv-auth-card {
    width: 100%;
    max-width: 460px;
    background: var(--sv-card-bg);
    border-radius: 18px;
    padding: 2.6rem 2.2rem 2rem;
    position: relative;
    border: 1px solid var(--sv-border);
    box-shadow: 0 0 60px rgba(22, 163, 74, 0.06), 0 25px 50px rgba(0, 0, 0, 0.5);
}

/* AI glow — top edge */
.sv-auth-card::before {
    content: '';
    position: absolute;
    top: -1px; left: 5%; right: 5%;
    height: 2px;
    border-radius: 18px 18px 0 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(34, 197, 94, 0.9) 50%,
        transparent 100%
    );
}

/* AI glow — bottom edge (subtle) */
.sv-auth-card::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 15%; right: 15%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(34, 197, 94, 0.4) 50%,
        transparent 100%
    );
}

/* mobile logo (hidden on desktop) */
.sv-auth-mobile-logo {
    display: none;
    text-align: center;
    margin-bottom: 1.8rem;
}

.sv-auth-mobile-logo img {
    height: 48px;
    object-fit: contain;
}

/* card header */
.sv-auth-card-icon {
    width: 52px;
    height: 52px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--sv-green-light);
    margin-bottom: 1.2rem;
}

.sv-auth-card h1 {
    font-size: 1.55rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: .35rem;
}

.sv-auth-card .sv-auth-subtitle {
    font-size: .88rem;
    color: var(--sv-muted);
    margin-bottom: 1.8rem;
}

/* admin badge */
.sv-admin-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.25);
    color: var(--sv-green-light);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 50px;
    margin-bottom: 1rem;
}

/* ---- Alerts ---- */
.sv-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: .85rem 1rem;
    border-radius: 10px;
    font-size: .85rem;
    margin-bottom: 1.4rem;
    line-height: 1.5;
}

.sv-alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: #86efac;
}

.sv-alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
}

.sv-alert i { margin-top: 1px; flex-shrink: 0; }

/* ---- Form row (for side-by-side fields) ---- */
.sv-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .9rem;
}

/* ---- Input groups ---- */
.sv-field {
    margin-bottom: 1rem;
}

.sv-field label {
    display: block;
    font-size: .78rem;
    font-weight: 600;
    color: var(--sv-muted);
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-bottom: .45rem;
}

.sv-input-wrap {
    position: relative;
}

.sv-input-wrap i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--sv-muted);
    font-size: 1rem;
    pointer-events: none;
    transition: color .2s;
}

.sv-field input {
    width: 100%;
    height: 48px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(34, 197, 94, 0.18);
    border-radius: 10px;
    color: #fff;
    font-size: .92rem;
    padding: 0 14px 0 42px;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
}

.sv-field input:focus {
    border-color: var(--sv-green);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
    background: rgba(255, 255, 255, 0.06);
}

.sv-field input:focus + i,
.sv-input-wrap:focus-within i {
    color: var(--sv-green-light);
}

.sv-field input::placeholder { color: rgba(255,255,255,.25); }

/* icon inside: reorder for CSS sibling trick */
.sv-input-wrap input { order: 1; }
.sv-input-wrap i { order: 2; }

/* Validation error */
.sv-field-error {
    font-size: .78rem;
    color: #fca5a5;
    margin-top: .35rem;
}

/* ---- Submit button ---- */
.sv-btn {
    width: 100%;
    height: 50px;
    background: linear-gradient(135deg, var(--sv-green) 0%, var(--sv-green-mid) 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: .04em;
    cursor: pointer;
    margin-top: 1.4rem;
    margin-bottom: 1.2rem;
    position: relative;
    overflow: hidden;
    transition: transform .15s, box-shadow .2s;
    box-shadow: 0 4px 20px rgba(22, 163, 74, 0.3);
}

.sv-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.12), transparent);
    transition: left .45s ease;
}

.sv-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 28px rgba(22, 163, 74, 0.45); }
.sv-btn:hover::before { left: 100%; }
.sv-btn:active { transform: translateY(0); }
.sv-btn:disabled { background: #2a4535; color: #4d7a5e; cursor: not-allowed; box-shadow: none; transform: none; }

/* ---- Divider ---- */
.sv-divider {
    display: flex;
    align-items: center;
    gap: .8rem;
    margin: 1.2rem 0;
    color: rgba(255,255,255,.2);
    font-size: .78rem;
}

.sv-divider::before, .sv-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(34, 197, 94, 0.12);
}

/* ---- Footer links ---- */
.sv-auth-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .5rem 1.2rem;
    margin-top: .5rem;
}

.sv-auth-links a {
    font-size: .83rem;
    color: var(--sv-green-light);
    text-decoration: none;
    transition: color .2s;
}

.sv-auth-links a:hover { color: #fff; }

.sv-auth-links .sv-link-muted {
    color: var(--sv-muted);
}

/* ---- Verify code big input ---- */
.sv-code-input input {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: .3em;
    padding: 0 14px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 820px) {
    .sv-auth-hero { display: none; }

    .sv-auth-panel { padding: 2rem 1.2rem; }

    .sv-auth-mobile-logo { display: block; }

    .sv-auth-card {
        padding: 2rem 1.4rem 1.6rem;
        border-radius: 14px;
    }

    .sv-form-row { grid-template-columns: 1fr; gap: 0; }
}
