/* ============================================================
   Portal HPSM - Design System (replica visual shadcn/Tailwind)
   Tokens baseados em src/globals.css
   ============================================================ */

:root {
  --background: 210 20% 98%;
  --foreground: 222.2 84% 4.9%;
  --card: 0 0% 100%;
  --card-foreground: 222.2 84% 4.9%;
  --card-special: 210 20% 96%;
  --popover: 0 0% 100%;
  --popover-foreground: 222.2 84% 4.9%;
  --primary: 220 70% 40%;
  --primary-foreground: 210 40% 98%;
  --secondary: 210 20% 94%;
  --secondary-foreground: 220 8.9% 43.1%;
  --muted: 210 20% 94%;
  --muted-foreground: 220 8.9% 43.1%;
  --accent: 210 20% 90%;
  --accent-foreground: 220 8.9% 43.1%;
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 210 40% 98%;
  --border: 210 20% 89%;
  --input: 210 20% 89%;
  --ring: 220 70% 50%;
  --radius: 0.5rem;

  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-800: #1e40af;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-900: #0f172a;
  --gray-100: #f3f4f6;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-900: #111827;
  --red-500: #ef4444;
  --red-600: #dc2626;
  --rose-500: #f43f5e;
  --amber-500: #f59e0b;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --cyan-600: #0891b2;
  --indigo-600: #4f46e5;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 700; line-height: 1.2; }

/* ---------- Scrollbar ---------- */
.custom-scrollbar::-webkit-scrollbar { width: 6px; height: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: hsl(var(--border)); border-radius: 3px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: hsl(var(--muted-foreground) / 0.5); }

/* ============================================================
   Botões
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: .5rem 1rem;
  font-size: .875rem;
  font-weight: 500;
  line-height: 1.25rem;
  cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s, box-shadow .15s, transform .1s;
  background: transparent;
  color: hsl(var(--foreground));
  white-space: nowrap;
  user-select: none;
}
.btn:disabled { opacity: .5; pointer-events: none; }
.btn:active { transform: scale(.98); }

.btn-primary {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}
.btn-primary:hover { background: hsl(220 70% 32%); }

.btn-secondary {
  background: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
}
.btn-secondary:hover { background: hsl(var(--accent)); }

.btn-outline {
  border-color: hsl(var(--border));
  background: transparent;
  color: hsl(var(--foreground));
}
.btn-outline:hover { background: hsl(var(--accent)); }

.btn-ghost { color: hsl(var(--foreground)); }
.btn-ghost:hover { background: hsl(var(--accent)); }

.btn-destructive {
  background: hsl(var(--destructive));
  color: hsl(var(--destructive-foreground));
}
.btn-destructive:hover { background: hsl(0 84.2% 50%); }

.btn-success {
  background: var(--emerald-600);
  color: #fff;
}
.btn-success:hover { background: var(--emerald-500); }

.btn-link { color: hsl(var(--primary)); text-decoration: underline; text-underline-offset: 4px; }

.btn-lg { height: 3rem; padding: 0 1.5rem; font-size: 1rem; border-radius: 1rem; }
.btn-sm { height: 2rem; padding: 0 .75rem; font-size: .75rem; border-radius: calc(var(--radius) - 2px); }
.btn-icon { width: 2.25rem; height: 2.25rem; padding: 0; }

.btn-blue {
  background: var(--blue-600);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 10px 15px -3px rgb(191 219 254 / .6);
}
.btn-blue:hover { background: var(--blue-700); }

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: hsl(var(--card));
  color: hsl(var(--card-foreground));
  border-radius: 1rem;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);
}
.card-border { border: 1px solid hsl(var(--border)); }
.card-header { padding: 1.25rem 1.5rem 0; }
.card-content { padding: 1.25rem 1.5rem 1.5rem; }
.card-title { font-size: 1.125rem; font-weight: 800; }
.card-description { font-size: .75rem; color: hsl(var(--muted-foreground)); margin-top: .25rem; }
.card-header-blue { background: var(--blue-600); color: #fff; border-radius: 1rem 1rem 0 0; padding: 1rem; display: flex; align-items: center; gap: .75rem; }
.card-header-blue .card-title { font-size: .875rem; font-weight: 900; text-transform: uppercase; letter-spacing: -.05em; }
.card-header-slate { background: var(--slate-900); color: #fff; border-radius: 1rem 1rem 0 0; padding: 1rem; display: flex; align-items: center; gap: .75rem; }
.card-header-red { background: var(--red-600); color: #fff; border-radius: 1rem 1rem 0 0; padding: 1rem; display: flex; align-items: center; gap: .75rem; }
.card-header-indigo { background: var(--indigo-600); color: #fff; border-radius: 1rem 1rem 0 0; padding: 1rem; display: flex; align-items: center; gap: .75rem; }
.card-header-amber { background: var(--amber-500); color: #fff; border-radius: 1rem 1rem 0 0; padding: 1rem; display: flex; align-items: center; gap: .75rem; }
.card-header-rose { background: var(--rose-500); color: #fff; border-radius: 1rem 1rem 0 0; padding: 1rem; display: flex; align-items: center; gap: .75rem; }
.card-header-emerald { background: var(--emerald-600); color: #fff; border-radius: 1rem 1rem 0 0; padding: 1rem; display: flex; align-items: center; gap: .75rem; }
.card-header-cyan { background: var(--cyan-600); color: #fff; border-radius: 1rem 1rem 0 0; padding: 1rem; display: flex; align-items: center; gap: .75rem; }

.card-overflow { overflow: hidden; }

/* ============================================================
   Badges
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  border-radius: 9999px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  padding: .125rem .625rem;
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.25rem;
}
.badge-outline { background: transparent; color: hsl(var(--foreground)); }
.badge-success { background: rgb(16 185 129 / .15); color: #047857; border-color: rgb(16 185 129 / .3); }
.badge-destructive { background: rgb(239 68 68 / .12); color: #b91c1c; border-color: rgb(239 68 68 / .3); }
.badge-warning { background: rgb(245 158 11 / .15); color: #b45309; border-color: rgb(245 158 11 / .3); }
.badge-primary { background: rgb(37 99 235 / .12); color: var(--blue-700); border-color: rgb(37 99 235 / .3); }
.badge-muted { background: hsl(var(--muted)); color: hsl(var(--muted-foreground)); }
.badge-blue { background: var(--blue-50); color: var(--blue-700); border-color: var(--blue-100); }

/* ============================================================
   Tabs (Arquivado)
   ============================================================ */
.arch-tab {
  padding: .5rem 1rem;
  border-radius: .375rem;
  font-size: .875rem;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
  text-decoration: none;
  transition: background .15s, color .15s;
}
.arch-tab:hover { background: hsl(var(--card)); color: hsl(var(--foreground)); }
.arch-tab.active { background: hsl(var(--background)); color: hsl(var(--primary)); box-shadow: 0 1px 2px hsl(var(--foreground)/.1); }


/* ============================================================
   Formulários
   ============================================================ */
.label {
  display: block;
  font-size: .75rem;
  font-weight: 700;
  color: var(--slate-600);
  margin-bottom: .375rem;
}
.input, .textarea, .select {
  width: 100%;
  height: 2.5rem;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--input));
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  padding: .5rem .75rem;
  font-size: .875rem;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.textarea { height: auto; min-height: 6rem; resize: vertical; }
.select { appearance: none; padding-right: 2rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .6rem center; }
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 2px hsl(var(--ring) / .2);
}

/* Rich Text Editor (conversão do SunEditor) */
.rte-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  padding: .375rem;
  border: 1px solid hsl(var(--input));
  border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  background: hsl(var(--muted)/.5);
}
.rte-toolbar button {
  min-width: 1.875rem;
  height: 1.875rem;
  padding: 0 .5rem;
  border-radius: .375rem;
  border: 1px solid transparent;
  background: transparent;
  font-size: .8125rem;
  color: hsl(var(--foreground));
  cursor: pointer;
}
.rte-toolbar button:hover { background: hsl(var(--accent)); border-color: hsl(var(--border)); }
.rte-editor {
  height: auto;
  border-radius: 0 0 var(--radius) var(--radius);
  min-height: 24rem;
  overflow-y: auto;
}
.rte-editor:empty::before {
  content: attr(data-placeholder);
  color: hsl(var(--muted-foreground));
  opacity: .7;
}
.input::placeholder, .textarea::placeholder { color: hsl(var(--muted-foreground)); }
.input[readonly] { background: hsl(var(--muted)); }

.form-item { margin-bottom: 1.25rem; }
.form-message { font-size: .75rem; color: hsl(var(--destructive)); margin-top: .25rem; }
.field-error .input, .field-error .textarea, .field-error .select { border-color: hsl(var(--destructive)); }

.checkbox-row { display: flex; align-items: center; gap: .5rem; font-size: .875rem; }
.switch { position: relative; width: 2.75rem; height: 1.5rem; background: hsl(var(--input)); border-radius: 9999px; cursor: pointer; transition: background .2s; flex-shrink: 0; }
.switch::after { content: ''; position: absolute; top: .15rem; left: .15rem; width: 1.2rem; height: 1.2rem; border-radius: 9999px; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .2); transition: transform .2s; }
.switch.on { background: hsl(var(--primary)); }
.switch.on::after { transform: translateX(1.25rem); }

/* ============================================================
   Tabelas
   ============================================================ */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.table th {
  text-align: left;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: hsl(var(--muted-foreground));
  padding: .625rem 1rem;
  border-bottom: 1px solid hsl(var(--border));
  background: hsl(var(--muted) / .5);
  white-space: nowrap;
}
.table td {
  padding: .625rem 1rem;
  border-bottom: 1px solid hsl(var(--border));
  vertical-align: middle;
}
.table tbody tr:hover { background: hsl(var(--muted) / .4); }
.table .actions { white-space: nowrap; text-align: right; }
.table .actions .btn { margin-left: .25rem; }

/* ============================================================
   Layout do Dashboard (sidebar + topbar)
   ============================================================ */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 16rem;
  background: #fff;
  border-right: 1px solid var(--slate-200);
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.sidebar-logo {
  padding: 1.25rem 1.5rem 1rem;
}
.sidebar-logo a {
  background: hsl(var(--primary));
  padding: .5rem;
  border-radius: .75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  transition: transform .2s;
}
.sidebar-logo a:hover { transform: scale(1.05); }
.sidebar-logo img { max-height: 5rem; max-width: 100%; object-fit: contain; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 0 .75rem 1rem; }
.nav-section { margin-bottom: .75rem; }
.nav-section-title { font-size: .625rem; font-weight: 900; text-transform: uppercase; letter-spacing: .12em; color: var(--slate-400); padding: .5rem .75rem .25rem; }

.nav-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  border-radius: .5rem;
  padding: .625rem .75rem;
  font-size: .875rem;
  color: var(--slate-500);
  transition: all .2s;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.nav-item:hover { background: var(--gray-100); color: var(--gray-900); }
.nav-item.active { background: var(--blue-50); color: hsl(var(--primary)); font-weight: 700; }
.nav-item .nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: .5rem;
  background: var(--gray-100);
  color: var(--gray-400);
  flex-shrink: 0;
}
.nav-item.active .nav-icon {
  background: hsl(var(--primary));
  color: #fff;
  border-radius: .75rem;
  box-shadow: 0 0 15px rgb(30 58 138 / .4);
}
.nav-item .nav-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item .nav-chevron { flex-shrink: 0; transition: transform .2s; }
.nav-group.open .nav-chevron { transform: rotate(180deg); }
.nav-sub { padding-left: 2.75rem; }
.nav-sub--flat { padding-left: 0; margin-left: 0; }

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

.topbar {
  height: 4rem;
  background: #fff;
  border-bottom: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar-title { font-size: .75rem; font-weight: 900; text-transform: uppercase; letter-spacing: .1em; color: var(--slate-400); }
.topbar-right { display: flex; align-items: center; gap: .5rem; }

.page-content { padding: 1.5rem; flex: 1; }

/* ============================================================
   Dropdown / Menu do usuário
   ============================================================ */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + .5rem);
  min-width: 13rem;
  background: hsl(var(--popover));
  border: 1px solid hsl(var(--border));
  border-radius: .5rem;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);
  padding: .25rem;
  z-index: 50;
  display: none;
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-label { padding: .5rem .75rem .25rem; font-weight: 600; font-size: .875rem; }
.dropdown-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  width: 100%;
  padding: .5rem .75rem;
  font-size: .875rem;
  border-radius: .375rem;
  cursor: pointer;
  border: none;
  background: none;
  color: hsl(var(--foreground));
  text-align: left;
}
.dropdown-item:hover { background: hsl(var(--accent)); }
.dropdown-item.destructive { color: hsl(var(--destructive)); }
.dropdown-separator { height: 1px; background: hsl(var(--border)); margin: .25rem .5rem; }

.avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  background: hsl(var(--primary));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 700;
}

/* ============================================================
   Modal / Dialog
   ============================================================ */
.dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgb(0 0 0 / .4);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
}
.dialog-overlay.open { display: flex; }
.dialog {
  background: #fff;
  border-radius: .75rem;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);
  width: 100%;
  max-width: 28rem;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  animation: dialog-in .2s ease-out;
}
.dialog-lg { max-width: 48rem; }
.dialog-xl { max-width: 64rem; }
.dialog-header { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 1.5rem; border-bottom: 1px solid hsl(var(--border)); }
.dialog-title { font-size: 1.125rem; font-weight: 800; }
.dialog-body { padding: 1.5rem; }
.dialog-footer { display: flex; justify-content: flex-end; gap: .5rem; padding: 1rem 1.5rem; border-top: 1px solid hsl(var(--border)); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }

/* ============================================================
   Toast
   ============================================================ */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  max-width: 24rem;
}
.toast {
  background: #fff;
  border: 1px solid hsl(var(--border));
  border-left: 4px solid hsl(var(--primary));
  border-radius: .5rem;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / .1);
  padding: .75rem 1rem;
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  animation: toast-in .25s ease-out;
}
.toast.success { border-left-color: var(--emerald-500); }
.toast.destructive { border-left-color: hsl(var(--destructive)); }
.toast.warning { border-left-color: var(--amber-500); }
.toast-title { font-weight: 700; font-size: .875rem; }
.toast-description { font-size: .75rem; color: hsl(var(--muted-foreground)); }
@keyframes toast-in { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }

/* ============================================================
   Utilitários
   ============================================================ */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.flex-1 { flex: 1; }
.gap-1 { gap: .25rem; } .gap-2 { gap: .5rem; } .gap-3 { gap: .75rem; } .gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

.grid { display: grid; gap: 1.5rem; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.text-xs { font-size: .75rem; }
.text-sm { font-size: .875rem; }
.text-lg { font-size: 1.125rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }
.text-gray-400 { color: var(--gray-400); }
.text-gray-500 { color: var(--gray-500); }
.text-gray-900 { color: var(--gray-900); }
.text-red-600 { color: var(--red-600); }
.text-primary { color: hsl(var(--primary)); }
.text-muted { color: hsl(var(--muted-foreground)); }
.text-white { color: #fff; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.uppercase { text-transform: uppercase; }
.tracking-tight { letter-spacing: -.025em; }
.tracking-widest { letter-spacing: .2em; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.mt-2 { margin-top: .5rem; } .mt-4 { margin-top: 1rem; } .mt-6 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: .5rem; } .mb-4 { margin-bottom: 1rem; } .mb-6 { margin-bottom: 1.5rem; }
.ml-auto { margin-left: auto; }
.p-4 { padding: 1rem; } .p-6 { padding: 1.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }

.rounded-lg { border-radius: .5rem; }
.rounded-xl { border-radius: .75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }
.shadow-lg { box-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1); }
.border { border: 1px solid hsl(var(--border)); }
.border-b { border-bottom: 1px solid hsl(var(--border)); }
.bg-white { background: #fff; }
.bg-muted { background: hsl(var(--muted)); }
.bg-blue-600 { background: var(--blue-600); }
.bg-blue-50 { background: var(--blue-50); }
.bg-slate-900 { background: var(--slate-900); }
.bg-red-600 { background: var(--red-600); }
.bg-amber-500 { background: var(--amber-500); }
.bg-emerald-600 { background: var(--emerald-600); }
.bg-cyan-600 { background: var(--cyan-600); }
.bg-indigo-600 { background: var(--indigo-600); }
.bg-rose-500 { background: var(--rose-500); }
.bg-slate-50 { background: var(--slate-50); }

.hidden { display: none !important; }

.spinner { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state { text-align: center; padding: 1rem 0; font-size: .75rem; font-weight: 700; text-transform: uppercase; color: var(--gray-400); }

.spinner-wrap { display: flex; align-items: center; justify-content: center; height: 16rem; color: hsl(var(--primary)); }

/* Item de lista do dashboard */
.dash-item { display: flex; align-items: center; justify-content: space-between; padding: .3rem 0; border-bottom: 1px solid var(--gray-100); }
.dash-item:last-child { border-bottom: 0; }
.dash-item .dash-title { font-size: .75rem; font-weight: 900; text-transform: uppercase; letter-spacing: -.025em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-item .dash-title.overdue { color: var(--red-600); }
.dash-item .dash-detail { font-size: .625rem; color: var(--gray-400); text-transform: uppercase; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-item .dash-time { font-size: .75rem; font-weight: 900; color: var(--gray-500); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.dash-item .dash-time.overdue { color: var(--red-600); }

/* Barra de pesquisa */
.search-bar { display: flex; gap: .5rem; align-items: center; }
.search-bar .input { max-width: 18rem; }

/* Animações de entrada */
.fade-in { animation: fade-in .5s ease-out; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.animate-in { animation-duration: .5s; animation-fill-mode: both; }

/* Tabs */
.tabs { display: flex; border-bottom: 1px solid hsl(var(--border)); gap: .25rem; }
.tab { padding: .5rem 1rem; font-size: .875rem; font-weight: 500; color: hsl(var(--muted-foreground)); border-bottom: 2px solid transparent; cursor: pointer; margin-bottom: -1px; }
.tab:hover { color: hsl(var(--foreground)); }
.tab.active { color: hsl(var(--primary)); border-bottom-color: hsl(var(--primary)); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Página de login */
.login-bg {
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #3b82f6, #2563eb, #1e40af);
}
.login-bg::before {
  content: '';
  position: absolute;
  top: -10%; right: -10%;
  width: 500px; height: 500px;
  background: rgb(96 165 250 / .2);
  border-radius: 9999px;
  filter: blur(100px);
}
.login-bg::after {
  content: '';
  position: absolute;
  bottom: -10%; left: -10%;
  width: 400px; height: 400px;
  background: rgb(34 211 238 / .2);
  border-radius: 9999px;
  filter: blur(80px);
}
.login-card {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 28rem;
  background: rgb(255 255 255 / .95);
  backdrop-filter: blur(20px);
  border-radius: 2.5rem;
  box-shadow: 0 32px 64px -12px rgb(0 0 0 / .2);
  overflow: hidden;
}
.login-input {
  position: relative;
}
.login-input .icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--slate-400); }
.login-input .input { padding-left: 3rem; height: 3rem; border-radius: 1rem; background: var(--slate-50); border-color: var(--slate-100); }
.login-input .input:focus { background: #fff; }
.login-toggle { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); color: var(--slate-400); background: none; border: none; cursor: pointer; padding: .25rem; }
.login-toggle:hover { color: var(--slate-600); }

/* Grid responsivo */
@media (max-width: 1200px) {
  .grid-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 992px) {
  .calc-grid-lg { grid-template-columns: 2fr 1fr; }
}
@media (max-width: 768px) {
  .grid-cols-3, .grid-cols-4, .grid-cols-2 { grid-template-columns: 1fr; }
  .calc-price-col, .calc-price-cell { display: none; }
  .sidebar { display: none; }
  .page-content { padding: 1rem; }
}

/* Sugestões de data/hora da Fila de Espera */
.fila-date-sug {
  display: grid;
  grid-template-columns: 1fr;
  gap: .6rem;
  border: 1px solid hsl(var(--border));
  border-radius: 1rem;
  background: hsl(var(--muted) / .35);
  padding: .85rem;
}
.fila-date-times {
  display: flex;
  flex-wrap: nowrap;
  gap: .5rem;
}
.fila-time-row {
  display: flex;
  gap: .4rem;
  align-items: center;
  flex: 1;
}
.fila-tag {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 9999px;
  background: rgb(124 58 237);
  color: #fff;
  font-size: .68rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
@media (min-width: 480px) {
  .fila-date-sug { grid-template-columns: minmax(9rem, 11rem) 1fr; align-items: end; }
}
