/* ==========================================================================
   PODCAST AI MANAGER — DESIGN SYSTEM
   Paleta rica em Dark Mode, Glassmorphism, Micro-animações e Tipografia Inter
   ========================================================================== */

:root {
  /* Cores Base */
  --bg-app: #0b0f17;
  --bg-sidebar: #111827;
  --bg-card: #182234;
  --bg-card-hover: #1f2c42;
  --bg-input: #0f172a;
  --bg-modal: #131d2e;

  /* Bordas e Divisores */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: #38bdf8;
  --border-active: rgba(56, 189, 248, 0.4);

  /* Tipografia */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Cores de Acento */
  --accent: #0284c7;
  --accent-light: #38bdf8;
  --accent-gradient: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%);
  --accent-glow: rgba(56, 189, 248, 0.25);

  /* Status */
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.12);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.12);
  --error: #ef4444;
  --error-bg: rgba(239, 68, 68, 0.15);

  /* Sombras */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(56, 189, 248, 0.2);

  /* Raios de Borda */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Fontes */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.5;
  height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Utilitários */
.hidden { display: none !important; }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error { color: var(--error); }

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */
.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 400px;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(8px);
  animation: slideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: all 0.25s ease;
}

.toast.success {
  background: #064e3b;
  border: 1px solid #059669;
  color: #a7f3d0;
}

.toast.error {
  background: #7f1d1d;
  border: 1px solid #dc2626;
  color: #fecaca;
}

.toast.info {
  background: #0c4a6e;
  border: 1px solid #0284c7;
  color: #bae6fd;
}

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

/* ==========================================================================
   TELA DE LOGIN
   ========================================================================== */
.view-login {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background: radial-gradient(circle at 50% 20%, #1e293b 0%, #0b0f17 70%);
  padding: 1.5rem;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: rgba(24, 34, 52, 0.75);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  animation: fadeIn 0.3s ease;
}

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

.login-brand {
  text-align: center;
  margin-bottom: 2rem;
}

.login-brand .brand-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.login-brand h1 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-brand p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-top: 0.25rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.input-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.input-group input {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: all 0.15s ease;
}

.input-group input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper input {
  width: 100%;
  padding-right: 2.75rem;
}

.btn-toggle-password {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  opacity: 0.6;
  transition: opacity 0.15s;
}

.btn-toggle-password:hover {
  opacity: 1;
}

.alert-box {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.alert-box.error {
  background: var(--error-bg);
  border: 1px solid var(--error);
  color: #fca5a5;
}

/* ==========================================================================
   BOTÕES GERAIS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--accent-glow);
}

.btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--text-secondary);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-subtle);
  color: var(--text-secondary);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

.btn-outline-danger {
  background: transparent;
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.btn-outline-danger:hover {
  background: var(--error-bg);
  border-color: var(--error);
  color: #fca5a5;
}

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

.btn-danger:hover {
  filter: brightness(1.1);
}

/* ==========================================================================
   LAYOUT PRINCIPAL
   ========================================================================== */
.view-main {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* Header */
.app-header {
  height: 60px;
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  flex-shrink: 0;
  z-index: 100;
}

.app-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.app-logo .logo-icon {
  font-size: 1.4rem;
}

.app-logo .logo-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.app-logo .logo-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-full);
}

/* User Menu */
.header-right {
  position: relative;
}

.user-menu-trigger {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s ease;
}

.user-menu-trigger:hover {
  border-color: var(--accent-light);
}

.user-avatar {
  width: 28px;
  height: 28px;
  background: var(--accent-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: white;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 600;
}

.dropdown-chevron {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.4rem;
  min-width: 180px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.dropdown-item {
  width: 100%;
  padding: 0.6rem 0.75rem;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: background 0.1s ease;
  text-align: left;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.dropdown-item.danger {
  color: #f87171;
}

.dropdown-item.danger:hover {
  background: var(--error-bg);
}

.dropdown-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 0.25rem 0;
}

/* Grid da Aplicação Master-Detail */
.app-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* ==========================================================================
   SIDEBAR (MASTER)
   ========================================================================== */
.app-sidebar {
  width: 320px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-top {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.search-box input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.55rem 2rem 0.55rem 2.2rem;
  font-size: 0.85rem;
  color: var(--text-primary);
  transition: border-color 0.15s ease;
}

.search-box input:focus {
  outline: none;
  border-color: var(--border-focus);
}

.btn-clear-search {
  position: absolute;
  right: 0.6rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
}

.filter-pills {
  display: flex;
  gap: 0.4rem;
}

.pill {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.35rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.pill:hover {
  background: rgba(255, 255, 255, 0.08);
}

.pill.active {
  background: var(--selected-bg, rgba(56, 189, 248, 0.15));
  border-color: var(--accent-light);
  color: var(--accent-light);
}

.btn-new-group {
  padding: 0.5rem;
  font-size: 0.82rem;
}

/* Lista de Grupos */
.groups-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.group-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.group-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-subtle);
}

.group-item.active {
  background: rgba(56, 189, 248, 0.1);
  border-color: var(--accent-light);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.15);
}

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

.group-item-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.status-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
}

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

.status-badge.paused {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-badge.disabled {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.group-item-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   CONTEÚDO PRINCIPAL (DETAIL)
   ========================================================================== */
.app-content {
  flex: 1;
  background: var(--bg-app);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.empty-state {
  margin: auto;
  text-align: center;
  padding: 3rem;
  max-width: 450px;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.empty-state h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

.detail-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.detail-header {
  position: sticky;
  top: 0;
  background: rgba(11, 15, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  z-index: 50;
}

.detail-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.input-title {
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  padding: 0.2rem 0.4rem;
  width: 100%;
  max-width: 500px;
  transition: all 0.15s ease;
}

.input-title:hover {
  border-color: var(--border-subtle);
}

.input-title:focus {
  outline: none;
  background: var(--bg-input);
  border-color: var(--border-focus);
}

.group-id-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  width: fit-content;
}

.btn-copy-id {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  opacity: 0.7;
}

.btn-copy-id:hover {
  opacity: 1;
}

.detail-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.detail-body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 1200px;
}

/* Settings Grid */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon .icon {
  position: absolute;
  left: 0.75rem;
  font-size: 0.9rem;
}

.input-with-icon input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.75rem 0.65rem 2.2rem;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.input-with-icon input:focus {
  outline: none;
  border-color: var(--border-focus);
}

.status-toggles {
  display: flex;
  gap: 1rem;
  grid-column: 1 / -1;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1rem;
}

.toggle-card {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
}

.toggle-title {
  font-size: 0.9rem;
  font-weight: 600;
  display: block;
}

.toggle-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Custom Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #334155;
  transition: .2s;
  border-radius: var(--radius-full);
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .2s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--success);
}

.switch.warning input:checked + .slider {
  background-color: var(--warning);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* Seções de Texto e Prompt */
.prompt-section, .intro-section {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.prompt-header, .intro-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.prompt-header h3, .intro-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.section-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.char-counter {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
}

.prompt-chips {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.chips-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

.chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-light);
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--accent-light);
}

.textarea-prompt, .textarea-intro {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.6;
  resize: vertical;
  transition: border-color 0.15s ease;
}

.textarea-prompt:focus, .textarea-intro:focus {
  outline: none;
  border-color: var(--border-focus);
}

/* Gaveta Retrátil de Mensagens */
.messages-drawer {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.drawer-header {
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
  transition: background 0.15s ease;
}

.drawer-header:hover {
  background: rgba(255, 255, 255, 0.05);
}

.drawer-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
}

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

.btn-drawer-toggle {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.8rem;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.btn-drawer-toggle.open {
  transform: rotate(180deg);
}

.drawer-content {
  padding: 1.25rem;
  border-top: 1px solid var(--border-subtle);
  max-height: 380px;
  overflow-y: auto;
}

.messages-feed {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.msg-card {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.msg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
}

.msg-author {
  font-weight: 600;
  color: var(--accent-light);
}

.msg-time {
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.msg-text {
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}

.msg-reply {
  font-size: 0.75rem;
  color: var(--text-muted);
  border-left: 2px solid var(--accent);
  padding-left: 0.5rem;
  margin-bottom: 0.25rem;
}

/* ==========================================================================
   MODAIS
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 9999;
  animation: fadeIn 0.2s ease;
}

.modal-card {
  width: 100%;
  max-width: 480px;
  background: var(--bg-modal);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

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

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
