* {
  box-sizing: border-box;
}

body {
  margin: 0;
  /*padding: 40px 20px;*/
  background: #eef4fa;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.card {
 /* max-width: 640px; */
  margin: 0 auto;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid #dce8f5;
  background: #ffffff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

/* Stepper header */
.stepper {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #c8dff5;
  background: #e2f2ff;
  padding: 20px 32px;
}

.step {
  display: flex;
  flex-grow: 1;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  color: #8faec8;
}

.step.active {
  color: #003d7a;
}

.step-icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  border: 2px solid #b0cce6;
  background: #ffffff;
  color: #8faec8;
  transition: all 250ms;
}

.step.active .step-icon {
  border-color: #005cab;
  background: #005cab;
  color: #ffffff;
}

.step-label {
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  color: #5a7fa0;
}

.step.active .step-label {
  color: #003d7a;
}

.chevron {
  flex-shrink: 0;
  color: #8faec8;
}

/* Form body */
.card-body {
  background: #f5faff;
  padding: 32px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.form-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #334155;
}

.required {
  color: #dc2626;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  pointer-events: none;
  color: #86829b;
}

.form-input {
  width: 100%;
  padding: 13px 16px 13px 44px;
  border-radius: 0.75rem;
  border: 1.5px solid #c8dff5;
  font-size: 0.95rem;
  background: #ffffff;
  color: #1e293b;
  transition: all 200ms;
  outline: none;
}

.form-input::placeholder {
  color: #86829b;
}

.form-input:focus {
  border-color: #005cab;
  box-shadow: 0 0 0 3px rgba(0, 92, 171, 0.1);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 0.75rem;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 200ms, opacity 200ms;
}

.btn-primary {
  background: #005cab;
  color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
  background: #004a8a;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.note {
  border-radius: 12px;
  /*border: 1px solid #dce8f5;*/
  background: #fff;
  padding: 16px 20px;
  font-size: 0.85rem;
  line-height: 1.7;
  color: #475569;
  margin-top: 20px;
}

.note strong {
  color: #1e293b;
}

.note a {
  color: #005cab;
  text-decoration: none;
}

.note a:hover {
  text-decoration: underline;
}

@media (max-width: 480px) {
  .stepper {
    flex-wrap: wrap;
    gap: 6px;
    padding: 16px 20px;
  }

  .step-label {
    display: none;
  }
}

/* ===============================
   Payment Summary
=================================*/

.payment-summary{
    background:#fff;
    border:1px solid #c8dff5;
    border-radius:12px;
    overflow:hidden;
    margin-bottom:25px;
}

.payment-summary-header{
    background:#005cab;
    color:#fff;
    padding:12px 18px;
    font-size:15px;
    font-weight:600;
}

.payment-summary-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:14px 18px;
    border-top:1px solid #edf2f7;
    font-size:.9rem;
    color:#475569;
}

.payment-summary-row strong{
    color:#1e293b;
}

.payment-summary-total{
    background:#e2f2ff;
    color:#005cab;
    font-weight:700;
}

.payment-summary-total span:last-child{
    font-size:1.2rem;
    font-weight:700;
}

/* ===============================
   Details
=================================*/

.details-row{
    display:flex;
    gap:45px;
    margin-bottom:28px;
    align-items:flex-start;
}

.details-grid{
    display:grid;
    grid-template-columns:170px 15px auto;
    row-gap:14px;
    column-gap:10px;
    flex:1;
}

.dg-label{
    font-weight:600;
    color:#005cab;
    font-size:.9rem;
}

.dg-colon{
    color:#005cab;
    font-weight:600;
}

.dg-value{
    color:#1e293b;
    font-size:.9rem;
    /*word-break:break-word;*/
}

/* ===============================
   Address
=================================*/

.address-block{
    flex:1;
}

.address-title{
    color:#005cab;
    font-weight:700;
    margin-bottom:12px;
    font-size:.95rem;
}

.address-name{
    font-weight:600;
    color:#1e293b;
    margin-bottom:8px;
}

.address-line{
    color:#475569;
    margin-bottom:6px;
    line-height:1.5;
    font-size:.9rem;
}

/* ===============================
   Checkbox
=================================*/

.confirm-label{
    display:flex;
    align-items:flex-start;
    gap:10px;
    cursor:pointer;
    margin:25px 0;
    color:#005cab;
    font-weight:600;
    font-size:.9rem;
}

.checkbox-wrap{
    position:relative;
    width:18px;
    height:18px;
    flex-shrink:0;
}

.checkbox-wrap input{
    position:absolute;
    inset:0;
    opacity:0;
    cursor:pointer;
}

.checkbox-box{
    position:absolute;
    inset:0;
    border:2px solid #c8dff5;
    border-radius:5px;
    background:#fff;
    transition:.2s;
}

.checkbox-wrap input:checked + .checkbox-box{
    background:#005cab;
    border-color:#005cab;
}

/* ===============================
   Outline Button
=================================*/

.btn-outline{
    background:#fff;
    color:#475569;
    border:1px solid #c8dff5;
}

.btn-outline:hover{
    background:#f4f8fc;
}

/* ===============================
   Responsive
=================================*/

@media(max-width:768px){

.details-row{
    flex-direction:column;
    gap:30px;
}

.details-grid{
    grid-template-columns:140px 15px auto;
}

.payment-summary-row{
    font-size:.85rem;
}

.payment-summary-total span:last-child{
    font-size:1rem;
}

}

/* Completed Step */
.step.done {
    color: #16a34a;
}

.step.done .step-icon {
    border-color: #16a34a;
    background: #16a34a;
    color: #fff;
}

.step.done .step-label {
    color: #16a34a;
}

.step.done + .chevron {
    color: #16a34a;
}

.step.done .step-icon svg {
    display: none;
}

.step.done .step-icon::before {
    content: "✓";
    font-size: 16px;
    font-weight: bold;
    color: #fff;
}

/* ===============================
   Quick-Links Sidebar
   (Billing & Payment, Applications, etc.)
=================================*/

.cesc-main-grid {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    align-items: start;
    gap: 24px;
    padding: 24px 0 48px;
}

@media (max-width: 991px) {
    .cesc-main-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .cesc-sidebar {
        display: none;
    }
}

.cesc-sidebar {
    position: sticky;
    top: 24px;
}

.cesc-sb-accordion {
    background: #ffffff;
    border: 1px solid #dce8f5;
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.cesc-sb-item + .cesc-sb-item {
    border-top: 1px solid #edf2f7;
}

.cesc-sb-header {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 14px 18px;
    border: 0;
    background: #ffffff;
    color: #475569;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
    transition: background 200ms, color 200ms;
}

.cesc-sb-header:hover {
    background: #f5faff;
    color: #005cab;
}

.cesc-sb-header.active,
.cesc-sb-header[aria-expanded='true'] {
    background: #e2f2ff;
    color: #005cab;
}

.cesc-sb-header-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: inherit;
}

.cesc-sb-label {
    flex: 1 1 auto;
}

.cesc-sb-chevron {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    color: #8faec8;
    transition: transform 200ms;
}

.cesc-sb-header[aria-expanded='true'] .cesc-sb-chevron {
    color: #005cab;
    transform: rotate(180deg);
}

.cesc-sb-children {
    display: none;
    flex-direction: column;
    padding: 6px 12px 12px 15px; /*44px*/
    background: #f5faff;
}

.cesc-sb-item.open .cesc-sb-children {
    display: flex;
}

.cesc-sb-child-link {
    padding: 8px 12px;
    border-radius: 0.6rem;
    color: #475569;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background 200ms, color 200ms;
}

.cesc-sb-child-link:hover {
    background: #e2f2ff;
    color: #005cab;
}

.cesc-sb-child-link.active {
    background: #005cab;
    color: #ffffff;
}

/* =====================================================
   COLUMN 2: CONTENT
===================================================== */
.content-col { display: flex; flex-direction: column; width: 700px;}

/* Page title row */
.title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.page-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--gray-900);
  display: flex;
  align-items: center;
  gap: 10px;
}
.page-title svg { color: var(--primary); }

/* =====================================================
   PROGRESS STEPPER  (matches PaymentFlow/index.tsx)
===================================================== */
.pf-card {
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid #dce8f5;
  background: #ffffff;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  margin-bottom: 20px;
}
.pf-stepper-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #c8dff5;
  background: #e2f2ff;
  padding: 20px 32px;
}
.pf-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex-grow: 1;
  color: #8faec8;
}
@media (min-width:1280px) {
  .pf-step { flex-direction: row; flex-grow: 0; }
}
.pf-step.active { color: var(--primary); }
.pf-step.done   { color: #16a34a; }
.pf-step-circle {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid #b0cce6;
  background: #ffffff;
  color: #8faec8;
  flex-shrink: 0;
  transition: all 0.25s;
}
.pf-step.active .pf-step-circle {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
}
.pf-step.done .pf-step-circle {
  border-color: #22c55e;
  background: #22c55e;
  color: #ffffff;
}
.pf-step-label {
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  color: #5a7fa0;
}
.pf-step.active .pf-step-label { color: #003d7a; }
.pf-step.done   .pf-step-label { color: #15803d; }
@media (max-width: 480px) { .pf-step-label { display: none; } }
.pf-chevron {
  flex-shrink: 0;
  color: #8faec8;
}
.pf-body {
  background: #f5faff;
  padding: 32px;
}
@media (max-width:640px) { .pf-body { padding: 20px; } }

/* =====================================================
   ACCOUNT INFO CARD (matches ViewBill.tsx)
===================================================== */
.vb-header-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 16px;
  border: 1px solid #dce8f5;
  background: #ffffff;
  padding: 16px 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  margin-bottom: 20px;
}
.vb-header-left { display: flex; align-items: center; gap: 12px; }
.vb-icon-box {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: #e2f2ff;
  flex-shrink: 0;
  color: #005cab;
}
.vb-title {
  font-size: 1rem; font-weight: 700;
  color: #1e293b;
}
.vb-sub {
  font-size: 0.75rem; color: #64748b;
}

.vb-summary {
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid #dce8f5;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  margin-bottom: 20px;
}
.vb-summary-head {
  padding: 14px 24px;
  border-bottom: 1px solid #eef4fb;
  background: #f5faff;
}
.vb-summary-head span {
  font-size: 0.875rem; font-weight: 700; color: #334155;
}
.vb-row {
  display: flex; align-items: center;
  padding: 14px 24px;
  border-top: 1px solid #eef4fb;
}
.vb-row:first-child { border-top: none; }
.vb-row:nth-child(odd)  { background: #ffffff; }
.vb-row:nth-child(even) { background: #f9fbfd; }
.vb-row-label {
  width: 200px; flex-shrink: 0;
  font-size: 0.875rem; font-weight: 600; color: #64748b;
}
.vb-row-colon { margin-right: 12px; color: #cbd5e1; }
.vb-row-value {
  font-size: 0.875rem; font-weight: 600; color: #1e293b;
}

.bill-row-card {
  display: flex;
  align-items: center;
  gap: 16px;
  border-radius: 16px;
  border: 1px solid #dce8f5;
  background: #ffffff;
  padding: 16px 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  margin-bottom: 12px;
}
.brc-icon-box {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: #e2f2ff;
  flex-shrink: 0;
  color: #005cab;
}
.brc-info { flex: 1; min-width: 0; }
.brc-period {
  font-weight: 600; color: #1e293b; font-size: 0.9375rem;
}
.brc-meta {
  display: flex; align-items: center; gap: 16px;
  margin-top: 2px;
}
.brc-amount {
  font-size: 0.875rem; color: #475569;
}
.brc-amount strong { font-weight: 600; color: #0f172a; }
.brc-due { font-size: 0.875rem; color: #92400e; }
.btn-download-sm {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  font-size: 0.75rem; font-weight: 600;
  background: #005cab; color: #ffffff;
  border-radius: 8px;
  flex-shrink: 0;
  transition: background 0.2s;
  white-space: nowrap;
}
.btn-download-sm:hover { background: #004a9a; }