/* =========================================================
   StartupBoxBD — Premium Fintech Design System
   ========================================================= */

:root {
  --navy: #0A0F2C;
  --navy-deep: #101A42;
  --navy-mid: #1A2456;
  --gold: #F5A623;
  --gold-hover: #D48C1C;
  --gold-soft: rgba(245, 166, 35, 0.14);
  --success: #2ECC71;
  --success-soft: rgba(46, 204, 113, 0.14);
  --danger: #E74C3C;
  --danger-soft: rgba(231, 76, 60, 0.14);
  --info: #3B82F6;
  --info-soft: rgba(59, 130, 246, 0.14);
  --warn: #F59E0B;
  --warn-soft: rgba(245, 158, 11, 0.16);
  --muted-status: #94A3B8;
  --muted-status-soft: rgba(148, 163, 184, 0.18);

  --bg: #F8FAFC;
  --bg-elevated: #FFFFFF;
  --bg-subtle: #EEF2F7;
  --text: #0F172A;
  --text-secondary: #475569;
  --text-muted: #64748B;
  --border: #E2E8F0;
  --border-strong: #CBD5E1;

  --glass: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-strong: rgba(255, 255, 255, 0.12);

  --shadow-sm: 0 1px 2px rgba(10, 15, 44, 0.05);
  --shadow-md: 0 8px 24px rgba(10, 15, 44, 0.08);
  --shadow-lg: 0 20px 50px rgba(10, 15, 44, 0.14);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --header-h: 72px;
  --sidebar-w: 260px;
  --font-en: "Inter", system-ui, sans-serif;
  --font-bn: "Hind Siliguri", "Inter", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --transition: 0.25s var(--ease);

  /* Legacy aliases for existing markup */
  --bg-color: var(--navy);
  --bg-color-light: var(--navy-deep);
  --primary-color: var(--gold);
  --primary-hover: var(--gold-hover);
  --text-color: #FFFFFF;
  --danger-color: var(--danger);
  --success-color: var(--success);
  --glass-bg: var(--glass);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-bn);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

body.page-dark {
  background: var(--navy);
  color: #FFFFFF;
}

img {
  max-width: 100%;
  display: block;
}

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

a:hover {
  color: var(--gold-hover);
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-en);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: inherit;
}

.container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-gold { color: var(--gold); }
.text-success { color: var(--success); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--gold) 0%, #E8950F 100%);
  color: #0A0F2C;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  box-shadow: 0 6px 18px rgba(245, 166, 35, 0.28);
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(245, 166, 35, 0.35);
  color: #0A0F2C;
  text-decoration: none;
}

.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 1.5px solid rgba(245, 166, 35, 0.55);
  box-shadow: none;
}

.btn-outline:hover {
  background: var(--gold-soft);
  color: var(--gold);
}

.btn-ghost {
  background: transparent;
  color: inherit;
  border: 1px solid transparent;
  box-shadow: none;
  font-weight: 600;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 6px 18px rgba(231, 76, 60, 0.25);
}

.btn-sm {
  padding: 7px 12px;
  font-size: 0.82rem;
  border-radius: 8px;
}

.btn-block { width: 100%; }

.btn-light {
  background: #fff;
  color: var(--navy);
  box-shadow: var(--shadow-sm);
}

.btn-light:hover {
  color: var(--navy);
  box-shadow: var(--shadow-md);
}

/* ---------- Site header (public) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--header-h);
  display: flex;
  align-items: center;
  backdrop-filter: blur(16px);
  background: rgba(10, 15, 44, 0.82);
  border-bottom: 1px solid var(--glass-border);
}

.site-header .container,
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  line-height: 1.2;
}

.brand-logo-img {
  display: block;
  height: 52px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  background: #fff;
  padding: 3px;
  flex-shrink: 0;
}

.brand-logo-text {
  display: inline-flex;
  align-items: baseline;
  font-family: var(--font-en);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  line-height: 1;
}

.brand-logo-light {
  color: #fff;
  text-shadow: 0 1px 14px rgba(255, 255, 255, 0.18);
}

.brand-logo-accent {
  background: linear-gradient(135deg, #FFE08A 0%, var(--gold) 55%, #D48C1C 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-logo:hover .brand-logo-accent {
  filter: brightness(1.08);
}

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

.brand-logo .brand-sub {
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
}

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

.site-nav a:not(.btn) {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 500;
  font-size: 0.92rem;
  padding: 8px 12px;
  border-radius: 8px;
}

.site-nav a:not(.btn):hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  text-decoration: none;
}

/* Legacy header support */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
}

header .logo {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--gold);
  font-family: var(--font-en);
}

nav a {
  margin-left: 16px;
  color: inherit;
}

/* ---------- Cards ---------- */
.surface-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.glass-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 20px;
  backdrop-filter: blur(14px);
}

.card-pad { padding: 22px; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 18px; }

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

.page-dark .form-group label,
.auth-shell .form-group label {
  color: rgba(255, 255, 255, 0.65);
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.page-dark .form-control,
.auth-shell .form-control,
.modal .form-control,
.admin-wrapper .form-control {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--glass-border);
  color: #fff;
}

.form-control:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.18);
}

.form-control::placeholder { color: #94A3B8; }

.error-msg {
  color: var(--danger);
  margin-bottom: 12px;
  display: none;
  font-size: 0.9rem;
  padding: 10px 12px;
  background: var(--danger-soft);
  border-radius: 8px;
}

.success-msg {
  color: var(--success);
  margin-bottom: 12px;
  display: none;
  font-size: 0.9rem;
  padding: 10px 12px;
  background: var(--success-soft);
  border-radius: 8px;
  font-weight: 600;
}

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--gold-soft);
  color: #B77700;
  border: 1px solid rgba(245, 166, 35, 0.25);
}

.badge-open { background: var(--success-soft); color: #159A4A; border-color: rgba(46, 204, 113, 0.25); }
.badge-closed { background: var(--muted-status-soft); color: #64748B; border-color: rgba(148, 163, 184, 0.3); }
.badge-coming { background: var(--info-soft); color: #2563EB; border-color: rgba(59, 130, 246, 0.25); }

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: capitalize;
}

.status-pending { background: var(--warn-soft); color: #B45309; }
.status-reviewed { background: var(--info-soft); color: #1D4ED8; }
.status-contacted { background: var(--success-soft); color: #15803D; }
.status-closed { background: var(--muted-status-soft); color: #475569; }

.risk-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
}

.risk-low { background: var(--success-soft); color: #15803D; }
.risk-medium { background: var(--warn-soft); color: #B45309; }
.risk-high { background: var(--danger-soft); color: #B91C1C; }

.risk-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

/* ---------- Progress ---------- */
.progress {
  height: 8px;
  background: var(--bg-subtle);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), #2ECC71);
  width: 0;
  transition: width 0.8s var(--ease);
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ---------- Project cards ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
}

.project-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(245, 166, 35, 0.35);
}

.project-card-media {
  position: relative;
  height: 180px;
  background:
    linear-gradient(135deg, #101A42 0%, #1A2456 50%, #0A0F2C 100%);
  overflow: hidden;
}

.project-card-media img,
.project-img-header {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.project-card-media .media-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.35);
  font-size: 2.4rem;
  font-weight: 800;
  font-family: var(--font-en);
  letter-spacing: -0.04em;
}

.project-card-body {
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 12px;
}

.project-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.project-card h3,
.project-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.project-card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
}

.project-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
}

.meta-chip strong { color: var(--navy); }

.stat-row {
  display: flex;
  justify-content: space-between;
  background: var(--bg-subtle);
  padding: 8px 12px;
  border-radius: 8px;
  margin: 4px 0;
  font-size: 0.9rem;
}

.stat-row strong { color: var(--gold); }

/* ---------- Landing: Hero (full-bleed banner) ---------- */
.hero-section.hero-banner {
  position: relative;
  min-height: clamp(420px, 72vh, 760px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #004d26;
  color: #fff;
  padding: 0;
}

.hero-banner-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-banner-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.hero-banner-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 48px 0 96px;
  background: linear-gradient(
    to top,
    rgba(10, 15, 44, 0.72) 0%,
    rgba(10, 15, 44, 0.28) 55%,
    transparent 100%
  );
}

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

.hero-section.hero-banner .btn-outline {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
}

.hero-section.hero-banner .btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.reveal {
  animation: fadeUp 0.7s var(--ease) both;
}

.reveal-delay-1 { animation-delay: 0.1s; }
.reveal-delay-2 { animation-delay: 0.2s; }
.reveal-delay-3 { animation-delay: 0.3s; }

/* ---------- Sections ---------- */
.section {
  padding: 80px 0;
  color: var(--text);
}

.section-header {
  margin-bottom: 36px;
  max-width: 640px;
}

.section-header h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 10px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.section-header.center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.section-dark {
  background: linear-gradient(180deg, #0A0F2C 0%, #101A42 100%);
  color: #fff;
}

.section-dark .section-header h2 { color: #fff; }
.section-dark .section-header p { color: rgba(255, 255, 255, 0.65); }

.section-alt { background: #EEF2F7; }

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.stat-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition);
}

.stat-card:hover { transform: translateY(-3px); }

.stat-card .stat-value {
  font-family: var(--font-en);
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}

.stat-card .stat-value span { color: var(--gold); }
.stat-card .stat-label { color: var(--text-muted); font-size: 0.92rem; font-weight: 500; }

/* Feature / why cards */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.feature-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
  border-color: rgba(245, 166, 35, 0.4);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--gold-soft);
  color: var(--gold);
  margin-bottom: 16px;
  font-size: 1.2rem;
}

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

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

/* How it works */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 8px 8px 8px 0;
}

.step::before {
  counter-increment: step;
  content: "0" counter(step);
  display: block;
  font-family: var(--font-en);
  font-size: 2rem;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: -0.04em;
  margin-bottom: 12px;
}

.step h3 {
  font-size: 1.15rem;
  color: #fff;
  margin-bottom: 8px;
}

.step p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.92rem;
}

/* Footer */
.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.7);
  padding: 56px 0 28px;
}

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

.footer-brand .brand-logo { margin-bottom: 14px; }
.footer-brand p { font-size: 0.92rem; max-width: 32ch; line-height: 1.7; }

.footer-col h4 {
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.footer-col a {
  display: block;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.92rem;
  padding: 5px 0;
}

.footer-col a:hover { color: var(--gold); }

.footer-bottom {
  border-top: 1px solid var(--glass-border);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.85rem;
}

/* ---------- Auth ---------- */
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--navy);
  color: #fff;
}

.auth-visual {
  position: relative;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(245, 166, 35, 0.15), transparent 50%),
    linear-gradient(160deg, #0A0F2C, #101A42);
  border-right: 1px solid var(--glass-border);
}

.auth-visual h2 {
  font-size: 2.4rem;
  max-width: 12ch;
  margin-top: 40px;
}

.auth-visual p {
  color: rgba(255, 255, 255, 0.6);
  margin-top: 14px;
  max-width: 36ch;
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.auth-card {
  width: min(420px, 100%);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  backdrop-filter: blur(12px);
}

.auth-card h1 {
  font-size: 1.75rem;
  margin-bottom: 8px;
}

.auth-card .auth-lead {
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 28px;
  font-size: 0.95rem;
}

.auth-footer-link {
  text-align: center;
  margin-top: 22px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.92rem;
}

/* ---------- App shell (investor) ---------- */
.app-shell {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}

.app-sidebar {
  width: var(--sidebar-w);
  background: var(--navy);
  color: #fff;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 150;
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.3s var(--ease);
}

.app-sidebar .brand-logo {
  padding: 8px 10px 22px;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 18px;
}

.app-sidebar .brand-logo-img {
  height: 44px;
  max-width: 120px;
}

.app-sidebar .brand-logo-text {
  font-size: 0.95rem;
}

.app-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.app-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.62);
  font-weight: 500;
  font-size: 0.92rem;
}

.app-nav a:hover,
.app-nav a.active {
  background: rgba(245, 166, 35, 0.12);
  color: var(--gold);
  text-decoration: none;
}

.app-nav .nav-icon {
  width: 20px;
  text-align: center;
  opacity: 0.9;
}

.app-sidebar-footer {
  border-top: 1px solid var(--glass-border);
  padding-top: 14px;
}

.app-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.app-topbar {
  height: 68px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 80;
}

.app-topbar h1 {
  font-size: 1.15rem;
  color: var(--navy);
}

.app-topbar .welcome {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: border-color var(--transition), color var(--transition);
}

.icon-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), #E8950F);
  color: var(--navy);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.9rem;
}

.app-content {
  padding: 28px;
  flex: 1;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.kpi-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.kpi-card .kpi-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 8px;
}

.kpi-card .kpi-value {
  font-family: var(--font-en);
  font-size: 2rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.03em;
}

.kpi-card .kpi-value.accent { color: var(--gold); }
.kpi-card .kpi-value.success { color: var(--success); }

.panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}

.panel-header h2 {
  font-size: 1.1rem;
  color: var(--navy);
}

.panel-body { padding: 22px; }

/* Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  background: var(--bg-subtle);
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(245, 166, 35, 0.03); }

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

/* Project detail */
.detail-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
  align-items: start;
}

.detail-banner {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #101A42, #0A0F2C);
  border: 1px solid var(--border);
}

.detail-banner.hidden { display: none; }

.summary-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 88px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.summary-row:last-of-type { border-bottom: none; }
.summary-row .label { color: var(--text-muted); font-size: 0.88rem; }
.summary-row .value { font-weight: 700; color: var(--navy); }

.milestones {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 12px;
}

.milestones li {
  position: relative;
  padding: 0 0 22px 28px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.milestones li::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px var(--gold-soft);
}

.milestones li::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 20px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.milestones li:last-child::after { display: none; }
.milestones li:last-child { padding-bottom: 0; }

/* Empty / loading */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 2.4rem;
  margin-bottom: 12px;
  opacity: 0.5;
}

.empty-state h3 {
  color: var(--navy);
  margin-bottom: 6px;
  font-size: 1.15rem;
}

.skeleton {
  background: linear-gradient(90deg, #EEF2F7 25%, #F8FAFC 50%, #EEF2F7 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 8px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card { height: 320px; }
.skeleton-line { height: 14px; margin-bottom: 10px; }
.skeleton-line.lg { height: 22px; width: 60%; }

/* Toast */
.toast-host {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 260px;
  max-width: 380px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: fadeUp 0.35s var(--ease);
  font-size: 0.9rem;
  color: var(--text);
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.info { border-left: 4px solid var(--info); }

/* Mobile bottom nav */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  z-index: 160;
  justify-content: space-around;
}

.mobile-bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: 8px;
}

.mobile-bottom-nav a.active,
.mobile-bottom-nav a:hover {
  color: var(--gold);
  text-decoration: none;
}

.sidebar-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 44, 0.5);
  z-index: 140;
}

.sidebar-overlay.open { display: block; }

/* Confirm dialog */
.dialog-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 44, 0.55);
  z-index: 3000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.dialog-overlay.open { display: flex; }

.dialog-box {
  background: #fff;
  border-radius: var(--radius);
  padding: 28px;
  max-width: 400px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}

.dialog-box h3 {
  color: var(--navy);
  margin-bottom: 8px;
}

.dialog-box p {
  color: var(--text-muted);
  margin-bottom: 22px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Utilities */
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-2 { gap: 12px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-section.hero-banner {
    min-height: clamp(320px, 56vh, 560px);
  }
  .hero-banner-content { padding: 32px 0 72px; }
  .stats-grid,
  .feature-grid,
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .detail-layout { grid-template-columns: 1fr; }
  .summary-card { position: static; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
}

@media (max-width: 768px) {
  :root { --header-h: 64px; }

  .stats-grid,
  .feature-grid,
  .steps,
  .footer-grid { grid-template-columns: 1fr; }

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

  .app-sidebar {
    transform: translateX(-100%);
  }

  .app-sidebar.open { transform: translateX(0); }

  .app-main {
    margin-left: 0;
    padding-bottom: 72px;
  }

  .app-content { padding: 18px 16px; }
  .app-topbar { padding: 0 16px; }
  .sidebar-toggle { display: inline-flex; }
  .mobile-bottom-nav { display: flex; }

  .section { padding: 56px 0; }
  .hero-section.hero-banner {
    min-height: clamp(280px, 48vh, 420px);
  }
  .hero-banner-media img {
    object-position: left center;
  }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
