/* Saventh Investor - End-to-End Flow */
:root {
  --bg: #0a1628;
  --bg-card: #122038;
  --border: #2a4a6e;
  --text: #fff;
  --text-muted: #8ba3c7;
  --primary: #14b8a6;
  --primary-hover: #0d9488;
  --orange: #f59e0b;
  --radius: 12px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
}

#app { position: relative; min-height: 100vh; }
.screen {
  display: none;
  min-height: 100vh;
  padding: 1.5rem;
  animation: fadeIn 0.2s ease;
}
.screen.active { display: block; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.screen-inner {
  max-width: 420px;
  margin: 0 auto;
}
.screen-inner.full { max-width: 480px; }

.brand {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--primary);
}
.brand-sm { font-size: 1.1rem; }

h1 { font-size: 1.5rem; margin-bottom: 0.5rem; }
h1 small { font-size: 0.85rem; color: var(--text-muted); font-weight: 400; }
h2 { font-size: 1.1rem; margin-bottom: 0.75rem; }
h3 { font-size: 1rem; }
.sub { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.5rem; }
.small { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.5rem; }

.form-group {
  margin-bottom: 1rem;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}
.form-group input,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 1rem;
}
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
}
.form-group.otp-box {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.form-group.otp-box input {
  flex: 1;
  text-align: center;
  font-size: 1.5rem;
}

.check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem 0;
  cursor: pointer;
  font-size: 0.9rem;
}

.btn {
  display: block;
  width: 100%;
  padding: 0.9rem 1.5rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  margin-top: 0.75rem;
  transition: background 0.2s;
}
.btn.primary {
  background: var(--primary);
  color: #000;
}
.btn.primary:hover { background: var(--primary-hover); color: #fff; }
.btn.outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn.outline:hover { background: rgba(20, 184, 166, 0.15); }
.btn.text { background: transparent; color: var(--primary); width: auto; }
.btn.text:hover { text-decoration: underline; }

.back {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  margin-bottom: 1rem;
}
.back:hover { color: var(--primary); }

.progress-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 1rem;
}
.progress-bar span {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
}
.progress-bar span.done { background: var(--primary); }
.progress-bar span.current { background: var(--primary); }

.progress { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1rem; }

.step-list { margin: 1rem 0; }
.step-item {
  display: flex;
  justify-content: space-between;
  padding: 0.9rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  cursor: pointer;
}
.step-item:hover { border-color: var(--primary); }
.step-item em { color: var(--text-muted); font-size: 0.85rem; }
.step-item.done em { color: var(--primary); }

.card-preview, .nominee-card, .bank-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 1rem 0;
}
.nominee-card h4 { margin-bottom: 0.75rem; }

.cert { font-size: 0.9rem; margin-bottom: 1rem; color: var(--text-muted); }
#signCanvas {
  border: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  cursor: crosshair;
  display: block;
  margin: 0.5rem 0;
}

.status-box {
  background: rgba(20, 184, 166, 0.15);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 1rem 0;
}
.status-box.success { border-color: #22c55e; background: rgba(34, 197, 94, 0.1); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin: 1rem 0; }
.card-tile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  cursor: pointer;
  transition: border-color 0.2s;
}
.card-tile:hover { border-color: var(--primary); }
.card-tile .link { font-size: 0.85rem; color: var(--primary); }
.banner {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  padding: 1rem;
  border-radius: var(--radius);
  margin: 1rem 0;
  cursor: pointer;
  text-align: center;
}

.nav-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}
.avatar.big { width: 64px; height: 64px; font-size: 1.5rem; }
.icons { font-size: 1.2rem; }

.fund-list, .order-list { margin: 1rem 0; }
.fund-item, .order-item {
  padding: 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.fund-item:hover, .order-item:hover { border-color: var(--primary); }

.plan-options { display: flex; gap: 0.75rem; margin: 1rem 0; }
.plan-opt {
  flex: 1;
  padding: 1rem;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  cursor: pointer;
}
.plan-opt:hover, .plan-opt.selected { border-color: var(--primary); background: rgba(20, 184, 166, 0.1); }

.quick-amt { display: flex; gap: 0.5rem; margin: 0.5rem 0; }
.quick-amt button {
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  cursor: pointer;
}
.quick-amt button:hover, .quick-amt button.active { border-color: var(--primary); }

.user-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  margin-bottom: 1rem;
}
.user-card .avatar { flex-shrink: 0; }
.badges {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
}
.badges span { padding: 0.25rem 0.5rem; background: var(--bg-card); border-radius: 4px; }

.menu-list { list-style: none; }
.menu-list li {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.menu-list li:hover { background: var(--bg-card); }
.menu-list li.logout { color: var(--orange); }
.section { font-weight: 600; margin: 1rem 0 0.5rem; color: var(--primary); }

.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.setting-row:hover { background: var(--bg-card); }
.report-card {
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  cursor: pointer;
}
.report-card:hover { border-color: var(--primary); }
.event-card {
  padding: 1rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.scheme-meta { font-size: 0.9rem; color: var(--text-muted); margin: 1rem 0; }
.scheme-meta p { margin: 0.25rem 0; }
.link { color: var(--primary); }
.upload-box {
  padding: 1rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
  color: var(--text-muted);
  cursor: pointer;
}
.upload-box:hover { border-color: var(--primary); }
.action-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0; }
.action-grid .btn { width: auto; margin: 0; }
.holding-item {
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  cursor: pointer;
}
.holding-item:hover { border-color: var(--primary); }
.order-actions { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.statement-preview {
  padding: 1rem;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  margin: 1rem 0;
  font-size: 0.9rem;
}

.profile-link {
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  cursor: pointer;
  color: var(--primary);
}
.profile-link:hover { border-color: var(--primary); }
.avatar.clickable { cursor: pointer; }
.avatar.clickable:hover { opacity: 0.9; }
.bank-actions { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.btn.danger, .btn.primary.danger { color: #f87171; background: rgba(248,113,113,0.15); }
.btn.primary.danger:hover { background: rgba(248,113,113,0.25); }
textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  resize: vertical;
}

.flow-map {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 100;
}
.toggle-flow {
  padding: 0.5rem 1rem;
  background: var(--primary);
  color: #000;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
}
.flow-content {
  position: absolute;
  bottom: 100%;
  right: 0;
  margin-bottom: 0.5rem;
  max-width: 400px;
  max-height: 300px;
  overflow: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}
.flow-content.hidden { display: none; }
.flow-content pre {
  font-size: 0.7rem;
  line-height: 1.4;
  color: var(--text-muted);
  white-space: pre-wrap;
}
