/**
 * F3 Finanz - Banker Portal Styles
 * © Sven Gauditz – sven@gauditz.com
 *
 * Mobile-first, professionelles Design
 * Dark/Light Theme Support
 */

/* ============================================================
   CSS Variables (Theme)
   ============================================================ */

:root {
  /* Light Theme (Default) */
  --primary: #1E40AF;
  --primary-hover: #1E3A8A;
  --primary-alpha: rgba(30, 64, 175, 0.15);

  --success: #059669;
  --success-bg: #ECFDF5;
  --success-border: #A7F3D0;

  --danger: #DC2626;
  --danger-bg: #FEF2F2;
  --danger-border: #FECACA;

  --warning: #D97706;
  --warning-bg: #FFFBEB;
  --warning-border: #FDE68A;

  --bg-primary: #FFFFFF;
  --bg-secondary: #F3F4F6;
  --bg-tertiary: #E5E7EB;

  --text-primary: #111827;
  --text-secondary: #374151;
  --text-muted: #6B7280;

  --border-color: #D1D5DB;
  --border-light: #E5E7EB;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

  --sidebar-width: 260px;
  --topbar-height: 64px;
  --transition: 0.15s ease;
}

[data-theme="dark"] {
  --primary: #3B82F6;
  --primary-hover: #2563EB;
  --primary-alpha: rgba(59, 130, 246, 0.2);

  --success: #10B981;
  --success-bg: rgba(16, 185, 129, 0.15);
  --success-border: rgba(16, 185, 129, 0.3);

  --danger: #EF4444;
  --danger-bg: rgba(239, 68, 68, 0.15);
  --danger-border: rgba(239, 68, 68, 0.3);

  --warning: #F59E0B;
  --warning-bg: rgba(245, 158, 11, 0.15);
  --warning-border: rgba(245, 158, 11, 0.3);

  --bg-primary: #1F2937;
  --bg-secondary: #111827;
  --bg-tertiary: #374151;

  --text-primary: #F9FAFB;
  --text-secondary: #E5E7EB;
  --text-muted: #9CA3AF;

  --border-color: #374151;
  --border-light: #4B5563;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

/* ============================================================
   Reset & Base
   ============================================================ */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-secondary);
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-hover);
}

/* ============================================================
   Layout: App Container
   ============================================================ */

.app-container {
  display: flex;
  min-height: 100vh;
}

/* ============================================================
   Sidebar
   ============================================================ */

.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--bg-primary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

@media (min-width: 1024px) {
  .sidebar {
    transform: translateX(0);
  }
}

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

.sidebar-brand {
  position: relative;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-brand .sidebar-close {
  position: absolute;
  top: 16px;
  right: 12px;
  z-index: 1;
}

.sidebar-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 6px;
  transition: background var(--transition), color var(--transition);
}

.sidebar-close:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

@media (min-width: 1024px) {
  .sidebar-close {
    display: none;
  }
}

.bank-info {
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.bank-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.bank-badge {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.2rem 0.5rem;
  background: var(--primary-alpha);
  color: var(--primary);
  border-radius: 4px;
}

/* Navigation */
.nav {
  flex: 1;
  padding: 1rem 0.75rem;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  color: var(--text-secondary);
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
}

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

.nav-item.active {
  background: var(--primary-alpha);
  color: var(--primary);
}

.nav-item i {
  width: 20px;
  text-align: center;
  font-size: 1rem;
  opacity: 0.7;
}

.nav-item.active i {
  opacity: 1;
}

.nav-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 10px;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-color);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.user-details {
  flex: 1;
  min-width: 0;
}

.user-name {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-email {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-logout {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.btn-logout:hover {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger);
}

/* ============================================================
   Overlay (Mobile)
   ============================================================ */

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

body.sidebar-open .overlay {
  opacity: 1;
  visibility: visible;
}

@media (min-width: 1024px) {
  .overlay {
    display: none;
  }
}

/* ============================================================
   Main Content
   ============================================================ */

.main-content {
  flex: 1;
  margin-left: 0;
  min-width: 0;
  transition: margin-left 0.3s ease;
}

@media (min-width: 1024px) {
  .main-content {
    margin-left: var(--sidebar-width);
  }
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--topbar-height);
  padding: 0 1rem;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

@media (min-width: 768px) {
  .topbar {
    padding: 0 1.5rem;
  }
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 36px;
  height: 36px;
  padding: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 1px;
  transition: background var(--transition);
}

.menu-toggle:hover span {
  background: var(--text-primary);
}

@media (min-width: 1024px) {
  .menu-toggle {
    display: none;
  }
}

.page-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 768px) {
  .page-title {
    font-size: 1.25rem;
  }
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Theme Toggle */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--border-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: background var(--transition), color var(--transition);
}

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

[data-theme="dark"] .theme-toggle .theme-icon-dark {
  display: none;
}

[data-theme="light"] .theme-toggle .theme-icon-light,
:root:not([data-theme]) .theme-toggle .theme-icon-light {
  display: none;
}

/* Page Content */
.page-content {
  padding: 1rem;
  max-width: 1400px;
}

@media (min-width: 768px) {
  .page-content {
    padding: 1.5rem;
  }
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), transform 0.1s ease;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

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

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

.btn-primary:hover {
  background: var(--primary-hover);
  color: #fff;
}

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

.btn-success:hover {
  background: #047857;
  color: #fff;
}

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

.btn-danger:hover {
  background: #B91C1C;
  color: #fff;
}

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

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

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
}

/* ============================================================
   Stats Grid
   ============================================================ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--bg-primary);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.stat-icon-primary {
  background: var(--primary-alpha);
  color: var(--primary);
}

.stat-icon-success {
  background: var(--success-bg);
  color: var(--success);
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ============================================================
   Filter Bar
   ============================================================ */

.filter-bar {
  background: var(--bg-primary);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.filter-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.filter-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-select,
.filter-input {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  min-width: 140px;
}

.filter-select:focus,
.filter-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-alpha);
}

.filter-search {
  flex: 1;
  min-width: 200px;
}

.search-input-wrapper {
  position: relative;
}

.search-input-wrapper .filter-input {
  width: 100%;
  padding-right: 2.5rem;
}

.search-btn {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 4px;
  transition: color var(--transition);
}

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

/* ============================================================
   Table
   ============================================================ */

.table-container {
  background: var(--bg-primary);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 0.875rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.data-table th {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  background: var(--bg-secondary);
}

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

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

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

.data-table tbody tr.row-highlight {
  background: var(--primary-alpha);
}

.data-table tbody tr.row-highlight:hover {
  background: rgba(30, 64, 175, 0.2);
}

.application-id {
  font-weight: 600;
  color: var(--primary);
}

.mobile-meta {
  display: none;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

@media (max-width: 767px) {
  .hide-mobile {
    display: none !important;
  }

  .mobile-only {
    display: block !important;
  }

  .data-table th,
  .data-table td {
    padding: 0.75rem;
  }
}

@media (max-width: 1023px) {
  .hide-tablet {
    display: none !important;
  }
}

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

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

.text-lg {
  font-size: 1.125rem;
  font-weight: 600;
}

/* ============================================================
   Status Badges
   ============================================================ */

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 6px;
  white-space: nowrap;
}

.status-badge-lg {
  padding: 0.375rem 0.875rem;
  font-size: 0.875rem;
}

.status-new {
  background: var(--primary-alpha);
  color: var(--primary);
}

.status-viewed {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

.status-review {
  background: var(--warning-bg);
  color: var(--warning);
}

.status-approved {
  background: var(--success-bg);
  color: var(--success);
}

.status-rejected {
  background: var(--danger-bg);
  color: var(--danger);
}

.status-expired,
.status-withdrawn {
  background: var(--bg-tertiary);
  color: var(--text-muted);
}

/* ============================================================
   Pagination
   ============================================================ */

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem;
  margin-top: 1rem;
}

.pagination-info {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.pagination-nav {
  display: flex;
  gap: 0.5rem;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background var(--transition), border-color var(--transition);
}

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

/* ============================================================
   Empty State
   ============================================================ */

.empty-state {
  padding: 3rem 1.5rem;
  text-align: center;
}

.empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border-radius: 50%;
  font-size: 1.5rem;
  color: var(--text-muted);
}

.empty-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.empty-text {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ============================================================
   Detail Page
   ============================================================ */

.breadcrumb {
  margin-bottom: 1rem;
}

.breadcrumb-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

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

.detail-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

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

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.meta-item i {
  opacity: 0.6;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--transition), border-color var(--transition);
}

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

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

.tab-badge {
  padding: 0.125rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--bg-tertiary);
  border-radius: 10px;
}

.tab-content {
  display: none;
}

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

/* Detail Grid */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.detail-card {
  background: var(--bg-primary);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.detail-card.card-warning {
  border-color: var(--danger-border);
  background: var(--danger-bg);
}

.card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-light);
}

.card-title i {
  color: var(--primary);
  opacity: 0.8;
}

.detail-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.detail-list-horizontal {
  flex-direction: row;
  flex-wrap: wrap;
}

.detail-list-horizontal .detail-row {
  flex: 1;
  min-width: 140px;
}

.detail-row {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.detail-row dt {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-row dd {
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.conditions-notes {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.conditions-notes strong {
  color: var(--text-primary);
}

.mt-4 {
  margin-top: 1.5rem;
}

/* Documents Grid */
.documents-grid {
  display: grid;
  gap: 0.75rem;
}

.document-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-primary);
  border-radius: 10px;
  border: 1px solid var(--border-light);
  transition: border-color var(--transition);
}

.document-card:hover {
  border-color: var(--primary);
}

.document-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--danger);
  flex-shrink: 0;
}

.document-info {
  flex: 1;
  min-width: 0;
}

.document-name {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.9375rem;
}

.document-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
}

.document-actions {
  display: flex;
  gap: 0.5rem;
}

/* Decision Section */
.decision-workflow {
  background: var(--bg-primary);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.workflow-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.workflow-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.decision-final {
  text-align: center;
  padding: 3rem 1.5rem;
}

.decision-final-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 2rem;
}

.decision-final-icon.icon-success {
  background: var(--success-bg);
  color: var(--success);
}

.decision-final-icon.icon-danger {
  background: var(--danger-bg);
  color: var(--danger);
}

.decision-final-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.decision-final-reason {
  max-width: 500px;
  margin: 1rem auto 0;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: 8px;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  text-align: left;
}

/* ============================================================
   Forms
   ============================================================ */

.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.375rem;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  color: var(--text-primary);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-alpha);
}

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

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

.form-actions {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* ============================================================
   Modal
   ============================================================ */

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal.open {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-primary);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  transition: transform 0.2s ease;
}

.modal.open .modal-content {
  transform: scale(1);
}

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

.modal-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 6px;
  transition: background var(--transition), color var(--transition);
}

.modal-close:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.modal-body {
  padding: 1.25rem;
}

.modal-intro {
  margin-bottom: 1rem;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-color);
}

/* ============================================================
   Utilities
   ============================================================ */

.mobile-only {
  display: none;
}
