:root {
    --color-primary: #3498db;
    --color-secondary: #f8f9fa;
    --color-accent: #f1c40f;
    --color-light: #ffffff;
    --color-cream: #f5f5dc;
    --color-text: #2c3e50;
    --color-success: #2ecc71;
    --color-warning: #e67e22;
    --color-danger: #e74c3c;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;

    display: flex;
    justify-content: center;
    align-items: center;

    background:
        radial-gradient(circle at 20% 15%, rgba(52, 152, 219, 0.10), transparent 45%),
        radial-gradient(circle at 85% 85%, rgba(241, 196, 15, 0.14), transparent 45%),
        var(--color-cream);
    position: relative;
    overflow: hidden;

    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--color-text);
}

/* --- Fondo: reloj analogico gigante, en tonos de la paleta clara --- */
.bg-decor {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-decor::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(52, 152, 219, 0.10) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: radial-gradient(circle at 50% 40%, black, transparent 75%);
    opacity: 0.6;
}

.clock-face {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(880px, 130vw);
    height: min(880px, 130vw);
    transform: translate(-50%, -50%);
    opacity: 0.16;
    animation: breathe 9s ease-in-out infinite;
}

.clock-face circle {
    fill: none;
}

.clock-ring-outer {
    stroke: var(--color-primary);
    stroke-width: 1;
}

.clock-ring-inner {
    stroke: var(--color-accent);
    stroke-width: 1;
    stroke-dasharray: 2 10;
}

.clock-tick {
    stroke: #b9c2c8;
    stroke-width: 2;
}

.clock-hand {
    stroke-linecap: round;
    transform-origin: 300px 300px;
}

.hand-hour {
    stroke: var(--color-text);
    stroke-width: 6;
}

.hand-min {
    stroke: var(--color-text);
    stroke-width: 4;
    opacity: 0.85;
}

.hand-sec {
    stroke: var(--color-primary);
    stroke-width: 2;
}

@keyframes breathe {

    0%,
    100% {
        opacity: 0.14;
    }

    50% {
        opacity: 0.24;
    }
}

/* --- Tarjeta --- */
.login-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;

    background: var(--color-light);
    padding: 35px;

    border-radius: 12px;

    box-shadow: 0 10px 35px rgba(44, 62, 80, 0.12);
    animation: cardIn 0.6s ease both;
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.eyebrow {
    display: block;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-warning);
    margin-bottom: 14px;
}

.login-card h2 {
    margin-top: 0;
    margin-bottom: 25px;

    color: var(--color-primary);
    text-align: center;

    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 10px;
}

#loginForm {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#loginForm input {
    width: 100%;
    padding: 12px;

    border: 1px solid #ddd;
    border-radius: 6px;

    font-size: 14px;
    background: var(--color-secondary);
    transition: border-color .2s ease, box-shadow .2s ease;
}

#loginForm input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, .15);
}

#loginForm button {
    background: var(--color-primary);
    color: white;

    border: none;
    border-radius: 6px;

    padding: 12px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    cursor: pointer;
    font-weight: bold;

    transition: all .25s ease;
}

#loginForm button:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px -6px rgba(52, 152, 219, .5);
}

#loginForm button:active {
    transform: translateY(0);
}

.logo-area {
    text-align: center;
    margin-bottom: 25px;
}

.logo-icon {
    width: 90px;
    height: 90px;

    margin: 0 auto 15px;

    border-radius: 50%;

    background: linear-gradient(135deg,
            var(--color-primary),
            #2980b9);

    display: flex;
    align-items: center;
    justify-content: center;

    color: white;
    font-size: 40px;

    box-shadow: 0 5px 15px rgba(52, 152, 219, .3);
}

.logo-area h1 {
    margin: 0;
    color: var(--color-primary);
    font-size: 28px;
    border: none;
    padding: 0;
}

.logo-area p {
    color: #7f8c8d;
    margin-top: 8px;
}

.input-group {
    position: relative;
}

.input-group i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #7f8c8d;
}

.input-group input {
    padding-left: 42px !important;
}

/* --- Reloj digital al pie de la tarjeta --- */
.digital-clock {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px dashed #e2e2d2;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.digital-clock .label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #7f8c8d;
}

.digital-clock .time {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 15px;
    font-weight: 600;
    color: var(--color-primary);
    letter-spacing: 0.03em;
}

@media (prefers-reduced-motion: reduce) {

    .clock-face,
    .login-card {
        animation: none !important;
    }
}

@media (max-width: 460px) {
    .login-card {
        padding: 26px 22px;
    }
}