/* ============================================================
   SmartSMS — Premium Auth Stylesheet
   ============================================================ */

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

:root {
    --navy:       #0f1629;
    --navy-2:     #1a2340;
    --navy-3:     #243054;
    --accent:     #4f6ef7;
    --accent-2:   #6c85fa;
    --green:      #10b981;
    --text-light: rgba(255,255,255,0.90);
    --text-muted: rgba(255,255,255,0.55);
    --radius:     14px;
    --radius-sm:  8px;
}

html, body { height: 100%; }

.auth-body {
    font-family: 'Inter', sans-serif;
    background: #f0f4ff;
    min-height: 100vh;
    display: flex;
    align-items: stretch;
}

/* ── Layout ──────────────────────────────────────────────── */
.auth-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* ── Left Panel ──────────────────────────────────────────── */
.auth-panel-left {
    width: 52%;
    flex-shrink: 0;
    background: linear-gradient(145deg, var(--navy) 0%, var(--navy-2) 50%, var(--navy-3) 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

/* Animated blobs */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.18;
    animation: floatBlob 8s ease-in-out infinite;
}
.blob-1 {
    width: 420px; height: 420px;
    background: var(--accent);
    top: -120px; left: -100px;
    animation-delay: 0s;
}
.blob-2 {
    width: 300px; height: 300px;
    background: #a855f7;
    bottom: -80px; right: -60px;
    animation-delay: 3s;
}
.blob-3 {
    width: 220px; height: 220px;
    background: var(--green);
    top: 50%; left: 55%;
    animation-delay: 5s;
}
@keyframes floatBlob {
    0%, 100% { transform: translateY(0) scale(1); }
    50%       { transform: translateY(-24px) scale(1.05); }
}

/* Dot-grid overlay */
.auth-panel-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
}

.auth-left-content {
    position: relative;
    z-index: 2;
    max-width: 480px;
    width: 100%;
}

/* Brand */
.auth-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 2.8rem;
}
.auth-brand-icon {
    width: 52px; height: 52px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #fff;
    box-shadow: 0 8px 20px rgba(79,110,247,0.4);
    flex-shrink: 0;
}
.auth-brand-name {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-light);
    letter-spacing: -0.3px;
}
.auth-brand-tagline {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 1px;
}

/* Headline */
.auth-headline { margin-bottom: 2.2rem; }
.auth-headline h1 {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--text-light);
    line-height: 1.2;
    letter-spacing: -0.5px;
    margin-bottom: 0.9rem;
}
.text-accent {
    background: linear-gradient(90deg, var(--accent-2), var(--green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.auth-headline p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.65;
    max-width: 380px;
}

/* Feature items */
.auth-features {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}
.auth-feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-sm);
    padding: 0.8rem 1rem;
    backdrop-filter: blur(6px);
    transition: background 0.2s;
}
.auth-feature-item:hover { background: rgba(255,255,255,0.09); }
.auth-feature-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.95rem;
    flex-shrink: 0;
}
.auth-feature-title {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text-light);
}
.auth-feature-sub {
    font-size: 0.74rem;
    color: var(--text-muted);
    margin-top: 1px;
}

/* Stats */
.auth-stats {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-sm);
    padding: 1rem 1.4rem;
}
.auth-stat { text-align: center; flex: 1; }
.auth-stat-num {
    font-size: 1.45rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
}
.auth-stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}
.auth-stat-divider {
    width: 1px;
    height: 36px;
    background: rgba(255,255,255,0.12);
    flex-shrink: 0;
}

/* ── Right Panel ─────────────────────────────────────────── */
.auth-panel-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 3rem;
    background: #fff;
    overflow-y: auto;
}

.auth-form-wrapper {
    width: 100%;
    max-width: 400px;
    animation: fadeUp 0.45s ease both;
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Mobile brand */
.auth-mobile-brand {
    align-items: center;
    gap: 10px;
    margin-bottom: 2rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--navy);
}
.auth-brand-icon-sm {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
}

/* Form header */
.auth-form-head { margin-bottom: 1.6rem; }
.auth-form-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -0.4px;
    margin-bottom: 0.3rem;
}
.auth-form-subtitle {
    font-size: 0.875rem;
    color: #64748b;
}

/* Fields */
.auth-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.4rem;
}
.auth-input-wrap { position: relative; }
.auth-input-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 0.875rem;
    pointer-events: none;
    transition: color 0.2s;
    z-index: 2;
}
.auth-input-wrap:focus-within .auth-input-icon { color: var(--accent); }
.auth-input {
    width: 100%;
    padding: 0.7rem 2.6rem 0.7rem 2.5rem;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif;
    color: #1e293b;
    background: #f8fafc;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    -webkit-appearance: none;
}
.auth-input:focus {
    border-color: var(--accent);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(79,110,247,0.12);
}
.auth-input.is-invalid { border-color: #ef4444; }
.auth-input.is-invalid:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,0.12);
}
.auth-eye-btn {
    position: absolute;
    right: 2px; top: 2px; bottom: 2px;
    width: 40px;
    border: none;
    background: transparent;
    border-radius: 0 6px 6px 0;
    color: #9ca3af;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    transition: color 0.2s;
}
.auth-eye-btn:hover { color: var(--accent); }
.auth-error {
    font-size: 0.75rem;
    color: #ef4444;
    margin-top: 0.3rem;
}

/* Forgot link */
.auth-forgot {
    font-size: 0.78rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}
.auth-forgot:hover { text-decoration: underline; }

/* Custom checkbox */
.auth-check-label {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 0.82rem;
    color: #475569;
    cursor: pointer;
    user-select: none;
}
.auth-checkbox { display: none; }
.auth-check-box {
    width: 17px; height: 17px;
    border: 1.5px solid #cbd5e1;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.18s;
    background: #f8fafc;
}
.auth-checkbox:checked + .auth-check-box {
    background: var(--accent);
    border-color: var(--accent);
}
.auth-checkbox:checked + .auth-check-box::after {
    content: '';
    width: 4px; height: 8px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translateY(-1px);
    display: block;
}

/* Primary button */
.auth-btn-primary {
    width: 100%;
    padding: 0.8rem;
    background: linear-gradient(135deg, var(--accent) 0%, #6c85fa 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.925rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(79,110,247,0.35);
    letter-spacing: 0.1px;
}
.auth-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(79,110,247,0.45);
}
.auth-btn-primary:active { transform: translateY(0); }
.auth-btn-primary:disabled { opacity: 0.7; transform: none; cursor: not-allowed; }

/* Demo credentials */
.auth-demo { margin-top: 1.6rem; }
.auth-demo-label {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.8rem;
}
.auth-demo-label span {
    font-size: 0.7rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    white-space: nowrap;
}
.auth-demo-label::before,
.auth-demo-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}
.auth-demo-roles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}
.auth-role-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0.55rem 0.8rem;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.18s;
    font-family: 'Inter', sans-serif;
    text-align: left;
}
.auth-role-btn:hover, .auth-role-btn.active {
    border-color: var(--accent);
    background: #eef2ff;
    color: var(--accent);
}
.auth-role-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Footer */
.auth-footer-text {
    font-size: 0.72rem;
    color: #cbd5e1;
    text-align: center;
    margin-top: 2rem;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 991.98px) {
    .auth-panel-left { display: none !important; }
    .auth-panel-right {
        padding: 2rem 1.5rem;
        min-height: 100vh;
        background: linear-gradient(160deg, #eef2ff 0%, #fff 60%);
    }
    .auth-form-wrapper { max-width: 460px; }
    .auth-mobile-brand { display: flex !important; justify-content: center; }
}

@media (max-width: 480px) {
    .auth-panel-right { padding: 1.8rem 1.1rem; }
    .auth-form-title  { font-size: 1.5rem; }
}

@media (max-width: 360px) {
    .auth-demo-roles { grid-template-columns: 1fr; }
}
