:root {
    --bg: #05060a;
    --bg-elevated: #111320;
    --bg-elevated-soft: #141726;
    --accent: #2563eb;
    --accent-soft: rgba(37, 99, 235, 0.2);
    --text-main: #f9fafb;
    --text-subtle: #9ca3af;
}

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

body {
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #020617 0, #020617 45%, #000 100%);
    color: var(--text-main);
    min-height: 100vh;
}

/* NAVBAR (reusable) */
.app-navbar{
position:sticky;top:0;z-index:50;height:56px;background:#020617;
border-bottom:1px solid rgba(31,41,55,.95);
box-shadow:0 6px 14px rgba(15,23,42,.85),0 1px 0 rgba(15,23,42,1);
}
.app-navbar-inner{max-width: 1500px;margin:0 auto;height:100%;padding:0 16px;display:flex;align-items:center;justify-content:space-between}
.nav-brand{display:flex;align-items:center;font-weight:600;letter-spacing:.16em;text-transform:uppercase;font-size:16px;color:#e5e7eb;text-decoration:none}
.nav-brand-mark{width:18px;height:18px;border-radius:5px;background:
linear-gradient(135deg,#3b82f6,#1d4ed8),
linear-gradient(315deg,#f97316,#ef4444);
box-shadow:0 0 0 1px rgba(15,23,42,.9)}
.nav-links{display:flex;align-items:center;gap:20px;font-size:12px;text-transform:uppercase;letter-spacing:.12em}
.nav-link{position:relative;text-decoration:none;color:#9ca3af;padding:4px 0;transition:color .15s}
.nav-link::after{content:"";position:absolute;left:0;bottom:-4px;width:0;height:2px;border-radius:999px;background:linear-gradient(90deg,#3b82f6,#22c55e);transition:width .18s}
.nav-link:hover{color:#e5e7eb}
.nav-link:hover::after{width:100%}
.nav-link.is-active{color:#f9fafb}
.nav-link.is-active::after{width:100%}

.nav-logo {
    height: 70px;
}

@media (max-width: 768px) {
    .app-navbar-inner {
       padding: 0 10px; /* slightly tighter padding */
       justify-content: space-between;   /* keep brand left, links right */
    }

    .nav-brand {
       font-size: 11px;
    }

    .nav-logo {
        height: 70px;
    }

    .nav-brand-mark {
       width: 14px;
       height: 14px;
       border-radius: 4px;
    }

    .nav-links {
       gap: 12px;/* smaller spacing */
       font-size: 11px;
    }

    .nav-link {
       padding: 2px 0;
    }

    .btn {
       font-size: 15px;
    }
}

main {
    min-height: 100vh;
    max-width: 420px;
    margin: 0 auto;
    padding: 32px 16px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.app-title {
    font-size: 26px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #e5e7eb;
    text-align: center;
    margin-bottom: 6px;
}

.app-subtitle {
    font-size: 13px;
    color: var(--text-subtle);
    text-align: center;
    margin-bottom: 24px;
}

.login-card {
    position: relative;
    border-radius: 26px;
    padding: 26px 24px 22px;
    background:
       radial-gradient(circle at 0% 0%, rgba(20, 54, 127, 0.9), transparent 60%),
       radial-gradient(circle at 100% 0%, rgba(63, 156, 244, 0.75), transparent 65%),
       linear-gradient(145deg, #020617, #020617);
    box-shadow:
       0 26px 70px rgba(15, 23, 42, 0.95),
       0 0 0 1px rgba(31, 41, 55, 0.9);
    overflow: hidden;
}

.login-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
       radial-gradient(circle at 10% -10%, rgba(56, 189, 248, 0.45), transparent 60%);
    opacity: 0.9;
    mix-blend-mode: screen;
    pointer-events: none;
}

.login-card-inner {
    position: relative;
    z-index: 1;
}

.login-header {
    margin-bottom: 18px;
}

.login-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 2px;
}

.login-subtitle {
    font-size: 13px;
    color: var(--text-subtle);
}

.flash-success {
    margin-bottom: 12px;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 12px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(45, 243, 5, 0.7);
    color: #affa9b;
    display: none; /* shown via JS */
}

.flash-fail {
    margin-bottom: 12px;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 12px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.7);
    color: #fecaca;
    display: none; /* shown via JS */
}

.form-group {
    margin-bottom: 14px;
}

label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    margin-bottom: 6px;
    color: var(--text-subtle);
}

.input-shell {
    position: relative;
}

.input-field {
    width: 100%;
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.95);
    color: var(--text-main);
    font-size: 14px;
    padding: 0 12px;
    outline: none;
    transition: border-color 0.15s ease-out, box-shadow 0.15s ease-out, background 0.15s ease-out;
}

.input-field::placeholder {
    color: #6b7280;
}

.input-field:focus {
    border-color: rgba(96, 165, 250, 1);
    box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.7);
    background: #020617;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #9ca3af;
    font-size: 13px;
    cursor: pointer;
    padding: 0;
}

.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
    margin-bottom: 16px;
    gap: 8px;
}

.remember-me {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-subtle);
}

.remember-me input {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    border: 1px solid rgba(75,85,99,0.9);
    accent-color: #3b82f6;
}

.forgot-link {
    font-size: 12px;
    color: #93c5fd;
    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}

.login-button {
    width: 100%;
    height: 44px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #f9fafb;
    background: linear-gradient(135deg, #3b82f6, #22c55e);
    box-shadow:
       0 12px 30px rgba(37, 99, 235, 0.55),
       0 0 0 1px rgba(15, 23, 42, 0.9);
    margin-top: 4px;
    transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, filter 0.12s ease-out, opacity 0.1s;
}

.login-button:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
    box-shadow:
       0 16px 36px rgba(37, 99, 235, 0.75),
       0 0 0 1px rgba(15, 23, 42, 1);
}

.login-button:active {
    transform: translateY(0);
    box-shadow:
       0 10px 24px rgba(15, 23, 42, 0.9),
       0 0 0 1px rgba(15, 23, 42, 1);
}

.login-button[disabled] {
    opacity: 0.65;
    cursor: wait;
}

.auth-alt {
    margin-top: 14px;
    font-size: 12px;
    text-align: center;
    color: var(--text-subtle);
}

.auth-alt a {
    color: #93c5fd;
    text-decoration: none;
    font-weight: 500;
}

.auth-alt a:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    main {
       padding-inline: 12px;
    }
    .login-card {
       padding-inline: 18px;
    }
}
