/* ══════════════════════════════════════════════
   Smart HR by Sibasi — auth.css
   Covers: login, register, forgot/reset password,
           2FA verify, setup-2FA, account/security
   ══════════════════════════════════════════════ */

/* ── RESET & ROOT ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0 }

:root {
    --green-deep:   #0d3d20;
    --green-mid:    #1a6b3c;
    --green-bright: #2a8c52;
    --green-light:  #3dab68;
    --orange:       #e87c1a;
    --orange-light: #f59332;
    --white:        #ffffff;
    --gray-bg:      #f3f7f4;
    --gray-text:    #8da898;
    --dark:         #0d2016;
}

body {
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at 30% 50%, #2a8c52 0%, #0d3d20 60%, #061509 100%);
    padding: 20px;
}

/* ── CARD ── */
.card {
    position: relative;
    width: 860px;
    height: 520px;
    border-radius: 28px;
    overflow: hidden;
    background: var(--green-mid);
    box-shadow:
        0 2px 0 rgba(255,255,255,.1) inset,
        0 40px 100px rgba(0,0,0,.5),
        0 0 0 1px rgba(255,255,255,.06);
    animation: floatIn .6s cubic-bezier(.16,1,.3,1) both;
}

/* Taller card for register / account page */
.card.card-tall { height: 600px }
.card.card-wide { width: 960px }

@keyframes floatIn {
    from { opacity: 0; transform: scale(.96) translateY(24px) }
    to   { opacity: 1; transform: scale(1)  translateY(0) }
}

/* ── LEFT PANEL ── */
.left-panel {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(145deg, #2a8c52 0%, #0d3d20 100%);
}
.left-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    opacity: .4;
    pointer-events: none;
}

/* ── WHITE RIGHT PANEL ── */
.right-panel {
    position: absolute;
    inset: 0;
    z-index: 10;
    background: var(--white);
    clip-path: path('M 380,0 C 400,80 455,170 430,270 C 408,360 300,388 200,438 C 140,468 80,492 40,500 L 860,500 L 860,0 Z');
}
.card.card-tall .right-panel {
    clip-path: path('M 380,0 C 400,80 455,170 430,310 C 408,420 300,448 200,508 C 140,538 80,562 40,580 L 860,580 L 860,0 Z');
}

/* Corner accent */
.deco-br {
    position: absolute;
    width: 96px; height: 96px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2a8c52, #0d3d20);
    bottom: -28px; right: -28px;
    z-index: 26;
    box-shadow: -4px -4px 20px rgba(0,0,0,.25);
}

/* ── LEFT CONTENT ── */
.left-content {
    position: absolute;
    top: 0; left: 0;
    width: 340px; height: 100%;
    display: flex; flex-direction: column; justify-content: flex-start;
    padding: 36px 40px 40px;
    z-index: 20;
    color: var(--white);
}
.left-content .org-sub {
    font-size: 12px; font-weight: 700; letter-spacing: .16em;
    text-transform: uppercase; color: var(--orange-light); margin-bottom: 6px;
}
.left-content h1 {
    font-size: 38px; font-weight: 800; line-height: 1.05;
    letter-spacing: -.5px; margin-bottom: 10px; color: #fff;
}
.accent-line {
    width: 36px; height: 3px;
    background: linear-gradient(90deg, var(--orange), var(--orange-light));
    border-radius: 2px; margin-bottom: 14px;
}
.left-content p {
    font-size: 13px; line-height: 1.75;
    color: rgba(255,255,255,.9); font-weight: 500; max-width: 230px;
}

/* ── RIGHT CONTENT ── */
.right-content {
    position: absolute;
    top: 0; right: 0;
    width: 510px; height: 100%;
    display: flex; flex-direction: column; justify-content: flex-start;
    padding: 28px 52px 28px 90px;
    z-index: 30;
    overflow-y: auto;
}
.right-content h2 {
    font-size: 28px; font-weight: 800;
    color: var(--dark); letter-spacing: -.4px; margin-bottom: 3px;
}
.right-content .sub-text {
    font-size: 12px; color: var(--gray-text); margin-bottom: 16px; font-weight: 400;
}
.right-content h2, .right-content .sub-text { text-align: center }

/* ── LOGO ── */
.form-logo { display: flex; justify-content: center; margin-bottom: 10px }
.form-logo img { height: 48px; width: auto; max-width: 200px; object-fit: contain }

/* ── ALERTS ── */
.alert { padding: 9px 14px; border-radius: 10px; font-size: 12.5px; font-weight: 500; margin-bottom: 12px; border: none }
.alert-danger  { background: #fff0f0; color: #c0392b; border-left: 3px solid #c0392b }
.alert-success { background: #f0faf4; color: #1a6b3c; border-left: 3px solid #2a8c52 }
.alert-warning { background: #fffbeb; color: #92400e; border-left: 3px solid #f59332 }
.alert-info    { background: #eff6ff; color: #1e40af; border-left: 3px solid #3b82f6 }

/* ── FORM CARD ── */
.form-card {
    background: rgba(255,255,255,.55);
    border: 1px solid rgba(42,140,82,.13);
    border-radius: 16px;
    padding: 18px 20px 14px;
    margin-bottom: 4px;
    box-shadow: 0 2px 12px rgba(13,61,32,.05);
}

/* ── INPUTS ── */
.input-group { position: relative; margin-bottom: 11px }
.input-group input, .input-group select {
    width: 100%;
    background: var(--gray-bg);
    border: 1.5px solid transparent;
    border-radius: 12px;
    padding: 12px 16px 12px 42px;
    font-size: 13px; font-family: 'Outfit', sans-serif; font-weight: 400;
    color: var(--dark); transition: all .2s ease;
}
.input-group input::placeholder { color: var(--gray-text) }
.input-group input:focus, .input-group select:focus {
    outline: none; border-color: var(--green-bright);
    background: #fff; box-shadow: 0 0 0 4px rgba(42,140,82,.1);
}
/* No icon variant */
.input-group.no-icon input { padding-left: 16px }

.input-icon {
    position: absolute; left: 14px; top: 50%;
    transform: translateY(-50%);
    color: #b0c8b8; display: flex; align-items: center; pointer-events: none;
}
.show-btn {
    position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
    font-size: 10.5px; font-weight: 700; letter-spacing: .06em;
    color: var(--green-bright); background: none; border: none;
    cursor: pointer; font-family: 'Outfit', sans-serif; transition: color .15s;
}
.show-btn:hover { color: var(--green-deep) }

/* ── ROW OPTIONS ── */
.row-options {
    display: flex; align-items: center;
    justify-content: space-between; margin-bottom: 16px;
}
.remember {
    display: flex; align-items: center; gap: 7px;
    font-size: 12px; color: #64748b; cursor: pointer; user-select: none;
}
.remember input[type=checkbox] {
    appearance: none; width: 15px; height: 15px;
    border: 1.5px solid #c0d4c8; border-radius: 4px;
    cursor: pointer; position: relative; transition: all .15s; flex-shrink: 0;
}
.remember input[type=checkbox]:checked { background: var(--green-bright); border-color: var(--green-bright) }
.remember input[type=checkbox]:checked::after {
    content: ''; position: absolute; left: 3px; top: 1px;
    width: 5px; height: 8px; border: 2px solid #fff;
    border-top: none; border-left: none; transform: rotate(40deg);
}
.forgot-link {
    font-size: 12px; color: var(--green-bright); text-decoration: none;
    font-weight: 500; transition: color .15s;
}
.forgot-link:hover { color: var(--green-deep) }

/* ── SIGN IN BUTTON ── */
.btn-signin {
    width: 100%; padding: 13px; border-radius: 12px;
    background: linear-gradient(110deg, var(--green-bright) 0%, var(--green-deep) 100%);
    color: #fff; font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 14px;
    border: none; cursor: pointer; letter-spacing: .03em;
    position: relative; overflow: hidden;
    transition: transform .15s, box-shadow .15s;
    box-shadow: 0 4px 20px rgba(42,140,82,.35);
}
.btn-signin::before {
    content: ''; position: absolute; top: 0; left: -100%;
    width: 60%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.15), transparent);
    transition: left .4s ease;
}
.btn-signin:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(42,140,82,.45) }
.btn-signin:hover::before { left: 160% }
.btn-signin:active { transform: translateY(0) }
.btn-signin:disabled { opacity: .65; cursor: not-allowed; transform: none }

/* Secondary button */
.btn-secondary {
    width: 100%; padding: 12px; border-radius: 12px;
    background: rgba(42,140,82,.08);
    color: var(--green-bright); font-family: 'Outfit', sans-serif;
    font-weight: 700; font-size: 13.5px;
    border: 1.5px solid rgba(42,140,82,.2); cursor: pointer;
    transition: background .15s, border-color .15s;
    margin-top: 8px;
}
.btn-secondary:hover { background: rgba(42,140,82,.14); border-color: var(--green-bright) }

/* ── LINKS / NAV ROW ── */
.auth-link {
    display: block; text-align: center;
    font-size: 12px; color: var(--gray-text); margin-top: 12px;
}
.auth-link a { color: var(--green-bright); font-weight: 600; text-decoration: none }
.auth-link a:hover { color: var(--green-deep) }

/* ── FOOTER ── */
.footer-row { text-align: center; margin-top: 14px; font-size: 11px; color: var(--gray-text) }
.footer-row a { color: var(--orange); font-weight: 600; text-decoration: none; margin-left: 4px; transition: color .15s }
.footer-row a:hover { color: var(--orange-light) }

/* ── QR / TOTP ── */
.qr-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 14px }
.qr-wrap img { width: 140px; height: 140px; border-radius: 12px; border: 3px solid rgba(42,140,82,.12) }
.totp-code-display {
    font-size: 11px; font-family: monospace; letter-spacing: .08em;
    background: var(--gray-bg); padding: 6px 14px; border-radius: 8px;
    color: var(--dark); border: 1px solid rgba(42,140,82,.15);
    word-break: break-all; text-align: center; max-width: 100%;
}

/* ── ACCOUNT SECURITY PAGE (inside main layout) ── */
.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 0 }
.sec-card {
    background: #fff; border-radius: 18px;
    border: 1px solid rgba(42,140,82,.09);
    box-shadow: 0 2px 10px rgba(13,61,32,.04);
    overflow: hidden;
}
.sec-card-head {
    padding: 14px 18px 12px; border-bottom: 1px solid rgba(42,140,82,.07);
    display: flex; align-items: center; gap: 9px;
}
.sec-card-icon {
    width: 30px; height: 30px; border-radius: 8px;
    background: rgba(42,140,82,.10); color: #2a8c52;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.sec-card-icon i { font-size: 12px }
.sec-card-head h3 { font-size: 13px; font-weight: 700; color: #0d3d20 }
.sec-card-body { padding: 18px }
.fg { display: flex; flex-direction: column; gap: 5px; margin-bottom: 13px }
.fg label { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gray-text) }
.fg input {
    padding: 10px 14px; border-radius: 10px;
    border: 1.5px solid rgba(42,140,82,.15);
    background: var(--gray-bg); font-size: 13px;
    font-family: 'Outfit', sans-serif; color: var(--dark); outline: none;
    transition: border .15s, background .15s;
}
.fg input:focus { border-color: var(--green-bright); background: #fff; box-shadow: 0 0 0 3px rgba(42,140,82,.1) }
.btn-save {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 10px 20px; border-radius: 10px;
    background: linear-gradient(110deg, var(--green-bright), var(--green-deep));
    color: #fff; font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 13px;
    border: none; cursor: pointer;
    box-shadow: 0 3px 14px rgba(42,140,82,.3);
    transition: opacity .15s, transform .15s;
}
.btn-save:hover { opacity: .9; transform: translateY(-1px) }
.btn-danger-outline {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 10px 20px; border-radius: 10px;
    background: rgba(220,38,38,.06);
    color: #dc2626; font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 13px;
    border: 1.5px solid rgba(220,38,38,.2); cursor: pointer;
    transition: background .15s, border-color .15s;
}
.btn-danger-outline:hover { background: rgba(220,38,38,.12); border-color: #dc2626 }

.two-fa-status {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 11px; border-radius: 20px; font-size: 11.5px; font-weight: 700; margin-bottom: 14px;
}
.two-fa-status.enabled  { background: rgba(22,163,74,.12); color: #166534 }
.two-fa-status.disabled { background: rgba(220,38,38,.08); color: #991b1b }

/* ── MOBILE ── */
@media (max-width: 880px) {
    .card { width: 100%; max-width: 480px; height: auto; border-radius: 24px }
    .card.card-tall { height: auto }
    .left-panel, .left-content, .deco-br { display: none }
    .right-panel { clip-path: none; position: relative; border-radius: 24px }
    .right-content { position: relative; width: 100%; padding: 44px 36px 40px }
    .account-grid { grid-template-columns: 1fr }
}
@media (max-width: 520px) {
    body { padding: 12px }
    .right-content { padding: 38px 22px 34px }
    .right-content h2 { font-size: 24px }
}