@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    --nexora-purple: #30106B;
    --nexora-purple-dark: #1a0640;
    --nexora-purple-mid: #4a1a8a;
    --nexora-purple-soft: #f3eeff;
    --nexora-purple-border: #e4dfec;
    --nexora-orange: #FF7E00;
    --nexora-orange-hover: #e87200;
    --nexora-white: #FFFFFF;
    --nexora-text-muted: #8a8494;
    --nexora-placeholder: #b5afc4;
    --nexora-font: 'Poppins', sans-serif;
}

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

html, body.nexora-login-page {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: var(--nexora-font);
    -webkit-font-smoothing: antialiased;
}

.nexora-login-page {
    background: linear-gradient(135deg, #ede8f5 0%, var(--nexora-white) 50%, #e8e0f2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.nexora-login-wrapper {
    display: flex;
    width: 100%;
    max-width: 1100px;
    min-height: 640px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(48, 16, 107, 0.18), 0 4px 16px rgba(0, 0, 0, 0.06);
}

.nexora-login-left {
    flex: 0 0 45%;
    max-width: 45%;
    background: linear-gradient(160deg, var(--nexora-purple-dark) 0%, var(--nexora-purple) 45%, var(--nexora-purple-mid) 100%);
    color: var(--nexora-white);
    padding: 48px 52px 0;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.nexora-login-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
}

.nexora-login-left::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: -80px;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(255,126,0,0.25) 0%, transparent 70%);
    pointer-events: none;
}

.nexora-brand { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; margin-bottom: 48px; }
.nexora-brand-icon { flex-shrink: 0; width: 52px; height: 52px; }
.nexora-brand-text h1 { margin: 0; font-size: 1.55rem; font-weight: 700; line-height: 1.2; }
.nexora-brand-text h1 .orange, .orange { color: var(--nexora-orange); }
.nexora-brand-text p { margin: 2px 0 0; font-size: 0.78rem; opacity: 0.85; }

.nexora-hero { position: relative; z-index: 1; flex: 1; }
.nexora-hero h2 { font-size: 2.15rem; font-weight: 700; line-height: 1.25; margin: 0 0 18px; }
.nexora-hero .desc { font-size: 0.88rem; line-height: 1.7; opacity: 0.82; margin: 0 0 36px; max-width: 380px; }

.nexora-features { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 28px; max-width: 400px; }
.nexora-feature { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.nexora-feature-icon {
    width: 52px; height: 52px; border-radius: 50%;
    background: rgba(255,255,255,0.1); border: 1.5px solid rgba(255,255,255,0.18);
    display: flex; align-items: center; justify-content: center; font-size: 1.15rem;
}
.nexora-feature span { font-size: 0.72rem; font-weight: 500; opacity: 0.9; line-height: 1.3; }

.nexora-school-illustration { position: relative; z-index: 1; margin-top: auto; padding-top: 32px; text-align: center; }
.nexora-school-illustration svg { width: 100%; max-width: 340px; height: auto; opacity: 0.9; }

.nexora-login-right {
    flex: 1;
    background: var(--nexora-white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 56px;
    position: relative;
    overflow: hidden;
}

.nexora-login-right::before {
    content: '';
    position: absolute;
    top: -50px; right: -50px;
    width: 180px; height: 180px;
    background: linear-gradient(135deg, var(--nexora-orange) 0%, var(--nexora-purple-mid) 100%);
    border-radius: 0 0 0 70%;
    opacity: 0.9;
    pointer-events: none;
}

.nexora-login-right::after {
    content: '';
    position: absolute;
    top: 24px; right: 50px;
    width: 70px; height: 70px;
    background: linear-gradient(135deg, var(--nexora-orange), var(--nexora-purple));
    border-radius: 50%;
    opacity: 0.45;
    pointer-events: none;
}

.nexora-login-form-container { width: 100%; max-width: 400px; position: relative; z-index: 1; }

.nexora-lock-icon {
    width: 68px; height: 68px; border-radius: 50%;
    background: var(--nexora-purple-soft);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 22px; font-size: 1.55rem; color: var(--nexora-purple);
}

.nexora-form-header { text-align: center; margin-bottom: 34px; }
.nexora-form-header h2 { font-size: 1.9rem; font-weight: 700; margin: 0 0 10px; color: var(--nexora-purple-dark); }
.nexora-form-header p { margin: 0; font-size: 0.875rem; color: var(--nexora-text-muted); }

.nexora-alert {
    padding: 13px 16px; border-radius: 12px; font-size: 0.84rem;
    margin-bottom: 22px; display: flex; align-items: flex-start; gap: 10px; line-height: 1.5;
}
.nexora-alert-danger { background: #fff5f5; color: #b91c1c; border: 1px solid #fecaca; }
.nexora-alert-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.nexora-alert .close { margin-left: auto; background: none; border: none; font-size: 1.2rem; cursor: pointer; opacity: 0.5; padding: 0; }

.nexora-form-group { margin-bottom: 22px; }
.nexora-form-group label {
    display: block; font-size: 0.875rem; font-weight: 600;
    color: var(--nexora-purple-dark); margin-bottom: 9px;
}

.nexora-input-wrap { position: relative; display: flex; align-items: center; }
.nexora-input-wrap .input-icon {
    position: absolute; left: 17px; color: var(--nexora-purple);
    font-size: 1rem; pointer-events: none; z-index: 1; opacity: 0.75;
}
.nexora-input-wrap .toggle-password {
    position: absolute; right: 16px; background: none; border: none;
    color: var(--nexora-text-muted); cursor: pointer; font-size: 1rem; padding: 4px; z-index: 1;
}
.nexora-input-wrap .toggle-password:hover { color: var(--nexora-purple); }

.nexora-input {
    width: 100%; height: 52px; padding: 0 16px 0 46px;
    border: 1.5px solid var(--nexora-purple-border); border-radius: 14px;
    font-family: var(--nexora-font); font-size: 0.9rem; color: var(--nexora-purple-dark);
    background: var(--nexora-white); outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.nexora-input:focus { border-color: var(--nexora-purple); box-shadow: 0 0 0 3px rgba(48, 16, 107, 0.12); }
.nexora-input::placeholder { color: var(--nexora-placeholder); }
.nexora-input-wrap .nexora-input.has-toggle { padding-right: 46px; }

.nexora-form-options {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 28px; font-size: 0.875rem;
}

.nexora-checkbox { display: flex; align-items: center; gap: 10px; cursor: pointer; color: var(--nexora-text-muted); font-weight: 500; }
.nexora-checkbox input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }
.nexora-checkbox .checkmark {
    width: 20px; height: 20px; border-radius: 5px;
    border: 2px solid var(--nexora-purple-border); background: var(--nexora-white);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.nexora-checkbox .checkmark i { font-size: 0.65rem; color: var(--nexora-white); opacity: 0; }
.nexora-checkbox input:checked + .checkmark { background: var(--nexora-purple); border-color: var(--nexora-purple); }
.nexora-checkbox input:checked + .checkmark i { opacity: 1; }

.nexora-forgot-link { color: var(--nexora-orange); text-decoration: none; font-weight: 600; font-size: 0.875rem; }
.nexora-forgot-link:hover { color: var(--nexora-orange-hover); text-decoration: underline; }

.nexora-btn-login {
    width: 100%; height: 52px; border: none; border-radius: 14px;
    background: linear-gradient(135deg, var(--nexora-orange) 0%, #ff6600 100%);
    color: var(--nexora-white); font-family: var(--nexora-font);
    font-size: 1rem; font-weight: 600; cursor: pointer;
    box-shadow: 0 4px 18px rgba(255, 126, 0, 0.35);
    transition: transform 0.15s, box-shadow 0.2s;
}
.nexora-btn-login:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(255, 126, 0, 0.45); }

.nexora-signup-footer { text-align: center; margin-top: 30px; font-size: 0.875rem; color: var(--nexora-text-muted); }
.nexora-signup-footer a { color: var(--nexora-orange); font-weight: 700; text-decoration: none; }
.nexora-signup-footer a:hover { text-decoration: underline; }

.nexora-captcha { margin-bottom: 22px; display: flex; justify-content: center; }

.nexora-demo-panel {
    width: 100%; max-width: 560px; margin: 28px auto 0; padding: 18px 22px;
    background: var(--nexora-purple-soft); border-radius: 14px;
    border: 1px solid var(--nexora-purple-border); position: relative; z-index: 1;
}
.nexora-demo-panel .demo-title { text-align: center; font-size: 0.84rem; font-weight: 600; color: var(--nexora-purple); margin-bottom: 12px; }
.nexora-demo-buttons { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.nexora-demo-btn {
    padding: 7px 14px; border: none; border-radius: 8px;
    font-family: var(--nexora-font); font-size: 0.78rem; font-weight: 600;
    cursor: pointer; color: var(--nexora-white);
}
.nexora-demo-btn.admin { background: var(--nexora-purple); }
.nexora-demo-btn.teacher { background: var(--nexora-purple-mid); }
.nexora-demo-btn.student { background: var(--nexora-orange); }
.nexora-demo-btn.parent { background: #5c2199; }
.nexora-demo-btn.accountant { background: #3d1585; }
.nexora-demo-btn.librarian { background: #6b3fa0; }
.nexora-demo-btn.recep { background: var(--nexora-purple-dark); }

@media (max-width: 768px) {
    .nexora-login-page { padding: 0; align-items: stretch; }
    .nexora-login-wrapper { flex-direction: column; border-radius: 0; min-height: 100vh; max-width: 100%; box-shadow: none; }
    .nexora-login-left { flex: none; max-width: 100%; padding: 32px 28px 28px; }
    .nexora-school-illustration { display: none; }
    .nexora-features { grid-template-columns: repeat(3, 1fr); max-width: 100%; }
    .nexora-login-right { padding: 36px 28px 48px; }
    .nexora-login-right::before, .nexora-login-right::after { display: none; }
}

@media (max-width: 480px) {
    .nexora-features { grid-template-columns: repeat(2, 1fr); }
    .nexora-form-header h2 { font-size: 1.55rem; }
    .nexora-form-options { flex-direction: column; align-items: flex-start; gap: 12px; }
}
