:root {
  --ff-primary: #a855f7;
  --ff-primary-dark: #8b3de0;
  --ff-primary-soft: #f3e8ff;
  --ff-secondary: #e9d5ff;
  --ff-bg: #fcfaff;
  --ff-surface: #ffffff;
  --ff-surface-alt: #faf5ff;
  --ff-text: #1f2937;
  --ff-text-soft: #6b7280;
  --ff-border: #eadcff;
  --ff-success: #16a34a;
  --ff-warning: #f59e0b;
  --ff-danger: #dc2626;
  --ff-info: #2563eb;
  --ff-shadow: 0 18px 45px rgba(143, 76, 225, 0.12);
  --ff-shadow-soft: 0 10px 24px rgba(143, 76, 225, 0.08);
  --ff-radius-lg: 28px;
  --ff-radius-md: 20px;
  --ff-radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 15px;
}

body {
  margin: 0;
  font-family: "Prompt", sans-serif;
  color: var(--ff-text);
  background:
    radial-gradient(1100px 420px at -5% -10%, rgba(168, 85, 247, 0.12), transparent),
    radial-gradient(1000px 360px at 105% -10%, rgba(192, 132, 252, 0.12), transparent),
    linear-gradient(180deg, #fff, #fdf8ff 50%, #fbf7ff),
    var(--ff-bg);
}

a {
  color: inherit;
}

code {
  padding: 0.16rem 0.45rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ff-primary-dark);
  font-family: "Consolas", "Courier New", monospace;
}

.app-body.is-authenticated {
  min-height: 100vh;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  width: 290px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  border-right: 1px solid var(--ff-border);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 1040;
}

.sidebar-backdrop {
  display: none;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--ff-border);
}

.brand-logo {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, var(--ff-primary), #d19afd);
  box-shadow: var(--ff-shadow-soft);
}

.sidebar-brand h5 {
  font-size: 1rem;
}

.sidebar-brand small {
  color: var(--ff-text-soft);
  line-height: 1.45;
  display: block;
}

.sidebar-nav {
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-section-label {
  padding: 18px 12px 8px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ff-text-soft);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ff-text);
  padding: 11px 14px;
  border-radius: 16px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.sidebar-link i {
  width: 18px;
  color: var(--ff-primary-dark);
}

.sidebar-link:hover,
.sidebar-link.active {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(233, 213, 255, 0.85));
  color: var(--ff-primary-dark);
  transform: translateX(2px);
}

.sidebar-footer {
  margin: 12px;
  border: 1px solid var(--ff-border);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, #fdf7ff);
}

.app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 1020;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(234, 220, 255, 0.9);
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.topbar-title h4 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.topbar-title small {
  color: var(--ff-text-soft);
}

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

.topbar-date {
  align-items: center;
  gap: 8px;
  color: var(--ff-text-soft);
  font-size: 0.9rem;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--ff-border);
  border-radius: 999px;
}

.btn-icon-soft {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ff-border);
  background: #fff;
  color: var(--ff-primary-dark);
}

.notification-badge {
  position: absolute;
  right: -5px;
  top: -4px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--ff-danger), #fb7185);
  border: 2px solid #fff;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 12px;
  border-radius: 18px;
  text-decoration: none;
  color: var(--ff-text);
  border: 1px solid var(--ff-border);
  background: #fff;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--ff-primary), #d8b4fe);
  color: #fff;
  font-weight: 700;
  flex-shrink: 0;
}

.user-chip-text .name {
  font-size: 0.92rem;
  font-weight: 600;
}

.user-chip-text small {
  color: var(--ff-text-soft);
}

.dropdown-menu-modern {
  border: 1px solid var(--ff-border);
  border-radius: 16px;
  box-shadow: var(--ff-shadow);
  padding: 10px;
}

.dropdown-menu-modern .dropdown-item {
  border-radius: 12px;
  padding: 10px 12px;
}

.app-content {
  flex: 1;
}

.app-footer,
.auth-footer {
  text-align: center;
  color: var(--ff-text-soft);
  font-size: 0.86rem;
  padding: 16px;
  border-top: 1px solid var(--ff-border);
  background: rgba(255, 255, 255, 0.85);
}

.page-shell {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.page-shell-narrow {
  max-width: 760px;
}

.page-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  padding: 26px 28px;
  border-radius: var(--ff-radius-lg);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(250, 245, 255, 0.95));
  border: 1px solid var(--ff-border);
  box-shadow: var(--ff-shadow);
}

.page-hero h1 {
  margin: 10px 0 8px;
  font-size: clamp(1.5rem, 2vw, 2.15rem);
  font-weight: 700;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: var(--ff-text-soft);
}

.page-hero-compact {
  align-items: flex-start;
}

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

.eyebrow-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--ff-primary-soft);
  color: var(--ff-primary-dark);
  font-size: 0.82rem;
  font-weight: 600;
}

.modern-section-card,
.card-ff,
.table-card,
.stat-card {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--ff-border);
  border-radius: var(--ff-radius-md);
  box-shadow: var(--ff-shadow);
}

.modern-section-card,
.table-card {
  padding: 22px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.section-subtitle {
  color: var(--ff-text-soft);
  font-size: 0.92rem;
}

.metrics-grid {
  display: grid;
  gap: 16px;
}

.metrics-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metrics-grid-6 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.metrics-grid-7 {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.metric-card {
  padding: 18px;
  min-height: 148px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.18), rgba(233, 213, 255, 0.9));
  color: var(--ff-primary-dark);
  font-size: 1.1rem;
}

.metric-value {
  font-size: clamp(1.45rem, 2vw, 2rem);
  font-weight: 700;
  line-height: 1.1;
}

.metric-label {
  color: var(--ff-text-soft);
  font-size: 0.92rem;
}

.content-grid {
  display: grid;
  gap: 20px;
}

.content-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.content-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.span-2 {
  grid-column: span 2;
}

.mini-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.mini-stat {
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, var(--ff-primary-soft), #fff);
  border: 1px solid var(--ff-border);
}

.mini-stat span {
  display: block;
  color: var(--ff-text-soft);
  margin-bottom: 6px;
  font-size: 0.88rem;
}

.mini-stat strong {
  font-size: 1rem;
}

.chart-shell {
  height: 290px;
}

.quick-links {
  display: grid;
  gap: 12px;
}

.quick-link-card {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  border-radius: 16px;
  padding: 14px 16px;
  border: 1px solid var(--ff-border);
  background: linear-gradient(135deg, #fff, #fcf7ff);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quick-link-card i {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--ff-primary-soft);
  color: var(--ff-primary-dark);
}

.quick-link-card span {
  font-weight: 600;
}

.quick-link-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--ff-shadow-soft);
}

.rank-list,
.activity-list,
.financial-stack,
.tip-list,
.demo-credentials,
.workflow-steps,
.notification-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rank-item,
.financial-item,
.demo-credential,
.workflow-step,
.notification-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--ff-border);
  background: linear-gradient(180deg, #fff, #fcf8ff);
}

.rank-item span,
.financial-item span,
.demo-credential span,
.workflow-step p,
.notification-message {
  color: var(--ff-text-soft);
  font-size: 0.9rem;
  margin: 0;
}

.activity-item {
  display: flex;
  gap: 14px;
  padding: 6px 0;
}

.activity-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-top: 8px;
  background: linear-gradient(135deg, var(--ff-primary), #d19afd);
  box-shadow: 0 0 0 6px rgba(168, 85, 247, 0.12);
  flex-shrink: 0;
}

.activity-item p {
  margin: 4px 0;
  color: var(--ff-text-soft);
}

.activity-item small {
  color: #94a3b8;
}

.empty-inline {
  color: var(--ff-text-soft);
  padding: 8px 0;
}

.tip-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px dashed var(--ff-border);
  background: var(--ff-surface-alt);
}

.tip-item i {
  color: var(--ff-primary-dark);
  margin-top: 2px;
}

.form-hint {
  color: var(--ff-text-soft);
  font-size: 0.88rem;
}

.filter-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--ff-border);
  background: #fff;
  color: var(--ff-text-soft);
  font-size: 0.88rem;
}

.landing-shell {
  display: grid;
  gap: 20px;
  width: 100%;
}

.landing-shell-enhanced {
  gap: 24px;
}

.landing-home {
  gap: 18px;
}

.landing-card {
  border-radius: var(--ff-radius-lg);
  border: 1px solid var(--ff-border);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--ff-shadow);
  padding: clamp(20px, 2.4vw, 26px);
}

.landing-header {
  max-width: 760px;
}

.landing-header-home {
  max-width: none;
}

.landing-title {
  margin: 14px 0 10px;
  font-size: clamp(1.6rem, 2.2vw, 2.3rem);
  font-weight: 700;
  line-height: 1.2;
}

.landing-subtitle {
  color: var(--ff-text-soft);
  margin: 0;
  font-size: 1rem;
  line-height: 1.75;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
  align-items: stretch;
}

.landing-actions .btn {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.landing-hero-card {
  padding: 30px;
}

.landing-hero-card-home {
  overflow: hidden;
}

.public-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 22px;
  align-items: start;
}

.public-hero-grid-home {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  align-items: stretch;
}

.public-hero-side {
  display: flex;
  align-self: stretch;
}

.hero-highlight-card,
.public-wizard-card {
  border-radius: var(--ff-radius-lg);
}

.hero-highlight-card {
  width: 100%;
  padding: 22px;
  border: 1px solid var(--ff-border);
  background:
    radial-gradient(circle at top right, rgba(216, 180, 254, 0.22), transparent 35%),
    linear-gradient(180deg, #fff, #fcf6ff);
  box-shadow: var(--ff-shadow);
}

.hero-highlight-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.hero-inline-action {
  white-space: nowrap;
}

.landing-stat-grid {
  margin-top: 22px;
}

.landing-stat-grid .mini-stat {
  min-height: 100%;
}

.compact-workflow .workflow-step {
  padding: 12px 14px;
}

.guest-success-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(34, 197, 94, 0.22);
  background: linear-gradient(180deg, rgba(240, 253, 244, 0.95), #fff);
}

.guest-success-icon {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #15803d;
  background: rgba(34, 197, 94, 0.12);
  font-size: 1.15rem;
  flex-shrink: 0;
}

.guest-success-banner code {
  word-break: break-word;
}

.filter-chip span {
  min-width: 0;
}

.public-wizard-card {
  scroll-margin-top: 20px;
}

.public-wizard-form {
  display: flex;
  flex-direction: column;
}

.wizard-step-note {
  margin: 0 0 12px;
  color: var(--ff-text-soft);
  font-size: 0.9rem;
}

.wizard-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.wizard-step-pill {
  border: 1px solid var(--ff-border);
  background: #fff;
  border-radius: 20px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  transition: all 0.2s ease;
  min-height: 88px;
}

.wizard-step-pill span {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ff-primary-soft);
  color: var(--ff-primary-dark);
  font-weight: 700;
  flex-shrink: 0;
}

.wizard-step-pill strong,
.wizard-step-pill small {
  display: block;
}

.wizard-step-pill > div {
  min-width: 0;
}

.wizard-step-pill small {
  color: var(--ff-text-soft);
  line-height: 1.45;
}

.wizard-step-pill.active,
.wizard-step-pill.completed {
  border-color: rgba(168, 85, 247, 0.35);
  background: linear-gradient(180deg, #fff, #fcf6ff);
}

.wizard-step-pill.active span,
.wizard-step-pill.completed span {
  background: linear-gradient(135deg, var(--ff-primary), #d8b4fe);
  color: #fff;
}

.wizard-pane {
  padding: 10px 0 4px;
}

.wizard-pane.is-hidden {
  display: none;
}

.wizard-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.wizard-choice {
  cursor: pointer;
}

.wizard-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.wizard-choice-body {
  height: 100%;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid var(--ff-border);
  background: linear-gradient(180deg, #fff, #fcf8ff);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.wizard-choice-body strong {
  display: block;
  margin: 12px 0 8px;
  font-size: 1.04rem;
}

.wizard-choice-body p {
  color: var(--ff-text-soft);
  margin: 0;
  line-height: 1.65;
}

.wizard-choice-icon {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: var(--ff-primary-soft);
  color: var(--ff-primary-dark);
  font-size: 1.2rem;
}

.wizard-choice input:checked + .wizard-choice-body {
  border-color: rgba(168, 85, 247, 0.45);
  box-shadow: var(--ff-shadow-soft);
  transform: translateY(-2px);
}

.wizard-nav {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 22px;
}

.wizard-nav .is-hidden {
  display: none !important;
}

.wizard-review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.wizard-review-card {
  padding: 20px;
  border-radius: 22px;
  border: 1px solid var(--ff-border);
  background: linear-gradient(180deg, #fff, #fcf8ff);
}

.wizard-review-card h6 {
  margin-bottom: 14px;
}

.wizard-review-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wizard-review-list div {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(168, 85, 247, 0.18);
}

.wizard-review-list span {
  color: var(--ff-text-soft);
}

.wizard-review-list strong {
  text-align: right;
}

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

.feature-card {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--ff-border);
  background: linear-gradient(180deg, #fff, #fcf8ff);
  height: 100%;
}

.feature-card h6 {
  margin: 12px 0 8px;
  font-size: 1rem;
}

.feature-card p {
  color: var(--ff-text-soft);
  margin: 0;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--ff-primary-soft);
  color: var(--ff-primary-dark);
}

.workflow-step span:first-child {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--ff-primary), #d19afd);
  color: #fff;
  font-weight: 700;
  flex-shrink: 0;
}

.workflow-step strong {
  display: block;
  margin-bottom: 4px;
}

.auth-shell {
  min-height: calc(100vh - 55px);
}

.auth-background {
  min-height: calc(100vh - 55px);
  padding: 28px;
  position: relative;
  overflow: hidden;
}

.auth-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(18px);
  opacity: 0.7;
}

.auth-orb-one {
  width: 320px;
  height: 320px;
  left: -80px;
  top: -70px;
  background: rgba(168, 85, 247, 0.18);
}

.auth-orb-two {
  width: 280px;
  height: 280px;
  right: -60px;
  bottom: -70px;
  background: rgba(233, 213, 255, 0.9);
}

.auth-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
  align-items: stretch;
  gap: 22px;
  min-height: 100%;
}

.auth-brand-panel,
.auth-form-panel {
  min-height: 100%;
}

.auth-brand-card {
  height: 100%;
  min-height: 420px;
  padding: 34px;
  border-radius: 34px;
  color: #fff;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.25), transparent 32%),
    linear-gradient(145deg, #8b3de0, #a855f7 45%, #c084fc);
  box-shadow: var(--ff-shadow);
}

.auth-brand-card h1 {
  margin: 20px 0 10px;
  font-size: clamp(2rem, 2.4vw, 2.9rem);
}

.auth-brand-card p {
  max-width: 540px;
  font-size: 1rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.9);
}

.auth-brand-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 34px;
}

.auth-stat {
  padding: 16px 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.auth-stat strong {
  display: block;
  font-size: 1.4rem;
}

.auth-stat span {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.85);
}

.auth-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-form-card {
  width: 100%;
  max-width: 560px;
  padding: 28px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--ff-border);
  box-shadow: var(--ff-shadow);
}

.auth-form-card-wide {
  max-width: 760px;
}

.auth-form-header h2 {
  margin: 12px 0 8px;
  font-size: 1.85rem;
}

.auth-form-header p {
  color: var(--ff-text-soft);
  margin: 0 0 18px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-divider {
  position: relative;
  text-align: center;
  margin: 22px 0;
  color: var(--ff-text-soft);
}

.auth-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--ff-border);
}

.auth-divider span {
  position: relative;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.94);
}

.form-group-modern {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-link {
  font-size: 0.9rem;
  color: var(--ff-primary-dark);
  text-decoration: none;
}

.form-label {
  font-weight: 500;
  margin-bottom: 6px;
}

.form-control,
.form-select {
  border: 1px solid var(--ff-border);
  border-radius: 16px;
  padding: 0.82rem 0.95rem;
  background: #fff;
}

.form-control:focus,
.form-select:focus {
  border-color: #cf9cff;
  box-shadow: 0 0 0 0.22rem rgba(168, 85, 247, 0.16);
}

.btn {
  border-radius: 14px;
  padding: 0.72rem 1rem;
  font-weight: 500;
}

.btn-primary {
  background: linear-gradient(135deg, var(--ff-primary), #c084fc);
  border-color: transparent;
  box-shadow: 0 12px 24px rgba(168, 85, 247, 0.2);
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(135deg, var(--ff-primary-dark), var(--ff-primary));
  border-color: transparent;
}

.btn-outline-primary {
  color: var(--ff-primary-dark);
  border-color: #d8b4fe;
  background: #fff;
}

.btn-outline-primary:hover,
.btn-outline-secondary:hover {
  background: var(--ff-primary-soft);
  color: var(--ff-primary-dark);
  border-color: #d8b4fe;
}

.btn-outline-secondary {
  color: #64748b;
  border-color: #d8dbe5;
  background: #fff;
}

.breadcrumb {
  --bs-breadcrumb-divider: ">";
  margin-bottom: 0;
}

.breadcrumb-item a {
  color: var(--ff-primary-dark);
  text-decoration: none;
}

.table {
  margin-bottom: 0;
}

.table thead th {
  border-bottom-color: #efe7ff;
  color: var(--ff-text-soft);
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.table tbody td {
  vertical-align: middle;
  border-color: #f3ebff;
}

.badge {
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
}

.badge-primary {
  background: rgba(168, 85, 247, 0.16);
  color: var(--ff-primary-dark);
}

.badge-success {
  background: rgba(22, 163, 74, 0.14);
  color: #166534;
}

.badge-warning {
  background: rgba(245, 158, 11, 0.18);
  color: #92400e;
}

.badge-danger {
  background: rgba(220, 38, 38, 0.15);
  color: #991b1b;
}

.badge-info {
  background: rgba(37, 99, 235, 0.15);
  color: #1d4ed8;
}

.badge-secondary,
.badge-light {
  background: #edf2f7;
  color: #475569;
}

.dt-buttons .btn,
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  border-radius: 12px !important;
}

.dt-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.dt-buttons .btn {
  border: 1px solid var(--ff-border);
  background: #fff;
  color: var(--ff-primary-dark);
}

.notification-panel {
  width: 390px !important;
}

.notification-item {
  text-decoration: none;
  color: var(--ff-text);
}

.notification-item.unread {
  background: linear-gradient(180deg, #fff, #faf5ff);
}

.notification-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.notification-time {
  color: #94a3b8;
  white-space: nowrap;
}

.empty-state {
  text-align: center;
  color: var(--ff-text-soft);
  padding: 0 24px;
}

.empty-state-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 16px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  background: var(--ff-primary-soft);
  color: var(--ff-primary-dark);
}

.upload-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}

.preview-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: var(--ff-text);
  padding: 12px;
  border-radius: 18px;
  border: 1px solid var(--ff-border);
  background: linear-gradient(180deg, #fff, #fcf8ff);
  min-height: 0;
}

.preview-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(216, 180, 254, 0.4);
}

.preview-card span {
  font-size: 0.88rem;
  color: var(--ff-text-soft);
  line-height: 1.5;
}

.location-summary-box,
.gps-box {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--ff-border);
  background: linear-gradient(180deg, var(--ff-primary-soft), #fff);
}

[data-mode-section].is-hidden {
  display: none !important;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.timeline-item {
  position: relative;
  padding: 0 0 0 22px;
  border-left: 2px solid rgba(168, 85, 247, 0.18);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--ff-primary), #d8b4fe);
}

@media (max-width: 1399.98px) {
  .metrics-grid-6,
  .metrics-grid-7 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1199.98px) {
  .content-grid-3,
  .content-grid-2,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .public-hero-grid,
  .wizard-choice-grid,
  .wizard-review-grid {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }

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

  body.is-public .auth-form-panel {
    order: 1;
    align-items: flex-start;
  }

  body.is-public .auth-brand-panel {
    order: 2;
  }

  .auth-brand-card {
    min-height: 320px;
  }

  body.is-public .auth-brand-card {
    min-height: auto;
  }
}

@media (max-width: 991.98px) {
  .app-sidebar {
    position: fixed;
    left: -304px;
    transition: left 0.25s ease;
  }

  .app-sidebar.show {
    left: 0;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    z-index: 1035;
  }

  .sidebar-backdrop.show {
    display: block;
  }

  .topbar-date,
  .topbar-title small {
    display: none;
  }

  .metrics-grid-3,
  .metrics-grid-6,
  .metrics-grid-7,
  .mini-stat-grid,
  .auth-brand-stats,
  .wizard-progress {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  body.is-public .auth-background {
    padding: 20px;
  }

  .landing-actions .btn {
    flex: 1 1 calc(50% - 6px);
  }

  .hero-highlight-head {
    align-items: flex-start;
  }
}

@media (max-width: 767.98px) {
  body.is-public .auth-background {
    padding: 16px;
  }

  body.is-public .auth-grid {
    gap: 16px;
  }

  body.is-public .auth-brand-card {
    padding: 22px;
    border-radius: 28px;
  }

  body.is-public .auth-brand-card h1 {
    font-size: 1.75rem;
  }

  body.is-public .auth-brand-stats {
    grid-template-columns: 1fr;
    margin-top: 20px;
  }

  .landing-card,
  .landing-hero-card {
    padding: 18px;
    border-radius: 24px;
  }

  .landing-title {
    font-size: clamp(1.45rem, 7vw, 1.85rem);
    line-height: 1.25;
  }

  .landing-subtitle {
    font-size: 0.95rem;
  }

  .landing-stat-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 18px;
  }

  .landing-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .landing-actions .btn {
    width: 100%;
  }

  .filter-panel {
    gap: 8px;
  }

  .filter-chip {
    width: 100%;
    border-radius: 18px;
  }

  .guest-success-banner {
    padding: 16px;
    border-radius: 18px;
  }

  .hero-highlight-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-inline-action {
    width: 100%;
  }

  .wizard-progress {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 2px 2px 8px;
    margin-bottom: 18px;
    scroll-snap-type: x proximity;
  }

  .wizard-progress::-webkit-scrollbar {
    height: 6px;
  }

  .wizard-progress::-webkit-scrollbar-thumb {
    background: rgba(168, 85, 247, 0.25);
    border-radius: 999px;
  }

  .wizard-step-pill {
    flex: 0 0 220px;
    min-width: 220px;
    padding: 12px;
    scroll-snap-align: start;
  }

  .wizard-step-pill strong {
    font-size: 0.95rem;
  }

  .wizard-step-pill small {
    font-size: 0.78rem;
    line-height: 1.35;
  }

  .wizard-choice-body,
  .wizard-review-card {
    padding: 18px;
  }

  .wizard-review-list div {
    flex-direction: column;
    gap: 6px;
  }

  .wizard-review-list strong {
    text-align: left;
  }

  .upload-preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .preview-card {
    padding: 10px;
  }

  .preview-card img {
    height: 96px;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 14px;
  }

  .feature-card {
    padding: 16px;
  }
}

@media (max-width: 575.98px) {
  .auth-background,
  .modern-section-card,
  .landing-card {
    padding: 18px;
  }

  .metrics-grid-3,
  .metrics-grid-6,
  .metrics-grid-7,
  .mini-stat-grid,
  .auth-brand-stats,
  .wizard-progress {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .landing-actions {
    width: 100%;
  }

  .hero-actions .btn,
  .landing-actions .btn {
    width: 100%;
  }

  .notification-panel {
    width: 100% !important;
  }

  .wizard-nav {
    flex-direction: column;
  }

  .wizard-nav .btn {
    width: 100%;
  }

  .guest-success-banner {
    flex-direction: column;
  }

  .upload-preview-grid {
    grid-template-columns: 1fr;
  }
}

html {
  scroll-padding-top: 88px;
}

.app-body {
  overflow-x: hidden;
}

.app-body.sidebar-open {
  overflow: hidden;
  touch-action: none;
}

.app-content-container {
  padding-inline: clamp(12px, 2vw, 24px);
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}

.app-sidebar {
  overscroll-behavior: contain;
}

.sidebar-brand {
  justify-content: space-between;
}

.sidebar-brand .d-flex {
  min-width: 0;
  flex: 1;
}

.sidebar-brand h5,
.sidebar-brand small,
.user-chip-text .name,
.user-chip-text small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-close {
  flex-shrink: 0;
}

.topbar-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.user-chip {
  max-width: min(100%, 320px);
}

.user-chip-text {
  min-width: 0;
}

.dropdown-menu-modern {
  min-width: 240px;
  max-width: min(92vw, 320px);
}

.app-footer,
.auth-footer {
  padding-bottom: max(16px, env(safe-area-inset-bottom));
}

.page-shell {
  gap: 20px;
}

.page-hero {
  padding: clamp(18px, 2.5vw, 28px);
}

.page-hero > div {
  min-width: 0;
}

.page-hero p {
  line-height: 1.7;
}

.card {
  border: 1px solid var(--ff-border);
  border-radius: var(--ff-radius-md);
  box-shadow: var(--ff-shadow-soft);
  background: rgba(255, 255, 255, 0.98);
}

.card-header {
  background: transparent;
  border-bottom-color: var(--ff-border);
}

.list-group-item {
  border-color: #f3ebff;
}

.list-group-item-action {
  border-radius: 14px;
}

.stat-card {
  padding: 18px;
  height: 100%;
}

.stat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.stat-head span,
.stat-label {
  display: block;
  color: var(--ff-text-soft);
  font-size: 0.88rem;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--ff-primary-soft);
  color: var(--ff-primary-dark);
  flex-shrink: 0;
}

.stat-value {
  font-size: clamp(1.35rem, 2.1vw, 1.95rem);
  font-weight: 700;
  line-height: 1.1;
}

.form-control,
.form-select,
.btn {
  min-height: 46px;
}

textarea.form-control {
  min-height: unset;
}

.table-card {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-card .table {
  min-width: 640px;
}

.btn-table-action {
  min-height: 40px;
}

.dataTables_wrapper .row {
  row-gap: 12px;
}

.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_paginate {
  width: 100%;
}

.dataTables_wrapper .dataTables_filter label,
.dataTables_wrapper .dataTables_length label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  margin: 0;
  color: var(--ff-text-soft);
}

.dataTables_wrapper .dataTables_filter input {
  width: 100% !important;
  margin-left: 0 !important;
}

.dataTables_wrapper .dataTables_length select {
  width: 100%;
}

.dataTables_wrapper .dataTables_paginate {
  display: flex;
  justify-content: flex-end;
}

.dataTables_wrapper .pagination {
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.dataTables_wrapper .page-link {
  border-radius: 12px;
  border-color: var(--ff-border);
}

.dataTables_wrapper .page-item.active .page-link {
  background: linear-gradient(135deg, var(--ff-primary), #c084fc);
  border-color: transparent;
}

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

@media (max-width: 991.98px) {
  .app-sidebar {
    width: min(86vw, 320px);
    left: 0;
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    box-shadow: 0 24px 40px rgba(15, 23, 42, 0.18);
  }

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

  .sidebar-backdrop {
    backdrop-filter: blur(3px);
  }

  .sidebar-link:hover,
  .sidebar-link.active {
    transform: none;
  }

  .topbar {
    padding: 12px 14px;
    align-items: flex-start;
  }

  .topbar-title h4 {
    font-size: 1rem;
  }

  .user-chip {
    padding: 6px 10px;
  }

  .user-chip-text small {
    display: none;
  }

  .notification-panel {
    width: min(100vw, 420px) !important;
  }

  .page-shell {
    gap: 18px;
  }
}

@media (max-width: 767.98px) {
  .app-content-container {
    padding-inline: 12px;
    padding-top: 18px;
  }

  .topbar {
    padding: 10px 12px;
    gap: 10px;
  }

  .topbar-title h4 {
    font-size: 0.98rem;
  }

  .topbar-title small {
    display: none;
  }

  .user-chip {
    padding: 6px 8px;
    border-radius: 14px;
  }

  .user-chip-text {
    display: none;
  }

  .dropdown-menu-modern {
    width: min(92vw, 280px);
  }

  .page-hero {
    padding: 18px;
    border-radius: 22px;
  }

  .page-hero h1 {
    font-size: clamp(1.25rem, 6vw, 1.7rem);
  }

  .page-hero p {
    font-size: 0.92rem;
  }

  .modern-section-card,
  .table-card,
  .auth-form-card {
    padding: 18px;
  }

  .metric-card,
  .stat-card {
    min-height: 0;
  }

  .metrics-grid-3 {
    grid-template-columns: 1fr;
  }

  .dt-buttons {
    width: 100%;
  }

  .dt-buttons .btn {
    flex: 1 1 calc(50% - 4px);
  }

  .dataTables_wrapper .dataTables_paginate,
  .dataTables_wrapper .pagination {
    justify-content: flex-start;
  }

  .table-card .table {
    min-width: 560px;
  }
}

@media (max-width: 575.98px) {
  .app-content-container {
    padding-inline: 10px;
  }

  .topbar-actions {
    gap: 8px;
  }

  .btn-icon-soft {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .dt-buttons .btn {
    flex: 1 1 100%;
  }

  .table-card .table {
    min-width: 520px;
  }

  .card {
    border-radius: 18px;
  }

  .stat-card {
    padding: 16px;
  }
}
