/* ===============================================================
   Amnesty International Nepal - EOI 2027
   Brand colours:  Amnesty Yellow #FFFF00  |  Black #000000
   =============================================================== */

:root {
  --ai-yellow:       #FFFF00;
  --ai-yellow-600:   #E6E600;
  --ai-yellow-700:   #CCCC00;
  --ai-yellow-soft:  #FFFDE0;
  --ai-black:        #000000;
  --ai-ink:          #1A1A1A;
  --ai-grey-100:     #F5F5F5;
  --ai-grey-200:     #E7E7E7;
  --ai-grey-400:     #B5B5B5;
  --ai-grey-600:     #6B6B6B;
  --ai-white:        #FFFFFF;
  --ai-danger:       #C81E1E;
  --ai-success:      #157347;
  --ai-radius:       .5rem;
  --ai-shadow:       0 2px 14px rgba(0,0,0,.08);
}

body {
  background: var(--ai-grey-100);
  color: var(--ai-ink);
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans Devanagari", sans-serif;
  font-size: .95rem;
}

/* ---------- Top bar / header ---------- */
.ai-topbar {
  background: var(--ai-black);
  color: var(--ai-white);
  font-size: .8rem;
  padding: .4rem 0;
}
.ai-topbar a { color: var(--ai-yellow); text-decoration: none; }
.ai-topbar a:hover { text-decoration: underline; }

.ai-header {
  background: var(--ai-yellow);
  border-bottom: 5px solid var(--ai-black);
}
.ai-header .ai-logo {
  display: flex; align-items: center; gap: .85rem;
}
.ai-header .ai-logo-mark {
  width: 54px; height: 54px; flex: 0 0 54px;
  background: var(--ai-black);
  display: grid; place-items: center;
  border-radius: 3px;
}
.ai-header .ai-logo-mark svg { width: 34px; height: 34px; }
.ai-header h1 {
  font-size: 1.15rem; font-weight: 700; margin: 0;
  letter-spacing: .2px; color: var(--ai-black); text-transform: uppercase;
}
.ai-header .ai-sub { font-size: .8rem; margin: 0; color: #333; }

/* ---------- Notice banner ---------- */
.ai-notice {
  background: var(--ai-black);
  color: var(--ai-white);
  padding: 1.4rem 0;
}
.ai-notice h2 {
  font-size: 1.35rem; font-weight: 700; margin: 0 0 .35rem;
  color: var(--ai-yellow); text-transform: uppercase; line-height: 1.3;
}
.ai-notice p { margin: 0; font-size: .85rem; color: #DADADA; }
.ai-deadline-pill {
  display: inline-block; background: var(--ai-yellow); color: var(--ai-black);
  font-weight: 700; font-size: .78rem; padding: .3rem .7rem; border-radius: 2rem;
}

/* ---------- Cards ---------- */
.ai-card {
  background: var(--ai-white);
  border: 1px solid var(--ai-grey-200);
  border-radius: var(--ai-radius);
  box-shadow: var(--ai-shadow);
}
.ai-card-header {
  border-bottom: 3px solid var(--ai-yellow);
  padding: .9rem 1.15rem;
  font-weight: 700; font-size: 1rem;
  background: var(--ai-white);
  border-radius: var(--ai-radius) var(--ai-radius) 0 0;
}

/* ---------- Stepper ---------- */
.ai-stepper {
  display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0;
  counter-reset: step;
}
.ai-stepper li {
  flex: 1 1 0; text-align: center; position: relative;
  padding: .75rem .25rem .6rem; font-size: .74rem; font-weight: 600;
  color: var(--ai-grey-600); background: var(--ai-grey-200);
  border-radius: 3px; cursor: default;
}
.ai-stepper li .ai-step-no {
  display: block; width: 26px; height: 26px; line-height: 26px; margin: 0 auto .3rem;
  border-radius: 50%; background: var(--ai-grey-400); color: var(--ai-white);
  font-size: .8rem; font-weight: 700;
}
.ai-stepper li.is-active { background: var(--ai-black); color: var(--ai-yellow); }
.ai-stepper li.is-active .ai-step-no { background: var(--ai-yellow); color: var(--ai-black); }
.ai-stepper li.is-done { background: var(--ai-yellow-soft); color: var(--ai-ink); }
.ai-stepper li.is-done .ai-step-no { background: var(--ai-success); color: #fff; }

.ai-progress { height: 6px; background: var(--ai-grey-200); border-radius: 3px; overflow: hidden; }
.ai-progress-bar {
  height: 100%; background: var(--ai-yellow); border-right: 2px solid var(--ai-black);
  transition: width .3s ease;
}

/* ---------- Form ---------- */
.ai-step { display: none; }
.ai-step.is-visible { display: block; animation: aiFade .25s ease; }
@keyframes aiFade { from { opacity: 0; transform: translateY(6px);} to { opacity: 1; transform: none; } }

.ai-section-title {
  font-size: .82rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--ai-black);
  border-left: 4px solid var(--ai-yellow); padding-left: .55rem;
  margin: 1.4rem 0 .85rem;
}
.ai-section-title:first-child { margin-top: .25rem; }

.form-label { font-weight: 600; font-size: .85rem; margin-bottom: .25rem; }
.form-label .np { display: block; font-weight: 400; font-size: .76rem; color: var(--ai-grey-600); }
.form-label .req { color: var(--ai-danger); }

.form-control, .form-select {
  border-radius: .35rem; border-color: var(--ai-grey-400); font-size: .9rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--ai-black);
  box-shadow: 0 0 0 .2rem rgba(255,255,0,.55);
}
.form-control.is-invalid, .form-select.is-invalid { border-color: var(--ai-danger); }

/* ---------- Category picker ---------- */
.ai-cat {
  border: 1px solid var(--ai-grey-200); border-radius: var(--ai-radius);
  padding: .85rem 1rem; margin-bottom: .75rem; background: var(--ai-white);
  transition: border-color .2s, background .2s;
}
.ai-cat:hover { border-color: var(--ai-yellow-700); }
.ai-cat.is-checked { border-color: var(--ai-black); background: var(--ai-yellow-soft); }
.ai-cat .form-check-input { width: 1.15rem; height: 1.15rem; margin-top: .15rem; }
.ai-cat .form-check-input:checked { background-color: var(--ai-black); border-color: var(--ai-black); }
.ai-cat .form-check-label { font-weight: 700; font-size: .92rem; cursor: pointer; }
.ai-cat .ai-cat-desc { font-size: .78rem; color: var(--ai-grey-600); margin: .2rem 0 0; }
.ai-cat .ai-cat-detail { display: none; margin-top: .7rem; }
.ai-cat.is-checked .ai-cat-detail { display: block; }

/* ---------- File upload ---------- */
.ai-file {
  border: 1px dashed var(--ai-grey-400); border-radius: var(--ai-radius);
  padding: .85rem 1rem; margin-bottom: .75rem; background: #FCFCFC;
}
.ai-file.is-filled { border-style: solid; border-color: var(--ai-success); background: #F4FBF7; }
.ai-file .ai-file-name { font-size: .78rem; color: var(--ai-grey-600); margin-top: .35rem; }

/* ---------- Review table ---------- */
.ai-review-table th {
  width: 38%; font-weight: 600; color: var(--ai-grey-600);
  font-size: .82rem; background: var(--ai-grey-100);
}
.ai-review-table td { font-size: .85rem; }

/* ---------- Buttons ---------- */
.btn-ai {
  background: var(--ai-yellow); color: var(--ai-black);
  border: 2px solid var(--ai-black); font-weight: 700; border-radius: .35rem;
}
.btn-ai:hover, .btn-ai:focus { background: var(--ai-black); color: var(--ai-yellow); border-color: var(--ai-black); }
.btn-ai-dark {
  background: var(--ai-black); color: var(--ai-white);
  border: 2px solid var(--ai-black); font-weight: 700; border-radius: .35rem;
}
.btn-ai-dark:hover { background: transparent; color: var(--ai-black); }
.btn-ai-ghost {
  background: transparent; color: var(--ai-black);
  border: 2px solid var(--ai-grey-400); font-weight: 600; border-radius: .35rem;
}
.btn-ai-ghost:hover { border-color: var(--ai-black); }

/* ---------- Captcha ---------- */
.ai-captcha-img {
  border: 1px solid var(--ai-grey-400); border-radius: .35rem;
  height: 52px; background: #fff;
}

/* ---------- Footer ---------- */
.ai-footer {
  background: var(--ai-black); color: #BFBFBF; padding: 1.6rem 0; margin-top: 2.5rem;
  font-size: .82rem;
}
.ai-footer a { color: var(--ai-yellow); text-decoration: none; }
.ai-footer strong { color: var(--ai-white); }
.ai-footer .ai-strip { height: 4px; background: var(--ai-yellow); margin-bottom: 1.4rem; }

/* ---------- Admin ---------- */
.ai-admin-nav { background: var(--ai-black); border-bottom: 4px solid var(--ai-yellow); }
.ai-admin-nav .navbar-brand { color: var(--ai-yellow); font-weight: 700; font-size: 1rem; }
.ai-admin-nav .nav-link { color: #DDD; font-size: .88rem; }
.ai-admin-nav .nav-link:hover, .ai-admin-nav .nav-link.active { color: var(--ai-yellow); }
.ai-stat {
  background: #fff; border: 1px solid var(--ai-grey-200); border-left: 5px solid var(--ai-yellow);
  border-radius: var(--ai-radius); padding: .9rem 1rem;
}
.ai-stat .ai-stat-num { font-size: 1.6rem; font-weight: 700; line-height: 1; }
.ai-stat .ai-stat-label { font-size: .75rem; text-transform: uppercase; color: var(--ai-grey-600); letter-spacing: .4px; }
.table-ai thead th {
  background: var(--ai-black); color: var(--ai-yellow);
  font-size: .76rem; text-transform: uppercase; letter-spacing: .3px; white-space: nowrap;
}
.table-ai td { font-size: .85rem; vertical-align: middle; }

/* ---------- Print ---------- */
@media print {
  .ai-topbar, .ai-footer, .ai-no-print, .btn { display: none !important; }
  .ai-card { box-shadow: none; border: 1px solid #999; }
  body { background: #fff; }
}

/* ---------- Small screens ---------- */
@media (max-width: 575.98px) {
  .ai-header h1 { font-size: .95rem; }
  .ai-notice h2 { font-size: 1.05rem; }
  .ai-stepper li { font-size: 0; padding: .55rem .2rem; }
  .ai-stepper li .ai-step-no { margin-bottom: 0; }
}

/* ---------- Live NPT clock ---------- */
.ai-clock {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,0,.45);
  border-radius: var(--ai-radius);
  padding: .7rem .9rem;
  color: var(--ai-white);
}
.ai-clock-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .4px; color: #CFCFCF; }
.ai-clock-time  { font-size: 1.02rem; font-weight: 700; color: var(--ai-yellow); font-variant-numeric: tabular-nums; }
.ai-clock-bs    { font-size: .78rem; color: #E2E2E2; }
.ai-clock-count {
  margin-top: .35rem; font-size: .78rem; font-weight: 600;
  color: var(--ai-black); background: var(--ai-yellow);
  display: inline-block; padding: .15rem .5rem; border-radius: 2rem;
  font-variant-numeric: tabular-nums;
}
.ai-clock-count.is-urgent { background: var(--ai-danger); color: #fff; }

/* ---------- Minimal WYSIWYG editor ---------- */
.ai-editor {
  border: 1px solid var(--ai-grey-400);
  border-radius: var(--ai-radius);
  background: var(--ai-white);
  overflow: hidden;
}
.ai-editor-toolbar {
  display: flex; align-items: center; gap: .15rem; flex-wrap: wrap;
  padding: .35rem .5rem;
  background: var(--ai-grey-100);
  border-bottom: 1px solid var(--ai-grey-200);
}
.ai-editor-toolbar button {
  border: 1px solid transparent; background: transparent; border-radius: .25rem;
  min-width: 30px; height: 28px; font-size: .88rem; line-height: 1; cursor: pointer;
  color: var(--ai-ink);
}
.ai-editor-toolbar button:hover { background: var(--ai-yellow); border-color: var(--ai-grey-400); }
.ai-editor-sep { width: 1px; height: 18px; background: var(--ai-grey-400); margin: 0 .3rem; }
.ai-editor-count { margin-left: auto; font-size: .7rem; color: var(--ai-grey-600); }
.ai-editor-area {
  min-height: 170px; max-height: 420px; overflow-y: auto;
  padding: .75rem .9rem; font-size: .9rem; line-height: 1.55; outline: none;
}
.ai-editor-area:focus { box-shadow: inset 0 0 0 2px rgba(255,255,0,.55); }
.ai-editor-area:empty::before {
  content: attr(data-placeholder); color: var(--ai-grey-400);
}
.ai-editor-area ul, .ai-editor-area ol { padding-left: 1.4rem; }
.ai-editor-area p:last-child { margin-bottom: 0; }

/* rendered profile in the admin panel */
.ai-profile-html { font-size: .9rem; line-height: 1.6; }
.ai-profile-html ul, .ai-profile-html ol { padding-left: 1.4rem; }
.ai-profile-html a { color: #0b5ed7; }

/* ---------- Bikram Sambat date picker ---------- */
.bs-dp {
  position: absolute; z-index: 1060; margin-top: .25rem;
  background: var(--ai-white);
  border: 1px solid var(--ai-grey-400);
  border-radius: var(--ai-radius);
  box-shadow: 0 8px 26px rgba(0,0,0,.18);
  padding: .5rem; width: 268px;
}
.bs-dp[hidden] { display: none; }
.bs-dp-head { display: flex; gap: .25rem; align-items: center; margin-bottom: .4rem; }
.bs-dp-head select {
  flex: 1 1 auto; font-size: .78rem; padding: .2rem .25rem;
  border: 1px solid var(--ai-grey-400); border-radius: .25rem; background: #fff;
}
.bs-dp-nav {
  flex: 0 0 26px; height: 26px; border: 1px solid var(--ai-grey-400); background: var(--ai-grey-100);
  border-radius: .25rem; cursor: pointer; font-size: 1rem; line-height: 1;
}
.bs-dp-nav:hover { background: var(--ai-yellow); }
.bs-dp-grid { width: 100%; border-collapse: collapse; table-layout: fixed; }
.bs-dp-grid th { font-size: .66rem; color: var(--ai-grey-600); font-weight: 600; padding-bottom: .2rem; text-align: center; }
.bs-dp-grid td { padding: 1px; text-align: center; }
.bs-dp-day {
  width: 100%; border: 0; background: transparent; border-radius: .25rem;
  padding: .3rem 0; font-size: .82rem; cursor: pointer; color: var(--ai-ink);
}
.bs-dp-day:hover:not(:disabled) { background: var(--ai-yellow); }
.bs-dp-day.is-selected { background: var(--ai-black); color: var(--ai-yellow); font-weight: 700; }
.bs-dp-day:disabled, .bs-dp-day.is-disabled { color: var(--ai-grey-400); cursor: not-allowed; }
.bs-dp-foot {
  display: flex; justify-content: space-between; gap: .3rem;
  margin-top: .4rem; padding-top: .4rem; border-top: 1px solid var(--ai-grey-200);
}
.bs-dp-foot button {
  flex: 1 1 0; font-size: .74rem; padding: .25rem; cursor: pointer;
  border: 1px solid var(--ai-grey-400); background: var(--ai-white); border-radius: .25rem;
}
.bs-dp-foot button:hover { background: var(--ai-yellow); }

/* ---------- Admin switches ---------- */
.form-switch .form-check-input:checked { background-color: var(--ai-black); border-color: var(--ai-black); }

/* ---------- Romanized Nepali typing toggle ---------- */
#npTypingToggle {
  font-weight: 700; min-width: 46px;
  border-color: var(--ai-black); background: var(--ai-yellow);
}
#npTypingToggle.is-off { background: var(--ai-white); color: var(--ai-grey-600); border-color: var(--ai-grey-400); }

/* ---------- Romanized Nepali suggestions ---------- */
.np-suggest {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 1055;
  background: var(--ai-white); border: 1px solid var(--ai-grey-400);
  border-radius: 0 0 var(--ai-radius) var(--ai-radius);
  box-shadow: 0 8px 22px rgba(0,0,0,.14); overflow: hidden; margin-top: 2px;
}
.np-suggest[hidden] { display: none; }
.np-suggest-head {
  font-size: .66rem; text-transform: uppercase; letter-spacing: .3px;
  color: var(--ai-grey-600); padding: .3rem .6rem; background: var(--ai-grey-100);
  border-bottom: 1px solid var(--ai-grey-200);
}
.np-suggest-item {
  display: block; width: 100%; text-align: left; border: 0; background: transparent;
  padding: .35rem .6rem; font-size: .95rem; cursor: pointer;
}
.np-suggest-item:hover, .np-suggest-item.is-active { background: var(--ai-yellow); }

/* ---------- documents kept from a rejected attempt ---------- */
.ai-file-kept {
  background: #F4FBF7; border: 1px solid #CCE7D8; border-radius: .35rem;
  padding: .45rem .6rem; margin-bottom: .5rem; font-size: .85rem;
}
.ai-file-kept .form-check-input:checked { background-color: var(--ai-danger); border-color: var(--ai-danger); }

/* ---------- SMTP test transcript ---------- */
.ai-smtp-log {
  background: #111; color: #DDD; font-size: .74rem; line-height: 1.45;
  padding: .6rem .8rem; border-radius: .35rem; max-height: 260px; overflow: auto;
  white-space: pre-wrap; word-break: break-word; margin: 0;
}

/* ---------- Declaration tick boxes ---------- */
.ai-consent {
  border: 2px solid var(--ai-black);
  border-left-width: 6px;
  border-radius: var(--ai-radius);
  background: var(--ai-yellow-soft);
  padding: .7rem .9rem;
  transition: background .15s, border-color .15s;
}
.ai-consent .form-check { padding-left: 2.1rem; }
.ai-consent .form-check-input {
  width: 1.35rem; height: 1.35rem; margin-left: -2.1rem; margin-top: .05rem;
  border: 2px solid var(--ai-black); cursor: pointer;
}
.ai-consent .form-check-input:checked {
  background-color: var(--ai-black); border-color: var(--ai-black);
}
.ai-consent .form-check-input:focus {
  box-shadow: 0 0 0 .25rem rgba(255,255,0,.65); border-color: var(--ai-black);
}
.ai-consent .form-check-input.is-invalid { border-color: var(--ai-danger); }
.ai-consent .form-check-label { font-weight: 600; font-size: .9rem; cursor: pointer; }

/* once ticked it settles down, so the unticked one stands out */
.ai-consent:has(.form-check-input:checked) {
  background: #F4FBF7; border-color: var(--ai-success);
}
