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

:root {
  --bg-primary: #0a0f1e;
  --bg-secondary: #111827;
  --bg-card: #1a2235;
  --bg-card-hover: #1e2a42;
  --bg-sidebar: #0d1526;
  --accent: #3b82f6;
  --accent-light: #60a5fa;
  --accent-glow: rgba(59,130,246,0.15);
  --accent-2: #8b5cf6;
  --accent-3: #06b6d4;
  --accent-4: #10b981;
  --accent-5: #f59e0b;
  --accent-6: #ef4444;
  --accent-7: #ec4899;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: rgba(255,255,255,0.07);
  --border-accent: rgba(59,130,246,0.3);
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 40px rgba(59,130,246,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --transition: all 0.2s ease;
  --sidebar-width: 260px;
  --sidebar-collapsed: 72px;
  --topbar-height: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}
input, button, select, textarea { font-family: inherit; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
a { color: inherit; text-decoration: none; }

/* ===== LAYOUT ===== */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: width 0.3s ease;
  overflow: hidden;
}
.sidebar.collapsed { width: var(--sidebar-collapsed); }
.sidebar-logo {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 18px;
  border-bottom: 1px solid var(--border);
  min-height: var(--topbar-height);
}
.sidebar-logo-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}
.sidebar-logo-text { font-size: 17px; font-weight: 700; white-space: nowrap; }
.sidebar-logo-sub { font-size: 10px; color: var(--text-muted); font-weight: 400; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 12px 10px; }
.nav-section-label {
  font-size: 10px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 12px 10px 6px;
  white-space: nowrap;
  overflow: hidden;
}
.collapsed .nav-section-label { opacity: 0; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  cursor: pointer; color: var(--text-secondary);
  transition: var(--transition); white-space: nowrap;
  position: relative;
  margin-bottom: 2px;
}
.nav-item:hover { background: var(--accent-glow); color: var(--text-primary); }
.nav-item.active {
  background: linear-gradient(90deg, var(--accent-glow), transparent);
  color: var(--accent-light);
  border-left: 3px solid var(--accent);
  padding-left: 9px;
}
.nav-icon { font-size: 18px; flex-shrink: 0; }
.nav-label { font-size: 13.5px; font-weight: 500; }
.nav-badge {
  margin-left: auto; background: var(--accent-6); color: white;
  font-size: 10px; font-weight: 700; padding: 2px 7px;
  border-radius: 20px; flex-shrink: 0;
}
.collapsed .nav-label, .collapsed .nav-badge { display: none; }

.sidebar-footer {
  padding: 12px 10px;
  border-top: 1px solid var(--border);
}
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}
.sidebar-user:hover { background: var(--bg-card); }
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; }
.user-role { font-size: 11px; color: var(--text-muted); }
.collapsed .user-info { display: none; }

/* ===== MAIN CONTENT ===== */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.3s ease;
  min-height: 100vh;
}
.main-content.sidebar-collapsed { margin-left: var(--sidebar-collapsed); }

/* ===== TOPBAR ===== */
.topbar {
  height: var(--topbar-height);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 16px;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 50;
}
.topbar-toggle {
  background: none; border: none; color: var(--text-secondary);
  cursor: pointer; padding: 6px; border-radius: 8px;
  font-size: 20px; transition: var(--transition);
  display: flex; align-items: center;
}
.topbar-toggle:hover { background: var(--bg-card); color: var(--text-primary); }
.topbar-breadcrumb { flex: 1; }
.topbar-page-title { font-size: 18px; font-weight: 700; }
.topbar-page-sub { font-size: 12px; color: var(--text-muted); margin-top: 1px; }

.topbar-actions { display: flex; align-items: center; gap: 10px; }
.topbar-btn {
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-secondary); cursor: pointer;
  padding: 8px 10px; border-radius: var(--radius-sm);
  font-size: 16px; display: flex; align-items: center; gap: 6px;
  transition: var(--transition); position: relative;
}
.topbar-btn:hover { border-color: var(--accent); color: var(--accent-light); }
.topbar-notif-dot {
  position: absolute; top: 6px; right: 6px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-6);
  border: 2px solid var(--bg-secondary);
}
.clinic-switcher {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 6px 12px;
  color: var(--text-primary); font-size: 13px; font-weight: 500;
  cursor: pointer; display: flex; align-items: center; gap: 8px;
  transition: var(--transition);
}
.clinic-switcher:hover { border-color: var(--accent); }
.clinic-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-4); }

/* ===== PAGE ===== */
.page { display: none; flex: 1; flex-direction: column; }
.page.active { display: flex; }
.page-inner { padding: 28px 28px; flex: 1; }

/* ===== COMMON COMPONENTS ===== */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.section-title { font-size: 18px; font-weight: 700; }
.section-sub { font-size: 13px; color: var(--text-muted); margin-top: 3px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px; border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 600; cursor: pointer;
  border: none; transition: var(--transition);
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #2563eb);
  color: white;
  box-shadow: 0 4px 14px rgba(59,130,246,0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(59,130,246,0.4); }
.btn-secondary {
  background: var(--bg-card); color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--accent); }
.btn-danger { background: linear-gradient(135deg, var(--accent-6), #dc2626); color: white; }
.btn-success { background: linear-gradient(135deg, var(--accent-4), #059669); color: white; }
.btn-ghost { background: none; border: none; color: var(--text-secondary); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-icon { padding: 8px; border-radius: var(--radius-sm); }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: var(--transition);
}
.card:hover { border-color: var(--border-accent); }
.card-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.card-value { font-size: 28px; font-weight: 800; margin-bottom: 4px; }
.card-sub { font-size: 12px; color: var(--text-muted); }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 600;
}
.badge-blue { background: rgba(59,130,246,0.15); color: #60a5fa; }
.badge-green { background: rgba(16,185,129,0.15); color: #34d399; }
.badge-yellow { background: rgba(245,158,11,0.15); color: #fcd34d; }
.badge-red { background: rgba(239,68,68,0.15); color: #f87171; }
.badge-purple { background: rgba(139,92,246,0.15); color: #a78bfa; }
.badge-cyan { background: rgba(6,182,212,0.15); color: #22d3ee; }

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

.input-group { margin-bottom: 16px; }
.input-label { font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; display: block; text-transform: uppercase; letter-spacing: 0.04em; }
.input {
  width: 100%; background: var(--bg-primary); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 14px;
  color: var(--text-primary); font-size: 14px;
  transition: var(--transition);
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.input::placeholder { color: var(--text-muted); }
.input-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.search-bar {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-primary); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0 14px;
  transition: var(--transition);
}
.search-bar:focus-within { border-color: var(--accent); }
.search-bar input { background: none; border: none; color: var(--text-primary); padding: 10px 0; flex: 1; font-size: 14px; outline: none; }
.search-icon { color: var(--text-muted); font-size: 16px; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; padding: 12px 16px; color: var(--text-muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--border); }
.table td { padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.table tr:hover td { background: rgba(255,255,255,0.02); }
.table tr:last-child td { border-bottom: none; }

.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.avatar-sm { width: 28px; height: 28px; font-size: 11px; }
.avatar-lg { width: 52px; height: 52px; font-size: 18px; }

.divider { height: 1px; background: var(--border); margin: 20px 0; }

/* ===== MODAL ===== */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.6); z-index: 200;
  align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px;
  width: 100%; max-width: 540px; max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow);
  animation: slideUp 0.2s ease;
}
.modal-lg { max-width: 720px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.modal-title { font-size: 18px; font-weight: 700; }
.modal-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 22px; line-height: 1; transition: var(--transition); }
.modal-close:hover { color: var(--text-primary); }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }

@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ===== TABS ===== */
.tabs { display: flex; gap: 4px; background: var(--bg-primary); border-radius: var(--radius-sm); padding: 4px; margin-bottom: 20px; }
.tab-btn {
  flex: 1; padding: 9px 16px; border-radius: 6px; border: none;
  background: none; color: var(--text-muted); font-size: 13px;
  font-weight: 600; cursor: pointer; transition: var(--transition);
}
.tab-btn.active { background: var(--bg-card); color: var(--text-primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ===== KPI CARDS ===== */
.kpi-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
  display: flex; flex-direction: column; gap: 6px;
  position: relative; overflow: hidden; transition: var(--transition);
}
.kpi-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
}
.kpi-card.blue::before { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.kpi-card.green::before { background: linear-gradient(90deg, var(--accent-4), var(--accent-3)); }
.kpi-card.yellow::before { background: linear-gradient(90deg, var(--accent-5), #f97316); }
.kpi-card.purple::before { background: linear-gradient(90deg, var(--accent-2), var(--accent-7)); }
.kpi-card.red::before { background: linear-gradient(90deg, var(--accent-6), #ec4899); }
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-glow); }
.kpi-icon { font-size: 24px; margin-bottom: 4px; }
.kpi-label { font-size: 12px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.kpi-value { font-size: 30px; font-weight: 800; line-height: 1.1; }
.kpi-change { font-size: 12px; display: flex; align-items: center; gap: 4px; }
.kpi-change.up { color: var(--accent-4); }
.kpi-change.down { color: var(--accent-6); }

/* ===== CHART ===== */
.chart-container {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}
.chart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.chart-title { font-size: 15px; font-weight: 600; }
.chart-legend { display: flex; gap: 16px; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.chart-svg-wrap { height: 200px; position: relative; }
.chart-bars { display: flex; gap: 8px; align-items: flex-end; height: 100%; padding: 0 10px; }
.chart-bar-group { flex: 1; display: flex; gap: 3px; align-items: flex-end; flex-direction: column; position: relative; }
.chart-bar {
  width: 100%; border-radius: 4px 4px 0 0;
  position: relative; cursor: pointer;
  transition: opacity 0.2s;
}
.chart-bar:hover { opacity: 0.8; }
.chart-bar-blue { background: linear-gradient(0deg, var(--accent), var(--accent-2)); }
.chart-bar-green { background: linear-gradient(0deg, var(--accent-4), var(--accent-3)); }
.chart-labels { display: flex; gap: 8px; padding: 8px 10px 0; }
.chart-label { flex: 1; text-align: center; font-size: 11px; color: var(--text-muted); }

/* ===== KANBAN ===== */
.kanban-board { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 20px; }
.kanban-col {
  min-width: 270px; flex-shrink: 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.kanban-col-header {
  padding: 14px 16px; display: flex;
  align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.kanban-col-title { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.kanban-col-count {
  background: var(--bg-primary); color: var(--text-muted);
  font-size: 11px; font-weight: 700; padding: 2px 8px;
  border-radius: 20px;
}
.kanban-cards { padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 200px; }
.kanban-card {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px;
  cursor: grab; transition: var(--transition);
  animation: fadeIn 0.2s ease;
}
.kanban-card:hover { border-color: var(--border-accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.kanban-card-name { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.kanban-card-meta { font-size: 12px; color: var(--text-muted); display: flex; gap: 10px; align-items: center; }
.kanban-card-source { font-size: 11px; margin-top: 8px; }
.kanban-add-btn {
  width: 100%; padding: 10px; border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm); background: none; color: var(--text-muted);
  cursor: pointer; font-size: 13px; transition: var(--transition);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.kanban-add-btn:hover { border-color: var(--accent); color: var(--accent-light); }

/* ===== CALENDAR ===== */
.calendar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.calendar-nav { display: flex; align-items: center; gap: 10px; }
.calendar-month { font-size: 18px; font-weight: 700; }
.calendar-view-btns { display: flex; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.cal-view-btn { padding: 7px 14px; background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 13px; font-weight: 500; transition: var(--transition); }
.cal-view-btn.active { background: var(--accent); color: white; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--border); border-radius: var(--radius); overflow: hidden; }
.cal-day-header { background: var(--bg-card); padding: 10px; text-align: center; font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; }
.cal-day {
  background: var(--bg-card); padding: 10px;
  min-height: 90px; cursor: pointer; transition: var(--transition);
}
.cal-day:hover { background: var(--bg-card-hover); }
.cal-day.today { background: var(--accent-glow); }
.cal-day.empty { opacity: 0.3; }
.cal-day-num { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.cal-day.today .cal-day-num { color: var(--accent-light); }
.cal-event {
  font-size: 11px; padding: 2px 6px; border-radius: 4px;
  margin-bottom: 3px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; cursor: pointer;
}

/* ===== CHAT (WHATSAPP) ===== */
.chat-layout { display: flex; height: calc(100vh - var(--topbar-height) - 56px); gap: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.chat-list { width: 320px; border-right: 1px solid var(--border); display: flex; flex-direction: column; }
.chat-list-header { padding: 16px; border-bottom: 1px solid var(--border); }
.chat-list-header h3 { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.chat-item { display: flex; gap: 12px; align-items: center; padding: 14px 16px; cursor: pointer; transition: var(--transition); border-bottom: 1px solid rgba(255,255,255,0.04); }
.chat-item:hover { background: var(--bg-card); }
.chat-item.active { background: var(--accent-glow); border-left: 3px solid var(--accent); }
.chat-item-info { flex: 1; min-width: 0; }
.chat-item-name { font-size: 14px; font-weight: 600; }
.chat-item-preview { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item-meta { text-align: right; }
.chat-item-time { font-size: 11px; color: var(--text-muted); }
.chat-item-unread { width: 18px; height: 18px; border-radius: 50%; background: var(--accent-4); color: white; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin-top: 4px; margin-left: auto; }
.chat-main { flex: 1; display: flex; flex-direction: column; }
.chat-topbar { padding: 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.chat-messages { flex: 1; padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 65%; }
.msg-bubble { padding: 10px 14px; border-radius: 12px; font-size: 14px; line-height: 1.5; }
.msg-in .msg-bubble { background: var(--bg-card); border-radius: 0 12px 12px 12px; }
.msg-out { margin-left: auto; }
.msg-out .msg-bubble { background: linear-gradient(135deg, var(--accent), #2563eb); border-radius: 12px 0 12px 12px; }
.msg-time { font-size: 10px; color: var(--text-muted); margin-top: 4px; }
.msg-out .msg-time { text-align: right; }
.chat-input-bar { padding: 14px 16px; border-top: 1px solid var(--border); display: flex; gap: 10px; align-items: center; }
.chat-input { flex: 1; background: var(--bg-primary); border: 1px solid var(--border); border-radius: 24px; padding: 10px 18px; color: var(--text-primary); font-size: 14px; outline: none; transition: var(--transition); }
.chat-input:focus { border-color: var(--accent); }
.send-btn { background: var(--accent); border: none; color: white; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; font-size: 18px; display: flex; align-items: center; justify-content: center; transition: var(--transition); flex-shrink: 0; }
.send-btn:hover { background: var(--accent-light); transform: scale(1.05); }

/* ===== ODONTOGRAM ===== */
.odontogram { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.odont-row { display: flex; gap: 6px; }
.tooth {
  width: 38px; height: 46px; background: var(--bg-card);
  border: 2px solid var(--border); border-radius: 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition); position: relative;
  font-size: 10px; color: var(--text-muted); font-weight: 600;
}
.tooth:hover { border-color: var(--accent); background: var(--accent-glow); }
.tooth.healthy { border-color: var(--accent-4); }
.tooth.cavity { border-color: var(--accent-6); background: rgba(239,68,68,0.1); }
.tooth.crown { border-color: var(--accent-5); background: rgba(245,158,11,0.1); }
.tooth.missing { border-color: var(--text-muted); background: rgba(100,116,139,0.1); opacity: 0.5; }
.tooth.selected { border-color: var(--accent); background: var(--accent-glow); }
.tooth-icon { font-size: 20px; }
.tooth-num { font-size: 9px; color: var(--text-muted); margin-top: 2px; }

/* ===== PLANS ===== */
.plan-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px;
  display: flex; flex-direction: column; gap: 0;
  position: relative; transition: var(--transition);
  overflow: hidden;
}
.plan-card:hover { transform: translateY(-4px); box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.plan-card.highlighted {
  border-color: var(--accent); box-shadow: 0 0 40px rgba(59,130,246,0.2);
}
.plan-badge {
  position: absolute; top: 20px; right: 20px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white; font-size: 11px; font-weight: 700;
  padding: 4px 12px; border-radius: 20px;
}
.plan-name { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.plan-price { font-size: 42px; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.plan-price span { font-size: 18px; font-weight: 500; color: var(--text-muted); }
.plan-period { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; }
.plan-features { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; flex: 1; }
.plan-features li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.plan-features li::before { content: '✓'; color: var(--accent-4); font-weight: 700; flex-shrink: 0; }
.plan-features li.no::before { content: '✗'; color: var(--text-muted); }
.plan-features li.no { color: var(--text-muted); }

/* ===== PROGRESS ===== */
.progress-bar { height: 6px; background: var(--bg-primary); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 3px; border: none; transition: width 0.5s ease; }

/* ===== TIMELINE ===== */
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item { display: flex; gap: 16px; padding-bottom: 20px; position: relative; }
.timeline-item::before { content: ''; position: absolute; left: 16px; top: 34px; bottom: 0; width: 2px; background: var(--border); }
.timeline-item:last-child::before { display: none; }
.timeline-icon { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.timeline-content { flex: 1; }
.timeline-title { font-size: 14px; font-weight: 600; }
.timeline-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ===== STOCK ===== */
.stock-level { display: flex; align-items: center; gap: 10px; }
.stock-bar { height: 6px; width: 80px; background: var(--bg-primary); border-radius: 3px; overflow: hidden; }
.stock-fill { height: 100%; border-radius: 3px; }
.stock-ok { background: var(--accent-4); }
.stock-low { background: var(--accent-5); }
.stock-out { background: var(--accent-6); }

/* ===== NOTIFICATION TOAST ===== */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 18px;
  display: flex; align-items: center; gap: 12px;
  font-size: 14px; box-shadow: var(--shadow);
  animation: slideUp 0.3s ease;
  max-width: 320px;
}
.toast.success { border-left: 3px solid var(--accent-4); }
.toast.error { border-left: 3px solid var(--accent-6); }
.toast.info { border-left: 3px solid var(--accent); }

/* ===== TTS ===== */
.tts-btn {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: white; border: none; border-radius: var(--radius-sm);
  padding: 12px 22px; font-size: 15px; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; gap: 10px;
  transition: var(--transition); box-shadow: 0 4px 14px rgba(139,92,246,0.3);
}
.tts-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(139,92,246,0.4); }
.tts-btn.playing { animation: pulse 1.5s infinite; }

/* ===== RESPONSIVE HELPERS ===== */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 12px; }
.font-bold { font-weight: 700; }
.w-full { width: 100%; }

/* ===== SCROLLBAR for kanban ===== */
.kanban-board::-webkit-scrollbar { height: 8px; }
.kanban-board::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* ===== STAT ROW ===== */
.stat-row { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.stat-row:last-child { border-bottom: none; }
.stat-rank { width: 24px; height: 24px; border-radius: 6px; background: var(--bg-primary); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--text-muted); flex-shrink: 0; }
.stat-info { flex: 1; min-width: 0; }
.stat-name { font-size: 13px; font-weight: 600; }
.stat-detail { font-size: 11px; color: var(--text-muted); }
.stat-value { font-size: 14px; font-weight: 700; }

/* ===== WHATSAPP TEMPLATE ===== */
.template-card { background: var(--bg-primary); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; cursor: pointer; transition: var(--transition); }
.template-card:hover { border-color: var(--accent); }
.template-name { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.template-text { font-size: 12px; color: var(--text-muted); white-space: pre-wrap; }

/* ===== HR ===== */
.staff-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-align: center; transition: var(--transition); cursor: pointer; }
.staff-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.staff-avatar { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800; }
.staff-name { font-size: 15px; font-weight: 700; }
.staff-role { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.staff-actions { display: flex; gap: 8px; justify-content: center; margin-top: 14px; }

/* Tag */
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; background: var(--bg-primary); border: 1px solid var(--border); border-radius: 4px; font-size: 11px; color: var(--text-muted); }
