:root {
  --gold: #b4934d;
  --gold-2: #9f7d38;
  --gold-3: #d2b76f;
  --bg: #f7f4ec;
  --surface: #ffffff;
  --surface-2: #fbf8f0;
  --surface-glass: rgba(255, 255, 255, 0.94);
  --surface-glass-2: rgba(255, 255, 255, 0.82);
  --card-bg: rgba(255, 255, 255, 0.97);
  --input-bg: #ffffff;
  --pill-bg: #f2ead9;
  --nav-active: #f4ead4;
  --table-head: #f2ead9;
  --map-bg: linear-gradient(135deg, #f2ead8 0%, #ffffff 46%, #ede2ca 100%);
  --body-wash: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(247, 244, 236, 0.98));
  --mobile-wash: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 244, 236, 1));
  --login-cover-bg: linear-gradient(180deg, #ffffff 0%, #f7f1e3 100%);
  --login-cover-ink: #191610;
  --ink: #191610;
  --muted: #6f6654;
  --line: #dfd2b9;
  --green: var(--gold);
  --green-2: var(--gold-2);
  --amber: #c78320;
  --red: #b5473f;
  --blue: #4d627a;
  --steel: #5b513e;
  --shadow: 0 18px 50px rgba(25, 22, 16, 0.13);
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

body[data-theme="dark"] {
  --bg: #050505;
  --surface: #0d0c0a;
  --surface-2: #16130e;
  --surface-glass: rgba(7, 7, 6, 0.94);
  --surface-glass-2: rgba(10, 9, 7, 0.86);
  --card-bg: rgba(13, 12, 10, 0.97);
  --input-bg: #070706;
  --pill-bg: #211b10;
  --nav-active: #261f12;
  --table-head: #1d180f;
  --map-bg: linear-gradient(135deg, #15110a 0%, #050505 48%, #251d10 100%);
  --body-wash: linear-gradient(180deg, rgba(0, 0, 0, 0.92), rgba(5, 5, 5, 0.99));
  --mobile-wash: linear-gradient(180deg, rgba(0, 0, 0, 0.96), rgba(5, 5, 5, 1));
  --login-cover-bg: linear-gradient(180deg, #000000 0%, #0d0a05 100%);
  --login-cover-ink: #f7f0df;
  --ink: #f7f0df;
  --muted: #b9aa87;
  --line: #3b301a;
  --green: var(--gold);
  --green-2: var(--gold-3);
  --amber: #d2a04a;
  --red: #da6a61;
  --blue: #9aa6b8;
  --steel: #d5c398;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.34);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  max-width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--body-wash);
  background-attachment: fixed;
  background-position: center;
  background-size: cover;
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

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

.shell {
  max-width: 100%;
  min-width: 0;
  min-height: 100vh;
  backdrop-filter: blur(2px);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-width: 0;
  max-width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(16px, 3vw, 36px);
  border-bottom: 1px solid rgba(217, 223, 218, 0.78);
  background: var(--surface-glass);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-logo {
  display: inline-flex;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.topbar .brand-logo {
  width: 72px;
  height: 72px;
  flex-basis: 72px;
  border-radius: 14px;
}

.brand-logo img {
  display: block;
  width: 92%;
  height: 92%;
  object-fit: contain;
}

.logo-fallback {
  display: none;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--green-2);
  font-size: 17px;
  font-weight: 950;
  letter-spacing: 0;
}

.brand-logo .logo-dark,
body[data-theme="dark"] .brand-logo .logo-light {
  display: none;
}

body[data-theme="dark"] .brand-logo .logo-dark {
  display: block;
}

.brand-logo:not(:has(img)) .logo-fallback {
  display: grid;
}

.brand-logo.large {
  width: min(340px, 82vw);
  height: min(340px, 82vw);
  margin-top: 34px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

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

.brand-logo.large .logo-fallback {
  font-size: 92px;
}

.brand h1 {
  margin: 0;
  font-size: 19px;
  line-height: 1.05;
}

.brand p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.userbox {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--steel);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.pill.warn,
.pill.status-rejected {
  background: rgba(181, 71, 63, 0.14);
  color: var(--red);
}

.pill.status-approved {
  background: rgba(180, 147, 77, 0.2);
  color: var(--gold-2);
}

.pill.status-pending {
  background: var(--pill-bg);
  color: var(--steel);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--green);
  color: #0b0905;
  font-weight: 750;
  line-height: 1;
}

.btn:hover {
  background: var(--green-2);
}

body[data-theme="dark"] .btn:hover {
  color: #050505;
}

.btn.secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.btn.secondary:hover {
  background: var(--surface-2);
}

body[data-theme="dark"] .btn.secondary:hover,
body[data-theme="dark"] .nav button.active,
body[data-theme="dark"] .nav button:hover {
  border-color: var(--gold);
  background: var(--gold);
  color: #050505;
}

.btn.warning {
  background: var(--amber);
}

.btn.danger {
  background: var(--red);
}

.btn.icon {
  width: 38px;
  padding: 0;
}

.login-wrap {
  display: grid;
  max-width: 100%;
  overflow-x: hidden;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(920px, 100%);
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: var(--surface-glass);
  box-shadow: var(--shadow);
}

.login-grid {
  display: grid;
  min-width: 0;
  grid-template-columns: 1.05fr 0.95fr;
}

.login-cover {
  min-width: 0;
  min-height: 520px;
  padding: 38px;
  background: var(--login-cover-bg);
  color: var(--login-cover-ink);
}

.login-cover h2 {
  margin: 0;
  max-width: 10ch;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 0.92;
  letter-spacing: 0;
}

.login-cover p {
  max-width: 32ch;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 17px;
}

.login-form {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  padding: 38px;
}

.login-form h3 {
  margin: 0 0 4px;
  font-size: 26px;
}

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

.field label {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--input-bg);
  color: var(--ink);
  padding: 8px 11px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(15, 123, 97, 0.14);
  outline: 0;
}

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

.address-suggestions {
  display: grid;
  gap: 6px;
}

.address-suggestion {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink);
  text-align: left;
}

.address-suggestion:hover {
  border-color: var(--green);
  background: var(--nav-active);
}

.address-suggestion strong {
  font-size: 13px;
}

.address-suggestion span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.empty-suggestion,
.selected-suggestion {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.error {
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
}

.error-text {
  color: var(--red) !important;
}

.layout {
  display: grid;
  min-width: 0;
  max-width: 100%;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 0;
}

.sidebar {
  position: sticky;
  top: 69px;
  align-self: start;
  height: calc(100vh - 69px);
  padding: 18px 14px;
  border-right: 1px solid rgba(217, 223, 218, 0.82);
  background: var(--surface-glass-2);
  backdrop-filter: blur(18px);
}

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

.nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 9px 10px;
  border-radius: 6px;
  background: transparent;
  color: var(--steel);
  font-weight: 750;
  text-align: left;
}

.nav button.active,
.nav button:hover {
  background: var(--nav-active);
  color: var(--green-2);
}

.main {
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  padding: clamp(16px, 3vw, 32px);
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.page-head h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: 0;
}

.page-head p {
  margin: 5px 0 0;
  color: var(--muted);
}

.section {
  margin-top: 18px;
}

.grid {
  display: grid;
  min-width: 0;
  gap: 14px;
}

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

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

.card {
  min-width: 0;
  max-width: 100%;
  border: 1px solid rgba(217, 223, 218, 0.9);
  border-radius: 8px;
  background: var(--card-bg);
  box-shadow: 0 12px 30px rgba(31, 39, 36, 0.07);
}

.card.pad {
  padding: 16px;
}

.project-card {
  display: grid;
  gap: 16px;
}

.project-filter {
  margin-bottom: 14px;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-tabs button {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--steel);
  font-weight: 800;
}

.filter-tabs button.active,
.filter-tabs button:hover {
  border-color: var(--green);
  background: var(--nav-active);
  color: var(--green-2);
}

body[data-theme="dark"] .filter-tabs button.active,
body[data-theme="dark"] .filter-tabs button:hover {
  background: var(--gold);
  color: #050505;
}

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

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

.project-media-section {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

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

.project-section-title {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.task-list {
  display: grid;
  gap: 9px;
}

.task-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.task-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.task-status-open {
  background: rgba(199, 131, 32, 0.16);
  color: var(--amber);
}

.task-status-progress {
  background: rgba(77, 98, 122, 0.16);
  color: var(--blue);
}

.task-status-done {
  background: rgba(180, 147, 77, 0.2);
  color: var(--gold-2);
}

.task-status-checked {
  background: rgba(15, 123, 97, 0.18);
  color: var(--green-2);
}

.task-priority-urgent {
  background: rgba(181, 71, 63, 0.16);
  color: var(--red);
}

.task-comments {
  display: grid;
  gap: 8px;
}

.comment-item {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.comment-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.comment-item p {
  margin: 0;
  color: var(--steel);
  font-size: 13px;
  line-height: 1.35;
}

.project-weather {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.project-weather span {
  color: var(--steel);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.project-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(126px, 1fr));
  gap: 10px;
}

.project-thumb {
  display: grid;
  gap: 7px;
  min-height: 126px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink);
  text-align: left;
  text-decoration: none;
}

.project-thumb:hover {
  border-color: var(--green);
  background: var(--nav-active);
}

.project-thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  background: var(--input-bg);
}

.project-thumb span {
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
}

.file-icon {
  display: grid;
  min-height: 94px;
  place-items: center;
  border-radius: 6px;
  background: rgba(180, 147, 77, 0.16);
  color: var(--green-2);
  font-weight: 900;
}

.file-btn {
  width: fit-content;
}

.file-btn input {
  display: none;
}

.empty.small {
  min-height: auto;
  padding: 10px;
  font-size: 13px;
}

.metric {
  min-height: 110px;
}

.announcement {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  border-color: rgba(180, 147, 77, 0.55);
  background:
    linear-gradient(135deg, rgba(180, 147, 77, 0.13), transparent 54%),
    var(--card-bg);
}

.announcement h3 {
  margin: 0;
}

.announcement.editor {
  grid-template-columns: minmax(220px, 0.7fr) minmax(280px, 1.2fr) auto;
  align-items: end;
}

.announcement-text {
  font-size: 18px;
  font-weight: 750;
  line-height: 1.45;
}

.announcement-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

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

.metric .value {
  margin-top: 10px;
  font-size: 34px;
  font-weight: 850;
}

.metric .sub {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.timer-card {
  display: grid;
  min-width: 0;
  gap: 16px;
}

.reminder-card {
  display: grid;
  align-content: start;
  gap: 12px;
}

.reminder-card h3 {
  margin: 0;
}

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

.weather-overview {
  display: grid;
  gap: 12px;
}

.weather-project-grid {
  display: grid;
  gap: 12px;
}

.weather-project {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

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

.weather-day {
  display: grid;
  align-content: start;
  gap: 5px;
  min-height: 132px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-bg);
}

.weather-date {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.weather-temp {
  color: var(--green-2);
  font-size: 20px;
  font-weight: 900;
}

.weather-desc,
.weather-meta {
  color: var(--steel);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.reminder-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 70;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  width: min(360px, calc(100vw - 36px));
  padding: 14px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.reminder-toast strong,
.reminder-toast span {
  grid-column: 1;
}

.reminder-toast span {
  color: var(--muted);
  font-size: 13px;
}

.reminder-toast button {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: start;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink);
}

.gps-status {
  margin: -6px 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--card-bg);
  color: var(--steel);
  font-size: 13px;
  font-weight: 750;
}

.timer-face {
  display: grid;
  min-height: 160px;
  place-items: center;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 123, 97, 0.12), rgba(29, 101, 166, 0.12)),
    var(--surface);
  border: 1px solid var(--line);
}

.timer-value {
  font-variant-numeric: tabular-nums;
  font-size: clamp(42px, 10vw, 86px);
  font-weight: 900;
  line-height: 1;
}

.timer-status {
  margin-top: 8px;
  color: var(--muted);
  font-weight: 750;
  text-align: center;
}

.actions {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 10px;
}

.form-row {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

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

.file-action {
  position: relative;
  min-width: 0;
  overflow: hidden;
  text-align: center;
  white-space: normal;
}

.file-action input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  opacity: 0;
}

.table-wrap {
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

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

th,
td {
  padding: 12px 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  background: var(--table-head);
  color: var(--steel);
  font-size: 12px;
  text-transform: uppercase;
}

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

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-weight: 750;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--muted);
}

.dot.active {
  background: var(--green);
}

.dot.pause {
  background: var(--amber);
}

.dot.offline {
  background: var(--red);
}

.map-board {
  position: relative;
  overflow: hidden;
  min-height: 500px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(62, 85, 80, 0.12) 1px, transparent 1px),
    linear-gradient(rgba(62, 85, 80, 0.12) 1px, transparent 1px),
    var(--map-bg);
  background-size:
    44px 44px,
    44px 44px,
    cover;
}

.map-config {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(240px, 0.9fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.map-config strong,
.map-config span {
  display: block;
}

.map-config span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.google-map-shell {
  position: relative;
  overflow: hidden;
  min-height: 540px;
  border-radius: 8px;
}

.google-map {
  width: 100%;
  min-height: 540px;
}

.map-provider-status {
  position: absolute;
  left: 12px;
  bottom: 12px;
  max-width: min(520px, calc(100% - 24px));
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--card-bg);
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.14);
}

.map-road {
  position: absolute;
  height: 34px;
  border-radius: 999px;
  background: rgba(91, 103, 97, 0.28);
  transform-origin: center;
}

.map-road.one {
  left: -8%;
  top: 22%;
  width: 72%;
  transform: rotate(-14deg);
}

.map-road.two {
  right: -10%;
  top: 58%;
  width: 82%;
  transform: rotate(16deg);
}

.map-road.three {
  left: 32%;
  top: -5%;
  width: 34px;
  height: 112%;
  transform: rotate(8deg);
}

.pin {
  position: absolute;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 6px;
  background: var(--green);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2);
  color: #0b0905;
  font-weight: 850;
  transform: translate(-50%, -100%) rotate(-45deg);
}

.pin span {
  transform: rotate(45deg);
}

.pin.pause {
  background: var(--amber);
}

.pin.offline {
  background: var(--red);
  color: #fff;
}

.pin-label {
  position: absolute;
  min-width: 130px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--card-bg);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
  transform: translate(-50%, 5px);
}

.map-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  font-weight: 750;
  text-align: center;
}

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

.toolbar .field {
  min-width: 170px;
}

.manual-entry {
  margin-bottom: 14px;
}

.manual-entry h3 {
  margin: 0;
}

.manual-entry-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 10px;
  align-items: end;
  margin-top: 12px;
}

.manual-note {
  min-width: 220px;
  grid-column: span 2;
}

.report-settings {
  margin-bottom: 14px;
}

.report-settings h3 {
  margin: 0;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
  align-items: end;
  margin-top: 12px;
}

.check-item.compact {
  align-self: end;
  min-height: 42px;
}

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

.person-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.person-name {
  font-weight: 850;
}

.person-meta {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(23, 30, 28, 0.42);
}

.modal {
  width: min(680px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.modal header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.modal header h3 {
  margin: 0;
}

.modal-body {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.entry-photo-preview {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.compact-head {
  margin-bottom: 12px;
}

.focus-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}

.focus-strip h3 {
  margin: 4px 0 0;
  font-size: clamp(20px, 3vw, 28px);
}

.focus-strip p {
  margin: 4px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.project-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.project-search .hint {
  padding-bottom: 12px;
  white-space: nowrap;
}

.timer-actions .btn {
  min-height: 48px;
  font-size: 16px;
}

.nav button {
  min-width: 0;
}

.nav button span:last-child {
  overflow-wrap: anywhere;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 18px 18px;
}

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

.check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
}

.check-item input {
  width: 18px;
  height: 18px;
}

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

@media (max-width: 920px) {
  .login-grid,
  .layout,
  .grid.cols-2,
  .grid.cols-3,
  .form-row,
  .focus-strip,
  .project-search {
    grid-template-columns: 1fr;
  }

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

  .login-cover {
    min-height: 330px;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

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

  .userbox {
    width: 100%;
    justify-content: space-between;
  }

  .project-search .hint {
    padding-bottom: 0;
    white-space: normal;
  }

  .map-config {
    grid-template-columns: 1fr;
  }

  .announcement.editor {
    grid-template-columns: 1fr;
  }

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

  .manual-note,
  .settings-grid {
    grid-column: auto;
  }

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

  .project-weather {
    grid-template-columns: 1fr;
  }

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

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

  .task-item {
    grid-template-columns: 1fr;
  }

  .task-badges {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  body {
    background-image: var(--mobile-wash);
  }

  .login-wrap,
  .main {
    padding: 12px;
  }

  .login-form,
  .login-cover {
    padding: 24px;
  }

  .topbar .brand-logo {
    width: 56px;
    height: 56px;
    flex-basis: 56px;
  }

  .brand h1 {
    font-size: 17px;
  }

  .userbox .btn,
  .userbox .pill {
    flex: 1 1 120px;
    justify-content: center;
  }

  .page-head {
    display: grid;
  }

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

  .actions .btn {
    flex: 1 1 130px;
  }

  .photo-actions {
    grid-template-columns: 1fr;
  }

  .timer-actions {
    position: sticky;
    bottom: 10px;
    z-index: 10;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-glass);
    backdrop-filter: blur(16px);
  }

  .timer-actions .btn {
    flex: 1 1 100%;
  }

  .timer-value {
    font-size: clamp(38px, 16vw, 62px);
  }

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

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

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