:root {
    color-scheme: light dark;
    --bg: #0f1115;
    --card: #1a1d24;
    --text: #e8e9ec;
    --muted: #9aa0ac;
    --accent: #4f8cff;
    --danger: #ff5f56;
    --border: #2a2e37;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.login-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    width: 100%;
    max-width: 340px;
    text-align: center;
}

h1 {
    margin: 0 0 0.25rem;
    font-size: 1.4rem;
}

.subtitle {
    color: var(--muted);
    margin: 0 0 1.5rem;
    font-size: 0.9rem;
}

form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: left;
}

label {
    font-size: 0.85rem;
    color: var(--muted);
}

input[type="password"] {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    font-size: 1rem;
}

button {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.65rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 0.25rem;
}

button:hover { filter: brightness(1.1); }

.alert {
    background: rgba(255, 95, 86, 0.15);
    color: var(--danger);
    border: 1px solid rgba(255, 95, 86, 0.4);
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin: 0 0 1rem;
}

.hint {
    color: var(--muted);
    font-size: 0.8rem;
    margin-top: 0.75rem;
}

.dashboard {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logout-link {
    color: var(--muted);
    font-size: 0.85rem;
    text-decoration: none;
}

.logout-link:hover { color: var(--text); }

.module-section {
    margin-top: 2rem;
}

.module-section:first-of-type {
    margin-top: 1.5rem;
}

.section-title {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.module-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.75rem;
}

.module-item {
    display: flex;
}

.module-link {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    width: 100%;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.9rem 1rem;
    text-decoration: none;
    transition: border-color 0.15s, transform 0.15s;
}

.module-link:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.module-icon {
    flex: none;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 10px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.module-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.module-name {
    color: var(--text);
    font-weight: 600;
}

.module-description {
    margin-top: 0.15rem;
    color: var(--muted);
    font-size: 0.8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
