* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Inter', sans-serif;
  background: #f5f3f7;
  color: #1e1a20;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
:root {
  --primary-dark: #3C0148;
  --primary: #5C026F;
  --primary-light: #9F31B7;
  --primary-soft: #A655B7;
  --accent-green-dark: #4D6800;
  --accent-green: #779F00;
  --accent-green-light: #A7CF34;
  --accent-green-soft: #B2CF5D;
  --accent-yellow-dark: #6D6A00;
  --accent-yellow: #A8A300;
  --accent-yellow-light: #D3CE35;
  --accent-yellow-soft: #D3D05F;
  --bg-light: #faf9fc;
  --card-bg: #ffffff;
  --border-light: #e2dce8;
  --text-dark: #1e1a20;
  --text-muted: #5a4e63;
  --shadow: 0 8px 20px rgba(92, 2, 111, 0.08), 0 2px 6px rgba(0,0,0,0.03);
  --border-radius: 20px;
}
#landingPage { width: 100%; }
.landing-header {
  background: var(--primary-dark);
  padding: 16px 0;
  color: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.container { max-width: 1300px; margin: 0 auto; padding: 0 20px; }
.header-content { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 12px; }
.logo i {
  font-size: 2.5rem;
  color: var(--accent-yellow-light);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}
.logo h1 { font-weight: 700; font-size: 1.9rem; letter-spacing: -0.5px; color: white; }
.logo span { color: var(--accent-green-light); font-weight: 800; }
.landing-nav { display: flex; gap: 28px; align-items: center; font-weight: 500; }
.landing-nav a {
  text-decoration: none;
  color: #f0e6f5;
  transition: 0.2s;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
}
.landing-nav a:hover { color: var(--accent-green-light); border-bottom-color: var(--accent-green-light); }
.btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 60px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 8px rgba(92,2,111,0.2);
  border: 1px solid rgba(255,255,255,0.1);
}
.btn:hover { background: var(--primary-light); transform: translateY(-2px); box-shadow: 0 6px 14px rgba(92,2,111,0.3); }
.btn-outline-light {
  background: transparent;
  border: 2px solid var(--accent-green-light);
  color: var(--accent-green-light);
  box-shadow: none;
}
.btn-outline-light:hover { background: var(--accent-green-light); color: var(--primary-dark); }
.btn-accent { background: var(--accent-green); color: white; }
.btn-accent:hover { background: var(--accent-green-light); }
.btn-large { padding: 16px 32px; font-size: 1.1rem; }
.hero { background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%); color: white; padding: 80px 0; }
.hero-content { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 30px; }
.hero h2 { font-size: 2.8rem; font-weight: 700; line-height: 1.2; margin-bottom: 20px; }
.hero-subtitle { font-size: 1.2rem; opacity: 0.9; margin-bottom: 30px; }
.hero-stats { display: flex; gap: 40px; }
.hero-stats div { text-align: center; }
.hero-stats span { display: block; font-size: 2.5rem; font-weight: 700; color: var(--accent-green-light); }
.section { padding: 70px 0; }
.section-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 40px;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  gap: 15px;
}
.section-title i { color: var(--accent-green); font-size: 2rem; }
.grid-3col { display: grid; grid-template-columns: repeat(3,1fr); gap: 30px; }
.feature-card {
  background: var(--card-bg);
  padding: 35px 25px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  text-align: center;
  border: 1px solid var(--border-light);
  transition: transform 0.2s;
}
.feature-card:hover { transform: translateY(-5px); }
.feature-card i { font-size: 3rem; color: var(--primary-light); margin-bottom: 20px; }
.feature-card h3 { font-size: 1.5rem; margin-bottom: 15px; color: var(--primary-dark); }
.feature-card p { color: var(--text-muted); }
.rates-grid { display: flex; gap: 25px; flex-wrap: wrap; }
.rate-card {
  background: var(--card-bg);
  padding: 20px 35px;
  border-radius: 50px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 20px;
  font-weight: 600;
  font-size: 1.2rem;
  border: 1px solid var(--border-light);
}
.rate-card.highlight { background: var(--accent-yellow); color: var(--primary-dark); border-color: var(--accent-yellow-dark); }
.rate-value { font-weight: 700; color: var(--primary); }
.rate-note { margin-top: 20px; color: var(--text-muted); }
.trade-preview {
  background: var(--bg-light);
  padding: 40px;
  border-radius: var(--border-radius);
  text-align: center;
  border: 1px dashed var(--primary-light);
}
.trade-preview p { font-size: 1.2rem; margin-bottom: 20px; }
.contact-info {
  background: var(--card-bg);
  padding: 30px 40px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  display: inline-block;
}
.contact-info p { margin: 12px 0; font-size: 1.1rem; }
.contact-info i { width: 30px; color: var(--primary); }
.footer { margin-top: 30px; text-align: center; color: var(--text-muted); border-top: 1px solid var(--border-light); padding: 30px 0; }

/* Банк */
#bankApp { width: 100%; background: #f5f3f7; }
.header { background: var(--primary-dark); padding: 14px 0; box-shadow: 0 4px 10px rgba(0,0,0,0.1); position: sticky; top: 0; z-index: 100; }
.nav-links { display: flex; gap: 28px; font-weight: 500; }
.nav-links a { text-decoration: none; color: #e0d4e8; font-size: 1rem; transition: 0.2s; padding: 8px 0; border-bottom: 2px solid transparent; }
.nav-links a:hover, .nav-links a.active { color: white; border-bottom-color: var(--accent-green-light); }
.user-badge { display: flex; align-items: center; gap: 20px; }
.balance-preview {
  background: rgba(255,255,255,0.1);
  padding: 8px 18px;
  border-radius: 40px;
  font-weight: 600;
  font-size: 1.2rem;
  color: white;
}
.user-menu { display: flex; align-items: center; gap: 12px; }
.user-name { font-weight: 600; color: var(--accent-green-soft); }
.btn-outline { background: transparent; border: 2px solid var(--accent-yellow); color: var(--accent-yellow); box-shadow: none; }
.btn-outline:hover { background: var(--accent-yellow); color: var(--primary-dark); }
.btn-small { padding: 8px 16px; font-size: 0.9rem; }
.dashboard { margin-top: 30px; }
.grid-2col { display: grid; grid-template-columns: 1.5fr 1fr; gap: 30px; }
.card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
}
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.card-header h3 { font-weight: 600; font-size: 1.4rem; color: var(--primary-dark); }
.badge { background: var(--accent-green-soft); padding: 6px 14px; border-radius: 40px; font-size: 0.8rem; font-weight: 600; color: var(--primary-dark); }
.account-item { display: flex; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid var(--border-light); }
.account-item:last-child { border-bottom: none; }
.account-name i { margin-right: 12px; color: var(--primary); }
.account-balance { font-weight: 700; color: var(--primary-dark); }
.currency-row { display: flex; justify-content: space-between; margin-bottom: 14px; font-size: 1.1rem; }
.operation { display: flex; align-items: center; gap: 15px; padding: 14px 0; border-bottom: 1px solid var(--border-light); }
.operation:last-child { border-bottom: none; }
.operation-icon { width: 44px; height: 44px; background: var(--bg-light); border-radius: 14px; display: flex; align-items: center; justify-content: center; color: var(--primary); }
.operation-detail { flex: 1; }
.operation-amount { font-weight: 700; }
.income { color: var(--accent-green-dark); }
.expense { color: #c0392b; }
.tabs { display: flex; gap: 10px; margin-bottom: 28px; }
.tab-btn {
  background: transparent;
  border: none;
  padding: 10px 24px;
  font-weight: 600;
  border-radius: 40px;
  cursor: pointer;
  color: var(--text-muted);
  transition: 0.2s;
}
.tab-btn.active { background: var(--primary); color: white; }
.form-group { margin-bottom: 22px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; color: var(--primary-dark); }
.form-control {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--border-light);
  border-radius: 18px;
  font-size: 1rem;
  transition: 0.2s;
  background: white;
}
.form-control:focus { border-color: var(--primary-light); outline: none; box-shadow: 0 0 0 3px rgba(159,49,183,0.2); }
.trade-widget { background: var(--bg-light); padding: 24px; border-radius: 20px; }
.trade-info { margin: 20px 0; padding: 18px; background: white; border-radius: 16px; border: 1px solid var(--border-light); }
.trade-info p { margin: 8px 0; }
.chart-placeholder { background: white; padding: 20px; border-radius: 20px; text-align: center; border: 1px solid var(--border-light); }
canvas { width: 100%; height: auto; background: #fdfdfd; border-radius: 12px; }
.chart-note { margin-top: 12px; color: var(--text-muted); font-size: 0.9rem; }
.flex { display: flex; gap: 15px; }
.mt-4 { margin-top: 24px; }
.w-100 { width: 100%; }

/* История */
.history-controls { display: flex; gap: 20px; margin-bottom: 25px; flex-wrap: wrap; align-items: center; }
.filter-group { display: flex; align-items: center; gap: 10px; }
.history-table-wrapper { overflow-x: auto; }
.history-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.history-table th { text-align: left; padding: 16px 12px; background: var(--bg-light); color: var(--primary-dark); font-weight: 600; border-bottom: 2px solid var(--border-light); }
.history-table td { padding: 14px 12px; border-bottom: 1px solid var(--border-light); }
.history-table tbody tr:hover { background: var(--bg-light); }
.history-amount-income { color: var(--accent-green-dark); font-weight: 700; }
.history-amount-expense { color: #c0392b; font-weight: 700; }

/* Модалки */
.modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(60,1,72,0.6);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal-card {
  background: white;
  max-width: 450px;
  width: 90%;
  padding: 35px;
  border-radius: 32px;
  box-shadow: 0 20px 40px rgba(92,2,111,0.3);
}
.close-icon { float: right; font-size: 1.8rem; cursor: pointer; color: var(--text-muted); transition: 0.2s; }
.close-icon:hover { color: var(--primary); }
.error-message { color: #c0392b; font-size: 0.9rem; margin-top: 12px; text-align: center; }
.auth-footer { margin-top: 20px; text-align: center; color: var(--text-muted); font-size: 0.85rem; }

@media (max-width: 900px) {
  .grid-2col, .grid-3col { grid-template-columns: 1fr; }
  .header-content { flex-direction: column; gap: 15px; }
  .nav-links { flex-wrap: wrap; justify-content: center; }
  .hero-content { flex-direction: column; text-align: center; }
  .hero-stats { justify-content: center; }
  .history-controls { flex-direction: column; align-items: flex-start; }
}
