/* ============================================================
   METI Auth Pages — Modern Split Panel Design
   Login & Registration — No Page Scroll
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ---- RESET & BASE ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body.auth-body {
    font-family: 'Inter', sans-serif;
    height: 100vh;
    overflow: hidden;
    background: #0a0e27;
}

/* ============================================================
   AUTH WRAPPER — Full Viewport Split
   ============================================================ */
.auth-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 100vh;
    overflow: hidden;
}

/* ============================================================
   LEFT PANEL — Branded Side
   ============================================================ */
.auth-left {
    background: linear-gradient(145deg, #001f6b 0%, #003087 45%, #c8102e 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

/* Decorative circles */
.auth-left::before {
    content: '';
    position: absolute;
    top: -120px; left: -120px;
    width: 400px; height: 400px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
}
.auth-left::after {
    content: '';
    position: absolute;
    bottom: -100px; right: -100px;
    width: 350px; height: 350px;
    background: rgba(200,16,46,0.15);
    border-radius: 50%;
}

.auth-left-inner {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
}

.auth-brand-icon {
    width: 90px; height: 90px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.25);
    border-radius: 24px;
    display: flex; align-items: center; justify-content: center;
    font-size: 42px;
    margin: 0 auto 24px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    animation: floatIcon 4s ease-in-out infinite;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-10px); }
}

.auth-brand-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}

.auth-brand-sub {
    font-size: 13px;
    opacity: 0.75;
    line-height: 1.6;
    max-width: 280px;
    margin: 0 auto 36px;
}

/* Feature pills */
.auth-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 300px;
}

.auth-feature-item {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 14px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
    transition: all 0.3s;
}

.auth-feature-item:hover {
    background: rgba(255,255,255,0.15);
    transform: translateX(4px);
}

.auth-feature-item .icon {
    width: 36px; height: 36px;
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.auth-feature-item .text strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: white;
}
.auth-feature-item .text span {
    font-size: 11px;
    color: rgba(255,255,255,0.6);
}

/* ============================================================
   RIGHT PANEL — Form Side
   ============================================================ */
.auth-right {
    background: #f0f4f8;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    overflow: hidden;
}

.auth-form-box {
    background: white;
    border-radius: 24px;
    padding: 36px 40px;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    overflow: hidden;
    max-height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
}

/* Registration box is wider */
.auth-form-box.wide {
    max-width: 560px;
}

.auth-form-scroll {
    overflow-y: auto;
    flex: 1;
    padding-right: 4px;
}

/* Custom Scrollbar */
.auth-form-scroll::-webkit-scrollbar { width: 4px; }
.auth-form-scroll::-webkit-scrollbar-track { background: transparent; }
.auth-form-scroll::-webkit-scrollbar-thumb { background: #d0d8e8; border-radius: 4px; }

/* ---- FORM HEADER ---- */
.auth-form-header {
    margin-bottom: 24px;
    flex-shrink: 0;
}

.auth-form-header h2 {
    font-size: 22px;
    font-weight: 800;
    color: #0d1b4b;
    margin-bottom: 4px;
}

.auth-form-header p {
    font-size: 13px;
    color: #7a8499;
}

/* ---- STEP TABS (Login) ---- */
.auth-tab-row {
    display: flex;
    background: #f0f4f8;
    border-radius: 14px;
    padding: 4px;
    margin-bottom: 22px;
    flex-shrink: 0;
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #7a8499;
    transition: all 0.25s;
    border: none;
    background: transparent;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.auth-tab.active {
    background: white;
    color: #003087;
    box-shadow: 0 2px 12px rgba(0,48,135,0.12);
}

/* ---- PROGRESS BAR (Registration) ---- */
.auth-progress {
    display: flex;
    align-items: flex-start;
    margin-bottom: 24px;
    position: relative;
    flex-shrink: 0;
}

.auth-progress-line {
    position: absolute;
    top: 14px;
    left: 14px;
    right: 14px;
    height: 2px;
    background: #e8ecf4;
    z-index: 0;
}

.auth-progress-fill {
    position: absolute;
    top: 14px;
    left: 14px;
    height: 2px;
    background: linear-gradient(90deg, #003087, #c8102e);
    z-index: 1;
    transition: width 0.5s ease;
}

.auth-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
    z-index: 2;
}

.auth-step-circle {
    width: 28px; height: 28px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px;
    font-weight: 700;
    transition: all 0.3s;
    border: 2px solid #e8ecf4;
    background: white;
    color: #b0b8d0;
}

.auth-step.done .auth-step-circle {
    background: #003087;
    border-color: #003087;
    color: white;
}

.auth-step.active .auth-step-circle {
    background: white;
    border-color: #003087;
    color: #003087;
    box-shadow: 0 0 0 4px rgba(0,48,135,0.1);
}

.auth-step-label {
    font-size: 9px;
    font-weight: 600;
    color: #b0b8d0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-step.done .auth-step-label,
.auth-step.active .auth-step-label {
    color: #003087;
}

/* ---- FORM FIELDS ---- */
.auth-group {
    margin-bottom: 16px;
}

.auth-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #3d4a6b;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.auth-label i {
    color: #7a8499;
    font-size: 11px;
}

.auth-input {
    width: 100%;
    padding: 11px 16px;
    border: 1.5px solid #e4e9f2;
    border-radius: 12px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    color: #1a2340;
    background: #f8faff;
    transition: all 0.25s;
    outline: none;
}

.auth-input:focus {
    border-color: #003087;
    background: white;
    box-shadow: 0 0 0 3px rgba(0,48,135,0.08);
}

.auth-input::placeholder { color: #aab3cc; }

select.auth-input { cursor: pointer; }
textarea.auth-input { resize: none; }

/* Input with button */
.auth-input-group {
    display: flex;
    gap: 0;
}
.auth-input-group .auth-input {
    border-radius: 12px 0 0 12px;
    border-right: none;
}
.auth-input-group .auth-btn-sm {
    border-radius: 0 12px 12px 0;
    white-space: nowrap;
    padding: 0 16px;
    font-size: 12px;
    font-weight: 600;
    background: #003087;
    color: white;
    border: 1.5px solid #003087;
    cursor: pointer;
    transition: all 0.2s;
}
.auth-input-group .auth-btn-sm:hover { background: #001f5b; }
.auth-input-group .auth-btn-sm:disabled { opacity: 0.6; cursor: not-allowed; }

/* Grid row */
.auth-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.auth-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

/* ---- SECTION HEADER ---- */
.auth-section-head {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #003087;
    margin: 16px 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-section-head::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e4e9f2;
}

/* ---- BUTTONS ---- */
.auth-btn {
    width: 100%;
    padding: 13px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    border: none;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
}

.auth-btn-primary {
    background: linear-gradient(135deg, #003087 0%, #1a4aac 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(0,48,135,0.35);
}

.auth-btn-primary:hover {
    background: linear-gradient(135deg, #001f5b 0%, #003087 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0,48,135,0.45);
}

.auth-btn-success {
    background: linear-gradient(135deg, #1a7a3a 0%, #28a745 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(40,167,69,0.3);
}

.auth-btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(40,167,69,0.4);
}

/* ---- ALERTS ---- */
.auth-alert {
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    font-weight: 500;
}

.auth-alert-danger {
    background: #fff0f0;
    border: 1px solid #ffd0d0;
    color: #c0392b;
}

.auth-alert-info {
    background: #f0f5ff;
    border: 1px solid #c5d4f5;
    color: #003087;
}

.auth-otp-display {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 6px;
    color: #003087;
    margin: 4px 0;
}

/* ---- FORGOT LINK ---- */
.auth-forgot {
    text-align: right;
    margin: -8px 0 16px;
}

.auth-forgot a {
    font-size: 12px;
    color: #003087;
    font-weight: 600;
    text-decoration: none;
}

.auth-forgot a:hover { text-decoration: underline; }

/* ---- DIVIDER & FOOTER ---- */
.auth-divider {
    text-align: center;
    margin: 18px 0 14px;
    font-size: 12px;
    color: #aab3cc;
    position: relative;
}

.auth-divider::before, .auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #e4e9f2;
}
.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }

.auth-footer-links {
    text-align: center;
    font-size: 13px;
    color: #7a8499;
    flex-shrink: 0;
}

.auth-footer-links a {
    color: #003087;
    font-weight: 700;
    text-decoration: none;
}

.auth-footer-links a:hover { text-decoration: underline; }

.auth-back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    color: #aab3cc;
    text-decoration: none;
    margin-top: 10px;
    transition: color 0.2s;
}
.auth-back-link:hover { color: #003087; }

/* ---- OTP INPUT ---- */
.auth-otp-input {
    text-align: center;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 12px;
    height: 64px;
    background: #f0f5ff;
    border: 2px dashed #c5d4f5;
    color: #003087;
}
.auth-otp-input:focus {
    background: white;
    border-color: #003087;
    box-shadow: 0 0 0 3px rgba(0,48,135,0.1);
}

/* ---- PASSWORD TOGGLE ---- */
.auth-pw-wrap {
    position: relative;
}
.auth-pw-wrap .auth-input {
    padding-right: 44px;
}
.auth-pw-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #aab3cc;
    font-size: 14px;
    padding: 0;
    transition: color 0.2s;
}
.auth-pw-toggle:hover { color: #003087; }

/* ---- FILE INPUT ---- */
.auth-file-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #f8faff;
    border: 1.5px dashed #c5d4f5;
    border-radius: 12px;
    cursor: pointer;
    font-size: 12px;
    color: #7a8499;
    transition: all 0.2s;
}
.auth-file-label:hover {
    border-color: #003087;
    color: #003087;
}
.auth-file-label i { font-size: 18px; color: #003087; }
.auth-file-input { display: none; }

/* ============================================================
   RESPONSIVE — Mobile
   ============================================================ */
@media (max-width: 900px) {
    .auth-wrap { grid-template-columns: 1fr; }
    .auth-left  { display: none; }
    .auth-right { padding: 20px; }
    body.auth-body { overflow: auto; }
    .auth-form-box { max-height: none; }
    .auth-form-scroll { overflow: visible; }
}
