/* ============================================================ */
/*  Admin Login - Clean Minimal                                  */
/*  โทนสี: #0a2647 / #1a73e8 / #f0f7ff                          */
/* ============================================================ */

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

html, body {
    height: 100%;
    font-family: 'Noto Sans Thai', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f0f7ff;
    color: #1e2a3a;
    -webkit-font-smoothing: antialiased;
}

/* ----- Layout ----- */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    background:
        radial-gradient(circle at 15% 20%, rgba(26, 115, 232, 0.08), transparent 45%),
        radial-gradient(circle at 85% 80%, rgba(10, 38, 71, 0.06), transparent 45%),
        #f0f7ff;
}

/* ----- Card ----- */
.login-card {
    width: 100%;
    max-width: 400px;
    background: #ffffff;
    border-radius: 14px;
    padding: 44px 36px 36px;
    box-shadow:
        0 1px 3px rgba(10, 38, 71, 0.04),
        0 12px 40px rgba(10, 38, 71, 0.08);
    border: 1px solid #e9f0fa;
    animation: cardIn 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ----- Brand ----- */
.login-brand {
    text-align: center;
    margin-bottom: 28px;
}

.login-brand .icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    border-radius: 14px;
    background: linear-gradient(135deg, #1a73e8 0%, #0a2647 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.6rem;
    box-shadow: 0 6px 20px rgba(26, 115, 232, 0.25);
}

.login-brand h1 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0a2647;
    letter-spacing: -0.2px;
    margin-bottom: 6px;
}

.login-brand p {
    font-size: 0.9rem;
    color: #7a9bcb;
    font-weight: 400;
}

/* ----- Alert ----- */
.login-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-bottom: 20px;
    line-height: 1.5;
    animation: shake 0.4s ease;
}

.login-alert i {
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.login-alert.error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.login-alert.success {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25%      { transform: translateX(-4px); }
    75%      { transform: translateX(4px); }
}

/* ----- Form ----- */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #0a2647;
    margin-bottom: 8px;
    letter-spacing: 0.1px;
}

.input-wrap {
    position: relative;
}

.input-wrap > i.field-icon {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    color: #7a9bcb;
    font-size: 0.9rem;
    pointer-events: none;
    transition: color 0.2s;
}

.form-input {
    width: 100%;
    padding: 12px 14px 12px 40px;
    font-size: 0.95rem;
    font-family: inherit;
    color: #1e2a3a;
    background: #f8fbff;
    border: 1.5px solid #e0ebf5;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.form-input::placeholder {
    color: #a8bdd4;
}

.form-input:focus {
    background: #ffffff;
    border-color: #1a73e8;
    box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.12);
}

.form-input:focus + i.field-icon,
.input-wrap:focus-within > i.field-icon {
    color: #1a73e8;
}

/* ----- Toggle password ----- */
.toggle-password {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #7a9bcb;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: color 0.2s, background 0.2s;
}

.toggle-password:hover {
    color: #1a73e8;
    background: rgba(26, 115, 232, 0.08);
}

/* ----- Button ----- */
.btn-login {
    width: 100%;
    padding: 13px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    color: #ffffff;
    background: linear-gradient(135deg, #1a73e8 0%, #0d5bbd 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 6px;
    transition: transform 0.15s, box-shadow 0.25s, filter 0.2s;
    box-shadow: 0 4px 14px rgba(26, 115, 232, 0.3);
    letter-spacing: 0.2px;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(26, 115, 232, 0.4);
    filter: brightness(1.05);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.3);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-login i {
    font-size: 0.9rem;
    transition: transform 0.25s;
}

.btn-login:hover i {
    transform: translateX(3px);
}

/* ----- Footer ----- */
.login-footer {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #eef4fb;
    text-align: center;
    font-size: 0.8rem;
    color: #7a9bcb;
    line-height: 1.6;
}

.login-footer a {
    color: #1a73e8;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.login-footer a:hover {
    color: #0d5bbd;
}

/* ----- Bottom copyright ----- */
.login-copyright {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.78rem;
    color: #a8bdd4;
}

/* ----- Responsive ----- */
@media (max-width: 480px) {
    .login-card {
        padding: 32px 22px 26px;
        border-radius: 12px;
    }
    .login-brand .icon {
        width: 52px;
        height: 52px;
        font-size: 1.4rem;
    }
    .login-brand h1 { font-size: 1.2rem; }
    .login-brand p  { font-size: 0.85rem; }
    .form-input     { font-size: 0.9rem; padding: 11px 12px 11px 38px; }
    .btn-login      { padding: 12px 16px; font-size: 0.9rem; }
}