:root {
    --primary: #1e3a5f;
    --primary-hover: #2a4f7a;
    --bg: #f4f6f9;
    --card: #fff;
    --text: #1a1a2e;
    --muted: #5c6370;
    --error: #b42318;
    --error-bg: #fef3f2;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

.container { max-width: 720px; margin: 0 auto; padding: 1rem; }

.app-header {
    background: var(--primary);
    color: #fff;
    /*padding: 0.75rem 0;*/
}

.app-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand { color: #fff; text-decoration: none; font-weight: 600; }

.card {
    background: var(--card);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

.auth-card { max-width: 400px; margin: 2rem auto; }

.page-header h1 { margin-bottom: 0.25rem; }
.subtitle { color: var(--muted); margin-top: 0; }

.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.25rem; font-weight: 500; }
.form-control {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: #e8ecf1; color: var(--text); }
.btn-link { background: none; color: var(--primary); padding: 0; border: none; cursor: pointer; }
.btn-header {
    background: rgba(255,255,255,0.15);
    color: #fff;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.4);
}
.btn-header:hover { background: rgba(255,255,255,0.25); color: #fff; }

.btn-signout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
}

.page-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}
.page-header-row h1 { margin-top: 0; }

.form-check { display: flex; align-items: center; gap: 0.5rem; }
.form-check-input { width: auto; }
.form-check-label { margin: 0; font-weight: normal; }

.hint { color: var(--muted); font-size: 0.9rem; }
.hidden { display: none; }

.alert-error {
    background: var(--error-bg);
    color: var(--error);
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

/* ── Profile card ── */
.profile-card {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
    flex-shrink: 0;
    text-transform: uppercase;
}

.profile-info { min-width: 0; }

.profile-name {
    margin: 0 0 0.25rem;
    font-size: 1.15rem;
    line-height: 1.2;
}

.profile-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
}

.profile-detail {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.profile-detail svg { flex-shrink: 0; opacity: 0.65; }

/* ── Notification card ── */
.notification-card { padding: 1rem 1.25rem; }

.notification-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.notification-title {
    margin: 0 0 0.15rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.notification-title svg { opacity: 0.7; }

/* ── Payslip table ── */
.section-title { margin: 0 0 0.75rem; font-size: 1.05rem; }

table { width: 100%; border-collapse: collapse; }

th, td {
    text-align: left;
    padding: 0.65rem 0.5rem;
    border-bottom: 1px solid #eee;
}

th {
    font-size: 0.8rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 600;
}

tbody tr {
    transition: background 0.15s ease;
}

tbody tr:hover {
    background: #f0f4fa;
}

.row-num {
    color: var(--muted);
    font-size: 0.85rem;
    width: 2rem;
}

.period-label { font-weight: 500; }

.actions-col { text-align: right; white-space: nowrap; }

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    color: var(--primary);
    transition: background 0.15s ease, color 0.15s ease;
    text-decoration: none;
}

.icon-btn:hover {
    background: var(--primary);
    color: #fff;
}

.icon-btn + .icon-btn { margin-left: 0.25rem; }
