/* ==========================================================================
   BRADOX CREATIVE ECOSYSTEM — GOLD EDITION
   Design System Oficial · Design Tokens, Tipografia, Layout & Componentes
   ========================================================================== */

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

:root {
  /* 1. Paleta Oficial Bradox Gold Edition */
  --bg-base: #090A0C;
  --bg-sidebar: #0E0F12;
  --bg-surface: #14161A;
  --bg-surface-elevated: #1A1D22;
  --bg-surface-hover: #21242A;
  --bg-surface-active: #272B33;

  /* 2. Dourado de Assinatura Estratégica (Usado com Moderação e Refinamento) */
  --gold-primary: #D4AF37;
  --gold-accent: #F6C453;
  --gold-deep: #8A6108;
  --gold-muted: rgba(212, 175, 55, 0.10);
  --gold-glow: rgba(212, 175, 55, 0.20);
  --gold-border: rgba(212, 175, 55, 0.35);

  /* 3. Textos e Contraste Tipográfico */
  --text-primary: #F5F5F6;
  --text-secondary: #A6ABB5;
  --text-muted: #6E7480;
  --text-inverse: #090A0C;
  --text-gold: #F6C453;

  /* 4. Bordas e Divisórias Estruturais */
  --border-subtle: #1C1E23;
  --border-default: #292C32;
  --border-hover: #3D424B;
  --border-focus: #D4AF37;

  /* 5. Cores Funcionais de Sistema */
  --status-success: #10B981;
  --status-success-bg: rgba(16, 185, 129, 0.12);
  --status-warning: #F59E0B;
  --status-warning-bg: rgba(245, 158, 11, 0.12);
  --status-error: #EF4444;
  --status-error-bg: rgba(239, 68, 68, 0.12);
  --status-info: #38BDF8;
  --status-info-bg: rgba(56, 189, 248, 0.12);

  /* 6. Tipografia */
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* 7. Dimensões & Layout */
  --sidebar-width: 268px;
  --sidebar-collapsed-width: 76px;
  --header-height: 68px;
  --content-max-width: 1440px;

  /* 8. Raios de Borda */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-full: 9999px;

  /* 9. Sombras Sutis (Sem excesso de brilho) */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-gold: 0 8px 24px rgba(212, 175, 55, 0.15);

  /* 10. Transições Profissionais */
  --transition-fast: 150ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-base: 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset Universal & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

button, input, select, textarea {
  font: inherit;
}

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

.bradox-layout {
  display: flex;
  min-height: 100vh;
  width: 100vw;
  background-color: var(--bg-base);
  position: relative;
}

/* ==========================================================================
   SIDEBAR OFICIAL BRADOX (Sleek, Collapsible & Grouped)
   ========================================================================== */

.bradox-sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: width var(--transition-base), transform var(--transition-base);
  user-select: none;
}

/* Topo da Sidebar */
.sidebar-header {
  height: var(--header-height);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-emblem-wrap {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #1C1E24, #121418);
  border: 1px solid var(--gold-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.brand-emblem-wrap img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.brand-info {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-primary);
}

.brand-name span {
  color: var(--gold-primary);
}

.brand-badge-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 2px;
}

.sidebar-collapse-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.sidebar-collapse-btn:hover {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-default);
}

/* Navegação da Sidebar com Rolagem Independente */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-nav::-webkit-scrollbar {
  width: 4px;
}
.sidebar-nav::-webkit-scrollbar-thumb {
  background: var(--border-default);
  border-radius: var(--radius-full);
}

/* Separadores de Seção */
.nav-group-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 14px 10px 6px 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: all var(--transition-fast);
  position: relative;
  white-space: nowrap;
}

.nav-item:hover {
  background-color: var(--bg-surface);
  color: var(--text-primary);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.12) 0%, rgba(212, 175, 55, 0.02) 100%);
  color: var(--text-primary);
  font-weight: 600;
  border-left: 2.5px solid var(--gold-primary);
  padding-left: 9.5px;
}

.nav-item-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  flex-shrink: 0;
}

.nav-item:hover .nav-item-icon {
  color: var(--text-primary);
}

.nav-item.active .nav-item-icon {
  color: var(--gold-primary);
}

.nav-item-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-item-pill {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background-color: var(--bg-surface-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.nav-item.active .nav-item-pill {
  background-color: var(--gold-muted);
  color: var(--gold-accent);
  border-color: var(--gold-border);
}

/* Rodapé Refinado da Sidebar */
.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border-subtle);
  background-color: var(--bg-sidebar);
}

.license-compact-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.license-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.license-status-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-primary);
}

.license-dot {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-full);
  background-color: var(--status-success);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.license-plan-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.license-badge-vip {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: var(--radius-xs);
  background: var(--gold-muted);
  color: var(--gold-primary);
  border: 1px solid var(--gold-border);
}

/* Desktop Sidebar Collapsed State */
body.sidebar-is-collapsed .bradox-sidebar {
  width: var(--sidebar-collapsed-width);
}

body.sidebar-is-collapsed .bradox-sidebar .brand-info,
body.sidebar-is-collapsed .bradox-sidebar .nav-group-title,
body.sidebar-is-collapsed .bradox-sidebar .nav-item-label,
body.sidebar-is-collapsed .bradox-sidebar .nav-item-pill,
body.sidebar-is-collapsed .bradox-sidebar .license-info,
body.sidebar-is-collapsed .bradox-sidebar .license-badge-vip {
  display: none;
}

body.sidebar-is-collapsed .bradox-sidebar .sidebar-header {
  justify-content: center;
  padding: 0;
}

body.sidebar-is-collapsed .bradox-sidebar .sidebar-collapse-btn {
  display: none;
}

body.sidebar-is-collapsed .bradox-sidebar .nav-item {
  justify-content: center;
  padding: 10px;
}

body.sidebar-is-collapsed .bradox-sidebar .license-compact-box {
  justify-content: center;
  padding: 8px;
}

body.sidebar-is-collapsed .bradox-main {
  margin-left: var(--sidebar-collapsed-width);
  width: calc(100vw - var(--sidebar-collapsed-width));
}

.bradox-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left var(--transition-base);
  width: calc(100vw - var(--sidebar-width));
  background-color: var(--bg-base);
}

/* Topbar */
.bradox-topbar {
  height: var(--header-height);
  background-color: rgba(9, 10, 12, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mobile-menu-trigger {
  display: none;
  background: transparent;
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.topbar-breadcrumb .crumb-root {
  color: var(--text-secondary);
}

.topbar-breadcrumb .crumb-separator {
  color: var(--border-default);
}

.topbar-breadcrumb .crumb-current {
  color: var(--text-primary);
  font-weight: 600;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.system-status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.system-status-indicator .status-pulse {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background-color: var(--status-success);
}

.user-profile-widget {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 4px 4px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
}

.user-avatar-circle {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--gold-deep), var(--gold-primary));
  color: var(--bg-base);
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-meta-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.user-name-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.user-badge-role {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--gold-primary);
  text-transform: uppercase;
}

/* Área de Conteúdo */
.bradox-content {
  flex: 1;
  padding: 28px;
  max-width: var(--content-max-width);
  width: 100%;
  margin: 0 auto;
}

/* ==========================================================================
   TIPOGRAFIA & ESCALA HIERÁRQUICA
   ========================================================================== */

.page-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.2;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 16px;
}

.card-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
}

.body-text {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.metadata-text {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ==========================================================================
   SISTEMA DE BOTÕES (VARIADOS & SEM EXAGERO DE DOURADO)
   ========================================================================== */

/* Variants are public button classes: modules also use them without .btn. */
.btn,
.btn-primary,
.btn-secondary,
.btn-ghost,
.btn-destructive,
.btn-gold {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  max-width: 100%;
}

.btn:disabled,
button:disabled,
[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
}

:where(button, .btn, .btn-primary, .btn-secondary, .btn-ghost, .btn-destructive, .btn-gold, .fa-btn, [role="button"]):focus-visible {
  outline: 2px solid var(--gold-accent);
  outline-offset: 3px;
}

:where(button, .btn, .btn-primary, .btn-secondary, .btn-ghost, .btn-destructive, .btn-gold, .fa-btn)[aria-busy="true"],
button.is-loading {
  cursor: wait;
  filter: saturate(.7);
}

:where(.btn, .btn-primary, .btn-secondary, .btn-gold, .fa-btn)[aria-busy="true"]::after,
button.is-loading::after {
  content: '';
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: bradox-button-spin .7s linear infinite;
}

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

/* Primary: Ouro Elegante com Texto Escuro de Alto Contraste */
.btn-primary,
.btn-gold {
  background: linear-gradient(180deg, var(--gold-accent) 0%, var(--gold-primary) 100%);
  color: var(--text-inverse);
  font-weight: 700;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-primary:hover:not(:disabled):not([aria-disabled="true"]):not([aria-busy="true"]),
.btn-gold:hover:not(:disabled):not([aria-disabled="true"]):not([aria-busy="true"]) {
  background: linear-gradient(180deg, #F8CE6A 0%, #DDB842 100%);
  box-shadow: var(--shadow-gold);
}

.btn-primary:active:not(:disabled),
.btn-gold:active:not(:disabled) {
  transform: translateY(1px);
}

/* Secondary: Superfície Escura com Borda Nítida */
.btn-secondary {
  background-color: var(--bg-surface-elevated);
  border-color: var(--border-default);
  color: var(--text-primary);
}

.btn-secondary:hover:not(:disabled):not([aria-disabled="true"]):not([aria-busy="true"]) {
  background-color: var(--bg-surface-hover);
  border-color: var(--border-hover);
  color: #FFFFFF;
}

/* Ghost: Transparente para Ações Secundárias */
.btn-ghost {
  background-color: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover:not(:disabled):not([aria-disabled="true"]):not([aria-busy="true"]) {
  background-color: var(--bg-surface);
  color: var(--text-primary);
}

/* Destructive */
.btn-destructive {
  background-color: var(--status-error-bg);
  border-color: rgba(239, 68, 68, 0.3);
  color: #F87171;
}

.btn-destructive:hover:not(:disabled):not([aria-disabled="true"]):not([aria-busy="true"]) {
  background-color: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  color: #FFFFFF;
}

/* Botão Ícone */
.btn-icon {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  cursor: pointer;
  text-decoration: none;
  flex-shrink: 0;
}

.btn-icon:hover:not(:disabled):not([aria-disabled="true"]) {
  background-color: var(--bg-surface-hover);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

/* Tamanhos */
.btn-sm {
  font-size: 12px;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: var(--radius-xs);
}

.btn-lg {
  font-size: 15px;
  min-height: 48px;
  padding: 13px 24px;
  border-radius: var(--radius-md);
}

/* ==========================================================================
   INPUTS, SELECTS & FORMULÁRIOS
   ========================================================================== */

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

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

.input-field,
.select-field,
.textarea-field {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-primary);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  outline: none;
  transition: all var(--transition-fast);
}

.input-field:focus,
.select-field:focus,
.textarea-field:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px var(--gold-muted);
}

.input-field::placeholder,
.textarea-field::placeholder {
  color: var(--text-muted);
}

.input-field:disabled,
.select-field:disabled,
.textarea-field:disabled {
  opacity: .55;
  cursor: not-allowed;
}

input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 9px 13px;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.select-field {
  appearance: none;
  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='%23A6ABB5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

/* ==========================================================================
   BADGES & PILLS
   ========================================================================== */

.badge,
.badge-gold,
.badge-neutral,
.badge-success,
.badge-info {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  line-height: 1.2;
}

.badge-gold {
  background: var(--gold-muted);
  color: var(--gold-accent);
  border: 1px solid var(--gold-border);
}

.badge-neutral {
  background: var(--bg-surface-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
}

.badge-success {
  background: var(--status-success-bg);
  color: var(--status-success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-info {
  background: var(--status-info-bg);
  color: var(--status-info);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

/* ==========================================================================
   SUPERFÍCIES & CARDS ESTRUTURAIS
   ========================================================================== */

.surface-panel {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 24px;
}

.surface-elevated {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 20px;
}

/* ==========================================================================
   MODAIS PROFISSIONAIS
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(5, 6, 8, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalFadeIn 0.2s ease-out;
}

.modal-dialog {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  background-color: var(--bg-surface-elevated);
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

/* ==========================================================================
   TOASTS DO SISTEMA
   ========================================================================== */

.bradox-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.bradox-toast {
  pointer-events: auto;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-md);
  color: var(--text-primary);
  font-size: 13.5px;
  font-weight: 500;
  min-width: 280px;
  max-width: 420px;
  animation: toastSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.bradox-toast.toast-gold {
  border-color: var(--gold-border);
}

.bradox-toast.toast-gold .toast-icon {
  color: var(--gold-primary);
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ==========================================================================
   RESPONSIVIDADE (DESKTOP, TABLET & SMARTPHONE)
   ========================================================================== */

@media (max-width: 1024px) {
  :root {
    --sidebar-width: 240px;
  }
  .bradox-content {
    padding: 20px;
  }
}

@media (max-width: 820px) {
  .bradox-sidebar {
    transform: translateX(-100%);
    width: 280px;
    box-shadow: 20px 0 40px rgba(0, 0, 0, 0.7);
  }

  .bradox-sidebar.mobile-open {
    transform: translateX(0);
  }

  .bradox-main {
    margin-left: 0;
    width: 100vw;
  }

  .mobile-menu-trigger {
    display: inline-flex;
  }

  .topbar-breadcrumb .crumb-root,
  .topbar-breadcrumb .crumb-separator {
    display: none;
  }

  .bradox-content {
    padding: 16px;
  }
}

@media (max-width: 600px) {
  .btn, .btn-primary, .btn-secondary, .btn-ghost, .btn-destructive, .btn-gold {
    min-height: 44px;
    white-space: normal;
    line-height: 1.35;
  }

  .btn-icon {
    width: 44px;
    height: 44px;
  }

  .modal-footer > :is(button, a) {
    flex: 1 1 140px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn, .btn-primary, .btn-secondary, .btn-ghost, .btn-destructive, .btn-gold {
    transition: none;
  }

  :where(.btn, .btn-primary, .btn-secondary, .btn-gold, .fa-btn)[aria-busy="true"]::after,
  button.is-loading::after {
    animation: none;
  }
}
