/* ==========================================================================
   DESIGN SYSTEM - GESTÃO DE METAS & PERFORMANCE
   Premium modern look, using glassmorphism, fluid animations & HSL colors.
   ========================================================================== */

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

:root {
  /* HSL Color Tokens - Light Theme Default */
  --hue: 224;
  --bg-primary: hsl(var(--hue), 25%, 98%);
  --bg-secondary: hsl(var(--hue), 30%, 100%);
  --bg-tertiary: hsl(var(--hue), 20%, 94%);
  --border-color: hsl(var(--hue), 15%, 88%);
  --border-focus: hsl(var(--hue), 80%, 60%);
  
  --text-primary: hsl(var(--hue), 40%, 15%);
  --text-secondary: hsl(var(--hue), 20%, 45%);
  --text-muted: hsl(var(--hue), 15%, 65%);
  
  --primary: hsl(var(--hue), 85%, 55%);
  --primary-hover: hsl(var(--hue), 85%, 48%);
  --primary-light: hsl(var(--hue), 85%, 95%);
  --accent: hsl(265, 85%, 60%);
  
  /* Status Colors */
  --success: hsl(150, 75%, 38%);
  --success-light: hsl(150, 75%, 95%);
  --warning: hsl(38, 95%, 48%);
  --warning-light: hsl(38, 95%, 95%);
  --danger: hsl(355, 80%, 50%);
  --danger-light: hsl(355, 80%, 96%);
  
  /* Shadows & Glassmorphism */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.02);
  --shadow-md: 0 8px 24px rgba(20, 30, 60, 0.06);
  --shadow-lg: 0 16px 40px rgba(20, 30, 60, 0.12);
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.5);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  
  --sidebar-width: 260px;
}

/* Dark Mode Overrides */
[data-theme="dark"] {
  --bg-primary: hsl(var(--hue), 22%, 8%);
  --bg-secondary: hsl(var(--hue), 18%, 12%);
  --bg-tertiary: hsl(var(--hue), 18%, 15%);
  --border-color: hsl(var(--hue), 15%, 18%);
  --border-focus: hsl(var(--hue), 70%, 50%);
  
  --text-primary: hsl(var(--hue), 15%, 92%);
  --text-secondary: hsl(var(--hue), 10%, 70%);
  --text-muted: hsl(var(--hue), 10%, 50%);
  
  --primary: hsl(var(--hue), 75%, 55%);
  --primary-hover: hsl(var(--hue), 75%, 62%);
  --primary-light: hsl(var(--hue), 25%, 18%);
  
  --success: hsl(150, 65%, 45%);
  --success-light: hsl(150, 30%, 15%);
  --warning: hsl(38, 85%, 50%);
  --warning-light: hsl(38, 30%, 16%);
  --danger: hsl(355, 75%, 55%);
  --danger-light: hsl(355, 30%, 16%);
  
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.25);
  --shadow-lg: 0 16px 40px rgba(0,0,0,0.4);
  --glass-bg: rgba(20, 24, 38, 0.7);
  --glass-border: rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   RESET & BASE STYLE
   ========================================================================== */

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  overflow: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

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

.app-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  position: relative;
}

/* Sidebar Styling */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100%;
  z-index: 10;
  flex-shrink: 0;
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.sidebar-header {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
}

.logo-icon {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  box-shadow: 0 4px 12px rgba(100, 110, 255, 0.35);
}

.logo-text {
  font-size: 1.15rem;
  font-weight: 800;
  background: linear-gradient(to right, var(--text-primary), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-menu {
  list-style: none;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-grow: 1;
  overflow-y: auto;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  text-decoration: none;
  font-weight: 500;
  transition: all var(--transition-fast);
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.menu-item i {
  font-size: 1.1rem;
  width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

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

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-tertiary);
}

/* User Profile Widget */
.user-widget {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background-color: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  box-shadow: var(--shadow-sm);
}

.user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.user-name {
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.user-role {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* Main Content area */
.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* Top bar style */
.top-bar {
  height: 70px;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  flex-shrink: 0;
  z-index: 9;
}

.page-title-container {
  display: flex;
  flex-direction: column;
}

.page-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.page-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* RBAC Simulator Toggle styles */
.role-simulator {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 8px;
}

.role-simulator-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.role-select {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  font-size: 0.8rem;
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
  outline: none;
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border-color);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--text-muted);
}

/* Content Pane layout */
.content-pane {
  flex-grow: 1;
  overflow-y: auto;
  padding: 32px;
  display: none;
  animation: fadeIn var(--transition-normal) forwards;
}

.content-pane.active {
  display: block;
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   COMMON PREMIUM COMPONENT SYSTEM
   ========================================================================== */

/* Metrics Cards Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.metric-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-focus);
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
  opacity: 0.7;
}

.metric-card.success::before { background: var(--success); }
.metric-card.warning::before { background: var(--warning); }
.metric-card.danger::before { background: var(--danger); }
.metric-card.accent::before { background: var(--accent); }

.metric-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.metric-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

.metric-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-tertiary);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

.metric-card.success .metric-icon { background-color: var(--success-light); color: var(--success); }
.metric-card.warning .metric-icon { background-color: var(--warning-light); color: var(--warning); }
.metric-card.danger .metric-icon { background-color: var(--danger-light); color: var(--danger); }
.metric-card.accent .metric-icon { background-color: hsl(265, 85%, 95%); color: var(--accent); }

.metric-value {
  font-size: 1.65rem;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  color: var(--text-primary);
  line-height: 1.2;
}

.metric-footer {
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.metric-trend {
  font-weight: 600;
  display: flex;
  align-items: center;
}

.metric-trend.up { color: var(--success); }
.metric-trend.down { color: var(--danger); }

/* Premium Grid & Panels */
.grid-container-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.panel-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

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

.panel-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-card-actions {
  display: flex;
  gap: 8px;
}

/* Premium Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  outline: none;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(100, 110, 255, 0.25);
}

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

.btn-secondary:hover {
  background-color: var(--bg-tertiary);
  border-color: var(--text-muted);
}

.btn-success {
  background-color: var(--success);
  color: white;
}

.btn-success:hover {
  background-color: hsl(150, 75%, 33%);
}

.btn-danger {
  background-color: var(--danger);
  color: white;
}

.btn-danger:hover {
  background-color: hsl(355, 80%, 42%);
}

.btn-icon-only {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: var(--radius-sm);
}

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

/* Premium Tables */
.table-container {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background-color: var(--bg-secondary);
  margin-bottom: 24px;
}

.table-premium {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

.table-premium th {
  background-color: var(--bg-tertiary);
  color: var(--text-secondary);
  font-weight: 600;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  text-transform: uppercase;
  font-size: 0.725rem;
  letter-spacing: 0.05em;
}

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

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

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

/* Badges / Pill Tags */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 0.725rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.badge-success { background-color: var(--success-light); color: var(--success); }
.badge-warning { background-color: var(--warning-light); color: var(--warning); }
.badge-danger { background-color: var(--danger-light); color: var(--danger); }
.badge-primary { background-color: var(--primary-light); color: var(--primary); }
.badge-secondary { background-color: var(--bg-tertiary); color: var(--text-secondary); }

/* Form Controls */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 0.875rem;
  outline: none;
  transition: all var(--transition-fast);
}

.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(100, 110, 255, 0.15);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='hsl(224, 20%25, 45%25)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px;
  padding-right: 40px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  font-weight: 500;
  font-size: 0.875rem;
}

.form-checkbox input {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  outline: none;
  cursor: pointer;
}

/* ==========================================================================
   TAB / VIEW SPECIFIC COMPONENT STYLING
   ========================================================================== */

/* Partners view styling */
.action-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.search-box {
  position: relative;
  max-width: 300px;
  width: 100%;
}

.search-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-box input {
  padding-left: 36px;
}

/* Indicators weight validation warning panel */
.weight-alert-bar {
  background-color: var(--warning-light);
  border: 1px solid var(--warning);
  color: var(--warning);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 500;
  font-size: 0.85rem;
}

.weight-alert-bar.success {
  background-color: var(--success-light);
  border-color: var(--success);
  color: var(--success);
}

.weight-bar-container {
  width: 100%;
  height: 8px;
  background-color: var(--border-color);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 6px;
}

.weight-bar-fill {
  height: 100%;
  background: var(--warning);
  width: 0;
  transition: width var(--transition-normal);
}

.weight-bar-fill.success {
  background: var(--success);
}

.weight-bar-fill.danger {
  background: var(--danger);
}

/* Import Area with Drag and Drop & Spreadsheet Paste */
.import-zone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px 20px;
  text-align: center;
  background-color: var(--bg-secondary);
  cursor: pointer;
  transition: all var(--transition-normal);
  margin-bottom: 24px;
}

.import-zone:hover, .import-zone.dragover {
  border-color: var(--border-focus);
  background-color: var(--primary-light);
}

.import-icon {
  font-size: 2.5rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  transition: color var(--transition-fast);
}

.import-zone:hover .import-icon {
  color: var(--primary);
}

.paste-area-title {
  margin: 16px 0 8px;
  font-weight: 600;
  font-size: 0.875rem;
}

.paste-textbox {
  width: 100%;
  max-width: 500px;
  height: 80px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px;
  font-family: monospace;
  font-size: 0.8rem;
  resize: none;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  margin-top: 10px;
}

.paste-textbox:focus {
  border-color: var(--border-focus);
  outline: none;
}

/* Progress bar styles */
.progress-container {
  margin: 16px 0;
  display: none;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.progress-bar-bg {
  width: 100%;
  height: 8px;
  background-color: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(to right, var(--primary), var(--accent));
  width: 0%;
  transition: width 0.1s linear;
}

/* Executive Dashboard charts */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
}

.chart-wrapper {
  position: relative;
  height: 300px;
  width: 100%;
}

/* Simulator panel card preview styling */
.reward-simulation-preview {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 16px;
}

.sim-formula {
  font-family: monospace;
  font-size: 0.8rem;
  background-color: var(--bg-secondary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  margin: 8px 0;
}

.sim-output {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 0.95rem;
  margin-top: 12px;
  color: var(--success);
}

/* ==========================================================================
   MODAL WINDOW SYSTEM
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

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

.modal-window {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 600px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: translateY(20px);
  transition: transform var(--transition-normal);
}

.modal-backdrop.active .modal-window {
  transform: translateY(0);
}

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

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition-fast);
}

.modal-close:hover {
  color: var(--danger);
}

.modal-body {
  padding: 24px;
  max-height: 70vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-tertiary);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateX(120%);
  transition: transform var(--transition-normal);
}

.toast.active {
  transform: translateX(0);
}

.toast.success { border-left-color: var(--success); }
.toast.warning { border-left-color: var(--warning); }
.toast.danger { border-left-color: var(--danger); }

/* ==========================================================================
   UTILITY CLASSES & SPECIAL STYLING
   ========================================================================== */

.hidden {
  display: none !important;
}

.text-right { text-align: right; }
.text-center { text-align: center; }

.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }
.text-primary { color: var(--primary) !important; }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }

/* Timeline audit layout */
.audit-timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  padding-left: 20px;
}

.audit-timeline::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background-color: var(--border-color);
}

.audit-item {
  position: relative;
}

.audit-marker {
  position: absolute;
  left: -20px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background-color: var(--primary);
  border: 2px solid var(--bg-secondary);
}

.audit-item:hover .audit-marker {
  transform: scale(1.2);
  background-color: var(--accent);
}

.audit-body {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.85rem;
}

.audit-meta {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-bottom: 6px;
}

/* Responsiveness overrides */
@media (max-width: 900px) {
  body {
    flex-direction: column;
    overflow-y: auto;
  }
  
  .app-container {
    flex-direction: column;
    height: auto;
    width: 100%;
  }
  
  .sidebar {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  
  .sidebar-menu {
    flex-direction: row;
    overflow-x: auto;
    padding: 10px;
  }
  
  .main-content {
    height: auto;
    overflow: visible;
  }
  
  .content-pane {
    padding: 16px;
  }
  
  .grid-container-2, .charts-grid {
    grid-template-columns: 1fr;
  }
}
