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

:root {
    --gray-900: #0f172a;
    --gray-800: #1e293b;
    --gray-700: #334155;
    --gray-600: #64748b;
    --gray-400: #94a3b8;
    --gray-200: #e2e8f0;
    --gray-100: #f8fafc;
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --blue-light: #3b82f6;
    --line: #cbd5e1;
    --red: #ef4444;
    --red-bg: #fef2f2;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    min-height: 100vh;
    color: var(--gray-900);
    background: #0b0f19;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    -webkit-font-smoothing: antialiased;
}

/* Fondo de alta tecnologia con gradientes radiales discretos */
.bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: 
        radial-gradient(circle at 20% 15%, rgba(37, 99, 235, 0.16) 0%, transparent 45%),
        radial-gradient(circle at 80% 85%, rgba(14, 165, 233, 0.12) 0%, transparent 50%),
        #0b0f19;
}

.login-wrap {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
}

.login-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 40px 36px 32px;
    box-shadow: 
        0 24px 48px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.12);
}

.brand-zone {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    object-fit: contain;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--gray-900);
    line-height: 1.2;
}

.brand-badge {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--blue);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.welcome {
    margin-bottom: 28px;
}

.welcome h1 {
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--gray-900);
    line-height: 1.2;
}

.welcome p {
    margin-top: 6px;
    font-size: 0.88rem;
    color: var(--gray-600);
    line-height: 1.4;
}

.field {
    margin-bottom: 20px;
}

.label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.control {
    position: relative;
}

.control input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    font-size: 0.95rem;
    color: var(--gray-900);
    background: #f8fafc;
    border: 1.5px solid var(--gray-200);
    border-radius: 10px;
    outline: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.control input:focus {
    background: #ffffff;
    border-color: #0f172a;
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}

.control input::placeholder {
    color: var(--gray-400);
}

.control .icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--gray-400);
    pointer-events: none;
    transition: color 0.2s;
}

.control input:focus ~ .icon {
    color: #0f172a;
}

.control .toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.control .toggle:hover {
    color: var(--gray-700);
}

.control .toggle .icon-eye {
    width: 18px;
    height: 18px;
}

.btn-login {
    width: 100%;
    padding: 13px;
    margin-top: 10px;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #ffffff;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-login:hover {
    background: #000000;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.btn-login:active {
    transform: translateY(0);
}

.error-box {
    margin-bottom: 20px;
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--red-bg);
    border: 1px solid #fecaca;
    color: var(--red);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.error-box .icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.login-foot {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid var(--gray-200);
    text-align: center;
    font-size: 0.76rem;
    color: var(--gray-600);
}

@media (max-width: 480px) {
    body { padding: 16px; }
    .login-card { padding: 32px 24px 24px; border-radius: 16px; }
    .welcome h1 { font-size: 1.35rem; }
}