/* ===============================
   Auth Pages – Shared SaaS Style
   =============================== */

/* ---------- Variables ---------- */
:root {
    --auth-card-bg: rgba(255, 255, 255, 0.05);
    --auth-card-border: rgba(255, 255, 255, 0.1);
    --auth-input-bg: rgba(255, 255, 255, 0.03);
    --auth-input-border: rgba(255, 255, 255, 0.15);
    --auth-input-focus-border: var(--brand, #22d3aa);
    --auth-input-focus-shadow: 0 0 0 3px rgba(34, 211, 166, 0.2);
    --auth-placeholder: rgba(255, 255, 255, 0.4);
    --auth-text-secondary: rgba(255, 255, 255, 0.6);
    --auth-error-bg: rgba(239, 68, 68, 0.1);
    --auth-error-border: rgba(239, 68, 68, 0.3);
    --auth-error-text: #ff6b6b;
    --auth-success-bg: rgba(34, 197, 94, 0.1);
    --auth-success-border: rgba(34, 197, 94, 0.3);
    --auth-success-text: #4ade80;
    --auth-divider-color: rgba(255, 255, 255, 0.1);
}

/* ---------- Layout ---------- */
body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    font-family: "Inter", system-ui, sans-serif;
    background: #0a0f1a;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 240, 255, 0.15), transparent 55%),
        radial-gradient(ellipse 60% 40% at 100% 60%, rgba(14, 165, 233, 0.1), transparent 50%),
        linear-gradient(180deg, #0a0f1a 0%, #020617 100%);
}

.auth-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
    box-sizing: border-box;
}

/* ---------- Card ---------- */
.auth-card {
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(0, 240, 255, 0.22);
    border-radius: 28px;
    padding: 40px 30px;
    backdrop-filter: saturate(180%) blur(28px);
    -webkit-backdrop-filter: saturate(180%) blur(28px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 24px 56px rgba(0, 0, 0, 0.45),
        0 0 60px rgba(0, 240, 255, 0.08);
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.45s ease;
}

.auth-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        0 32px 64px rgba(0, 0, 0, 0.5),
        0 0 80px rgba(0, 240, 255, 0.15);
}

.auth-card h1 {
    text-align: center;
    margin: 0 0 8px;
    font-size: 32px;
    font-weight: 600;
    background: linear-gradient(145deg, var(--brand, #22d3aa), var(--brand2, #0e9f6e));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-card p {
    text-align: center;
    color: var(--auth-text-secondary);
    margin: 0 0 32px;
    font-size: 15px;
}

/* ---------- Logo ---------- */
.logo-center {
    text-align: center;
    margin-bottom: 32px;
}

.logo-center img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text, #ffffff);
    letter-spacing: 0.3px;
}

.form-group input {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--auth-input-border);
    border-radius: 14px;
    background: var(--auth-input-bg);
    color: var(--text, #ffffff);
    font-size: 15px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: var(--auth-input-focus-border);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: var(--auth-input-focus-shadow);
}

.form-group input::placeholder {
    color: var(--auth-placeholder);
}

.password-hint {
    font-size: 12px;
    color: var(--auth-text-secondary);
    margin-top: 6px;
    padding-left: 4px;
}

/* ---------- Buttons ---------- */
.btn-login,
.btn-reset,
.btn-signup {
    width: 100%;
    padding: 16px 22px;
    background: linear-gradient(165deg, #22d3ee 0%, #0ea5e9 45%, #0369a1 100%);
    border: 1px solid rgba(0, 240, 255, 0.35);
    border-radius: 999px;
    color: #f8fafc;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.2),
        0 8px 28px rgba(0, 240, 255, 0.35);
    margin-top: 8px;
}

.btn-login:hover,
.btn-reset:hover,
.btn-signup:hover {
    transform: scale(1.03) translateY(-2px);
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.28),
        0 12px 40px rgba(0, 240, 255, 0.45);
}

.btn-login:active,
.btn-reset:active,
.btn-signup:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px -4px rgba(34, 211, 166, 0.4);
}

.btn-login:disabled,
.btn-reset:disabled,
.btn-signup:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ---------- Forgot Password Link ---------- */
.forgot-password {
    text-align: right;
    margin-bottom: 24px;
}

.forgot-password a {
    font-size: 13px;
    color: var(--brand, #22d3aa);
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-password a:hover {
    color: var(--brand2, #0e9f6e);
    text-decoration: underline;
}

/* ---------- Divider ---------- */
.auth-divider {
    text-align: center;
    margin: 28px 0 18px;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--auth-divider-color);
}

.auth-divider span {
    background: var(--bg, #0a0f0e);
    padding: 0 16px;
    position: relative;
    font-size: 13px;
    color: var(--auth-text-secondary);
}

/* ---------- Footer ---------- */
.auth-footer {
    text-align: center;
    margin-top: 24px;
}

.auth-footer p {
    margin: 0;
    font-size: 14px;
    color: var(--auth-text-secondary);
}

.auth-footer a {
    color: var(--brand, #22d3aa);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.auth-footer a:hover {
    color: var(--brand2, #0e9f6e);
    text-decoration: underline;
}

/* ---------- Messages (Error / Success) ---------- */
.error-message,
.message {
    display: none;
    padding: 14px 18px;
    margin-bottom: 20px;
    border-radius: 14px;
    font-size: 14px;
    text-align: center;
    animation: slideDown 0.3s ease;
}

.error-message.show,
.message.show {
    display: block;
}

.error-message {
    background: var(--auth-error-bg);
    border: 1px solid var(--auth-error-border);
    color: var(--auth-error-text);
}

.message.success {
    background: var(--auth-success-bg);
    border: 1px solid var(--auth-success-border);
    color: var(--auth-success-text);
}

.message.error {
    background: var(--auth-error-bg);
    border: 1px solid var(--auth-error-border);
    color: var(--auth-error-text);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
