:root {
  --gt-bg: #f3efe6;
  --gt-bg-deep: #e7e0d2;
  --gt-surface: #fffdf8;
  --gt-ink: #1c2a22;
  --gt-muted: #5f6d64;
  --gt-line: rgba(28, 42, 34, 0.12);
  --gt-green: #1f5b3d;
  --gt-green-deep: #143d29;
  --gt-amber: #c47a1a;
  --gt-amber-soft: #f3dfc0;
  --gt-ok: #1f7a4d;
  --gt-warn: #b7891a;
  --gt-info: #2a6f8f;
  --gt-danger: #a33b2b;
  --gt-shadow: 0 18px 40px rgba(20, 40, 28, 0.08);
  --gt-radius: 18px;
  --gt-font: "DM Sans", system-ui, sans-serif;
  --gt-display: "Fraunces", Georgia, serif;
  --gt-sidebar: 268px;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--gt-font);
  color: var(--gt-ink);
  background:
    radial-gradient(circle at 12% 10%, rgba(196, 122, 26, 0.18), transparent 36%),
    radial-gradient(circle at 88% 0%, rgba(31, 91, 61, 0.16), transparent 40%),
    linear-gradient(160deg, var(--gt-bg), var(--gt-bg-deep));
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
img { max-width: 100%; display: block; }

.gt-app {
  display: grid;
  grid-template-columns: var(--gt-sidebar) 1fr;
  min-height: 100vh;
}

.gt-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 1.4rem 1rem 1.2rem;
  background: linear-gradient(180deg, var(--gt-green-deep), var(--gt-green));
  color: #f7f3ea;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.gt-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.35rem 0.5rem;
}

.gt-brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background:
    linear-gradient(135deg, var(--gt-amber), #e8b45b),
    var(--gt-amber);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.25);
  position: relative;
}

.gt-brand-mark::after {
  content: "";
  position: absolute;
  inset: 10px 8px 12px;
  border: 2px solid rgba(28,42,34,0.45);
  border-radius: 4px;
  border-top: 0;
}

.gt-brand strong {
  display: block;
  font-family: var(--gt-display);
  font-size: 1.25rem;
  letter-spacing: 0.01em;
}

.gt-brand small,
.gt-user-chip small,
.gt-topbar-title p,
.gt-muted {
  color: rgba(247, 243, 234, 0.72);
}

.gt-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.gt-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  color: rgba(247, 243, 234, 0.88);
  transition: background 180ms ease, transform 180ms ease;
}

.gt-nav-link:hover {
  background: rgba(255,255,255,0.08);
  transform: translateX(2px);
}

.gt-nav-link.is-active {
  background: rgba(243, 223, 192, 0.18);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(243, 223, 192, 0.28);
}

.gt-nav-ico {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1.5px solid currentColor;
  opacity: 0.9;
  position: relative;
}

.gt-ico-grid { box-shadow: inset 6px 0 0 -4.5px currentColor, inset 0 6px 0 -4.5px currentColor; }
.gt-ico-machine { border-radius: 3px 8px 3px 3px; }
.gt-ico-calendar::after { content:""; position:absolute; left:3px; right:3px; top:5px; height:1.5px; background:currentColor; }
.gt-ico-users { border-radius: 50%; width: 14px; margin-left: 2px; }
.gt-ico-finance { border-radius: 50%; }

.gt-sidebar-foot {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.12);
}

.gt-user-chip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.gt-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--gt-amber-soft);
  color: var(--gt-green-deep);
  font-weight: 700;
}

.gt-user-chip strong {
  display: block;
  font-size: 0.95rem;
}

.gt-user-chip small {
  font-size: 0.78rem;
}

.gt-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.8rem;
  border-radius: 10px;
  background: rgba(0,0,0,0.18);
  color: #fff;
  font-size: 0.9rem;
}

.gt-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.gt-topbar {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem 1.75rem 0.5rem;
}

.gt-topbar-title h1 {
  margin: 0;
  font-family: var(--gt-display);
  font-size: clamp(1.6rem, 2vw, 2.15rem);
  font-weight: 700;
  color: var(--gt-green-deep);
}

.gt-topbar-title p {
  margin: 0.35rem 0 0;
  color: var(--gt-muted);
}

.gt-topbar-actions {
  margin-left: auto;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.gt-menu-toggle {
  display: none;
  border: 0;
  background: var(--gt-surface);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  box-shadow: var(--gt-shadow);
  cursor: pointer;
}

.gt-content {
  padding: 1rem 1.75rem 2rem;
}

.gt-hero {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--gt-radius) + 4px);
  padding: 1.75rem;
  margin-bottom: 1.25rem;
  background:
    linear-gradient(120deg, rgba(20, 61, 41, 0.94), rgba(31, 91, 61, 0.88)),
    radial-gradient(circle at 80% 30%, rgba(196,122,26,0.35), transparent 40%);
  color: #f8f4eb;
  box-shadow: var(--gt-shadow);
  animation: gtRise 0.55s ease both;
}

.gt-hero::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -50px;
  width: 220px;
  height: 220px;
  border-radius: 40% 60% 55% 45%;
  background: rgba(243, 223, 192, 0.12);
}

.gt-hero-kicker {
  display: inline-block;
  margin-bottom: 0.65rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gt-amber-soft);
}

.gt-hero h2 {
  margin: 0;
  font-family: var(--gt-display);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  max-width: 14ch;
  position: relative;
  z-index: 1;
}

.gt-hero p {
  margin: 0.75rem 0 1.1rem;
  max-width: 46ch;
  color: rgba(248, 244, 235, 0.82);
  position: relative;
  z-index: 1;
}

.gt-hero-actions {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.gt-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.gt-kpi {
  background: var(--gt-surface);
  border: 1px solid var(--gt-line);
  border-radius: var(--gt-radius);
  padding: 1.1rem 1.15rem;
  box-shadow: var(--gt-shadow);
  animation: gtRise 0.55s ease both;
}

.gt-kpi:nth-child(2) { animation-delay: 0.06s; }
.gt-kpi:nth-child(3) { animation-delay: 0.12s; }
.gt-kpi:nth-child(4) { animation-delay: 0.18s; }

.gt-kpi span {
  display: block;
  color: var(--gt-muted);
  font-size: 0.85rem;
  margin-bottom: 0.45rem;
}

.gt-kpi strong {
  display: block;
  font-family: var(--gt-display);
  font-size: 1.7rem;
  color: var(--gt-green-deep);
}

.gt-kpi em {
  display: block;
  margin-top: 0.35rem;
  font-style: normal;
  font-size: 0.8rem;
  color: var(--gt-amber);
}

.gt-panel-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
}

.gt-panel {
  background: var(--gt-surface);
  border: 1px solid var(--gt-line);
  border-radius: var(--gt-radius);
  box-shadow: var(--gt-shadow);
  padding: 1.15rem;
}

.gt-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.gt-panel-head h3 {
  margin: 0;
  font-family: var(--gt-display);
  font-size: 1.2rem;
  color: var(--gt-green-deep);
}

.gt-btn,
button.gt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1.1rem;
  cursor: pointer;
  font-weight: 600;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.gt-btn:hover { transform: translateY(-1px); }

.gt-btn-primary {
  background: var(--gt-amber);
  color: #1c2a22;
  box-shadow: 0 10px 20px rgba(196, 122, 26, 0.25);
}

.gt-btn-secondary {
  background: rgba(255,255,255,0.14);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.25);
}

.gt-btn-dark {
  background: var(--gt-green);
  color: #fff;
}

.gt-btn-ghost {
  background: transparent;
  color: var(--gt-green);
  box-shadow: inset 0 0 0 1px var(--gt-line);
}

.gt-btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
}

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

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

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

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

.gt-table th {
  color: var(--gt-muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.gt-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: capitalize;
}

.gt-badge.ok { background: rgba(31,122,77,0.12); color: var(--gt-ok); }
.gt-badge.warn { background: rgba(183,137,26,0.14); color: var(--gt-warn); }
.gt-badge.info { background: rgba(42,111,143,0.12); color: var(--gt-info); }
.gt-badge.danger { background: rgba(163,59,43,0.12); color: var(--gt-danger); }
.gt-badge.muted { background: rgba(95,109,100,0.12); color: var(--gt-muted); }

.gt-status-bars {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.gt-status-row {
  display: grid;
  grid-template-columns: 90px 1fr 36px;
  gap: 0.6rem;
  align-items: center;
}

.gt-status-row span { color: var(--gt-muted); font-size: 0.85rem; text-transform: capitalize; }
.gt-status-row strong { text-align: right; font-size: 0.9rem; }

.gt-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(28,42,34,0.08);
  overflow: hidden;
}

.gt-bar > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gt-green), var(--gt-amber));
}

.gt-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
  align-items: end;
}

.gt-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 160px;
}

.gt-field label {
  font-size: 0.8rem;
  color: var(--gt-muted);
  font-weight: 600;
}

.gt-field input,
.gt-field select,
.gt-field textarea,
.gt-login-card input {
  border: 1px solid var(--gt-line);
  background: #fff;
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  color: var(--gt-ink);
}

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

.gt-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--gt-muted);
}

.gt-alert {
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
}

.gt-alert.success { background: rgba(31,122,77,0.12); color: var(--gt-ok); }
.gt-alert.error { background: rgba(163,59,43,0.12); color: var(--gt-danger); }
.gt-alert.info { background: rgba(42,111,143,0.12); color: var(--gt-info); }

.gt-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(18, 28, 22, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 40;
}

.gt-modal-backdrop.is-open { display: flex; }

.gt-modal {
  width: min(560px, 100%);
  background: var(--gt-surface);
  border-radius: 18px;
  padding: 1.25rem;
  box-shadow: var(--gt-shadow);
}

.gt-modal h3 {
  margin: 0 0 1rem;
  font-family: var(--gt-display);
  color: var(--gt-green-deep);
}

.gt-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.gt-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 1rem;
}

.gt-switch {
  position: relative;
  width: 46px;
  height: 26px;
  display: inline-block;
}

.gt-switch input { opacity: 0; width: 0; height: 0; }

.gt-switch span {
  position: absolute;
  inset: 0;
  background: #c9c2b5;
  border-radius: 999px;
  cursor: pointer;
  transition: background 160ms ease;
}

.gt-switch span::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 160ms ease;
}

.gt-switch input:checked + span { background: var(--gt-ok); }
.gt-switch input:checked + span::before { transform: translateX(20px); }

.gt-login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(circle at 18% 20%, rgba(196,122,26,0.22), transparent 32%),
    radial-gradient(circle at 85% 10%, rgba(31,91,61,0.2), transparent 34%),
    linear-gradient(155deg, #efe8da, #dfe8df 45%, #e8dfd0);
}

.gt-login-card {
  width: min(420px, 100%);
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid var(--gt-line);
  border-radius: 24px;
  padding: 2rem 1.6rem;
  box-shadow: var(--gt-shadow);
  backdrop-filter: blur(8px);
  animation: gtRise 0.5s ease both;
}

.gt-login-card .gt-brand {
  margin-bottom: 1.25rem;
  color: var(--gt-ink);
}

.gt-login-card .gt-brand small { color: var(--gt-muted); }

.gt-login-card h1 {
  margin: 0 0 0.35rem;
  font-family: var(--gt-display);
  font-size: 1.9rem;
  color: var(--gt-green-deep);
}

.gt-login-card > p {
  margin: 0 0 1.25rem;
  color: var(--gt-muted);
}

.gt-login-card .gt-field { margin-bottom: 0.85rem; }
.gt-login-card .gt-btn { width: 100%; margin-top: 0.4rem; }

.gt-coming-soon {
  display: grid;
  gap: 1rem;
}

.gt-coming-card {
  background: var(--gt-surface);
  border: 1px dashed rgba(31,91,61,0.28);
  border-radius: var(--gt-radius);
  padding: 1.25rem;
}

.gt-coming-card h3 {
  margin: 0 0 0.4rem;
  font-family: var(--gt-display);
  color: var(--gt-green-deep);
}

.gt-coming-card p {
  margin: 0;
  color: var(--gt-muted);
}

.gt-actions-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

@keyframes gtRise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.gt-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.gt-stat-card {
  background: var(--gt-surface);
  border: 1px solid var(--gt-line);
  border-radius: var(--gt-radius);
  padding: 0.9rem 1rem;
}

.gt-stat-label {
  display: block;
  color: var(--gt-muted);
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.gt-stat-value {
  display: block;
  font-family: var(--gt-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gt-green-deep);
}

.gt-dash-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.gt-dash-card {
  background: var(--gt-surface);
  border: 1px solid var(--gt-line);
  border-radius: var(--gt-radius);
  box-shadow: var(--gt-shadow);
  padding: 1.15rem 1.2rem;
}

.gt-dash-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.gt-dash-card-head h3 {
  margin: 0;
  font-family: var(--gt-display);
  font-size: 1.15rem;
  color: var(--gt-green-deep);
}

.gt-dash-hero {
  margin: 0 0 1rem;
  font-family: var(--gt-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--gt-ink);
  line-height: 1.1;
}

.gt-dash-hero span {
  display: inline-block;
  margin-left: 0.25rem;
  font-family: var(--gt-font);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gt-muted);
  vertical-align: middle;
}

.gt-dash-hero-money {
  font-size: 1.55rem;
}

.gt-dash-metrics {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.gt-dash-metrics li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--gt-line);
  color: var(--gt-muted);
  font-size: 0.9rem;
}

.gt-dash-metrics strong {
  color: var(--gt-ink);
  font-weight: 700;
}

.gt-panel-simple {
  box-shadow: none;
}

.gt-tracking-map {
  height: 480px;
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--gt-line);
  background: #e8efe9;
  overflow: hidden;
}

.gt-tracking-map-wrap {
  position: relative;
}

.gt-tracking-map > div {
  height: 100%;
  width: 100%;
}

.gt-map-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.gt-map-stats > div {
  background: #f3efe6;
  border: 1px solid var(--gt-line);
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
}

.gt-map-stats span {
  display: block;
  color: var(--gt-muted);
  font-size: 0.8rem;
  margin-bottom: 0.2rem;
}

.gt-map-stats strong {
  color: var(--gt-green-deep);
  font-size: 1.05rem;
}

.gt-map-overlay {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  max-width: calc(100% - 24px);
  background: rgba(255, 253, 248, 0.94);
  border: 1px solid var(--gt-line);
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  color: var(--gt-ink);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(20, 40, 28, 0.12);
  pointer-events: none;
}

.gt-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  margin: 0.85rem 0 0;
  color: var(--gt-muted);
  font-size: 0.85rem;
}

.gt-map-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.gt-map-swatch {
  display: inline-block;
  width: 18px;
  height: 4px;
  border-radius: 999px;
}

.gt-map-swatch-path {
  background: var(--gt-green);
}

.gt-map-swatch-area {
  height: 12px;
  width: 12px;
  border-radius: 3px;
  background: rgba(196, 122, 26, 0.25);
  border: 2px solid var(--gt-amber);
}

.gt-muted-text {
  color: var(--gt-muted);
  font-size: 0.85rem;
}

.gt-table-simple th,
.gt-table-simple td {
  padding: 0.65rem 0.75rem;
}

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

.gt-link:hover {
  text-decoration: underline;
}

@media (max-width: 1100px) {
  .gt-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gt-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gt-dash-cards { grid-template-columns: 1fr; }
  .gt-panel-grid { grid-template-columns: 1fr; }
  .gt-map-stats { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .gt-app { grid-template-columns: 1fr; }
  .gt-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(80vw, 280px);
    z-index: 30;
    transform: translateX(-105%);
    transition: transform 200ms ease;
  }
  .gt-sidebar.is-open { transform: translateX(0); }
  .gt-menu-toggle { display: inline-grid; place-items: center; }
  .gt-content, .gt-topbar { padding-left: 1rem; padding-right: 1rem; }
  .gt-modal-grid { grid-template-columns: 1fr; }
}
