:root {
    --blue: #0082c9;
    --error: #e9322d;
}

/* THEMES */
body.dark {
    --bg: linear-gradient(180deg, #0b3c5d, #082c45);
    --panel: rgba(0,0,0,0.35);
    --text: #fff;
    --input-bg: #fff;
}

body.light {
    --bg: #f4f6f8;
    --panel: #ffffff;
    --text: #000;
    --input-bg: #f0f0f0;
}

* {
    box-sizing: border-box;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, sans-serif;
}

body {
    margin: 0;
    height: 100vh;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
}


/* LOADER */
.loader {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    margin: 0 auto 10px;
    animation: spin 0.9s linear infinite;
}

body.light .loader {
    border: 3px solid rgba(0,0,0,0.2);
    border-top-color: #000;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


/* SHAKE */
@keyframes shake {
    0% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
    100% { transform: translateX(0); }
}

.shake {
    animation: shake 0.35s;
}

.login-container {
    width: 360px;
    background: var(--panel);
    padding: 32px;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,.4);
    text-align: center;
    position: relative;
}

.top-controls {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 13px;
    opacity: 0.8;
}

.top-controls span {
    cursor: pointer;
    margin-left: 8px;
}

.logo svg {
    width: 64px;
    height: 64px;
    fill: currentColor;
    margin-bottom: 16px;
}

h1 {
    font-size: 22px;
    font-weight: 400;
    margin-bottom: 18px;
}

input {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 12px;
    border-radius: 4px;
    border: 1px solid transparent;
    font-size: 14px;
    background: var(--input-bg);
}

input.error {
    border-color: var(--error);
    background: #ffecec;
}

button {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 4px;
    background: var(--blue);
    color: #fff;
    font-size: 15px;
    cursor: pointer;
}

button:disabled {
    opacity: 0.7;
    cursor: default;
}

.status {
    display: none;
    font-size: 13px;
    margin-bottom: 10px;
}

.error-box {
    display: none;
    background: var(--error);
    color: #fff;
    padding: 8px 10px;
    border-radius: 4px;
    font-size: 13px;
    margin-bottom: 12px;
    text-align: left;
}

.links {
    margin-top: 14px;
    font-size: 13px;
    opacity: 0.8;
}

.links a {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

/* MODAL */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #fff;
    color: #000;
    padding: 24px;
    border-radius: 8px;
    width: 320px;
    text-align: center;
}

.modal-content h2 {
    font-size: 18px;
    margin-bottom: 10px;
}

.modal-content p {
    font-size: 14px;
    margin-bottom: 16px;
}

.modal-content button {
    background: var(--blue);
} 
