@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Manrope:wght@400;500;700&family=Sora:wght@300;600;800&display=swap");

:root {
  --navy: #0b1733;
  --orange: #f08020;
  --steel: #1d3b8a;
  --sky: #d6e0f2;
  --cream: #f6f2ea;
  --ink: #171a21;
  --graphite: #3d4452;
  --silver: #9ca3af;
  --mist: #e7e9ee;
  --paper: #fbfaf7;

  --bg-soft: var(--paper);
  --bg-accent: var(--sky);
  --card: #ffffff;
  --text: var(--ink);
  --muted: var(--graphite);
  --brand: var(--navy);
  --brand-dark: #060f24;
  --success: #0f766e;
  --warn: #b45309;
  --error: #b91c1c;
  --border: var(--mist);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", "Segoe UI", Tahoma, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 6% 0%, rgba(240, 128, 32, 0.11), transparent 42%),
    radial-gradient(circle at 100% 0%, rgba(29, 59, 138, 0.14), transparent 55%),
    linear-gradient(160deg, var(--paper), #f0f3f8 55%, #ebf0f7 100%);
  min-height: 100vh;
}

.resco-bg,
.admin-bg {
  padding-bottom: 24px;
}

.container {
  width: min(1080px, 95%);
  margin: 20px auto;
}

.container.narrow {
  width: min(440px, 94%);
  margin-top: 48px;
}

.login-shell {
  min-height: calc(100vh - 24px);
  display: flex;
  align-items: center;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 28px rgba(11, 23, 51, 0.08);
}

h1,
h2,
h3 {
  font-family: "Sora", "Manrope", sans-serif;
    gap: 10px;
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;

  .dashboard-title-block {
    width: 100%;
  }
  font-weight: 700;
  font-size: 1.4rem;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}
    width: 34px;
.current-status {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: var(--steel);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.eyebrow {
  font-family: "JetBrains Mono", monospace;
    padding: 14px 12px 18px;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  color: var(--steel);
  margin-bottom: 10px;
}
    box-shadow: 0 8px 20px rgba(11, 23, 51, 0.07);

.brand-tagline {
  display: block;
    padding: 10px;
    border-radius: 16px;
  border-top: 1px dashed var(--border);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.73rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;

  .check-actions .btn {
    min-height: 44px;
  }
  color: var(--graphite);
}

.form-grid {
  display: grid;
  gap: 8px;
}

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

label {
  font-family: "JetBrains Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  color: var(--muted);
}

input,
select,
button {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 1rem;
}

button {
  cursor: pointer;
  font-weight: 600;
  transition: all 0.18s ease;
}

.btn-large {
  min-height: 48px;
}

.btn {
  background: #eef2f8;
  color: #233544;
  border: none;
}

.btn.primary {
  background: var(--brand);
  color: #fff;
}

.btn.primary:hover {
  background: var(--brand-dark);
}

.btn.success:hover,
.btn.warn:hover,
.btn:hover {
  filter: brightness(0.96);
}

.btn.success {
  background: var(--success);
  color: #fff;
}

.btn.warn {
  background: var(--warn);
  color: #fff;
}

.actions-row {
  margin-top: 12px;
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.alert {
  margin-top: 10px;
  padding: 10px 11px;
  border-radius: 12px;
  font-size: 0.9rem;
  border: 1px solid transparent;
}

.alert.success {
  background: #ecfdf5;
  color: #065f46;
  border-color: #6ee7b7;
}

.alert.warn {
  background: #fff5eb;
  color: #9a3412;
  border-color: #f7bf8f;
}

.alert.error {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fca5a5;
}

.hidden {
  display: none;
}

@media (max-width: 640px) {
  .container {
    width: min(100%, 100%);
    margin: 0;
  }

  .container.narrow {
    width: 100%;
    margin-top: 0;
  }

  .login-shell {
    min-height: 100vh;
    padding: 12px;
    align-items: stretch;
  }

  .card {
    border-radius: 20px;
    padding: 18px 14px;
  }

  input,
  select,
  button {
    min-height: 48px;
    font-size: 16px;
  }

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

  .site-map {
    min-height: 250px;
  }
}

.topbar {
  background: var(--navy);
  color: #fff;
  padding: 12px 0 11px;
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 2px solid rgba(240, 128, 32, 0.7);
}

.topbar-inner {
  width: min(1080px, 95%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.topbar a {
  color: #e7edf8;
  text-decoration: none;
  margin-right: 10px;
  font-size: 0.9rem;
}

.topbar a:hover {
  color: #ffffff;
}

.brand-lockup {
  font-family: "Sora", "Manrope", sans-serif;
  letter-spacing: -0.01em;
}

.brand-lockup span {
  color: var(--orange);
}

.topbar-meta {
  display: block;
  margin-top: 3px;
  font-family: "JetBrains Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.68rem;
  color: #c4d3ec;
}

.logo-container img {
  max-width: 100%;
  height: auto;
  display: block;
}

.summary-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.summary-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: linear-gradient(160deg, #ffffff, #f7f8fb);
}

.summary-card p {
  margin: 6px 0 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th,
td {
  border-bottom: 1px solid var(--border);
  padding: 8px;
  text-align: left;
  vertical-align: top;
}

th {
  font-family: "JetBrains Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.69rem;
  color: var(--graphite);
}

.inline-form {
  margin-top: 6px;
  display: grid;
  gap: 6px;
}

.map-picker {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: linear-gradient(160deg, #ffffff, #f8fafc);
}

.form-span-2 {
  grid-column: 1 / -1;
}

.map-search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 8px;
}

.map-search-row .btn {
  width: auto;
  min-width: 96px;
}

.map-picker-head {
  display: grid;
  gap: 3px;
  margin-bottom: 8px;
}

.map-picker-head strong {
  font-family: "Sora", "Manrope", sans-serif;
  font-size: 0.95rem;
}

.map-picker-head span {
  font-size: 0.82rem;
  color: var(--muted);
}

.site-map {
  width: 100%;
  min-height: 300px;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin-bottom: 10px;
}

.radius-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.radius-controls label {
  display: inline-block;
  margin-bottom: 4px;
}

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

.check-state {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 4px;
}

.check-state strong {
  font-size: 0.9rem;
  color: #1e3a8a;
}

.check-state span {
  font-size: 0.9rem;
  color: #1f2937;
}

.mobile-shell {
  margin-top: 8px;
  margin-bottom: 16px;
}

.mobile-card {
  border-radius: 20px;
}

.operator-app-shell {
  display: grid;
  gap: 12px;
}

.dashboard-title-block {
  min-width: 0;
}

.flow-steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.flow-steps span {
  display: block;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 10px;
  background: #fff;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--graphite);
  text-align: center;
}

.flow-step.active {
  border-color: rgba(29, 59, 138, 0.3);
  background: #eef3fb;
  color: var(--steel);
}

.step-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px;
  background: linear-gradient(160deg, #ffffff, #f6f8fc);
}

.step-head {
  display: grid;
  gap: 0;
  margin-bottom: 8px;
}

.step-number {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(29, 59, 138, 0.16);
  background: #eef3fb;
  color: var(--steel);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

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

.wizard-actions {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.wizard-actions.two-buttons {
  grid-template-columns: 1fr 1fr;
}

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

.wizard-actions .btn {
  min-height: 40px;
}

.camera-shell {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #0f172a;
  overflow: hidden;
}

    gap: 8px;
.selfie-video,

  .dashboard-header > div:first-child {
    width: 100%;
  }
.selfie-preview {
  width: 100%;
  min-height: 180px;
  max-height: 240px;
  object-fit: cover;
    gap: 6px;
  display: block;
}

.compact-history h2 {
  margin-bottom: 6px;
  font-size: 1rem;

  .mobile-shell {
    margin-top: 0;
    margin-bottom: 0;
  }

  .mobile-card {
    min-height: 100vh;
    border-radius: 0;
    padding: 14px 12px 16px;
  }

  .card {
    padding: 14px 12px;
    border-radius: 18px;
  }

  .dashboard-header h1 {
    font-size: 1.22rem;
    margin-bottom: 6px;
  }

  .subtitle {
    font-size: 0.84rem;
    line-height: 1.35;
  }

  .current-status {
    margin-top: 3px;
    font-size: 0.74rem;
  }

  .step-card {
    padding: 9px;
    border-radius: 14px;
  }

  .step-number {
    width: 28px;
    height: 28px;
    font-size: 0.72rem;
  }

  .wizard-note {
    font-size: 0.84rem;
    margin-bottom: 8px;
  }

  .wizard-actions {
    margin-top: 8px;
    gap: 6px;
  }

  .wizard-actions .btn {
    min-height: 44px;
  }

  .camera-shell {
    border-radius: 12px;
  }

  .selfie-video,
  .selfie-preview {
    min-height: 170px;
    max-height: 210px;
  }

  .compact-history h2 {
    font-size: 0.95rem;
  }

  .dashboard-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
  }

  .dashboard-title-block {
    min-width: 0;
    padding-right: 0;
  }

  .dashboard-actions {
    width: auto;
    min-width: 0;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 6px;
    flex-wrap: nowrap;
    margin-top: 1px;
  }

  .dashboard-actions .toolbar-note {
    display: none;
  }
  .operator-log-item,
  .compact-item {
    border-radius: 12px;
  }

  .operator-log-selfie {
    max-height: 100px;
  }
}

.history-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}

.history-head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.dashboard-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 0 14px;
}

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

.dashboard-header .subtitle {
  margin-bottom: 0;
}

.dashboard-actions {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 8px;
  min-width: 120px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.btn-icon {
  width: 36px;
  min-width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  line-height: 1;
}

.dashboard-toolbar .btn {
  width: auto;
  min-width: 96px;
  padding-inline: 14px;
}

.btn-ghost {
  background: #f3f6fb;
  color: var(--brand);
  border: 1px solid rgba(29, 59, 138, 0.14);
}

.btn-ghost:hover {
  background: #e9eff9;
}

.btn-link {
  text-decoration: none;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon.btn-link {
  padding: 0;
}

.toolbar-note {
  font-size: 0.8rem;
  color: var(--muted);
}

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

.compact-list {
  max-height: 40vh;
  overflow-y: auto;
  padding-right: 2px;
}

.operator-log-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 9px;
  background: linear-gradient(160deg, #ffffff, #f8fbff);
}

.compact-item {
  padding: 8px 9px;
}

.operator-log-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 5px;
}

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

.operator-log-head strong {
  font-size: 0.88rem;
}

.operator-log-site {
  display: block;
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: 1px;
}

.operator-log-meta {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.35;
}

.compact-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.76rem;
}

.compact-meta span {
  background: #f7f8fb;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 7px;
}

.check-pill {
  border: 1px solid rgba(29, 59, 138, 0.14);
  background: #eef3fb;
  color: var(--steel);
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.operator-log-meta strong {
  color: var(--ink);
}

.operator-log-selfie {
  display: block;
  width: 100%;
  margin-top: 5px;
  border-radius: 8px;
  border: 1px solid var(--border);
  max-height: 110px;
  object-fit: cover;
}

.status-pill {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.status-pill.approved {
  background: #dcfce7;
  color: #166534;
}

.status-pill.outside_geofence,
.status-pill.outside_geofence {
  background: #fef3c7;
  color: #92400e;
}

.status-pill.low_accuracy {
  background: #fee2e2;
  color: #991b1b;
}

.small-note {
  margin-top: 12px;
  font-size: 0.88rem;
  color: var(--muted);
}

a {
  color: var(--steel);
}

a:hover {
  color: var(--brand);
}

.top-gap {
  margin-top: 16px;
}

@media (min-width: 768px) {
  .form-grid.two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .radius-controls {
    grid-template-columns: 1fr 1fr;
    align-items: end;
  }

  .topbar-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

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

  h1 {
    font-size: 1.7rem;
  }

  .wizard-actions.two-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .map-search-row {
    grid-template-columns: 1fr;
  }

  .map-search-row .btn {
    width: 100%;
  }

  .operator-log-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .status-pill {
    align-self: flex-start;
  }

  .wizard-actions.two-buttons {
    grid-template-columns: 1fr;
  }

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

  .dashboard-header {
    flex-direction: column;
  }

  .dashboard-actions {
    width: auto;
    align-items: flex-end;
    flex-direction: row;
  }

  .dashboard-actions .btn,
  .dashboard-actions .btn-link {
    width: 36px;
  }

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

  .compact-list {
    max-height: 36vh;
  }
}
