/* ── reset & base ── */

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

html, body {
    height: 100vh;
    overflow: hidden;
    font-family: 'Anuphan', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ── full-page background ── */

.login-scene {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f9fafb;
}

.login-scene::before,
.login-scene::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.login-scene::before {
    background: radial-gradient(circle at 80% 15%, rgba(255,200,160,0.3), transparent 50%);
    filter: blur(120px) saturate(150%);
}

.login-scene::after {
    background: radial-gradient(circle at 20% 85%, rgba(240,245,255,0.7), transparent 60%);
    filter: blur(150px);
}

#dot-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* ── glass card ── */

.login-card {
    position: relative;
    z-index: 10;
    width: 420px;
    max-width: calc(100vw - 40px);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 44px 40px 32px;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E"),
        linear-gradient(145deg, rgba(255,255,255,0.88) 0%, rgba(255,255,255,0.65) 100%);
    backdrop-filter: blur(28px) saturate(160%);
    -webkit-backdrop-filter: blur(28px) saturate(160%);
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: 28px;
    box-shadow:
        0 20px 60px rgba(0,0,0,0.12),
        0 1px 3px rgba(0,0,0,0.06),
        inset 0 1px 0 rgba(255,255,255,0.7);
}

/* ── logo ── */

.login-logo { margin-bottom: 28px; }
.login-logo img {
    width: 180px;
    height: auto;
    object-fit: contain;
}

/* ── headings ── */

.login-heading {
    text-align: center;
    margin-bottom: 28px;
}

.login-heading h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.01em;
    margin-bottom: 6px;
}

.login-heading p {
    font-size: 0.88rem;
    font-weight: 400;
    color: #64748b;
    line-height: 1.5;
}

/* ── sign-in button ── */

.btn-passport {
    display: block;
    width: 100%;
    padding: 15px 24px;
    font-family: 'Anuphan', system-ui, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    border: none;
    border-radius: 14px;
    cursor: pointer;
    box-shadow:
        0 4px 14px rgba(249,115,22,0.25),
        0 1px 3px rgba(249,115,22,0.1);
    transition: all 0.3s ease;
    letter-spacing: 0.01em;
}

.btn-passport:hover {
    background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
    box-shadow:
        0 6px 22px rgba(249,115,22,0.3),
        0 2px 5px rgba(249,115,22,0.15);
    transform: translateY(-1px);
}

.btn-passport:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(249,115,22,0.2);
}

.btn-wrap {
    width: 100%;
    margin-bottom: 14px;
}

/* ── secure note ── */

.secure-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.78rem;
    color: #94a3b8;
    font-weight: 400;
    margin-bottom: 20px;
}

.secure-note svg {
    width: 14px; height: 14px;
    color: #4ade80;
    flex-shrink: 0;
}

/* ── warning alert badge ── */

.alert-warning {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(255,251,235,0.85) 0%, rgba(254,243,199,0.75) 100%);
    border: 1px solid rgba(251,191,36,0.35);
    border-radius: 14px;
    margin-bottom: 16px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow:
        0 2px 8px rgba(245,158,11,0.08),
        inset 0 1px 0 rgba(255,255,255,0.5);
}

.alert-warning-icon {
    width: 34px; height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(251,191,36,0.2) 0%, rgba(245,158,11,0.15) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.alert-warning-icon svg {
    width: 17px; height: 17px;
    color: #d97706;
}

.alert-warning-body {
    flex: 1;
    min-width: 0;
}

.alert-warning-text {
    display: block;
    font-size: 0.84rem;
    font-weight: 500;
    color: #92400e;
    line-height: 1.55;
}

.alert-warning-action {
    margin-top: 10px;
}

.btn-clear-session {
    font-family: 'Anuphan', system-ui, sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 9px;
    border: 1px solid rgba(217,119,6,0.25);
    background: linear-gradient(135deg, rgba(255,255,255,0.75) 0%, rgba(254,249,195,0.5) 100%);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #b45309;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 1px 3px rgba(245,158,11,0.08);
}

.btn-clear-session:hover {
    background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(254,243,199,0.7) 100%);
    border-color: rgba(217,119,6,0.4);
    box-shadow: 0 2px 8px rgba(245,158,11,0.12);
    transform: translateY(-1px);
}

.btn-clear-session:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(245,158,11,0.08);
}

/* ── divider ── */

.login-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.06), transparent);
    margin: 4px 0 16px;
}

/* ── passport recovery link ── */

.passport-link {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 18px;
    background: rgba(248,250,252,0.6);
    border: 1px solid rgba(0,0,0,0.04);
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s ease;
}

.passport-link:hover {
    background: rgba(248,250,252,0.9);
    border-color: rgba(0,0,0,0.08);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.passport-link-icon {
    width: 42px; height: 42px;
    border-radius: 12px;
    background: #eff6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.passport-link-icon svg {
    width: 20px; height: 20px;
    color: #60a5fa;
}

.passport-link-text h4 {
    font-size: 0.88rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 1px;
}

.passport-link-text p {
    font-size: 0.76rem;
    color: #94a3b8;
    font-weight: 400;
}

.passport-link-arrow {
    margin-left: auto;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.passport-link-arrow svg {
    width: 16px; height: 16px;
    color: #cbd5e1;
}

.passport-link:hover .passport-link-arrow {
    transform: translateX(3px);
}

.passport-link:hover .passport-link-arrow svg {
    color: #94a3b8;
}

/* ── footer ── */

.login-footer {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 10;
    text-align: center;
    padding: 14px 20px;
    font-size: 0.76rem;
    color: rgba(100,116,139,0.5);
    font-weight: 400;
    pointer-events: none;
}

/* ── mobile ── */

@media (max-width: 480px) {
    .login-card {
        padding: 32px 24px 24px;
        border-radius: 22px;
    }
    .login-logo img { width: 150px; }
    .login-heading h1 { font-size: 1.3rem; }
}

@media (max-height: 680px) {
    .login-card { padding: 28px 28px 22px; }
    .login-logo { margin-bottom: 18px; }
    .login-logo img { width: 150px; }
    .login-heading { margin-bottom: 20px; }
}
