:root {
  --bg: #020617;
  --bg-soft: #02091a;
  --bg-card: #020819;
  --border: #1f2937;
  --accent: #38bdf8;
  --accent-strong: #0ea5e9;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --danger: #f97373;
  --success: #4ade80;
  --radius: 0.9rem;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.7);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, #1d263f 0, transparent 50%),
    radial-gradient(circle at top right, #111827 0, transparent 55%),
    #020617;
  color: var(--text);
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* NAVBAR */

.navbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.6rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-mark {
  width: 26px;
  height: 26px;
  border-radius: 0.8rem;
  background: conic-gradient(
    from 150deg,
    #38bdf8,
    #22c55e,
    #a855f7,
    #38bdf8
  );
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.7);
}

.logo-text {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nav-cta {
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* LAYOUT */

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.6rem 1.25rem 2.5rem;
  width: 100%;
}

.home-wrapper {
  width: 100%;
}

/* HERO */

.hero-banner {
  padding: 2.5rem 1.6rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #3b82f6, #0f172a);
  color: #ffffff;
  border-radius: 1.3rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.hero-content {
  max-width: 470px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  margin-bottom: 0.6rem;
}

.hero-title {
  font-size: 2.4rem;
  margin-bottom: 0.6rem;
  font-weight: 700;
}

.hero-subtitle {
  font-size: 0.98rem;
  margin-bottom: 1.3rem;
  color: #e5e7eb;
}

.hero-buttons {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.hero-phone-images {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  max-width: 420px;
}

.hero-illustration-inner {
  border-radius: 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  overflow: hidden;
  background: #020617;
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.75);
}

.hero-illustration-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.9);
  background: linear-gradient(135deg, #020617, #0f172a);
  font-size: 0.78rem;
  color: var(--muted);
}

.hero-illustration-title {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.hero-illustration-inner img {
  display: block;
  width: 100%;
  height: 170px;
  object-fit: cover;
}

.hero-phones {
  display: flex;
  gap: 0.6rem;
}

.hero-phones img {
  width: 150px;
  border-radius: 1rem;
}

/* ICONS */

.hero-icon {
  width: 18px;
  height: 18px;
  border-radius: 0.6rem;
  border: 1px solid rgba(148, 163, 184, 0.5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hero-icon::before,
.hero-icon::after {
  content: "";
  position: absolute;
}

.hero-icon-lock::before {
  width: 8px;
  height: 7px;
  border-radius: 4px;
  border: 1px solid rgba(148, 163, 184, 0.9);
  bottom: 3px;
}

.hero-icon-lock::after {
  width: 6px;
  height: 5px;
  border-radius: 6px 6px 3px 3px;
  border: 1px solid rgba(148, 163, 184, 0.9);
  border-bottom: none;
  top: 2px;
}

/* SECTION TITLES */

.section-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* SERVICES / LIGHT SECTIONS */

.services-section {
  margin-top: 1.5rem;
}

.service-card {
  display: flex;
  gap: 1rem;
  background: #f4f4f8;
  padding: 1rem;
  border-radius: 1rem;
  margin-top: 1rem;
  align-items: center;
  color: #111827;
}

.service-card h3 {
  color: #111827;
}

.service-card p {
  color: #4b5563;
}

.service-card img {
  width: 150px;
  border-radius: 0.7rem;
  object-fit: cover;
}

/* PREMIUM PROTECTION */

.premium-protection {
  margin-top: 3rem;
}

.protection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.protection-card {
  padding: 1rem;
  background: #eef1ff;
  border-radius: 1rem;
  color: #111827;
}

.protection-card h3 {
  color: #111827;
}

.protection-card p {
  color: #4b5563;
}

/* WHY CHOOSE (dark band) */

.why-choose {
  margin-top: 3rem;
  background: #1f2937;
  padding: 2rem 1.4rem;
  color: #f9fafb;
  border-radius: 1rem;
}

.why-choose h2 {
  margin-top: 0;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.why-grid h3 {
  color: #e5e7eb;
}

.why-grid p {
  color: #d1d5db;
}

/* DIGITAL FEATURES */

.digital-features {
  margin-top: 3rem;
}

.digital-features .feature-card {
  background: #f5f7fb;
  padding: 1rem;
  border-radius: 1rem;
  margin-top: 1rem;
  color: #111827;
}

.digital-features .feature-card h3 {
  color: #111827;
}

.digital-features .feature-card p {
  color: #4b5563;
}

/* TESTIMONIALS */

.testimonials {
  margin-top: 3rem;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.testi-card {
  background: #ffffff;
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
  color: #111827;
}

/* GENERIC CARDS & TABLES */

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.3rem 1.4rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.2rem;
}

.auth-card {
  max-width: 420px;
  margin: 2rem auto;
}

.grid-two {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 1rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin-top: 0.6rem;
}

.data-table th,
.data-table td {
  padding: 0.4rem 0.55rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.data-table th {
  color: var(--muted);
  font-weight: 500;
}

.amount-pos {
  color: var(--success);
}

.amount-neg {
  color: var(--danger);
}

/* APP LAYOUT WITH SIDEBAR */

.app-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 1.2rem;
}

.app-sidebar {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1rem;
  box-shadow: var(--shadow);
  height: fit-content;
}

.sidebar-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.sidebar-link {
  width: 100%;
  text-align: left;
  margin-top: 0.4rem;
  padding: 0.45rem 0.7rem;
  border-radius: 0.6rem;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-link:hover {
  background: #020617;
  color: var(--text);
}

.sidebar-link.active {
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent);
}

/* DASHBOARD EXTRAS */

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.dashboard-filters {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.8rem;
}

.dashboard-filters select {
  font-size: 0.78rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #020617;
  color: var(--text);
}

/* SPENDING BARS */

.spending-bars {
  margin-top: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.8rem;
}

.spending-bar-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.spending-bar-label {
  flex: 0 0 80px;
  color: var(--muted);
}

.spending-bar-track {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: #020617;
  border: 1px solid var(--border);
  overflow: hidden;
}

.spending-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
}

/* CARD MANAGEMENT */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.card-tile {
  background: linear-gradient(145deg, #020617, #02081c);
  border-radius: 1rem;
  border: 1px solid var(--border);
  padding: 1rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  font-size: 0.85rem;
}

.card-tile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-tile-label {
  font-weight: 600;
}

.card-tile-status {
  font-size: 0.75rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.card-tile-status.active {
  border-color: var(--success);
  color: var(--success);
}

.card-tile-status.frozen {
  border-color: var(--danger);
  color: var(--danger);
}

.card-tile-body {
  margin-top: 0.6rem;
  color: var(--muted);
}

.card-tile-footer {
  margin-top: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

/* NOTIFICATIONS */

.notification-unread {
  font-weight: 600;
}

/* FORMS */

.form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.form label {
  font-size: 0.85rem;
}

.form input,
.form select {
  margin-top: 0.25rem;
  width: 100%;
  padding: 0.55rem 0.7rem;
  border-radius: 0.6rem;
  border: 1px solid var(--border);
  background: #020617;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease,
    background 0.15s ease;
}

.form input:focus,
.form select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.3);
  background: #02081b;
}

.form-help {
  font-size: 0.8rem;
  color: var(--muted);
}

.error {
  color: var(--danger);
  font-size: 0.8rem;
}

.success {
  color: var(--success);
  font-size: 0.8rem;
}

/* BUTTONS */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease,
    filter 0.12s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #020617;
  box-shadow: 0 10px 25px rgba(56, 189, 248, 0.35);
}

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.link-btn {
  background: none;
  border: none;
  color: var(--accent);
  padding: 0;
  cursor: pointer;
  font-size: 0.85rem;
}

/* VIEWS */

.view {
  display: none;
}

.view.active {
  display: block;
}

/* FOOTER */

.footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
  padding: 1rem 1.25rem;
}

/* SIGNIN LOADING */

.signin-loading {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0.6rem 0;
}

.hidden {
  display: none !important;
}

.spinner {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(156, 163, 175, 0.4);
  border-top-color: var(--accent);
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* RESPONSIVE */

@media (max-width: 900px) {
  .hero-banner {
    padding: 1.8rem 1.3rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-phones img {
    width: 120px;
  }

  .grid-two {
    grid-template-columns: 1fr;
  }

  .service-card {
    flex-direction: column;
    text-align: center;
  }

  .app-layout {
    grid-template-columns: 1fr;
  }
}
