* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Arial, sans-serif;
    color: #172026;
    background: #f4f7f8;
}
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 28px;
    background: #ffffff;
    border-bottom: 1px solid #d8e1e5;
    position: sticky;
    top: 0;
}
.brand { color: #15242e; text-decoration: none; line-height: 1.2; }
.brand span { display: block; font-size: 12px; color: #58707c; }
nav { display: flex; gap: 10px; flex-wrap: wrap; }
nav a, .btn {
    border: 1px solid #b9c9cf;
    background: #ffffff;
    color: #17313d;
    padding: 9px 12px;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
}
.btn.primary { background: #146c75; color: #ffffff; border-color: #146c75; }
.btn.danger { border-color: #c05f5f; color: #982f2f; }
.page { max-width: 1180px; margin: 0 auto; padding: 28px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.card {
    background: #ffffff;
    border: 1px solid #d8e1e5;
    border-radius: 8px;
    padding: 16px;
}
.stat { font-size: 32px; font-weight: 700; margin-top: 8px; }
h1, h2, h3 { margin: 0 0 16px; }
form { display: grid; gap: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
label { display: grid; gap: 6px; font-weight: 600; }
input, select, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #b9c9cf;
    border-radius: 6px;
    font: inherit;
    background: #ffffff;
}
textarea { min-height: 86px; resize: vertical; }
table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border: 1px solid #d8e1e5;
}
th, td { padding: 11px; border-bottom: 1px solid #e3eaed; text-align: left; vertical-align: top; }
th { background: #eef3f5; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pill { padding: 4px 8px; border-radius: 999px; font-size: 12px; background: #e8eef1; }
.pill.confirmed, .pill.present, .pill.paid { background: #d9f1e2; color: #17643b; }
.pill.pending, .pill.partial { background: #fff2c5; color: #7a5700; }
.pill.absent, .pill.unpaid { background: #ffe0df; color: #8c2d28; }
.pill.leave { background: #dfeaff; color: #254f96; }
.notice { padding: 12px; border-radius: 6px; background: #e7f5f7; margin-bottom: 16px; }
.danger-note { background: #ffe0df; color: #8c2d28; }
.login-panel { max-width: 420px; margin: 40px auto; }
.checks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    margin: 8px 0;
}
.checks label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}
.checks input { width: auto; }
.password-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.password-row input { min-width: 0; }
.report-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
@media print {
    .topbar, .btn, form { display: none !important; }
    body { background: #ffffff; }
    .page { max-width: none; padding: 0; }
}
@media (max-width: 760px) {
    .topbar { align-items: flex-start; flex-direction: column; padding: 14px; }
    .page { padding: 16px; }
    nav { width: 100%; }
    nav a, .btn { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; }
    .form-grid { grid-template-columns: 1fr; }
    .grid { grid-template-columns: 1fr; }
    .stat { font-size: 26px; }
    table { display: block; overflow-x: auto; }
    th, td { min-width: 120px; }
    .password-row { grid-template-columns: 1fr; }
}
