* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f4f6f8;
    color: #222;
}
a { color: #0f4aa3; text-decoration: none; }
a:hover { text-decoration: underline; }
.container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 16px;
}
.container.small { max-width: 460px; }
.container.wide { max-width: 1280px; }
h1, h2 { margin-top: 0; }
.muted { color: #666; }
.card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 20px;
    margin: 18px 0;
}
label {
    display: block;
    font-weight: bold;
    margin: 12px 0 6px;
}
input, select, button {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border-radius: 8px;
    border: 1px solid #bbb;
}
button {
    cursor: pointer;
    background: #111827;
    color: #fff;
    border: none;
}
button.secondary { background: #4b5563; }
.button-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 18px;
}
.alert {
    padding: 12px 14px;
    border-radius: 8px;
    margin: 14px 0;
}
.alert.success { background: #e8f7ea; color: #165c24; }
.alert.error { background: #fdecec; color: #8b1e1e; }
.footer-links, .topbar-links { margin-top: 14px; }
.topbar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    flex-wrap: wrap;
}
.topbar-links {
    display: flex;
    gap: 16px;
    align-items: center;
}
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
.stat-card { margin: 0; }
.stat-value {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 6px;
}
.stack-form label:first-of-type { margin-top: 0; }
.filters {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    align-items: end;
}
.filters.compact { grid-template-columns: repeat(4, 1fr); }
.filter-button { display: flex; align-items: end; }
.table-wrap { overflow-x: auto; }
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}
th { background: #f9fafb; }
.employee-edit-form {
    display: contents;
}
.checkbox-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    margin: 0;
}
.checkbox-inline input {
    width: auto;
    padding: 0;
    margin: 0;
}
.filters-panel { margin: 18px 0; }
@media (max-width: 900px) {
    .grid-2,
    .stats-grid,
    .filters,
    .filters.compact {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 700px) {
    .button-row { grid-template-columns: 1fr; }
}

.button-row-2x2 { grid-template-columns: 1fr 1fr; }
.ghost { margin-top: 12px; background: #e5e7eb; color: #111827; }
.wrap-links { flex-wrap: wrap; }
.stats-grid-4 { grid-template-columns: repeat(4, 1fr); }
.filters-4 { grid-template-columns: repeat(4, 1fr); }
.narrow-actions { grid-template-columns: 1fr 1fr; max-width: 380px; }
.button-like { display: inline-flex; justify-content: center; align-items: center; padding: 12px; border-radius: 8px; text-decoration: none; }
.secondary-link { background: #e5e7eb; color: #111827; }
details summary { cursor: pointer; font-weight: bold; }
.edit-box { margin-top: 12px; min-width: 320px; }
.inline-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.compact-form label { margin-top: 10px; }
.break-list { margin-top: 14px; }
.break-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; border: 1px solid #e5e7eb; border-radius: 8px; padding: 10px; margin-top: 8px; }
.break-row span { font-size: 14px; }
.danger { background: #991b1b; width: auto; }
.top-divider { border-top: 1px solid #e5e7eb; padding-top: 12px; margin-top: 12px; }
@media (max-width: 900px) {
  .stats-grid-4 { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .inline-fields, .narrow-actions, .button-row-2x2 { grid-template-columns: 1fr; }
  .break-row { flex-direction: column; align-items: stretch; }
}
