﻿:root {
  --bg: #f2f5f7;
  --surface: #ffffff;
  --text: #162129;
  --muted: #5b6b77;
  --brand: #0f766e;
  --brand-press: #0b5d57;
  --line: #dbe3e8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Arial", sans-serif;
  background: radial-gradient(circle at top, #e3eef4 0%, var(--bg) 48%);
  color: var(--text);
}

.app-shell {
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 20px 16px 88px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.eyebrow,
.section-label {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1 {
  margin: 6px 0 0;
  font-size: 26px;
}

h2,
h3 {
  margin: 8px 0;
}

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

.main-action,
.placeholder,
.cut-sheet {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.action-row {
  margin-top: 16px;
  display: flex;
  gap: 10px;
}

button,
.primary-btn,
.done-btn {
  border: 0;
  border-radius: 12px;
  font-weight: 600;
  padding: 12px 14px;
  cursor: pointer;
}

.primary-btn,
.done-btn {
  display: inline-block;
  text-decoration: none;
  background: var(--brand);
  color: #fff;
}

.primary-btn:hover,
.done-btn:hover {
  background: var(--brand-press);
}

.done-btn:disabled {
  background: #cbd5db;
  color: #7a8b98;
  cursor: not-allowed;
}

.secondary-btn,
.ghost-btn,
.light-btn {
  background: #edf3f6;
  color: var(--text);
}

.mobile-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(100%, 480px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.mobile-nav a {
  text-decoration: none;
  text-align: center;
  color: var(--muted);
  padding: 14px 10px;
  font-weight: 600;
}

.mobile-nav a.active {
  color: var(--brand);
}

.mobile-nav a.donate-link {
  color: #b45309;
}

.mobile-nav a.donate-link:hover {
  color: #92400e;
}

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

.back-link {
  text-decoration: none;
  color: var(--brand);
  font-weight: 600;
}

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

.title-row h1 {
  margin-top: 4px;
}

.sheet-table {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.sheet-grid {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) minmax(0, 1fr) 64px 44px;
  gap: 7px;
  align-items: center;
  padding: 10px 8px;
}

.sheet-grid.head {
  background: #f4f8fa;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.row {
  border-top: 1px solid var(--line);
}

.cell-number {
  font-weight: 700;
  color: #0f172a;
  text-align: center;
}

.sheet-input {
  width: 100%;
  border: 1px solid #cfd9e0;
  border-radius: 10px;
  padding: 10px 8px;
  font-size: 15px;
}

.qty-input {
  text-align: center;
}

.row-action {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  border: 0;
  font-size: 44px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.row .row-action {
  justify-self: end;
}

.row-action.add {
  background: var(--brand);
  color: #ffffff;
}

.row-action.add:hover {
  background: var(--brand-press);
}

.row-action.delete {
  background: #fee2e2;
  color: #b91c1c;
  font-size: 20px;
}

.row-action.delete:hover {
  background: #fecaca;
}

.sheet-input.over-limit {
  color: #b91c1c;
  border-color: #ef4444;
  background: #fff5f5;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(7, 15, 23, 0.45);
  display: grid;
  place-items: center;
  padding: 18px;
  z-index: 100;
}

.modal-card {
  width: min(100%, 390px);
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid var(--line);
  padding: 16px;
}

.modal-card h2 {
  margin-top: 0;
  margin-bottom: 8px;
}

.modal-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
}

.modal-backdrop[hidden] {
  display: none;
}


.setup-empty {
  margin-top: 12px;
  color: #b45309;
  font-weight: 600;
}


.danger-btn {
  background: #dc2626;
  color: #ffffff;
}

.danger-btn:hover {
  background: #b91c1c;
}


.metric-row {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px dashed #bfd0da;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.metric-row strong {
  color: #0f172a;
  font-size: 20px;
}

.setup-controls {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.control-item {
  display: grid;
  gap: 6px;
}

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

.toggle-item {
  margin-top: 2px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fbfd;
}

.toggle-item input {
  width: 20px;
  height: 20px;
}

.formats-block {
  margin-top: 16px;
}

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

.format-btn {
  border: 1px solid #bfd0da;
  background: #f8fbfd;
  color: #1e2f3a;
  border-radius: 12px;
  padding: 10px 8px;
  font-size: 13px;
  font-weight: 700;
  min-height: 58px;
}

.format-btn.selected {
  border-color: var(--brand);
  background: #dff3f0;
  color: #0b5d57;
}

.format-btn:disabled {
  color: #97a6b2;
  background: #eef3f6;
  border-color: #d7e0e6;
  cursor: not-allowed;
}


.map-summary {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fbfd;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
}

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

.map-canvas-placeholder {
  margin-top: 14px;
  min-height: 260px;
  border: 1px dashed #9fb2bf;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fbfd 0%, #edf4f8 100%);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 18px;
}

.map-canvas-placeholder p {
  color: #3e5563;
  font-weight: 600;
}


.sheet-list {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.sheet-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  background: #ffffff;
}

.sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  color: #334155;
  font-size: 13px;
}

.map-svg {
  width: 100%;
  height: auto;
  border-radius: 0;
  background: #f8fafc;
}


.sheet-canvas {
  min-width: 0;
}

.map-part {
  cursor: pointer;
  transition: stroke-width 0.12s ease;
}

.map-selected {
  stroke: #dc2626 !important;
  stroke-width: 7 !important;
}

.map-size-label {
  fill: #0f172a;
  font-weight: 700;
  pointer-events: none;
}

.map-size-label.waste {
  fill: #475569;
  font-weight: 600;
}

.sheet-details-wrap {
  margin-top: 10px;
  border-top: 1px dashed #dbe3e8;
  padding-top: 8px;
}

.sheet-details-title {
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.sheet-details-list {
  margin: 6px 0 0;
  padding-left: 16px;
  color: #334155;
  font-size: 13px;
}

.map-tooltip {
  position: fixed;
  z-index: 999;
  background: rgba(15, 23, 42, 0.95);
  color: #f8fafc;
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  pointer-events: none;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.24);
  max-width: 240px;
}

.map-strip-label {
  fill: #1f3340;
  font-size: 30px;
  font-weight: 800;
  stroke: #f8fafc;
  stroke-width: 5;
  paint-order: stroke fill;
}

.map-strip-line {
  stroke: #90a4b1;
  stroke-width: 3;
}


.summary-row.priority span,
.summary-row.priority strong {
  color: #0f766e;
  font-weight: 800;
}









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

.map-actions button {
  width: 100%;
}

.pdf-status {
  margin-top: 10px;
  color: #475569;
  font-size: 13px;
}




.auth-shell {
  display: grid;
  place-items: center;
}

.auth-card {
  width: min(100%, 420px);
}

.auth-control {
  margin-top: 12px;
}

.auth-actions {
  margin-top: 12px;
}

h1.user-badge {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  margin-top: 8px;
  padding: 6px 12px;
  border: 1px solid #b8c8d3;
  border-radius: 12px;
  background: linear-gradient(180deg, #f3f8fb 0%, #e6eef4 100%);
  color: #0f3b4f;
  font-size: 22px;
  font-weight: 700;
}

.secondary-btn {
  display: inline-block;
  text-decoration: none;
}

.admin-status {
  margin-top: 12px;
  font-weight: 600;
}

.admin-table-wrap {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: auto;
  background: #ffffff;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 660px;
}

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

.admin-table th {
  background: #f4f8fa;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 11px;
}

.admin-muted {
  color: var(--muted);
  font-size: 12px;
  word-break: break-all;
}

.admin-delete-btn {
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
}


[hidden] {
  display: none !important;
}

.secondary-btn {
  border: 0;
  border-radius: 12px;
  font-weight: 600;
  padding: 12px 14px;
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
  background: #edf3f6;
  color: var(--text);
}

#existing-session-row {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.topbar-actions {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.admin-users-count {
  margin: 0;
  padding: 6px 10px;
  border: 1px solid #a7d8cf;
  border-radius: 10px;
  background: #e9f8f4;
  color: #0f766e;
  font-size: 12px;
  font-weight: 700;
}

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

.auth-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 8px;
}

.top-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.brand-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 6px;
}
