/* Inner pages — extends css/styles.css (FinLedger theme) */

.app-page {
  min-height: 100vh;
}

.app-main {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 32px) 24px 48px;
}

.landing-page .footer {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* Inner landing pages (Leads, Loans, Analytics) */
.page-hero {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 48px) 24px 48px;
  text-align: center;
}
.page-hero .badge {
  margin-bottom: 16px;
}
.page-hero__title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 16px;
}
.page-hero__title em {
  font-style: italic;
  color: var(--cyan);
}
.page-hero__subtitle {
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 28px;
  font-size: 1.05rem;
}
.page-hero__stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}
.preview-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
}
.preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.preview-table th,
.preview-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.preview-table th {
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.preview-table tbody tr:hover {
  background: rgba(0, 212, 255, 0.04);
}
.status-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--cyan-dim);
  color: var(--cyan);
}
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}
.analytics-stat {
  padding: 24px;
  border-radius: var(--radius);
  text-align: center;
}
.analytics-stat strong {
  display: block;
  font-size: 2rem;
  color: var(--cyan);
  margin-bottom: 4px;
}
.analytics-stat span {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.app-footer {
  max-width: 1200px;
  margin-top: auto;
}

.app-page-title {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 8px;
  color: var(--text);
}

.app-page-sub {
  color: var(--text-muted);
  margin-bottom: 28px;
  font-size: 0.95rem;
}

/* Grid (Bootstrap-compatible subset) */
.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -12px;
}
.row.g-3 > [class*="col"] { padding: 12px; }
.row.g-4 > [class*="col"] { padding: 16px; }
.col-6 { flex: 0 0 50%; max-width: 50%; padding: 0 12px; }
.col-12 { flex: 0 0 100%; max-width: 100%; padding: 0 12px; }
.col-md-3 { flex: 0 0 100%; max-width: 100%; padding: 0 12px; }
.col-md-4 { flex: 0 0 100%; max-width: 100%; padding: 0 12px; }
.col-md-6 { flex: 0 0 100%; max-width: 100%; padding: 0 12px; }
.col-lg-3 { flex: 0 0 100%; max-width: 100%; padding: 0 12px; }
.col-lg-4 { flex: 0 0 100%; max-width: 100%; padding: 0 12px; }
.col-lg-5 { flex: 0 0 100%; max-width: 100%; padding: 0 12px; }
.col-lg-7 { flex: 0 0 100%; max-width: 100%; padding: 0 12px; }
.col-lg-8 { flex: 0 0 100%; max-width: 100%; padding: 0 12px; }

@media (min-width: 768px) {
  .col-md-3 { flex: 0 0 25%; max-width: 25%; }
  .col-md-4 { flex: 0 0 33.333%; max-width: 33.333%; }
  .col-md-6 { flex: 0 0 50%; max-width: 50%; }
}
@media (min-width: 992px) {
  .col-lg-3 { flex: 0 0 25%; max-width: 25%; }
  .col-lg-4 { flex: 0 0 33.333%; max-width: 33.333%; }
  .col-lg-5 { flex: 0 0 41.666%; max-width: 41.666%; }
  .col-lg-7 { flex: 0 0 58.333%; max-width: 58.333%; }
  .col-lg-8 { flex: 0 0 66.666%; max-width: 66.666%; }
}

.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }
.py-4 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-5 { padding-top: 3rem; padding-bottom: 3rem; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.w-100 { width: 100% !important; }
.small { font-size: 0.875rem; }
.h3 { font-size: 1.5rem; font-weight: 600; }
.h5 { font-size: 1.1rem; font-weight: 600; }
.h6 { font-size: 1rem; font-weight: 600; }
.fs-4 { font-size: 1.5rem; font-weight: 700; }
.fw-bold { font-weight: 700; }
.text-center { text-align: center; }
.text-light { color: var(--text) !important; }

.d-flex { display: flex; }
.d-inline { display: inline; }
.d-none { display: none !important; }
.flex-column { flex-direction: column; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-wrap { flex-wrap: wrap; }
.align-items-center { align-items: center; }
.align-items-start { align-items: flex-start; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }

/* Cards */
.card-dark {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
}
.card-dark:hover {
  border-color: rgba(0, 212, 255, 0.2);
}

.stat-card-blue { border-left: 4px solid var(--blue); }
.stat-card-green { border-left: 4px solid var(--green); }
.stat-card-orange { border-left: 4px solid #f59e0b; }
.stat-card-purple { border-left: 4px solid var(--cyan); }
.stat-card-red { border-left: 4px solid #ef4444; }
.stat-card-teal { border-left: 4px solid #14b8a6; }
.stat-card-gold { border-left: 4px solid #eab308; }

.text-muted-custom { color: var(--text-muted) !important; }

/* Tables */
.table-responsive { overflow-x: auto; }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.table-dark-custom th,
.table-dark-custom td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.table-dark-custom th {
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.table-dark-custom tbody tr:hover {
  background: rgba(0, 212, 255, 0.04);
}
.table-dark-custom a {
  color: var(--cyan);
}

/* Forms */
.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.form-control,
.form-select {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
}
.form-control:focus,
.form-select:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px var(--cyan-dim);
}
.form-select-sm,
.form-control-sm {
  padding: 6px 10px;
  font-size: 0.8rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.875rem;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-primary-custom {
  background: var(--gradient-btn);
  color: #050a14;
  border: none;
}
.btn-primary-custom:hover { transform: translateY(-1px); }
.btn-success-custom {
  background: var(--green);
  color: #050a14;
  border: none;
}
.btn-success-custom:hover { filter: brightness(1.05); }
.btn-outline-light {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-outline-light:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}
.btn-outline-danger {
  background: transparent;
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.4);
}
.btn-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}

/* Alerts */
.alert {
  padding: 14px 18px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.alert-success {
  background: rgba(0, 230, 118, 0.12);
  border: 1px solid rgba(0, 230, 118, 0.35);
  color: var(--green);
}
.alert-danger {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fca5a5;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
}
.bg-secondary { background: rgba(255, 255, 255, 0.1); color: var(--text-muted); }
.bg-info { background: var(--cyan-dim); color: var(--cyan); }
.bg-warning { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.bg-success { background: rgba(0, 230, 118, 0.15); color: var(--green); }
.bg-danger { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.bg-primary { background: var(--cyan-dim); color: var(--cyan); }

.list-group-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.list-group-flush .list-group-item:last-child {
  border-bottom: none;
}
.bg-transparent { background: transparent !important; }
.border-custom { border-color: var(--border) !important; }
.px-0 { padding-left: 0 !important; padding-right: 0 !important; }
hr.border-custom {
  border: none;
  border-top: 1px solid var(--border);
  margin: 16px 0;
}

/* Content page (about, contact) */
.landing-main.login-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 32px) 24px 48px;
}

.landing-main.register-page-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 32px) 24px 48px;
}

.contact-page .contact-section {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.content-card {
  padding: 32px;
  border-radius: var(--radius-lg);
}

/* DSA sidebar (with global top nav) */
.sidebar-panel {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
  min-height: auto;
}
.sidebar-panel .nav-link {
  display: block;
  color: var(--text-muted);
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 4px;
  text-decoration: none;
  font-size: 0.9rem;
}
.sidebar-panel .nav-link:hover,
.sidebar-panel .nav-link.active {
  background: var(--cyan-dim);
  color: var(--cyan);
}
.col-lg-2.sidebar-panel,
aside.sidebar-panel {
  flex: 0 0 220px;
  max-width: 220px;
}
@media (max-width: 991px) {
  .col-lg-2.sidebar-panel,
  aside.sidebar-panel {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* Standalone auth (no site header/footer) */
.auth-page--standalone .auth-page__main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px 16px;
}
.auth-page--standalone .content-card {
  width: 100%;
  max-width: 420px;
}

/* User login / register within public layout */
.user-auth-wrap {
  max-width: 420px;
  margin: 0 auto;
  padding: 48px 16px 56px;
}
.user-auth-wrap--wide {
  max-width: 760px;
}

/* Password show / hide */
.password-field {
  position: relative;
  display: block;
}
.password-field .form-control {
  padding-right: 2.75rem;
}
.password-field__toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.password-field__toggle:hover {
  color: var(--cyan);
  background: var(--cyan-dim);
}
.password-field__toggle:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}
.password-field__svg {
  width: 20px;
  height: 20px;
  display: block;
}
.password-field__icon--hide {
  display: none;
}
.password-field.is-visible .password-field__icon--show {
  display: none;
}
.password-field.is-visible .password-field__icon--hide {
  display: block;
}

[data-theme="light"] .password-field__toggle {
  color: #64748b;
}
[data-theme="light"] .password-field__toggle:hover {
  color: var(--cyan);
  background: var(--cyan-dim);
}

/* Mobile nav — show actions when open */
