/* =========================================================
   Fast Finance — App-shell stylesheet
   Palette sampled directly from the brand mark:
   pink #E8055C -> light #FF3C91 -> deep #98012B, navy #19262C
   ========================================================= */

:root {
  --pink: #e8055c;
  --pink-light: #ff3c91;
  --pink-deep: #98012b;
  --navy: #19262c;
  --navy-2: #24333b;
  --bg: #f6f5f8;
  --white: #ffffff;
  --text: #23272b;
  --text-muted: #6b7280;
  --border: #e7e5ec;
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 9px;
  --shadow-card: 0 10px 24px -14px rgba(25, 38, 44, 0.35);
  --app-max-width: 480px;
  --appbar-h: 58px;
  --tabbar-h: 66px;
}

:root[data-theme="dark"] {
  --bg: #14181a;
  --white: #1d2327;
  --text: #f2f1f4;
  --text-muted: #9aa2a8;
  --border: #2b3236;
}

* { box-sizing: border-box; }

html {
  scroll-padding-top: calc(var(--appbar-h) + env(safe-area-inset-top, 0px));
}

body {
  margin: 0;
  font-family: "Hind Siliguri", "Noto Sans Bengali", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

/* ---------- App shell ---------- */

.app-shell {
  max-width: var(--app-max-width);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 40px rgba(0,0,0,0.06);
}

.app-bar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 40;
  height: var(--appbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 16px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.app-bar__brand {
  display: flex;
  align-items: center;
  gap: 9px;
}

.app-bar__brand img { height: 26px; width: auto; }

.app-bar__title {
  font-weight: 700;
  font-size: 15px;
  color: var(--navy);
  letter-spacing: 0.2px;
}

.app-bar__action {
  font-size: 13px;
  font-weight: 600;
  color: var(--pink);
  padding: 8px 12px;
  border-radius: 100px;
  background: rgba(232,5,92,0.08);
}

.app-content {
  flex: 1;
  padding-bottom: calc(var(--tabbar-h) + 18px);
}

/* ---------- Bottom tab bar ---------- */

.tab-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: var(--app-max-width);
  display: flex;
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
  z-index: 50;
}

.tab-bar__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 2px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
}

.tab-bar__item svg { width: 22px; height: 22px; }

.tab-bar__item.is-active {
  color: var(--pink);
}

.tab-bar__item.is-active svg { stroke: var(--pink); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  border-radius: 100px;
  font-size: 15px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(120deg, var(--pink) 0%, var(--pink-deep) 100%);
  color: #fff;
  box-shadow: 0 12px 20px -10px rgba(232,5,92,0.55);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--navy);
  color: var(--navy);
}

.btn-ghost {
  background: rgba(25,38,44,0.06);
  color: var(--navy);
}

.btn-sm { padding: 10px 16px; font-size: 13px; width: auto; }
.btn-block-row { display: flex; gap: 10px; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: #fff;
  padding: 30px 20px 46px;
  clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: -30% -10% auto auto;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(232,5,92,0.55), transparent 70%);
  filter: blur(2px);
}

.hero__eyebrow-mark {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
}

.hero__mark-line { height: 3px; width: 22px; border-radius: 4px; background: var(--pink); }
.hero__mark-line:nth-child(2) { width: 14px; opacity: 0.7; }
.hero__mark-line:nth-child(3) { width: 8px; opacity: 0.4; }

.hero h1 {
  font-size: 26px;
  line-height: 1.35;
  margin: 0 0 10px;
  position: relative;
  max-width: 300px;
}

.hero p {
  color: rgba(255,255,255,0.75);
  font-size: 14.5px;
  line-height: 1.6;
  margin: 0 0 22px;
  max-width: 300px;
  position: relative;
}

.hero .btn-primary { width: auto; padding: 14px 26px; }

.hero__stats {
  display: flex;
  gap: 22px;
  margin-top: 26px;
  position: relative;
}

.hero__stat b { display: block; font-size: 19px; }
.hero__stat span { font-size: 11.5px; color: rgba(255,255,255,0.65); }

/* ---------- Sections ---------- */

.section { padding: 26px 20px; }
.section-title { font-size: 18px; font-weight: 700; margin: 0 0 4px; color: var(--navy); }
.section-sub { font-size: 13.5px; color: var(--text-muted); margin: 0 0 18px; }

/* Step list (genuinely sequential — numbered) */
.step-list { display: flex; flex-direction: column; gap: 0; }

.step-item {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  position: relative;
}

.step-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 17px;
  top: 42px;
  bottom: -6px;
  width: 2px;
  background: var(--border);
}

.step-num {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  z-index: 1;
}

.step-item.is-active .step-num,
.step-item.is-done .step-num { background: var(--pink); }

.step-body h3 { margin: 3px 0 3px; font-size: 14.5px; color: var(--navy); }
.step-body p { margin: 0; font-size: 13px; color: var(--text-muted); line-height: 1.5; }

/* Feature rows (not identical cards — alternating text/icon rows) */
.feature-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.feature-row:last-child { border-bottom: none; }

.feature-icon {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(232,5,92,0.09);
  color: var(--pink);
}
.feature-icon svg { width: 22px; height: 22px; }

.feature-body h3 { margin: 0 0 3px; font-size: 14.5px; color: var(--navy); }
.feature-body p { margin: 0; font-size: 13px; color: var(--text-muted); line-height: 1.5; }

/* ---------- Cards / surfaces ---------- */

.surface {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 20px;
}

.info-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

/* ---------- Forms ---------- */

.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}

.form-label .req { color: var(--pink); }

.form-hint { font-size: 11.5px; color: var(--text-muted); margin-top: 5px; }

.form-control {
  width: 100%;
  padding: 13px 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--white);
  font-size: 14.5px;
  color: var(--text);
  font-family: inherit;
}

.form-control:focus {
  outline: none;
  border-color: var(--pink);
  box-shadow: 0 0 0 4px rgba(232,5,92,0.12);
}

textarea.form-control { resize: vertical; min-height: 88px; }

.file-drop {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 18px 14px;
  text-align: center;
  background: rgba(25,38,44,0.02);
  position: relative;
}

.file-drop input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.file-drop__icon { color: var(--pink); margin-bottom: 6px; }
.file-drop__label { font-size: 13px; font-weight: 600; color: var(--navy); }
.file-drop__hint { font-size: 11.5px; color: var(--text-muted); margin-top: 3px; }

.fieldset-title {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: none;
  color: var(--pink-deep);
  margin: 22px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(232,5,92,0.15);
}
.fieldset-title:first-child { margin-top: 0; }

.alert {
  padding: 13px 15px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  margin-bottom: 16px;
  line-height: 1.5;
}
.alert-error { background: #fdecef; color: #98012b; border: 1px solid #f6c3d1; }
.alert-success { background: #eafaf1; color: #146c3f; border: 1px solid #bdead2; }
.alert-info { background: #eef4ff; color: #1e429f; border: 1px solid #c7d9fb; }

/* ---------- Badges ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.badge-pending { background: #fff3e0; color: #b8690a; }
.badge-processing { background: #e8f0fe; color: #1a56b0; }
.badge-approved { background: #e6f7ec; color: #1a7d43; }
.badge-rejected { background: #fdeaea; color: #b8231f; }

/* ---------- Tracking result ---------- */

.tracking-head {
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  margin-bottom: 22px;
}
.tracking-head .tn { font-size: 20px; font-weight: 700; letter-spacing: 0.5px; }
.tracking-head .sub { font-size: 12.5px; color: rgba(255,255,255,0.65); margin-top: 4px; }

/* ---------- Empty state ---------- */

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.empty-state svg { color: var(--border); margin-bottom: 12px; }
.empty-state h3 { color: var(--navy); margin: 0 0 6px; font-size: 15px; }
.empty-state p { margin: 0; font-size: 13px; }

/* ---------- Footer ---------- */

.app-footer {
  padding: 18px 20px 26px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  border-top: 1px solid var(--border);
}
.app-footer .brand-name { color: var(--navy); font-weight: 700; }

/* =========================================================
   Admin panel
   ========================================================= */

.admin-shell { min-height: 100vh; background: var(--bg); }

.admin-topbar {
  background: var(--navy);
  color: #fff;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 30;
}
.admin-topbar__brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.admin-topbar__brand img { height: 24px; }
.admin-topbar a.logout { font-size: 12.5px; color: rgba(255,255,255,0.75); background: rgba(255,255,255,0.1); padding: 8px 14px; border-radius: 100px; }

.admin-wrap { max-width: 1080px; margin: 0 auto; padding: 20px 16px 60px; }

.admin-stats { display: grid; grid-template-columns: repeat(auto-fit,minmax(140px,1fr)); gap: 12px; margin-bottom: 20px; }
.admin-stat { background: var(--white); border-radius: var(--radius-md); padding: 16px; border: 1px solid var(--border); }
.admin-stat b { display: block; font-size: 22px; color: var(--navy); }
.admin-stat span { font-size: 12px; color: var(--text-muted); }
.admin-stat.accent { border-color: transparent; background: linear-gradient(120deg, var(--pink), var(--pink-deep)); }
.admin-stat.accent b, .admin-stat.accent span { color: #fff; }

.filter-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-tabs a {
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 100px;
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.filter-tabs a.is-active { background: var(--navy); color: #fff; border-color: var(--navy); }

.admin-search { margin-bottom: 16px; }
.admin-search .form-control { max-width: 320px; }

.table-card { background: var(--white); border-radius: var(--radius-md); border: 1px solid var(--border); overflow: hidden; }
.table-wrap { overflow-x: auto; }

table.app-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 720px; }
table.app-table th, table.app-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.app-table th { background: rgba(25,38,44,0.03); color: var(--text-muted); font-weight: 600; font-size: 12px; }
table.app-table tr:last-child td { border-bottom: none; }
table.app-table a.view-link { color: var(--pink); font-weight: 700; }

.admin-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--navy);
}
.admin-login-card {
  width: 100%;
  max-width: 360px;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  text-align: center;
}
.admin-login-card img { height: 34px; margin: 0 auto 16px; }
.admin-login-card h1 { font-size: 17px; color: var(--navy); margin: 0 0 22px; }
.admin-login-card .form-group { text-align: left; }

.detail-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 760px) {
  .detail-grid { grid-template-columns: 1.1fr 0.9fr; }
}

.doc-preview { display: grid; grid-template-columns: repeat(auto-fit,minmax(140px,1fr)); gap: 12px; }
.doc-preview figure { margin: 0; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.doc-preview img { width: 100%; height: 130px; object-fit: cover; }
.doc-preview figcaption { padding: 8px 10px; font-size: 11.5px; color: var(--text-muted); }

.kv-list { display: flex; flex-direction: column; }
.kv-row { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.kv-row:last-child { border-bottom: none; }
.kv-row .k { color: var(--text-muted); }
.kv-row .v { font-weight: 600; color: var(--navy); text-align: right; }

.status-history { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.status-history .sh-item { font-size: 12.5px; color: var(--text-muted); display: flex; justify-content: space-between; gap: 10px; }

@media (max-width: 380px) {
  .hero h1 { font-size: 22px; }
}
