﻿/* ============================================
   LOGIN — Arraial Capim Dourado 2027
   Design: Glassmorphism + Dark Luxury
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

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

/* ── BACKGROUND ─────────────────────────────── */
html, body {
    width: 100%; height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
    background:
        linear-gradient(135deg, rgba(0,0,0,0.65) 0%, rgba(5,20,50,0.75) 100%),
        url("../images/backgrounds/FundoCapimDourado.png") center center / cover no-repeat fixed;
    padding: 1.5rem;
    overflow-x: hidden;
}

/* ── PARTICLES / SHIMMER OVERLAY ─────────────── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 40% at 20% 30%, rgba(255,193,7,0.08) 0%, transparent 60%),
        radial-gradient(ellipse 50% 50% at 80% 70%, rgba(255,140,0,0.06) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* ── LOGIN CARD ──────────────────────────────── */
.login-card {
    position: relative;
    z-index: 1;
    background: rgba(6, 18, 48, 0.88);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    padding: 2.75rem 2.5rem 2.25rem;
    border-radius: 24px;
    width: 100%;
    max-width: 440px;
    color: #e8eaf0;
    border: 1px solid rgba(255,193,7,0.18);
    box-shadow:
        0 2px 0 rgba(255,193,7,0.3) inset,
        0 32px 80px rgba(0,0,0,0.6),
        0 0 0 1px rgba(255,255,255,0.04);
    animation: cardEntrance 0.6s cubic-bezier(0.16,1,0.3,1) both;
}

@keyframes cardEntrance {
    from { opacity: 0; transform: translateY(28px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)     scale(1);    }
}

/* ── LOGO ────────────────────────────────────── */
.logo-topo {
    height: 54px;
    filter: drop-shadow(0 4px 16px rgba(255,193,7,0.45));
    transition: transform 0.3s ease;
}

.logo-topo:hover { transform: scale(1.04); }

/* ── TITULO ──────────────────────────────────── */
.login-title {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #ffc107;
    text-shadow: 0 2px 12px rgba(255,193,7,0.3);
    margin-bottom: 0.25rem;
}

.login-subtitle {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.4);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

/* ── DIVIDER LINE ────────────────────────────── */
.gold-divider {
    width: 48px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ffc107, transparent);
    margin: 0.5rem auto 1.75rem;
    border-radius: 2px;
}

/* ── FORM LABELS ─────────────────────────────── */
.form-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
    margin-bottom: 0.4rem;
}

/* ── INPUTS ──────────────────────────────────── */
.form-control, .form-select {
    background: rgba(255,255,255,0.05) !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    color: #fff !important;
    border-radius: 12px !important;
    padding: 0.7rem 0.9rem !important;
    font-size: 0.92rem;
    transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

.form-control::placeholder { color: rgba(255,255,255,0.3) !important; }

.form-control:focus, .form-select:focus {
    background: rgba(255,193,7,0.07) !important;
    border-color: rgba(255,193,7,0.55) !important;
    box-shadow: 0 0 0 3px rgba(255,193,7,0.15) !important;
    outline: none;
}

.form-select option { background: #0d1b3e; color: #fff; }

/* ── INPUT GROUP ─────────────────────────────── */
.input-group-text {
    background: rgba(255,255,255,0.05) !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    border-right: none !important;
    color: #ffc107 !important;
    border-radius: 12px 0 0 12px !important;
    font-size: 1rem;
}

.input-group .form-control {
    border-left: none !important;
    border-radius: 0 12px 12px 0 !important;
}

.input-group .form-control:focus {
    border-left: none !important;
}

/* eye toggle */
.btn-eye {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    border-left: none;
    color: rgba(255,255,255,0.4);
    border-radius: 0 12px 12px 0;
    padding: 0 0.9rem;
    cursor: pointer;
    transition: color 0.2s;
}
.btn-eye:hover { color: #ffc107; }

/* ── FORGOT PASSWORD ─────────────────────────── */
.forgot-link {
    font-size: 0.78rem;
    color: rgba(255,193,7,0.75);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}
.forgot-link:hover { color: #ffc107; text-decoration: underline; }

/* ── BUTTONS ─────────────────────────────────── */
.btn-login {
    background: linear-gradient(135deg, #ffc107 0%, #ff8f00 100%);
    border: none;
    color: #0d1b3e;
    font-weight: 800;
    font-size: 0.92rem;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    padding: 0.8rem;
    border-radius: 12px;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(255,193,7,0.35);
    cursor: pointer;
}
.btn-login:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(255,193,7,0.5);
    background: linear-gradient(135deg, #ffd740 0%, #ffa000 100%);
}
.btn-login:active:not(:disabled) { transform: translateY(0); }
.btn-login:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-cadastro {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.65);
    font-size: 0.84rem;
    font-weight: 500;
    padding: 0.72rem;
    border-radius: 12px;
    width: 100%;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
}
.btn-cadastro:hover {
    background: rgba(255,193,7,0.1);
    border-color: rgba(255,193,7,0.3);
    color: #ffc107;
}
.btn-cadastro strong { color: #ffc107; font-weight: 700; }

/* ── FEEDBACK MESSAGES ───────────────────────── */
#message, #registerMessage, #forgotMessage {
    min-height: 20px;
    font-size: 0.84rem;
    font-weight: 500;
    border-radius: 8px;
    padding: 0 0.25rem;
    transition: all 0.3s;
}

/* ── PASSWORD RULES ──────────────────────────── */
.pw-rules {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 0.9rem 1rem;
}
.pw-rules .rule-title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: #ffc107;
    margin-bottom: 0.5rem;
}
.pw-rules li {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    list-style: none;
    padding: 0.1rem 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.2s;
}
.pw-rules li.ok { color: #4caf50; }
.pw-rules li.ok .rule-icon::before { content: '✓'; color: #4caf50; }
.pw-rules li:not(.ok) .rule-icon::before { content: '○'; color: rgba(255,255,255,0.3); }

/* ── MODAL ───────────────────────────────────── */
.modal-dark {
    background: rgba(5, 15, 42, 0.97);
    backdrop-filter: blur(24px);
    color: #fff;
    border-radius: 20px;
    border: 1px solid rgba(255,193,7,0.2);
    box-shadow: 0 40px 100px rgba(0,0,0,0.7);
}

.modal-header {
    border-bottom: 1px solid rgba(255,193,7,0.15) !important;
    padding: 1.5rem 1.75rem 1.25rem;
}
.modal-header .modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.3px;
}
.modal-body { padding: 1.75rem !important; }
.modal-footer {
    border-top: 1px solid rgba(255,193,7,0.15) !important;
    padding: 1.25rem 1.75rem !important;
    display: flex;
    align-items: center;
}
.modal-footer .footer-logo {
    height: 36px;
    margin-right: auto;
    filter: drop-shadow(0 2px 8px rgba(255,193,7,0.3));
}

.btn-close-custom {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    color: rgba(255,255,255,0.6);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
    flex-shrink: 0;
}
.btn-close-custom:hover { background: rgba(255,80,80,0.2); color: #ff6b6b; border-color: rgba(255,80,80,0.3); }

/* Modal confirm button */
.btn-confirm {
    background: linear-gradient(135deg, #ffc107 0%, #ff8f00 100%);
    border: none;
    color: #0d1b3e;
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 0.65rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 16px rgba(255,193,7,0.3);
}
.btn-confirm:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(255,193,7,0.45);
}
.btn-confirm:disabled { background: #4a5568; color: rgba(255,255,255,0.4); box-shadow: none; cursor: not-allowed; }

.btn-cancel {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.18);
    color: rgba(255,255,255,0.55);
    font-size: 0.85rem;
    padding: 0.65rem 1.25rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-cancel:hover { border-color: rgba(255,255,255,0.35); color: #fff; }

/* ── SPINNER ─────────────────────────────────── */
.btn-spinner {
    display: none;
    width: 16px; height: 16px;
    border: 2px solid rgba(0,0,0,0.3);
    border-top-color: #0d1b3e;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── FOOTER BRAND BADGE ──────────────────────── */
.brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.3);
    margin-top: 1.5rem;
    letter-spacing: 0.5px;
}
.brand-badge img { height: 18px; opacity: 0.5; }

/* ── RESPONSIVE ──────────────────────────────── */
@media (max-width: 480px) {
    .login-card { padding: 2rem 1.5rem 1.75rem; border-radius: 20px; }
    .modal-body { padding: 1.25rem !important; }
}
