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

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

:root[data-theme="dark"] {
    --bg-void: #0a0c0f;
    --bg-surface: #151a22;
    --bg-raised: #1c2330;
    --border: rgba(100,140,200,0.12);
    --accent: #4a8eda;
    --accent-glow: rgba(74,142,218,0.18);
    --text-primary: #e8edf5;
    --text-secondary: #8fa4be;
    --text-muted: #4a607a;
    --danger: #e05555;
    --danger-bg: #2e1414;
}
:root[data-theme="light"] {
    --bg-void: #f0f3f8;
    --bg-surface: #ffffff;
    --bg-raised: #f8fafc;
    --border: rgba(60,100,160,0.12);
    --accent: #2468b0;
    --accent-glow: rgba(36,104,176,0.1);
    --text-primary: #0f1f35;
    --text-secondary: #4a6280;
    --text-muted: #8fa0b8;
    --danger: #c03030;
    --danger-bg: #fce8e8;
}

body {
    font-family: 'Raleway', sans-serif;
    background: var(--bg-void);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}

.sigil-icon {
    width: 40px; height: 40px;
    margin: 0 auto 1rem;
    animation: spin-slow 30s linear infinite;
}
.sigil-icon svg { width: 100%; height: 100%; }
@keyframes spin-slow { to { transform: rotate(360deg); } }

h1 {
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    letter-spacing: 0.03em;
}

label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 0.7rem 0.85rem;
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: 'Raleway', sans-serif;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
input[type="text"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.remember-row {
    display: flex;
    align-items: center;
    margin-bottom: 1.25rem;
    gap: 0.5rem;
}
.remember-row input {
    accent-color: var(--accent);
}
.remember-row label {
    margin-bottom: 0;
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.85rem;
}

button {
    width: 100%;
    padding: 0.7rem;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-family: 'Raleway', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.18s, transform 0.18s, box-shadow 0.18s;
}
button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px var(--accent-glow);
}

.error {
    background: var(--danger-bg);
    color: var(--danger);
    padding: 0.7rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    text-align: center;
}

.back-link {
    display: block;
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.85rem;
}
.back-link a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}
.back-link a:hover {
    text-decoration: underline;
    opacity: 0.85;
}
