:root {
  --bg: #0f172a;
  --bg-2: #111827;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-solid: #ffffff;
  --surface-muted: #f8fafc;
  --line: rgba(15, 23, 42, 0.11);
  --text: #0f172a;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --primary: #0f766e;
  --primary-2: #14b8a6;
  --primary-soft: #ccfbf1;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --warning: #d97706;
  --warning-soft: #fef3c7;
  --success: #15803d;
  --success-soft: #dcfce7;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.18);
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.08);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --max: 1180px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--text);
  min-height: 100svh;
  background:
    radial-gradient(circle at top left, rgba(20, 184, 166, 0.24), transparent 35vw),
    radial-gradient(circle at 88% 12%, rgba(59, 130, 246, 0.18), transparent 30vw),
    linear-gradient(135deg, #111827 0%, #0f172a 46%, #020617 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  border: 0;
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.app-shell {
  min-height: 100svh;
}

.boot-screen {
  min-height: 100svh;
  display: grid;
  place-items: center;
  color: white;
  text-align: center;
  padding: 28px;
}

.boot-logo {
  width: 112px;
  height: 112px;
  object-fit: contain;
  margin: 0 auto 18px;
  border-radius: 32px;
  box-shadow: 0 24px 70px rgba(0,0,0,.3);
}

.boot-screen h1 {
  margin: 0;
  font-size: clamp(2rem, 8vw, 4.5rem);
  letter-spacing: -0.07em;
}

.boot-screen p {
  margin: 10px 0 0;
  color: rgba(255,255,255,.72);
}

.page {
  min-height: 100svh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: rgba(15, 23, 42, 0.72);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.header-inner {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  text-align: left;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: white;
  min-width: 0;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  object-fit: cover;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
}

.brand-name {
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1;
  font-size: 1.1rem;
}

.brand-subtitle {
  display: block;
  color: rgba(255,255,255,.54);
  font-size: .74rem;
  margin-top: 2px;
  letter-spacing: 0;
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  color: rgba(255,255,255,.7);
  padding: 10px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .93rem;
}

.nav-link:hover,
.nav-link.is-active {
  color: white;
  background: rgba(255,255,255,.1);
}

.btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 16px;
  border-radius: 999px;
  font-weight: 850;
  letter-spacing: -0.02em;
  color: var(--text);
  background: white;
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.12);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, opacity .18s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(2, 6, 23, 0.18);
}

.btn:disabled {
  opacity: .52;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

.btn-dark {
  color: white;
  background: #0f172a;
}

.btn-ghost {
  color: white;
  background: rgba(255,255,255,.1);
  box-shadow: none;
  border: 1px solid rgba(255,255,255,.12);
}

.btn-soft {
  color: var(--primary);
  background: var(--primary-soft);
  box-shadow: none;
}

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

.btn-small {
  min-height: 36px;
  padding: 0 12px;
  font-size: .88rem;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: rgba(255,255,255,.1);
  color: white;
  border: 1px solid rgba(255,255,255,.12);
}

.hero {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0 52px;
  color: white;
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  gap: 34px;
  align-items: center;
}

.hero-copy {
  min-width: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(20,184,166,.14);
  border: 1px solid rgba(45,212,191,.24);
  color: #ccfbf1;
  font-weight: 800;
  font-size: .86rem;
}

.hero h1 {
  font-size: clamp(2.75rem, 8vw, 6.8rem);
  line-height: .88;
  letter-spacing: -0.095em;
  margin: 22px 0 20px;
}

.hero h1 span {
  color: #99f6e4;
}

.hero-lead {
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  color: rgba(255,255,255,.73);
  line-height: 1.55;
  max-width: 660px;
  margin: 0;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 32px;
}

.stat-card {
  padding: 16px;
  border-radius: 22px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
}

.stat-value {
  font-size: 1.55rem;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.stat-label {
  color: rgba(255,255,255,.58);
  font-size: .84rem;
  font-weight: 650;
  margin-top: 2px;
}

.phone-stage {
  position: relative;
  min-height: 660px;
  display: grid;
  place-items: center;
}

.phone-glow {
  position: absolute;
  width: 82%;
  aspect-ratio: 1;
  border-radius: 999px;
  filter: blur(40px);
  opacity: .35;
  background: radial-gradient(circle, #2dd4bf, transparent 67%);
}

.phone-frame {
  position: relative;
  width: min(360px, 100%);
  min-height: 640px;
  border-radius: 48px;
  padding: 12px;
  background: linear-gradient(145deg, rgba(255,255,255,.36), rgba(255,255,255,.08));
  box-shadow: 0 40px 90px rgba(0,0,0,.38);
  border: 1px solid rgba(255,255,255,.16);
}

.phone-screen {
  background: #f8fafc;
  color: var(--text);
  border-radius: 38px;
  overflow: hidden;
  min-height: 616px;
  border: 1px solid rgba(15,23,42,.1);
}

.phone-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px 12px;
}

.phone-pill {
  width: 74px;
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
}

.mini-map {
  margin: 0 16px;
  border-radius: 28px;
  min-height: 190px;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #ccfbf1);
  position: relative;
}

.map-lines,
.map-dots {
  position: absolute;
  inset: 0;
}

.map-lines::before,
.map-lines::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(15,23,42,.12);
  transform: rotate(-23deg);
}

.map-lines::before {
  width: 125%;
  height: 16px;
  top: 44%;
  left: -12%;
}

.map-lines::after {
  width: 18px;
  height: 130%;
  top: -12%;
  left: 58%;
}

.pin {
  position: absolute;
  width: 38px;
  height: 38px;
  border-radius: 999px 999px 999px 8px;
  transform: rotate(-45deg);
  background: var(--primary);
  box-shadow: 0 14px 24px rgba(15,118,110,.32);
}

.pin::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: white;
  top: 13px;
  left: 13px;
}

.pin-one { left: 35%; top: 28%; }
.pin-two { left: 62%; top: 52%; background: #f59e0b; }
.pin-three { left: 18%; top: 58%; background: #ef4444; }

.phone-content {
  padding: 18px 16px 90px;
}

.phone-card {
  border-radius: 28px;
  background: white;
  border: 1px solid var(--line);
  padding: 16px;
  box-shadow: 0 14px 30px rgba(15,23,42,.08);
  margin-bottom: 12px;
}

.phone-card h3 {
  margin: 0 0 8px;
  letter-spacing: -0.04em;
}

.phone-card p {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
}

.phone-nav {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  height: 66px;
  border-radius: 26px;
  background: rgba(15,23,42,.95);
  color: white;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  place-items: center;
  font-weight: 800;
  font-size: .78rem;
}

.section {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0;
}

.section-title {
  color: white;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: .95;
  letter-spacing: -0.08em;
  margin: 0 0 14px;
}

.section-lead {
  color: rgba(255,255,255,.64);
  font-size: 1.06rem;
  line-height: 1.6;
  max-width: 720px;
  margin: 0 0 24px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature-card {
  padding: 24px;
  border-radius: 28px;
  background: rgba(255,255,255,.09);
  color: white;
  border: 1px solid rgba(255,255,255,.1);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(20,184,166,.16);
  font-size: 1.4rem;
  margin-bottom: 18px;
}

.feature-card h3 {
  font-size: 1.2rem;
  letter-spacing: -0.04em;
  margin: 0 0 10px;
}

.feature-card p {
  margin: 0;
  color: rgba(255,255,255,.64);
  line-height: 1.55;
}

.app-layout {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 282px 1fr;
  background: #f1f5f9;
}

.sidebar {
  min-height: 100svh;
  position: sticky;
  top: 0;
  padding: 18px;
  background: #0f172a;
  color: white;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sidebar .brand {
  padding: 6px 4px 10px;
}

.side-nav {
  display: grid;
  gap: 8px;
}

.side-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 18px;
  color: rgba(255,255,255,.68);
  font-weight: 800;
}

.side-link:hover,
.side-link.is-active {
  background: rgba(255,255,255,.09);
  color: white;
}

.side-bottom {
  margin-top: auto;
  display: grid;
  gap: 10px;
}

.user-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 20px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
  min-width: 0;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  object-fit: cover;
  background: linear-gradient(135deg, #ccfbf1, #e0f2fe);
  color: #0f766e;
  display: grid;
  place-items: center;
  font-weight: 950;
  flex: 0 0 auto;
}

.user-mini strong,
.user-mini span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-mini strong {
  font-size: .94rem;
}

.user-mini span {
  color: rgba(255,255,255,.52);
  font-size: .78rem;
}

.main {
  min-width: 0;
  padding: 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.topbar h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: -0.08em;
  line-height: .95;
}

.topbar p {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 600;
}

.mobile-topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(241,245,249,.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(310px, .8fr);
  gap: 18px;
  align-items: start;
}

.panel {
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.panel-pad {
  padding: 22px;
}

.panel-header {
  padding: 22px 22px 0;
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.panel-title {
  margin: 0;
  letter-spacing: -0.055em;
  font-size: 1.45rem;
}

.panel-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 600;
  font-size: .93rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.kpi-card {
  padding: 18px;
  border-radius: 26px;
  background: white;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.kpi-card b {
  font-size: 1.9rem;
  letter-spacing: -0.07em;
}

.kpi-card span {
  display: block;
  color: var(--muted);
  font-weight: 700;
  margin-top: 3px;
  font-size: .88rem;
}

.filters {
  display: grid;
  grid-template-columns: 1.2fr repeat(4, minmax(126px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.field,
.search-field {
  display: grid;
  gap: 7px;
}

.field label {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 18px;
  min-height: 48px;
  padding: 0 14px;
  outline: 0;
  font-weight: 650;
}

.textarea {
  min-height: 116px;
  resize: vertical;
  padding: 14px;
  line-height: 1.45;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: rgba(20,184,166,.7);
  box-shadow: 0 0 0 4px rgba(20,184,166,.12);
}

.feed {
  display: grid;
  gap: 14px;
}

.report-card {
  display: grid;
  grid-template-columns: 164px 1fr;
  gap: 16px;
  padding: 14px;
  border-radius: 28px;
  background: white;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.report-media {
  border-radius: 22px;
  min-height: 144px;
  overflow: hidden;
  background: linear-gradient(135deg, #e2e8f0, #ccfbf1);
  position: relative;
}

.report-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.report-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 2rem;
}

.report-body {
  min-width: 0;
  display: grid;
  gap: 10px;
}

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

.report-title {
  margin: 0;
  font-size: 1.17rem;
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.report-desc {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.report-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 7px 10px;
  background: #f1f5f9;
  color: #334155;
  font-size: .78rem;
  font-weight: 850;
  max-width: 100%;
}

.chip-primary { color: var(--primary); background: var(--primary-soft); }
.chip-warning { color: var(--warning); background: var(--warning-soft); }
.chip-success { color: var(--success); background: var(--success-soft); }
.chip-danger { color: var(--danger); background: var(--danger-soft); }
.chip-dark { color: white; background: #0f172a; }

.report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 2px;
}

.like-btn.is-liked {
  color: white;
  background: #ef4444;
}

.map-panel {
  height: 420px;
  min-height: 420px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

#map {
  width: 100%;
  height: 100%;
  background: #dbeafe;
}

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

.activity-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 11px;
  align-items: start;
  padding: 12px;
  border-radius: 20px;
  background: #f8fafc;
  border: 1px solid var(--line);
}

.activity-dot {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
}

.activity-item strong {
  display: block;
  font-size: .95rem;
}

.activity-item span {
  color: var(--muted);
  font-size: .85rem;
}

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

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

.upload-box {
  min-height: 188px;
  border-radius: 26px;
  border: 1.5px dashed rgba(15,23,42,.18);
  background: #f8fafc;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 20px;
  overflow: hidden;
  position: relative;
}

.upload-box input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-preview {
  width: 100%;
  height: 220px;
  border-radius: 22px;
  object-fit: cover;
}

.auth-page {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr minmax(360px, 470px);
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  align-items: center;
  gap: 26px;
  color: white;
}

.auth-copy h1 {
  margin: 20px 0 18px;
  font-size: clamp(2.4rem, 7vw, 5.8rem);
  line-height: .9;
  letter-spacing: -0.09em;
}

.auth-copy p {
  color: rgba(255,255,255,.68);
  line-height: 1.6;
  font-size: 1.08rem;
  max-width: 620px;
}

.auth-card {
  background: rgba(255,255,255,.95);
  color: var(--text);
  border-radius: 36px;
  padding: 22px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,.35);
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  background: #f1f5f9;
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 16px;
}

.auth-tab {
  min-height: 42px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.auth-tab.is-active {
  background: white;
  color: var(--text);
  box-shadow: var(--shadow-soft);
}

.auth-form {
  display: grid;
  gap: 12px;
}

.notice {
  padding: 14px;
  border-radius: 20px;
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
  font-weight: 700;
  line-height: 1.45;
  font-size: .9rem;
}

.notice strong {
  display: block;
  margin-bottom: 3px;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(2,6,23,.45);
  display: grid;
  place-items: end center;
  padding: 18px;
}

.drawer {
  width: min(780px, 100%);
  max-height: min(90svh, 860px);
  background: white;
  border-radius: 34px;
  overflow: auto;
  box-shadow: var(--shadow);
}

.drawer-hero {
  min-height: 280px;
  background: linear-gradient(135deg, #dbeafe, #ccfbf1);
  position: relative;
  overflow: hidden;
}

.drawer-hero img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
}

.drawer-close {
  position: sticky;
  float: right;
  top: 14px;
  right: 14px;
  z-index: 2;
  margin: 14px;
  color: #0f172a;
  background: rgba(255,255,255,.86);
  box-shadow: var(--shadow-soft);
}

.drawer-content {
  padding: 24px;
}

.drawer-content h2 {
  margin: 0 0 10px;
  font-size: clamp(1.8rem, 5vw, 3rem);
  line-height: .96;
  letter-spacing: -0.07em;
}

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

.detail-box {
  padding: 14px;
  border-radius: 20px;
  background: #f8fafc;
  border: 1px solid var(--line);
}

.detail-box b {
  display: block;
  margin-bottom: 4px;
}

.detail-box span {
  color: var(--muted);
  font-size: .88rem;
}

.empty-state {
  padding: 34px 20px;
  text-align: center;
  color: var(--muted);
  background: white;
  border: 1px solid var(--line);
  border-radius: 28px;
}

.empty-state strong {
  display: block;
  color: var(--text);
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.mobile-nav {
  display: none;
  position: fixed;
  z-index: 70;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  min-height: 68px;
  border-radius: 28px;
  background: rgba(15,23,42,.94);
  backdrop-filter: blur(18px);
  padding: 6px;
  grid-template-columns: repeat(5, 1fr);
  box-shadow: 0 24px 70px rgba(2,6,23,.28);
}

.mobile-nav .side-link {
  padding: 8px 4px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  gap: 2px;
  font-size: .68rem;
  text-align: center;
}

.mobile-nav .side-link .nav-ico {
  font-size: 1.1rem;
}

.toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 120;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100% - 36px));
}

.toast {
  padding: 14px 16px;
  border-radius: 20px;
  background: #0f172a;
  color: white;
  box-shadow: var(--shadow);
  font-weight: 750;
}

.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.warning { background: var(--warning); }

.table-wrap {
  overflow: auto;
}

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

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

.table th {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .76rem;
}

.table td {
  font-weight: 650;
}

.profile-cover {
  height: 168px;
  background: radial-gradient(circle at 20% 30%, rgba(20,184,166,.65), transparent 34%), linear-gradient(135deg, #0f172a, #164e63);
}

.profile-head {
  display: flex;
  gap: 16px;
  align-items: end;
  margin-top: -38px;
  padding: 0 22px 22px;
}

.profile-avatar {
  width: 92px;
  height: 92px;
  border-radius: 30px;
  border: 5px solid white;
  object-fit: cover;
  background: #ccfbf1;
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 950;
  color: var(--primary);
}

.profile-head h2 {
  margin: 0;
  letter-spacing: -0.055em;
  font-size: 1.8rem;
}

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

@media (max-width: 1040px) {
  .hero,
  .auth-page {
    grid-template-columns: 1fr;
  }

  .phone-stage {
    min-height: auto;
  }

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

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

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

  .filters .search-field {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .nav-desktop,
  .header-actions .btn-ghost {
    display: none;
  }

  .hero {
    padding-top: 42px;
  }

  .hero-stats,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .app-layout {
    display: block;
  }

  .sidebar {
    display: none;
  }

  .mobile-topbar,
  .mobile-nav {
    display: flex;
  }

  .mobile-nav {
    display: grid;
  }

  .main {
    padding: 16px 14px 100px;
  }

  .topbar {
    display: none;
  }

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

  .report-media {
    min-height: 210px;
  }

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

  .form-grid .span-2,
  .filters .search-field {
    grid-column: auto;
  }

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

  .auth-page {
    width: min(100% - 24px, 520px);
    padding: 20px 0;
  }

  .auth-copy {
    display: none;
  }

  .auth-card {
    border-radius: 30px;
  }
}

@media (max-width: 520px) {
  .header-inner,
  .hero,
  .section {
    width: min(100% - 24px, var(--max));
  }

  .header-inner {
    height: 66px;
  }

  .brand-subtitle {
    display: none;
  }

  .hero h1 {
    font-size: clamp(3.1rem, 19vw, 5.2rem);
  }

  .phone-frame {
    width: 100%;
    min-height: 580px;
    border-radius: 40px;
  }

  .phone-screen {
    min-height: 556px;
    border-radius: 30px;
  }

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

  .report-media {
    min-height: 190px;
  }

  .panel,
  .kpi-card,
  .report-card {
    border-radius: 24px;
  }

  .panel-pad,
  .panel-header,
  .drawer-content {
    padding: 18px;
  }

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