/*
 * KaChing — login, register, password pages
 */

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

html {
    background: #031712;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    background:
        radial-gradient(ellipse 80% 50% at 50% -8%, rgba(61, 220, 132, 0.22), transparent 55%),
        radial-gradient(ellipse 40% 28% at 90% 10%, rgba(245, 197, 24, 0.08), transparent 50%),
        linear-gradient(180deg, #0b4633 0%, #062a1f 46%, #031712 100%);
    background-attachment: fixed;
    color: #fbf4e4;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    -webkit-font-smoothing: antialiased;
}

.auth-container {
    width: 100%;
    max-width: 440px;
}

.auth-logo {
    display: block;
    width: min(280px, 80vw);
    height: auto;
    margin: 0 auto 28px;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.35));
}

.auth-box {
    background: rgba(14, 61, 46, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    padding: 40px 36px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.auth-box h1 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 6px;
    text-align: center;
    color: #fbf4e4;
    letter-spacing: -0.03em;
}

.auth-box h2 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 28px;
    text-align: center;
    color: rgba(255, 255, 255, 0.62);
}

.auth-box form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-box input[type="text"],
.auth-box input[type="email"],
.auth-box input[type="password"] {
    width: 100%;
    padding: 15px 18px;
    background: rgba(3, 23, 18, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    color: #fbf4e4;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.auth-box input:focus {
    outline: none;
    border-color: #3ddc84;
    background: rgba(3, 23, 18, 0.65);
    box-shadow: 0 0 0 3px rgba(61, 220, 132, 0.16);
}

.auth-box input::placeholder {
    color: rgba(255, 255, 255, 0.38);
}

.auth-box button[type="submit"],
.auth-box .btn-primary {
    width: 100%;
    padding: 16px;
    background: #3ddc84;
    color: #031712;
    border: none;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 8px;
    box-shadow: 0 8px 28px rgba(61, 220, 132, 0.28);
}

.auth-box button[type="submit"]:hover,
.auth-box .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(61, 220, 132, 0.4);
}

.auth-box button[type="submit"]:active {
    transform: translateY(0);
}

.auth-box button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.auth-box p {
    text-align: center;
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 14px;
}

.auth-box p a {
    color: #3ddc84;
    text-decoration: none;
    font-weight: 600;
}

.auth-box p a:hover {
    color: #6eefaa;
}

#message {
    margin-top: 20px;
    padding: 16px;
    border-radius: 14px;
    font-size: 14px;
    text-align: center;
    animation: slideIn 0.3s ease;
}

#message.error {
    background: rgba(239, 68, 68, 0.16);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

#message.success {
    background: rgba(61, 220, 132, 0.14);
    border: 1px solid rgba(61, 220, 132, 0.35);
    color: #9ff0c2;
}

#message.info {
    background: rgba(61, 220, 132, 0.1);
    border: 1px solid rgba(61, 220, 132, 0.25);
    color: #fbf4e4;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 0;
}

.auth-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #3ddc84;
}

.auth-checkbox label {
    color: rgba(255, 255, 255, 0.62);
    font-size: 14px;
    cursor: pointer;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(3, 23, 18, 0.25);
    border-radius: 50%;
    border-top-color: #031712;
    animation: spin 0.8s linear infinite;
    vertical-align: -2px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.password-strength {
    margin-top: 8px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    transition: width 0.3s, background-color 0.3s;
}

.password-strength-bar.weak { width: 33%; background: #ef4444; }
.password-strength-bar.medium { width: 66%; background: #f5c518; }
.password-strength-bar.strong { width: 100%; background: #3ddc84; }

@media (max-width: 480px) {
    .auth-box { padding: 28px 22px; }
    .auth-box h1 { font-size: 24px; }
    .auth-box h2 { font-size: 15px; }
}

.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.text-sm { font-size: 14px; }
.text-xs { font-size: 12px; }
.text-muted { color: rgba(255, 255, 255, 0.62); }
.text-primary { color: #3ddc84; }
.text-success { color: #3ddc84; }
.text-error { color: #ef4444; }
.hidden { display: none !important; }
