:root {
  color-scheme: light;
  --bg: #f7f7f4;
  --panel: #ffffff;
  --ink: #000000;
  --muted: #575757;
  --line: #e0e0dc;
  --brand-dark: #000000;
  --brand-ink: #ffffff;
  --accent: #ffdd17;
  --accent-2: #000000;
  --danger: #b42318;
  --success: #17663a;
  --soft: #fff8bc;
  --soft-panel: #fbfbf8;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Unbounded", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

.form-grid {
  display: grid;
  gap: 10px;
}

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-label input {
  width: 18px;
  min-height: 18px;
}

button {
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease, background-color 0.15s ease;
}

button:hover {
  filter: brightness(1.04);
}

button:active {
  transform: translateY(1px);
}

.shell-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-self: start;
  min-height: 100vh;
  padding: 22px;
  background: var(--brand-dark);
  color: var(--brand-ink);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: block;
  width: 62px;
  height: 54px;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.08;
}

.brand strong {
  font-size: 20px;
  font-weight: 900;
  text-transform: uppercase;
}

.brand small {
  margin-top: 4px;
  color: #d7d7d7;
  font-size: 11px;
  font-weight: 700;
}

.app-nav {
  display: grid;
  gap: 8px;
}

.nav-button,
.text-button {
  border: 0;
}

.nav-button {
  min-height: 42px;
  border-radius: 8px;
  padding: 8px 11px;
  background: rgba(255, 255, 255, 0.11);
  color: var(--brand-ink);
  font-weight: 800;
  text-align: left;
}

.nav-button.active {
  background: var(--accent);
  color: #000;
}

.user-pill {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: #d7d7d7;
  font-size: 13px;
  font-weight: 700;
}

.text-button {
  min-height: 38px;
  border-radius: 8px;
  padding: 8px 11px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-weight: 800;
}

.app-shell {
  position: relative;
  display: grid;
  gap: 18px;
  min-width: 0;
  padding: 26px;
  align-content: start;
  overflow: hidden;
}

.app-shell::before {
  content: "";
  position: fixed;
  right: -110px;
  top: 92px;
  width: 340px;
  height: 230px;
  background: var(--accent);
  border-radius: 58% 42% 52% 48%;
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
}

.app-shell::after {
  content: "";
  position: fixed;
  right: 36px;
  top: 370px;
  width: 96px;
  height: 96px;
  background-image: radial-gradient(#000 3px, transparent 4px);
  background-size: 24px 24px;
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
}

.app-shell > * {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.login-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 24px;
  align-items: stretch;
  padding: 28px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--accent);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.login-panel.hidden {
  display: none;
}

.login-copy {
  align-self: center;
}

.login-copy h1 {
  max-width: 720px;
  margin: 0 0 12px;
  font-size: clamp(2.2rem, 5vw, 4.7rem);
  line-height: 0.96;
  font-weight: 900;
  text-transform: uppercase;
}

.login-copy p:not(.eyebrow) {
  max-width: 620px;
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.login-card {
  display: grid;
  gap: 14px;
  align-content: center;
  padding: 20px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: #fff;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.login-panel .eyebrow,
.clock-hero .eyebrow {
  width: fit-content;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--accent);
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(25px, 3vw, 42px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h2 {
  margin-bottom: 0;
  font-size: 18px;
  font-weight: 900;
}

.clock-hero,
.admin-toolbar,
.panel,
.metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.clock-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 340px);
  gap: 28px;
  align-items: center;
  min-height: 260px;
  padding: clamp(24px, 5vw, 48px);
  border-top: 4px solid var(--accent);
}

.employee-notifications {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #e6c94f;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: #fffbe3;
}

.shortage-notice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 18px;
  align-items: end;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #e8a19a;
  border-left: 4px solid var(--danger);
  border-radius: 8px;
  background: #fff0ed;
}

.shortage-notice h2 {
  margin-bottom: 8px;
}

.shortage-notice p:not(.eyebrow):not(.form-message) {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.shortage-actions {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.shortage-actions label {
  margin: 0;
}

.shortage-notice .form-message {
  grid-column: 1 / -1;
  margin: 0;
}

.notification-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.notification-item p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.clock-copy p:last-child {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.clock-actions {
  display: grid;
  gap: 12px;
}

.clock-button,
.pause-button,
.primary-button,
.secondary-button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 8px 11px;
  font-weight: 900;
}

.clock-button,
.primary-button {
  background: var(--accent);
  color: #000;
}

.clock-button.stop {
  background: var(--danger);
  color: #ffffff;
}

.pause-button,
.secondary-button {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
}

.pause-button:disabled {
  color: #a5a5a0;
  cursor: not-allowed;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.metric {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 18px;
  border-top: 4px solid var(--accent);
}

.metric:nth-child(2),
.metric:nth-child(4) {
  border-top-color: var(--accent-2);
}

.metric span {
  display: block;
  min-height: 22px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.metric strong {
  display: block;
  color: var(--ink);
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.metric.alert strong {
  color: var(--danger);
}

.personal-leave-overview {
  margin-bottom: 18px;
}

.leave-balance-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 10px;
}

.leave-balance-card {
  display: grid;
  gap: 8px;
  min-height: 92px;
  align-content: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: var(--soft-panel);
}

.leave-balance-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.leave-balance-card strong {
  font-size: 18px;
  font-weight: 900;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 18px;
  margin-top: 18px;
}

.panel {
  padding: 18px;
}

.compact-panel {
  align-self: start;
}

.settings-panel {
  max-width: 680px;
}

.settings-navigation {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.settings-navigation-button {
  display: grid;
  gap: 6px;
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--panel);
  color: var(--ink);
  text-align: left;
}

.settings-navigation-button.active {
  border-color: #000;
  background: var(--accent);
}

.settings-navigation-button strong {
  font-size: 14px;
}

.settings-navigation-button span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.settings-note {
  margin: -2px 0 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  align-items: start;
}

.panel-heading p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.inline-heading {
  align-items: center;
}

label {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  color: inherit;
  font-size: 13px;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
}

select option {
  color: var(--ink);
}

.search-input {
  max-width: 280px;
}

.timeline,
.audit-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.audit-page-list {
  max-width: 920px;
}

.timeline li,
.audit-list li {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-panel);
}

.timeline strong,
.audit-list strong {
  font-size: 13px;
  font-weight: 900;
}

.timeline time,
.audit-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.audit-list .badge {
  min-width: auto;
  min-height: 24px;
  padding: 0 8px;
  font-size: 10px;
  vertical-align: middle;
}

.profile-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.profile-list div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.profile-list dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.profile-list dd {
  margin: 0;
  font-size: 13px;
  font-weight: 900;
  text-align: right;
}

.profile-page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 18px;
  margin-top: 24px;
  padding-bottom: 24px;
}

.profile-page-layout .panel {
  align-content: start;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  padding: 24px;
}

.admin-toolbar > div:first-child {
  min-width: min(100%, 360px);
}

.report-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 180px)) repeat(2, minmax(128px, auto));
  gap: 10px;
  align-items: end;
  max-width: 100%;
}

.report-controls label {
  min-width: 0;
  margin-bottom: 0;
}

.report-controls .secondary-button {
  white-space: nowrap;
}

.roster-toolbar {
  align-items: end;
}

.roster-period-label {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: capitalize;
}

.roster-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
}

.roster-controls label {
  min-width: 150px;
  margin: 0;
}

.roster-navigation {
  display: flex;
  gap: 6px;
}

.roster-navigation .secondary-button:first-child,
.roster-navigation .secondary-button:last-child {
  min-width: 42px;
}

.roster-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 16px 0;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.roster-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: #ddd;
}

.legend-text {
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  color: #17663a;
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
}

.legend-outline {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: #2c8a52;
}

.legend-dot.pending {
  border: 2px dashed #6d6d68;
  background: transparent;
}

.legend-dot.overtime {
  background: var(--accent);
}

.legend-dot.holiday {
  background: #ffdd17;
}

.legend-dot.leave-type {
  background: var(--leave-color);
}

.legend-dot.incomplete {
  background: var(--danger);
}

.roster-panel {
  overflow-x: auto;
}

.roster-weekdays,
.roster-grid {
  min-width: 840px;
}

.roster-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(110px, 1fr));
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
}

.roster-weekdays span {
  padding: 10px;
  border-right: 1px solid var(--line);
  background: #000;
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.roster-weekdays span:last-child {
  border-right: 0;
}

.roster-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(110px, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.roster-day {
  min-height: 175px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.roster-grid.week .roster-day {
  min-height: 360px;
}

.roster-day.empty {
  background: #f1f1ed;
}

.roster-day.today {
  box-shadow: inset 0 0 0 3px var(--accent);
}

.roster-day > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--soft-panel);
}

.roster-day.today > header {
  background: var(--accent);
}

.roster-day > header span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.roster-day > header strong {
  font-size: 15px;
  font-weight: 900;
}

.roster-day-content {
  display: grid;
  gap: 8px;
  padding: 9px;
}

.roster-person {
  display: grid;
  gap: 5px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.roster-person:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.roster-person > strong {
  font-size: 10px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.roster-signals {
  display: grid;
  gap: 5px;
}

.roster-signal,
.roster-empty {
  display: block;
  border-radius: 5px;
  padding: 5px 6px;
  font-size: 9px;
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.roster-signal.worked {
  border: 0;
  border-left: 4px solid #2c8a52;
  background: #e7f6ec;
  color: #17663a;
}

.roster-planned {
  display: block;
  padding: 5px 0;
  color: #17663a;
  font-size: 9px;
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.roster-grid.personal .roster-planned {
  font-size: 10px;
}

.roster-signal.leave-type {
  border-left: 4px solid var(--leave-color);
  background: var(--leave-background);
  color: var(--leave-text);
}

.roster-signal.leave-type.pending {
  border: 1px dashed var(--leave-color);
  border-left-width: 4px;
  background: var(--leave-background);
  color: var(--leave-text);
}

.roster-signal.overtime {
  border-left: 4px solid #000;
  background: var(--accent);
  color: #000;
}

.roster-signal.incomplete {
  border-left: 4px solid var(--danger);
  background: #ffe7e3;
  color: var(--danger);
}

.roster-empty {
  padding-left: 0;
  color: #888883;
  font-weight: 700;
}

.roster-grid.personal .roster-signal,
.roster-grid.personal .roster-empty {
  font-size: 10px;
}

.employee-list-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.employee-list-actions .secondary-button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.table-wrap {
  overflow-x: auto;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.pagination label,
.pagination-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
}

.pagination select {
  width: auto;
  min-width: 68px;
  min-height: 34px;
  padding: 5px 8px;
}

.pagination-actions .table-action {
  min-width: 36px;
  padding: 0;
}

.pagination-actions .table-action:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pagination-actions strong {
  min-width: 48px;
  color: var(--ink);
  text-align: center;
}

table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.badge {
  display: inline-flex;
  min-width: 112px;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 900;
}

.badge.working {
  border: 1px solid #9fd8b5;
  background: #e7f6ec;
  color: #17663a;
}

.badge.paused {
  border: 1px solid var(--accent);
  background: #fff6a6;
  color: #000;
}

.badge.finished {
  border: 1px solid #000;
  background: #000;
  color: var(--accent);
}

.badge.offline {
  border: 1px solid var(--line);
  background: #efefeb;
  color: var(--muted);
}

.badge.flagged {
  border: 1px solid #f4aaa1;
  background: #ffe7e3;
  color: var(--danger);
}

.table-action {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
}

.table-action.danger {
  border-color: #f4aaa1;
  background: #ffe7e3;
  color: var(--danger);
}

.user-delete-button {
  width: 100%;
  min-height: 42px;
  margin-top: 10px;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.requests-panel {
  margin-top: 18px;
}

.leave-edit-panel {
  margin-top: 18px;
}

.leave-request-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.request-row.pending td:first-child {
  border-left: 4px solid var(--danger);
}

.request-row.handled td:first-child {
  border-left: 4px solid var(--success);
}

.request-row.cancelled td:first-child {
  border-left: 4px solid var(--muted);
}

.table-muted {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.table-detail {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.user-management {
  display: grid;
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}

.user-form-panel[hidden] {
  display: none;
}

.user-table {
  min-width: 680px;
}

.balances-table {
  min-width: 900px;
}

.leave-type-settings {
  grid-template-columns: minmax(300px, 0.75fr) minmax(420px, 1.25fr);
}

.leave-balances-panel {
  margin-top: 18px;
}

.color-input {
  min-height: 48px;
  padding: 5px;
  cursor: pointer;
}

.input-with-unit {
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-with-unit span {
  color: var(--muted);
  font-size: 12px;
}

.leave-type-list {
  display: grid;
  gap: 9px;
}

.leave-type-card {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-panel);
}

.leave-type-card.inactive {
  opacity: 0.6;
}

.leave-type-swatch {
  width: 16px;
  height: 40px;
  border-radius: 5px;
}

.leave-type-card strong,
.leave-type-card span {
  display: block;
}

.leave-type-card strong {
  font-size: 12px;
}

.leave-type-card span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.schedules-table {
  min-width: 1460px;
}

.schedule-cycle-two.inactive {
  display: none;
}

.schedule-anchor-control {
  display: grid;
  gap: 5px;
  margin: 10px 0 0;
  font-size: 10px;
}

.schedule-anchor-control input {
  min-width: 170px;
  font-size: 11px;
}

.schedule-user-heading {
  display: grid;
  gap: 3px;
}

.schedule-employee-cell {
  min-width: 205px;
  vertical-align: top;
}

.schedule-variable-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 10px 0 0;
  font-size: 10px;
  white-space: nowrap;
}

.schedule-variable-toggle input {
  width: 16px;
  min-height: 16px;
  margin: 0;
}

.balance-input {
  max-width: 120px;
}

.balance-field {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.balance-field span {
  color: var(--muted);
  font-size: 0.82rem;
}

.schedule-input {
  max-width: 130px;
  min-height: 34px;
  margin-bottom: 6px;
  padding: 6px 8px;
  font-size: 12px;
}

.schedule-day-toggle {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 11px;
}

.schedule-day-toggle input {
  width: 16px;
  min-height: 16px;
}

.form-message {
  min-height: 22px;
  margin: 12px 0 0;
  color: var(--success);
  font-size: 12px;
  font-weight: 900;
}

.balance-note {
  margin: -4px 0 14px;
  padding: 10px 12px;
  border: 1px solid #9fd8b5;
  border-radius: 8px;
  background: #e7f6ec;
  color: var(--success);
  font-size: 12px;
  font-weight: 900;
}

.balance-note.warning {
  border-color: #f4aaa1;
  background: #ffe7e3;
  color: var(--danger);
}

.leave-date-calendar {
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-panel);
}

.leave-date-calendar-heading {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.leave-date-calendar-heading strong {
  font-size: 12px;
  text-align: center;
  text-transform: capitalize;
}

.leave-date-calendar-heading .table-action {
  min-width: 36px;
  padding: 0;
}

.leave-date-weekdays,
.leave-date-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.leave-date-weekdays {
  margin-bottom: 4px;
}

.leave-date-weekdays span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  text-align: center;
}

.leave-date-days button {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.leave-date-days button.planned {
  border-color: #9fd8b5;
  background: #e7f6ec;
  color: #17663a;
}

.leave-date-days button.holiday {
  border-color: #d5b700;
  background: #fff5b8;
  color: #5f5100;
}

.leave-date-days button.holiday:disabled {
  cursor: default;
  opacity: 1;
}

.leave-date-days button.approved-leave {
  border-color: var(--leave-color);
  background: var(--leave-background);
  color: var(--leave-text);
}

.leave-date-days button.pending-leave {
  border: 2px dashed var(--leave-color);
  background: var(--leave-background);
  color: var(--leave-text);
}

.leave-date-days button.holiday {
  border: 1px solid #d5b700;
  background: #fff5b8;
  color: #5f5100;
}

.leave-date-days button.selected {
  box-shadow: inset 0 0 0 2px #000;
}

.leave-date-days button.today {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.leave-calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 10px;
}

.leave-calendar-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.leave-calendar-note i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.leave-calendar-note i.planned {
  background: #2c8a52;
}

.leave-calendar-note i.holiday {
  background: #ffdd17;
}

.leave-calendar-note i.approved {
  background: #7b4bb7;
}

.leave-calendar-note i.pending {
  border: 2px dashed #7b4bb7;
  background: transparent;
}

.leave-calendar-help {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.settings-checkbox {
  margin-top: 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-panel);
}

.roster-signal.holiday {
  border-color: #d5b700;
  background: #fff5b8;
  color: #5f5100;
}

.roster-day.holiday {
  background: #fffdf0;
}

@media (max-width: 980px) {
  body {
    grid-template-columns: 1fr;
  }

  .shell-header {
    position: relative;
    min-height: auto;
  }

  .app-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .user-pill {
    margin-top: 0;
  }

  .login-panel,
  .clock-hero,
  .split-layout,
  .shortage-notice {
    grid-template-columns: 1fr;
  }

  .leave-balance-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1120px) {
  .admin-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .report-controls {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }

  .roster-controls {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .app-shell {
    padding: 14px;
  }

  .shell-header {
    padding: 16px;
  }

  .inline-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .report-controls {
    grid-template-columns: 1fr;
  }

  .form-grid.two {
    grid-template-columns: 1fr;
  }

  .profile-page-layout {
    grid-template-columns: 1fr;
    margin-top: 18px;
    padding-bottom: 16px;
  }

  .search-input {
    max-width: none;
  }

  .employee-list-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-navigation {
    grid-template-columns: 1fr;
  }

  .page-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .notification-item {
    align-items: stretch;
    flex-direction: column;
  }

  .shortage-actions {
    grid-template-columns: 1fr;
  }

  .leave-balance-cards {
    grid-template-columns: 1fr;
  }

  .pagination {
    justify-content: space-between;
  }

  .roster-controls {
    display: grid;
    grid-template-columns: 1fr;
  }

  .roster-navigation {
    display: grid;
    grid-template-columns: 42px 1fr 42px;
  }
}
