:root {
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  color: #0b2239;
  background: #f4f9fd;
}

body {
  margin: 0;
  background: #f4f9fd;
}

.topbar {
  background: #0F70B7;
  color: white;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar span {
  display: block;
  font-size: 12px;
  opacity: .85;
}

.topbar a {
  color: white;
  font-weight: bold;
}

.container {
  max-width: 1500px;
  margin: 0 auto;
  padding: 16px;
}

.card {
  background: white;
  border-radius: 18px;
  padding: 18px;
  margin: 0 0 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}

h1, h2 {
  margin: .1rem 0 1rem;
}

.hero p {
  margin: 0;
}

.input,
input,
select,
textarea {
  box-sizing: border-box;
  border: 1px solid #c8dce7;
  border-radius: 12px;
  padding: 12px;
  font-size: 16px;
  background: white;
}

input,
select,
textarea {
  width: 100%;
}

label {
  display: block;
  font-weight: 650;
  margin: 10px 0 4px;
}

form p {
  margin: 0 0 12px;
}

.btn {
  border: 0;
  border-radius: 14px;
  background: #0F70B7;
  color: white;
  font-weight: 750;
  font-size: 17px;
  padding: 14px 24px;
  cursor: pointer;
}

.entry {
  border-top: 1px solid #d9e8f2;
  padding: 12px 0;
}

.entry small {
  display: block;
  color: #526b7d;
  margin-top: 4px;
}

.msg {
  background: #dff0fb;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.stats div {
  background: #e7f4fc;
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}

.stats strong {
  display: block;
  font-size: 20px;
}

.stats span {
  display: block;
  font-size: 12px;
  color: #5f7284;
}

.quick-buttons,
.quick-hours {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 10px 0 16px;
}

.quick-buttons button,
.quick-hours button {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #0F70B7;
  background: #e7f4fc;
  color: #084c82;
  font-weight: bold;
  cursor: pointer;
}

.hours-grid {
  grid-template-columns: repeat(10, 1fr);
}

.hours-grid button {
  font-size: 14px;
  padding: 10px 4px;
}

.hidden-hours-field,
.hidden-entry-type-field {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.hour-button.selected,
.type-button.selected {
  background: #0F70B7;
  border-color: #0F70B7;
  color: white;
}

.hour-button.selected:hover,
.type-button.selected:hover {
  background: #0c5f9c;
}

.week-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.week-nav a {
  background: #e7f4fc;
  color: #084c82;
  border: 1px solid #0F70B7;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: bold;
}

.week-range {
  color: #5f7284;
  margin-bottom: 0;
}

.week-grid {
  max-width: 900px;
  margin: 0 auto 40px;
  display: grid;
  gap: 12px;
}

.day-card {
  background: white;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}

.day-card.today {
  border: 2px solid #0F70B7;
}

.day-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 10px;
  margin-bottom: 10px;
}

.day-head span,
.day-sum span,
.muted {
  color: #5f7284;
  font-size: 13px;
}

.holiday-note {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  padding: 8px;
  border-radius: 10px;
  margin-bottom: 8px;
}

.open-hours {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 8px;
  border-radius: 10px;
  margin-bottom: 8px;
  font-weight: bold;
}

@media (min-width: 900px) {
  .week-grid {
    grid-template-columns: repeat(7, 1fr);
    max-width: 1500px;
    align-items: start;
  }

  .day-card {
    min-height: 220px;
  }

  .day-head {
    display: block;
  }

  .day-sum {
    margin-top: 8px;
  }
}

@media (max-width: 1100px) {
  .hours-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

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

  .hours-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .booking-week-days {
    gap: 4px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .booking-day-button {
    font-size: 11px;
    min-width: 0;
    padding: 9px 1px;
  }
}

.entry-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}

.entry-detail {
  min-width: 0;
}

.delete-entry-form {
  margin: 0;
  flex: 0 0 auto;
}

.delete-entry-button {
  border: 1px solid #dc2626;
  border-radius: 8px;
  background: #fef2f2;
  color: #991b1b;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 8px;
}

.delete-entry-button:hover {
  background: #fee2e2;
}


.topbar-nav {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.topbar-nav a {
  color: white;
  font-weight: 800;
  text-decoration: none;
}

.summary-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.summary-hero p {
  color: #5f7284;
  margin: 0;
}

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

.summary-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 980px;
}

.summary-table th,
.summary-table td {
  border-bottom: 1px solid #d9e8f2;
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}

.summary-table th {
  background: #e7f4fc;
  color: #084c82;
  font-size: 13px;
}

.summary-table td span {
  color: #5f7284;
  display: block;
  font-size: 12px;
  margin-top: 3px;
}

.summary-table .numeric {
  font-weight: 800;
  white-space: nowrap;
}

.summary-table .is-negative {
  color: #991b1b;
}

.summary-table tr.is-muted {
  opacity: .58;
}


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

.compact-form textarea {
  min-height: 90px;
}

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

.request-item {
  align-items: center;
  border: 1px solid #d9e8f2;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
}

.cancel-vacation-form {
  flex: 0 0 auto;
  margin: 0;
}

.booking-week-days {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 8px 0 14px;
}

.booking-day-button {
  background: #e7f4fc;
  border: 1px solid #0F70B7;
  border-radius: 10px;
  color: #084c82;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  min-height: 42px;
  padding: 10px 4px;
  width: 100%;
}

.booking-day-button.selected {
  background: #0F70B7;
  color: #fff;
}

.request-item span,
.request-item small {
  color: #5f7284;
  display: block;
  margin-top: 3px;
}

.admin-request {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.request-actions {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.request-actions form {
  margin: 0;
}

.mini-button {
  border: 1px solid #0F70B7;
  border-radius: 9px;
  background: #0F70B7;
  color: white;
  cursor: pointer;
  font-weight: 800;
  padding: 7px 10px;
}

.mini-button.danger {
  background: #fef2f2;
  border-color: #dc2626;
  color: #991b1b;
}

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

  .admin-request {
    display: block;
  }

  .request-actions {
    margin-top: 10px;
  }
}


.year-select-form {
  display: flex;
  align-items: end;
  gap: 8px;
}

.year-select-form label {
  margin: 0;
}

.year-select-form select {
  min-width: 120px;
}


.type-grid {
  grid-template-columns: repeat(6, 1fr);
}

.filter-form {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.filter-form label {
  margin-top: 0;
}

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

.compact-table {
  min-width: 520px;
}

@media (max-width: 900px) {
  .filter-form,
  .report-grid {
    grid-template-columns: 1fr;
  }
}


.project-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
}

.checkbox-row {
  align-items: center;
  display: flex;
  gap: 8px;
}

.checkbox-row input {
  width: auto;
}

.project-table {
  min-width: 760px;
}

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

.project-actions form {
  margin: 0;
}

.project-actions .mini-button,
.project-form-actions .mini-button {
  align-items: center;
  display: inline-flex;
  text-decoration: none;
}

.project-form-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.list-filter-form {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.report-filter-form {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-employee-filter {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(170px, 260px);
  margin-bottom: 18px;
}

.dashboard-employee-filter label { margin: 0; }
.dashboard-employee-filter select { margin: 0; }

.report-filter-form label { margin-top: 0; }
.report-filter-actions { display: flex; gap: 8px; align-items: center; }
.report-stats { margin-bottom: 14px; }

@media (max-width: 900px) {
  .report-filter-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

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

.section-heading-row .list-filter-form {
  margin-bottom: 0;
}

.list-filter-form select,
.list-filter-form input {
  margin: 0;
  min-width: 170px;
  width: auto;
}

.mini-button.secondary {
  background: #fff;
  color: #084c82;
  text-decoration: none;
}

@media (max-width: 700px) {
  .section-heading-row {
    align-items: stretch;
  }

  .list-filter-form,
  .stacked-filter-form {
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .list-filter-form select,
  .list-filter-form input {
    min-width: 0;
    width: 100%;
  }
}

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


.form-error {
  color: #991b1b;
  font-size: 13px;
  font-weight: 750;
  margin-top: 6px;
}

.form-error ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.field-error:empty {
  display: none;
}

.input-error {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .12);
}


/* Mobile booking layout final overrides */
@media (max-width: 700px) {
  .hours-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .booking-week-days {
    gap: 4px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .booking-day-button {
    font-size: 11px;
    min-width: 0;
    padding: 9px 1px;
  }
}

.hidden-choice-fields {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.choice-button-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 8px 0 14px;
}

.customer-button-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.category-button-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.choice-button {
  background: #e7f4fc;
  border: 1px solid #0F70B7;
  border-radius: 8px;
  color: #084c82;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  min-height: 42px;
  padding: 9px 6px;
  width: 100%;
}

.choice-button.selected {
  background: #0F70B7;
  color: #fff;
}

.choice-button[hidden],
#project-selection[hidden],
#activity-selection[hidden] {
  display: none;
}

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

.notification-control {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.booking-date-preference-card { grid-column: 1 / -1; }

.preference-options {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 14px;
}

.preference-option {
  align-items: center;
  border: 1px solid #0f70b7;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  gap: 10px;
  margin: 0;
  min-height: 46px;
  padding: 10px 12px;
}

.preference-option:has(input:checked) {
  background: #0f70b7;
  color: #fff;
  font-weight: 800;
}

.preference-option input { margin: 0; width: auto; }

.section-heading-row,
.month-filter-form {
  align-items: center;
  display: flex;
  gap: 10px;
}

.section-heading-row {
  justify-content: space-between;
}

.month-filter-form select {
  width: auto;
}

.account-stats {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (max-width: 700px) {
  .choice-button-grid,
  .customer-button-grid,
  .category-button-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-grid {
    grid-template-columns: 1fr;
  }

  .preference-options { grid-template-columns: 1fr; }

  .section-heading-row,
  .month-filter-form {
    align-items: stretch;
    flex-direction: column;
  }

  .month-filter-form select {
    width: 100%;
  }

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