:root {
  color-scheme: light;
  --ui-scale: 0.67;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --card: #ffffff;
  --ink: #172033;
  --muted: #6b7280;
  --line: #dde5ef;
  --accent: #1267dd;
  --accent-2: #0f5fb8;
  --success: #0f8a65;
  --danger: #a33a2d;
  --shadow: 0 18px 50px rgba(34, 55, 92, 0.10);
  --soft-blue: #f3f8ff;
  --soft-blue-2: #e8f2ff;
  --button-blue: #1267dd;
  --button-blue-dark: #0757d9;
  --tap-size: 44px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  zoom: var(--ui-scale);
  font-family: "Segoe UI", Aptos, Tahoma, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(18, 103, 221, 0.08), transparent 30rem),
    linear-gradient(135deg, #fbfcff 0%, var(--bg) 62%, #eef4fb 100%);
  color: var(--ink);
}

.shell {
  width: min(100%, 1180px);
  margin: 0 auto 42px;
  padding: 10px;
  display: grid;
  gap: 14px;
}

.hero, .hero-brand, .section-head, .toolbar, .filters, .session-card {
  display: flex;
  align-items: stretch;
  gap: 12px;
}

.hero {
  flex-direction: column;
  justify-content: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.hero-brand {
  align-items: center;
}

.brand-mark {
  position: relative;
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background:
    linear-gradient(#fff, #fff) padding-box,
    conic-gradient(from 20deg, #e83f4f, #f5b33f, #1db06f, #1267dd, #e83f4f) border-box;
  border: 5px solid transparent;
  box-shadow: 0 10px 24px rgba(18, 103, 221, 0.12);
  transform: rotate(-8deg);
}

.brand-mark span {
  position: absolute;
  left: 14px;
  top: 15px;
  width: 24px;
  height: 14px;
  border-left: 5px solid #18a76b;
  border-bottom: 5px solid #18a76b;
  transform: rotate(-45deg);
}

.section-head {
  align-items: start;
  flex-direction: column;
  justify-content: space-between;
}
.section-head.compact { padding: 0; }
.collapsible-head {
  gap: 10px;
  align-items: center;
}
.collapse-toggle {
  min-height: 34px;
  padding: 8px 12px;
  font-size: 12px;
}

.panel, .card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 14px 34px rgba(34, 55, 92, 0.07);
  min-width: 0;
}

.panel { padding: 14px; }
.card { padding: 14px; }
.stack { display: grid; gap: 12px; align-content: start; }
.auth-grid, .content-grid, .admin-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.admin-tabs {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 28px rgba(34, 55, 92, 0.08);
}

.admin-tabs button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 10px 14px;
  background: transparent;
  color: var(--accent);
  border-color: #9db9dd;
}

.admin-tabs button.active-tab {
  background: linear-gradient(135deg, var(--button-blue), var(--button-blue-dark));
  border-color: var(--button-blue-dark);
  color: white;
}
.auth-grid .secondary-auth {
  grid-column: 1 / -1;
}

.auth-grid.auth-single {
  grid-template-columns: 1fr;
}

.auth-tools-grid {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}

summary {
  cursor: pointer;
  color: var(--accent);
  font: 700 14px/1.2 ui-sans-serif, system-ui, sans-serif;
}

.compact-form {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--soft-blue);
}

h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: "Segoe UI", Aptos, Tahoma, sans-serif; font-weight: 800; }
h1 { font-size: clamp(28px, 6vw, 42px); letter-spacing: -0.045em; line-height: 1.02; }
h2 { font-size: clamp(23px, 5vw, 30px); letter-spacing: -0.035em; }
h3 { font-size: 20px; }
.lede { max-width: 760px; color: var(--muted); font-size: 16px; line-height: 1.5; margin-top: 12px; }
.eyebrow {
  color: var(--accent-2);
  font: 700 12px/1.2 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
.inline-field { min-width: 0; }

input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(34, 55, 92, 0.02);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

textarea { min-height: 96px; resize: vertical; }

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #75a7ea;
  box-shadow: 0 0 0 4px rgba(18, 103, 221, 0.12);
}

.file-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px;
  background: #fff;
}
.file-picker input[type="file"] {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}
.file-picker-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 12px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  color: var(--accent);
  font-weight: 800;
  cursor: pointer;
}
.file-picker-name {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

button {
  border: 1px solid var(--accent);
  background: linear-gradient(135deg, var(--button-blue), var(--button-blue-dark));
  color: white;
  border-radius: 12px;
  min-height: var(--tap-size);
  padding: 12px 16px;
  font: 700 14px/1 ui-sans-serif, system-ui, sans-serif;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 10px 18px rgba(18, 103, 221, 0.12);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

button.ghost {
  background: #ffffff;
  color: var(--accent);
  border-color: #9db9dd;
  box-shadow: none;
}

button:hover:not(:disabled), .export-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(18, 103, 221, 0.16);
}

button.ghost:hover:not(:disabled) {
  background: var(--soft-blue);
}

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

.is-busy button,
.is-busy .export-link {
  cursor: progress;
}

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

.busy-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff7df;
  color: #7a4b00;
  font: 700 12px/1 ui-sans-serif, system-ui, sans-serif;
}

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(122, 75, 0, 0.25);
  border-top-color: #7a4b00;
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
}

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

.toolbar, .filters {
  flex-direction: column;
  flex-wrap: nowrap;
}
.toolbar > *, .filters > *, .session-card > * {
  width: 100%;
}
.session-card {
  justify-content: start;
  flex-direction: column;
}
.pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--soft-blue);
  color: var(--muted);
  overflow-wrap: anywhere;
}

.maps-profile-guide {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.maps-guide-card {
  display: grid;
  gap: 14px;
  padding: 18px 16px 14px;
  border: 1px solid #d9e5f4;
  border-radius: 16px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.maps-guide-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  color: var(--ink);
}

.guide-device-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.guide-device-icon::before {
  content: "";
  width: 16px;
  height: 25px;
  border: 3px solid var(--accent);
  border-radius: 5px;
  box-shadow: inset 0 -3px 0 rgba(18, 103, 221, 0.14);
}

.guide-device-icon.desktop::before {
  width: 30px;
  height: 20px;
  border-radius: 4px;
  box-shadow: 0 7px 0 -3px var(--accent);
}

.maps-guide-steps {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: maps-step;
}

.maps-guide-steps li {
  counter-increment: maps-step;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto 58px;
  gap: 10px;
  align-items: center;
  min-height: 38px;
  min-width: 0;
}

.maps-guide-card:nth-child(2) .maps-guide-steps li {
  grid-template-columns: 32px minmax(0, 1fr) auto minmax(82px, 112px);
}

.maps-guide-steps li > span:first-child {
  min-width: 0;
  line-height: 1.28;
}

.maps-guide-steps li::before {
  content: counter(maps-step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: #eaf2ff;
  color: var(--accent);
  font: 800 13px/1 ui-sans-serif, system-ui, sans-serif;
}

.mini-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  min-height: 34px;
  padding: 7px 18px;
  border: 1px solid #9db9dd;
  border-radius: 8px;
  background: #ffffff;
  color: var(--accent);
  font: 800 13px/1 ui-sans-serif, system-ui, sans-serif;
  text-decoration: none;
}

.guide-step-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  box-sizing: border-box;
  min-width: 40px;
  min-height: 34px;
  padding: 5px 8px;
  border: 1px solid #d7e5f6;
  border-radius: 8px;
  background: var(--soft-blue);
  color: #135da8;
  font: 800 11px/1 ui-sans-serif, system-ui, sans-serif;
  white-space: nowrap;
}

.guide-step-icon.svg-icon::before,
.guide-step-icon.svg-icon::after {
  display: none;
}

.guide-step-icon.svg-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.guide-step-icon.bare-icon {
  border-color: transparent;
  background: transparent;
}

.guide-step-icon.icon-only {
  width: 42px;
  min-width: 42px;
  padding: 0;
}

.guide-step-icon.icon-only.svg-icon {
  width: 44px;
  min-width: 44px;
  height: 38px;
}

.guide-step-icon.card-icon {
  width: 56px;
  min-width: 56px;
}

.guide-step-icon.icon-only::before,
.guide-step-icon.icon-only::after,
.gm-map-page::before,
.gm-map-page::after,
.gm-settings-profile::before,
.gm-settings-profile::after,
.gm-public-profile::before,
.gm-public-profile::after {
  content: "";
  position: absolute;
  display: block;
}

.gm-pin {
  border: 0;
  background: transparent;
}

.gm-pin::before {
  left: 9px;
  top: 4px;
  width: 17px;
  height: 17px;
  border-radius: 50% 50% 50% 0;
  background:
    radial-gradient(circle at 60% 42%, #ffffff 0 3px, transparent 3px),
    conic-gradient(from 25deg, #4285f4 0 25%, #34a853 0 50%, #fbbc04 0 75%, #ea4335 0);
  transform: rotate(-45deg);
  box-shadow: 0 2px 5px rgba(18, 103, 221, 0.18);
}

.gm-avatar::before {
  left: 7px;
  top: 5px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #e8f2ff;
  border: 1px solid #b7d4fb;
}

.gm-avatar::after {
  left: 14px;
  top: 9px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #1267dd;
  box-shadow: 0 9px 0 3px #1267dd;
}

.gm-profile-card::before {
  left: 5px;
  top: 7px;
  width: 24px;
  height: 16px;
  border: 1px solid #b7d4fb;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 0 0 0 4px #e8f2ff;
}

.gm-profile-card::after {
  left: 9px;
  top: 12px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #1267dd;
  box-shadow: 12px -1px 0 -2px #1267dd, 12px 5px 0 -2px #1267dd;
}

.gm-dots::before {
  left: 15px;
  top: 7px;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: #1267dd;
  box-shadow: 0 7px 0 #1267dd, 0 14px 0 #1267dd;
}

.gm-share::before {
  left: 7px;
  top: 14px;
  width: 20px;
  height: 2px;
  background: #1267dd;
  transform: rotate(-22deg);
}

.gm-share::after {
  left: 6px;
  top: 6px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #1267dd;
  box-shadow: 16px -4px 0 #1267dd, 16px 12px 0 #1267dd;
}

.gm-link::before {
  left: 7px;
  top: 9px;
  width: 10px;
  height: 7px;
  border: 2px solid #1267dd;
  border-right: 0;
  border-radius: 7px 0 0 7px;
  transform: rotate(-25deg);
}

.gm-link::after {
  right: 7px;
  top: 12px;
  width: 10px;
  height: 7px;
  border: 2px solid #1267dd;
  border-left: 0;
  border-radius: 0 7px 7px 0;
  transform: rotate(-25deg);
}

.guide-step-icon.wide {
  min-width: 0;
}

.guide-step-icon.wide.svg-icon {
  width: 104px;
  max-width: 100%;
  min-width: 0;
  height: 48px;
  padding: 4px;
}

.guide-step-icon.profile-settings-icon {
  width: 80px;
  max-width: 100%;
  min-width: 0;
  height: 42px;
  background: transparent;
  border-color: transparent;
}

.guide-step-icon.public-profile-icon {
  height: 48px;
}

.gm-map-page {
  width: 78px;
  min-height: 44px;
  background:
    linear-gradient(90deg, transparent 0 29%, #dfeafa 29% 31%, transparent 31% 62%, #dfeafa 62% 64%, transparent 64%),
    linear-gradient(0deg, transparent 0 48%, #dfeafa 48% 50%, transparent 50%),
    #ffffff;
}

.gm-map-page::before {
  left: 32px;
  top: 12px;
  width: 14px;
  height: 14px;
  border-radius: 50% 50% 50% 0;
  background:
    radial-gradient(circle at 60% 42%, #ffffff 0 2px, transparent 2px),
    conic-gradient(from 25deg, #4285f4 0 25%, #34a853 0 50%, #fbbc04 0 75%, #ea4335 0);
  transform: rotate(-45deg);
}

.gm-map-page::after {
  right: 6px;
  top: 6px;
  width: 14px;
  height: 10px;
  border-radius: 2px;
  background: #fbbc04;
  box-shadow: -8px 8px 0 #34a853, -20px 3px 0 #4285f4;
  opacity: 0.8;
}

.gm-settings-profile {
  width: 92px;
}

.gm-settings-profile::before {
  left: 12px;
  top: 12px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #e8f2ff;
  box-shadow: inset 0 0 0 1px #b7d4fb;
}

.gm-settings-profile::after {
  left: 19px;
  top: 15px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #1267dd;
  box-shadow: 0 8px 0 3px #1267dd, 36px 2px 0 -1px #6b7280, 42px 2px 0 -1px #6b7280, 48px 2px 0 -1px #6b7280;
}

.gm-public-profile {
  width: 92px;
  background:
    linear-gradient(90deg, transparent 0 30%, #d7e5f6 30% 32%, transparent 32%),
    #ffffff;
}

.gm-public-profile::before {
  left: 9px;
  top: 10px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #e8f2ff;
  box-shadow: inset 0 0 0 1px #b7d4fb;
}

.gm-public-profile::after {
  left: 16px;
  top: 13px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #1267dd;
  box-shadow: 0 8px 0 3px #1267dd, 28px -1px 0 -1px #1267dd, 28px 6px 0 -1px #1267dd, 44px -1px 0 -1px #1267dd, 44px 6px 0 -1px #1267dd;
}

.guide-step-icon.url {
  justify-content: start;
  max-width: 260px;
  min-width: 0;
  padding-left: 24px;
  padding-right: 28px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--muted);
}

.guide-step-icon.url.svg-icon {
  width: 180px;
  min-width: 0;
  max-width: 100%;
  height: 34px;
  padding: 0;
  background: transparent;
  border-color: transparent;
}

.gm-url-bar::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 10px;
  width: 8px;
  height: 7px;
  border: 2px solid #6b7280;
  border-radius: 2px;
}

.gm-url-bar::after {
  content: "";
  position: absolute;
  right: 9px;
  top: 8px;
  width: 12px;
  height: 14px;
  border: 2px solid #1267dd;
  border-radius: 2px;
  box-shadow: -4px 4px 0 -1px #ffffff, -5px 5px 0 #1267dd;
}

.maps-link-label {
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
}

.item {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  min-width: 0;
  overflow-wrap: anywhere;
  box-shadow: 0 8px 22px rgba(34, 55, 92, 0.04);
}

.item .item {
  background: var(--soft-blue);
}

.user-dashboard {
  background: rgba(255, 255, 255, 0.94);
}

.next-step-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 8px 0 14px;
  padding: 14px 16px;
  border: 1px solid #bcd5fb;
  border-radius: 18px;
  background: linear-gradient(135deg, #f5f9ff 0%, #ffffff 100%);
  box-shadow: 0 12px 28px rgba(18, 103, 221, 0.08);
}

.next-step-marker {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  min-width: 72px;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #eaf2ff;
  color: var(--accent);
  font-weight: 800;
}

.next-step-card h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.next-step-card p {
  margin: 0;
  color: var(--muted);
}

.user-dashboard > .toolbar {
  align-items: end;
  gap: 14px;
  margin: 2px 0 14px;
}

.user-dashboard .inline-field {
  min-width: min(100%, 230px);
}

.user-dashboard .content-grid {
  align-items: stretch;
}

.dashboard-card {
  background: #ffffff;
  border-color: #dfe7f1;
  box-shadow: 0 12px 30px rgba(34, 55, 92, 0.05);
}

.submissions-card {
  min-height: 440px;
}

.assigned-task-card {
  gap: 14px;
  padding: 18px;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: inset 0 0 0 1px rgba(18, 103, 221, 0.02);
}

.assigned-task-header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
}

.task-map-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: #f8fbff;
  box-shadow: 0 10px 24px rgba(18, 103, 221, 0.10);
}

.map-pin {
  position: relative;
  width: 26px;
  height: 34px;
  border-radius: 50% 50% 50% 0;
  background: conic-gradient(from 210deg, #1267dd 0 28%, #1fb86b 28% 55%, #f4bf38 55% 76%, #e4444f 76% 100%);
  transform: rotate(-45deg);
}

.map-pin::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffffff;
}

.compact-stack {
  gap: 8px;
}

.assigned-task-divider {
  height: 1px;
  background: var(--line);
}

.workflow-title {
  margin: 2px 0;
  text-align: left;
  font-size: 17px;
}

.workflow-steps {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.workflow-step {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #1267dd;
  color: #ffffff;
  font: 800 14px/1 ui-sans-serif, system-ui, sans-serif;
}

.step-label {
  font-weight: 800;
}

.step-action {
  grid-column: auto;
}

.step-action button,
.step-action .export-link {
  width: auto;
  min-width: 150px;
  min-height: 38px;
  border-color: #9db9dd;
  border-radius: 10px;
  color: #135da8;
  background: #ffffff;
}

.review-text-preview {
  width: fit-content;
  padding: 0;
  border: 0;
  background: transparent;
}

.review-text-preview summary {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 8px 16px;
  border: 1px solid #9db9dd;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 800;
  color: #135da8;
  background: #ffffff;
}

.wide-action {
  width: 100%;
  border-radius: 10px;
  background: linear-gradient(135deg, #1f76f2, #0757d9);
  border-color: #0757d9;
  box-shadow: 0 10px 18px rgba(18, 103, 221, 0.18);
}

.user-row {
  padding: 0;
}

.user-row summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: var(--tap-size);
  padding: 14px;
  cursor: pointer;
  list-style-position: inside;
}

.user-row summary strong {
  min-width: 0;
}

.user-row-body {
  display: grid;
  gap: 8px;
  padding: 0 14px 14px;
}

.admin-section.hidden {
  display: none !important;
}

.admin-section[data-admin-section="users"] {
  grid-column: 1 / -1;
}

.admin-section.is-collapsed > :not(.section-head) {
  display: none !important;
}

.detail-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #b9d6ee;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff, var(--soft-blue));
  box-shadow: 0 14px 34px rgba(34, 55, 92, 0.08);
}

.master-detail {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

.inline-edit {
  padding: 12px;
  border: 1px dashed #b9d6ee;
  border-radius: 16px;
  background: var(--soft-blue);
}

.item strong { font-size: 16px; }
.muted { color: var(--muted); }
.error { color: var(--danger); }
.hidden { display: none !important; }
.helper-text {
  margin: -2px 0 2px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

a { color: var(--accent); overflow-wrap: anywhere; }
.export-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  min-height: var(--tap-size);
  border: 1px solid #9db9dd;
  border-radius: 12px;
  padding: 9px 12px;
  text-decoration: none;
  background: #fff;
  color: var(--accent);
  font: 700 13px/1 ui-sans-serif, system-ui, sans-serif;
  box-shadow: none;
}

.assigned-task-card > a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: #135da8;
  font-size: 14px;
}

.assigned-task-card > a::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid #6b7280;
  border-right: 0;
  border-top: 0;
  border-radius: 4px;
  transform: rotate(-35deg);
}

.empty-state {
  min-height: 360px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  text-align: center;
  color: var(--muted);
}

.empty-illustration {
  position: relative;
  width: 86px;
  height: 68px;
  margin-bottom: 14px;
  border-radius: 10px 10px 16px 16px;
  background: linear-gradient(180deg, #e8f2ff, #cddffc);
  box-shadow: inset 0 -12px 0 rgba(18, 103, 221, 0.12);
}

.empty-illustration::before {
  content: "";
  position: absolute;
  left: 22px;
  top: -22px;
  width: 42px;
  height: 48px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid #d9e5f4;
  box-shadow: 0 10px 20px rgba(34, 55, 92, 0.08);
}

.empty-illustration span::before,
.empty-illustration span::after {
  content: "";
  position: absolute;
  z-index: 2;
  left: 34px;
  width: 22px;
  height: 4px;
  border-radius: 999px;
  background: #f0b73e;
  box-shadow: 0 12px 0 #56a3ff;
}

.empty-illustration span::before { top: -8px; }

.empty-illustration span::after {
  top: 6px;
  background: #56a3ff;
  box-shadow: 0 12px 0 #f0b73e;
}

.card-title-with-icon {
  display: flex;
  align-items: center;
  gap: 16px;
}

.complete-icon {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 2px solid var(--success);
  border-radius: 999px;
}

.complete-icon::after {
  content: "";
  position: absolute;
  left: 11px;
  top: 11px;
  width: 16px;
  height: 9px;
  border-left: 3px solid var(--success);
  border-bottom: 3px solid var(--success);
  transform: rotate(-45deg);
}

.completed-card {
  min-height: 132px;
}

.status-panel {
  display: flex;
  align-items: center;
  gap: 18px;
  background: #ffffff;
}

.admin-status-panel {
  margin: 12px 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 10px 26px rgba(34, 55, 92, 0.06);
}

.status-icon {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 38px;
  height: 30px;
}

.status-icon::before {
  content: "";
  position: absolute;
  inset: 4px 2px;
  background: linear-gradient(135deg, transparent 0 28%, #1267dd 28% 36%, transparent 36% 45%, transparent 45% 56%, #1267dd 56% 64%, transparent 64%);
}
.pager {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
}
.metrics-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.metric {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(34, 55, 92, 0.04);
}
.metric strong {
  display: block;
  font-size: 24px;
  letter-spacing: -0.04em;
}
.status-ok { color: var(--success); }
.status-missing { color: var(--danger); }
.status-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--soft-blue);
  color: var(--muted);
  font: 700 12px/1 ui-sans-serif, system-ui, sans-serif;
}
.status-waiting_for_user { background: #fff7df; color: #7a4b00; border-color: #efd89b; }
.status-waiting_for_review { background: #e9f3ff; color: #174f80; border-color: #b9d6ee; }
.status-needs_fix { background: #fff0eb; color: var(--danger); border-color: #e8c0b7; }
.status-completed_paid { background: #e7f6ef; color: var(--accent); border-color: #b8dece; }
.status-waiting_verification { background: #fff3e8; color: #9a4300; border-color: #ff7a1a; }
.status-waiting_for_task { background: #eef2ff; color: #1b23a8; border-color: #1f2ed1; }
.status-task_assigned { background: #fff9db; color: #786000; border-color: #e4c600; }
.status-task_submitted { background: #f3e8ff; color: #6b1ec8; border-color: #7b22ce; }
.status-task_confirmed { background: #e8fff2; color: #04753f; border-color: #04b763; }
.status-rejected { background: #fff0ef; color: #b90f0f; border-color: #e31b1b; }
.status-expired, .status-cancelled { background: #f0f0ee; color: #62625f; }
.workflow-filters {
  align-items: center;
}
.workflow-filter {
  min-height: 46px;
  padding-inline: 18px;
  border-width: 2px;
  background: #ffffff;
  white-space: normal;
  color: var(--accent);
  box-shadow: none;
}
.workflow-waiting-verification { border-color: #ff7a1a; }
.workflow-waiting-task { border-color: #1f2ed1; }
.workflow-task-assigned { border-color: #e4c600; }
.workflow-task-submitted { border-color: #7b22ce; }
.workflow-task-confirmed { border-color: #04b763; }
.workflow-rejected { border-color: #e31b1b; }
.workflow-all { border-color: var(--accent); color: var(--accent); }
.workflow-filter:not(.ghost) {
  background: var(--soft-blue);
  box-shadow: inset 0 -3px 0 rgba(18, 103, 221, 0.14);
}
code {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  background: var(--soft-blue-2);
  padding: 4px 7px;
  border-radius: 8px;
}

pre {
  margin: 8px 0 0;
  white-space: pre-wrap;
  overflow-x: auto;
  max-width: 100%;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

@media (min-width: 560px) {
  .shell {
    padding: 16px;
    gap: 18px;
  }
  .panel, .card { padding: 18px; }
  .hero { padding: 24px; }
  .toolbar, .filters, .session-card {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .toolbar > *, .filters > *, .session-card > * {
    width: auto;
  }
  .inline-field { min-width: 180px; }
  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .maps-profile-guide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .auth-tools-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .export-link {
    align-self: center;
  }
}

@media (min-width: 821px) {
  .shell {
    width: min(1180px, calc(100vw - 32px));
    margin-top: 30px;
    padding: 0;
  }
  .hero {
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    padding: 28px;
    border-radius: 26px;
  }
  .section-head {
    align-items: center;
    flex-direction: row;
  }
  .auth-grid, .content-grid, .admin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
  .master-detail {
    grid-template-columns: minmax(320px, 0.8fr) minmax(520px, 1.2fr);
  }
  .master-detail > .detail-panel {
    position: sticky;
    top: 76px;
    max-height: none;
    overflow: auto;
  }
  .admin-create-grid > .card:last-child {
    grid-column: 1 / -1;
  }
  .panel, .card {
    border-radius: 22px;
  }
  .panel { padding: 22px; }
  .card { padding: 18px; }
  .lede { font-size: 18px; }
  .user-dashboard > .toolbar {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) minmax(140px, 1fr) minmax(180px, 1fr) auto auto;
  }
  .user-dashboard > .toolbar .inline-field {
    min-width: 0;
  }
}

@media (min-width: 821px) and (min-height: 760px) {
  .master-detail > .detail-panel {
    max-height: calc(100vh - 96px);
  }
}

@media (max-width: 380px) {
  .shell { padding: 8px; }
  .panel, .card, .hero { padding: 12px; }
  button, .export-link { padding-inline: 12px; }
}

@media (max-width: 640px) {
  .hero-brand {
    align-items: flex-start;
  }
  .brand-mark {
    width: 46px;
    height: 46px;
    border-width: 4px;
  }
  .workflow-step {
    grid-template-columns: auto 1fr;
  }
  .step-action {
    grid-column: 1 / -1;
  }
  .step-action button,
  .step-action .export-link {
    width: 100%;
  }
  .empty-state {
    min-height: 220px;
  }
}
