/* =========================================================
   COMPONENTS DESIGN SYSTEM: BUTTONS, TABLES, MODALS, CARDS, USERS
   ========================================================= */

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 10px var(--primary-glow);
}
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 15px var(--primary-glow);
  transform: translateY(-1px);
}

.btn-success {
  background: var(--emerald);
  color: #ffffff;
  box-shadow: 0 2px 10px var(--emerald-glow);
}
.btn-success:hover {
  background: #059669;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text-main);
}
.btn-outline:hover {
  background: var(--bg-elevated);
  border-color: var(--text-muted);
}

.btn-danger {
  background: var(--rose);
  color: #ffffff;
  box-shadow: 0 2px 10px var(--rose-glow);
}
.btn-danger:hover {
  background: #e11d48;
}

.btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
  border-radius: 6px;
}
.btn-sm svg {
  width: 14px;
  height: 14px;
}

.btn-icon {
  padding: 0.45rem;
  border-radius: var(--radius-sm);
}

/* =========================================================
   USER PROFILE SWITCHER & DROPDOWN
   ========================================================= */
.user-profile-wrapper {
  position: relative;
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 0.75rem 0.35rem 0.45rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.user-profile-badge:hover {
  border-color: var(--primary);
  background: var(--bg-card-hover);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

.user-info-header {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  text-align: left;
}

.user-name-header {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-role-header {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px);
  z-index: 200;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: fadeIn 0.2s ease-out forwards;
}

.user-dropdown-menu.open {
  display: flex;
}

.user-dropdown-header {
  padding: 0.85rem 1rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  font-weight: 700;
  font-size: 0.84rem;
}

.user-dropdown-list {
  max-height: 280px;
  overflow-y: auto;
  padding: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.user-dropdown-item:hover {
  background: var(--bg-elevated);
}

.user-dropdown-item.active {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

/* =========================================================
   PERMISSIONS MATRIX TABLE
   ========================================================= */
.perm-matrix-container {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
}

.perm-matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  text-align: center;
}

.perm-matrix-table th {
  padding: 0.65rem 0.85rem;
  background: var(--bg-surface);
  color: var(--text-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  font-weight: 700;
  border-bottom: 1px solid var(--border-subtle);
}

.perm-matrix-table th:first-child {
  text-align: left;
}

.perm-matrix-table td {
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.perm-matrix-table td:first-child {
  text-align: left;
  font-weight: 600;
  color: var(--text-main);
}

.perm-matrix-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.perm-matrix-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

.presets-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  align-items: center;
}

.btn-preset {
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-preset:hover {
  border-color: var(--primary);
  color: var(--text-main);
  background: var(--bg-card-hover);
}

/* =========================================================
   BADGES & PILLS
   ========================================================= */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

/* Status Badges */
.badge-status-ged {
  background: var(--status-ged-bg);
  color: var(--status-ged);
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.badge-status-ged .badge-dot { background: var(--status-ged); }

.badge-status-em-desenvolvimento {
  background: var(--status-dev-bg);
  color: var(--status-dev);
  border: 1px solid rgba(59, 130, 246, 0.3);
}
.badge-status-em-desenvolvimento .badge-dot { background: var(--status-dev); }

.badge-status-em-aprovacao {
  background: var(--status-aprov-bg);
  color: var(--status-aprov);
  border: 1px solid rgba(139, 92, 246, 0.3);
}
.badge-status-em-aprovacao .badge-dot { background: var(--status-aprov); }

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

.badge-status-atualizar {
  background: var(--status-atualizar-bg);
  color: var(--status-atualizar);
  border: 1px solid rgba(6, 182, 212, 0.3);
}
.badge-status-atualizar .badge-dot { background: var(--status-atualizar); }

.badge-status-cancelado {
  background: var(--status-cancel-bg);
  color: var(--status-cancel);
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.badge-status-cancelado .badge-dot { background: var(--status-cancel); }

/* Tipo Badges */
.badge-tipo-projeto {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.25);
}

.badge-tipo-demanda {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.25);
}

/* Discipline and Celula Pills */
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.18rem 0.5rem;
  border-radius: 6px;
  font-size: 0.72rem;
  background: var(--bg-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.celula-pill {
  background: rgba(139, 92, 246, 0.1);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.25);
  font-weight: 500;
}

.pm-pill {
  background: rgba(59, 130, 246, 0.1);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.25);
  font-weight: 600;
  padding: 0.2rem 0.55rem;
}

/* Multi-select Célula Box in Modal */
.multi-celula-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
}

.multi-celula-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  max-height: 110px;
  overflow-y: auto;
}

.celula-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  cursor: pointer;
  user-select: none;
  transition: all var(--transition-fast);
}

.celula-checkbox-label:hover {
  border-color: var(--primary);
}

.celula-checkbox-label input[type="checkbox"] {
  accent-color: var(--primary);
}

.celula-checkbox-label.checked {
  background: rgba(139, 92, 246, 0.15);
  border-color: var(--purple);
  color: #ffffff;
}

/* =========================================================
   DATA TABLE (DOCUMENTOS & USUARIOS)
   ========================================================= */
.table-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.table-toolbar {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.table-toolbar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 280px;
}

.table-toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bulk-actions-bar {
  display: none;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1.5rem;
  background: rgba(59, 130, 246, 0.12);
  border-bottom: 1px solid rgba(59, 130, 246, 0.25);
  font-size: 0.85rem;
  color: #93c5fd;
}

.bulk-actions-bar.active {
  display: flex;
}

.data-table-container {
  overflow-x: auto;
  min-height: 400px;
}

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

.data-table th {
  padding: 0.85rem 1rem;
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-subtle);
  user-select: none;
  white-space: nowrap;
}

.data-table th.sortable {
  cursor: pointer;
}
.data-table th.sortable:hover {
  color: var(--text-main);
}
.data-table th.sortable svg {
  display: inline-block;
  vertical-align: middle;
  margin-left: 0.25rem;
  width: 13px;
  height: 13px;
  opacity: 0.6;
}

.data-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
  vertical-align: middle;
}

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

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.data-table tbody tr.selected {
  background: rgba(59, 130, 246, 0.08);
}

.table-code {
  font-family: monospace;
  font-weight: 700;
  color: var(--primary);
}

.table-desc {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.table-proj {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.table-actions-cell {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Pagination Bar */
.table-pagination {
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.page-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 0.4rem;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.page-btn:hover:not(:disabled) {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  font-weight: 700;
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* =========================================================
   PROJECTS VIEW (CARDS)
   ========================================================= */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.project-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.project-title {
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.3;
}

.project-pms-section {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0.75rem 0;
  background: rgba(59, 130, 246, 0.05);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
}

.project-pms-header {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.project-pms-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

/* Frentes & PM Breakdown Matrix inside Project Card */
.project-frentes-section {
  margin: 0.75rem 0;
}

.project-frentes-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.project-frentes-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem;
  max-height: 160px;
  overflow-y: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
}

.frente-row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  background: var(--bg-surface);
}

.frente-row-item strong {
  color: var(--text-main);
}

.frente-row-pm {
  color: #60a5fa;
  font-weight: 500;
}

.project-meta-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin: 0.75rem 0;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.02);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.project-meta-item {
  display: flex;
  flex-direction: column;
}

.project-meta-label {
  font-size: 0.68rem;
  color: var(--text-faint);
  text-transform: uppercase;
}

.project-meta-val {
  font-weight: 600;
  color: var(--text-main);
}

/* Progress bar inside cards */
.progress-bar-wrap {
  margin: 0.85rem 0 1rem;
}

.progress-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  margin-bottom: 0.35rem;
  color: var(--text-muted);
}

.progress-track {
  height: 8px;
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--emerald));
  border-radius: var(--radius-full);
  transition: width 0.5s ease-out;
}

.project-tags-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-subtle);
}

/* =========================================================
   KANBAN BOARD VIEW
   ========================================================= */
.kanban-board {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  padding-bottom: 1.5rem;
  min-height: calc(100vh - 240px);
}

.kanban-column {
  flex: 0 0 320px;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 230px);
}

.kanban-col-header {
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  background: var(--bg-elevated);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
}

.kanban-col-title {
  font-size: 0.88rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.kanban-cards-list {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  overflow-y: auto;
  flex: 1;
}

.kanban-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  cursor: grab;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

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

.kanban-card.dragging {
  opacity: 0.4;
  cursor: grabbing;
}

.kanban-card-code {
  font-family: monospace;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--primary);
}

.kanban-card-desc {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
}

.kanban-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-faint);
  margin-top: 0.35rem;
}

/* =========================================================
   SETTINGS & PARAMETERS VIEW
   ========================================================= */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.settings-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.items-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  max-height: 180px;
  overflow-y: auto;
  padding: 0.5rem;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.item-editable-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  color: var(--text-main);
}

.item-editable-tag button {
  background: transparent;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
}
.item-editable-tag button:hover {
  color: var(--rose);
}

.add-item-form {
  display: flex;
  gap: 0.5rem;
}

/* Import/Export Dropzone */
.dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: var(--bg-elevated);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.05);
}

.dropzone svg {
  width: 48px;
  height: 48px;
  color: var(--primary);
}

/* =========================================================
   MODALS
   ========================================================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95) translateY(10px);
  transition: transform var(--transition-normal);
  overflow: hidden;
}

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

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

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-body {
  padding: 1.75rem;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.modal-footer {
  padding: 1.25rem 1.75rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  background: var(--bg-elevated);
}

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

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

.form-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-control {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  outline: none;
  transition: all var(--transition-fast);
  width: 100%;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

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

.toast {
  pointer-events: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.88rem;
  min-width: 280px;
  max-width: 420px;
  animation: toastSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.toast.success { border-left: 4px solid var(--emerald); }
.toast.error { border-left: 4px solid var(--rose); }
.toast.info { border-left: 4px solid var(--primary); }

@keyframes toastSlideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
