:root {
  color-scheme: light;
  --bg: #f6f7f3;
  --panel: #ffffff;
  --panel-2: #eef3f0;
  --ink: #1d2528;
  --muted: #607077;
  --line: #dbe2df;
  --accent: #006d77;
  --accent-2: #8a5a44;
  --good: #18794e;
  --warn: #b54708;
  --danger: #b42318;
  --shadow: 0 16px 40px rgba(38, 50, 56, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar {
  background: #223136;
  color: #f8fbf9;
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
  padding: 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.brand {
  display: grid;
  gap: 6px;
  padding: 2px 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  justify-items: center;
  text-align: center;
}

.brand-logo {
  width: 148px;
  max-height: 96px;
  object-fit: contain;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.brand span,
.userbox span,
.small {
  color: rgba(248, 251, 249, 0.72);
  font-size: 13px;
}

.nav {
  display: grid;
  gap: 5px;
}

.bottom-nav {
  margin-top: auto;
}

.nav button,
.nav a,
.icon-button {
  border: 0;
  border-radius: 8px;
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: transparent;
  color: inherit;
  text-align: left;
  text-decoration: none;
}

.nav button.active,
.nav button:hover,
.nav a:hover,
.icon-button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.nav svg,
.icon-button svg,
.button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.userbox {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px);
}

.topbar h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.content {
  padding: 18px 28px 28px;
  display: grid;
  gap: 14px;
  flex: 1;
  min-height: 0;
  height: calc(100vh - 72px);
  overflow: hidden;
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
  min-height: 30px;
}

.pill.good {
  color: var(--good);
  border-color: rgba(24, 121, 78, 0.24);
  background: rgba(24, 121, 78, 0.08);
}

.pill.warn {
  color: var(--warn);
  border-color: rgba(181, 71, 8, 0.24);
  background: rgba(181, 71, 8, 0.08);
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
  align-items: start;
}

.time-layout {
  height: 100%;
  min-height: 0;
  align-items: stretch !important;
  overflow: hidden;
}

.time-side-column {
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.calendar-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.panel,
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel {
  padding: 18px;
}

.panel h2,
.panel h3 {
  margin: 0 0 14px;
  font-size: 17px;
}

.form {
  display: grid;
  gap: 12px;
}

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

.field label {
  font-size: 13px;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 7px;
  min-height: 40px;
  padding: 9px 10px;
}

.field textarea {
  min-height: 84px;
  resize: vertical;
}

.month-balance-card {
  padding: 14px;
}

.month-balance-head {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

.month-balance-head h2 {
  margin-bottom: 2px;
}

.month-balance-head span {
  color: var(--muted);
  font-size: 13px;
}

.month-nav {
  gap: 6px;
  flex-wrap: wrap;
}

.month-weekdays,
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.month-weekdays {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.month-day {
  min-width: 0;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 5px;
  display: grid;
  align-content: start;
  gap: 1px;
  text-align: left;
  color: var(--ink);
}

.month-day.offday {
  background: #f7f4ee;
}

.month-day.outside {
  opacity: 0.42;
}

.month-day.today {
  border-color: rgba(0, 109, 119, 0.38);
  background: #dfeee9;
}

.month-day > span {
  font-size: 11px;
  color: var(--muted);
}

.month-day strong {
  font-size: 12px;
}

.month-day small {
  color: var(--muted);
  font-size: 10px;
}

.month-total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.project-combobox {
  position: relative;
}

.project-combobox input[type="text"] {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 7px;
  min-height: 40px;
  padding: 9px 10px;
}

.project-combobox-list {
  display: none;
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: min(360px, 52vh);
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.project-combobox:focus-within .project-combobox-list {
  display: block;
}

.project-combobox-group p,
.project-combobox-empty {
  margin: 6px 6px 4px;
  color: var(--muted);
  font-size: 11px;
}

.project-combobox-option {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  padding: 7px 8px;
  background: transparent;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
}

.project-combobox-option:hover,
.project-combobox-option:focus,
.project-combobox-option.selected {
  background: var(--surface);
}

.project-combobox-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-combobox-option small {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

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

.row.wrap {
  flex-wrap: wrap;
}

.button {
  border: 1px solid transparent;
  border-radius: 8px;
  min-height: 40px;
  padding: 9px 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: white;
  font-weight: 400;
}

.button.secondary {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}

.button.ghost {
  background: transparent;
  color: inherit;
  border-color: transparent;
}

.button.danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

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

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 12px;
}

.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.stat strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

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

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

th {
  color: var(--muted);
  background: var(--panel-2);
  font-size: 12px;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

.empty {
  padding: 32px;
  text-align: center;
  color: var(--muted);
}

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(100%, 520px);
}

.login-logo {
  display: block;
  width: min(196px, 50%);
  height: auto;
  margin: 0 auto 18px;
}

.muted {
  color: var(--muted);
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.app-tile {
  padding: 16px;
  min-height: 132px;
  display: grid;
  align-content: start;
  gap: 10px;
}

.app-tile strong {
  font-size: 17px;
}

.app-tile.disabled {
  opacity: 0.62;
}

.settings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.project-tools {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.project-search {
  width: min(100%, 460px);
}

.project-active-filter {
  min-height: 40px;
  color: var(--muted);
  font-size: 13px;
}

.link-button {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--accent);
  text-align: left;
  min-height: 24px;
}

.link-button:hover {
  text-decoration: underline;
}

.link-button.wide {
  width: 100%;
  color: var(--ink);
}

.project-row.selected td {
  background: rgba(0, 109, 119, 0.06);
}

.project-details-row td {
  background: #fbfcfa;
}

.project-details {
  display: grid;
  gap: 12px;
  padding: 4px 0 8px;
}

.project-details-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.summary-grid h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.compact-summary {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.compact-summary > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfa;
}

.compact-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.compact-form {
  margin-top: 12px;
}

.notice.warning {
  border: 1px solid #e2c46a;
  background: #fff8dc;
  border-radius: 8px;
  padding: 10px 12px;
}

.notice {
  border: 1px solid var(--line);
  background: #fbfcfa;
  border-radius: 8px;
  padding: 10px 12px;
}

.filters-row {
  margin-bottom: 12px;
}

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

.inline-field span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.wide-modal {
  max-width: 920px;
}

.missing-days-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.missing-days-row p {
  margin: 0;
}

.summary-table {
  min-width: 0;
}

.summary-table th,
.summary-table td {
  padding: 8px 10px;
}

.compact-empty {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(29, 37, 40, 0.46);
}

.modal-card {
  width: min(100%, 520px);
  max-height: min(720px, calc(100vh - 48px));
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}

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

.modal-head h2 {
  margin: 0;
  font-size: 18px;
}

.modal-close {
  position: static;
  opacity: 1;
  flex: 0 0 auto;
}

.modal-actions {
  justify-content: flex-end;
}

.delete-summary {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.delete-summary span {
  color: var(--muted);
}

.quick-add {
  display: grid;
  gap: 10px;
}

.add-drag-button {
  justify-content: flex-start;
  cursor: grab;
}

.add-drag-button:active {
  cursor: grabbing;
}

.date-add-field .row {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
}

.date-add-field input {
  flex: 0 1 170px;
  min-width: 140px;
}

.date-add-field .compact-button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.date-add-field .today-date-button {
  min-width: 100px;
}

.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.calendar-title {
  min-width: 250px;
  margin-right: 2px;
}

.calendar-nav {
  gap: 6px;
}

.calendar-nav .button,
.compact-button {
  min-height: 34px;
  padding: 6px 10px;
}

.export-button {
  margin-left: auto;
}

.segmented-control {
  display: inline-flex;
  min-height: 34px;
  margin-right: 12px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.segmented-control button {
  border: 0;
  border-radius: 6px;
  min-height: 28px;
  padding: 5px 10px;
  background: transparent;
  color: var(--muted);
}

.segmented-control button.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(20, 35, 40, 0.08);
}

.row-view-summary {
  gap: 6px;
}

.calendar-nav input {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 5px 8px;
}

.date-with-week {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.week-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 8px;
  color: var(--muted);
  font-size: 13px;
}

.week-calendar {
  --week-row-height: 232px;
  display: grid;
  gap: 9px;
  overflow-x: auto;
  overflow-y: visible;
  padding-bottom: 4px;
  padding: 2px 3px 6px 2px;
}

.week-calendar.two-weeks {
  max-height: none;
}

.time-row-view {
  min-height: 0;
  overflow: auto;
}

.time-row-table-wrap {
  max-height: calc(100vh - 210px);
}

.vacation-calendar-panel {
  min-width: 0;
  overflow: hidden;
}

.vacation-calendar-wrap {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: scroll;
  overflow-y: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  scrollbar-gutter: stable;
}

.vacation-calendar {
  width: 2950px;
  min-width: 2950px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.vacation-calendar th,
.vacation-calendar td {
  border-right: 1px solid #19672b;
  border-bottom: 1px solid #19672b;
  padding: 0;
  height: 30px;
  text-align: center;
}

.vacation-calendar thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--soft);
  color: var(--muted);
  font-weight: 700;
}

.vacation-calendar thead tr:nth-child(2) th {
  top: 30px;
  background: #e5efea;
}

.vacation-calendar thead tr:nth-child(3) th {
  top: 60px;
  font-size: 10px;
  line-height: 1;
  background: #f4f7f5;
}

.vacation-calendar th:first-child {
  position: sticky;
  left: 0;
  z-index: 4;
  width: 210px;
  padding: 4px 8px;
  text-align: left;
}

.vacation-calendar tbody th {
  font-weight: 650;
}

.vacation-calendar-day {
  width: 22px;
  cursor: pointer;
  user-select: none;
}

.vacation-calendar-day.weekend,
.vacation-calendar thead th.weekend {
  background: #eef3f0;
}

.vacation-row-green th,
.vacation-row-green .vacation-calendar-day {
  background: #f0f8f1;
}

.vacation-row-blue th,
.vacation-row-blue .vacation-calendar-day {
  background: #eef6fb;
}

.vacation-row-green .vacation-calendar-day.weekend,
.vacation-row-green .vacation-calendar-day[aria-disabled="true"] {
  background: #e4efe7;
}

.vacation-row-blue .vacation-calendar-day.weekend,
.vacation-row-blue .vacation-calendar-day[aria-disabled="true"] {
  background: #e2edf5;
}

.vacation-row-green .vacation-calendar-day.selected {
  background: #69bd78;
}

.vacation-row-blue .vacation-calendar-day.selected {
  background: #6aaed6;
}

.vacation-calendar-day.calendar-owned.selected {
  box-shadow: inset 0 0 0 2px rgba(0, 84, 57, 0.24);
}

.readonly-vacation-row {
  opacity: 0.48;
}

.readonly-vacation-row .vacation-calendar-day {
  cursor: default;
}

.own-vacation-row th {
  box-shadow: inset 4px 0 0 var(--accent);
}

.vacation-calendar-summary {
  margin: 12px 0 0;
  color: var(--muted);
  font-weight: 650;
}

.time-row-table {
  min-width: 1050px;
  table-layout: fixed;
}

.time-row-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
}

.time-row-load-more td {
  padding: 10px 12px;
  text-align: center;
  background: #fff;
}

.time-row-load-more .button {
  min-height: 34px;
}

.time-day-divider td {
  padding: 0;
  border-top: 2px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}

.time-day-divider.offday td {
  background: #f7f4ee;
}

.time-day-divider.current-week td {
  background: #dfeee9;
}

.time-day-divider-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 49px;
  padding: 10px 12px;
}

.time-day-divider-meta {
  display: grid;
  grid-template-columns: 100px 92px 1fr;
  align-items: center;
  gap: 10px;
  min-width: 360px;
}

.time-day-divider-totals {
  display: flex;
  align-items: center;
  gap: 10px;
}

.time-day-divider-bar span {
  color: var(--muted);
  font-size: 13px;
}

.time-week-boundary td {
  padding: 16px 0;
  border: 0;
  background: #fff;
}

.time-week-boundary-bar {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 42px;
  padding: 9px 12px;
  border-radius: 7px;
  background: #223238;
  color: #fff;
}

.time-week-boundary-bar strong {
  font-size: 13px;
}

.time-week-boundary-bar span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
}

.day-column.flash-target,
.time-row.flash-target td,
.time-day-divider.flash-target td {
  animation: dayFlash 1400ms ease-out;
}

@keyframes dayFlash {
  0% {
    background: #0f3d2e;
    box-shadow: 0 0 0 2px rgba(15, 61, 46, 0.42) inset;
  }
  45% {
    background: #d8eee4;
  }
  100% {
    background: inherit;
    box-shadow: none;
  }
}

.time-row-table td:nth-child(1) {
  width: 150px;
}

.time-row-table th:nth-child(2),
.time-row-table td:nth-child(2) {
  width: 92px;
}

.time-row-table td:nth-child(3) {
  min-width: 270px;
}

.time-row-table td:nth-child(4) {
  min-width: 150px;
}

.time-row-table th:nth-child(5),
.time-row-table td:nth-child(5) {
  width: auto;
}

.time-row-table th:nth-child(6),
.time-row-table td:nth-child(6) {
  width: 160px;
}

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

.row-drag-handle,
.row-edit,
.row-delete {
  position: static;
  opacity: 0;
  flex: 0 0 auto;
}

.row-drag-handle {
  width: 24px;
  height: 24px;
  border-radius: 8px;
}

.row-edit {
  min-height: 24px;
  padding: 0 6px;
  font-size: 13px;
  transform: none;
}

.time-row:hover .row-drag-handle,
.time-row:hover .row-edit,
.time-row:hover .row-delete,
.time-row:focus-within .row-drag-handle,
.time-row:focus-within .row-edit,
.time-row:focus-within .row-delete {
  opacity: 1;
}

.time-row.drag-over td,
.time-day-divider.drag-over td {
  background: #e8f3ef;
  box-shadow: inset 0 0 0 2px rgba(0, 109, 119, 0.22);
}

.week-snap-row {
  min-width: 1040px;
  display: grid;
  grid-template-columns: minmax(120px, 0.72fr) repeat(7, minmax(132px, 1fr));
  gap: 7px;
}

.week-snap-row.current-week .week-summary-column {
  border-color: rgba(0, 109, 119, 0.28);
  background: #dfeee9;
}

.week-range {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.day-column {
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: grid;
  grid-template-rows: auto auto 1fr;
  align-content: start;
}

.day-column.offday {
  background: #f7f4ee;
}

.week-summary-column {
  background: var(--panel-2);
  min-height: 210px;
}

.current-week-label {
  padding: 6px 10px;
  border-bottom: 1px solid rgba(0, 109, 119, 0.18);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.week-summary-values {
  padding: 10px;
  display: grid;
  gap: 12px;
}

.week-summary-values span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 3px;
}

.week-summary-values strong {
  display: block;
  font-size: 18px;
}

.day-column.drag-over {
  outline: 3px solid rgba(0, 109, 119, 0.26);
  outline-offset: 2px;
}

.day-head,
.day-sum {
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 2px;
}

.day-head strong {
  font-size: 12px;
}

.day-head span,
.day-sum span {
  color: var(--muted);
  font-size: 11px;
}

.day-sum {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.holiday-label {
  margin: 6px 8px 0;
  border-radius: 7px;
  background: rgba(138, 90, 68, 0.12);
  color: var(--accent-2);
  padding: 5px 7px;
  font-weight: 700;
  font-size: 11px;
}

.entry-stack {
  padding: 7px;
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 80px;
}

.entry-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 26px 7px 6px;
  display: grid;
  gap: 3px;
  box-shadow: 0 6px 16px rgba(38, 50, 56, 0.08);
}

.entry-card-main {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 6px;
}

.entry-card-main strong {
  font-size: 15px;
}

.entry-card-main span,
.entry-card-meta {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.entry-card-project {
  color: var(--text);
  font-size: 12px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.entry-card-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drag-handle {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 17px;
  height: 17px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-2);
  color: var(--muted);
  display: grid;
  place-items: center;
  padding: 0;
  cursor: grab;
  opacity: 0;
  transition: opacity 120ms ease;
}

.drag-handle:active {
  cursor: grabbing;
}

.drag-handle svg {
  display: block;
  width: 12px;
  height: 12px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.entry-delete {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 17px;
  height: 17px;
  border: 1px solid rgba(180, 35, 24, 0.18);
  border-radius: 7px;
  background: rgba(180, 35, 24, 0.06);
  color: var(--danger);
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 14px;
  line-height: 1;
  opacity: 0;
  transition: opacity 120ms ease;
}

.entry-edit {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  height: 17px;
  border: 0;
  background: transparent;
  color: var(--accent);
  display: grid;
  place-items: center;
  padding: 0 4px;
  font-size: 11px;
  font-weight: 400;
  line-height: 1;
  opacity: 0;
  cursor: pointer;
  transition: opacity 120ms ease;
}

.entry-card:hover .drag-handle,
.entry-card:hover .entry-edit,
.entry-card:hover .entry-delete,
.entry-card:focus-within .drag-handle,
.entry-card:focus-within .entry-edit,
.entry-card:focus-within .entry-delete {
  opacity: 1;
}

.entry-edit:hover {
  color: var(--accent-2);
}

.entry-delete:hover {
  background: rgba(180, 35, 24, 0.12);
}

.row-delete {
  position: static;
  opacity: 0;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  font-size: 18px;
}

.row-drag-handle,
.row-edit {
  position: static;
  opacity: 0;
}

.row-drag-handle svg {
  width: 15px;
  height: 15px;
}

.row-edit {
  min-height: 24px;
  padding: 0 6px;
  font-size: 13px;
  transform: none;
}

.field.compact {
  gap: 0;
}

.field.compact label {
  font-size: 10px;
}

.field.compact select {
  min-height: 27px;
  padding: 3px 6px;
  font-size: 12px;
}

.hours-input-wrap {
  position: relative;
  width: 100%;
}

.hours-input-wrap input[type="number"] {
  appearance: auto;
}

.hours-input-wrap span {
  position: absolute;
  top: 50%;
  right: 31px;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 12px;
  pointer-events: none;
}

.hours-with-unit {
  padding-left: 6px !important;
  padding-right: 28px !important;
}

.inline-hours-wrap {
  width: 100%;
}

.inline-hours-wrap span {
  right: 31px;
  font-size: 12px;
}

.hours-inline {
  width: 100%;
  min-height: 25px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 2px 40px 2px 6px;
  font-size: 12px;
}

.drop-hint {
  min-height: 38px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  display: grid;
  place-items: center;
  font-size: 11px;
}

.balance-plus {
  color: var(--good) !important;
  font-weight: 700;
}

.balance-minus {
  color: var(--danger) !important;
  font-weight: 700;
}

.message {
  border-radius: 8px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
}

.message.compact {
  min-height: 30px;
  padding: 5px 9px;
  display: inline-flex;
  align-items: center;
  max-width: 360px;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message.error {
  color: var(--danger);
  border-color: rgba(180, 35, 24, 0.24);
  background: rgba(180, 35, 24, 0.08);
}

@media (max-height: 760px) and (min-width: 921px) {
  .sidebar {
    padding: 10px 12px;
    gap: 8px;
  }

  .brand {
    gap: 4px;
    padding-bottom: 8px;
  }

  .brand-logo {
    width: 120px;
    max-height: 68px;
  }

  .brand span,
  .userbox span {
    font-size: 12px;
  }

  .nav {
    gap: 3px;
  }

  .nav button,
  .nav a,
  .icon-button {
    min-height: 32px;
    padding: 6px 9px;
  }

  .userbox {
    gap: 6px;
    padding: 8px;
  }
}

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

  .sidebar {
    height: auto;
    min-height: 0;
    overflow: visible;
    position: static;
    padding: 14px;
  }

  .nav {
    grid-template-columns: repeat(3, 1fr);
  }

  .userbox {
    margin-top: 0;
  }

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

  .content {
    height: auto;
    overflow: visible;
  }

  .time-layout {
    height: auto;
    overflow: visible;
  }
}

@media (max-width: 640px) {
  .topbar,
  .content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .button {
    width: 100%;
  }
}
