:root {
    --navy: #0b1a78;
    --navy-soft: #eaf2fb;
    --red: #ff1a00;
    --blue: #0a4bd8;
    --border: #d9dde5;
    --text: #222;
    --muted: #6b7280;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Mukta', 'Noto Sans Devanagari', system-ui, sans-serif;
    color: var(--text);
    background: #fff;
    font-size: 16px;
}

.page { max-width: 1100px; margin: 0 auto; padding: 24px 16px 48px; }

.site-header { position: relative; text-align: center; }
.site-header h1 { font-size: 28px; font-weight: 700; margin: 8px 0 20px; color: #2b2b2b; }
.banner {
    background: #eee; border: 1px solid #e0e0e0; border-radius: 4px;
    color: var(--red); font-size: 24px; font-weight: 700; padding: 10px 16px;
}
.logout-form { position: absolute; top: 0; right: 0; }

main { margin-top: 28px; }

.card {
    margin: 0 auto; background: #fff; border: 1px solid #e3e6ec; border-radius: 18px;
    box-shadow: 0 2px 14px rgba(20, 30, 80, .06); padding: 32px;
}
.card-narrow { max-width: 396px; text-align: center; }
.card-wide { max-width: 1100px; border-radius: 12px; padding: 24px; }

.card-icon {
    width: 54px; height: 54px; margin: 8px auto 14px; border-radius: 50%;
    background: linear-gradient(135deg, #1a237e, #0b1a78); color: #fff;
    display: flex; align-items: center; justify-content: center;
}
.card-title { font-size: 20px; font-weight: 700; margin: 0 0 4px; }
.card-title.left { text-align: left; }
.card-sub { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.muted { color: var(--muted); font-size: 14px; }
.center { text-align: center; }
.actions.center { margin-top: 18px; display: flex; justify-content: center; }

.pill {
    display: inline-flex; align-items: center; gap: 6px; background: #f1f4fa; color: var(--navy);
    font-weight: 600; font-size: 14px; border-radius: 8px; padding: 6px 14px; margin: 0 0 18px;
}

/* Inputs */
.input-group {
    display: flex; align-items: stretch; border: 1px solid var(--border); border-radius: 6px;
    background: #fff; overflow: hidden;
}
.input-group:focus-within { border-color: var(--navy); box-shadow: 0 0 0 2px rgba(11, 26, 120, .12); }
.input-group.has-error { border-color: var(--red); }
.input-icon {
    display: flex; align-items: center; padding: 0 10px; color: #6b7280;
}
.input-icon.filled { background: var(--navy); color: #fff; padding: 0 14px; }
.input-group input, .input-group select {
    flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 15px;
    padding: 10px 10px 10px 0; background: transparent;padding-left: 10px;;
}
.input-icon.filled + input { padding-left: 12px; }

.field-error { color: var(--red); font-size: 13px; margin-top: 4px; }
.field-error.center { text-align: center; }

/* OTP */
.otp-boxes { display: flex; justify-content: center; gap: 14px; margin: 6px 0 4px; }
.otp-box {
    width: 58px; height: 62px; text-align: center; font: inherit; font-size: 24px; font-weight: 700;
    border: 2px solid var(--border); border-radius: 12px; outline: 0; color: var(--navy);
}
.otp-box:focus { border-color: var(--navy); }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; border: 0; cursor: pointer;
    font: inherit; font-size: 16px; font-weight: 600; padding: 9px 22px; border-radius: 4px;
    color: #fff; text-decoration: none;
}
.btn-red { background: var(--red); }
.btn-blue { background: var(--blue); min-width: 150px; }
.btn-green { background: var(--green); min-width: 130px; }
.btn-outline { background: #fff; color: var(--blue); border: 1px solid var(--blue); }
.btn-small { padding: 6px 14px; font-size: 14px; margin-top: 8px; }
.btn:hover { filter: brightness(.95); }
.link-btn { background: none; border: 0; color: var(--blue); font: inherit; cursor: pointer; padding: 0; }
.link-btn:disabled { color: var(--muted); cursor: default; }
.resend { text-align: center; margin-top: 14px; }

.link-btn-logout { background: rgb(217 45 32);width:100%; border: 0; color: rgb(245, 242, 242); font: inherit;font-size:15px; cursor: pointer; padding: 10;border-radius: 6px; }
.link-btn-logout:disabled { color: var(--muted); cursor: default; }


.alert { max-width: 1100px; margin: 0 auto 16px; padding: 10px 16px; border-radius: 6px; }
.alert-success { background: #e8f7ee; border: 1px solid #b8e3c7; color: #146c2e; }

/* Form layout */
.section-title {
    background: var(--navy-soft); color: var(--navy); font-weight: 700; font-size: 20px;
    padding: 6px 12px; border-radius: 6px; margin: 18px 0 10px;
}
.grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px 20px; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-6 { grid-column: span 6; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.req { color: var(--red); }

.objective-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.objective-row .badge {
    min-width: 34px; text-align: center; background: #e9ecf3; border-radius: 4px; padding: 4px 0; font-weight: 600; font-size: 14px;
}
.objective-row input {
    flex: 1; font: inherit; font-size: 15px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px;
}
.btn-del {
    border: 1px solid #f3b8b8; background: #fdecec; color: #c62828; border-radius: 6px; width: 40px; height: 34px; cursor: pointer;
}

.form-actions { display: flex; justify-content: center; gap: 14px; margin-top: 18px; }
.order-first { order: -1; }

/* Dashboard */
.dash-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.chip { display: inline-block; font-size: 13px; font-weight: 600; border-radius: 999px; padding: 3px 12px; margin-left: 8px; }
.chip-ok { background: #e8f7ee; color: #146c2e; }
.details { margin: 0; }
.detail-row { display: grid; grid-template-columns: 320px 1fr; gap: 12px; padding: 7px 4px; border-bottom: 1px solid #eef0f4; }
.detail-row dt { font-weight: 600; color: #444; }
.detail-row dd { margin: 0;color: #444; }
.objective-list { margin: 0; padding-left: 28px; line-height: 1.8; }

@media (max-width: 760px) {
    .site-header h1 { font-size: 22px; }
    .banner { font-size: 18px; }
    .span-2, .span-3, .span-4 { grid-column: span 6; }
    .detail-row { grid-template-columns: 1fr; gap: 2px; }
    .logout-form { position: static; text-align: right; margin-bottom: 6px; }
    .card { padding: 20px; }
}

/* Paid: water green */
.program-row.row-paid,
.program-row.row-paid:hover,
.program-row.row-paid:has(input:checked) { background: #d8f3ee; }

/* In progress: yellow */
.program-row.row-progress,
.program-row.row-progress:hover,
.program-row.row-progress:has(input:checked) { background: #fff4c2; }

/* Disabled rows are normally faded to 60%, which would wash the colours out */
.program-row.disabled.row-paid,
.program-row.disabled.row-progress { opacity: .85; }

/* Keep the status pill readable on a tinted row */
.program-row.row-paid .chip,
.program-row.row-progress .chip { background: #fff; }
.program-done {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #16a34a;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
  .card-narrow .alert { margin: 14px 0 0; font-size: 14px; }

  .repeater-max-msg {
    display: inline-block;
    margin-left: 12px;
    vertical-align: middle;
    font-size: 14px;
    font-weight: 600;
    color: #b45309;
}
.repeater-max-msg[hidden] { display: none; }