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

:root {
    --bg: #07070d;
    --bg-2: #0e0e18;
    --card: rgba(18, 18, 30, 0.72);
    --border: rgba(255,255,255,0.08);
    --text: #e6e8ef;
    --muted: #8b90a5;
    --accent: #00f0ff;
    --accent-2: #8b5cf6;
    --danger: #ff4d5e;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-font-smoothing: antialiased;
}

/* ---- Fondo animado ---- */
.bg-orbs {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.5;
    animation: float 18s ease-in-out infinite;
}
.orb-1 { width: 420px; height: 420px; background: #00f0ff; top: -100px; left: -100px; animation-delay: 0s; }
.orb-2 { width: 520px; height: 520px; background: #8b5cf6; bottom: -150px; right: -120px; animation-delay: -6s; }
.orb-3 { width: 320px; height: 320px; background: #ff4d8d; top: 40%; left: 45%; animation-delay: -12s; opacity: 0.25; }

@keyframes float {
    0%, 100% { transform: translate(0,0) scale(1); }
    33% { transform: translate(60px,-50px) scale(1.08); }
    66% { transform: translate(-40px,40px) scale(0.94); }
}

/* ---- Card ---- */
.login-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    padding: 24px;
}

.login-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 44px 38px 32px;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.02) inset,
        0 30px 80px -20px rgba(0,0,0,0.8),
        0 0 100px -30px rgba(0,240,255,0.15);
    animation: cardIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes cardIn {
    from { opacity: 0; transform: translateY(24px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---- Brand ---- */
.brand { text-align: center; margin-bottom: 34px; }
.brand-logo {
    width: 58px; height: 58px;
    margin: 0 auto 16px;
    display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle at 30% 30%, rgba(0,240,255,0.15), rgba(139,92,246,0.1));
    border: 1px solid rgba(0,240,255,0.25);
    border-radius: 16px;
    box-shadow: 0 0 30px -8px rgba(0,240,255,0.4);
}
.brand-logo svg { width: 32px; height: 32px; }

.brand h1 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff 20%, #a0a8c0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.brand h1 span {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-left: 4px;
}
.brand-sub {
    font-size: 12.5px;
    color: var(--muted);
    margin-top: 8px;
    letter-spacing: 0.3px;
}

/* ---- Form ---- */
.login-form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: 0.2px;
    padding-left: 2px;
}
.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.input-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: #6b7188;
    pointer-events: none;
    transition: color 0.2s;
}
.input-wrap input {
    width: 100%;
    background: rgba(10, 10, 20, 0.6);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    padding: 14px 14px 14px 42px;
    color: var(--text);
    font-size: 14.5px;
    font-family: inherit;
    outline: none;
    transition: all 0.2s ease;
}
.input-wrap input::placeholder { color: #4d5266; }
.input-wrap input:focus {
    border-color: rgba(0,240,255,0.55);
    background: rgba(10, 10, 20, 0.9);
    box-shadow: 0 0 0 4px rgba(0,240,255,0.08);
}
.input-wrap input:focus ~ .input-icon,
.input-wrap:focus-within .input-icon { color: var(--accent); }

.toggle-pass {
    position: absolute;
    right: 10px;
    background: transparent;
    border: none;
    padding: 8px;
    color: #6b7188;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: all 0.15s;
}
.toggle-pass:hover { color: var(--accent); background: rgba(0,240,255,0.08); }
.toggle-pass svg { width: 18px; height: 18px; }

/* ---- Botón ---- */
.btn-login {
    position: relative;
    margin-top: 8px;
    padding: 15px 20px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
    color: #06070d;
    font-size: 14.5px;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: 0.3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 8px 24px -8px rgba(0,240,255,0.6);
}
.btn-login:hover { transform: translateY(-1px); box-shadow: 0 12px 30px -8px rgba(0,240,255,0.75); }
.btn-login:active { transform: translateY(0); }
.btn-login:disabled {
    opacity: 0.7;
    cursor: wait;
    transform: none;
}
.btn-arrow {
    width: 18px; height: 18px;
    transition: transform 0.25s;
}
.btn-login:hover .btn-arrow { transform: translateX(4px); }

.btn-login.loading .btn-text::after {
    content: '';
    display: inline-block;
    width: 12px; height: 12px;
    margin-left: 10px;
    border: 2px solid rgba(0,0,0,0.3);
    border-top-color: #06070d;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Error ---- */
.error-msg {
    font-size: 13px;
    color: var(--danger);
    text-align: center;
    min-height: 18px;
    opacity: 0;
    transition: opacity 0.2s;
}
.error-msg.show { opacity: 1; }

/* ---- Footer ---- */
.card-footer {
    margin-top: 26px;
    text-align: center;
    font-size: 11.5px;
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.3px;
}
.dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px #22c55e;
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

@media (max-width: 480px) {
    .login-card { padding: 36px 26px 26px; border-radius: 18px; }
    .brand h1 { font-size: 22px; }
}
