/* TeenTech sign-in page (Views/Other/login.cshtml) */
:root {
    --brand: #3aaa35;
    --brand-600: #2f9230;
    --brand-700: #1f7a34;
    --brand-800: #0f5f33;
    --brand-900: #0a4428;
    --brand-950: #072e1c;
    --brand-50: #eef8ee;
    --ink: #16211b;
    --ink-2: #3d4a43;
    --muted: #6b7a72;
    --line: #dfe6e2;
    --danger: #d9443c;
    --font: "Inter", "Cairo", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
    font-family: var(--font);
    color: var(--ink);
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

.auth { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh; }

/* ---------- Brand side ---------- */
.auth-brand {
    position: relative;
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 56px 64px 32px;
    color: #fff;
    overflow: hidden;
    background:
        radial-gradient(700px 380px at 110% -10%, rgba(58, 170, 53, .55), transparent 60%),
        radial-gradient(500px 320px at -10% 110%, rgba(58, 170, 53, .30), transparent 60%),
        linear-gradient(150deg, var(--brand-800) 0%, var(--brand-950) 100%);
}
.auth-brand::before {
    /* faint grid */
    content: "";
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse at 30% 40%, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 30%, transparent 75%);
    pointer-events: none;
}
.auth-brand::after {
    /* the logo's arrow mark, large and faint */
    content: "";
    position: absolute; right: -120px; bottom: -120px;
    width: 520px; height: 520px;
    background: linear-gradient(135deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, 0));
    clip-path: polygon(2% 30%, 98% 8%, 78% 30%, 64% 32%, 36% 96%, 30% 40%, 44% 32%);
    pointer-events: none;
}
.auth-brand-inner { position: relative; z-index: 1; max-width: 520px; margin: auto 0; }

.auth-mark {
    width: 76px; height: 76px;
    border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .18);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
    margin-bottom: 32px;
}
.auth-brand h1 { font-size: 2.6rem; line-height: 1.12; font-weight: 800; letter-spacing: -.03em; margin: 0 0 16px; }
.auth-brand h1 span { color: #9be895; }
.auth-brand p { font-size: 1.02rem; line-height: 1.6; color: rgba(255, 255, 255, .74); margin: 0 0 36px; }

.auth-features { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.auth-features li {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
    backdrop-filter: blur(4px);
}
.auth-features li > i {
    width: 40px; height: 40px; flex: none;
    border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(58, 170, 53, .25);
    color: #b9f0b5;
}
.auth-features b { display: block; font-size: .92rem; margin-bottom: 2px; }
.auth-features span { font-size: .8rem; color: rgba(255, 255, 255, .62); }

.auth-brand-foot { position: relative; z-index: 1; font-size: .78rem; color: rgba(255, 255, 255, .5); margin-top: 32px; }

/* ---------- Form side ---------- */
.auth-form-side {
    display: flex; align-items: center; justify-content: center;
    padding: 48px 24px;
    background:
        radial-gradient(500px 300px at 100% 0%, rgba(58, 170, 53, .06), transparent 70%),
        #fff;
}
.login { width: 100%; max-width: 400px; }

.auth-logo { display: block; height: 64px; width: auto; margin: 0 0 36px -10px; mix-blend-mode: multiply; }

.login-header h2 { font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em; margin: 0 0 6px; }
.login-header p { margin: 0 0 28px; color: var(--muted); font-size: .95rem; }

.login-form { display: grid; gap: 18px; }

.field { display: block; }
.field-label { display: block; font-size: .8rem; font-weight: 600; color: var(--ink-2); margin-bottom: 7px; }
.field-box {
    position: relative;
    display: flex; align-items: center;
    height: 50px;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    background: #fbfcfb;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.field-box:hover { border-color: #c8d3cd; }
.field-box:focus-within { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px rgba(58, 170, 53, .16); }
.field-box > i:first-child { width: 46px; text-align: center; color: #93a39a; flex: none; transition: color .15s; }
.field-box:focus-within > i:first-child { color: var(--brand-700); }
.field-box input, .field-box select {
    flex: 1; min-width: 0; height: 100%;
    border: 0; outline: 0; background: transparent;
    font: inherit; font-size: .95rem; color: var(--ink);
    padding: 0 14px 0 0;
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
}
.field-box select { cursor: pointer; padding-right: 40px; }
.field-box input::placeholder { color: #a3b0a8; }
.field-caret { position: absolute; right: 16px; font-size: .75rem; color: var(--muted); pointer-events: none; }
.field-eye {
    width: 44px; height: 100%;
    border: 0; background: transparent;
    color: #93a39a; cursor: pointer; border-radius: 0 12px 12px 0;
}
.field-eye:hover { color: var(--brand-700); }

.field-box.has-error { border-color: var(--danger); background: #fff7f6; box-shadow: 0 0 0 4px rgba(217, 68, 60, .12); }
.field-box.has-error > i:first-child { color: var(--danger); }
.login-input.has-error { background: transparent; }

.login-error {
    display: none;
    padding: 11px 14px;
    border-radius: 10px;
    background: #fff4f3;
    border: 1px solid #f6cfcc;
    color: #a52b25;
    font-size: .86rem;
    font-weight: 500;
}
.login-error.show { display: block; animation: shake .35s; }

.login-btn {
    position: relative;
    height: 52px;
    margin-top: 6px;
    border: 0; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    font: inherit; font-size: 1rem; font-weight: 700; letter-spacing: .01em;
    color: #fff; cursor: pointer;
    background: linear-gradient(180deg, var(--brand) 0%, var(--brand-700) 100%);
    box-shadow: 0 10px 24px rgba(31, 122, 52, .32), inset 0 1px 0 rgba(255, 255, 255, .18);
    transition: transform .15s, box-shadow .15s, filter .15s;
}
.login-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(31, 122, 52, .38), inset 0 1px 0 rgba(255, 255, 255, .18); }
.login-btn:active { transform: translateY(0); }
.login-btn:focus-visible { outline: 0; box-shadow: 0 0 0 4px rgba(58, 170, 53, .3); }
.btn-arrow { font-size: .85rem; transition: transform .15s; }
.login-btn:hover .btn-arrow { transform: translateX(3px); }

.login-btn .loader {
    display: none;
    width: 20px; height: 20px;
    border-radius: 50%;
    border: 2.5px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    animation: spin .7s linear infinite;
}
.login.loading .login-btn { pointer-events: none; filter: saturate(.85); }
.login.loading .login-btn .btn-text, .login.loading .login-btn .btn-arrow { display: none; }
.login.loading .login-btn .loader { display: block; }

.auth-help { margin: 28px 0 0; font-size: .82rem; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.auth-help i { color: var(--brand-600); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .auth { grid-template-columns: 1fr; }
    .auth-brand { display: none; }
    .auth-form-side { min-height: 100vh; background: linear-gradient(180deg, var(--brand-50), #fff 40%); }
    .auth-logo { margin-left: auto; margin-right: auto; }
    .login-header { text-align: center; }
}
@media (max-width: 420px) {
    .auth-form-side { padding: 32px 16px; }
    .auth-logo { height: 52px; }
}
