.eyebrow {
  margin: 0 0 10px;
  color: var(--color-primary);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.auth-brand {
  margin: 0 0 14px;
  color: var(--color-primary);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0;
}

.auth-form {
  display: grid;
  gap: 9px;
  margin-top: 18px;
}

.auth-form input,
.auth-form button,
.login-confirmation button {
  min-height: 44px;
}

.auth-form input {
  padding: 10px 12px;
}

label,
.search-label {
  color: var(--color-text);
  font-size: 0.92rem;
  font-weight: 700;
}

label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

input,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--color-surface);
  color: var(--color-text);
}

input {
  min-height: 48px;
}

input[type="date"] {
  max-width: 100%;
}

.home-date-field {
  position: relative;
  width: 100%;
  max-width: 100%;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 8px;
  justify-self: stretch;
}

.date-arrow-button {
  width: 40px;
  min-height: 44px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 1rem;
  line-height: 1;
}

.date-arrow-button:disabled {
  opacity: 0.34;
}

.date-display-button {
  min-width: 0;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.date-display-button,
.week-range-display {
  width: auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.date-display-label {
  display: block;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.date-input-native {
  position: absolute;
  inset: auto;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

input:focus,
textarea:focus {
  outline: 3px solid rgba(15, 118, 110, 0.22);
  border-color: var(--color-primary);
}

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

button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.secondary-button {
  width: 100%;
  margin-top: 16px;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text);
}

.secondary-button.compact {
  width: auto;
  min-height: 40px;
  margin-top: 0;
  padding: 0 12px;
}

.header-icon-button {
  width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0;
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 1.25rem;
  line-height: 0;
}

.header-icon-button svg,
.tab-nav svg,
.icon-button svg,
.project-image svg {
  display: block;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.tab-nav button {
  display: grid;
  gap: 2px;
  min-height: 48px;
  padding: 4px 6px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 0.78rem;
}

.tab-nav button.hidden {
  display: none;
}

.tab-nav button.active {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #ffffff;
}

.status-text {
  min-height: 24px;
  margin-top: 12px;
  line-height: 1.45;
}

.auth-view > .status-text {
  min-height: 0;
  font-size: 0.9rem;
}

.loading-line {
  width: 100%;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.14);
}

.loading-line::before {
  content: "";
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: var(--color-primary);
  animation: loading-line 1.1s ease-in-out infinite;
}

@keyframes loading-line {
  0% {
    transform: translateX(-110%);
  }

  100% {
    transform: translateX(250%);
  }
}

.loading-message {
  min-height: 0;
  font-size: 0.9rem;
}

.app-status-banner {
  display: block;
  margin: -4px 0 12px;
  padding: 9px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.25;
  box-shadow: var(--shadow-soft);
}

.app-status-banner.hidden {
  display: none;
}

.app-status-banner.is-success {
  border-color: color-mix(in srgb, var(--color-success, #2f8f57) 28%, var(--color-border));
  background: color-mix(in srgb, var(--color-surface) 92%, var(--color-success, #2f8f57) 8%);
}

.app-status-banner.is-error {
  border-color: color-mix(in srgb, var(--color-danger, #c0392b) 30%, var(--color-border));
  background: color-mix(in srgb, var(--color-surface) 90%, var(--color-danger, #c0392b) 10%);
}

.app-status-banner.is-loading,
.app-status-banner.is-info {
  border-color: color-mix(in srgb, var(--color-primary) 24%, var(--color-border));
  background: color-mix(in srgb, var(--color-surface) 92%, var(--color-primary) 8%);
}

.project-list,
.time-entry-list,
.admin-project-list,
.section-list {
  position: relative;
}

.project-list.is-refreshing,
.time-entry-list.is-refreshing,
.admin-project-list.is-refreshing,
.section-list.is-refreshing {
  opacity: 0.7;
}

.list-refresh-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.52), rgba(248, 250, 252, 0.24));
  opacity: 0;
  transition: opacity 0.16s ease;
}

.is-refreshing .list-refresh-overlay {
  opacity: 1;
}

.list-refresh-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(15, 118, 110, 0.16);
  border-top-color: rgba(15, 118, 110, 0.88);
  border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.06);
  animation: list-refresh-spin 0.8s linear infinite;
}

@keyframes list-refresh-spin {
  to {
    transform: rotate(360deg);
  }
}

.login-confirmation {
  display: grid;
  gap: 9px;
  margin-top: 4px;
  text-align: center;
}

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

.login-confirmation h2 {
  margin: 2px 0 4px;
  font-size: 1.45rem;
  line-height: 1.15;
}

.login-confirmation p {
  margin: 0;
  line-height: 1.45;
}

.login-confirmation strong {
  display: block;
  margin: 0 auto 2px;
  overflow-wrap: anywhere;
  color: var(--color-text);
  font-size: 1.02rem;
  font-weight: 900;
}

.confirmation-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  justify-self: center;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 8px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--color-primary);
}

.confirmation-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

#resend-link-button {
  margin-top: 8px;
}

#resend-link-button:disabled {
  background: var(--color-surface);
  color: var(--color-muted);
  border: 1px solid var(--color-border);
}

.session-panel {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--color-border);
}

.session-name {
  color: var(--color-text);
  font-weight: 800;
}

.session-meta {
  margin-top: 4px;
}

.hidden {
  display: none;
}

.is-invisible {
  visibility: hidden;
  pointer-events: none;
}

.search-input {
  min-height: 44px;
  padding: 10px 12px;
  box-shadow: var(--shadow-soft);
}

.project-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 8px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
}

.project-card.simple {
  min-height: 62px;
}

.project-card.selectable {
  cursor: pointer;
}

.project-card.selected,
.selected-project {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

.project-image {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(15, 118, 110, 0.12);
  color: var(--color-primary);
  font-weight: 900;
}

.project-image.small {
  width: 44px;
  height: 44px;
}

.project-image.compact {
  width: 44px;
  height: 44px;
}

.project-image.popup-image {
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-main {
  min-width: 0;
}

.project-code {
  margin: 0 0 2px;
  color: var(--color-muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.project-card h3 {
  margin: 0;
  overflow: hidden;
  color: var(--color-text);
  font-size: 1rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-company {
  margin: 2px 0 0;
  overflow: hidden;
  color: var(--color-muted);
  font-size: 0.86rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-button {
  width: 48px;
  min-height: 48px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-muted);
  font-size: 1.4rem;
  line-height: 0;
}

.icon-button.active {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

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

.project-actions .icon-button {
  width: 40px;
  min-height: 40px;
}

.project-actions.two-actions {
  gap: 4px;
}

.project-actions .icon-button svg {
  width: 18px;
  height: 18px;
}

.empty-text {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-muted);
  background: var(--color-surface);
}

.muted-text {
  margin: 0;
  color: var(--color-muted);
}

.selected-project {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--color-primary);
  border-radius: 8px;
  background: var(--color-surface);
}

.date-context {
  margin: -8px 0 0;
  color: var(--color-primary);
  font-size: 1.45rem;
  font-weight: 900;
}

.home-compact {
  gap: 12px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.time-quick-rows {
  display: grid;
  gap: 12px;
}

.time-quick-group {
  display: grid;
  gap: 8px;
}

.time-quick-group-label {
  color: var(--color-muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.chip-row button,
.quick-presets button {
  min-height: 40px;
  width: 100%;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
}

.chip-row button.active {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #ffffff;
}

.quick-presets span {
  align-self: center;
  color: var(--color-muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.time-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
}

.time-panel h3 {
  margin: 0;
}

.time-button-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.time-value-button {
  min-height: 58px;
  width: 100%;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 1.2rem;
}

.time-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  align-items: end;
  background: rgba(15, 23, 42, 0.48);
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 18;
  display: grid;
  align-items: end;
  background: rgba(15, 23, 42, 0.5);
}

.sheet-backdrop.fullscreen {
  align-items: stretch;
  background: var(--color-background);
}

.bottom-sheet {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: calc(100dvh - 16px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 18px;
  padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  border-radius: 8px 8px 0 0;
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
}

.sheet-header {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 12px;
}

.sheet-header h2 {
  margin: 0;
}

.sheet-header > div {
  min-width: 0;
  flex: 1 1 auto;
}

.sheet-description {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.84rem;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.sheet-time {
  padding: 0;
  border: 0;
}

.work-selector {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 8px;
}

.work-selector.single {
  grid-template-columns: minmax(0, 1fr);
}

.work-selector-arrow {
  width: 40px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 1rem;
  line-height: 1;
}

.work-selector-arrow:disabled {
  opacity: 0.34;
}

.work-selector-center {
  min-width: 0;
  height: 54px;
  display: grid;
  grid-template-columns: auto 1px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-text);
  text-align: left;
  overflow: hidden;
}

.work-selector-center.placeholder,
.work-selector-center.main {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
}

.work-selector-center.single-field {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
}

.work-selector-center.active {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #ffffff;
}

.work-selector-placeholder,
.work-selector-main,
.work-selector-number,
.work-selector-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-selector-placeholder,
.work-selector-main {
  font-weight: 800;
}

.work-selector-number {
  font-weight: 900;
}

.work-selector-divider {
  width: 1px;
  align-self: stretch;
  background: currentColor;
  opacity: 0.24;
}

.work-selector-center.placeholder .work-selector-divider,
.work-selector-center.main .work-selector-divider {
  display: none;
}

.work-selector-center.single-field .work-selector-divider {
  display: none;
}

.work-selector-center.subproject .work-selector-label {
  justify-self: start;
}

.search-sheet {
  display: flex;
  flex-direction: column;
  align-content: start;
  gap: 10px;
  min-height: 100dvh;
  padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.search-header {
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.search-flow {
  display: grid;
  gap: 8px;
}

.compact-status {
  min-height: 18px;
  margin-top: 0;
  font-size: 0.88rem;
}

.time-sheet {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: calc(100dvh - 16px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 18px;
  padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  border-radius: 8px 8px 0 0;
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
}

.compact-time-sheet {
  align-self: end;
}

.time-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.time-sheet h3,
.time-preview {
  margin: 0;
}

.time-preview {
  color: var(--color-primary);
  font-size: 2rem;
  font-weight: 900;
  text-align: center;
}

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

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

.time-grid button {
  min-height: 48px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
}

.time-grid button.active {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #ffffff;
}

.home-sheet-actions.entry-actions.edit-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-project-sheet {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.home-project-sheet-body {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  gap: 14px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.home-sheet-footer {
  padding-top: 12px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

.home-sheet-footer.single-action {
  grid-template-columns: minmax(0, 1fr);
  justify-items: end;
}

.time-flow-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
}

.time-flow-card-lunch,
.time-flow-card-summary {
  border-color: rgba(15, 118, 110, 0.42);
  background: rgba(15, 118, 110, 0.1);
}

.time-flow-eyebrow {
  margin: 0;
  color: var(--color-primary);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.time-flow-card h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.2;
}

.time-flow-review {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
}

.time-flow-review-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.time-flow-review-row-note {
  color: var(--color-text);
}

.time-flow-review-row-note span {
  min-width: 0;
}

.time-flow-review-row strong {
  color: var(--color-text);
  font-weight: 900;
  white-space: nowrap;
}

.time-flow-note {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.time-flow-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.time-flow-actions.lunch-actions {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}

.time-flow-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 0.98rem;
  font-weight: 800;
  font-family: inherit;
}

.time-flow-button.primary {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #ffffff;
}

.time-flow-button.secondary {
  background: rgba(15, 23, 42, 0.02);
}

.section-square-button {
  width: auto;
  min-width: 116px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid var(--color-primary);
  border-radius: 8px;
  background: var(--color-primary);
  color: #ffffff;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  box-sizing: border-box;
}

.section-square-button--danger {
  border-color: var(--color-danger, #c0392b);
  background: var(--color-danger, #c0392b);
  color: #ffffff;
}

.section-square-button:active {
  transform: scale(0.97);
  filter: brightness(0.96);
}

body .driver-popover.easytime-guided-tour {
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 12px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18);
  font-family: inherit;
}

body .driver-popover.easytime-guided-tour .driver-popover-title {
  color: var(--color-text);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0;
}

body .driver-popover.easytime-guided-tour .driver-popover-description {
  color: var(--color-muted);
  font-size: 0.94rem;
  line-height: 1.45;
}

body .driver-popover.easytime-guided-tour .driver-popover-footer {
  gap: 8px;
}

body .driver-popover.easytime-guided-tour .driver-popover-navigation-btns button,
body .driver-popover.easytime-guided-tour .driver-popover-close-btn {
  border-radius: 8px;
}

.time-flow-textarea-field {
  display: grid;
  gap: 6px;
}

.time-flow-textarea-field span {
  color: var(--color-muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.time-flow-textarea-field textarea {
  min-height: 96px;
  resize: none;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
}

.fullscreen-sheet {
  position: relative;
  max-height: none;
  min-height: 100dvh;
  border-radius: 0;
  box-shadow: none;
}

.time-entry-list,
.day-group {
  display: grid;
  gap: 10px;
}

.day-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.day-group h3 {
  margin: 4px 0 0;
  min-width: 0;
}

.my-times-view {
  gap: 10px;
}

.my-times-view .view-header {
  display: grid;
  gap: 2px;
}

.time-entry-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
}

.time-entry-row > div:first-child {
  min-width: 0;
  flex: 1 1 0;
}

.time-entry-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.time-entry-topline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.time-entry-summary {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  color: var(--color-muted);
  font-size: 0.88rem;
  line-height: 1.2;
  white-space: nowrap;
  justify-self: end;
  text-align: right;
}

.time-entry-summary-divider {
  width: 1px;
  align-self: stretch;
  background: currentColor;
  opacity: 0.24;
}

.time-entry-summary-range,
.time-entry-summary-total {
  white-space: nowrap;
}

.time-entry-lunch-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
}

.time-entry-lunch-indicator svg {
  width: 14px;
  height: 14px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.time-entry-lock-indicator,
.admin-time-lock-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
}

.time-entry-lock-indicator svg,
.admin-time-lock-indicator svg {
  width: 14px;
  height: 14px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.time-entry-row.locked {
  border-color: rgba(15, 118, 110, 0.18);
  background: rgba(15, 118, 110, 0.03);
}

.time-entry-row > div:first-child > div,
.time-entry-row > div:first-child > p,
.time-entry-row > div:first-child > strong {
  min-width: 0;
}

.time-entry-row > .entry-actions {
  flex: 0 0 auto;
  min-width: 0;
}

.time-entry-row {
  cursor: pointer;
}

.time-entry-row p {
  margin: 4px 0 0;
  color: var(--color-muted);
}

.time-entry-day-summary {
  margin: 4px 0 0;
  color: var(--color-text);
  font-size: 0.9rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.time-entry-review-state {
  margin: 4px 0 0;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.2;
}

.time-entry-review-state.is-ok {
  color: var(--color-primary);
}

.time-entry-review-state.is-alert {
  color: #9f403b;
}

.time-entry-review-note {
  margin: 2px 0 0;
  color: var(--color-muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.time-entry-project-code,
.time-entry-project-name,
.time-entry-company,
.time-entry-range,
.time-entry-subcategory {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.time-entry-project-code {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.1;
}

.time-entry-edit-layout .time-entry-project-code {
  align-self: center;
}

.time-entry-project-name {
  margin: 0 0 2px;
  color: var(--color-text);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
}

.time-entry-company {
  margin: 1px 0 0;
  color: var(--color-muted);
  font-size: 0.86rem;
  line-height: 1.2;
}

.time-entry-subcategory {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 4px 0 0;
  color: var(--color-text);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.2;
}

.time-entry-subcategory-row {
  display: grid;
  grid-template-columns: auto 1px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  width: 100%;
  min-width: 0;
  margin: 0;
  color: var(--color-text);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.2;
}

.time-entry-subcategory-number {
  flex: 0 0 auto;
  min-width: 0;
  white-space: nowrap;
}

.time-entry-subcategory-divider {
  width: 1px;
  align-self: stretch;
  background: currentColor;
  opacity: 0.24;
}

.time-entry-subcategory-label {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.time-entry-range {
  margin: 4px 0 0;
  color: var(--color-muted);
  font-size: 0.88rem;
}

.time-entry-total {
  font-weight: 800;
}

.time-entry-row.editing {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  justify-items: stretch;
  gap: 8px;
  width: 100%;
}

.time-entry-row.editing .time-entry-edit-layout {
  display: grid;
  gap: 8px;
  min-width: 0;
  width: 100%;
}

.time-entry-row.editing .time-entry-edit-layout > * {
  min-width: 0;
}

.entry-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.entry-actions.edit-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.entry-actions.edit-actions button {
  width: 100%;
  min-height: 48px;
}

.entry-delete-button {
  justify-self: end;
  margin-top: 0;
  color: #b65a55;
  background: rgba(182, 90, 85, 0.08);
}

.entry-delete-button:hover,
.entry-delete-button:focus-visible {
  color: #9f403b;
  background: rgba(182, 90, 85, 0.14);
}

.entry-actions.edit-actions .icon-button {
  padding: 0;
  background: var(--color-surface);
}

.entry-actions.edit-actions .icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.entry-actions.edit-actions .entry-delete-button {
  color: #b65a55;
  background: rgba(182, 90, 85, 0.08);
}

.entry-actions.edit-actions .entry-delete-button:hover,
.entry-actions.edit-actions .entry-delete-button:focus-visible {
  color: #9f403b;
  background: rgba(182, 90, 85, 0.14);
}

.entry-actions.edit-actions .entry-delete-button.confirm-delete {
  color: #9f403b;
  background: rgba(182, 90, 85, 0.16);
}

.entry-actions.edit-actions .entry-delete-button.confirm-delete svg {
  width: 28px;
  height: 28px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transform: translateX(-1px);
}

.time-entry-edit-layout .time-entry-topline {
  align-items: center;
}

.time-entry-edit-layout .time-entry-summary {
  align-items: center;
}

.profile-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
}

.profile-row {
  display: grid;
  gap: 4px;
}

.profile-row span {
  color: var(--color-muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.admin-project-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-text);
  text-align: left;
  cursor: pointer;
}

.admin-project-create-icon-button {
  flex: 0 0 auto;
}

.admin-project-archive-button {
  border-color: var(--color-border);
  background: var(--color-surface);
  color: var(--color-muted);
}

.admin-project-archive-button svg {
  fill: currentColor;
  stroke: none;
}

.admin-archive-sheet {
  align-content: start;
}

.admin-archive-list {
  display: grid;
  gap: 8px;
}

.admin-archive-project-row {
  grid-template-columns: 44px minmax(0, 1fr) auto;
  cursor: default;
}

.admin-archive-empty-state {
  min-height: 62px;
  display: grid;
  place-items: center;
  text-align: center;
}

.admin-project-row:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.22);
  outline-offset: 2px;
}

.admin-project-row.is-moving-section {
  animation: admin-project-row-move 160ms ease-out both;
}

@keyframes admin-project-row-move {
  from {
    opacity: 0.72;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.admin-project-row-main {
  min-width: 0;
  display: block;
}

.admin-project-number {
  margin: 0 0 2px;
  color: var(--color-muted);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.1;
}

.admin-project-row h3 {
  margin: 0;
  overflow: hidden;
  color: var(--color-text);
  font-size: 1rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-project-name {
  margin: 0;
  color: var(--color-text);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-project-company {
  margin: 2px 0 0;
  color: var(--color-muted);
  font-size: 0.86rem;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-project-row-side {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  justify-items: end;
  gap: 4px;
}

.admin-project-lifecycle-button {
  width: 40px;
  min-height: 40px;
}

.admin-project-lifecycle-button svg,
.admin-project-move-button svg,
.admin-project-restore-button svg {
  width: 18px;
  height: 18px;
}

.admin-project-archive-action svg {
  fill: currentColor;
  stroke: none;
}

.admin-project-lifecycle-button.confirm-delete {
  color: #9f403b;
  background: rgba(182, 90, 85, 0.16);
}

.admin-project-lifecycle-button.confirm-archive {
  color: var(--color-primary);
  background: rgba(15, 118, 110, 0.12);
}

.admin-project-lifecycle-button.confirm-delete svg,
.admin-project-lifecycle-button.confirm-archive svg {
  width: 28px;
  height: 28px;
  display: block;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.admin-project-lifecycle-button.confirm-delete svg {
  fill: none;
  stroke: currentColor;
  transform: translateX(-1px);
}

.admin-project-lifecycle-button.confirm-archive svg {
  fill: currentColor;
  stroke: none;
}

.admin-project-restore-button {
  width: 40px;
  min-height: 40px;
}

.admin-project-move-button {
  width: 40px;
  min-height: 40px;
  transition:
    transform 0.1s ease,
    border-color 0.12s ease,
    color 0.12s ease,
    background 0.12s ease;
}

.admin-project-move-button:active {
  transform: scale(0.98);
}

.admin-project-empty-state {
  min-height: 62px;
  display: grid;
  place-items: center;
  text-align: center;
}

.admin-project-backdrop {
  align-items: stretch;
}

.admin-project-sheet {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 100dvh;
  max-height: calc(100dvh - 16px);
  overflow: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 16px 16px calc(env(safe-area-inset-bottom, 0px) + 16px);
  border-radius: 0;
}

.admin-times-view {
  display: grid;
  gap: 14px;
}

.admin-times-header {
  display: none;
}

.admin-times-filters {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.page-loading-state {
  display: grid;
  place-items: center;
  min-height: 44px;
}

.admin-times-filter {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.admin-times-filter span {
  color: var(--color-muted);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.15;
}

.admin-times-filter select,
.admin-times-filter input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-text);
}

.admin-times-filter select:focus,
.admin-times-filter input:focus {
  outline: 2px solid rgba(15, 118, 110, 0.22);
  outline-offset: 1px;
}

.admin-times-list {
  display: grid;
  gap: 8px;
}

.admin-times-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.admin-times-section-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-times-log-button {
  width: 44px;
  min-height: 44px;
  padding: 0;
}

.admin-times-log-button svg {
  fill: currentColor;
  stroke: none;
}

.admin-times-log-button:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.22);
  outline-offset: 2px;
}

.admin-time-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
}

.admin-time-card-approved {
  border-color: rgba(15, 118, 110, 0.18);
  background: rgba(15, 118, 110, 0.03);
}

.admin-time-card-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.admin-time-card-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.admin-time-card-title-row {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.admin-time-date,
.admin-time-company,
.admin-time-subcategory,
.admin-time-note,
.admin-time-review-note,
.admin-time-locked-text,
.admin-times-log-action,
.admin-times-log-company,
.admin-times-log-note {
  margin: 0;
}

.admin-time-date {
  color: var(--color-muted);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.1;
}

.admin-time-card-main h4 {
  min-width: 0;
  margin: 0;
  color: var(--color-text);
  font-size: 1rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-time-company {
  color: var(--color-muted);
  font-size: 0.86rem;
  line-height: 1.2;
}

.admin-time-owner {
  color: var(--color-muted);
  font-size: 0.86rem;
  line-height: 1.2;
}

.admin-time-owner strong {
  color: var(--color-text);
}

.admin-time-card-status {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.admin-time-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
}

.admin-time-badge.is-ok {
  color: var(--color-primary);
  background: rgba(15, 118, 110, 0.12);
}

.admin-time-badge.is-alert {
  color: #9f403b;
  background: rgba(182, 90, 85, 0.12);
}

.admin-time-badge.is-waiting {
  color: var(--color-muted);
  background: rgba(148, 163, 184, 0.14);
}

.admin-time-summary {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: var(--color-muted);
  font-size: 0.88rem;
  line-height: 1.2;
  white-space: nowrap;
  justify-self: end;
  text-align: right;
}

.admin-time-summary-top {
  flex-wrap: wrap;
}

.admin-time-summary span:last-child {
  font-weight: 800;
}

.admin-time-subcategory,
.admin-time-note,
.admin-time-review-note {
  color: var(--color-text);
  font-size: 0.9rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.admin-time-subcategory {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-muted);
  font-size: 0.86rem;
}

.admin-time-subcategory strong {
  color: var(--color-text);
}

.admin-time-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.admin-time-meta div {
  display: grid;
  gap: 2px;
}

.admin-time-meta span {
  color: var(--color-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.admin-time-meta strong {
  min-width: 0;
  color: var(--color-text);
  font-size: 0.9rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.admin-time-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.admin-time-actions .primary-button,
.admin-time-actions .secondary-button {
  width: 100%;
  margin-top: 0;
}

.admin-time-lock-indicator-button {
  display: inline-grid;
  place-items: center;
  width: 28px;
  min-width: 28px;
  min-height: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--color-primary);
}

.admin-time-lock-indicator-button.is-unlocked {
  color: var(--color-muted);
}

.admin-time-lock-indicator-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.admin-time-locked-text {
  color: var(--color-muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.admin-times-log-button {
  flex: 0 0 auto;
}

.admin-times-log-sheet,
.admin-times-review-sheet {
  align-content: start;
}

.admin-times-log-list,
.admin-times-log-row {
  display: grid;
  gap: 8px;
}

.admin-times-log-row {
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
}

.admin-times-log-row-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.admin-times-log-row-top h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
}

.admin-times-log-action {
  color: var(--color-primary);
  font-size: 0.82rem;
  font-weight: 800;
}

.admin-times-log-company,
.admin-times-log-note,
.admin-times-log-body {
  color: var(--color-muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.admin-times-log-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-times-log-meta {
  display: grid;
  justify-items: end;
  gap: 4px;
  color: var(--color-muted);
  font-size: 0.78rem;
  text-align: right;
}

.admin-times-review-summary {
  margin: 0;
}

.admin-times-review-note-field {
  gap: 6px;
}

.admin-times-review-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.admin-project-sheet-header {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.admin-project-sheet-header-editable {
  align-items: start;
}

.admin-project-sheet-meta-editable {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.admin-inline-project-field {
  display: grid;
  gap: 0;
  min-width: 0;
}

.admin-inline-project-label {
  display: none;
  color: var(--color-muted);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.15;
}

.admin-inline-project-display,
.admin-inline-project-input {
  width: 100%;
  min-width: 0;
  min-height: 24px;
  padding: 0;
  border-radius: 0;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
}

.admin-inline-project-display {
  display: grid;
  align-items: center;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  color: var(--color-text);
  text-align: left;
}

.admin-inline-project-display.is-empty {
  color: var(--color-muted);
}

.admin-inline-project-placeholder {
  color: var(--color-muted);
  font-size: 0.86rem;
  font-weight: 700;
}

[data-inline-project-field="projectCode"] .admin-inline-project-display,
[data-inline-project-field="projectCode"] .admin-inline-project-input {
  color: var(--color-muted);
  font-size: 0.82rem;
  line-height: 1.1;
}

[data-inline-project-field="projectName"] .admin-inline-project-display,
[data-inline-project-field="projectName"] .admin-inline-project-input {
  color: var(--color-text);
  font-size: 1rem;
  line-height: 1.25;
}

[data-inline-project-field="company"] .admin-inline-project-display,
[data-inline-project-field="company"] .admin-inline-project-input {
  color: var(--color-muted);
  font-size: 0.86rem;
  line-height: 1.2;
}

.admin-inline-project-input {
  display: none;
  border: 0;
  background: transparent;
  color: var(--color-text);
  box-shadow: inset 0 -1px 0 var(--color-border);
}

.admin-inline-project-field.editing .admin-inline-project-display {
  display: none;
}

.admin-inline-project-field.editing .admin-inline-project-input {
  display: block;
}

.admin-inline-project-input:focus {
  outline: 0;
  box-shadow: inset 0 -2px 0 var(--color-primary);
}

.admin-inline-project-field.is-invalid {
  border-radius: 6px;
  background: rgba(182, 90, 85, 0.07);
  box-shadow: inset 0 0 0 1px rgba(182, 90, 85, 0.58);
}

.admin-inline-project-field.is-invalid:focus-within {
  box-shadow:
    inset 0 0 0 1px rgba(182, 90, 85, 0.58),
    0 0 0 3px rgba(182, 90, 85, 0.12);
}

.admin-inline-project-input[type="text"] {
  appearance: none;
  -webkit-appearance: none;
}

.admin-inline-project-input[name="company"] {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 20px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--color-muted) 50%),
    linear-gradient(135deg, var(--color-muted) 50%, transparent 50%);
  background-position:
    calc(100% - 10px) 11px,
    calc(100% - 5px) 11px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.admin-project-image-tile {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  cursor: pointer;
  align-self: start;
}

.admin-project-image-tile img,
.admin-project-image-tile [data-create-preview-avatar] {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-project-image-tile [data-create-preview-avatar] {
  display: grid;
  place-items: center;
}

.admin-project-image-tile [hidden] {
  display: none;
}

.admin-project-image-spinner {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  background: rgba(255, 255, 255, 0.45);
}

.admin-project-image-tile.uploading .admin-project-image-spinner,
.admin-project-image-tile.loading .admin-project-image-spinner {
  display: grid;
}

.admin-project-image-tile.uploading [data-create-preview-avatar],
.admin-project-image-tile.loading [data-create-preview-avatar] {
  display: none;
}

.admin-project-image-tile.uploading .admin-project-image-spinner::after,
.admin-project-image-tile.loading .admin-project-image-spinner::after {
  content: "";
  width: 22px;
  height: 22px;
  border: 3px solid rgba(15, 118, 110, 0.18);
  border-top-color: rgba(15, 118, 110, 0.9);
  border-radius: 999px;
  animation: list-refresh-spin 0.8s linear infinite;
}

.admin-project-create-preview {
  align-items: center;
}

.admin-project-create-preview-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.admin-project-create-preview-main h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-project-create-preview-side {
  display: grid;
  justify-items: end;
  align-content: center;
  gap: 0;
}

.admin-project-image-tile {
  position: relative;
  align-self: start;
  cursor: pointer;
}

.admin-project-image-tile input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.admin-project-image-tile .admin-project-image-overlay {
  position: absolute;
  inset: auto 0 0;
  padding: 3px 0 4px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.52));
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.admin-project-image-tile img,
.admin-project-image-tile [data-create-preview-avatar] {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-project-image-form {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.admin-project-create-fields {
  gap: 12px;
}

.admin-project-create-form {
  display: grid;
  gap: 14px;
}

.admin-project-description-subprojects {
  display: grid;
  flex: 1 1 auto;
  min-height: 0;
  gap: 10px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.admin-inline-field {
  display: grid;
  gap: 0;
}

.admin-inline-field span {
  display: none;
  color: var(--color-muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.admin-inline-field input,
.admin-inline-field textarea,
.admin-inline-field select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--color-surface);
  color: var(--color-text);
}

.admin-inline-field select {
  min-height: 48px;
  padding-right: 40px;
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--color-muted) 50%),
    linear-gradient(135deg, var(--color-muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 19px,
    calc(100% - 12px) 19px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.admin-inline-field select:focus {
  outline: 3px solid rgba(15, 118, 110, 0.22);
  border-color: var(--color-primary);
}

.admin-inline-field textarea {
  height: 96px;
  min-height: 96px;
  max-height: 96px;
  overflow: auto;
  resize: none;
}

.admin-project-sheet-meta {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.admin-project-sheet-meta h2 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.15;
}

.admin-project-section {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.section-head h3 {
  margin: 0;
  font-size: 1rem;
}

.section-head .secondary-button.compact {
  flex: 0 0 auto;
}

.admin-project-edit-form,
.subcategory-form,
.compact-subcategory-form,
.image-form {
  display: grid;
  gap: 10px;
}

.admin-project-edit-form label,
.subcategory-form label,
.compact-subcategory-form label,
.image-form label {
  display: grid;
  gap: 4px;
}

.admin-project-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  align-self: end;
  margin-top: auto;
  padding-top: 12px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

.admin-project-footer.entry-actions.edit-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.subcategory-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.subcategory-empty-state {
  min-height: 54px;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0 16px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  text-align: center;
}

.subcategory-row {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
}

.subcategory-row.compact {
  padding: 0;
}

.subcategory-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  color: var(--color-text);
  text-align: left;
}

.subcategory-home-style {
  grid-template-columns: auto 1px minmax(0, 1fr);
  min-height: 54px;
  gap: 10px;
  padding: 0 16px;
  border: 1px solid var(--color-primary);
  border-radius: 8px;
  background: var(--color-primary);
  color: #ffffff;
  overflow: hidden;
}

.subcategory-home-style .work-selector-label {
  justify-self: start;
}

.subcategory-home-style .is-placeholder {
  color: currentColor;
  opacity: 0.82;
}

.subcategory-summary-main {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(3ch, 18%) 1px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.subcategory-number {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 900;
  white-space: nowrap;
}

.subcategory-number.is-placeholder,
.subcategory-name.is-placeholder {
  color: var(--color-muted);
  font-weight: 700;
}

.subcategory-divider {
  width: 1px;
  align-self: stretch;
  background: currentColor;
  opacity: 0.24;
}

.subcategory-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--color-text);
  font-weight: 800;
}

.subcategory-summary-icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-text);
}

.subcategory-summary-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.subcategory-inline-editor {
  display: grid;
  padding: 10px 12px;
}

.subcategory-inline-editor input {
  width: 100%;
  min-width: 0;
  min-height: 28px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--color-text);
  font: inherit;
  font-weight: 800;
  line-height: 1.2;
  box-shadow: inset 0 -1px 0 var(--color-border);
}

.subcategory-inline-editor input:first-child {
  font-weight: 900;
}

.subcategory-inline-editor input::placeholder {
  color: var(--color-muted);
  font-weight: 700;
}

.subcategory-inline-editor input:focus {
  outline: 0;
  box-shadow: inset 0 -2px 0 var(--color-primary);
}

.subcategory-row.updating::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 12px;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  border: 2px solid rgba(15, 118, 110, 0.18);
  border-top-color: rgba(15, 118, 110, 0.9);
  border-radius: 999px;
  animation: list-refresh-spin 0.8s linear infinite;
}

.subcategory-row.is-new {
  animation: subcategory-row-reveal 200ms ease-out both;
}

@keyframes subcategory-row-reveal {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.subcategory-row.draft .subcategory-summary {
  padding-right: 52px;
}

.subcategory-row.draft .subcategory-home-style {
  padding-right: 52px;
}

.subcategory-remove-button {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 40px;
  min-height: 40px;
  padding: 0;
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.subcategory-remove-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.section-round-button,
.subcategory-add-button {
  justify-self: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--color-primary);
  border-radius: 999px;
  background: var(--color-primary);
  color: #ffffff;
  transition:
    transform 100ms ease,
    filter 100ms ease,
    box-shadow 100ms ease;
  will-change: transform;
}

.admin-subproject-add-button {
  flex: 0 0 44px;
}

.section-round-button:active,
.subcategory-add-button:active {
  transform: scale(0.97);
  filter: brightness(0.96);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.12);
}

.section-round-button svg,
.subcategory-add-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: center;
}

.section-round-button.admin-project-archive-button svg,
.subcategory-add-button.admin-project-archive-button svg {
  fill: currentColor;
  stroke: none;
}

.section-count-badge {
  flex: 0 0 auto;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  display: inline-grid;
  place-items: center;
  padding: 0 12px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
}

.section-time-badge {
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  display: inline-grid;
  place-items: center;
  padding: 0 10px;
  border: 1px solid var(--color-primary);
  border-radius: 8px;
  background: var(--color-primary);
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.subcategory-add-button.is-adding svg {
  animation: subcategory-plus-add 200ms ease-out both;
}

@keyframes subcategory-plus-add {
  0% {
    transform: rotate(0deg);
  }

  45% {
    transform: rotate(38deg);
  }

  100% {
    transform: rotate(0deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .subcategory-add-button,
  .subcategory-add-button svg {
    transition: none;
  }

  .subcategory-add-button.is-adding svg,
  .subcategory-row.is-new,
  .admin-project-row.is-moving-section {
    animation: none;
  }
}

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

.button-row.compact button {
  width: 100%;
}

.muted-text {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

@media (max-width: 520px) {
  .admin-project-row {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 10px;
  }

  .admin-project-status-pill {
    padding: 0 8px;
  }
}
