:root {
  color-scheme: light;
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #182230;
  --muted: #667085;
  --line: #d0d5dd;
  --brand: #0f766e;
  --brand-dark: #134e4a;
  --accent: #1d4ed8;
  --warning: #b54708;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px;
  background: #0f172a;
  color: #ffffff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--brand);
  font-weight: 800;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  margin-top: 3px;
  color: #cbd5e1;
  font-size: 13px;
}

.nav-list {
  display: grid;
  gap: 8px;
  margin-top: 24px;
}

.nav-item {
  padding: 12px 14px;
  border-radius: 8px;
  color: #dbeafe;
  font-weight: 700;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.main-content {
  min-width: 0;
  padding: 32px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: 34px;
  line-height: 1.15;
}

h2 {
  margin-bottom: 0;
  font-size: 19px;
  line-height: 1.25;
}

.primary-button {
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

.primary-button:hover {
  background: var(--brand-dark);
}

.clock-action-layout {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr;
  gap: 16px;
  align-items: center;
}

.clock-button {
  min-height: 72px;
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
}

.clock-button.is-running {
  background: #b42318;
}

.clock-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.clock-details {
  display: grid;
  gap: 6px;
}

.clock-details strong {
  font-size: 20px;
}

.clock-details span {
  color: var(--muted);
  font-weight: 700;
}


.secondary-button,
.icon-button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.secondary-button {
  padding: 0 14px;
}

.icon-button {
  width: 40px;
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.dialog {
  width: min(720px, calc(100% - 32px));
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
}

.dialog::backdrop {
  background: rgba(15, 23, 42, 0.48);
}

.dialog-card {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

.dialog-header,
.dialog-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.dialog-actions {
  align-items: center;
  justify-content: flex-end;
  margin-top: 20px;
}

.entry-form {
  margin-top: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.form-section-title {
  grid-column: 1 / -1;
  margin: 8px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.form-section-title:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.field {
  display: grid;
  gap: 7px;
}

.is-hidden {
  display: none;
}

.field-wide {
  grid-column: 1 / -1;
}

.field span,
.checkbox-group legend {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.field input,
.field select {
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.field select[multiple] {
  min-height: 104px;
  padding: 8px 11px;
}

.break-list {
  display: grid;
  gap: 10px;
}

.break-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.break-add-button {
  justify-self: start;
}

.field input:focus,
.field select:focus {
  outline: 3px solid rgba(15, 118, 110, 0.16);
  border-color: var(--brand);
}

.checkbox-group {
  margin: 0;
  padding: 0;
  border: 0;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
}

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

.form-message {
  min-height: 20px;
  margin: 14px 0 0;
  color: var(--brand-dark);
  font-size: 14px;
  font-weight: 700;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.metric-card,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.05);
}

.metric-card {
  display: grid;
  gap: 8px;
  min-height: 128px;
  padding: 18px;
}

.metric-label,
.metric-note {
  color: var(--muted);
  font-size: 14px;
}

.metric-card strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 34px;
  line-height: 1;
}

.metric-card .metric-status-value,
.metric-card .metric-money-value {
  align-self: center;
  font-size: 24px;
  line-height: 1.15;
}


.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 16px;
}

.compact-field {
  min-width: 180px;
}

.wide-control {
  min-width: min(360px, 100%);
}

.month-picker,
.account-employee-field {
  width: 220px;
  max-width: 100%;
}

.month-picker-trigger,
.account-employee-field select,
.account-status-field select {
  height: 42px;
  min-height: 42px;
}

.month-picker {
  position: relative;
}

.month-picker-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.month-picker-trigger::after {
  content: '';
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-2px);
}

.month-picker-trigger span {
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
}

.month-picker-trigger:focus {
  outline: 3px solid rgba(15, 118, 110, 0.16);
  border-color: var(--brand);
}

.month-picker-panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: 0;
  width: min(320px, calc(100vw - 36px));
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 46px rgba(16, 24, 40, 0.18);
}

.month-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.month-picker-header strong {
  font-size: 16px;
}

.month-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.month-picker-month {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.month-picker-month:hover,
.month-picker-month.active {
  border-color: var(--brand);
  background: #ecfdf3;
  color: var(--brand-dark);
}

.filter-chip {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.filter-chip:hover,
.filter-chip.active {
  border-color: var(--brand);
  background: #ecfdf3;
  color: var(--brand-dark);
}

.table-panel {
  margin-bottom: 16px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.05);
}

.panel-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

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

.data-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th,
.data-table td {
  padding: 14px 12px;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.data-table td strong,
.data-table td span {
  display: block;
}

.data-table td strong {
  margin-bottom: 3px;
}

.data-table td span {
  color: var(--muted);
  font-size: 13px;
}



.table-action-button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.table-action-button:hover {
  border-color: var(--brand);
  color: var(--brand-dark);
}

.table-action-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.table-action-button:disabled:hover {
  border-color: var(--line);
  color: var(--text);
}

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

.table-action-button.danger {
  color: #b42318;
}

.table-action-button.danger:hover {
  border-color: #b42318;
  color: #b42318;
}

.empty-row {
  color: var(--muted);
  text-align: center;
}

.state {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.active-state {
  background: #ecfdf3;
  color: #027a48;
}

.review-state {
  background: #fff7ed;
  color: var(--warning);
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.panel {
  min-height: 178px;
  padding: 20px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.status-pill {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  background: #ecfdf3;
  color: #027a48;
  font-size: 12px;
  font-weight: 800;
}



.login-page {
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg);
}

.login-shell {
  width: min(460px, 100%);
}

.login-card {
  display: grid;
  gap: 22px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 46px rgba(16, 24, 40, 0.12);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-brand strong,
.login-brand span {
  display: block;
}

.login-brand span:not(.brand-mark) {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

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

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

.session-user {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.settings-layout {
  display: grid;
  gap: 16px;
}

.settings-list-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.settings-list-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  margin-bottom: 0;
}

.settings-item-list {
  display: grid;
  gap: 8px;
}

.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.settings-item strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.settings-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

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

  .main-content {
    padding: 24px;
  }

  .metrics,
  .content-grid,
  .settings-list-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .sidebar,
  .main-content {
    padding: 18px;
  }

  .topbar,
  .session-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .nav-list {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 28px;
  }

  .primary-button {
    width: 100%;
  }

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

@media (max-width: 720px) {
  .clock-action-layout {
    grid-template-columns: 1fr;
  }

  .clock-button {
    width: 100%;
    min-height: 88px;
    font-size: 20px;
  }
}
