/* app.css — Loan application and admin styles. Landing theme in theme.css. */
.app-wrapper {
  min-height: 100vh;
  background: var(--cream);
  display: flex;
  flex-direction: column;
}

/* App nav — matches landing nav styling */
.app-nav {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--warm-white);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.app-nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--brown-dark);
  text-decoration: none;
}
.app-nav-back {
  font-size: 14px;
  color: var(--green-mid);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.app-nav-back:hover { color: var(--green-deep); }

/* App container */
.app-container {
  flex: 1;
  max-width: 540px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  width: 100%;
}

/* Step indicator */
.app-steps {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 36px;
}
.app-step {
  height: 4px;
  flex: 1;
  background: var(--border);
  border-radius: 2px;
  transition: background 0.3s;
}
.app-step.active { background: var(--green-mid); }
.app-step.done { background: var(--green-deep); }

/* Page heading */
.app-heading {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--brown-dark);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  line-height: 1.2;
}
.app-subheading {
  font-size: 15px;
  color: var(--brown-light);
  margin-bottom: 32px;
  line-height: 1.5;
}

/* Form */
.app-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.app-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--brown-mid);
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}
.app-field input,
.app-field select {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  background: var(--warm-white);
  font-size: 16px;
  font-family: 'DM Sans', sans-serif;
  color: var(--brown-dark);
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.app-field input:focus,
.app-field select:focus {
  outline: none;
  border-color: var(--green-mid);
}
.app-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237a6252' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}
.app-field .hint {
  font-size: 12px;
  color: var(--brown-light);
  margin-top: 6px;
}

/* Loan amount grid */
.amount-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.amount-option {
  position: relative;
}
.amount-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.amount-option label {
  display: block;
  padding: 14px 8px;
  text-align: center;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--brown-mid);
  background: var(--warm-white);
  cursor: pointer;
  transition: all 0.2s;
}
.amount-option input:checked + label {
  border-color: var(--green-mid);
  background: var(--green-mid);
  color: #fff;
  font-weight: 600;
}

/* Checkbox field */
.app-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: var(--surface);
  border-radius: 4px;
  border: 1px solid var(--border);
  cursor: pointer;
}
.app-checkbox input[type="checkbox"] {
  margin-top: 2px;
  width: 18px;
  height: 18px;
  accent-color: var(--green-mid);
  flex-shrink: 0;
}
.app-checkbox span {
  font-size: 14px;
  color: var(--brown-mid);
  line-height: 1.5;
}

/* Submit button */
.app-btn {
  width: 100%;
  padding: 16px;
  background: var(--green-deep);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: background 0.2s;
  margin-top: 8px;
}
.app-btn:hover { background: var(--green-mid); }
.app-btn:disabled { background: var(--border); color: var(--brown-light); cursor: not-allowed; }

/* Error message */
.app-error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 4px;
  padding: 12px 16px;
  font-size: 14px;
  color: #991b1b;
  margin-bottom: 20px;
}

/* OTP input */
.otp-input {
  font-size: 28px !important;
  text-align: center;
  letter-spacing: 0.3em;
  font-weight: 600;
}

/* Confirmation screen */
.confirmed-icon {
  width: 72px;
  height: 72px;
  background: var(--green-deep);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 28px;
  color: #fff;
  font-size: 36px;
}
.confirmed-amount {
  font-family: 'Playfair Display', serif;
  font-size: 52px;
  font-weight: 700;
  color: var(--green-deep);
  letter-spacing: -0.04em;
  margin-bottom: 4px;
}
.confirmed-label {
  font-size: 13px;
  color: var(--brown-light);
  margin-bottom: 32px;
}
.confirmed-info {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 20px;
  font-size: 14px;
  color: var(--brown-mid);
  line-height: 1.7;
  text-align: center;
}

/* Admin panel */
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}
.admin-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--brown-dark);
}
.admin-stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.admin-stat {
  text-align: center;
}
.admin-stat .num {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--green-deep);
}
.admin-stat .label {
  font-size: 12px;
  color: var(--brown-light);
  margin-top: 2px;
}
.status-filter {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.filter-btn {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  border: 1.5px solid var(--border);
  background: var(--warm-white);
  color: var(--brown-mid);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}
.filter-btn.active, .filter-btn:hover {
  border-color: var(--green-mid);
  background: var(--green-mid);
  color: #fff;
}

/* Application table */
.app-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.app-table th {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 2px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brown-light);
}
.app-table td {
  padding: 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.app-table tr:hover td { background: var(--surface); }
.app-name { font-weight: 600; color: var(--brown-dark); }
.app-phone { color: var(--brown-light); font-size: 13px; margin-top: 2px; }
.app-loan { font-weight: 700; color: var(--green-deep); font-size: 15px; }
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.status-pending { background: #fef3c7; color: #92400e; }
.status-reviewing { background: #dbeafe; color: #1e40af; }
.status-approved { background: #d1fae5; color: #065f46; }
.status-rejected { background: #fee2e2; color: #991b1b; }
.app-date { font-size: 12px; color: var(--brown-light); margin-top: 2px; }

.status-form {
  display: flex;
  gap: 6px;
}
.status-form select {
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  background: var(--warm-white);
  color: var(--brown-dark);
}
.status-form button {
  padding: 4px 10px;
  background: var(--green-mid);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
}
.pagination a, .pagination span {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 14px;
  color: var(--brown-mid);
  text-decoration: none;
}
.pagination a:hover { background: var(--surface); }
.pagination .current { background: var(--green-mid); color: #fff; border-color: var(--green-mid); }

/* Mobile */
@media (max-width: 480px) {
  .amount-grid { grid-template-columns: repeat(2, 1fr); }
  .app-heading { font-size: 24px; }
  .admin-header { flex-direction: column; align-items: flex-start; }
  .app-table { font-size: 13px; }
  .app-table th, .app-table td { padding: 10px 8px; }
}