/**
 * 2025 Fintech Elite - Orange & White Theme
 * High-end, professional, and minimalist design for payment systems.
 */

:root {
  /* --- Brand Colors (Fintech Orange) --- */
  --brand-primary: #FF6B00;
  --brand-primary-hover: #E65F00;
  --brand-primary-light: #FFF0E6;
  --brand-secondary: #1A1A1A;
  
  /* --- Neutrals (Clean White System) --- */
  --bg-pure: #FFFFFF;
  --bg-soft: #FAFAFA;
  --bg-element: #F4F4F4;
  
  /* --- Text Colors --- */
  --text-main: #1A1A1A;
  --text-secondary: #666666;
  --text-muted: #999999;
  --text-on-primary: #FFFFFF;

  /* --- Semantic Colors --- */
  --color-success: #00C853;
  --color-error: #FF3D00;
  --color-warning: #FFAB00;
  --color-info: #2979FF;

  /* --- Elevation & Depth --- */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.08);
  
  /* --- Borders & Radius --- */
  --border-light: 1px solid #EEEEEE;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  /* --- Spacing --- */
  --unit: 8px;
}

/* Base Overrides */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; outline: none; }

body {
  margin: 0;
  font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-soft);
  color: var(--text-main);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 { font-weight: 800; margin-top: 0; color: var(--text-main); letter-spacing: -0.03em; }

/* --- Layout Structure --- */
.app-container { display: flex; min-height: 100vh; }

.sidebar {
  width: 260px;
  background: var(--bg-pure);
  border-right: var(--border-light);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 50;
  padding: calc(var(--unit) * 3);
}

.sidebar-header {
  padding: var(--unit) var(--unit) calc(var(--unit) * 4);
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 52px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item:hover {
  background-color: var(--brand-primary-light);
  color: var(--brand-primary);
}

.nav-item.active {
  background-color: var(--brand-primary);
  color: var(--text-on-primary);
  box-shadow: 0 4px 12px rgba(255, 107, 0, 0.2);
}

.main-content {
  flex: 1;
  background-color: var(--bg-soft);
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 72px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 calc(var(--unit) * 4);
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: var(--border-light);
}

/* --- Components --- */

/* Fintech Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.btn.primary {
  background-color: var(--brand-primary);
  color: var(--text-on-primary);
  box-shadow: 0 4px 12px rgba(255, 107, 0, 0.15);
}
.btn.primary:hover {
  background-color: var(--brand-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(255, 107, 0, 0.25);
}

.btn.outline {
  background-color: var(--bg-pure);
  border: 1px solid #E0E0E0;
  color: var(--text-main);
}
.btn.outline:hover { background-color: var(--bg-soft); border-color: var(--brand-primary); color: var(--brand-primary); }

.btn.danger {
  background-color: #FFF5F5;
  color: var(--color-error);
}
.btn.danger:hover { background-color: var(--color-error); color: #fff; }

/* Cards - Floating Glass Effect */
.card {
  background: var(--bg-pure);
  border-radius: var(--radius-lg);
  padding: calc(var(--unit) * 4);
  border: var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { box-shadow: var(--shadow-md); }

/* Forms - Modern Floating Labels (simplified) */
.field { margin-bottom: 24px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 8px;
  padding-left: 4px;
}

input, select, textarea {
  width: 100%;
  height: 56px;
  padding: 0 16px;
  font-size: 15px;
  border-radius: var(--radius-md);
  border: 1px solid #E0E0E0;
  background: var(--bg-pure);
  color: var(--text-main);
  transition: all 0.2s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 4px var(--brand-primary-light);
}

/* Tables - Clean & High Contrast */
.table-container {
  background: var(--bg-pure);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: var(--border-light);
}

table { width: 100%; border-collapse: collapse; }
th {
  text-align: left;
  background: var(--bg-soft);
  padding: 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
td {
  padding: 20px 16px;
  font-size: 14px;
  color: var(--text-main);
  border-bottom: var(--border-light);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background-color: #FAFAFA; }

/* Dashboard Widgets */
.grid-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  padding: 32px;
  border-radius: var(--radius-lg);
  background: var(--bg-pure);
  border: var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stat-card .label { font-size: 14px; font-weight: 600; color: var(--text-secondary); }
.stat-card .value { font-size: 32px; font-weight: 800; color: var(--brand-primary); letter-spacing: -0.03em; }

/* Utilities */
.badge {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}
.badge.success { background: #E6FFF0; color: var(--color-success); }
.badge.error { background: #FFF5F5; color: var(--color-error); }
.badge.info { background: #E6F0FF; color: var(--color-info); }

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeInUp 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }

/* Toast */
.toast-wrap { position: fixed; top: 24px; right: 24px; z-index: 100; display: flex; flex-direction: column; gap: 12px; }
.toast {
  background: var(--brand-secondary);
  color: #fff;
  padding: 16px 24px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 12px;
  min-width: 320px;
}

/* Landing Page Specific */
.hero { padding: 160px 0 100px; text-align: center; }
.hero-title { font-size: 72px; font-weight: 800; line-height: 1.1; margin-bottom: 24px; }
.hero-sub { font-size: 20px; color: var(--text-secondary); max-width: 720px; margin: 0 auto 40px; }
.brand-dot { width: 12px; height: 12px; background: var(--brand-primary); border-radius: 50%; display: inline-block; }
