/* ==========================================================================
   Panel.css — Design System Premium Review 360BH
   Compartilhado entre dashboard, admin, login, settings, questions, users, qrcode
   ========================================================================== */

/* --- Google Fonts (Inter) carregada via <link> no HTML --- */

/* ==========================================================================
   1. VARIÁVEIS CSS
   ========================================================================== */
:root {
  /* Tipografia */
  --font-primary: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Cores — mantém --primary-color injetada por empresa */
  --primary: var(--primary-color, #0056b3);
  --primary-rgb: 0, 86, 179;
  --primary-dark: #003d82;
  --primary-light: #e8f4fd;
  --success: #10b981;
  --success-light: #d1fae5;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --info: #3b82f6;
  --info-light: #dbeafe;

  /* Superfícies */
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-hover: #f1f5f9;
  --border: #e2e8f0;
  --border-light: #f1f5f9;

  /* Texto */
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;

  /* Sombras */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.04), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.06), 0 4px 10px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 50px rgba(0,0,0,0.08), 0 8px 20px rgba(0,0,0,0.06);

  /* Dimensões */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Transições */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   2. RESET & BASE
   ========================================================================== */
.panel-page {
  font-family: var(--font-primary);
  background: var(--bg-page);
  color: var(--text-primary);
  min-height: 100vh;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.panel-page main {
  flex: 1;
}

.panel-page *,
.panel-page *::before,
.panel-page *::after {
  box-sizing: border-box;
}

/* ==========================================================================
   3. CONTAINER
   ========================================================================== */
.panel-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px;
}

.panel-container--narrow {
  max-width: 900px;
}

.panel-container--wide {
  max-width: 1400px;
}

/* ==========================================================================
   4. HEADER / NAVBAR
   ========================================================================== */
.panel-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base);
}

.panel-header.scrolled {
  box-shadow: var(--shadow-md);
}

.panel-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}

.panel-header__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.panel-header__title-icon {
  font-size: 22px;
}

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

.panel-nav__link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  position: relative;
}

.panel-nav__link:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.panel-nav__link--active {
  color: var(--primary);
  background: var(--primary-light);
  font-weight: 600;
}

.panel-nav__link--active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

.panel-nav__link--active {
  color: var(--primary);
  background: var(--primary-light);
  font-weight: 600;
}

.panel-nav__link--danger {
  color: var(--danger);
}

.panel-nav__link--danger:hover {
  background: var(--danger-light);
  color: var(--danger);
}

/* Hamburger Mobile */
.panel-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.panel-hamburger:hover {
  background: var(--bg-hover);
}

.panel-hamburger__line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  border-radius: 2px;
  transition: all var(--transition-base);
}

.panel-hamburger.active .panel-hamburger__line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.panel-hamburger.active .panel-hamburger__line:nth-child(2) {
  opacity: 0;
}

.panel-hamburger.active .panel-hamburger__line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Nav Drawer */
.panel-nav-drawer {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 12px 20px;
  z-index: 99;
  animation: slideDown var(--transition-base) forwards;
}

.panel-nav-drawer.active {
  display: block;
}

.panel-nav-drawer .panel-nav__link {
  display: block;
  padding: 12px 16px;
  font-size: 15px;
  border-radius: var(--radius-md);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   5. CARDS
   ========================================================================== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

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

.card--interactive:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

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

.card__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.card__subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Metric Cards (Dashboard) */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--info));
  opacity: 0;
  transition: opacity var(--transition-base);
}

.metric-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.metric-card:hover::before {
  opacity: 1;
}

.metric-card__label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.metric-card__value {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
}

.metric-card__value--success { color: var(--success); }
.metric-card__value--danger { color: var(--danger); }
.metric-card__value--warning { color: var(--warning); }
.metric-card__value--info { color: var(--info); }

/* ==========================================================================
   6. BOTÕES
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  line-height: 1.4;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Primary */
.btn--primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.25);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.35);
}

.btn--primary:active {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.25);
}

/* Secondary */
.btn--secondary {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border);
}

.btn--secondary:hover {
  background: var(--border);
  border-color: var(--text-muted);
  transform: translateY(-1px);
}

.btn--secondary:active {
  transform: translateY(0) scale(0.97);
}

/* Success */
.btn--success {
  background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.25);
}

.btn--success:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.35);
}

.btn--success:active {
  transform: translateY(0) scale(0.97);
}

/* Danger */
.btn--danger {
  background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.25);
}

.btn--danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.35);
}

.btn--danger:active {
  transform: translateY(0) scale(0.97);
}

/* Warning/Edit */
.btn--warning {
  background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.25);
}

.btn--warning:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.35);
}

/* Outline */
.btn--outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn--outline:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.25);
}

/* Ghost */
.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 12px;
}

.btn--ghost:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* Sizes */
.btn--sm { font-size: 12px; padding: 6px 12px; border-radius: var(--radius-sm); }
.btn--lg { font-size: 16px; padding: 14px 28px; border-radius: var(--radius-md); }
.btn--full { width: 100%; }

/* Ripple effect container */
.btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transform: scale(0);
  animation: rippleAnim 0.6s ease-out;
  pointer-events: none;
}

@keyframes rippleAnim {
  to { transform: scale(4); opacity: 0; }
}

/* ==========================================================================
   7. TABELAS
   ========================================================================== */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th {
  background: var(--bg-page);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  vertical-align: middle;
}

.table tbody tr {
  transition: background var(--transition-fast);
}

.table tbody tr:hover {
  background: var(--bg-hover);
}

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

.table__actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

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

.table-empty__icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.table-empty__text {
  font-size: 15px;
  font-weight: 500;
}

/* ==========================================================================
   8. FORMULÁRIOS
   ========================================================================== */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 11px 14px;
  font-family: var(--font-primary);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  outline: none;
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
  border-color: var(--text-muted);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

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

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-error {
  font-size: 12px;
  color: var(--danger);
  margin-top: 4px;
}

/* Checkbox / Radio custom */
.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-primary);
}

/* Radio group (pills) */
.radio-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.radio-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  padding: 10px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.radio-pill:hover {
  border-color: var(--primary);
}

.radio-pill input[type="radio"] {
  display: none;
}

.radio-pill:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

/* ==========================================================================
   9. MODAIS
   ========================================================================== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 550px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  transform: translateY(20px) scale(0.95);
  transition: transform var(--transition-base);
}

.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.modal__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.modal__close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  line-height: 1;
}

.modal__close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* ==========================================================================
   10. BADGES
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 4px 10px;
  border-radius: 50px;
  transition: transform var(--transition-fast);
}

.badge:hover {
  transform: scale(1.05);
}

.badge--primary { background: var(--primary-light); color: var(--primary); }
.badge--success { background: var(--success-light); color: var(--success); }
.badge--danger { background: var(--danger-light); color: var(--danger); }
.badge--warning { background: var(--warning-light); color: #92400e; }
.badge--info { background: var(--info-light); color: var(--info); }
.badge--purple { background: #ede9fe; color: #7c3aed; }
.badge--gray { background: #f1f5f9; color: var(--text-secondary); }

/* ==========================================================================
   11. ALERTAS
   ========================================================================== */
.alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 20px;
  animation: slideInDown var(--transition-slow) forwards;
}

.alert--success {
  background: var(--success-light);
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.alert--error {
  background: var(--danger-light);
  color: #991b1b;
  border: 1px solid #fecaca;
}

.alert--warning {
  background: var(--warning-light);
  color: #92400e;
  border: 1px solid #fde68a;
}

.alert--info {
  background: var(--info-light);
  color: #1e40af;
  border: 1px solid #93c5fd;
}

@keyframes slideInDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   12. TABS
   ========================================================================== */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tab {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  transition: color var(--transition-fast);
}

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

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

.tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 2px 2px 0 0;
  animation: tabIndicator var(--transition-base) forwards;
}

@keyframes tabIndicator {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* ==========================================================================
   13. GRID LAYOUTS
   ========================================================================== */
.grid {
  display: grid;
  gap: 24px;
}

.grid--2 { grid-template-columns: 1fr 1fr; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--sidebar { grid-template-columns: 1fr 2fr; }
.grid--sidebar-reverse { grid-template-columns: 2fr 1fr; }

/* ==========================================================================
   14. TOAST NOTIFICATIONS
   ========================================================================== */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text-primary);
  color: #fff;
  padding: 14px 28px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-xl);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition-base);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.toast--success { background: var(--success); }
.toast--error { background: var(--danger); }

/* ==========================================================================
   15. SECTION TITLES
   ========================================================================== */
.section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* ==========================================================================
   16. LOGIN PAGE
   ========================================================================== */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--bg-page);
  position: relative;
  overflow: hidden;
}

.login-wrapper::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 80%;
  height: 120%;
  background: radial-gradient(ellipse, rgba(var(--primary-rgb), 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.login-card__logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-card__logo img {
  max-height: 48px;
}

.login-card__title {
  font-size: 24px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.login-card__subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 32px;
}

/* ==========================================================================
   17. UTILITIES
   ========================================================================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }
.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.hidden { display: none !important; }

/* ==========================================================================
   18. RESPONSIVIDADE
   ========================================================================== */

/* Mobile (< 576px) */
@media (max-width: 575px) {
  .panel-container {
    padding: 16px 12px;
  }

  .card {
    padding: 18px;
    border-radius: var(--radius-md);
  }

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

  .metric-card {
    padding: 16px;
  }

  .metric-card__value {
    font-size: 24px;
  }

  .grid--2,
  .grid--3,
  .grid--sidebar,
  .grid--sidebar-reverse {
    grid-template-columns: 1fr;
  }

  .modal {
    max-width: 100%;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-height: 85vh;
    margin-top: auto;
  }

  .login-card {
    padding: 28px 20px;
  }

  .btn--lg {
    padding: 12px 20px;
    font-size: 15px;
  }

  .table th,
  .table td {
    padding: 10px 12px;
    font-size: 13px;
  }
}

/* Tablets (576px - 767px) */
@media (min-width: 576px) and (max-width: 767px) {
  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid--sidebar,
  .grid--sidebar-reverse {
    grid-template-columns: 1fr;
  }
}

/* Tablet/Desktop transition (768px) */
@media (max-width: 767px) {
  .panel-nav {
    display: none;
  }

  .panel-hamburger {
    display: block;
  }

  .panel-header__inner {
    height: 56px;
  }

  .tabs {
    gap: 0;
    padding: 0 4px;
  }

  .tab {
    padding: 10px 14px;
    font-size: 13px;
  }
}

/* Desktop (768px+) */
@media (min-width: 768px) {
  .panel-nav-drawer {
    display: none !important;
  }

  .panel-container {
    padding: 32px 24px;
  }

  .metric-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

/* Wide desktop (1024px+) */
@media (min-width: 1024px) {
  .panel-container {
    padding: 40px 32px;
  }
}

/* ==========================================================================
   19. SCROLLBAR CUSTOM (Webkit)
   ========================================================================== */
.panel-page ::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.panel-page ::-webkit-scrollbar-track {
  background: transparent;
}

.panel-page ::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.panel-page ::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ==========================================================================
   20. FOOTER GLOBAL
   ========================================================================== */
.panel-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-light);
  padding: 20px 24px;
  margin-top: auto;
}

.panel-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
}

.panel-footer__brand {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
}

.panel-footer__brand-accent {
  color: #4285F4;
}

.panel-footer__copy {
  font-size: 12px;
  color: var(--text-muted);
}

/* ==========================================================================
   21. TOGGLE SWITCH
   ========================================================================== */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-switch__slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 24px;
  transition: background var(--transition-fast);
}

.toggle-switch__slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--transition-fast);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-switch__slider {
  background: #4285F4;
}

.toggle-switch input:checked + .toggle-switch__slider::before {
  transform: translateX(20px);
}

/* ==========================================================================
   21. PRINT RESET (esconde UI ao imprimir)
   ========================================================================== */
@media print {
  .panel-header,
  .panel-hamburger,
  .panel-nav-drawer,
  .toast,
  .btn,
  .modal-overlay {
    display: none !important;
  }

  .panel-page {
    background: #fff;
  }

  .card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}
