/* ================================================================
   KRS Infotech – StudyAbroad CRM Login Page
   Matches the attached design screenshot exactly
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

/* ── Root Variables ── */
:root {
    --red:        #c0392b;
    --red-dark:   #922b21;
    --red-hover:  #a93226;
    --orange:     #e67e22;
    --orange-lt:  #f39c12;
    --dark-bg:    #1a0808;
    --dark-card:  #2d0f0f;
    --dark-ring:  rgba(180,50,30,0.25);
    --white:      #ffffff;
    --light-bg:   #f8f9fa;
    --border:     #e2e8f0;
    --text-dark:  #1e293b;
    --text-mid:   #475569;
    --text-muted: #94a3b8;
    --radius:     10px;
    --transition: 0.22s ease;
}

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

body {
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    background: #f0f2f5;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

/* ── Outer Wrapper ── */
.page-wrapper {
    display: flex;
    width: 100%;
    max-width: 980px;
    min-height: 620px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0,0,0,0.22), 0 0 0 1px rgba(0,0,0,0.06);
    background: var(--white);
}

/* ================================================================
   LEFT PANEL
   ================================================================ */

.left-panel {
    flex: 0 0 44%;
    background: linear-gradient(160deg, #2c0a0a 0%, #1a0505 45%, #0d0202 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    padding: 2.5rem 2.2rem;
}

/* Decorative background rings that bleed out */
.bg-circle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}
.bg-circle-1 {
    width: 450px; height: 450px;
    background: radial-gradient(circle, rgba(192,57,43,0.18) 0%, transparent 65%);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}
.bg-circle-2 {
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(140,30,20,0.12) 0%, transparent 60%);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}
.bg-circle-3 {
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(230,90,30,0.1) 0%, transparent 70%);
    top: 10%; right: -60px;
}

.left-inner {
    position: relative;
    z-index: 1;
    width: 100%;
}

/* Brand */
.brand-block {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.brand-logo {
    width: 46px; height: 46px;
    background: rgba(192,57,43,0.9);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem;
    color: white;
    box-shadow: 0 4px 14px rgba(192,57,43,0.5);
    flex-shrink: 0;
}

.brand-logo-sm {
    width: 36px; height: 36px;
    background: var(--red);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; color: white;
}

.brand-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #f1f5f9;
    line-height: 1.2;
}

.brand-tagline {
    font-size: 0.68rem;
    color: #94a3b8;
    font-style: italic;
    letter-spacing: 0.3px;
}

.brand-underline {
    width: 36px;
    height: 3px;
    background: linear-gradient(90deg, var(--orange), var(--orange-lt));
    border-radius: 2px;
    margin-bottom: 1.6rem;
    margin-left: 0;
}

/* Headline */
.left-headline {
    font-size: 2rem;
    font-weight: 800;
    color: #f8fafc;
    line-height: 1.25;
    letter-spacing: -0.5px;
    margin-bottom: 0.75rem;
}

.headline-accent {
    color: var(--orange);
}

.left-desc {
    font-size: 0.82rem;
    color: #94a3b8;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    max-width: 320px;
}

/* Globe Section */
.globe-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 170px;
    margin-bottom: 1.6rem;
}

/* Concentric rings */
.ring {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid rgba(192, 57, 43, 0.25);
}
.ring-outer  { width: 160px; height: 160px; border-color: rgba(192,57,43,0.15); }
.ring-middle { width: 118px; height: 118px; border-color: rgba(192,57,43,0.22); }
.ring-inner  { width:  78px; height:  78px; border-color: rgba(192,57,43,0.35); background: rgba(192,57,43,0.06); }

/* Globe emoji */
.globe-emoji {
    font-size: 4rem;
    line-height: 1;
    position: relative;
    z-index: 2;
    animation: globeSpin 20s linear infinite;
    filter: drop-shadow(0 4px 16px rgba(0,0,0,0.4));
}

@keyframes globeSpin {
    0%   { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}

/* Stat badges */
.stat-badge {
    position: absolute;
    background: var(--orange);
    color: white;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.3rem 0.75rem;
    border-radius: 50px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(230,126,34,0.45);
    z-index: 3;
    animation: badgePulse 3s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 4px 12px rgba(230,126,34,0.4); }
    50%       { box-shadow: 0 4px 22px rgba(230,126,34,0.65); }
}

.badge-students { top: 10px; right: 10px; }
.badge-apps     { bottom: 14px; left: 5px; }

/* Features */
.feature-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.feature-row {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}

.feat-icon {
    width: 34px; height: 34px;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.feat-orange {
    background: rgba(230,126,34,0.15);
    color: var(--orange);
}

.feat-title {
    font-size: 0.83rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 2px;
}

.feat-desc {
    font-size: 0.72rem;
    color: #64748b;
    line-height: 1.5;
}

/* ================================================================
   RIGHT PANEL
   ================================================================ */

.right-panel {
    flex: 1;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 3rem;
}

.form-area {
    width: 100%;
    max-width: 380px;
}

/* Tab Bar */
.tab-bar {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1.8rem;
    flex-wrap: wrap;
}

.tab-pill {
    border: 1px solid var(--border);
    background: var(--light-bg);
    color: var(--text-mid);
    font-size: 0.78rem;
    font-weight: 600;
    font-family: inherit;
    padding: 0.5rem 0.9rem;
    border-radius: 7px;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.tab-pill:hover {
    border-color: #fca5a5;
    color: var(--red);
}

.tab-pill.active {
    background: var(--red);
    color: white;
    border-color: var(--red);
    box-shadow: 0 3px 10px rgba(192,57,43,0.35);
}

/* Form Heading */
.form-heading {
    margin-bottom: 1.5rem;
}

.form-heading h2 {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -0.3px;
    margin-bottom: 0.3rem;
}

.form-sub {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0;
}

.red-link {
    color: var(--red);
    text-decoration: none;
    font-weight: 600;
    transition: opacity var(--transition);
}
.red-link:hover { opacity: 0.78; color: var(--red); }

/* ── Field Group ── */
.field-group {
    margin-bottom: 1rem;
}

.field-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-mid);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
}

.label-icon {
    color: var(--text-muted);
    margin-right: 2px;
}

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

.field-ico {
    position: absolute;
    left: 0.9rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
    transition: color var(--transition);
}

.field-input {
    width: 100%;
    padding: 0.72rem 2.8rem 0.72rem 2.5rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.88rem;
    font-family: inherit;
    color: var(--text-dark);
    background: var(--white);
    outline: none;
    transition: all var(--transition);
}

.field-input::placeholder {
    color: #c8d0db;
    font-weight: 400;
}

.field-input:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(192,57,43,0.1);
}

.field-input:focus ~ .field-ico,
.field-wrap:focus-within .field-ico {
    color: var(--red);
}

/* Eye toggle */
.eye-btn {
    position: absolute;
    right: 0.85rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.95rem;
    cursor: pointer;
    padding: 0.2rem;
    line-height: 1;
    transition: color var(--transition);
}
.eye-btn:hover { color: var(--red); }

/* Validation */
.field-input.has-error {
    border-color: #ef4444;
    background: #fff8f8;
}
.field-input.has-error:focus {
    box-shadow: 0 0 0 3px rgba(239,68,68,0.12);
}

.field-error {
    display: block;
    font-size: 0.73rem;
    color: #ef4444;
    margin-top: 0.3rem;
    min-height: 16px;
}

/* ── Remember Row ── */
.remember-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.remember-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.remember-chk { display: none; }

.chk-box {
    width: 16px; height: 16px;
    border: 1.5px solid #cbd5e1;
    border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    transition: all var(--transition);
    flex-shrink: 0;
}

.remember-chk:checked + .chk-box {
    background: var(--red);
    border-color: var(--red);
}

.remember-chk:checked + .chk-box::after {
    content: '';
    width: 9px; height: 5px;
    border-left: 2px solid white;
    border-bottom: 2px solid white;
    transform: rotate(-45deg) translateY(-1px);
}

.chk-text {
    font-size: 0.8rem;
    color: var(--text-mid);
    font-weight: 500;
}

.forgot-link {
    font-size: 0.8rem;
    color: var(--red);
    font-weight: 600;
    text-decoration: none;
    transition: opacity var(--transition);
}
.forgot-link:hover { opacity: 0.75; }

/* ── Login Button ── */
.login-btn {
    width: 100%;
    padding: 0.88rem;
    background: var(--red);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 800;
    font-family: inherit;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 4px 16px rgba(192,57,43,0.35);
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.login-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.12) 0%, transparent 100%);
}

.login-btn:hover {
    background: var(--red-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(192,57,43,0.45);
}

.login-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(192,57,43,0.3);
}

.login-btn.is-loading {
    pointer-events: none;
    opacity: 0.85;
}

/* Spinner */
.spin-ring {
    display: inline-block;
    width: 14px; height: 14px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.65s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

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

/* ── Sign-Up Section ── */
.signup-section {
    text-align: center;
    margin-bottom: 1.5rem;
}

.signup-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.create-account-link {
    font-size: 0.83rem;
    color: var(--red);
    font-weight: 700;
    text-decoration: none;
    transition: opacity var(--transition);
}
.create-account-link:hover { opacity: 0.78; }

/* ── Footer ── */
.form-footer {
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */

@media (max-width: 991.98px) {
    .page-wrapper {
        flex-direction: column;
        max-width: 480px;
        min-height: auto;
    }

    .right-panel {
        padding: 2rem 1.75rem;
    }

    .form-area { max-width: 100%; }
}

@media (max-width: 480px) {
    body { padding: 0; align-items: stretch; }

    .page-wrapper {
        border-radius: 0;
        min-height: 100vh;
        box-shadow: none;
    }

    .right-panel { padding: 1.75rem 1.25rem; }
    .form-heading h2 { font-size: 1.35rem; }
    .tab-pill { font-size: 0.72rem; padding: 0.45rem 0.65rem; }
}
