﻿@import url("https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700;800&family=Manrope:wght@400;500;600;700&display=swap");

:root {
  --bg: #f4f8f6;
  --surface: #ffffff;
  --surface-soft: #f8fbfa;
  --text: #1f2a27;
  --muted: #5f6f69;
  --primary: #0f7a5f;
  --primary-strong: #0b5d49;
  --accent: #f59d2a;
  --danger: #c13f2f;
  --radius: 16px;
  --shadow: 0 14px 40px rgba(14, 70, 58, 0.12);
  --shadow-soft: 0 8px 20px rgba(20, 45, 39, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(15, 122, 95, 0.12), transparent 32%),
    radial-gradient(circle at 88% 2%, rgba(245, 157, 42, 0.11), transparent 26%),
    var(--bg);
  line-height: 1.5;
}

h1,
h2,
h3,
h4,
.page-title,
.brand-name {
  font-family: "Sora", "Segoe UI", sans-serif;
  letter-spacing: -0.02em;
  margin: 0;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-strong);
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
}

.login-container {
  width: min(96vw, 1024px);
  display: grid;
  gap: 18px;
}

.login-card {
  width: min(96vw, 480px);
  margin: 0 auto;
  padding: 30px 24px;
  background: linear-gradient(160deg, #ffffff 0%, #f7fcfa 100%);
  border: 1px solid #e2ece8;
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  animation: fadeUp 0.45s ease;
}

.logo-area {
  text-align: center;
  margin-bottom: 18px;
}

.brand-name {
  margin-top: 8px;
  font-size: 1.9rem;
}

.brand-tagline {
  color: var(--primary-strong);
  margin: 6px 0 0;
  font-weight: 700;
}

.brand-sub,
.step-desc,
.terms-text,
.page-sub,
.page-desc,
.loading-text,
.empty-msg {
  color: var(--muted);
}

.form-step {
  display: grid;
  gap: 10px;
}

.form-field,
.quiz-q {
  display: grid;
  gap: 7px;
  margin-bottom: 8px;
}

label {
  font-size: 0.9rem;
  font-weight: 700;
  color: #2f3f39;
}

input,
select,
textarea,
.otp-input {
  width: 100%;
  min-height: 44px;
  border: 1px solid #d4e0db;
  border-radius: 12px;
  padding: 11px 13px;
  font: inherit;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #5cb39b;
  box-shadow: 0 0 0 4px rgba(15, 122, 95, 0.12);
}

.input-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.prefix {
  background: #eaf3ef;
  border: 1px solid #d6e3dd;
  color: #2e4f45;
  min-height: 44px;
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 700;
}

.btn-primary,
.btn-secondary,
.btn-ai,
.btn-logout,
.ask-ai-btn,
.quiz-opt,
button {
  border: 0;
  border-radius: 12px;
  padding: 11px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.btn-primary,
.ask-ai-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, #189773 100%);
  box-shadow: 0 12px 24px rgba(15, 122, 95, 0.22);
}

.btn-primary:hover,
.ask-ai-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(15, 122, 95, 0.28);
}

.btn-secondary,
.btn-ai,
.btn-logout,
.btn-link,
.quiz-opt {
  background: #e9f4f0;
  color: #245044;
}

.btn-link {
  border: 0;
  padding: 6px 2px;
  text-align: left;
  background: transparent;
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
}

.quiz-options {
  display: grid;
  gap: 8px;
}

.quiz-opt {
  text-align: left;
}

.quiz-opt.selected {
  color: #fff;
  background: linear-gradient(135deg, #0e8b6b, #0d6b53);
}

.hidden {
  display: none !important;
}

.auth-message {
  margin-top: 8px;
  font-weight: 700;
}

.auth-message.success {
  color: #11684f;
}

.auth-message.error {
  color: var(--danger);
}

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(19, 27, 24, 0.45);
  display: grid;
  place-items: center;
  z-index: 999;
}

.loading-overlay p {
  color: #fff;
  font-weight: 700;
}

.spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  margin: 0 auto 10px;
  animation: spin 0.85s linear infinite;
}

.login-footer,
.sebi-disclaimer {
  text-align: center;
  font-size: 0.9rem;
  color: #566861;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: space-between;
  padding: 13px 18px;
  background: linear-gradient(115deg, #0d4f41, #0f7a5f 70%, #1f9c7c);
  color: #fff;
  box-shadow: 0 12px 24px rgba(8, 38, 32, 0.22);
}

.nav-brand {
  font-family: "Sora", "Segoe UI", sans-serif;
  font-weight: 800;
  white-space: nowrap;
}

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

.nav-links a {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
  padding: 7px 10px;
  border-radius: 999px;
}

.nav-links a.active,
.nav-links a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-main {
  width: min(1180px, 95vw);
  margin: 24px auto 60px;
  display: grid;
  gap: 18px;
}

.dashboard-header,
.goals-header,
.section-header,
.allocation-bar-label,
.pool-row,
.stats-grid,
.charts-row,
.chat-input-row,
.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.card,
.section-card,
.chart-card,
.stat-card,
.modal-content,
.pool-total-card,
.invest-form,
.kyc-banner,
.ai-tip-banner,
.disclaimer-box,
.allocation-bar-container {
  background: var(--surface);
  border: 1px solid #e1ebe7;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.card,
.section-card,
.chart-card,
.invest-form,
.allocation-bar-container,
.pool-total-card,
.disclaimer-box {
  padding: 18px;
}

.kyc-banner,
.ai-tip-banner {
  width: min(1180px, 95vw);
  margin: 14px auto 0;
  padding: 10px 14px;
}

.ai-tip-banner {
  border-left: 4px solid var(--accent);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stat-card {
  padding: 16px;
}

.stat-card.primary {
  background: linear-gradient(140deg, #0f7a5f, #0c5f4a);
  color: #fff;
}

.stat-label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.85;
}

.stat-value {
  font: 800 1.7rem/1.15 "Sora", sans-serif;
  margin: 6px 0;
}

.stat-change {
  font-size: 0.92rem;
  opacity: 0.9;
}

.charts-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.chart-card.wide {
  grid-column: 1 / -1;
}

.table-wrapper {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #e9efed;
  text-align: left;
}

.data-table th {
  color: #486259;
  font-size: 0.84rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.allocation-bar {
  width: 100%;
  height: 10px;
  background: #e6f0ec;
  border-radius: 999px;
  overflow: hidden;
}

.allocation-fill {
  height: 100%;
  background: linear-gradient(90deg, #0f7a5f, #f59d2a);
}

.goals-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.warning-text,
.error-msg {
  color: var(--danger);
  font-weight: 700;
}

.alert {
  margin-top: 10px;
  padding: 10px;
  border-radius: 10px;
  background: #fff1ef;
  border: 1px solid #f3ccc6;
}

.chatbot-fab {
  position: fixed;
  right: 18px;
  bottom: 20px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #f59d2a, #da7b00);
  box-shadow: 0 16px 28px rgba(218, 123, 0, 0.35);
  z-index: 50;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(18, 27, 25, 0.42);
  display: grid;
  place-items: center;
  padding: 12px;
  z-index: 60;
}

.modal-content {
  width: min(720px, 94vw);
  max-height: 88vh;
  overflow: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-close {
  background: #f2f7f5;
  color: #35554a;
}

.chat-messages {
  display: grid;
  gap: 10px;
  margin: 14px 0;
  max-height: 340px;
  overflow: auto;
}

.chat-msg {
  padding: 10px 12px;
  border-radius: 10px;
  background: #edf6f2;
}

.chat-msg.ai {
  border-left: 3px solid var(--primary);
}

@media (max-width: 980px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .charts-row,
  .goals-grid {
    grid-template-columns: 1fr;
  }

  .navbar {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-right {
    justify-content: space-between;
  }
}

@media (max-width: 640px) {
  .login-card,
  .card,
  .section-card,
  .chart-card,
  .invest-form,
  .modal-content {
    padding: 14px;
    border-radius: 12px;
  }

  .page-title {
    font-size: 1.35rem;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.demo-login-card {
  max-width: 540px;
}

.ff-logo {
  width: min(100%, 340px);
  height: auto;
  display: block;
  margin: 0 auto 8px;
}

.ff-logo-text {
  fill: #0a4d3c;
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.demo-creds {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #eef7f3;
  border: 1px solid #d4e7df;
  color: #21483d;
  font-size: 0.92rem;
}

.demo-creds p {
  margin: 4px 0;
}

.demo-creds code {
  background: #dfeee8;
  padding: 2px 6px;
  border-radius: 6px;
  color: #15382f;
}

.official-login-page {
  background:
    radial-gradient(circle at 20% 6%, rgba(15, 122, 95, 0.10), transparent 35%),
    radial-gradient(circle at 82% 8%, rgba(245, 157, 42, 0.11), transparent 32%),
    #f4f7f6;
}

.official-login-card {
  width: min(96vw, 560px);
  padding-top: 22px;
}

.official-logo-area {
  margin-bottom: 16px;
}

.official-logo-img {
  display: block;
  width: min(100%, 430px);
  height: auto;
  margin: 0 auto;
}
