:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #10141a;
  --bg-elevated: #171d26;
  --bg-soft: #1e2632;
  --line: rgba(232, 214, 180, 0.12);
  --text: #f3efe6;
  --muted: #9aa3b2;
  --label: #d5c9b0;
  --placeholder: #8b93a3;
  --accent: #e6b35a;
  --accent-strong: #f0c56f;
  --accent-dim: rgba(230, 179, 90, 0.14);
  --success: #5db88a;
  --danger: #e07a6a;
  --warning: #d4a24c;
  --info: #6ea8c9;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --font: "Poppins", sans-serif;
  --serif: "Poppins", sans-serif;
  --sidebar: 260px;
  --bg-glow-1: rgba(230, 179, 90, 0.12);
  --bg-glow-2: rgba(110, 168, 201, 0.08);
  --bg-grad-top: #121821;
  --bg-grad-bot: #0d1117;
  --panel-bg: rgba(23, 29, 38, 0.88);
  --sidebar-bg: rgba(16, 20, 26, 0.85);
  --stat-bg: linear-gradient(180deg, rgba(30, 38, 50, 0.95), rgba(23, 29, 38, 0.95));
  --overlay: rgba(8, 10, 14, 0.72);
  --row-hover: rgba(230, 179, 90, 0.04);
  --table-stripe: rgba(0, 0, 0, 0.15);
  --badge-ok-bg: rgba(93, 184, 138, 0.15);
  --badge-ok-text: #8fd4b0;
  --badge-ok-border: rgba(93, 184, 138, 0.3);
  --badge-warn-bg: rgba(212, 162, 76, 0.15);
  --badge-warn-text: #e6c48a;
  --badge-warn-border: rgba(212, 162, 76, 0.3);
  --badge-bad-bg: rgba(224, 122, 106, 0.15);
  --badge-bad-text: #f0b4aa;
  --badge-bad-border: rgba(224, 122, 106, 0.3);
  --badge-muted-bg: rgba(154, 163, 178, 0.12);
  --badge-muted-border: rgba(154, 163, 178, 0.2);
  --badge-info-bg: rgba(110, 168, 201, 0.15);
  --badge-info-text: #9ecae0;
  --badge-info-border: rgba(110, 168, 201, 0.3);
  --icon-mail: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23f0c56f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E");
  --icon-lock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23f0c56f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E");
  --icon-phone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23f0c56f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.8 19.8 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.12 4.18 2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.12.9.33 1.77.63 2.6a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.48-1.2a2 2 0 0 1 2.11-.45c.83.3 1.7.51 2.6.63A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E");
  --icon-id: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23f0c56f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Ccircle cx='9' cy='12' r='2'/%3E%3Cpath d='M14 10h4M14 14h4'/%3E%3C/svg%3E");
  --icon-search: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23f0c56f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  --icon-calendar: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23f0c56f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 11h18'/%3E%3C/svg%3E");
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #eef1f4;
  --bg-elevated: #ffffff;
  --bg-soft: #e4e9ef;
  --line: rgba(26, 34, 44, 0.12);
  --text: #1a222c;
  --muted: #5c6775;
  --label: #3d4754;
  --placeholder: #8a94a3;
  --accent: #c4922e;
  --accent-strong: #a67a1f;
  --accent-dim: rgba(196, 146, 46, 0.16);
  --success: #2f9d6a;
  --danger: #c75b4c;
  --warning: #b8862e;
  --info: #3e87ad;
  --shadow: 0 16px 36px rgba(26, 34, 44, 0.1);
  --bg-glow-1: rgba(196, 146, 46, 0.14);
  --bg-glow-2: rgba(62, 135, 173, 0.08);
  --bg-grad-top: #f5f7fa;
  --bg-grad-bot: #e5eaf0;
  --panel-bg: rgba(255, 255, 255, 0.92);
  --sidebar-bg: rgba(255, 255, 255, 0.9);
  --stat-bg: linear-gradient(180deg, #ffffff, #f4f6f8);
  --overlay: rgba(18, 24, 32, 0.45);
  --row-hover: rgba(196, 146, 46, 0.08);
  --table-stripe: rgba(26, 34, 44, 0.03);
  --badge-ok-bg: rgba(47, 157, 106, 0.12);
  --badge-ok-text: #1f6b47;
  --badge-ok-border: rgba(47, 157, 106, 0.28);
  --badge-warn-bg: rgba(184, 134, 46, 0.14);
  --badge-warn-text: #8a6418;
  --badge-warn-border: rgba(184, 134, 46, 0.3);
  --badge-bad-bg: rgba(199, 91, 76, 0.12);
  --badge-bad-text: #9a3d32;
  --badge-bad-border: rgba(199, 91, 76, 0.28);
  --badge-muted-bg: rgba(92, 103, 117, 0.1);
  --badge-muted-border: rgba(92, 103, 117, 0.22);
  --badge-info-bg: rgba(62, 135, 173, 0.12);
  --badge-info-text: #2a6482;
  --badge-info-border: rgba(62, 135, 173, 0.28);
  --icon-mail: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23a67a1f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E");
  --icon-lock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23a67a1f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E");
  --icon-phone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23a67a1f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.8 19.8 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.12 4.18 2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.12.9.33 1.77.63 2.6a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.48-1.2a2 2 0 0 1 2.11-.45c.83.3 1.7.51 2.6.63A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E");
  --icon-id: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23a67a1f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Ccircle cx='9' cy='12' r='2'/%3E%3Cpath d='M14 10h4M14 14h4'/%3E%3C/svg%3E");
  --icon-search: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23a67a1f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  --icon-calendar: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23a67a1f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 11h18'/%3E%3C/svg%3E");
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
}

body {
  background:
    radial-gradient(1200px 600px at 10% -10%, var(--bg-glow-1), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, var(--bg-glow-2), transparent 50%),
    linear-gradient(180deg, var(--bg-grad-top) 0%, var(--bg) 40%, var(--bg-grad-bot) 100%);
  background-attachment: fixed;
  transition: background-color 0.25s ease, color 0.25s ease;
}

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

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

.hidden {
  display: none !important;
}

.muted {
  color: var(--muted);
}

.logo {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-transform: lowercase;
  font-size: 1.35rem;
  color: var(--accent-strong);
}

.logo-lg {
  font-size: 2.4rem;
}


.boot-loader {
  min-height: 100vh;
  display: grid;
  place-content: center;
  gap: 0.5rem;
  text-align: center;
  animation: fadeIn 0.4s ease;
}


.auth-view {
  position: relative;
  min-height: 100vh;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
}

.auth-brand {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 5vw, 4rem);
  border-right: 1px solid var(--line);
  display: flex;
  align-items: flex-end;
}

.auth-brand-inner {
  position: relative;
  z-index: 1;
  max-width: 32rem;
  animation: riseIn 0.7s ease both;
}

.auth-brand h1 {
  margin: 1.25rem 0 0.75rem;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.auth-lead {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
  max-width: 28rem;
}

.auth-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(230, 179, 90, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(230, 179, 90, 0.08) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 30% 70%, black 20%, transparent 70%);
  animation: gridDrift 18s linear infinite;
}

.auth-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 3rem);
  max-width: 440px;
  width: 100%;
  margin: 0 auto;
  animation: fadeIn 0.5s ease 0.1s both;
}

.auth-panel-title {
  margin: 0 0 0.35rem;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
}

.auth-panel-sub {
  margin: 0 0 1.4rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.auth-form {
  display: grid;
  gap: 0.9rem;
}

.auth-form label,
.form-grid label,
.field {
  display: grid;
  gap: 0.35rem;
}

.auth-form span,
.form-grid span,
.field span {
  font-size: 0.85rem;
  color: var(--label);
  font-weight: 500;
}

input,
select,
textarea {
  width: 100%;
  background-color: var(--bg-elevated);
  background-repeat: no-repeat;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.8rem 0.95rem;
  outline: none;
  color: var(--text);
  color-scheme: inherit;
  caret-color: var(--accent-strong);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input::placeholder,
textarea::placeholder {
  color: var(--placeholder);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(230, 179, 90, 0.55);
  box-shadow: 0 0 0 3px var(--accent-dim);
}


input::-webkit-contacts-auto-fill-button,
input::-webkit-credentials-auto-fill-button,
input::-webkit-strong-password-auto-fill-button,
input::-webkit-caps-lock-indicator {
  visibility: hidden !important;
  display: none !important;
  pointer-events: none !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  position: absolute !important;
}

input::-webkit-clear-button,
input::-webkit-inner-spin-button {
  display: none;
}

input::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 1;
  background: var(--icon-calendar) center / 1.05rem no-repeat;
  color: transparent;
  width: 1.2rem;
  height: 1.2rem;
}

input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
  display: none;
}


input[type="email"] {
  padding-right: 2.5rem;
  background-image: var(--icon-mail);
  background-position: right 0.85rem center;
  background-size: 1.1rem;
}

input[type="password"] {
  padding-right: 2.5rem;
  background-image: var(--icon-lock);
  background-position: right 0.85rem center;
  background-size: 1.1rem;
}

input[type="tel"],
input[name="phone"] {
  padding-right: 2.5rem;
  background-image: var(--icon-phone);
  background-position: right 0.85rem center;
  background-size: 1.1rem;
}

input[name="document"] {
  padding-right: 2.5rem;
  background-image: var(--icon-id);
  background-position: right 0.85rem center;
  background-size: 1.1rem;
}

input.search,
input[type="search"] {
  padding-left: 2.4rem;
  background-image: var(--icon-search);
  background-position: left 0.85rem center;
  background-size: 1.05rem;
}

input[type="month"],
input[type="date"] {
  padding-right: 2.5rem;
}

select {
  -webkit-appearance: none;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--accent-strong) 50%),
    linear-gradient(135deg, var(--accent-strong) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 52%,
    calc(100% - 12px) 52%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2.2rem;
}

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

.auth-hint {
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.form-message {
  min-height: 1.25rem;
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
}

.form-message.error {
  color: var(--danger);
}

.form-message.success {
  color: var(--success);
}


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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.4rem 1rem;
  border-right: 1px solid var(--line);
  background: var(--sidebar-bg);
  backdrop-filter: blur(12px);
  z-index: 20;
}

.sidebar-top .est-name {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.nav {
  display: grid;
  gap: 0.3rem;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: 0.18s ease;
}

.nav-item:hover {
  background: var(--bg-soft);
  color: var(--text);
}

.nav-item.active {
  background: var(--accent-dim);
  color: var(--accent-strong);
  font-weight: 600;
}

.nav-icon {
  width: 1.2rem;
  opacity: 0.85;
}

.sidebar-bottom {
  display: grid;
  gap: 0.6rem;
}

.user-chip {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  word-break: break-all;
}

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

.topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem 0.5rem;
}

.topbar h2 {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

.page-subtitle {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.menu-toggle {
  display: none;
}

.content {
  padding: 1rem 1.5rem 2rem;
  animation: fadeIn 0.35s ease;
}


.btn {
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
  cursor: pointer;
  background: var(--bg-soft);
  color: var(--text);
  transition: 0.18s ease;
  white-space: nowrap;
}

.btn:hover {
  filter: brightness(1.08);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(180deg, var(--accent-strong), var(--accent));
  color: #1a1408;
  font-weight: 700;
}

.btn-danger {
  background: rgba(224, 122, 106, 0.18);
  border-color: rgba(224, 122, 106, 0.35);
  color: var(--badge-bad-text);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
}

.btn-block {
  width: 100%;
}

.btn-icon {
  padding: 0.45rem 0.65rem;
}

.btn-sm {
  padding: 0.45rem 0.7rem;
  font-size: 0.85rem;
}


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

.stat {
  background: var(--stat-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  animation: riseIn 0.45s ease both;
}

.stat:nth-child(2) { animation-delay: 0.05s; }
.stat:nth-child(3) { animation-delay: 0.1s; }
.stat:nth-child(4) { animation-delay: 0.15s; }

.stat .label {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.stat .value {
  margin: 0.35rem 0 0;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.stat .value.ok { color: var(--success); }
.stat .value.warn { color: var(--warning); }
.stat .value.bad { color: var(--danger); }
.stat .value.info { color: var(--info); }

.panel {
  background: var(--panel-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--line);
}

.panel-header h3 {
  margin: 0;
  font-size: 1.05rem;
}

.panel-body {
  padding: 1rem 1.1rem;
}

.toolbar {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  align-items: center;
}

.toolbar .search {
  flex: 1;
  min-width: 180px;
}

.table-wrap {
  overflow: auto;
}

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

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

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

table.data tr:hover td {
  background: var(--row-hover);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.badge-ok {
  background: var(--badge-ok-bg);
  color: var(--badge-ok-text);
  border-color: var(--badge-ok-border);
}

.badge-warn {
  background: var(--badge-warn-bg);
  color: var(--badge-warn-text);
  border-color: var(--badge-warn-border);
}

.badge-bad {
  background: var(--badge-bad-bg);
  color: var(--badge-bad-text);
  border-color: var(--badge-bad-border);
}

.badge-muted {
  background: var(--badge-muted-bg);
  color: var(--muted);
  border-color: var(--badge-muted-border);
}

.badge-info {
  background: var(--badge-info-bg);
  color: var(--badge-info-text);
  border-color: var(--badge-info-border);
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.row-actions .btn {
  border: 0;
  box-shadow: none;
  text-decoration: none;
}

.row-actions .btn-ghost {
  background: transparent;
  border: 0;
}

.row-actions .btn-danger {
  border: 0;
}

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

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

.form-grid .full {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

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

.spot-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.7rem;
}

.spot-tile {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  background: var(--bg-soft);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease;
  text-align: left;
  animation: riseIn 0.4s ease both;
}

.spot-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(230, 179, 90, 0.4);
}

.spot-tile .code {
  margin: 0;
  font-weight: 700;
  font-size: 1.1rem;
}

.spot-tile .meta {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.spot-tile.occupied {
  background: rgba(230, 179, 90, 0.08);
}

.spot-tile.available {
  background: rgba(93, 184, 138, 0.08);
}

.spot-tile.maintenance,
.spot-tile.reserved {
  background: rgba(154, 163, 178, 0.08);
}

.report-month {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

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

.list-plain li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.12);
}

.stripe-banner {
  border-color: rgba(230, 179, 90, 0.35);
}

.stripe-banner.ok {
  border-color: rgba(93, 184, 138, 0.4);
}

.stripe-banner.warn {
  border-color: rgba(212, 162, 76, 0.45);
}

.stripe-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  pointer-events: none;
  opacity: 0.9;
}

.spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(26, 20, 8, 0.25);
  border-top-color: #1a1408;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

.btn-ghost .spinner,
.btn:not(.btn-primary) .spinner {
  border-color: rgba(243, 239, 230, 0.25);
  border-top-color: var(--accent-strong);
}

.stripe-loading-hint {
  display: none;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.stripe-loading-hint.show {
  display: inline-flex;
  animation: fadeIn 0.25s ease;
}

.stripe-loading-hint .spinner {
  border-color: rgba(230, 179, 90, 0.25);
  border-top-color: var(--accent-strong);
}

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


.modal-root {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay);
  backdrop-filter: blur(4px);
}

.modal {
  position: relative;
  width: min(560px, 100%);
  max-height: min(88vh, 900px);
  overflow: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  box-shadow: var(--shadow);
  animation: riseIn 0.28s ease;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--bg-elevated);
  z-index: 1;
}

.modal-header h3 {
  margin: 0;
}

.modal-body {
  padding: 1.1rem;
}


.toast-root {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 80;
  display: grid;
  gap: 0.5rem;
}

.toast {
  min-width: 220px;
  max-width: 360px;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  animation: riseIn 0.25s ease;
}

.toast.ok { border-color: rgba(93, 184, 138, 0.4); }
.toast.error { border-color: rgba(224, 122, 106, 0.45); }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes gridDrift {
  from { transform: translateY(0); }
  to { transform: translateY(48px); }
}

@media (max-width: 1100px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 860px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-brand {
    min-height: 36vh;
    align-items: center;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: min(280px, 86vw);
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    box-shadow: var(--shadow);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .menu-toggle {
    display: inline-flex;
  }

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

@media (max-width: 560px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .content,
  .topbar {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

.vaggo-swal {
  background: var(--bg-elevated) !important;
  color: var(--text) !important;
  border: 1px solid var(--line) !important;
  border-radius: calc(var(--radius) + 4px) !important;
  box-shadow: var(--shadow) !important;
  font-family: var(--font) !important;
  padding: 1.5rem 1.35rem 1.25rem !important;
}

.vaggo-swal-title {
  color: var(--text) !important;
  font-family: var(--serif) !important;
  font-size: 1.35rem !important;
  font-weight: 700 !important;
}

.vaggo-swal-text {
  color: var(--muted) !important;
  font-size: 0.95rem !important;
}

.vaggo-swal-actions {
  gap: 0.65rem !important;
  margin-top: 1.25rem !important;
}

.vaggo-swal .vaggo-swal-icon.swal2-warning {
  border-color: var(--accent) !important;
  color: var(--accent-strong) !important;
}

.swal2-backdrop-show {
  background: var(--overlay) !important;
}

.theme-toggle {
  white-space: nowrap;
}

.theme-preference {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.pix-settings {
  padding-top: 0.85rem;
  padding-bottom: 0.95rem;
}

.pix-settings-help {
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
  line-height: 1.4;
  max-width: 42rem;
}

.pix-settings-form {
  display: grid;
  gap: 0.75rem;
  max-width: 420px;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
}

.toggle-title {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
}

.toggle-sub {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  line-height: 1.3;
}

.switch {
  position: relative;
  display: inline-flex;
  width: 44px;
  height: 26px;
  flex-shrink: 0;
  cursor: pointer;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  padding: 0;
}

.switch-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(154, 163, 178, 0.35);
  border: 1px solid var(--line);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.switch-slider::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease;
}

.switch input:checked + .switch-slider {
  background: var(--accent);
  border-color: transparent;
}

.switch input:checked + .switch-slider::before {
  transform: translateX(18px);
}

.switch input:focus-visible + .switch-slider {
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.pix-key-field {
  display: grid;
  gap: 0.3rem;
}

.pix-key-field span {
  font-size: 0.82rem;
  color: var(--label);
  font-weight: 500;
}

.pix-key-field input {
  padding: 0.65rem 0.85rem;
}

.pix-settings-form .btn {
  justify-self: start;
}
