/* ============================================================
   ÖIS Anmälan - Orange/warm theme variant
   ============================================================ */

:root {
    --bg: #f8f9fa;
    --surface: #ffffff;
    --border: #dee2e6;
    --border-light: #e9ecef;
    --text: #212529;
    --text-muted: #6c757d;
    --primary: #ff6b00;
    --primary-hover: #e05e00;
    --success: #198754;
    --danger: #dc3545;
    --radius: 4px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font);
    font-size: 13px;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.5;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.header {
    background: #ffffff;
    border-bottom: 1px solid #dee2e6;
    padding: 0.5rem 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 22px;
    font-weight: 700;
    color: #0635fb;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo img { height: 38px; width: auto; }

.nav { display: flex; align-items: center; gap: 1.2rem; }
.nav-link { color: #a0c4ff; font-size: 15px; text-decoration: none; padding: 0.3rem 0; border-bottom: 2px solid transparent; }
.nav-link:hover { color: #ffffff; text-decoration: none; border-bottom-color: #ffffff; }
.nav-active { color: #ffffff !important; font-weight: 600; border-bottom-color: #ffc107 !important; }
.nav-user { color: #a0c4ff; font-size: 12px; }
.logout-link:hover { color: #ff9999; border-bottom-color: #ff9999; }

/* Main */
.main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    width: 100%;
}

.page { display: flex; flex-direction: column; gap: 0.75rem; }
.page h1 { font-size: 16px; font-weight: 600; }
.page h2 { font-size: 14px; font-weight: 600; margin-bottom: 0.3rem; }
.text-muted { color: var(--text-muted); }

/* Auth */
.auth-container { display: flex; justify-content: center; align-items: center; min-height: 50vh; }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; width: 100%; max-width: 360px; box-shadow: var(--shadow-sm); }
.auth-card h2 { font-size: 16px; margin-bottom: 0.75rem; text-align: center; }

/* Forms */
.form { display: flex; flex-direction: column; gap: 0.6rem; }
.form-group { display: flex; flex-direction: column; gap: 0.15rem; }
.form-group label { font-size: 11px; font-weight: 500; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.form-group input, .form-group select, .form-group textarea {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.4rem 0.6rem;
    font-size: 13px;
    color: var(--text);
    background: var(--surface);
}
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(255,107,0,0.15); }
.form-row { display: flex; gap: 0.75rem; align-items: flex-end; flex-wrap: wrap; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 400;
    cursor: pointer;
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    transition: background 0.15s;
}

.btn:hover { background: var(--bg); text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-full { width: 100%; padding: 0.75rem 1rem; font-size: 14px; }
.btn-sm { padding: 0.25rem 0.6rem; font-size: 11px; }
.btn-xs { padding: 0.2rem 0.5rem; font-size: 11px; }
.btn-back { border-color: #6c757d; color: #6c757d; }
.btn-back:hover { background: #6c757d; color: #fff; }

/* Alerts */
.alert { padding: 0.5rem 0.75rem; border-radius: var(--radius); font-size: 12px; margin-bottom: 0.5rem; }
.alert-error { background: #f8d7da; border: 1px solid #f5c2c7; color: #842029; }
.alert-success { background: #d1e7dd; border: 1px solid #badbcc; color: #0f5132; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.75rem; box-shadow: var(--shadow-sm); }

/* Tables */
.table { width: 100%; border-collapse: collapse; font-size: 12px; }
.table th, .table td { padding: 0.35rem 0.6rem; text-align: left; border-bottom: 1px solid var(--border-light); }
.table th { font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); font-weight: 600; background: var(--bg); }
.table tr:hover td { background: #f1f3f5; }
.table-compact th, .table-compact td { padding: 0.25rem 0.5rem; }

/* Footer */
.footer { text-align: center; padding: 0.75rem 1rem; color: var(--text-muted); font-size: 11px; border-top: 1px solid var(--border); }

@media (max-width: 768px) {
    .header-content { flex-direction: column; align-items: flex-start; gap: 0.3rem; }
    .form-row { flex-direction: column; }
}
