/* Westhaven Treasury - Professional Banking UI */
:root {
  --primary: #0b1f33;
  --primary-light: #132f4c;
  --accent: #0f766e;
  --accent-hover: #0d9488;
  --gold: #c9a227;
  --danger: #b91c1c;
  --success: #047857;
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow: 0 8px 30px rgba(11, 31, 51, 0.08);
  --radius: 14px;
  --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* Header */
.public-header {
  background: rgba(11, 31, 51, 0.96);
  backdrop-filter: blur(10px);
  color: white;
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.public-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: white;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), #14b8a6);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.95rem;
  color: white;
  box-shadow: 0 4px 12px rgba(15,118,110,0.35);
}

.logo span { color: var(--gold); }

.nav-links {
  display: flex;
  gap: 22px;
  align-items: center;
}

.nav-links a {
  color: rgba(255,255,255,0.82);
  font-weight: 500;
  font-size: 0.92rem;
  text-decoration: none !important;
}

.nav-links a:hover { color: white; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.92rem;
  border: none;
  cursor: pointer;
  transition: all 0.18s ease;
  text-decoration: none !important;
}

.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.28);
  color: white;
}
.btn-outline:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.55);
}

.btn-gold { background: var(--gold); color: #0b1f33; }
.btn-gold:hover { background: #b8921f; }

.btn-block { width: 100%; }
.btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none !important; }

/* Hero */
.hero {
  background:
    radial-gradient(circle at 85% 15%, rgba(15,118,110,0.25), transparent 40%),
    linear-gradient(145deg, #0b1f33 0%, #102a44 55%, #0b3b3a 100%);
  color: white;
  padding: 92px 0 100px;
  position: relative;
  overflow: hidden;
}

.hero-content { position: relative; z-index: 1; max-width: 680px; }

.hero-badge {
  display: inline-block;
  background: rgba(20,184,166,0.15);
  color: #5eead4;
  border: 1px solid rgba(94,234,212,0.25);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 22px;
  letter-spacing: 0.2px;
}

.hero h1 {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.12;
  margin-bottom: 16px;
  letter-spacing: -1.2px;
}

.hero p {
  font-size: 1.12rem;
  opacity: 0.9;
  margin-bottom: 32px;
  max-width: 540px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Sections */
.section { padding: 84px 0; }

.section-title { text-align: center; margin-bottom: 48px; }
.section-title h2 {
  font-size: 2.05rem;
  font-weight: 750;
  color: var(--primary);
  margin-bottom: 12px;
  letter-spacing: -0.6px;
}
.section-title p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 580px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(11,31,51,0.12);
}

.feature-icon {
  width: 46px;
  height: 46px;
  background: rgba(15,118,110,0.1);
  color: var(--accent);
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  margin-bottom: 14px;
}

.feature-card h3 {
  font-size: 1.08rem;
  margin-bottom: 8px;
  color: var(--primary);
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.93rem;
}

.benefits-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  max-width: 920px;
  margin: 0 auto;
}

.benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--card);
  padding: 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.benefit-item .check {
  width: 24px;
  height: 24px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Footer */
.public-footer {
  background: var(--primary);
  color: rgba(255,255,255,0.78);
  padding: 56px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}

.footer-brand h3 { color: white; font-size: 1.25rem; margin-bottom: 12px; }
.footer-brand p { font-size: 0.94rem; line-height: 1.65; }
.footer-links h4 { color: white; margin-bottom: 14px; font-size: 0.95rem; }
.footer-links a {
  display: block;
  color: rgba(255,255,255,0.7);
  margin-bottom: 8px;
  font-size: 0.9rem;
  text-decoration: none !important;
}
.footer-links a:hover { color: white; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 18px;
  text-align: center;
  font-size: 0.84rem;
}

/* Auth */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(15,118,110,0.2), transparent 35%),
    linear-gradient(160deg, #0b1f33 0%, #12304f 50%, #0f4c4a 100%);
  padding: 40px 20px;
}

.auth-card {
  background: white;
  border-radius: 18px;
  padding: 40px 36px;
  width: 100%;
  max-width: 430px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.28);
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 22px;
}

.auth-brand .logo-mark {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  font-size: 1.15rem;
  margin-bottom: 12px;
}

.auth-card h1 {
  font-size: 1.45rem;
  color: var(--primary);
  text-align: center;
  letter-spacing: -0.3px;
}

.auth-card .subtitle {
  text-align: center;
  color: var(--text-muted);
  margin: 6px 0 24px;
  font-size: 0.92rem;
}

.tabs {
  display: flex;
  background: #f1f5f9;
  border-radius: 11px;
  padding: 4px;
  margin-bottom: 22px;
}

.tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.86rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.18s;
}

.tab.active {
  background: white;
  color: var(--primary);
  box-shadow: 0 1px 5px rgba(0,0,0,0.08);
}

.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 0.94rem;
  transition: border-color 0.18s, box-shadow 0.18s;
  font-family: inherit;
  background: #fff;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15,118,110,0.14);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.forgot { text-align: right; margin-bottom: 18px; font-size: 0.88rem; }

.auth-footer {
  text-align: center;
  margin-top: 22px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.warning-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.84rem;
  margin-bottom: 20px;
  text-align: center;
  line-height: 1.45;
}

/* Dashboard */
.dash-layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 260px;
  background: var(--primary);
  color: white;
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-logo {
  font-size: 1.1rem;
  font-weight: 700;
  padding: 4px 12px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  color: rgba(255,255,255,0.72);
  font-weight: 500;
  margin-bottom: 3px;
  transition: all 0.15s;
  text-decoration: none !important;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: rgba(255,255,255,0.1);
  color: white;
}

.sidebar-nav a.active { background: var(--accent); }

.main-content {
  flex: 1;
  margin-left: 260px;
  padding: 28px;
  background: var(--bg);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 26px;
}

.topbar h1 {
  font-size: 1.55rem;
  color: var(--primary);
  letter-spacing: -0.4px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
  padding: 8px 14px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid var(--border);
}

.balance-card {
  background: linear-gradient(135deg, #0b1f33 0%, #123552 55%, #0f4f4a 100%);
  color: white;
  border-radius: 18px;
  padding: 30px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.balance-card::after {
  content: '';
  position: absolute;
  right: -50px;
  top: -50px;
  width: 220px;
  height: 220px;
  background: rgba(20,184,166,0.18);
  border-radius: 50%;
}

.balance-label {
  font-size: 0.88rem;
  opacity: 0.8;
  margin-bottom: 6px;
}

.balance-amount {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 22px;
}

.quick-actions { display: flex; gap: 10px; flex-wrap: wrap; position: relative; z-index: 1; }

.quick-btn {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.12);
  color: white;
  padding: 11px 16px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.18s;
}
.quick-btn:hover { background: rgba(255,255,255,0.22); }

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card {
  background: white;
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.stat-card .label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

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

.card {
  background: white;
  border-radius: 14px;
  padding: 22px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}

.card h2 {
  font-size: 1.08rem;
  color: var(--primary);
  margin-bottom: 14px;
}

.tx-list { list-style: none; }

.tx-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}
.tx-item:last-child { border-bottom: none; }

.tx-info h4 { font-size: 0.93rem; margin-bottom: 2px; }
.tx-info span { font-size: 0.78rem; color: var(--text-muted); }
.tx-amount { font-weight: 700; font-size: 0.95rem; }
.tx-amount.out { color: var(--danger); }
.tx-amount.in { color: var(--success); }

.send-options { display: grid; gap: 10px; }

.send-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.send-option:hover {
  border-color: var(--accent);
  background: rgba(15,118,110,0.04);
}

.send-option .icon {
  width: 40px;
  height: 40px;
  background: rgba(15,118,110,0.1);
  color: var(--accent);
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
}

/* Admin */
.admin-header {
  background: #0b1f33;
  color: white;
  padding: 16px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.admin-table th,
.admin-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.admin-table th {
  background: #f8fafc;
  font-weight: 600;
  color: var(--primary);
}
.admin-table tr:hover { background: #f8fafc; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
}
.badge-active { background: #d1fae5; color: #065f46; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal {
  background: white;
  border-radius: 16px;
  padding: 26px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0,0,0,0.25);
}

.modal h3 { margin-bottom: 18px; color: var(--primary); }
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 22px;
}

.hidden { display: none !important; }

.status-pending { color: #d97706; font-size: 0.74rem; font-weight: 700; }
.status-completed { color: #047857; font-size: 0.74rem; font-weight: 700; }
.status-rejected { color: #b91c1c; font-size: 0.74rem; font-weight: 700; }

@media (max-width: 900px) {
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 12px;
  }
  .main-content { margin-left: 0; }
  .dash-layout { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.1rem; }
  .nav-links { display: none; }
}


/* Swiss private-bank refinements */
body { background: #f0f2f5; }
.public-header { background: #0a1628; }
.hero {
  background:
    radial-gradient(circle at 90% 10%, rgba(201,162,39,0.12), transparent 40%),
    linear-gradient(150deg, #0a1628 0%, #12233a 50%, #0c2e2c 100%);
}
.balance-card {
  background: linear-gradient(135deg, #0a1628 0%, #132a45 55%, #0d3d3a 100%);
}
.sidebar { background: #0a1628; }
.card, .feature-card, .stat-card, .auth-card {
  border-radius: 12px;
  border-color: #e5e9ef;
}
.topbar h1, .section-title h2, .auth-card h1 {
  letter-spacing: -0.5px;
}
.logo-mark {
  background: linear-gradient(135deg, #0f766e, #c9a227);
}
.btn-primary { background: #0f5c56; }
.btn-primary:hover { background: #0d6b64; }

.activity-list { list-style: none; }
.activity-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.activity-list li span { color: var(--text-muted); white-space: nowrap; }

.tx-item { cursor: pointer; }
.tx-item:hover { background: #f8fafc; margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 8px; }


/* ===== Mobile & tablet optimization ===== */
@media (max-width: 900px) {
  .public-header .container { flex-wrap: wrap; gap: 10px; }
  .nav-links { display: none; }
  .hero { padding: 56px 0 64px; }
  .hero h1 { font-size: 1.85rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .features-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .form-row { grid-template-columns: 1fr; }

  .dash-layout { flex-direction: column; }
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 12px;
    gap: 4px;
  }
  .sidebar-logo {
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 8px;
    padding-bottom: 10px;
  }
  .sidebar-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    width: 100%;
  }
  .sidebar-nav a {
    flex: 1 1 auto;
    min-width: 42%;
    justify-content: center;
    padding: 10px 8px;
    font-size: 0.82rem;
    margin-bottom: 0;
  }
  .main-content {
    margin-left: 0;
    padding: 16px;
  }
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .balance-amount { font-size: 1.85rem; }
  .quick-actions { gap: 8px; }
  .quick-btn { flex: 1 1 40%; justify-content: center; font-size: 0.82rem; padding: 10px 12px; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .admin-header {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
    padding: 14px 16px;
  }
  .admin-table { display: block; overflow-x: auto; white-space: nowrap; }
  .modal { max-width: 100%; margin: 0 8px; padding: 18px; }
  .auth-page { padding: 24px 12px; }
  .auth-card { padding: 28px 20px; }
}

@media (max-width: 480px) {
  .stats-row { grid-template-columns: 1fr; }
  .sidebar-nav a { min-width: 46%; font-size: 0.78rem; }
  .balance-amount { font-size: 1.6rem; }
  .quick-btn { min-width: 100%; }
  .admin-table th, .admin-table td { padding: 10px 8px; font-size: 0.8rem; }
}
