/* ==========================================================================
   RW Finance - Windsurf-Inspired Design System
   ========================================================================== */

/* CSS Variables - Design Tokens */
:root {
  /* Primary Colors */
  --primary: #2DD4BF;
  --primary-dark: #14B8A6;
  --primary-light: #5EEAD4;
  
  /* Background Colors */
  --bg-cream: #f6f0d9;
  --bg-white: #f6f0d9;
  --bg-dark: #0F172A;
  --bg-announcement: #0D9488;
  
  /* Text Colors */
  --text-dark: #1A1A1A;
  --text-body: #374151;
  --text-muted: #6B7280;
  --text-light: #9CA3AF;
  
  /* Border & Dividers */
  --border: #E5E7EB;
  --border-light: #F3F4F6;
  --divider: #D1D5DB;
  
  /* Semantic Colors */
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --info: #3B82F6;
  
  /* Gradients */
  --gradient-hero: linear-gradient(135deg, #FF6B9D 0%, #FFE066 50%, #A7F3D0 100%);
  --gradient-accent: linear-gradient(135deg, #2DD4BF 0%, #3B82F6 100%);
  
  /* Shadows */
  --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);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  
  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
  
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  color: var(--text-body);
  background: var(--bg-cream);
  line-height: 1.6;
  min-height: 100vh;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  color: var(--text-dark);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: 3.5rem; font-weight: 700; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p {
  color: var(--text-body);
  margin-bottom: var(--space-md);
}

a {
  color: var(--primary-dark);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 12px 24px;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: var(--font-sans);
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--bg-white);
  color: var(--text-dark);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-cream);
  border-color: var(--divider);
}

.btn-outline {
  background: transparent;
  color: var(--text-dark);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: var(--bg-white);
  border-color: var(--primary);
  color: var(--primary-dark);
}

.btn-dark {
  background: var(--bg-dark);
  color: white;
}

.btn-dark:hover {
  background: #1E293B;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1rem;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-md);
}

/* ==========================================================================
   Form Elements
   ========================================================================== */

.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: var(--space-sm);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 14px 16px;
  font-size: 0.9375rem;
  font-family: var(--font-sans);
  color: var(--text-dark);
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.form-input::placeholder {
  color: var(--text-light);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.1);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

.form-error {
  font-size: 0.8125rem;
  color: var(--danger);
  margin-top: var(--space-xs);
}

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  overflow: hidden;
  transition: all var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-body {
  padding: var(--space-lg);
}

.card-header {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border-light);
}

.card-footer {
  padding: var(--space-lg);
  border-top: 1px solid var(--border-light);
  background: var(--bg-cream);
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.navbar {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
  padding: 0 var(--space-xl);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-dark);
}

.navbar-brand svg,
.navbar-brand img {
  width: 32px;
  height: 32px;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  list-style: none;
}

.nav-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-body);
  padding: var(--space-sm) 0;
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.nav-link:hover {
  color: var(--text-dark);
}

.nav-link.active {
  color: var(--primary-dark);
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-light);
  min-width: 240px;
  padding: var(--space-sm);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-item {
  display: block;
  padding: var(--space-md);
  border-radius: var(--radius-md);
  color: var(--text-body);
  transition: background var(--transition-fast);
}

.dropdown-item:hover {
  background: var(--bg-cream);
  color: var(--text-dark);
}

.dropdown-item-title {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: var(--space-xs);
}

.dropdown-item-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Announcement Bar
   ========================================================================== */

.announcement-bar {
  background: var(--bg-announcement);
  color: white;
  text-align: center;
  padding: var(--space-sm) var(--space-md);
  font-size: 0.875rem;
}

.announcement-bar a {
  color: white;
  font-weight: 600;
  text-decoration: underline;
  margin-left: var(--space-sm);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
  padding: var(--space-3xl) var(--space-xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: var(--space-lg);
  letter-spacing: -0.03em;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto var(--space-xl);
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

.hero-gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 300px;
  background: var(--gradient-hero);
  filter: blur(60px);
  opacity: 0.6;
}

/* ==========================================================================
   Stats Section
   ========================================================================== */

.stats-section {
  display: flex;
  justify-content: center;
  gap: var(--space-3xl);
  padding: var(--space-2xl) var(--space-xl);
  background: var(--bg-white);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-dark);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

/* ==========================================================================
   Features Grid
   ========================================================================== */

.features-section {
  padding: var(--space-3xl) var(--space-xl);
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto var(--space-2xl);
}

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary-dark);
  margin-bottom: var(--space-sm);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
  max-width: 1200px;
  margin: 0 auto;
}

.feature-card {
  padding: var(--space-xl);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  margin-bottom: var(--space-md);
}

.feature-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.feature-desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* ==========================================================================
   Auth Pages - Diagonal Pattern Background
   ========================================================================== */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-cream);
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 50 L100 0' stroke='%232DD4BF' stroke-width='0.5' stroke-dasharray='8,8' fill='none' opacity='0.3'/%3E%3Cpath d='M0 100 L100 50' stroke='%232DD4BF' stroke-width='0.5' stroke-dasharray='8,8' fill='none' opacity='0.3'/%3E%3Cpath d='M50 100 L100 75' stroke='%232DD4BF' stroke-width='0.5' stroke-dasharray='8,8' fill='none' opacity='0.3'/%3E%3C/svg%3E");
  padding: var(--space-xl);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: var(--space-2xl);
}

.auth-logo {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.auth-logo svg {
  width: 48px;
  height: 48px;
}

.auth-title {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: var(--space-xl);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: var(--space-lg) 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.social-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 12px 16px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-dark);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-social:hover {
  background: var(--bg-cream);
  border-color: var(--divider);
}

.btn-social svg {
  width: 20px;
  height: 20px;
}

.auth-footer {
  text-align: center;
  margin-top: var(--space-lg);
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.auth-footer a {
  color: var(--primary-dark);
  font-weight: 500;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  background: var(--bg-dark);
  color: white;
  padding: var(--space-3xl) var(--space-xl) var(--space-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: var(--space-2xl);
  max-width: 1200px;
  margin: 0 auto var(--space-2xl);
}

.footer-brand p {
  color: var(--text-light);
  margin-top: var(--space-md);
  max-width: 300px;
}

.footer-links h4 {
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--space-sm);
}

.footer-links a {
  color: var(--text-light);
  font-size: 0.875rem;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-xl);
  text-align: center;
  color: var(--text-light);
  font-size: 0.875rem;
}

/* ==========================================================================
   Dashboard Sidebar
   ========================================================================== */

.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background: var(--bg-white);
  border-right: 1px solid var(--border-light);
  padding: var(--space-lg);
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: var(--space-xl);
  padding: var(--space-sm) 0;
}

.sidebar-nav {
  list-style: none;
}

.sidebar-section {
  margin-bottom: var(--space-lg);
}

.sidebar-section-title {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
  padding: 0 var(--space-sm);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  color: var(--text-body);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  margin-bottom: 2px;
}

.sidebar-link:hover {
  background: var(--bg-cream);
  color: var(--text-dark);
}

.sidebar-link.active {
  background: rgba(45, 212, 191, 0.1);
  color: var(--primary-dark);
}

.sidebar-link svg {
  width: 20px;
  height: 20px;
  opacity: 0.7;
}

.sidebar-badge {
  margin-left: auto;
  background: var(--primary);
  color: white;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.main-content {
  flex: 1;
  margin-left: 260px;
  padding: var(--space-xl);
  background: var(--bg-cream);
}

/* ==========================================================================
   Dashboard Header
   ========================================================================== */

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xl);
}

.page-title {
  font-size: 1.5rem;
  font-weight: 600;
}

.page-subtitle {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ==========================================================================
   Dashboard Stats Grid
   ========================================================================== */

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.stat-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  border: 1px solid var(--border-light);
}

.stat-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(45, 212, 191, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-bottom: var(--space-md);
}

.stat-card-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-dark);
}

.stat-card-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

.stat-card-change {
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: var(--space-sm);
}

.stat-card-change.positive {
  color: var(--success);
}

.stat-card-change.negative {
  color: var(--danger);
}

/* ==========================================================================
   Dashboard Cards Grid
   ========================================================================== */

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.dashboard-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  border: 1px solid var(--border-light);
  transition: all var(--transition-base);
}

.dashboard-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.dashboard-card-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.dashboard-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.dashboard-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
}

.dashboard-card-subtitle {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.dashboard-card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.dashboard-card-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.metric-box {
  background: var(--bg-cream);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
}

.metric-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.metric-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-dark);
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--primary); }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.hidden { display: none !important; }
.visible { display: block !important; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1200px) {
  .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-stats { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .sidebar { display: none; }
  .main-content { margin-left: 0; }
  .navbar-nav { display: none; }
  .hero h1 { font-size: 2.5rem; }
  .stats-section { flex-direction: column; gap: var(--space-lg); }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-stats { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .auth-card { padding: var(--space-lg); }
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.animate-fade-in {
  animation: fadeIn 0.3s ease forwards;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */

.toast {
  position: fixed;
  top: var(--space-lg);
  right: var(--space-lg);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.9375rem;
  z-index: 1000;
  animation: slideIn 0.3s ease;
  box-shadow: var(--shadow-lg);
}

.toast.success {
  background: var(--success);
  color: white;
}

.toast.error {
  background: var(--danger);
  color: white;
}

.toast.info {
  background: var(--info);
  color: white;
}

/* ==========================================================================
   Modal
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  padding: var(--space-lg);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow: auto;
  transform: scale(0.95);
  transition: transform var(--transition-base);
}

.modal-overlay.active .modal {
  transform: scale(1);
}

.modal-header {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.125rem;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text-dark);
}

.modal-body {
  padding: var(--space-lg);
}

.modal-footer {
  padding: var(--space-lg);
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-sm);
}
