/* ================================================================
   OMEGA STORE — AUTH / LOGIN PAGE
   Dark split layout matching dashboard theme
================================================================ */

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

:root {
    --blue:     #3b82f6;
    --blue-dk:  #1d4ed8;
    --blue-lt:  #1e40af;
    --green:    #22c55e;
    --red:      #ef4444;
    --bg:       #060d1c;
    --border:   rgba(255,255,255,0.1);
    --text-1:   #f1f5f9;
    --text-2:   #cbd5e1;
    --text-3:   #64748b;
    --ease:     cubic-bezier(0.4,0,0.2,1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    min-height: 100vh;
    color: var(--text-1);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ── Shell ── */
.auth-shell {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

/* ================================================================
   BRAND PANEL (left)
================================================================ */
.auth-brand {
    background: linear-gradient(145deg, #0f2456 0%, #0a1a3d 50%, #060d1c 100%);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 60px 56px;
    position: relative;
    overflow: hidden;
}

/* Decorative glow circles */
.auth-brand::before,
.auth-brand::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}
.auth-brand::before {
    width: 420px; height: 420px;
    background: radial-gradient(circle, rgba(59,130,246,0.14) 0%, transparent 70%);
    top: -100px; left: -100px;
}
.auth-brand::after {
    width: 280px; height: 280px;
    background: radial-gradient(circle, rgba(99,102,241,0.1) 0%, transparent 70%);
    bottom: 80px; right: -60px;
}

.brand-content { position: relative; z-index: 1; }

.brand-logo {
    width: 72px; height: 72px;
    background: linear-gradient(135deg, var(--blue), var(--blue-lt));
    border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; color: #fff;
    margin-bottom: 28px;
    box-shadow: 0 12px 40px rgba(59,130,246,0.4);
}

.brand-name {
    font-size: 36px;
    font-weight: 900;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
    background: linear-gradient(120deg, #f1f5f9, #93c5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-tagline {
    font-size: 15px;
    color: var(--text-3);
    margin-bottom: 52px;
    font-weight: 500;
}

.brand-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.brand-features li {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 14px;
    color: var(--text-2);
    font-weight: 500;
}

.brand-features li i {
    width: 36px; height: 36px;
    background: rgba(59,130,246,0.12);
    border: 1px solid rgba(59,130,246,0.2);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    color: var(--blue);
    flex-shrink: 0;
}

.brand-footer {
    position: relative; z-index: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-3);
}

.brand-footer i { color: var(--green); }

/* ================================================================
   FORM PANEL (right)
================================================================ */
.auth-form-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: #080e1e;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    animation: cardIn 0.5s var(--ease);
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.auth-card-header {
    text-align: center;
    margin-bottom: 36px;
}

.auth-card-icon {
    width: 56px; height: 56px;
    background: rgba(59,130,246,0.12);
    border: 1px solid rgba(59,130,246,0.25);
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: var(--blue);
    margin: 0 auto 20px;
}

.auth-card-header h2 {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.auth-card-header p {
    font-size: 13.5px;
    color: var(--text-3);
}

/* ── Global error ── */
.global-error {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.3);
    color: #fca5a5;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 20px;
}
.global-error::before {
    content: '\f071';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 13px;
    flex-shrink: 0;
    color: var(--red);
}

/* ── Fields ── */
.field-group {
    margin-bottom: 18px;
}

.field-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
    margin-bottom: 7px;
}

.field-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.field-icon {
    position: absolute;
    left: 14px;
    color: var(--text-3);
    font-size: 13px;
    pointer-events: none;
    transition: color 0.2s;
}

.field-wrap input {
    width: 100%;
    padding: 13px 14px 13px 40px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    color: var(--text-1);
    font-size: 14.5px;
    font-family: inherit;
    outline: none;
    transition: all 0.2s var(--ease);
}

.field-wrap input::placeholder { color: var(--text-3); }

.field-wrap input:focus {
    border-color: var(--blue);
    background: rgba(59,130,246,0.07);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.14);
}

.field-wrap input:focus + .field-icon,
.field-group:focus-within .field-icon {
    color: var(--blue);
}

/* password eye btn */
.field-eye {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-3);
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 14px;
    transition: color 0.2s;
    line-height: 1;
}
.field-eye:hover { color: var(--blue); }

/* password input — extra right padding for eye */
#password { padding-right: 44px; }

/* error state */
.field-group.has-error .field-wrap input {
    border-color: var(--red);
    background: rgba(239,68,68,0.06);
}
.field-group.has-error .field-wrap input:focus {
    box-shadow: 0 0 0 3px rgba(239,68,68,0.12);
}
.field-group.has-error .field-icon { color: var(--red); }

.field-error {
    display: block;
    font-size: 12px;
    color: #fca5a5;
    margin-top: 5px;
    min-height: 16px;
}

/* ── Options ── */
.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 26px;
}

/* ── Text link (forgot password, back to login...) ── */
.auth-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 22px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
    text-decoration: none;
    transition: color 0.15s;
}
.auth-link:hover { color: var(--blue); }
.auth-link.inline {
    margin-top: 0;
    font-size: 12.5px;
    color: var(--blue);
}

.check-label {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    color: var(--text-2);
    cursor: pointer;
    user-select: none;
}

.check-label input[type="checkbox"] { display: none; }

.check-box {
    width: 18px; height: 18px;
    border: 1.5px solid rgba(255,255,255,0.2);
    border-radius: 5px;
    background: rgba(255,255,255,0.05);
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}
.check-label input:checked + .check-box {
    background: var(--blue);
    border-color: var(--blue);
}
.check-box::after {
    content: '';
    width: 4px; height: 8px;
    border: 2px solid #fff;
    border-top: none; border-left: none;
    transform: rotate(45deg) translateY(-1px);
    opacity: 0;
    transition: opacity 0.15s;
}
.check-label input:checked + .check-box::after { opacity: 1; }

/* ── Submit button ── */
.auth-btn {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s var(--ease);
    box-shadow: 0 6px 24px rgba(59,130,246,0.35);
    margin-bottom: 24px;
    min-height: 50px;
}

.auth-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 10px 32px rgba(59,130,246,0.5);
}

.auth-btn:active:not(:disabled) { transform: translateY(0); }

.auth-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.auth-btn.success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    box-shadow: 0 6px 24px rgba(34,197,94,0.4);
}

/* Spinner inside button */
.auth-btn-loader {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.auth-spinner {
    display: inline-block;
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Secure footer ── */
.auth-secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 12px;
    color: var(--text-3);
}
.auth-secure i { color: var(--green); font-size: 12px; }

/* ================================================================
   RESPONSIVE
================================================================ */
@media (max-width: 900px) and (min-width: 769px) {
    .auth-shell { grid-template-columns: 1fr; }

    .auth-brand {
        padding: 40px 32px;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .brand-name    { font-size: 28px; }
    .brand-tagline { margin-bottom: 28px; }
    .brand-features { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
}

/* ── Mobile: brand panel collapses to a compact header bar so the form
   is reachable immediately, instead of pushing it below a full-height
   hero + feature list. ── */
@media (max-width: 768px) {
    .auth-shell { grid-template-columns: 1fr; min-height: auto; }

    .auth-brand {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 14px;
        padding: 18px 20px;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .auth-brand::before, .auth-brand::after { display: none; }

    .brand-content { display: flex; align-items: center; gap: 12px; }
    .brand-logo   { width: 40px; height: 40px; font-size: 16px; border-radius: 12px; margin-bottom: 0; }
    .brand-name   { font-size: 18px; margin-bottom: 0; }
    .brand-tagline, .brand-features, .brand-footer { display: none; }

    .auth-form-wrap { padding: 28px 16px; min-height: 0; }
    .auth-card-header { margin-bottom: 26px; }
    .auth-card-header h2 { font-size: 21px; }
    .auth-card-icon { width: 46px; height: 46px; font-size: 18px; margin-bottom: 14px; }
}

@media (max-width: 380px) {
    .brand-name { font-size: 16px; }
}
