/* ============================================================
   BEES' PRE SCHOOL — LOGIN PAGE STYLES
   ============================================================ */

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

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

:root {
    --bg-primary: #0f1923;
    --bg-secondary: #1a2736;
    --bg-tertiary: #243447;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-glow: rgba(59, 130, 246, 0.25);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border: #2d3f52;
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
    --input-bg: #1e2f3f;
}

html, body {
    height: 100%;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden;
}

/* ---- Background Layout ---- */
.login-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1.5rem;
    overflow: hidden;
}

/* ---- Animated Background Circles ---- */
.login-bg-elements {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.18;
    animation: floatCircle 12s ease-in-out infinite;
}

.bg-circle-1 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, #3b82f6, transparent 70%);
    top: -10%;
    right: -5%;
    animation-delay: 0s;
}

.bg-circle-2 {
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, #8b5cf6, transparent 70%);
    bottom: -10%;
    left: -8%;
    animation-delay: -4s;
}

.bg-circle-3 {
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, #06b6d4, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -8s;
}

@keyframes floatCircle {
    0%, 100% { transform: scale(1) translate(0, 0); }
    33%       { transform: scale(1.08) translate(20px, -15px); }
    66%       { transform: scale(0.95) translate(-15px, 20px); }
}

/* ---- Login Card ---- */
.login-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    background: rgba(26, 39, 54, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(45, 63, 82, 0.7);
    border-radius: 20px;
    padding: 2.75rem 2.5rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(59, 130, 246, 0.08);
    animation: slideUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(28px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---- Card Header ---- */
.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    border-radius: 16px;
    margin-bottom: 1.25rem;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.35);
}

.login-logo i {
    font-size: 1.6rem;
    color: #fff;
}

.login-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin-bottom: 0.35rem;
}

.login-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ---- Form ---- */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper > i {
    position: absolute;
    left: 0.9rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    pointer-events: none;
    transition: color 0.2s;
}

.input-wrapper input {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.75rem 1rem 0.75rem 2.6rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-wrapper input::placeholder {
    color: rgba(148, 163, 184, 0.5);
}

.input-wrapper input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.input-wrapper:focus-within > i {
    color: var(--accent);
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    font-size: 0.85rem;
}

.password-toggle:hover {
    color: var(--text-primary);
}

/* ---- Error Message ---- */
.login-error {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--danger-bg);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    padding: 0.65rem 0.9rem;
    font-size: 0.82rem;
    color: #fca5a5;
    animation: shake 0.35s ease;
}

.login-error i {
    font-size: 0.85rem;
    flex-shrink: 0;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-6px); }
    40%       { transform: translateX(6px); }
    60%       { transform: translateX(-4px); }
    80%       { transform: translateX(4px); }
}

/* ---- Login Button ---- */
.btn-login {
    width: 100%;
    padding: 0.82rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
    margin-top: 0.25rem;
}

.btn-login:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(59, 130, 246, 0.55);
}

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

.btn-login:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* ---- Footer ---- */
.login-footer {
    margin-top: 1.5rem;
    text-align: center;
}

.back-link {
    font-size: 0.82rem;
    color: var(--text-secondary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--accent);
}
