:root {
  color-scheme: light;
  --ink: #101722;
  --muted: #697586;
  --navy: #101722;
  --navy-2: #1a2432;
  --blue: #1479f7;
  --blue-dark: #075cc4;
  --blue-soft: #e9f3ff;
  --surface: #ffffff;
  --background: #eef2f6;
  --line: #dbe2ea;
  --danger: #c83e45;
  font-family: Inter, "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(20, 121, 247, 0.07) 0, transparent 34%),
    repeating-linear-gradient(135deg, rgba(16, 23, 34, 0.018) 0 1px, transparent 1px 18px),
    var(--background);
}

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

button {
  cursor: pointer;
}

.app-shell {
  width: min(100%, 760px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(22px, env(safe-area-inset-top)) 18px max(46px, env(safe-area-inset-bottom));
}

.topbar,
.brand,
.section-title,
.summary-heading,
.field-row,
.dialog-actions {
  display: flex;
  align-items: center;
}

.topbar,
.section-title,
.summary-heading {
  justify-content: space-between;
}

.topbar {
  gap: 12px;
}

.brand {
  gap: 13px;
  min-width: 0;
}

.top-logout-button {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 10px 16px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: #d6323c;
  box-shadow: 0 8px 18px rgba(200, 62, 69, 0.25);
  font-size: 0.8rem;
  font-weight: 900;
}

.top-logout-button:hover,
.top-logout-button:focus-visible {
  background: #ad252e;
}

.caps-lock-warning {
  display: block;
  margin-top: 7px;
  color: #b4232c;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.035em;
}

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

  .logo-frame {
    width: 58px;
    height: 58px;
  }

  h1 {
    font-size: clamp(1.05rem, 5.3vw, 1.45rem);
  }

  .top-logout-button {
    min-height: 38px;
    padding: 9px 11px;
    border-radius: 10px;
    font-size: 0.7rem;
  }
}

.logo-frame {
  display: grid;
  width: 68px;
  height: 68px;
  overflow: hidden;
  place-items: center;
  border: 1px solid #dce2e8;
  border-radius: 17px;
  background: white;
  box-shadow: 0 9px 24px rgba(16, 23, 34, 0.1);
}

.logo-frame img {
  width: 92%;
  height: 92%;
  object-fit: contain;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(1.35rem, 5vw, 2.15rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.98;
}

h2 {
  margin-bottom: 0;
  font-size: 1.3rem;
  font-weight: 850;
  letter-spacing: -0.025em;
}

.eyebrow {
  margin-bottom: 5px;
  color: var(--blue);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.15em;
}

.icon-button {
  width: 46px;
  height: 46px;
  border: 1px solid #cad4df;
  border-radius: 14px;
  color: var(--navy);
  background: white;
  box-shadow: 0 8px 20px rgba(16, 23, 34, 0.08);
  font-size: 1.4rem;
}

.user-button {
  display: flex;
  gap: 7px;
  align-items: center;
  margin-top: 8px;
  padding: 0;
  border: 0;
  color: #536174;
  background: transparent;
  font-size: 0.78rem;
  font-weight: 800;
}

.user-button b {
  display: block;
  text-align: left;
}

.user-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22b573;
  box-shadow: 0 0 0 3px rgba(34, 181, 115, 0.13);
}

.summary-card {
  position: relative;
  margin: 25px 0 18px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 22px;
  color: white;
  background: linear-gradient(135deg, #111925, #202d3e);
  box-shadow: 0 20px 45px rgba(16, 23, 34, 0.22);
}

.summary-heading {
  cursor: pointer;
}

.top-technicians-panel {
  position: relative;
  z-index: 1;
  margin: 18px 0 0;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
}

.top-technician-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  color: #fff;
  font-weight: 850;
}

.top-technician-row + .top-technician-row {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.top-technician-row span {
  color: #c8d7ef;
  font-size: 0.8rem;
}

.daily-note {
  margin: 24px 0 18px;
  padding: 20px 22px;
  border: 1px solid #c9def7;
  border-radius: 18px;
  background: linear-gradient(135deg, #f7fbff, #eaf4ff);
  box-shadow: 0 12px 28px rgba(16, 23, 34, 0.07);
}

.daily-note-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.daily-note-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--blue);
  font-weight: 900;
}

.daily-note-text {
  margin: 14px 0 0;
  color: #20364f;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.5;
  white-space: pre-wrap;
}

.daily-note-form {
  margin-top: 15px;
}

.daily-note-form textarea {
  resize: vertical;
}

.daily-note-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.daily-note-actions span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
}

.daily-note-actions button {
  min-width: 145px;
}

.farm-info-box {
  padding: 16px;
  border: 1px solid #cfe0f4;
  border-radius: 18px;
  background: #f3f8ff;
}

.farm-info-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 13px 15px;
  border: 1px solid #cfe0f4;
  border-radius: 15px;
  color: #0057ad;
  background: #f3f8ff;
  font-size: 0.85rem;
  font-weight: 900;
  text-align: left;
}

.farm-info-toggle.active {
  background: #e8f3ff;
}

.farm-info-toggle b {
  padding: 4px 8px;
  border-radius: 999px;
  color: #fff;
  background: #d6323c;
  font-size: 0.65rem;
}

.farm-info-heading,
.admin-farm-heading,
.admin-farm-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.farm-info-heading h3,
.admin-farm-heading h4 {
  margin: 0;
}

.new-info-badge {
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  background: #d6323c;
  font-size: 0.68rem;
  font-weight: 900;
}

.farm-info-text {
  margin: 10px 0 14px;
  color: #33445c;
  line-height: 1.45;
  white-space: pre-wrap;
}

.farm-info-box textarea,
.admin-farm-row textarea {
  min-height: 92px;
  resize: vertical;
}

.summary-card::after {
  position: absolute;
  right: -35px;
  bottom: -90px;
  width: 210px;
  height: 210px;
  border: 24px solid rgba(255, 255, 255, 0.025);
  border-radius: 50%;
  content: "";
}

.summary-glow {
  position: absolute;
  top: -65px;
  right: -45px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(20, 121, 247, 0.34);
  filter: blur(30px);
}

.summary-heading,
.summary-grid {
  position: relative;
  z-index: 1;
}

.summary-label {
  margin-bottom: 6px;
  color: #9cabc0;
  font-size: 0.78rem;
  font-weight: 600;
}

#monthTotal {
  font-size: clamp(1.75rem, 6vw, 2.4rem);
  font-weight: 900;
  letter-spacing: -0.045em;
}

#monthPicker {
  max-width: 150px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

#monthPicker::-webkit-calendar-picker-indicator {
  filter: invert(1);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-top: 23px;
}

.summary-grid div {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.055);
}

.summary-grid span,
.summary-grid b {
  display: block;
}

.summary-grid span {
  margin-bottom: 4px;
  color: #9cabc0;
  font-size: 0.66rem;
  font-weight: 700;
}

.summary-grid b {
  font-size: 1.05rem;
}

.panel {
  padding: 23px;
  border: 1px solid #dfe5eb;
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 14px 35px rgba(16, 23, 34, 0.08);
}

.section-title {
  margin-bottom: 21px;
}

.section-title,
.admin-users-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.section-collapse {
  min-width: 82px;
  border: 1px solid rgba(0, 91, 187, 0.16);
  border-radius: 999px;
  color: #0756a8;
  background: linear-gradient(135deg, #eef6ff, #ffffff);
  box-shadow: 0 8px 18px rgba(0, 91, 187, 0.12);
  white-space: nowrap;
}

.collapsible-section.collapsed form,
.admin-users.collapsed > :not(.admin-users-heading) {
  display: none !important;
}

.vehicle-panel.collapsed .vehicle-content {
  display: none !important;
}

.vehicle-content {
  display: grid;
  gap: 18px;
}

.vehicle-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  padding: 16px;
  border: 1px solid #e1e8f0;
  border-radius: 16px;
  background: #f8fbff;
}

.remember-password {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 9px;
  color: #526174;
  font-size: 0.78rem;
}

.remember-password input {
  width: 18px;
  min-width: 18px;
  min-height: 18px;
  margin: 0;
}

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

.vehicle-form .primary-button {
  min-height: 47px;
}

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

.vehicle-item {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-left: 7px solid var(--vehicle-color, #22c55e);
  border-radius: 14px;
  background: #fff;
}

.vehicle-item.warning {
  background: #fff7f7;
}

.vehicle-item-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 7px;
}

.edit-inline-button {
  min-height: 34px;
  padding: 8px 14px;
  border: 1px solid rgba(0, 91, 187, 0.18);
  border-radius: 999px;
  color: #0756a8;
  background: #eef6ff;
  box-shadow: 0 7px 16px rgba(0, 91, 187, 0.1);
  font-size: 0.72rem;
  font-weight: 900;
  cursor: pointer;
}

.vehicle-item strong {
  color: var(--ink);
  font-size: 0.95rem;
}

.vehicle-item span {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
}

.account-dialog-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 14px;
}

.account-dialog-actions .secondary-button,
.account-dialog-actions .logout-button {
  width: 100%;
}

form {
  display: grid;
  gap: 15px;
}

label {
  display: grid;
  gap: 7px;
  color: #556171;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.015em;
}

input,
select,
textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 47px;
  padding: 12px 13px;
  border: 1px solid #d3dce5;
  border-radius: 11px;
  outline: none;
  color: var(--ink);
  background: #f8fafc;
  transition: border-color 0.16s, box-shadow 0.16s, background 0.16s;
}

input[type="date"] {
  min-width: 0;
  max-width: 100%;
  -webkit-appearance: none;
  appearance: none;
}

input[type="date"]::-webkit-date-and-time-value {
  min-width: 0;
  text-align: left;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  background: white;
  box-shadow: 0 0 0 4px rgba(20, 121, 247, 0.11);
}

.uppercase-input {
  text-transform: uppercase;
}

.field-row {
  gap: 10px;
}

.field-row label {
  flex: 1;
}

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

.hours-counter {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  gap: 8px;
}

.hours-counter button {
  border: 1px solid #c6d8ec;
  border-radius: 11px;
  color: var(--blue-dark);
  background: var(--blue-soft);
  font-size: 1.35rem;
  font-weight: 900;
}

.hours-counter input {
  text-align: center;
  font-size: 1.05rem;
  font-weight: 900;
}

.work-time-range {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.work-time-range input {
  text-align: center;
  font-size: 1rem;
  font-weight: 900;
}

@media (max-width: 390px) {
  .work-time-range {
    grid-template-columns: 1fr;
  }
}

.farm-field {
  display: grid;
  grid-template-columns: 1fr 48px;
  gap: 9px;
  align-items: end;
}

.favorite-button {
  height: 47px;
  border: 1px solid #d3dce5;
  border-radius: 11px;
  color: #8390a0;
  background: #f8fafc;
  font-size: 1.5rem;
  line-height: 1;
}

.favorite-button.active {
  color: #f0a500;
  border-color: #f1cc73;
  background: #fff8e2;
}

.favorite-button:disabled {
  cursor: default;
  opacity: 0.42;
}

.add-database-toggle {
  width: fit-content;
  margin-top: -5px;
  padding: 3px 0;
  border: 0;
  color: var(--blue-dark);
  background: transparent;
  font-size: 0.78rem;
  font-weight: 850;
}

.add-database-box {
  padding: 14px;
  border: 1px solid #cbdcf0;
  border-radius: 13px;
  background: #f2f7fd;
}

.inline-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 11px;
}

.small-button {
  min-height: 40px;
  padding: 8px 14px;
}

.calculated-time {
  margin: 1px 0 0;
  padding: 13px 14px;
  border-left: 4px solid var(--blue);
  border-radius: 8px 12px 12px 8px;
  color: #244262;
  background: var(--blue-soft);
  font-size: 0.84rem;
}

.calculated-time strong {
  color: var(--navy);
}

.error-message {
  display: none;
  margin: -5px 0 0;
  color: var(--danger);
  font-size: 0.8rem;
  font-weight: 800;
}

.error-message:not(:empty) {
  display: block;
}

.primary-button,
.secondary-button,
.danger-button {
  min-height: 49px;
  border: 0;
  border-radius: 11px;
  font-weight: 900;
  transition: transform 0.15s, box-shadow 0.15s;
}

.primary-button {
  color: white;
  background: linear-gradient(135deg, var(--blue), #0866d8);
  box-shadow: 0 9px 20px rgba(20, 121, 247, 0.24);
}

.primary-button:active,
.export-button:active {
  transform: translateY(1px);
}

.history-section {
  margin-top: 31px;
}

.admin-panel {
  margin-top: 31px;
  padding: 23px;
  border: 1px solid #26374c;
  border-radius: 22px;
  color: white;
  background: linear-gradient(145deg, #101722, #1c2939);
  box-shadow: 0 18px 42px rgba(16, 23, 34, 0.22);
}

.admin-heading,
.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.admin-heading {
  margin-bottom: 20px;
}

.admin-badge {
  padding: 6px 9px;
  border: 1px solid rgba(20, 121, 247, 0.5);
  border-radius: 6px;
  color: #72b1ff;
  background: rgba(20, 121, 247, 0.12);
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.admin-toolbar label {
  flex: 1;
  color: #aab6c6;
}

.admin-toolbar select {
  border-color: #3b4b5f;
  color: white;
  background: #202d3d;
}

.admin-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin: 18px 0;
}

.admin-summary div {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.055);
}

.admin-summary span,
.admin-summary b {
  display: block;
}

.admin-summary span {
  margin-bottom: 4px;
  color: #9cabc0;
  font-size: 0.66rem;
}

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

.admin-farm-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.import-file-button {
  display: inline-grid;
  min-height: 40px;
  place-items: center;
  padding: 8px 14px;
  border: 1px solid #c6d8ec;
  border-radius: 11px;
  color: var(--blue-dark);
  background: var(--blue-soft);
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}

.admin-farms-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.admin-farm-row {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
}

.admin-farm-row textarea {
  font-family: inherit;
}

.admin-entry {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 13px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.065);
}

.admin-entry div:last-child {
  text-align: right;
}

.admin-entry strong,
.admin-entry b,
.admin-entry span {
  display: block;
}

.admin-entry span {
  margin-top: 3px;
  color: #9cabc0;
  font-size: 0.7rem;
}

.admin-panel .empty-state {
  border-color: #415166;
  background: rgba(255, 255, 255, 0.04);
}

.admin-users {
  margin: 20px 0;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.admin-users-heading {
  margin-bottom: 14px;
}

.admin-user-form {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1fr auto;
  gap: 10px;
  align-items: end;
}

.admin-user-form label {
  color: #aab6c6;
}

.admin-user-form input {
  border-color: #3b4b5f;
  color: white;
  background: #202d3d;
  text-transform: uppercase;
}

.admin-user-form input[type="password"] {
  text-transform: none;
}

.admin-user-form .primary-button {
  min-height: 46px;
  padding-inline: 18px;
}

.admin-users-list {
  display: grid;
  gap: 8px;
  margin-top: 15px;
}

.admin-user-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.065);
}

.admin-user-row span {
  display: block;
  margin-top: 3px;
  color: #9cabc0;
  font-size: 0.72rem;
}

.admin-user-row span b {
  color: white;
}

.admin-user-name {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.presence-badge {
  display: inline-block !important;
  margin-top: 0 !important;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 0.58rem !important;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.presence-badge.online {
  color: #74efb4;
  background: rgba(34, 181, 115, 0.16);
}

.presence-badge.offline {
  color: #aab6c6;
  background: rgba(255, 255, 255, 0.08);
}

.admin-user-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.admin-user-actions button {
  padding: 8px 10px;
  border: 1px solid #4a5d74;
  border-radius: 8px;
  color: white;
  background: #26364a;
  font-size: 0.7rem;
  font-weight: 800;
}

.admin-user-actions .delete-user {
  border-color: #81404a;
  color: #ffb7bf;
  background: #42242b;
}

.work-order-panel {
  border-top: 4px solid #1677f2;
}

.work-order-users {
  margin: 0;
  padding: 14px;
  border: 1px solid #ccd8e7;
  border-radius: 14px;
}

.work-order-users legend {
  padding: 0 6px;
  font-weight: 800;
  color: #34445a;
}

#workOrderUsersList {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 9px;
}

.work-order-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 9px 11px;
  border: 1px solid #d8e1ec;
  border-radius: 12px;
  background: #f7f9fc;
  cursor: pointer;
}

.work-order-user input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: #1677f2;
}

.work-order-user span,
.admin-work-order > div:first-child {
  display: grid;
  gap: 4px;
}

.work-order-user small,
.admin-work-order span,
.form-hint,
.empty-order-list {
  color: #66758a;
}

.form-hint,
.empty-order-list {
  margin: 0;
}

.admin-work-orders-list {
  display: grid;
  gap: 10px;
}

.admin-work-order {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid #d7e2ef;
  border-left: 4px solid #f0a000;
  border-radius: 12px;
  background: #fffaf0;
}

.empty-state.compact {
  padding: 24px 15px;
}

.export-button,
.text-button {
  border: 0;
  color: var(--blue-dark);
  background: transparent;
  font-weight: 850;
}

.export-button {
  padding: 10px 14px;
  border: 1px solid #b8d5f6;
  border-radius: 10px;
  background: var(--blue-soft);
}

.empty-state {
  padding: 42px 20px;
  border: 1px dashed #b9c5d1;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.55);
  text-align: center;
}

.empty-state h3 {
  margin-bottom: 6px;
}

.empty-state p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.empty-icon {
  display: grid;
  width: 44px;
  height: 44px;
  margin: 0 auto 14px;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: var(--blue);
  box-shadow: 0 8px 18px rgba(20, 121, 247, 0.22);
  font-weight: 900;
}

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

.entry-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 13px;
  align-items: center;
  padding: 15px;
  border: 1px solid #dde4eb;
  border-radius: 16px;
  background: white;
  box-shadow: 0 8px 22px rgba(16, 23, 34, 0.055);
}

.date-tile {
  display: grid;
  width: 51px;
  height: 55px;
  place-content: center;
  border-radius: 12px;
  text-align: center;
  color: white;
  background: linear-gradient(150deg, var(--navy-2), #2d3d52);
}

.date-tile b {
  font-size: 1.2rem;
  line-height: 1;
}

.date-tile span {
  margin-top: 3px;
  color: #aebbd0;
  font-size: 0.57rem;
  font-weight: 900;
  text-transform: uppercase;
}

.entry-main strong,
.entry-main span {
  display: block;
}

.entry-title {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.type-badge {
  width: fit-content;
  margin-top: 0 !important;
  padding: 3px 7px;
  border-radius: 5px;
  color: #075cc4 !important;
  background: var(--blue-soft);
  font-size: 0.61rem !important;
  font-weight: 900;
  letter-spacing: 0.025em;
}

.entry-main span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.76rem;
}

.entry-hours {
  text-align: right;
}

.entry-hours b {
  display: block;
  white-space: nowrap;
}

.entry-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 7px;
}

.entry-actions button {
  padding: 2px;
  border: 0;
  color: #607086;
  background: none;
  font-size: 0.69rem;
  font-weight: 700;
  text-decoration: underline;
}

dialog {
  width: min(calc(100% - 36px), 380px);
  padding: 24px;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(10, 19, 30, 0.35);
}

.login-dialog {
  width: min(calc(100% - 32px), 420px);
  text-align: center;
}

.login-dialog form {
  margin-top: 22px;
  text-align: left;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 20px 0 4px;
  padding: 4px;
  border-radius: 11px;
  background: #edf1f5;
}

.auth-tab {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  color: #647184;
  background: transparent;
  font-size: 0.78rem;
  font-weight: 850;
}

.auth-tab.active {
  color: var(--navy);
  background: white;
  box-shadow: 0 3px 10px rgba(16, 23, 34, 0.09);
}

.uppercase-input {
  text-transform: uppercase;
}

.auth-error {
  margin: 0;
}

.logout-button {
  margin-top: 20px;
  padding: 8px;
  border: 0;
  color: var(--danger);
  background: transparent;
  font-weight: 800;
}

.login-version {
  display: block;
  margin-top: 14px;
  color: #8792a2;
  font-size: 0.62rem;
  font-weight: 800;
}

.update-info-dialog {
  width: min(calc(100% - 32px), 430px);
}

.update-info-dialog .update-version {
  margin: 8px 0 16px;
  color: var(--blue-dark);
  font-weight: 900;
}

.update-info-dialog ul {
  margin: 0 0 22px;
  padding-left: 21px;
  color: #465568;
  line-height: 1.55;
}

.update-info-dialog li + li {
  margin-top: 8px;
}

.update-info-dialog .primary-button {
  width: 100%;
}

.forgot-button {
  margin-top: 13px;
  padding: 5px;
  border: 0;
  color: var(--blue-dark);
  background: transparent;
  font-size: 0.77rem;
  font-weight: 800;
}

.login-dialog .eyebrow {
  margin-top: 18px;
}

.login-logo {
  width: 155px;
  height: 94px;
  margin: 0 auto;
}

.login-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

dialog::backdrop {
  background: rgba(10, 18, 28, 0.64);
  backdrop-filter: blur(3px);
}

dialog p {
  color: var(--muted);
}

.dialog-actions {
  justify-content: flex-end;
  gap: 10px;
}

.dialog-actions button {
  min-width: 100px;
}

.secondary-button {
  color: var(--ink);
  background: #e8edf2;
}

.danger-button {
  color: white;
  background: var(--danger);
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 24px;
  left: 20px;
  z-index: 10;
  max-width: 440px;
  margin: auto;
  padding: 13px 18px;
  border-radius: 11px;
  color: white;
  background: var(--navy);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.24);
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: 0.2s ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.app-version {
  position: fixed;
  right: max(10px, env(safe-area-inset-right));
  bottom: max(8px, env(safe-area-inset-bottom));
  z-index: 2;
  padding: 4px 7px;
  border-radius: 7px;
  color: #657286;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 2px 10px rgba(16, 23, 34, 0.08);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  pointer-events: none;
}

@media (max-width: 480px) {
  .app-shell {
    padding-right: 13px;
    padding-left: 13px;
  }

  .logo-frame {
    width: 58px;
    height: 58px;
    border-radius: 14px;
  }

  .summary-card,
  .panel,
  .daily-note {
    padding: 18px;
    border-radius: 18px;
  }

  .summary-heading {
    align-items: flex-start;
    gap: 10px;
  }

  #monthPicker {
    max-width: 132px;
    padding: 10px;
    font-size: 0.8rem;
  }

  .summary-grid div {
    padding: 10px 8px;
  }

  .field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .field-row label:last-child {
    grid-column: 1 / -1;
  }

  .field-row.two-columns label:last-child {
    grid-column: auto;
  }

  .entry-card {
    grid-template-columns: auto 1fr;
  }

  .entry-hours {
    grid-column: 2;
    text-align: left;
  }

  .entry-actions {
    justify-content: flex-start;
  }

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

  .admin-toolbar .export-button {
    min-height: 46px;
  }

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

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

  .admin-user-row {
    grid-template-columns: 1fr;
  }

  .admin-user-actions {
    flex-wrap: wrap;
  }

  .admin-work-order {
    flex-direction: column;
  }

  #workOrderUsersList {
    grid-template-columns: 1fr;
  }
}
