:root {
  --bg: #020617;
  --bg-card: #0f172a;
  --bg-surface: #1e293b;
  --text: #f8fafc;
  --text-sec: #94a3b8;
  --text-muted: #64748b;
  --accent: #8b5cf6;
  --accent-hover: #7c3aed;
  --accent-glow: rgba(139, 92, 246, 0.12);
  --accent-green: #22c55e;
  --accent-gradient: linear-gradient(135deg, #22c55e 0%, #8b5cf6 100%);
  --accent-gradient-hover: linear-gradient(135deg, #16a34a 0%, #7c3aed 100%);
  --border: rgba(51, 65, 85, 0.5);
  --border-solid: #334155;
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 200ms ease;
  --font: 'Inter', system-ui, sans-serif;
  --nav-h: 68px;
  --warning-bg: #451a03;
  --warning-border: #f59e0b;
  --warning-icon: #fbbf24;
  --warning-text: #fde68a;
  --border-color: rgba(51, 65, 85, 0.5);
  --success-bg: rgba(34, 197, 94, 0.15);
  --card-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
  --glow-green: 0 0 20px rgba(139, 92, 246, 0.2);
}

[data-theme="light"] {
  --bg: #f8fafc;
  --bg-card: #ffffff;
  --bg-surface: #f1f5f9;
  --text: #0f172a;
  --text-sec: #475569;
  --text-muted: #94a3b8;
  --accent: #7c3aed;
  --accent-hover: #6d28d9;
  --accent-glow: rgba(124, 58, 237, 0.1);
  --accent-green: #16a34a;
  --accent-gradient: linear-gradient(135deg, #16a34a 0%, #7c3aed 100%);
  --accent-gradient-hover: linear-gradient(135deg, #15803d 0%, #6d28d9 100%);
  --border: rgba(226, 232, 240, 0.8);
  --border-solid: #e2e8f0;
  --success: #16a34a;
  --border-color: rgba(226, 232, 240, 0.8);
  --success-bg: rgba(22, 163, 74, 0.1);
  --card-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --warning-bg: #fef3c7;
  --warning-border: #f59e0b;
  --warning-icon: #d97706;
  --warning-text: #92400e;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: var(--transition); }
img { max-width: 100%; height: auto; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

.gradient-text {
  background: linear-gradient(135deg, var(--accent), #16a34a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-tag {
  display: inline-flex; font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--accent); background: var(--accent-glow);
  padding: 5px 12px;   border-radius: var(--radius-sm); border: 1px solid rgba(139, 92, 246, 0.15);
  margin-bottom: 12px;
}

.btn {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--font);
  font-weight: 600; font-size: 0.875rem; border: none; border-radius: var(--radius-sm);
  cursor: pointer; transition: all 250ms cubic-bezier(0.16, 1, 0.3, 1); white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--accent-gradient); color: #fff; padding: 10px 20px; box-shadow: var(--glow-green); border: none; }
.btn-primary:hover { background: var(--accent-gradient-hover); box-shadow: 0 0 30px rgba(139, 92, 246, 0.35); transform: translateY(-1px); }

.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border-solid); padding: 10px 20px; }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }

.btn-lg { padding: 14px 28px; font-size: 1rem; border-radius: var(--radius); }
.btn-sm { padding: 8px 16px; font-size: 0.8125rem; }
.btn-full { width: 100%; justify-content: center; padding: 13px; font-size: 1rem; border-radius: var(--radius); }

.btn-franchisee {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #fff; border: none; position: relative; overflow: hidden;
  animation: pulse-franchisee 2s ease-in-out infinite;
  box-shadow: 0 0 20px rgba(124,58,237,0.3);
}
.btn-franchisee:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(124,58,237,0.5);
  color: #fff;
}
.btn-franchisee::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transform: translateX(-100%);
  animation: shimmer 3s infinite;
}
@keyframes pulse-franchisee {
  0%, 100% { box-shadow: 0 0 20px rgba(124,58,237,0.3); }
  50% { box-shadow: 0 0 35px rgba(124,58,237,0.6); }
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

#particles-canvas { position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: 0.4; }

.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: var(--nav-h);
  background: rgba(2, 6, 23, 0.85); backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid var(--border); transition: all 250ms ease;
}
[data-theme="light"] .navbar { background: rgba(248, 250, 252, 0.88); }

.nav-container {
  max-width: 1100px; margin: 0 auto; padding: 0 24px; height: 100%;
  display: flex; align-items: center; justify-content: space-between;
}

.logo-img { height: 46px; width: auto; }
.auth-logo .logo-img { height: 56px; }
.dash-logo .logo-img { height: 42px; }

.nav-links { display: flex; align-items: center; gap: 4px; }

.nav-link {
  color: var(--text-sec); font-size: 0.875rem; font-weight: 500;
  padding: 8px 14px; border-radius: var(--radius-sm); transition: all 200ms ease;
}
.nav-link:hover, .nav-link.active { color: var(--text); background: var(--bg-surface); }

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

.theme-toggle {
  display: flex; align-items: center; justify-content: center; width: 38px; height: 38px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-solid); background: transparent;
  color: var(--text-sec); cursor: pointer; transition: all 200ms ease;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }
.theme-toggle svg { width: 18px; height: 18px; }
[data-theme="dark"] .sun-icon { display: none; }
[data-theme="dark"] .moon-icon { display: block; }
[data-theme="light"] .sun-icon { display: block; }
[data-theme="light"] .moon-icon { display: none; }

.menu-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.menu-toggle span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--transition); }
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  padding-top: var(--nav-h); overflow: hidden;
}

.hero-bg-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px; opacity: 0.25;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hero-content { position: relative; z-index: 1; text-align: center; max-width: 750px; margin: 0 auto; }

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.1;
  margin-bottom: 16px; letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: clamp(0.95rem, 1.8vw, 1.1rem); color: var(--text-sec);
  max-width: 550px; margin: 0 auto 32px; line-height: 1.7;
}

.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.tools-section, .about-section { padding: 80px 0; position: relative; }

.section-header { text-align: center; margin-bottom: 40px; }

.section-title { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; margin-bottom: 8px; }

.tools-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px; max-width: 920px; margin: 0 auto;
}

.tool-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; transition: all 250ms cubic-bezier(0.16, 1, 0.3, 1);
  position: relative; overflow: hidden; box-shadow: var(--card-shadow);
}
.tool-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), #16a34a); opacity: 0; transition: all 250ms ease;
}
.tool-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 8px 40px rgba(139, 92, 246, 0.12); }
.tool-card:hover::before { opacity: 1; }
.tool-card.highlight { border-color: rgba(34,197,94,0.3); background: linear-gradient(135deg, rgba(34,197,94,0.05), transparent); }

.tool-card-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }

.tool-icon {
  width: 56px; min-width: 56px; height: 56px; border-radius: var(--radius); background: var(--accent-glow);
  border: 1px solid rgba(139, 92, 246, 0.15); display: flex; align-items: center; justify-content: center;
}
.tool-icon svg { width: 30px; height: 30px; }

.tool-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 8px; }
.tool-card p { font-size: 0.85rem; color: var(--text-sec); margin-bottom: 16px; line-height: 1.6; }

.tool-status {
  font-size: 0.7rem; font-weight: 500; padding: 4px 10px; border-radius: var(--radius-sm);
  background: var(--bg-surface); color: var(--text-muted); border: 1px solid var(--border);
}
.tool-status.available { background: rgba(16,185,129,0.1); color: var(--success); border-color: rgba(16,185,129,0.2); }

.tool-card .btn { width: 100%; justify-content: center; }

.about-content { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }

.about-features { margin-top: 24px; display: flex; flex-direction: column; gap: 16px; }

.about-feature { display: flex; gap: 14px; align-items: flex-start; }

.feature-icon {
  width: 40px; height: 40px; min-width: 40px; border-radius: var(--radius-sm);
  background: var(--accent-glow); border: 1px solid rgba(139, 92, 246, 0.15);
  display: flex; align-items: center; justify-content: center;
}
.feature-icon svg { width: 20px; height: 20px; }
.about-feature h4 { font-size: 0.9rem; font-weight: 600; margin-bottom: 2px; }
.about-feature p { font-size: 0.8rem; color: var(--text-sec); }

.about-visual { position: relative; display: flex; justify-content: center; }

.about-card-glow {
  position: absolute; width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(34,197,94,0.08), transparent 70%);
  border-radius: 50%; top: -20px;
}

.about-stats-card {
  position: relative; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 36px; display: flex; flex-direction: column; gap: 28px;
  min-width: 220px; box-shadow: var(--card-shadow);
}

.stat-row { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }

.stat-val {
  font-size: 1.5rem; font-weight: 800;
  background: linear-gradient(135deg, var(--accent), #16a34a);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.stat-lbl { font-size: 0.85rem; color: var(--text-sec); }

.footer { background: var(--bg-card); border-top: 1px solid var(--border); padding: 40px 0 24px; }

.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 24px; margin-bottom: 32px;
}

.footer-logo { height: 36px; width: auto; margin-bottom: 8px; }
.footer-brand p { font-size: 0.85rem; color: var(--text-muted); max-width: 280px; }
.footer-tag { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); display: block; margin-bottom: 4px; }

.footer-phone {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.9rem; font-weight: 600; color: var(--accent); transition: var(--transition);
}
.footer-phone:hover { color: var(--accent-hover); }
.footer-phone svg { flex-shrink: 0; }

.footer-bottom { padding-top: 20px; border-top: 1px solid var(--border); text-align: center; }
.footer-bottom p { font-size: 0.8rem; color: var(--text-muted); }

.auth-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px; }

.auth-container { width: 100%; max-width: 400px; }

.auth-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 36px; }

.auth-logo { display: block; text-align: center; margin-bottom: 28px; }

.auth-header { text-align: center; margin-bottom: 28px; }
.auth-header h1 { font-size: 1.35rem; font-weight: 700; margin-bottom: 6px; }
.auth-header p { color: var(--text-sec); font-size: 0.875rem; }


.auth-form { display: flex; flex-direction: column; gap: 16px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 0.8rem; font-weight: 500; color: var(--text-sec); }

.form-group input {
  width: 100%; padding: 11px 14px; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); font-family: var(--font);
  font-size: 0.875rem; transition: var(--transition);
}
.form-group input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.form-group input::placeholder { color: var(--text-muted); }

.form-group select {
  width: 100%; padding: 11px 14px; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); font-family: var(--font);
  font-size: 0.875rem; transition: var(--transition); appearance: auto; cursor: pointer;
}
.form-group select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

.auth-error {
  padding: 10px; background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.2);
  border-radius: var(--radius-sm); font-size: 0.8125rem; display: none;
}
.auth-error.visible { display: block; }
.auth-success {
  margin-top: 12px; padding: 10px 14px; background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.2);
  border-radius: var(--radius-sm); color: #22c55e; font-size: 0.8125rem; display: none;
}
.auth-success.visible { display: block; }
.auth-footer { margin-top: 20px; text-align: center; font-size: 0.8rem; color: var(--text-muted); }
.auth-footer a { color: var(--accent); }
.auth-extra { display: flex; justify-content: center; margin-top: 12px; }
.checkbox-label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 0.8rem; color: var(--text-sec); }
.checkbox-label input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; }

.dashboard-page { background: var(--bg); }

.dash-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: var(--nav-h);
  background: rgba(10, 14, 23, 0.85); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border); transition: var(--transition);
}
[data-theme="light"] .dash-header { background: rgba(248, 250, 252, 0.85); }

.dash-header-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 24px; height: 100%;
  display: flex; align-items: center; justify-content: space-between;
}

.dash-logo, .dash-logo picture { display: flex; align-items: center; }
.dash-logo .logo-img { height: 40px; }

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

.dash-user { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 6px 10px; border-radius: var(--radius-sm); }
.dash-user:hover { background: var(--bg-surface); }
.dash-user-name { font-size: 0.85rem; font-weight: 500; }
.dash-user-name .dash-date-info { font-weight: 400; color: var(--text-muted); font-size: 0.75rem; }
.dash-avatar { width: 32px; min-width: 32px; height: 32px; aspect-ratio: 1; border-radius: 50%; background: linear-gradient(135deg, var(--accent), #16a34a); display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 700; color: #fff; }

.dash-layout { display: flex; padding-top: var(--nav-h); min-height: 100vh; }

.dash-sidebar {
  width: 200px; min-width: 200px; background: var(--bg-card);
  border-right: 1px solid var(--border); padding: 20px 10px;
  display: flex; flex-direction: column; justify-content: space-between;
  height: calc(100vh - var(--nav-h)); position: sticky; top: var(--nav-h);
}

.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }

.sidebar-link {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border-radius: var(--radius-sm); color: var(--text-sec); font-size: 0.85rem;
  font-weight: 500; transition: var(--transition);
}
.sidebar-link:hover { background: var(--bg-surface); color: var(--text); }
.sidebar-link.active { background: var(--accent-glow); color: var(--accent); }

.dash-main { flex: 1; padding: 28px; min-width: 0; }

.dash-content { display: none; }
.dash-content.active { display: block; }

.dash-section-title { font-size: 1.35rem; font-weight: 700; margin-bottom: 24px; }

@media (max-width: 900px) {
  .about-content { grid-template-columns: 1fr; gap: 36px; }
  .about-visual { order: -1; }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    background: rgba(10,14,23,0.98); border-bottom: 1px solid var(--border);
    flex-direction: column; padding: 12px; gap: 2px;
    transform: translateY(-100%); opacity: 0; visibility: hidden; pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
  }
  [data-theme="light"] .nav-links { background: rgba(248,250,252,0.98); }
  .nav-links.open { transform: translateY(0); opacity: 1; visibility: visible; pointer-events: auto; }
  .nav-link { width: 100%; }
  .menu-toggle { display: flex; }

  .dash-header-inner { padding: 0 16px; }
  .dash-logo .logo-img { height: 32px; }
  .dash-user-name { font-size: 0.8rem; }
  .dash-user-name .dash-date-info { display: none; }
  .dash-user { padding: 4px 6px; gap: 6px; }
  .dash-avatar { width: 28px; min-width: 28px; height: 28px; font-size: 0.7rem; }

  .dash-sidebar {
    position: fixed; top: var(--nav-h); left: 0; bottom: 0; width: 240px; min-width: 240px;
    transform: translateX(-100%); z-index: 90; transition: var(--transition);
    box-shadow: 4px 0 20px rgba(0,0,0,0.3);
  }
  .dash-sidebar.open { transform: translateX(0); }
  .dash-main { padding: 20px 16px; }
  .tools-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-brand p { max-width: 100%; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { justify-content: center; }
}

/* ===== TOGGLE SWITCH ===== */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  cursor: pointer;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 26px;
  transition: 0.3s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  left: 3px;
  bottom: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: 0.3s;
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--accent);
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(22px);
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal-box {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 36px 32px; width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.modal-box h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 4px; }
.modal-box .modal-sub { color: var(--text-sec); font-size: 0.85rem; margin-bottom: 24px; }
.modal-close {
  float: right; background: none; border: none; color: var(--text-muted);
  font-size: 1.5rem; cursor: pointer; line-height: 1; padding: 4px 8px;
  border-radius: var(--radius-sm); transition: var(--transition);
}
.modal-close:hover { background: var(--bg-surface); color: var(--text); }
#cidadesContainer { margin-bottom: 4px; }
.modal-box .form-group { gap: 4px; }
.modal-box .form-group label {
  font-size: 0.75rem; font-weight: 600; color: var(--text-sec);
  padding-left: 2px;
}
.input-icon-wrap {
  position: relative; display: flex; align-items: center;
}
.input-icon-wrap .input-icon {
  position: absolute; left: 14px; width: 18px; height: 18px;
  color: var(--text-muted); pointer-events: none; flex-shrink: 0;
}
.input-icon-wrap input {
  width: 100%; padding: 12px 16px 12px 42px; font-size: 0.875rem;
  border-radius: 8px; background: var(--bg); border: 1px solid var(--border);
  transition: var(--transition); color: var(--text);
  box-sizing: border-box;
}
.input-icon-wrap input:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow);
  outline: none;
}
.input-icon-wrap input::placeholder { color: var(--text-muted); }

.modal-box::-webkit-scrollbar { width: 6px; }
.modal-box::-webkit-scrollbar-track { background: transparent; }
.modal-box::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.modal-box::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
.modal-box { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }

.cidade-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  align-items: start; margin-bottom: 10px; position: relative;
}
.cidade-row .form-group {
  margin: 0; display: flex; flex-direction: column; gap: 6px;
}
.cidade-row .form-group:last-child { padding-right: 48px; }
.cidade-row .input-icon-wrap input {
  padding: 12px 16px 12px 36px; font-size: 0.875rem;
  border-radius: 8px; background: var(--bg); border: 1px solid var(--border);
  transition: var(--transition); color: var(--text); width: 100%;
  box-sizing: border-box;
}
.cidade-row .input-icon-wrap input:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow);
  outline: none;
}
.cidade-row .input-icon-wrap .input-icon { left: 10px; width: 16px; height: 16px; }
.cidade-row .btn-remove {
  position: absolute; right: 0; bottom: 1px;
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg-surface);
  color: var(--text-muted); cursor: pointer; display: flex;
  align-items: center; justify-content: center; font-size: 1.2rem;
  transition: var(--transition);
}
.cidade-row .btn-remove:hover { background: rgba(239,68,68,0.1); color: #ef4444; border-color: rgba(239,68,68,0.3); }

.btn-add-cidade {
  display: flex; align-items: center; gap: 6px;
  background: transparent; border: 1px dashed var(--border);
  color: var(--accent); padding: 10px 16px; border-radius: var(--radius-sm);
  cursor: pointer; font-family: var(--font); font-size: 0.82rem;
  font-weight: 600; transition: var(--transition); width: 100%;
  justify-content: center; margin-bottom: 16px;
}
.btn-add-cidade:hover { border-color: var(--accent); background: var(--accent-glow); }

/* ===== PASSWORD STRENGTH ===== */
.pwd-strength {
  display: flex; gap: 4px; margin-top: 6px;
}
.pwd-strength span {
  flex: 1; height: 3px; border-radius: 2px; background: var(--border);
  transition: var(--transition);
}
.pwd-strength span.weak { background: #ef4444; }
.pwd-strength span.medium { background: #f59e0b; }
.pwd-strength span.strong { background: #22c55e; }
.pwd-reqs {
  font-size: 0.75rem; color: var(--text-muted); margin-top: 4px;
  display: flex; flex-wrap: wrap; gap: 6px 16px;
}
.pwd-reqs span { display: flex; align-items: center; gap: 4px; }
.pwd-reqs span.ok { color: #22c55e; }

/* ===== TERMS ===== */
.terms-box {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px; max-height: 240px;
  overflow-y: auto; font-size: 0.8rem; color: var(--text-sec);
  line-height: 1.7; margin-bottom: 0;
}
.terms-box-wrapper {
  margin-bottom: 16px;
  overflow: hidden;
  border-radius: var(--radius-sm);
}
.terms-box::-webkit-scrollbar { width: 4px; }
.terms-box::-webkit-scrollbar-track { background: transparent; }
.terms-box::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.terms-box::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
.terms-box { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.terms-box h4 { color: var(--text); margin: 12px 0 4px; font-size: 0.85rem; }
.terms-box h4:first-child { margin-top: 0; }
.terms-check {
  display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px;
}
.terms-check input[type="checkbox"] {
  width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent);
}
.terms-check label { font-size: 0.8rem; color: var(--text-sec); cursor: pointer; }

/* ===== ADMIN ===== */
.admin-page .dash-main { max-width: 1200px; margin: 0 auto; }
.admin-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-bottom: 28px; }
.admin-stats .admin-stat-card:nth-child(-n+3) { grid-column: span 2; }
.admin-stats .admin-stat-card:nth-child(n+4) { grid-column: span 3; }
.admin-stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
  display: flex; align-items: center; gap: 14px;
  transition: var(--transition);
}
.admin-stat-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.admin-stat-card .stat-val { font-size: 1.5rem; font-weight: 800; line-height: 1.2; }
.admin-stat-card .stat-lbl { font-size: 0.72rem; color: var(--text-muted); font-weight: 500; }
.admin-stat-icon {
  width: 42px; min-width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
}
.admin-stat-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.admin-stat-card .stat-val { font-size: 1.5rem; font-weight: 800; line-height: 1.2; }
.admin-stat-card .stat-lbl { font-size: 0.72rem; color: var(--text-muted); font-weight: 500; }
.admin-stat-icon {
  width: 42px; min-width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
}

.admin-table-wrap {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow-x: auto;
}
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.admin-table th {
  text-align: left; padding: 14px 16px; font-weight: 600;
  color: var(--text-sec); border-bottom: 1px solid var(--border);
  background: var(--bg-surface); font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 0.05em;
}
.admin-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table td .tag {
  display: inline-block; padding: 3px 10px; border-radius: var(--radius-sm);
  font-size: 0.7rem; font-weight: 500;
}
.tag-pending { background: rgba(245,158,11,0.1); color: #f59e0b; border: 1px solid rgba(245,158,11,0.2); }
.tag-active { background: rgba(16,185,129,0.1); color: #22c55e; border: 1px solid rgba(16,185,129,0.2); }
.tag-process { background: rgba(59,130,246,0.1); color: #3b82f6; border: 1px solid rgba(59,130,246,0.2); }
.tag-liberado { background: rgba(16,185,129,0.1); color: #22c55e; border: 1px solid rgba(16,185,129,0.2); }
.tag-breve { background: rgba(139,92,246,0.1); color: #8b5cf6; border: 1px solid rgba(139,92,246,0.2); }
.tag-danger { background: rgba(239,68,68,0.1); color: #ef4444; border: 1px solid rgba(239,68,68,0.2); }
.tag-success { background: rgba(16,185,129,0.1); color: #22c55e; border: 1px solid rgba(16,185,129,0.2); }

.admin-table .actions { display: flex; gap: 3px; flex-wrap: nowrap; }
.admin-table .actions button {
  padding: 4px 6px; border-radius: 5px; border: 1px solid var(--border);
  background: transparent; color: var(--text-sec); font-size: 0.75rem;
  cursor: pointer; transition: var(--transition); line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
}
.admin-table .actions button:hover { border-color: var(--accent); color: var(--accent); }
.admin-table .actions button.danger { color: #ef4444; }
.admin-table .actions button.danger:hover { border-color: #ef4444; background: rgba(239,68,68,0.1); }

/* ===== FRANQUEADO CARDS ===== */
.fc-bar {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 20px; flex-wrap: wrap;
}
.fc-search {
  flex: 1; min-width: 200px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg);
  color: var(--text); font-family: var(--font); font-size: 0.85rem;
  outline: none; transition: var(--transition);
}
.fc-search:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99,102,241,0.15); }
.fc-count { color: var(--text-muted); font-size: 0.8rem; white-space: nowrap; }

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

.fc-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex; flex-direction: column;
  position: relative;
}
.fc-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0; transition: var(--transition);
}
.fc-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2), 0 0 0 1px rgba(0,212,255,0.05);
  transform: translateY(-2px);
}
.fc-card:hover::before { opacity: 1; }
.fc-card.fc-blocked {
  border-color: rgba(239,68,68,0.2);
  background: linear-gradient(135deg, var(--bg-card), rgba(239,68,68,0.03));
}
.fc-card.fc-blocked:hover { border-color: rgba(239,68,68,0.4); }

.fc-card-head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 16px 12px; border-bottom: 1px solid var(--border);
}
.fc-avatar {
  width: 40px; min-width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #16a34a);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1rem;
  box-shadow: 0 0 0 2px var(--bg-card), 0 0 0 4px rgba(0,212,255,0.1);
}
.fc-card-head-info { flex: 1; min-width: 0; }
.fc-card-name { font-size: 0.9rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-card-name.fc-blocked-name { text-decoration: line-through; opacity: 0.6; }
.fc-card-email { font-size: 0.75rem; color: var(--text-muted); display: block; overflow: hidden; text-overflow: ellipsis; }
.fc-card-head-actions { flex-shrink: 0; }

.fc-card-body { padding: 12px 16px; flex: 1; }
.fc-card-row {
  display: flex; align-items: flex-start; gap: 8px;
  margin-bottom: 6px; font-size: 0.82rem;
}
.fc-card-row:last-child { margin-bottom: 0; }
.fc-label { flex-shrink: 0; width: 20px; text-align: center; color: var(--text-muted); }
/* === Deploy list no card do admin === */
.fc-deploy-compact { display: flex; flex-direction: column; gap: 4px; }
.fc-deploy-item {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 4px 8px; border-radius: 6px;
  background: var(--bg-surface); border: 1px solid var(--border);
  font-size: 0.75rem;
}
.fc-deploy-item.fc-deploy-blocked {
  background: rgba(239,68,68,0.06);
  border-color: rgba(239,68,68,0.2);
}
/* ====== */
.fc-install-wrap { display: flex; flex-wrap: wrap; gap: 4px; }
.fc-tools-wrap { display: flex; flex-wrap: wrap; gap: 4px; }
.fc-tool-badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  border: 1px solid; font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.01em;
}
.fc-blocked-banner {
  margin-top: 8px; padding: 6px 10px; border-radius: var(--radius-sm);
  background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.2);
  color: #ef4444; font-size: 0.78rem; font-weight: 500;
}
.fc-franchisee-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px; border-radius: 4px;
  background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(0,212,255,0.08));
  border: 1px solid rgba(99,102,241,0.2);
  color: var(--accent); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.02em;
}
.fc-profile-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px; border-radius: 4px;
  font-size: 0.7rem; font-weight: 600;
}
.fc-profile-franqueado {
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.2);
  color: #22c55e;
}
.fc-profile-backoffice {
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.2);
  color: #8b5cf6;
}

/* Status de Franqueado Moderno */
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px; border-radius: 6px;
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.02em;
}
.tag-pending {
  background: rgba(245,158,11,0.1); color: #f59e0b;
  border: 1px solid rgba(245,158,11,0.2);
}
.tag-pending::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: #f59e0b; opacity: 0.7;
}
.tag-active {
  background: rgba(16,185,129,0.1); color: #22c55e;
  border: 1px solid rgba(16,185,129,0.2);
}
.tag-active::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: #22c55e; box-shadow: 0 0 6px rgba(16,185,129,0.5);
}
.tag-blocked {
  background: rgba(239,68,68,0.1); color: #ef4444;
  border: 1px solid rgba(239,68,68,0.2);
}
.tag-blocked::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: #ef4444;
}

/* Footer buttons - always aligned */
.fc-card-foot {
  display: flex; gap: 4px; padding: 10px 16px;
  border-top: 1px solid var(--border); background: var(--bg-surface);
  margin-top: auto;
}
.fc-btn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 7px 8px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text-sec); font-size: 0.73rem;
  cursor: pointer; transition: all 0.2s ease; white-space: nowrap;
  font-weight: 500; font-family: var(--font);
}
.fc-btn:hover {
  border-color: var(--accent); color: var(--accent);
  background: rgba(0,212,255,0.04);
  transform: translateY(-1px);
}
.fc-btn-primary {
  border-color: rgba(0,212,255,0.2); color: var(--accent);
  background: rgba(0,212,255,0.06);
}
.fc-btn-primary:hover {
  border-color: var(--accent); background: rgba(0,212,255,0.12);
}
.fc-btn-danger {
  color: #ef4444;
  border-color: rgba(239,68,68,0.2);
  background: rgba(239,68,68,0.04);
}
.fc-btn-danger:hover {
  border-color: #ef4444; background: rgba(239,68,68,0.1);
  color: #ef4444;
}
.fc-btn-success {
  color: #22c55e;
  border-color: rgba(16,185,129,0.2);
  background: rgba(16,185,129,0.04);
}
.fc-btn-success:hover {
  border-color: #22c55e; background: rgba(16,185,129,0.1);
}
.fc-btn svg { width: 14px; height: 14px; flex-shrink: 0; }

/* WhatsApp status indicator */
.fc-whatsapp-row {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.75rem; margin-top: 6px;
}
.fc-whatsapp-connected {
  display: inline-flex; align-items: center; gap: 4px;
  color: #22c55e; font-weight: 500;
}
.fc-whatsapp-connected::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: #22c55e; box-shadow: 0 0 8px rgba(16,185,129,0.6);
}
.fc-whatsapp-disconnected {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--text-muted);
}
.fc-whatsapp-disconnected::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--text-muted);
}
.fc-whatsapp-loading {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--text-muted); font-size: 0.7rem;
}
.fc-whatsapp-loading .spinner {
  width: 10px; height: 10px;
  border-width: 1.5px;
}

/* ===== ADMIN ALERT ===== */
.admin-alert {
  padding: 12px 16px; margin-top: 16px;
  border-radius: var(--radius-sm); font-size: 0.82rem;
  background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.2);
  color: var(--text);
}
.admin-alert-ok { background: rgba(16,185,129,0.1); border-color: rgba(16,185,129,0.2); }

/* ===== INSTALL PILLS (legacy) ===== */
.install-pill {
  display: inline-block; font-size: 0.7rem; font-weight: 500;
  padding: 2px 8px; margin: 1px 2px; border-radius: 4px;
  background: var(--bg-surface); border: 1px solid var(--border);
  white-space: nowrap; line-height: 1.6;
}
.install-dot-ok { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #22c55e; vertical-align: middle; margin-right: 2px; }
.install-dot-warn { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #f59e0b; vertical-align: middle; margin-right: 2px; }
.install-empty { color: var(--text-muted); font-size: 0.8rem; }

/* ===== TOOL STATUS ON DASHBOARD ===== */
.tool-status-process {
  display: inline-block; padding: 4px 12px; border-radius: var(--radius-sm);
  font-size: 0.7rem; font-weight: 600; margin-top: 8px;
  background: rgba(59,130,246,0.1); color: #3b82f6; border: 1px solid rgba(59,130,246,0.2);
}
.tool-status-liberado {
  display: inline-block; padding: 4px 12px; border-radius: var(--radius-sm);
  font-size: 0.7rem; font-weight: 600; margin-top: 8px;
  background: rgba(16,185,129,0.1); color: #22c55e; border: 1px solid rgba(16,185,129,0.2);
}
.tool-msg-await { font-size: 0.8rem; color: var(--text-muted); margin-top: 8px; }
.tool-msg-ready { font-size: 0.8rem; color: var(--text-sec); margin-top: 8px; }
.tool-msg-ready strong { color: var(--accent); }

/* ===== SUCCESS MODAL ===== */
.success-content { text-align: center; padding: 20px 0; }
.success-content .icon {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(16,185,129,0.1); border: 2px solid rgba(16,185,129,0.2);
}
.success-content .icon svg { width: 28px; height: 28px; color: #22c55e; }
.success-content h3 { font-size: 1.1rem; margin-bottom: 8px; }
.success-content p { color: var(--text-sec); font-size: 0.85rem; margin-bottom: 4px; }
.success-content .highlight-text { color: var(--accent); font-weight: 600; }

/* ===== ADMIN FORM ===== */
.admin-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.admin-form-grid .form-group { margin-bottom: 0; }
.admin-form-grid .full-width { grid-column: 1 / -1; }

.config-grid-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.admin-tool-toggle {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); margin-bottom: 8px;
}
.admin-tool-toggle select {
  margin-left: auto; padding: 6px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg);
  color: var(--text); font-family: var(--font);
}
.admin-tool-toggle .tool-label { font-size: 0.85rem; font-weight: 500; }
.admin-tool-toggle .tool-label small { display: block; font-weight: 400; color: var(--text-muted); font-size: 0.75rem; }

.modal-box .btn-full { margin-top: 8px; }

/* ===== DEPLOY WIZARD ===== */
.deploy-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}
.deploy-main {
  min-width: 0;
}
.deploy-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: sticky;
  top: calc(var(--nav-h) + 28px);
}
.deploy-sidebar h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.deploy-sidebar h4 svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
  flex-shrink: 0;
}
.deploy-sidebar ol {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.deploy-sidebar ol li {
  counter-increment: step;
  font-size: 0.82rem;
  color: var(--text-sec);
  padding-left: 28px;
  position: relative;
  line-height: 1.5;
}
.deploy-sidebar ol li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-glow);
  border: 1px solid rgba(0,212,255,0.2);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.deploy-sidebar .deploy-tip {
  margin-top: 16px;
  padding: 12px;
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.15);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  color: var(--text-sec);
  line-height: 1.5;
}
.deploy-sidebar .deploy-tip strong {
  color: #f59e0b;
  display: block;
  margin-bottom: 4px;
}
.deploy-wizard {
  max-width: 100%;
}
.deploy-steps {
  display: flex; gap: 8px; margin-bottom: 24px;
}
.ds-step {
  flex: 1; text-align: center; padding: 10px 12px;
  border-radius: var(--radius-sm); background: var(--bg-surface);
  border: 1px solid var(--border); font-size: 0.8rem; font-weight: 500;
  color: var(--text-muted); transition: var(--transition);
}
.ds-step.active {
  border-color: var(--accent); color: var(--accent); background: var(--accent-glow);
}
.ds-step.done {
  border-color: rgba(16,185,129,0.2); color: #22c55e; background: rgba(16,185,129,0.05);
}
.deploy-step {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
}
.deploy-step-number {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-glow); border: 1px solid rgba(0,212,255,0.2);
  color: var(--accent); font-weight: 700; font-size: 1rem;
  margin-bottom: 16px;
}
.deploy-step h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; }
.deploy-step p { color: var(--text-sec); font-size: 0.85rem; margin-bottom: 20px; }
.deploy-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px; margin-bottom: 8px;
}
/* Deploy success - full width */
.deploy-layout.deploy-success {
  grid-template-columns: 1fr;
}
.deploy-layout.deploy-success .deploy-sidebar {
  display: none;
}
.deploy-success { text-align: center; }
.deploy-success-icon {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(16,185,129,0.1); border: 2px solid rgba(16,185,129,0.2);
}
.deploy-success-icon svg { width: 32px; height: 32px; }
.deploy-success h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.deploy-success-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 8px;
}
.deploy-success-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 18px;
  text-align: left;
}
.deploy-success-card-icon {
  font-size: 1.5rem;
  margin-bottom: 8px;
}
.deploy-success-card h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 10px;
}
.deploy-success-card ol {
  margin: 0;
  padding-left: 16px;
}
.deploy-success-card ol li {
  margin-bottom: 4px;
  line-height: 1.4;
}
@media (max-width: 700px) {
  .deploy-success-grid {
    grid-template-columns: 1fr;
  }
}
.deploy-result-box {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 20px; text-align: left;
}
.deploy-result-box p { font-size: 0.85rem; margin-bottom: 6px; color: var(--text); }
.spinner {
  width: 18px; height: 18px; border: 2px solid var(--border);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin 0.8s linear infinite; flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn-danger { background:#ef4444;color:#fff;border:none;padding:6px 10px;border-radius:var(--radius-sm);cursor:pointer;font-size:0.75rem;transition:var(--transition); }
.btn-danger:hover { background:#dc2626; }

/* ===== DASHBOARD WELCOME ===== */
.dash-welcome-card {
  background: linear-gradient(135deg, var(--bg-card), var(--bg-surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.dash-welcome-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), #16a34a);
}
.dash-welcome-info h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.dash-welcome-info p {
  color: var(--text-sec);
  font-size: 0.875rem;
  margin-bottom: 6px;
}
.dash-welcome-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.dash-welcome-avatar {
  flex-shrink: 0;
}
.dash-welcome-avatar-inner {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #16a34a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 0 30px var(--accent-glow);
}

/* ===== DASHBOARD STATS ===== */
.dash-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 8px;
}
.dash-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}
.dash-stat-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.dash-stat-icon {
  width: 44px;
  min-width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.dash-stat-icon svg {
  width: 22px;
  height: 22px;
}
.dash-stat-icon--cities {
  background: rgba(0,212,255,0.1);
  color: var(--accent);
  border: 1px solid rgba(0,212,255,0.2);
}
.dash-stat-icon--deploy {
  background: rgba(16,185,129,0.1);
  color: #22c55e;
  border: 1px solid rgba(16,185,129,0.2);
}
.dash-stat-icon--tools {
  background: rgba(245,158,11,0.1);
  color: #f59e0b;
  border: 1px solid rgba(245,158,11,0.2);
}
.dash-stat-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dash-stat-value {
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1;
}
.dash-stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}
.dash-stat-detail {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.5;
  opacity: 0.8;
}

/* ===== MINI TOOL CARDS (DASHBOARD OVERVIEW) ===== */
.tool-mini-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: var(--transition);
}
.tool-mini-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.tool-mini-card.highlight {
  border-color: rgba(0,212,255,0.3);
  background: linear-gradient(135deg, rgba(0,212,255,0.05), transparent);
}
.tool-mini-icon {
  width: 42px;
  min-width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--accent-glow);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.tool-mini-icon svg {
  width: 22px;
  height: 22px;
}
.tool-mini-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.tool-mini-body h4 {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tool-mini-body .tool-status {
  align-self: flex-start;
}
.tool-mini-body .tool-status.process {
  background: rgba(59,130,246,0.1);
  color: #3b82f6;
  border-color: rgba(59,130,246,0.2);
}
.tool-mini-body .tool-status.building {
  background: rgba(139,92,246,0.1);
  color: #8b5cf6;
  border-color: rgba(139,92,246,0.2);
}

/* ===== SECTION DESC ===== */
.section-desc {
  color: var(--text-sec);
  margin-bottom: 24px;
  font-size: 0.875rem;
}

/* ===== PROFILE FULL WIDTH ===== */
.profile-wrapper {
  width: 100%;
}
.profile-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 28px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
}
.profile-avatar-lg {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #16a34a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 0 0 4px var(--bg-card), 0 0 0 6px var(--border);
}
.profile-hero-info h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 2px;
}
.profile-hero-info p {
  color: var(--text-sec);
  font-size: 0.85rem;
  margin: 0;
}
.profile-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.profile-col {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 30px;
}
.profile-col-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--accent);
  color: var(--text);
}
.profile-col-header svg {
  color: var(--accent);
  flex-shrink: 0;
}
@media (max-width: 700px) {
  .profile-cols {
    grid-template-columns: 1fr;
  }
  .profile-hero {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }
}
.profile-form {
  width: 100%;
}
.profile-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}
.profile-fields .form-group {
  gap: 4px;
}
/* Botões do perfil com espaçamento */
.profile-col .btn {
  margin-top: 24px;
}
.profile-col .auth-error,
.profile-col .auth-success {
  margin-top: 10px;
}
/* Espaçamento botão de deploy */
.deploy-wizard .btn-full {
  margin-top: 24px;
}

/* ===== TERMS DISPLAY ===== */
.terms-box-full {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  max-height: 500px;
  overflow-y: auto;
  font-size: 0.82rem;
  color: var(--text-sec);
  line-height: 1.8;
  white-space: pre-wrap;
}
.terms-box-full::-webkit-scrollbar { width: 6px; }
.terms-box-full::-webkit-scrollbar-track { background: transparent; }
.terms-box-full::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.terms-box-full::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
.terms-box-full { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }

/* Modern unified thin scrollbar */
#franchiseListWrap::-webkit-scrollbar { width: 5px; }
#franchiseListWrap::-webkit-scrollbar-track { background: transparent; }
#franchiseListWrap::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 6px; }
#franchiseListWrap::-webkit-scrollbar-thumb:hover { background: var(--accent); }
#franchiseListWrap { scrollbar-width: thin; scrollbar-color: var(--text-muted) transparent; }

textarea::-webkit-scrollbar { width: 5px; }
textarea::-webkit-scrollbar-track { background: transparent; }
textarea::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 6px; }
textarea::-webkit-scrollbar-thumb:hover { background: var(--accent); }
textarea { scrollbar-width: thin; scrollbar-color: var(--text-muted) transparent; }
.terms-accepted-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.2);
  color: #22c55e;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}
.terms-accepted-badge svg {
  width: 16px;
  height: 16px;
}

/* ===== SUPPORT CARD ===== */
.suporte-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
.suporte-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px 40px;
  text-align: center;
  max-width: 520px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.suporte-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-glow), rgba(124,58,237,0.1));
  border: 1px solid rgba(0,212,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 4px;
}
.suporte-icon svg {
  width: 32px;
  height: 32px;
}
.suporte-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
}
.suporte-card p {
  color: var(--text-sec);
  font-size: 0.9rem;
  max-width: 380px;
}
.suporte-card .btn {
  margin-top: 8px;
  padding: 12px 32px;
  font-size: 0.95rem;
}

/* ===== RESPONSIVE FIXES ===== */
@media (max-width: 768px) {
  .dash-welcome-card {
    flex-direction: column;
    text-align: center;
    padding: 24px 20px;
  }
  .dash-stats-grid {
    grid-template-columns: 1fr;
  }
  .profile-card {
    padding: 24px 20px;
  }

  .admin-table-wrap { overflow: visible; background: transparent; border: none; }
  .admin-table thead { display: none; }
  .admin-table tr {
    display: flex; flex-direction: column;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 16px; margin-bottom: 12px;
  }
  .admin-table td {
    display: flex; align-items: flex-start;
    padding: 8px 0; border-bottom: 1px solid var(--border);
    gap: 8px;
  }
  .admin-table td:last-child { border-bottom: none; }
  .admin-table td::before {
    content: attr(data-label);
    font-weight: 600; color: var(--text-muted);
    font-size: 0.7rem; text-transform: uppercase;
    width: 90px; min-width: 90px; flex-shrink: 0;
    padding-top: 1px;
  }
  .admin-table td.actions { display: flex; flex-wrap: wrap; gap: 4px; }
  .admin-table td.actions::before { padding-top: 4px; }
  .admin-table td.actions button { padding: 4px 5px; }

  .admin-form-grid { grid-template-columns: 1fr; }
  .config-grid-2col { grid-template-columns: 1fr; }

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

  .deploy-layout { grid-template-columns: 1fr; gap: 16px; }
  .deploy-sidebar { position: static; }
  .deploy-sidebar ol { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .deploy-sidebar ol li { padding-left: 24px; font-size: 0.78rem; }
  .deploy-sidebar .deploy-tip { margin-top: 12px; }
  .deploy-step { padding: 20px; }

  .deploy-card > div[style*="display:flex"] { flex-direction: column !important; gap: 8px !important; }
  .deploy-card > div[style*="display:flex"] a,
  .deploy-card > div[style*="display:flex"] button { width: 100%; box-sizing: border-box; }

  .admin-table td { justify-content: flex-start; gap: 6px; }
  .admin-table td::before { width: 80px; min-width: 80px; font-size: 0.65rem; }

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

/* Scrollbar moderna */
.custom-scrollbar::-webkit-scrollbar { width: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: rgba(128,128,128,0.3); border-radius: 10px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: rgba(128,128,128,0.5); }
.custom-scrollbar { scrollbar-width: thin; scrollbar-color: rgba(128,128,128,0.3) transparent; }

/* === UI PRO MAX POLISH === */
button, [role="button"], a { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.transition-smooth { transition: all 250ms cubic-bezier(0.16, 1, 0.3, 1); }

/* Glow sutil em titulos importantes */
.hero-title { text-shadow: 0 0 40px rgba(139, 92, 246, 0.15); }
.page-header-card h4 { text-shadow: 0 0 30px rgba(139, 92, 246, 0.1); }

/* Cards com bordas mais suaves */
.cliente-card, .tool-card, .about-stats-card, .detail-section {
  border-color: var(--border);
}

/* Botoes de acao com glow */
.btn-success, .btn-primary { box-shadow: var(--glow-green); }
.btn-success:hover, .btn-primary:hover { box-shadow: 0 0 30px rgba(139, 92, 246, 0.35); }

/* Form inputs mais suaves */
.form-control, .form-select {
  border-radius: var(--radius-sm) !important;
  border: 1px solid var(--border) !important;
  transition: all 200ms ease !important;
}
.form-control:focus, .form-select:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-glow) !important;
}

/* Tables com hover suave */
.table-hover tbody tr:hover { background: var(--accent-glow) !important; }

/* Badges com bordas arredondadas */
.badge { border-radius: var(--radius-sm) !important; }

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
