/* =====================================================================
   GETPM Recruitment Portal - theme (on top of Bootstrap 5.3)
   ===================================================================== */
:root {
  --brand: #0b4f8a;
  --brand-600: #0a4477;
  --brand-50: #eaf2fb;
  --accent: #8a1c4f;
  --accent-50: #fbeef4;
  --ink: #1b2433;
  --muted: #667085;
  --line: #e4e8ef;
  --surface: #ffffff;
  --page: #f4f6fa;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 4px 16px rgba(16, 24, 40, .06);

  --bs-primary: var(--brand);
  --bs-primary-rgb: 11, 79, 138;
  --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-body-color: var(--ink);
  --bs-border-color: var(--line);
  --bs-link-color: var(--brand);
  --bs-link-color-rgb: 11, 79, 138;
  --bs-link-hover-color: var(--brand-600);
}

body {
  background: var(--page);
  font-size: .95rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
h1, h2, h3, h4, h5 { font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.text-muted { color: var(--muted) !important; }
a { text-underline-offset: 2px; }

/* ---- Buttons ---------------------------------------------------- */
.btn { border-radius: 10px; font-weight: 500; padding: .55rem 1.05rem; }
.btn-sm { border-radius: 8px; padding: .3rem .7rem; }
.btn-primary { --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand-600); --bs-btn-hover-border-color: var(--brand-600);
  --bs-btn-active-bg: var(--brand-600); --bs-btn-disabled-bg: var(--brand); --bs-btn-disabled-border-color: var(--brand); }
.btn-outline-primary { --bs-btn-color: var(--brand); --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand); --bs-btn-hover-border-color: var(--brand); --bs-btn-active-bg: var(--brand); }
.btn-accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-accent:hover { background: #741640; color: #fff; }
.btn-light { background: #fff; border-color: var(--line); }

/* ---- Forms ------------------------------------------------------ */
.form-control, .form-select { border-radius: 10px; border-color: #d5dbe5; padding: .6rem .85rem; }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 .2rem rgba(11, 79, 138, .15); }
.form-label { font-weight: 600; font-size: .86rem; color: #344054; margin-bottom: .35rem; }
.req::after { content: " *"; color: #d92d20; }
.form-text { color: var(--muted); }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.input-group-text { border-radius: 10px; background: #f8fafc; border-color: #d5dbe5; }

/* ---- Cards ------------------------------------------------------ */
.card { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-header { background: #fff; border-bottom: 1px solid var(--line); padding: 1rem 1.25rem;
  border-radius: var(--radius) var(--radius) 0 0 !important; }
.card-body { padding: 1.25rem; }
.card-title-sm { font-size: 1rem; font-weight: 700; margin: 0; }

/* ---- Badges ----------------------------------------------------- */
.badge { font-weight: 600; border-radius: 999px; padding: .38em .75em; }
.badge-soft-primary   { background: var(--brand-50); color: var(--brand); }
.badge-soft-success   { background: #e7f6ec; color: #11743b; }
.badge-soft-warning   { background: #fff4e0; color: #9a5b00; }
.badge-soft-danger    { background: #fdecec; color: #b42318; }
.badge-soft-secondary { background: #eef0f4; color: #475467; }

/* ---- Top bar & navbar ------------------------------------------- */
.topbar { background: var(--brand); color: #dbe8f6; font-size: .8rem; padding: .35rem 0; }
.topbar a { color: #fff; text-decoration: none; }
.site-nav { background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 rgba(0,0,0,.02); }
.site-nav .navbar-brand { display: flex; align-items: center; gap: .7rem; white-space: normal; }
.brand-logo { width: 48px; height: 56px; flex: 0 0 auto;
  background: url("../img/banner.jpg") left center / auto 100% no-repeat; }
.brand-text { line-height: 1.15; }
.brand-text strong { display: block; font-size: 1rem; color: var(--brand); }
.brand-text small { color: var(--accent); font-size: .74rem; font-weight: 600; letter-spacing: .02em; }
.site-nav .nav-link { white-space: nowrap; font-weight: 500; color: #344054; padding: .5rem .85rem !important; border-radius: 8px; }
.site-nav .nav-link:hover, .site-nav .nav-link.active { color: var(--brand); background: var(--brand-50); }

/* ---- Hero ------------------------------------------------------- */
.hero { position: relative; color: #fff; overflow: hidden;
  background: radial-gradient(1200px 400px at 85% -10%, rgba(255,255,255,.15), transparent 60%),
              linear-gradient(120deg, #083c69 0%, var(--brand) 55%, #165f9f 100%); }
.hero::after { content: ""; position: absolute; inset: auto -10% -60% auto; width: 520px; height: 520px;
  border-radius: 50%; background: rgba(138, 28, 79, .25); filter: blur(10px); }
.hero .container { position: relative; z-index: 1; }
.hero h1 { color: #fff; font-size: clamp(1.7rem, 3.4vw, 2.6rem); line-height: 1.15; }
.hero p.lead { color: #d6e5f5; font-size: 1.05rem; }
.hero .chip { display: inline-flex; align-items: center; gap: .4rem; background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.25); padding: .3rem .8rem; border-radius: 999px; font-size: .8rem; }
.hero-card { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius); padding: 1.25rem; backdrop-filter: blur(4px); }
.hero-card .num { font-size: 1.8rem; font-weight: 800; color: #fff; }
.hero-card .lbl { color: #cfe0f2; font-size: .82rem; }

/* ---- Sections --------------------------------------------------- */
.section { padding: 3rem 0; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.section-title h2 { font-size: 1.4rem; margin: 0; }
.eyebrow { color: var(--accent); font-weight: 700; text-transform: uppercase; font-size: .74rem; letter-spacing: .08em; }

.post-card { height: 100%; transition: transform .15s ease, box-shadow .15s ease; }
.post-card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(16,24,40,.10); }
.post-card .fee { font-size: 1.25rem; font-weight: 800; color: var(--brand); }
.post-meta { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; font-size: .84rem; }
.post-meta div { background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: .45rem .6rem; }
.post-meta span { display: block; color: var(--muted); font-size: .72rem; }
.salary { font-size: .74rem; color: var(--muted); word-break: break-word; }

.step-flow { counter-reset: step; }
.step-flow .item { position: relative; padding-left: 3rem; margin-bottom: 1.1rem; }
.step-flow .item::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0;
  width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--brand-50); color: var(--brand);
  font-weight: 800; display: grid; place-items: center; }

/* ---- Auth pages ------------------------------------------------- */
.auth-wrap { padding: 3rem 0; }
.auth-card { max-width: 480px; margin: 0 auto; }
.auth-card.wide { max-width: 640px; }
.auth-card .card-body { padding: 2rem; }
.auth-icon { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center;
  background: var(--brand-50); color: var(--brand); font-size: 1.5rem; margin-bottom: 1rem; }
.captcha-code { font-family: "Courier New", monospace; font-weight: 800; font-size: 1.4rem; letter-spacing: .5rem;
  padding: .35rem 1rem; border-radius: 10px; user-select: none; color: var(--accent);
  background: repeating-linear-gradient(45deg, #fff5f9, #fff5f9 6px, #f6e3ec 6px, #f6e3ec 12px);
  border: 1px dashed #e0b5c9; text-decoration: line-through rgba(138,28,79,.35); }

/* ---- Application wizard ------------------------------------------- */
.wizard { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .25rem; margin-bottom: 1.25rem; }
.wizard a, .wizard span { flex: 1 0 auto; display: flex; align-items: center; gap: .55rem; text-decoration: none;
  padding: .7rem .9rem; border-radius: 12px; background: #fff; border: 1px solid var(--line);
  color: var(--muted); font-weight: 600; font-size: .85rem; white-space: nowrap; }
.wizard .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: #eef0f4; font-size: .78rem; }
.wizard .done { color: #11743b; }
.wizard .done .n { background: #e7f6ec; color: #11743b; }
.wizard .current { background: var(--brand); color: #fff; border-color: var(--brand); }
.wizard .current .n { background: rgba(255,255,255,.2); color: #fff; }
.wizard span.locked { opacity: .6; cursor: not-allowed; }

.form-section { border-top: 1px dashed var(--line); padding-top: 1.25rem; margin-top: 1.25rem; }
.form-section:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.form-section h6 { color: var(--brand); font-weight: 700; text-transform: uppercase; font-size: .78rem; letter-spacing: .06em; margin-bottom: 1rem; }

.upload-box { border: 2px dashed #cdd6e3; border-radius: var(--radius); padding: 1.25rem; text-align: center; background: #fafcff; height: 100%; }
.upload-box .preview { width: 160px; height: 184px; margin: 0 auto .75rem; border-radius: 10px; background: #eef2f7 center / cover no-repeat;
  display: grid; place-items: center; color: #98a2b3; font-size: 2.4rem; border: 1px solid var(--line); }
.upload-box .preview.sign { width: 210px; height: 90px; background-size: contain; background-color: #fff; }
.guidelines { font-size: .85rem; color: #475467; }
.guidelines li { margin-bottom: .35rem; }

.table-edu th { font-size: .78rem; text-transform: uppercase; color: var(--muted); letter-spacing: .03em; white-space: nowrap; }
.table-edu td { vertical-align: middle; min-width: 110px; }
.table-edu .form-control, .table-edu .form-select { padding: .45rem .6rem; font-size: .88rem; }

.review-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .75rem 1.5rem; }
.review-grid .k { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.review-grid .v { font-weight: 600; word-break: break-word; }
.review-photo { width: 110px; height: 126px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.review-sign { width: 160px; height: 68px; object-fit: contain; border-radius: 8px; border: 1px solid var(--line); background: #fff; }

/* ---- Dashboard -------------------------------------------------- */
.welcome { background: linear-gradient(120deg, var(--brand) 0%, #165f9f 100%); color: #fff; border-radius: var(--radius); padding: 1.5rem; }
.welcome h1, .welcome h2 { color: #fff; }
.app-card .progress { height: 8px; border-radius: 99px; background: #edf1f6; }
.app-card .progress-bar { background: var(--brand); }
.kv { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px dashed var(--line); font-size: .9rem; }
.kv:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--muted); }

.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.empty-state i { font-size: 2.5rem; color: #c3cad6; display: block; margin-bottom: .5rem; }

/* ---- Payment ---------------------------------------------------- */
.qr-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; text-align: center; }
.qr-box img { max-width: 220px; width: 100%; border-radius: 8px; }
.bank-table td { padding: .5rem .25rem; border-bottom: 1px dashed var(--line); font-size: .9rem; }
.bank-table td:first-child { color: var(--muted); width: 42%; }
.bank-table tr:last-child td { border-bottom: 0; }
.amount-due { font-size: 2rem; font-weight: 800; color: var(--brand); }

/* ---- Tables ----------------------------------------------------- */
.table { --bs-table-hover-bg: #f7f9fc; }
.table > thead th { background: #f8fafc; color: #475467; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em;
  font-weight: 700; border-bottom-width: 1px; white-space: nowrap; }
.table > :not(caption) > * > * { padding: .75rem .85rem; }
.table-card .table { margin-bottom: 0; }
.table-card .card-body { padding: 0; }
.thumb { width: 40px; height: 46px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }

/* ---- Footer ----------------------------------------------------- */
.site-footer { background: #0b1f35; color: #b8c4d4; padding: 2.5rem 0 1.25rem; font-size: .88rem; margin-top: 3rem; }
.site-footer h6 { color: #fff; font-weight: 700; }
.site-footer a { color: #dbe6f3; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer .copy { border-top: 1px solid rgba(255,255,255,.1); margin-top: 1.5rem; padding-top: 1rem; font-size: .8rem; }

/* =====================================================================
   Admin panel
   ===================================================================== */
.admin-body { display: block; }
.admin-sidebar { position: fixed; inset: 0 auto 0 0; width: 260px; background: #0b1f35; color: #b8c4d4; z-index: 1040;
  display: flex; flex-direction: column; transition: transform .2s ease; }
.admin-sidebar .brand { display: flex; align-items: center; gap: .7rem; padding: 1.1rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.admin-sidebar .brand .brand-logo { width: 38px; height: 44px; background-color: #fff; border-radius: 8px; background-size: auto 100%; }
.admin-sidebar .brand strong { color: #fff; display: block; font-size: .98rem; }
.admin-sidebar .brand small { color: #8fa3bb; font-size: .74rem; }
.admin-sidebar nav { padding: 1rem .75rem; overflow-y: auto; flex: 1; }
.admin-sidebar .nav-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: #6c819b; padding: .75rem .75rem .35rem; }
.admin-sidebar .nav-link { color: #c3cfdd; border-radius: 10px; padding: .6rem .8rem; display: flex; align-items: center; gap: .7rem; font-weight: 500; }
.admin-sidebar .nav-link i { font-size: 1.05rem; opacity: .9; }
.admin-sidebar .nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.admin-sidebar .nav-link.active { background: var(--brand); color: #fff; }
.admin-sidebar .nav-link .badge { margin-left: auto; background: var(--accent); color: #fff; }
.admin-main { margin-left: 260px; min-height: 100vh; display: flex; flex-direction: column; }
.admin-topbar { background: #fff; border-bottom: 1px solid var(--line); padding: .75rem 1.5rem; display: flex; align-items: center;
  gap: 1rem; position: sticky; top: 0; z-index: 1030; }
.admin-topbar h1 { font-size: 1.15rem; margin: 0; }
.admin-content { padding: 1.5rem; flex: 1; }
.admin-backdrop { display: none; }

.stat-card { display: flex; align-items: center; gap: 1rem; }
.stat-card .ic { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 1.3rem; flex: 0 0 auto; }
.stat-card .val { font-size: 1.6rem; font-weight: 800; line-height: 1.1; }
.stat-card .lbl { color: var(--muted); font-size: .82rem; }
.ic-blue { background: var(--brand-50); color: var(--brand); }
.ic-green { background: #e7f6ec; color: #11743b; }
.ic-amber { background: #fff4e0; color: #9a5b00; }
.ic-rose { background: var(--accent-50); color: var(--accent); }

.bar-row { display: grid; grid-template-columns: 140px 1fr 48px; gap: .75rem; align-items: center; margin-bottom: .65rem; font-size: .88rem; }
.bar-row .bar { height: 10px; background: #edf1f6; border-radius: 99px; overflow: hidden; }
.bar-row .bar span { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.bar-row .n { text-align: right; font-weight: 700; }

.filter-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.filter-bar .form-control, .filter-bar .form-select { width: auto; min-width: 160px; padding: .45rem .75rem; }

@media (max-width: 991.98px) {
  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.show { transform: none; }
  .admin-main { margin-left: 0; }
  .admin-backdrop.show { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 1035; }
}
@media (max-width: 575.98px) {
  .auth-card .card-body { padding: 1.35rem; }
  .admin-content { padding: 1rem; }
  .bar-row { grid-template-columns: 100px 1fr 36px; }
  .brand-text small { display: none; }
}

@media print {
  .no-print, .site-nav, .topbar, .site-footer, .admin-sidebar, .admin-topbar { display: none !important; }
  .admin-main { margin: 0; }
}

/* ---- Admin login ------------------------------------------------ */
.admin-login { min-height: 100vh; display: flex; align-items: center;
  background: radial-gradient(1200px 400px at 85% -10%, rgba(255,255,255,.15), transparent 60%),
              linear-gradient(120deg, #083c69 0%, var(--brand) 55%, #165f9f 100%); }
.admin-login-brand { display: flex; align-items: center; justify-content: center; gap: .9rem; margin-bottom: 1.75rem; }
.admin-login-brand .brand-logo { width: 54px; height: 62px; background-color: #fff; border-radius: 10px; background-size: auto 100%; }
.admin-login-brand h1 { color: #fff; font-size: clamp(1rem, 2.2vw, 1.45rem); margin: 0; white-space: nowrap; }
.admin-login-brand .sub { color: #cfe0f2; font-size: .85rem; }
@media (max-width: 575.98px) { .admin-login-brand h1 { white-space: normal; } }

/* ---- Admin sidebar: single column + collapsible ------------------ */
.admin-sidebar { overflow: hidden; transition: width .2s ease, transform .2s ease; }
.admin-sidebar .sidebar-nav { display: flex; flex-direction: column; flex-wrap: nowrap; gap: 2px;
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 1rem .75rem; }
.admin-sidebar .sidebar-nav::-webkit-scrollbar { width: 6px; }
.admin-sidebar .sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 6px; }
.admin-sidebar .nav-link { white-space: nowrap; flex: 0 0 auto; }
.admin-sidebar .nav-link span:not(.badge) { overflow: hidden; text-overflow: ellipsis; }
.admin-sidebar .sidebar-foot { padding: 1rem; border-top: 1px solid rgba(255,255,255,.08); flex: 0 0 auto; }
.admin-sidebar .brand { flex: 0 0 auto; white-space: nowrap; }
.admin-main { transition: margin-left .2s ease; }

@media (min-width: 992px) {
  body.sidebar-collapsed .admin-sidebar { width: 76px; }
  body.sidebar-collapsed .admin-main { margin-left: 76px; }
  body.sidebar-collapsed .admin-sidebar .brand { justify-content: center; padding: 1.1rem .5rem; }
  body.sidebar-collapsed .admin-sidebar .brand-text-wrap,
  body.sidebar-collapsed .admin-sidebar .nav-link span,
  body.sidebar-collapsed .admin-sidebar .sidebar-user,
  body.sidebar-collapsed .admin-sidebar .sidebar-foot .btn span { display: none; }
  body.sidebar-collapsed .admin-sidebar .nav-label { font-size: 0; padding: .5rem 0; margin: 0 .75rem; border-top: 1px solid rgba(255,255,255,.08); }
  body.sidebar-collapsed .admin-sidebar .sidebar-nav { padding: 1rem .6rem; }
  body.sidebar-collapsed .admin-sidebar .nav-link { justify-content: center; padding: .7rem 0; position: relative; }
  body.sidebar-collapsed .admin-sidebar .nav-link i { font-size: 1.2rem; }
  body.sidebar-collapsed .admin-sidebar .nav-link .badge { display: inline-block !important; position: absolute; top: 4px; right: 6px;
    font-size: .6rem; padding: .2em .45em; margin: 0; }
  body.sidebar-collapsed .admin-sidebar .sidebar-foot { padding: 1rem .6rem; }
}

/* ---- Collapse button inside the sidebar -------------------------- */
.admin-sidebar .brand { position: relative; }
.admin-sidebar .brand-text-wrap { flex: 1 1 auto; min-width: 0; }
.sidebar-collapse-btn { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); color: #c3cfdd; transition: background .15s, color .15s; }
.sidebar-collapse-btn:hover { background: rgba(255,255,255,.14); color: #fff; }
.sidebar-collapse-btn i { transition: transform .2s ease; }
@media (min-width: 992px) {
  body.sidebar-collapsed .admin-sidebar .brand { flex-direction: column; gap: .6rem; }
  body.sidebar-collapsed .sidebar-collapse-btn i { transform: rotate(180deg); }
}

/* ---- Flash messages ---------------------------------------------- */
.alert.alert-dismissible { padding-right: 3.25rem; }
.alert .flash-icon { flex: 0 0 auto; margin-top: .15rem; }
.alert .flash-msg { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; line-height: 1.5; }
.alert .flash-debug { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem;
  margin-top: .6rem; padding-top: .6rem; border-top: 1px dashed rgba(0,0,0,.15); font-size: .85rem; }

/* ---- Notification badge & banner ---------------------------------- */
.site-nav .nav-link { position: relative; }
.nav-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: .35rem;
  border-radius: 999px; background: #d92d20; color: #fff; font-size: .7rem; font-weight: 700; line-height: 1;
  box-shadow: 0 0 0 2px #fff; animation: badge-pop .4s ease; vertical-align: 1px; }
@keyframes badge-pop { 0% { transform: scale(.4); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }
.row-new > td { background: #fff8f7 !important; }
.notice-banner { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border-radius: var(--radius);
  background: #fff; border: 1px solid #f5c7c2; box-shadow: var(--shadow); color: var(--ink); text-decoration: none; }
.notice-banner:hover { border-color: #d92d20; color: var(--ink); }
.notice-banner .ic { position: relative; width: 44px; height: 44px; border-radius: 12px; background: #fdecec; color: #d92d20;
  display: grid; place-items: center; font-size: 1.2rem; flex: 0 0 auto; }
.notice-banner .dot { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; border-radius: 999px; padding: 0 5px;
  background: #d92d20; color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px #fff; }
.notice-banner small { color: var(--muted); }

/* ---- Loading state ------------------------------------------------- */
.btn.is-loading { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; cursor: progress; opacity: .92; }
.btn.is-loading:disabled { opacity: .92; }
.btn-spinner { width: 1em; height: 1em; flex: 0 0 auto; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: btn-spin .7s linear infinite; }
@keyframes btn-spin { to { transform: rotate(360deg); } }
.page-loader { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 2000; opacity: 0; pointer-events: none;
  background: linear-gradient(90deg, var(--brand), var(--accent)); box-shadow: 0 0 8px rgba(11,79,138,.5); }
.page-loader.active { opacity: 1; animation: page-load 8s cubic-bezier(.1,.7,.3,1) forwards; }
@keyframes page-load { 0% { width: 0; } 20% { width: 45%; } 60% { width: 75%; } 100% { width: 92%; } }
@media (prefers-reduced-motion: reduce) {
  .btn-spinner { animation-duration: 1.6s; }
  .page-loader.active { animation: none; width: 70%; }
  .nav-badge { animation: none; }
}
/* keep brand colours while a button is disabled / loading */
.btn-accent:disabled, .btn-accent.disabled { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-outline-primary { --bs-btn-disabled-color: var(--brand); --bs-btn-disabled-border-color: var(--brand); }
.btn-light { --bs-btn-disabled-bg: #fff; --bs-btn-disabled-border-color: var(--line); }

/* ---- Toast messages ----------------------------------------------- */
.toast-stack { position: fixed; top: 1rem; right: 1rem; z-index: 2100; display: flex; flex-direction: column; gap: .6rem;
  width: min(380px, calc(100vw - 2rem)); pointer-events: none; }
.app-toast { position: relative; overflow: hidden; display: flex; align-items: flex-start; gap: .75rem; pointer-events: auto;
  background: #fff; color: var(--ink); border: 1px solid var(--line); border-left: 4px solid var(--t, var(--brand));
  border-radius: 12px; padding: .9rem 1rem; box-shadow: 0 12px 32px rgba(16,24,40,.16);
  transform: translateX(110%); opacity: 0; transition: transform .25s ease, opacity .25s ease; }
.app-toast.show { transform: none; opacity: 1; }
.app-toast.hide { transform: translateX(110%); opacity: 0; }
.app-toast-success { --t: #12b76a; } .app-toast-danger { --t: #d92d20; } .app-toast-warning { --t: #f79009; } .app-toast-info { --t: var(--brand); }
.app-toast-icon { color: var(--t); font-size: 1.15rem; line-height: 1.3; flex: 0 0 auto; }
.app-toast-body { flex: 1 1 auto; font-weight: 500; font-size: .92rem; line-height: 1.45; overflow-wrap: anywhere; padding-top: .05rem; }
.app-toast-close { border: 0; background: transparent; color: var(--muted); padding: 0 .1rem; line-height: 1; font-size: .85rem; }
.app-toast-close:hover { color: var(--ink); }
.app-toast-timer { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--t); opacity: .35;
  transform-origin: left; animation: toast-timer linear forwards; }
.app-toast.paused .app-toast-timer { animation-play-state: paused; }
@keyframes toast-timer { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (max-width: 575.98px) { .toast-stack { top: auto; bottom: 1rem; right: 1rem; left: 1rem; width: auto; } }

/* ---- Confirm dialog ------------------------------------------------ */
.confirm-modal { border: 0; border-radius: 18px; box-shadow: 0 24px 48px rgba(16,24,40,.25); }
.confirm-icon { width: 60px; height: 60px; margin: 0 auto 1rem; border-radius: 50%; display: grid; place-items: center;
  font-size: 1.7rem; background: var(--brand-50); color: var(--brand); box-shadow: 0 0 0 8px rgba(11,79,138,.06); }
.confirm-icon.is-danger { background: #fdecec; color: #d92d20; box-shadow: 0 0 0 8px rgba(217,45,32,.06); }

/* ---- Messages inbox ------------------------------------------------- */
.inbox { display: grid; grid-template-columns: minmax(260px, 360px) 1fr; gap: 1rem; align-items: start; }
.inbox-list { overflow: hidden; max-height: 75vh; overflow-y: auto; }
.inbox-item { padding: .9rem 1rem; border-left: 3px solid transparent; }
.inbox-item .subject { font-weight: 500; }
.inbox-item.unread .subject { font-weight: 700; }
.inbox-item.unread { background: #f7faff; }
.inbox-item.active-msg { background: var(--brand-50); border-left-color: var(--brand); }
.unread-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #d92d20; margin-right: .45rem; vertical-align: 2px; }
.message-body { font-size: 1rem; line-height: 1.7; white-space: normal; overflow-wrap: anywhere; }
.attachment-card { display: flex; align-items: center; gap: .9rem; max-width: 420px; padding: .8rem 1rem; border: 1px solid var(--line);
  border-radius: 12px; background: #f8fafc; text-decoration: none; color: var(--ink); }
.attachment-card > i:first-child { font-size: 1.8rem; color: var(--brand); }
.attachment-card:hover { border-color: var(--brand); color: var(--ink); background: #fff; }
@media (max-width: 767.98px) {
  .inbox { grid-template-columns: 1fr; }
  .inbox-list { max-height: 45vh; }
}

/* ---- Compact form modal (Send message) ------------------------------ */
.modal-compact { max-width: 540px; }
.modal-compact .modal-header { padding: .85rem 1.1rem; }
.modal-compact .modal-title { font-size: 1.05rem; }
.modal-compact .modal-body { padding: 1rem 1.1rem; }
.modal-compact .modal-footer { padding: .7rem 1.1rem; }
.modal-compact .form-control, .modal-compact .form-select { padding: .45rem .75rem; font-size: .92rem; }
.modal-compact textarea.form-control { min-height: 96px; resize: vertical; }
.modal-compact .form-label { margin-bottom: .25rem; }
/* gentle shake when someone clicks outside a modal that must be closed with Cancel / X */
.modal.modal-static .modal-dialog { transform: scale(1.015); }

/* ---- Checkboxes & radios: clearly visible on every page ------------- */
.form-check-input {
  border: 1.5px solid #98a2b3;
  background-color: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .12), 0 0 0 3px rgba(16, 24, 40, .03);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.form-check-input[type="checkbox"] { width: 1.15em; height: 1.15em; border-radius: .3em; }
.form-check-input:hover { border-color: var(--brand); box-shadow: 0 1px 3px rgba(11, 79, 138, .25), 0 0 0 3px rgba(11, 79, 138, .08); }
.form-check-input:focus { border-color: var(--brand); box-shadow: 0 0 0 .22rem rgba(11, 79, 138, .2); }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand);
  box-shadow: 0 2px 6px rgba(11, 79, 138, .35); }
.form-check-input:indeterminate { background-color: var(--brand); border-color: var(--brand); }
/* table selection column */
.table td > .form-check-input, .table th > .form-check-input { margin-top: 0; vertical-align: middle; }
tr:has(td > .form-check-input:checked) > td { background-color: #f2f7fd !important; }
/* table action buttons stay on one line */
.table .btn { white-space: nowrap; }

/* ---- Hall tickets --------------------------------------------------- */
.ht-preview { background: #f8fafc; border: 1px dashed #c5d3e4; border-radius: 10px; padding: .6rem .8rem; }
.ht-preview div { font-family: ui-monospace, Consolas, monospace; font-weight: 700; color: var(--accent); overflow-wrap: anywhere; }
.ticket-card.is-ready { border-top: 4px solid #12b76a; }
.ticket-no { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .7rem .9rem; border-radius: 10px;
  background: repeating-linear-gradient(135deg, #fff7fa, #fff7fa 8px, #fdf0f5 8px, #fdf0f5 16px); border: 1px dashed #e0b5c9; }
.ticket-no strong { font-family: ui-monospace, Consolas, monospace; font-size: 1.15rem; color: var(--accent); letter-spacing: .03em; }

/* ---- Header: fit 5 menu items on laptop screens ---------------------- */
.brand-text small { white-space: nowrap; }
@media (min-width: 1200px) and (max-width: 1499.98px) {
  .brand-text { max-width: 300px; }
  .brand-text strong { font-size: .9rem; }
  .site-nav .nav-link { padding: .5rem .6rem !important; font-size: .9rem; }
  .site-nav .nav-link > i { display: none; }
}
