:root {
  --primary: #00ffec;
  --primary-dim: #00ffec33;
  --primary-glow: #00ffec1a;
  --bg: #000;
  --bg-elevated: #0a0f14;
  --bg-card: #0d1418;
  --bg-hover: #111a20;
  --border: #1a2329;
  --border-strong: #243039;
  --text: #fff;
  --text-dim: #8a9199;
  --text-muted: #5a6169;
  --ok: #22e59b;
  --warn: #ffd166;
  --err: #ff5c7a;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box
}

html,
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh
}

body {
  background-image:
    radial-gradient(ellipse 1000px 700px at 20% -10%, rgba(0, 255, 236, .06), transparent 60%),
    radial-gradient(ellipse 800px 600px at 110% 10%, rgba(0, 255, 236, .04), transparent 60%),
    linear-gradient(rgba(0, 255, 236, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 236, .025) 1px, transparent 1px);
  background-size: auto, auto, 60px 60px, 60px 60px;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit
}

.btn,
.tab,
.radio-opt,
.icon-btn,
.sidebar-nav li,
.service-item .chk,
.service-item .name,
.var-item button {
  cursor: pointer
}

input,
select,
textarea {
  font-family: inherit
}

/* ========= LOGIN ========= */
.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 48px 56px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 236, .5), transparent);
}

.login-card img.logo {
  width: 200px;
  margin: 0 auto 32px;
  filter: drop-shadow(0 0 14px rgba(0, 255, 236, .35))
}

.login-card h1 {
  font-size: 1.375em;
  font-weight: 700;
  letter-spacing: -.5px;
  margin-bottom: 8px
}

.login-card p {
  color: var(--text-dim);
  font-size: 0.8125em;
  margin-bottom: 32px;
  line-height: 1.6
}

#g_id_onload {
  display: flex;
  justify-content: center;
}

.g_id_signin {
  display: flex;
  justify-content: center
}

/* ========= APP LAYOUT ========= */
.app {
  display: none
}

.app.active {
  display: block
}

.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 260px;
  border-right: 1px solid var(--border);
  padding: 32px 20px 24px;
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  z-index: 50;
}

.sidebar-logo {
  margin-bottom: 36px;
  padding: 0 6px
}

.sidebar-logo img {
  width: 100%;
  max-width: 200px;
  filter: drop-shadow(0 0 14px rgba(0, 255, 236, .35))
}

.sidebar-section {
  font-size: 0.625em;
  color: var(--text-muted);
  letter-spacing: 1.6px;
  text-transform: uppercase;
  margin: 0 10px 10px;
  font-weight: 600;
}

.sidebar-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1
}

.sidebar-nav li {
  font-size: 0.8125em;
  color: var(--text-dim);
  letter-spacing: .3px;
  padding: 12px 14px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all .25s;
  position: relative;
  font-weight: 500;
}

.sidebar-nav li:hover {
  background: rgba(0, 255, 236, .04);
  color: var(--text)
}

.sidebar-nav li.active {
  background: rgba(0, 255, 236, .08);
  color: var(--primary)
}

.sidebar-nav li.active::after {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary);
  border-radius: 2px;
}

.sidebar-nav svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.8
}

.sidebar-footer {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.625em;
  color: var(--text-muted);
  letter-spacing: .4px;
  line-height: 1.6;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px
}

.sidebar-user .avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-image: linear-gradient(135deg, #00ffec, #00b4a8);
  display: grid;
  place-items: center;
  color: #000;
  font-weight: 800;
  box-shadow: 0 0 18px rgba(0, 255, 236, .25);
  background-size: cover;
  background-position: center;
}

.sidebar-user .who {
  color: var(--text-dim);
  flex: 1;
  min-width: 0
}

.sidebar-user .who b {
  display: block;
  color: var(--text);
  font-weight: 600;
  font-size: 1.2em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.sidebar-user .who span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.logout-btn {
  font-size: 1.2em;
  color: var(--text-muted);
  letter-spacing: .5px;
  text-transform: uppercase;
  cursor: pointer;
  text-align: center;
  width: 100%
}

.logout-btn:hover {
  color: var(--err)
}

.main {
  margin-left: 260px;
  padding: 40px 48px 80px;
  max-width: 1500px
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 32px;
  gap: 24px;
  flex-wrap: wrap
}

.page-header h1 {
  font-size: 2.5em;
  font-weight: 800;
  letter-spacing: -1.2px;
  line-height: 1
}

.page-header h1 .accent {
  color: var(--primary)
}

.page-header p {
  font-size: 0.8125em;
  color: var(--text-dim);
  margin-top: 10px;
  max-width: 560px;
  line-height: 1.6
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.625em;
  color: var(--primary);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 600;
  padding: 6px 14px;
  background: rgba(0, 255, 236, .08);
  border: 1px solid rgba(0, 255, 236, .2);
  border-radius: 999px;
  margin-bottom: 16px;
}

.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary)
}

/* ========= BUTTONS ========= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 8px;
  font-size: 0.8125em;
  font-weight: 600;
  letter-spacing: .3px;
  transition: all .25s;
  border: 1px solid transparent;
  white-space: nowrap;
}

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

.btn-primary:hover {
  box-shadow: 0 0 24px rgba(0, 255, 236, .4);
  transform: translateY(-1px)
}

.btn-primary:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none
}

.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  border-color: var(--border)
}

.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(0, 255, 236, .04)
}

.btn-danger {
  background: rgba(255, 92, 122, .1);
  color: var(--err);
  border-color: rgba(255, 92, 122, .3)
}

.btn-danger:hover {
  background: rgba(255, 92, 122, .2)
}

.btn svg {
  width: 14px;
  height: 14px;
  stroke-width: 2
}

/* ========= CARDS ========= */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 236, .3), transparent);
}

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

.stat {
  padding: 22px
}

.stat .label {
  font-size: 0.625em;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 600
}

.stat .value {
  font-size: 1.875em;
  font-weight: 800;
  margin-top: 8px;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums
}

.stat.accent .value {
  color: var(--primary);
  text-shadow: 0 0 20px rgba(0, 255, 236, .4)
}

/* ========= FILTERS ========= */
.filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 20px;
}

.filters .search {
  flex: 1;
  min-width: 240px;
  position: relative
}

.filters .search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  stroke-width: 2
}

.input,
.filters input,
.filters select {
  width: 100%;
  padding: 10px 14px 10px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.8125em;
  transition: all .2s;
}

.filters .search input {
  padding-left: 36px
}

.filters input:focus,
.input:focus,
.filters select:focus,
select.input:focus,
textarea.input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 255, 236, .1);
}

.filters .date-range {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.75em
}

.filters .date-range input {
  padding-left: 14px;
  min-width: 140px
}

/* ========= TABLE ========= */
.table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse
}

thead th {
  text-align: left;
  font-size: 0.625em;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, .3);
}

tbody td {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 0.8125em;
  color: var(--text-dim);
  vertical-align: middle
}

tbody td b {
  color: var(--text);
  font-weight: 600
}

tbody tr {
  transition: background .2s;
  cursor: pointer
}

tbody tr:hover {
  background: rgba(0, 255, 236, .03)
}

tbody tr:last-child td {
  border-bottom: none
}

.empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8125em
}

.money {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--text)
}

.money.accent {
  color: var(--primary)
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.625em;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase
}

.badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%
}

.badge.pending {
  background: rgba(255, 209, 102, .1);
  color: var(--warn)
}

.badge.pending::before {
  background: var(--warn);
  box-shadow: 0 0 6px var(--warn)
}

.badge.accepted {
  background: rgba(34, 229, 155, .1);
  color: var(--ok)
}

.badge.accepted::before {
  background: var(--ok);
  box-shadow: 0 0 6px var(--ok)
}

.badge.rejected {
  background: rgba(255, 92, 122, .1);
  color: var(--err)
}

.badge.rejected::before {
  background: var(--err)
}

.row-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end
}

.icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  display: grid;
  place-items: center;
  color: var(--text-dim);
  transition: all .2s;
}

.icon-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(0, 255, 236, .06)
}

.icon-btn.danger:hover {
  color: var(--err);
  border-color: var(--err);
  background: rgba(255, 92, 122, .06)
}

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

.icon-btn svg {
  width: 14px;
  height: 14px;
  stroke-width: 2
}

/* ========= FORMS ========= */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px
}

.form-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  position: relative;
  overflow: hidden
}

.form-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 236, .3), transparent)
}

.form-section h3 {
  font-size: 0.6875em;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-section h3::before {
  content: '';
  width: 20px;
  height: 1px;
  background: var(--primary)
}

.field {
  margin-bottom: 16px
}

.field label {
  display: block;
  font-size: 0.6875em;
  color: var(--text-muted);
  margin-bottom: 6px;
  letter-spacing: .5px;
  font-weight: 500;
  text-transform: uppercase
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px
}

.field-row-3 {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 12px
}

.field-row-cep {
  display: grid;
  grid-template-columns: 160px 1fr 100px;
  gap: 12px
}

/* services list inside proposal form */
.service-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 4px
}

.service-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
  transition: all .2s;
}

.service-item .chk {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1.5px solid var(--border-strong);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  cursor: pointer;
}

.service-item.selected {
  border-color: var(--primary);
  background: rgba(0, 255, 236, .05)
}

.service-item.selected .chk {
  background: var(--primary);
  border-color: var(--primary)
}

.service-item.selected .chk::after {
  content: '';
  width: 5px;
  height: 9px;
  border: solid #000;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px)
}

.service-item .name {
  flex: 1;
  font-size: 0.8125em;
  color: var(--text);
  font-weight: 500;
  cursor: pointer
}

.service-item input.price-input {
  width: 120px;
  padding: 6px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.75em;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.service-item input.price-input:focus {
  outline: none;
  border-color: var(--primary)
}

.service-item input.price-input:disabled {
  opacity: .4
}

/* radio special condition */
.radio-group {
  display: flex;
  gap: 10px;
  margin-top: 8px
}

.radio-opt {
  flex: 1;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8125em;
  font-weight: 500;
}

.radio-opt:hover {
  border-color: var(--primary-dim)
}

.radio-opt.active {
  border-color: var(--primary);
  background: rgba(0, 255, 236, .06);
  color: var(--primary)
}

.radio-opt .dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  display: grid;
  place-items: center;
  transition: all .2s;
  flex-shrink: 0;
}

.radio-opt.active .dot {
  border-color: var(--primary)
}

.radio-opt.active .dot::after {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary)
}

/* summary */
.summary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  position: sticky;
  top: 24px
}

.summary h3 {
  font-size: 0.6875em;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 20px
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.8125em
}

.summary-row .k {
  color: var(--text);
}

.summary-row .v {
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums
}

.summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0 4px;
  margin-top: 10px;
  border-top: 1px solid var(--border)
}

.summary-total .k {
  font-size: 0.6875em;
  letter-spacing: 1.5px;
  color: var(--text);
  text-transform: uppercase
}

.summary-total .v {
  font-size: 1.75em;
  font-weight: 800;
  color: var(--primary);
  text-shadow: 0 0 20px rgba(0, 255, 236, .3);
  font-variant-numeric: tabular-nums
}

.summary-promo {
  background: rgba(0, 255, 236, .06);
  border: 1px dashed var(--primary);
  border-radius: 8px;
  padding: 14px 16px;
  margin-top: 14px
}

.summary-promo .tag {
  font-size: 0.5625em;
  letter-spacing: 1.5px;
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 6px
}

.summary-promo .price {
  font-size: 1.375em;
  font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums
}

.summary-promo .note {
  font-size: 0.625em;
  color: var(--text);
  margin-top: 4px
}

/* page switcher */
.page {
  display: none
}

.page.active {
  display: block;
  animation: fadeIn .3s ease
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

/* tabs */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px
}

.tab {
  padding: 12px 20px;
  font-size: 0.75em;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all .2s
}

.tab:hover {
  color: var(--text-dim)
}

.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary)
}

textarea.input {
  min-height: 340px;
  font-family: 'JetBrains Mono', Menlo, monospace;
  font-size: 0.75em;
  line-height: 1.6;
  resize: vertical
}

/* modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .7);
  backdrop-filter: blur(8px);
  display: none;
  justify-content: center;
  align-items: flex-start;
  padding: 60px 20px;
  z-index: 200;
  overflow-y: auto;
}

.modal-backdrop.active {
  display: flex
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 100%;
  max-width: 720px;
  padding: 32px;
  position: relative;
}

.modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 236, .3), transparent)
}

.modal h2 {
  font-size: 1.25em;
  font-weight: 700;
  letter-spacing: -.5px;
  margin-bottom: 24px
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border)
}

/* toast */
.toast-wrap {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 300
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 20px;
  font-size: 0.8125em;
  color: var(--text);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .5);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  animation: slideIn .25s ease;
}

.toast.success {
  border-color: var(--ok)
}

.toast.error {
  border-color: var(--err)
}

@keyframes slideIn {
  from {
    transform: translateX(20px);
    opacity: 0
  }

  to {
    transform: translateX(0);
    opacity: 1
  }
}

/* variables panel (templates page) */
.vars-panel {
  margin-top: 20px
}

.vars-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px
}

.var-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.6875em;
}

.var-item code {
  color: var(--primary);
  font-family: 'JetBrains Mono', Menlo, monospace;
  font-size: 0.6875em
}

.var-item .desc {
  color: var(--text-dim);
  font-size: 0.6875em;
  margin-left: 12px;
  flex: 1
}

.var-item button {
  font-size: 0.5625em;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
}

.var-item button:hover {
  color: var(--primary);
  border-color: var(--primary)
}

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

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

/* ========= RESPONSIVE — Tablet (max 900px) ========= */
@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    left: -280px;
    width: 260px;
    transition: left .3s ease;
    z-index: 500;
  }

  .sidebar.open {
    left: 0;
  }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    z-index: 499;
  }

  .sidebar-overlay.active {
    display: block;
  }

  .menu-toggle {
    display: flex !important;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 501;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--primary);
  }

  .menu-toggle svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
  }

  .main {
    margin-left: 0;
    padding: 72px 20px 60px;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-header h1 {
    font-size: clamp(1.5em, 5vw, 2.5em);
  }

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

  .stat .value {
    font-size: clamp(1.25em, 4vw, 1.875em);
  }

  .filters {
    flex-direction: column;
    gap: 10px;
  }

  .filters .search {
    min-width: 100%;
  }

  .filters .date-range {
    flex-wrap: wrap;
  }

  .filters .date-range input {
    min-width: 120px;
    flex: 1;
  }

  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 700px;
  }

  .modal {
    max-width: 95vw;
    padding: 24px 20px;
  }

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

  .field-row,
  .field-row-3,
  .field-row-cep {
    grid-template-columns: 1fr;
  }

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

  .summary {
    position: static;
  }
}

/* ========= RESPONSIVE — Mobile (max 600px) ========= */
@media (max-width: 600px) {
  .main {
    padding: 68px 14px 48px;
  }

  .page-header h1 {
    font-size: clamp(1.25em, 6vw, 2em);
  }

  .page-header p {
    font-size: 0.75em;
  }

  .eyebrow {
    font-size: 0.5em;
    padding: 4px 10px;
  }

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

  .stat {
    padding: 16px;
  }

  .stat .label {
    font-size: 0.5625em;
  }

  .stat .value {
    font-size: 1.25em;
  }

  .btn {
    padding: 10px 16px;
    font-size: 0.75em;
  }

  .card {
    padding: 16px;
    border-radius: 10px;
  }

  .login-card {
    padding: 32px 24px;
  }

  .login-card img.logo {
    width: 160px;
  }

  .login-card h1 {
    font-size: 1.125em;
  }

  .login-card p {
    font-size: 0.75em;
  }

  thead th {
    font-size: 0.5625em;
    padding: 12px 14px;
  }

  tbody td {
    padding: 14px;
    font-size: 0.75em;
  }

  .row-actions {
    gap: 4px;
  }

  .icon-btn {
    width: 28px;
    height: 28px;
  }

  .icon-btn svg {
    width: 12px;
    height: 12px;
  }

  .modal-backdrop {
    padding: 24px 12px;
  }

  .modal h2 {
    font-size: 1.125em;
  }

  .summary-total .v {
    font-size: 1.375em;
  }

  .summary-promo .price {
    font-size: 1.125em;
  }

  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tab {
    font-size: 0.625em;
    padding: 10px 14px;
    white-space: nowrap;
  }

  textarea.input {
    min-height: 220px;
    font-size: 0.6875em;
  }

  .service-item {
    padding: 10px 12px;
    gap: 8px;
  }

  .service-item .name {
    font-size: 0.75em;
  }

  .service-item input.price-input {
    width: 90px;
    font-size: 0.6875em;
  }

  .radio-opt {
    padding: 10px 14px;
    font-size: 0.75em;
  }

  .toast {
    min-width: auto;
    font-size: 0.75em;
    padding: 10px 16px;
  }

  .toast-wrap {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  .var-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .var-item .desc {
    margin-left: 0;
  }
}

/* ========= Hide menu toggle on desktop ========= */
.menu-toggle {
  display: none;
}