/* ============================================
   LavOnline — Design System (Modern Minimal)
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,400;14..32,500;14..32,600;14..32,700&display=swap');

:root {
  --bg: oklch(0.985 0 0);
  --surface: oklch(0.97 0 0);
  --fg: oklch(0.12 0 0);
  --muted: oklch(0.55 0 0);
  --border: oklch(0.88 0 0);
  --accent: oklch(0.55 0.18 265);
  --accent-hover: oklch(0.50 0.20 265);
  --accent-light: oklch(0.92 0.06 265);
  --success: oklch(0.62 0.18 145);
  --warn: oklch(0.70 0.16 85);
  --danger: oklch(0.60 0.20 25);
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.08);
  --transition: 200ms ease;
  --max-width: 1200px;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--fg);
  background: var(--bg);
  line-height: 1.5;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--accent-hover); }

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

/* ========== TYPOGRAPHY ========== */

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }

p { font-size: 1rem; line-height: 1.6; color: var(--fg); }
small { font-size: 0.875rem; color: var(--muted); }
.caption { font-size: 0.75rem; letter-spacing: 0.015em; color: var(--muted); }

.uppercase {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  font-size: 0.75rem;
}

/* ========== LAYOUT ========== */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section-sm {
  padding: 40px 0;
}

/* ========== BUTTONS ========== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.btn-secondary {
  background: transparent;
  color: var(--fg);
  border-color: var(--border);
}
.btn-secondary:hover {
  background: var(--surface);
  border-color: var(--muted);
}

.btn-ghost {
  background: transparent;
  color: var(--fg);
  border-color: transparent;
}
.btn-ghost:hover {
  background: var(--surface);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1.0625rem;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
}

.btn-block {
  width: 100%;
}

/* ========== INPUTS ========== */

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fg);
}

.input, .select {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--fg);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.input:focus, .select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

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

.input-group.inline {
  flex-direction: row;
  align-items: center;
}

/* ========== CARDS ========== */

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: box-shadow var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* ========== BADGES ========== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.badge-neutral {
  background: var(--surface);
  color: var(--muted);
}

.badge-accent {
  background: var(--accent-light);
  color: var(--accent);
}

.badge-success {
  background: oklch(0.92 0.06 145);
  color: oklch(0.40 0.16 145);
}

.badge-warn {
  background: oklch(0.95 0.08 85);
  color: oklch(0.45 0.14 85);
}

.badge-danger {
  background: oklch(0.93 0.08 25);
  color: oklch(0.45 0.18 25);
}

/* ========== STATUS (used in kanban / tracking) ========== */

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.pending { background: var(--muted); }
.status-dot.active { background: var(--accent); }
.status-dot.done { background: var(--success); }
.status-dot.warn { background: var(--warn); }
.status-dot.error { background: var(--danger); }

/* ========== TABLE ========== */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

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

/* ========== NAV ========== */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--fg);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--fg);
}

/* ========== SIDEBAR (admin/operator) ========== */

.sidebar {
  width: 260px;
  min-height: 100vh;
  background: #fff;
  border-right: 1px solid var(--border);
  padding: 24px 0;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  padding: 0 20px 24px;
  font-weight: 700;
  font-size: 1.125rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-nav {
  list-style: none;
  flex: 1;
}

.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition);
  text-decoration: none;
}

.sidebar-nav li a:hover {
  color: var(--fg);
  background: var(--surface);
}

.sidebar-nav li a.active {
  color: var(--accent);
  background: var(--accent-light);
}

.sidebar-section {
  margin-top: 16px;
  padding: 0 20px 8px;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
}

/* ========== MODAL ========== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
}

.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 520px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 24px;
}

/* ========== GRID ========== */

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* ========== FLOATING BUTTONS ========== */

.floating-btns {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 150;
}

.floating-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition);
}

.floating-btn:hover {
  transform: scale(1.08);
}

.floating-btn-whatsapp {
  background: #25D366;
  color: #fff;
}

.floating-btn-cta {
  background: var(--accent);
  color: #fff;
}

/* ========== TOOLTIP ========== */

.tooltip {
  position: relative;
}

.tooltip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--fg);
  color: #fff;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.tooltip:hover::after {
  opacity: 1;
}

/* ========== TABS ========== */

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

.tab {
  padding: 10px 20px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  font-family: var(--font-body);
}

.tab:hover {
  color: var(--fg);
}

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

/* ========== KANBAN ========== */

.kanban {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 16px;
}

.kanban-col {
  min-width: 200px;
  max-width: 240px;
  flex-shrink: 0;
}

.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.kanban-col-count {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
}

.kanban-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: box-shadow var(--transition);
}

.kanban-card:hover {
  box-shadow: var(--shadow-sm);
}

/* ========== TIMELINE ========== */

.timeline {
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 24px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -22px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--border);
}

.timeline-item.active::before {
  background: var(--accent);
  border-color: var(--accent);
}

.timeline-item.done::before {
  background: var(--success);
  border-color: var(--success);
}

.timeline-item-title {
  font-size: 0.875rem;
  font-weight: 600;
}

.timeline-item-desc {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 2px;
}

.timeline-item-time {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 4px;
}

/* ========== STATS / KPI ========== */

.stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 4px;
}

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

/* ========== HERO ========== */

.hero {
  position: relative;
  overflow: hidden;
  min-height: 70vh;
  display: flex;
  align-items: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
  color: #fff;
}

.hero h1 {
  color: #fff;
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.hero p {
  color: rgba(255,255,255,0.85);
  font-size: 1.125rem;
  margin-bottom: 32px;
  max-width: 480px;
}

/* ========== CEP INPUT ========== */

.cep-input-group {
  display: flex;
  gap: 8px;
  max-width: 400px;
}

.cep-input-group .input {
  flex: 1;
}

/* ========== FOOTER ========== */

.footer {
  background: var(--fg);
  color: rgba(255,255,255,0.7);
  padding: 48px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 12px;
}

.footer p {
  color: rgba(255,255,255,0.6);
  font-size: 0.875rem;
}

.footer h4 {
  color: #fff;
  font-size: 0.875rem;
  margin-bottom: 16px;
}

.footer a {
  color: rgba(255,255,255,0.6);
  font-size: 0.875rem;
  display: block;
  margin-bottom: 8px;
}

.footer a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
}

/* ========== SERVICE CARD ========== */

.service-card {
  text-align: center;
  padding: 32px 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
  cursor: pointer;
}

.service-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.service-card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.5rem;
  color: var(--accent);
}

.service-card h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

/* ========== MOBILE APP MOCKUP ========== */

.phone-frame {
  width: 375px;
  max-width: 100%;
  margin: 0 auto;
  border-radius: 40px;
  border: 8px solid var(--fg);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.phone-frame .phone-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--fg);
  color: #fff;
  font-size: 0.75rem;
}

.phone-frame .phone-content {
  padding: 16px;
  overflow-y: auto;
}

.phone-frame .phone-status {
  display: flex;
  justify-content: space-between;
  padding: 4px 16px;
  background: var(--fg);
  color: rgba(255,255,255,0.7);
  font-size: 0.6875rem;
  font-weight: 600;
}

/* ========== TOAST ========== */

.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toast-in 300ms ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast-success { background: var(--success); color: #fff; }
.toast-warn { background: var(--warn); color: #fff; }
.toast-error { background: var(--danger); color: #fff; }
.toast-info { background: var(--accent); color: #fff; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== RESPONSIVE ========== */

@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .section { padding: 48px 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero { min-height: 60vh; }
  .nav-links { display: none; }
  .sidebar { position: relative; width: 100%; min-height: auto; }
  .kanban { padding-bottom: 12px; }
}

/* ========== UTILITIES ========== */

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ========== empty state ========== */

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
}

.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
  opacity: 0.4;
}

/* ========== LOADING SPINNER ========== */

.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* ========== CHECKLIST ========== */

.checklist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.checklist-item:last-child {
  border-bottom: none;
}

.checklist-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ========== BREADCRUMB ========== */

.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 16px;
}

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

.breadcrumb span {
  color: var(--fg);
}
