/* Loan Tracking Module - front page styling */

:root {
  --ltm-green: #1f8a70;
  --ltm-teal: #0f9d58;
  --ltm-orange: #f7941d;
  --ltm-dark: #0f172a;
  --ltm-muted: #64748b;
  --ltm-border: #e2e8f0;
  --ltm-surface: #ffffff;
  --ltm-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
}

.loan-tracking-page {
  background: #f8fafc;
  color: var(--ltm-dark);
  font-family: "Segoe UI", "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  padding-bottom: 4rem;
}

.loan-tracking-page .container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.hero-section {
  position: relative;
  overflow: hidden;
  background: url("../images/Banner Section.jpg") center / cover no-repeat;
  padding: 40px 0 0;
}

.hero-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}

.hero-copy {
  max-width: 540px;
  color: #ffffff;
}

.hero-copy h1 {
  /* font-size: clamp(2.3rem, 4vw, 3.2rem); */
  font-weight: 700;
  margin-bottom: 4rem;
}

.hero-copy p {
  font-size: 1.05rem;
  line-height: 1.7;
  opacity: 0.85;
}

.hero-visual {
  display: none;
}

.breadcrumb-section {
  background: #ffffff;
  border-bottom: 1px solid var(--ltm-border);
  padding: 0px;
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 0;
  font-size: 0.95rem;
  color: var(--ltm-muted);
}

.breadcrumb-nav a {
  color: var(--ltm-dark);
  text-decoration: none;
  font-weight: 600;
}

.breadcrumb-nav a:hover {
  color: var(--ltm-orange);
}

.breadcrumb-separator {
  color: rgba(100, 116, 139, 0.6);
}

.tracking-section .container {
  max-width: 1100px;
  margin-top: 50px;
}

.tracking-card {
  margin-top: -2.8rem;
  background: var(--ltm-surface);
  border-radius: 24px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

.tracking-card__header {
  padding: 2rem 2.5rem 1.25rem;
  text-align: center;
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

.tracking-card__header h2 {
  font-size: 1.85rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--ltm-dark);
  text-align: center;
}

.tracking-card__header p {
  margin: 0;
  color: var(--ltm-muted);
  font-size: 1.02rem;
}

.tracking-card__body {
  padding: 2rem 2.5rem 2.5rem;
}

.form-grid {
  display: grid;
  gap: 1.8rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.form-field label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ltm-dark);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.required {
  color: #ef4444;
  font-size: 1rem;
  line-height: 1;
}

.input-with-action {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-action.input-with-link .form-control {
  padding-right: 8.5rem;
}

.inline-action {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.2rem 0;
  min-width: 7.5rem;
  text-align: right;
  text-decoration: none;
  background: transparent;
  border: none;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.link-action {
  color: var(--ltm-orange);
}

.link-action:hover {
  color: #de7e0d;
  text-shadow: 0 0 12px rgba(247, 148, 29, 0.35);
}

.link-action.disabled,
.link-action[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.masked-input {
  letter-spacing: 0.35rem;
}

.masked-input-app {
  letter-spacing: 0.2rem;
}

.input-with-action.no-button {
  display: block;
}

.input-with-action.no-button .form-control {
  width: 100%;
}

.form-control {
  flex: 1;
  border: 1.5px solid var(--ltm-border);
  border-radius: 14px;
  padding: 0.85rem 1.1rem;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background: #f8fafc;
}

.form-control:focus {
  border-color: var(--ltm-teal);
  box-shadow: 0 0 0 3px rgba(15, 157, 88, 0.15);
  outline: none;
  background: #ffffff;
}

.form-control--select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  padding-right: 2.8rem;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(15, 23, 42, 0.5) 50%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.5) 50%, transparent 50%),
    linear-gradient(to right, rgba(15, 23, 42, 0.15), rgba(15, 23, 42, 0.15));
  background-position:
    calc(100% - 1.6rem) center,
    calc(100% - 1.2rem) center,
    calc(100% - 2.4rem) 50%;
  background-size: 10px 10px, 10px 10px, 1px 55%;
  background-repeat: no-repeat;
}

.form-control--select::-ms-expand {
  display: none;
}

.link-button {
  border: none;
  background: transparent;
  color: var(--ltm-orange);
  font-weight: 600;
  cursor: pointer;
  padding: 0.4rem 0.2rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.link-button:hover {
  color: #de7e0d;
}

.link-button:disabled {
  color: rgba(247, 148, 29, 0.4);
  cursor: not-allowed;
}

.otp-inline {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.otp-input {
  text-align: center;
  letter-spacing: 0.25rem;
  font-weight: 700;
  font-size: 1.2rem;
}

.btn {
  border-radius: 14px;
  padding: 0.85rem 1.6rem;
  font-size: 0.98rem;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  border: none;
}

.btn-primary {
  border-radius: 14px;
  background: linear-gradient(135deg, #fbb040 0%, var(--ltm-orange) 100%);
  color: #fff;
  box-shadow: 0 12px 25px rgba(247, 148, 29, 0.25);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 30px rgba(247, 148, 29, 0.35);
}

.btn-orange {
  border-radius: 14px;
  background: #f7941d !important;
  color: #fff !important;
  box-shadow: 0 12px 25px rgba(255,122, 24, 0.25) !important;
}

.btn-orange:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 30px rgba(255, 122, 24, 0.35);
}

.btn-outline {
  background: rgba(15, 157, 88, 0.08);
  color: var(--ltm-teal);
  border: 1px solid rgba(15, 157, 88, 0.28);
}

.btn-outline:hover {
  background: rgba(15, 157, 88, 0.16);
}

.btn:disabled {
  opacity: 0.55;
  box-shadow: none;
  transform: none;
  cursor: not-allowed;
}

.helper-text {
  font-size: 0.85rem;
  color: var(--ltm-muted);
  line-height: 1.4;
}

.helper-text.resend {
  font-weight: 600;
  color: var(--ltm-dark);
}

.resend-link {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--ltm-orange);
  font-weight: 600;
  text-decoration: none;
  margin-top: -0.2rem;
}

.resend-link:hover {
  color: #de7e0d;
}

.back-link {
  display: none;
}

.form-actions {
  margin-top: 1.2rem;
  display: flex;
  justify-content: center;
}

.alert-container {
  margin-top: 2rem;
}

.alert-container-inline {
  margin-top: 0.75rem;
}

.alert-container-inline .alert {
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  margin-bottom: 0;
}

.alert {
  border-radius: 16px;
  border: none;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert-success {
  background: rgba(15, 157, 88, 0.12);
  color: var(--ltm-teal);
}

.alert-danger {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.application-results {
  margin-top: 2.5rem;
  animation: slideUp 0.45s ease;
}

.status-card {
  background: var(--ltm-surface);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--ltm-shadow);
}

.status-card__header {
  background: linear-gradient(120deg, rgba(15, 157, 88, 0.95) 0%, rgba(13, 148, 136, 0.95) 100%);
  color: #ffffff;
  padding: 1.8rem 2.4rem;
  text-align: center;
}

.status-card__header h3 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 700;
}

.status-card__header p {
  margin: 0.4rem 0 0;
  opacity: 0.85;
  font-size: 0.95rem;
}

.status-card__body {
  padding: 2rem 2.4rem 2.2rem;
}

.support-text {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: var(--ltm-muted);
}

.status-table table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 16px;
  overflow: hidden;
}

.status-table thead tr {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.75));
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
}

.status-table th,
.status-table td {
  padding: 1.05rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

.status-table tbody tr:hover {
  background: rgba(15, 157, 88, 0.05);
}

.status-table tbody tr:last-child td {
  border-bottom: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 1.2rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ffffff;
}

.bg-success {
  background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%) !important;
}

.bg-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%) !important;
  color: #2f1f05 !important;
}

.bg-danger {
  background: linear-gradient(135deg, #dc2626 0%, #f87171 100%) !important;
}

.bg-info {
  background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%) !important;
}

.bg-secondary {
  background: linear-gradient(135deg, #475569 0%, #334155 100%) !important;
}

.no-applications {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--ltm-muted);
}

.no-applications h4 {
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--ltm-dark);
}

.no-applications p {
  margin: 0;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1024px) {
  .hero-layout {
    flex-direction: column;
    align-items: flex-start;
  }

  .tracking-card__body {
    padding: 2rem 2.4rem 2.6rem;
  }
}

@media (max-width: 768px) {
  .hero-overlay {
    padding: 2.2rem 0 3rem;
  }

  .hero-copy {
    text-align: center;
  }

  .tracking-card {
    margin-top: -2.5rem;
  }

  .tracking-card__header,
  .tracking-card__body {
    padding: 2rem 1.6rem;
  }
  .form-row,
  .application-section .form-row {
    grid-template-columns: 1fr;
  }

  .otp-inline {
    flex-direction: column;
    align-items: stretch;
  }

  .input-with-action {
    flex-direction: column;
    align-items: stretch;
  }

  .input-with-action.input-with-link .form-control {
    padding-right: 1.1rem;
  }

  .inline-action {
    position: static;
    transform: none;
    margin-top: 0.6rem;
    text-align: left;
  }

.status-card__body {
    padding: 1.6rem;
  }

  .status-table th,
  .status-table td {
    padding: 0.85rem 0.9rem;
    font-size: 0.92rem;
  }

  .masked-input {
    letter-spacing: 0.2rem;
  }
}

@media (max-width: 576px) {
  .hero-copy h1 {
    font-size: 2.1rem;
  }

  .hero-copy p {
    font-size: 0.98rem;
  }

  .tracking-section .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .tracking-card__header h2 {
    font-size: 1.55rem;
  }

  .tracking-card__header p {
    font-size: 0.95rem;
  }

  .tracking-card__body {
    padding: 1.8rem;
  }

  .btn {
    width: 100%;
  }

  .form-actions {
    justify-content: stretch;
  }

  .inline-action {
    font-size: 0.8rem;
  }

  .masked-input {
    letter-spacing: 0.15rem;
  }
}