/* ============================================================
   ÖIS Lön - Light Admin Theme
   ============================================================ */

:root {
    --bg: #f8f9fa; --surface: #ffffff; --border: #dee2e6; --border-light: #e9ecef;
    --text: #212529; --text-muted: #6c757d; --primary: #0d6efd; --primary-hover: #0b5ed7;
    --success: #198754; --danger: #dc3545; --warning: #ffc107; --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 { background: #01144b; border-bottom: none; padding: 0.5rem 1rem; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 4px rgba(0,0,0,0.15); }
.header-content { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 15px; font-weight: 700; color: #ffffff; 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; }
.logout-link:hover { color: #ff9999; border-bottom-color: #ff9999; }

.main { flex: 1; max-width: 1400px; 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; }
.page h3 { font-size: 13px; font-weight: 600; }
.text-muted { color: var(--text-muted); }

.form { display: flex; flex-direction: column; gap: 0.6rem; }
.form-group { display: flex; flex-direction: column; gap: 0.15rem; flex: 1; }
.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(13,110,253,0.15); }
.form-row { display: flex; gap: 0.75rem; align-items: flex-end; flex-wrap: wrap; }

.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-sm { padding: 0.25rem 0.6rem; font-size: 11px; }
.btn-xs { padding: 0.2rem 0.5rem; font-size: 11px; }
.btn-back { border-color: #f0c040; color: #856404; background: #fff9e6; padding: 0.5rem 1rem; font-size: 13px; }
.btn-back:hover { background: #f0c040; color: #fff; }
.btn-toggle { background: transparent; border-color: var(--border); color: var(--text-muted); }
.btn-toggle-on { background: #2c3e50; border-color: #2c3e50; color: #fff; }

.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; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.75rem; box-shadow: var(--shadow-sm); }

.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); white-space: nowrap; }
.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; }

.input-compact { border: 1px solid var(--border); border-radius: var(--radius); padding: 0.25rem 0.4rem; font-size: 12px; color: var(--text); }
.input-compact:focus { outline: none; border-color: var(--primary); }

.status-badge { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 3px; font-size: 10px; font-weight: 600; }
.status-draft { background: #e9ecef; color: #6c757d; }
.status-sent { background: #cfe2ff; color: #084298; }
.status-paid { background: #d1e7dd; color: #0f5132; }

.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; }
}

/* ============================================================
   Stepper - Payroll workflow progress
   ============================================================ */
.stepper {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin: 0.5rem 0 1.5rem;
    padding: 1rem 0.5rem;
    position: relative;
}
.stepper-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
    z-index: 1;
}
/* Connecting line between steps */
.stepper-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 15px;
    left: calc(50% + 16px);
    width: calc(100% - 32px);
    height: 2px;
    background: var(--border);
    z-index: 0;
}
.stepper-step.step-done:not(:last-child)::after {
    background: var(--success);
}
.stepper-step.step-active:not(:last-child)::after {
    background: linear-gradient(to right, var(--primary) 50%, var(--border) 50%);
}
/* Circle */
.stepper-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    border: 2px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    position: relative;
    z-index: 2;
    transition: all 0.2s;
}
.step-done .stepper-circle {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}
.step-active .stepper-circle {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.15);
}
.step-upcoming .stepper-circle {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text-muted);
}
/* Label */
.stepper-label {
    margin-top: 0.4rem;
    font-size: 10px;
    font-weight: 500;
    text-align: center;
    color: var(--text-muted);
    max-width: 80px;
    line-height: 1.3;
}
.step-done .stepper-label {
    color: var(--success);
}
.step-active .stepper-label {
    color: var(--primary);
    font-weight: 600;
}
/* Responsive: smaller on mobile */
@media (max-width: 600px) {
    .stepper { padding: 0.5rem 0; }
    .stepper-circle { width: 26px; height: 26px; font-size: 11px; }
    .stepper-label { font-size: 9px; max-width: 60px; }
    .stepper-step:not(:last-child)::after { top: 12px; left: calc(50% + 13px); width: calc(100% - 26px); }
}
