/* =========================================================
   JOB POSTER ADMIN — CLEAN PREMIUM GLASS THEME
   Inspired by the supplied HR login reference.
   Uses existing admin.html classes and IDs; no JS/API changes.
   ========================================================= */
:root {
  --admin-navy-950: #101a42;
  --admin-navy-900: #172454;
  --admin-navy-800: #203a79;
  --admin-blue: #2f8fe5;
  --admin-cyan: #36c8ef;
  --admin-violet: #8b4df5;
  --admin-purple: #55209a;
  --admin-ink: #172554;
  --admin-muted: #64748b;
  --admin-line: #dfe5f5;
  --admin-surface: #ffffff;
  --admin-shadow: 0 24px 65px rgba(26, 35, 86, .16);
  --admin-radius: 20px;
}

.admin-body {
  min-height: 100vh;
  margin: 0;
  color: var(--admin-ink);
  background: #f2f4ff;
  font-family: inherit;
}
.admin-body *, .admin-body *::before, .admin-body *::after { box-sizing: border-box; }
.admin-body .hidden { display: none !important; }
.admin-body.auth-pending { min-height:100vh; overflow:hidden; background:#10151d; }
.admin-body.auth-pending .admin-header, .admin-body.auth-pending .admin-main { visibility:hidden; }
.session-loading { display:none; }
.admin-body.auth-pending.auth-countdown .session-loading {
  position:fixed; z-index:20000; inset:0; display:flex; align-items:center; justify-content:center;
  gap:.35em; padding:20px; overflow:hidden; isolation:isolate; color:#f7fbff;
  font-size:clamp(22px, 2.5vw, 36px); font-weight:850; line-height:1.6; text-align:center;
  text-shadow:0 2px 14px rgba(0,0,0,.9);
}
.session-loading-background { position:absolute; z-index:-2; inset:0; width:100%; height:100%; object-fit:cover; object-position:center; transform:translateZ(0); }
.session-loading::after { position:absolute; z-index:-1; inset:0; content:""; background:linear-gradient(115deg, rgba(5,10,18,.72), rgba(10,15,24,.56)); pointer-events:none; }
.session-loading-message, .session-loading-countdown, .session-loading-emoji { position:relative; z-index:1; }
.session-loading-countdown { min-width:1.15em; font-variant-numeric:tabular-nums; }

/* ---------------- Khmer typography only ----------------
   Use modern Khmer fonts throughout Admin without changing layout,
   colors, animations, modal behavior, or JavaScript functionality.
   ------------------------------------------------------- */
.admin-body,
.admin-body button,
.admin-body input,
.admin-body select,
.admin-body textarea,
.admin-body option {
  font-family: "Kantumruy Pro", "Noto Sans Khmer", "Khmer OS Battambang", sans-serif !important;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

/* Improve Khmer readability while retaining each component's existing sizing. */
.admin-body :is(h1, h2, h3, p, label, small, span, a, button, li, td, th, .form-message, .admin-modal-message) {
  overflow-wrap: anywhere;
}

/* -------------------- Glassy Login — single source of truth -------------------- */
.admin-body:has(#login-panel:not(.hidden)) {
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
  color: #f7fbff;
  background: #10151d;
}
.admin-body:has(#login-panel:not(.hidden)) .admin-header { display: none; }
.admin-body:has(#login-panel:not(.hidden)) .admin-main.admin-main-login {
  position: relative;
  isolation: isolate;
  display: block;
  width: 100%;
  max-width: none;
  height: 100vh;
  min-height: 560px;
  margin: 0;
  padding: 0;
}
.admin-body:has(#login-panel:not(.hidden)) .login-container {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 560px;
  overflow: hidden;
  padding: 70px 20px 54px;
  background:
    linear-gradient(115deg, rgba(5, 10, 18, .72), rgba(10, 15, 24, .56)),
    url("/login-background.png") center / cover no-repeat,
    #171d28;
}
.admin-body:has(#login-panel:not(.hidden)) .login-container::before {
  content: "គេហទំព័រនេះសម្រាប់តែអ្នកគ្រប់គ្រងប៉ុណ្ណោះ";
  position: absolute;
  top: clamp(24px, 6vh, 58px);
  left: 16px;
  right: 16px;
  z-index: 1;
  color: rgba(255,255,255,.92);
  text-align: center;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(25px, 3vw, 38px);
  font-weight: 400;
  letter-spacing: .13em;
  text-shadow: 0 2px 12px rgba(0,0,0,.75);
}
.admin-body:has(#login-panel:not(.hidden)) .login-left-pane { display: none !important; }
.admin-body:has(#login-panel:not(.hidden)) .login-right-pane {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 440px);
  min-width: 0;
  padding: 0;
  overflow: visible;
  background: transparent;
}
.admin-body:has(#login-panel:not(.hidden)) .login-right-pane::before,
.admin-body:has(#login-panel:not(.hidden)) .login-right-pane::after { content: none; }
.admin-body:has(#login-panel:not(.hidden)) .login-panel {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 440px;
  padding: 32px 30px 29px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 3px;
  color: #f5f7fb;
  background: rgba(225, 230, 235, .16);
  box-shadow: 0 18px 48px rgba(0,0,0,.30), inset 0 1px 0 rgba(255,255,255,.10);
  -webkit-backdrop-filter: blur(13px) saturate(115%);
  backdrop-filter: blur(13px) saturate(115%);
  animation: glassy-card-in .65s ease both;
}
.admin-body:has(#login-panel:not(.hidden)) .login-panel::before,
.admin-body:has(#login-panel:not(.hidden)) .login-panel::after { content: none; }
.admin-body:has(#login-panel:not(.hidden)) .login-panel .eyebrow {
  display: none;
}
.admin-body:has(#login-panel:not(.hidden)) .login-panel h1 {
  margin: 0 0 8px;
  color: #fff;
  font-size: clamp(20px, 2vw, 25px);
  font-weight: 700;
  line-height: 1.7;
  text-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.admin-body:has(#login-panel:not(.hidden)) .login-panel > p,
.admin-body:has(#login-panel:not(.hidden)) .login-panel form > p {
  margin: 0 0 20px;
  color: rgba(255,255,255,.82);
  font-size: 12px;
  line-height: 1.9;
}
.admin-body:has(#login-panel:not(.hidden)) .login-panel form {
  display: grid;
  gap: 12px;
}
.admin-body:has(#login-panel:not(.hidden)) .login-panel label {
  display: grid;
  gap: 6px;
  color: rgba(255,255,255,.92);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.8;
}
.admin-body:has(#login-panel:not(.hidden)) .login-panel input {
  width: 100%;
  min-height: 43px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.23);
  border-left: 2px solid rgba(34, 224, 235, .85);
  border-radius: 2px;
  outline: none;
  color: #fff;
  background: rgba(15,20,28,.19);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.08);
  font-size: 13px;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.admin-body:has(#login-panel:not(.hidden)) .login-panel input:hover,
.admin-body:has(#login-panel:not(.hidden)) .login-panel input:focus {
  border-color: rgba(47,231,239,.8);
  border-left-color: #28e5ed;
  background: rgba(15,20,28,.28);
  box-shadow: 0 0 0 3px rgba(30,213,229,.10);
}
.admin-body:has(#login-panel:not(.hidden)) .login-panel input::placeholder { color: rgba(255,255,255,.6); }
.admin-body:has(#login-panel:not(.hidden)) .login-panel input:-webkit-autofill,
.admin-body:has(#login-panel:not(.hidden)) .login-panel input:-webkit-autofill:hover,
.admin-body:has(#login-panel:not(.hidden)) .login-panel input:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff;
  transition: background-color 9999s ease-out;
  box-shadow: 0 0 0 1000px rgba(30,35,43,.92) inset;
}
.admin-body:has(#login-panel:not(.hidden)) .login-panel .button {
  min-height: 43px;
  border-radius: 2px;
  font-size: 13px;
  font-weight: 700;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.admin-body:has(#login-panel:not(.hidden)) .login-panel .button-primary {
  margin-top: 4px;
  border: 1px solid rgba(255,255,255,.55);
  color: #fff;
  background: rgba(15,19,25,.47);
  box-shadow: 0 5px 16px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.12);
}
.admin-body:has(#login-panel:not(.hidden)) .login-panel .button-primary:hover {
  transform: translateY(-2px);
  border-color: rgba(45,231,238,.9);
  background: rgba(14,25,33,.70);
  box-shadow: 0 8px 22px rgba(0,0,0,.25), 0 0 16px rgba(39,224,234,.15);
}
.admin-body:has(#login-panel:not(.hidden)) .login-panel .button-secondary {
  border: 1px solid rgba(255,255,255,.3);
  color: #fff;
  background: rgba(255,255,255,.09);
}
.admin-body:has(#login-panel:not(.hidden)) .login-panel .button-secondary:hover { background: rgba(255,255,255,.17); }
.admin-body:has(#login-panel:not(.hidden)) .login-panel .small-button {
  min-height: 32px;
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 2px;
  color: rgba(255,255,255,.9);
  background: rgba(255,255,255,.08);
  font-size: 11px;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}
.admin-body:has(#login-panel:not(.hidden)) .login-panel .small-button:hover {
  border-color: rgba(40,225,235,.75);
  background: rgba(255,255,255,.15);
}
.login-panel #otp-form, .login-panel #recovery-form { margin-top: 4px; }
.login-panel #resend-otp, .login-panel #show-recovery, .login-panel #back-to-login, .login-panel #back-to-otp { width: 100%; }

/* -------------------- Dashboard -------------------- */
.admin-body:has(#dashboard:not(.hidden)) { min-height: 100vh; height: auto; overflow: auto; background: radial-gradient(ellipse at 88% 0%, rgba(151,123,255,.12), transparent 34%), #f4f6ff; }
.admin-body:has(#dashboard:not(.hidden)) .admin-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 72px;
  padding: 0 clamp(18px, 4vw, 54px);
  border-bottom: 1px solid rgba(255,255,255,.13);
  background: linear-gradient(110deg, #17234f, #263b83 65%, #4c3596);
  box-shadow: 0 8px 28px rgba(27,37,89,.18);
}
.admin-header .brand { display: inline-flex; align-items: center; gap: 11px; color: #fff; text-decoration: none; font-weight: 850; }
.admin-header .brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: #20336c; background: linear-gradient(145deg,#fff,#dfe6ff); font-weight: 950; box-shadow: 0 5px 16px rgba(0,0,0,.16); }
.admin-header .brand-accent { color: #a6eaff; }
.admin-header .brand small { display: block; margin-top: 2px; color: #c8d4ff; font-size: 9px; font-weight: 600; letter-spacing: 1.25px; text-transform: uppercase; }
.admin-header .nav-admin { padding: 10px 15px; border: 1px solid rgba(255,255,255,.24); border-radius: 999px; color: #fff; background: rgba(255,255,255,.08); font-size: 12px; font-weight: 750; text-decoration: none; transition: background .2s ease, transform .2s ease; }
.admin-header .nav-admin:hover { transform: translateY(-1px); background: rgba(255,255,255,.17); }
.admin-main { width: 100%; max-width: 1440px; margin: 0 auto; padding: 36px clamp(16px, 3vw, 42px) 64px; }
.dashboard { animation: admin-card-enter .45s ease both; }
.dashboard-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 auto 24px; padding: 0 2px 20px; border-bottom: 1px solid #e0e5f6; }
.dashboard-heading .eyebrow { color: #7356d8; }
.dashboard-heading h1 { margin: 6px 0; color: #1b285a; font-size: clamp(23px, 2.3vw, 30px); line-height: 1.55; font-weight: 850; }
.dashboard-heading p { margin: 0; color: #697394; font-size: 12px; line-height: 1.8; }
.dashboard-heading #logout-button { min-width: 100px; border-radius: 999px; }
.dashboard-layout { display: grid; grid-template-columns: minmax(310px, .9fr) minmax(0, 1.1fr); align-items: start; gap: 22px; }
.admin-panel { min-width: 0; padding: clamp(17px, 2vw, 25px); border: 1px solid rgba(211,218,243,.9); border-radius: 18px; background: rgba(255,255,255,.91); box-shadow: 0 12px 34px rgba(32,43,105,.07); backdrop-filter: blur(10px); }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 19px; padding-bottom: 14px; border-bottom: 1px solid #edf0fb; }
.panel-title h2 { margin: 0; color: #222f68; font-size: 16px; font-weight: 850; line-height: 1.6; }
.job-count { display: inline-grid; place-items: center; min-width: 30px; min-height: 30px; padding: 4px 9px; border: 1px solid #ddd6fe; border-radius: 999px; color: #6041c5; background: #f1edff; font-size: 12px; font-weight: 850; }
.admin-panel form { display: grid; gap: 14px; }
.admin-main label { display: grid; gap: 7px; color: #39456e; font-size: 12px; font-weight: 750; }
.admin-main input, .admin-main select, .admin-main textarea { width: 100%; min-width: 0; padding: 11px 12px; border: 1px solid #dce2f3; border-radius: 10px; outline: none; color: #1f2d5c; background: #fff; font: inherit; font-size: 12px; font-weight: 450; transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; }
.admin-main input::placeholder, .admin-main textarea::placeholder { color: #9aa3c0; }
.admin-main input:hover, .admin-main select:hover, .admin-main textarea:hover { border-color: #b9b8f4; }
.admin-main input:focus, .admin-main select:focus, .admin-main textarea:focus { border-color: #8b6cf3; background: #fff; box-shadow: 0 0 0 3px rgba(139,108,243,.13); }
.admin-main textarea { resize: vertical; line-height: 1.75; }
.admin-main input[type="file"] { padding: 9px; background: #fafaff; font-size: 11px; }
.admin-main input[type="file"]::file-selector-button { margin-right: 10px; padding: 7px 10px; border: 1px solid #dedcf7; border-radius: 7px; color: #4d3aab; background: #f3f0ff; font-weight: 750; cursor: pointer; }
.required { color: #dc4267; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 10px 14px; border-radius: 10px; font-size: 12px; font-weight: 800; }
.admin-main .button-primary { border: 1px solid rgba(255,255,255,.35); color: #fff; background: linear-gradient(105deg, #36bfe9, #6673f4 52%, #984cf0); box-shadow: 0 7px 18px rgba(91,91,224,.2); }
.admin-main .button-primary:hover { transform: translateY(-2px); box-shadow: 0 11px 23px rgba(91,91,224,.28); filter: saturate(1.08); }
.admin-main .button-primary:active { transform: translateY(0); }
.admin-main .button-secondary { border: 1px solid #dcdff2; color: #4a4b83; background: #fff; }
.admin-main .button-secondary:hover { border-color: #b8a8f8; background: #f7f5ff; }
.full-button { width: 100%; }
.small-button { padding: 8px 11px; border: 1px solid #dedcf6; border-radius: 9px; color: #5945ad; background: #f8f7ff; font-size: 11px; font-weight: 750; }
.small-button:hover { border-color: #b5a3fa; background: #efebff; }
.poster-preview { padding: 10px; border: 1px dashed #c8c8ed; border-radius: 12px; background: #fafaff; }
.poster-preview img { display: block; max-width: 100%; max-height: 240px; margin: auto; border: 1px solid #e3e5f5; border-radius: 9px; object-fit: contain; background: #fff; }
.admin-jobs { display: grid; gap: 12px; }
.admin-job { display: grid; grid-template-columns: 88px minmax(0,1fr); gap: 13px; padding: 12px; border: 1px solid #e3e6f5; border-radius: 14px; background: #fff; transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease; }
.admin-job:hover { transform: translateY(-2px); border-color: #c5b9fa; box-shadow: 0 10px 24px rgba(47,49,123,.09); }
.admin-job img, .admin-job-placeholder { width: 88px; height: 88px; border: 1px solid #ececf8; border-radius: 10px; object-fit: cover; background: #f3f3ff; }
.admin-job-placeholder { display: grid; place-items: center; color: #7962d6; background: linear-gradient(145deg,#f3f0ff,#fff); font-size: 24px; }
.admin-job-info { min-width: 0; }
.admin-job-info h3 { margin: 0 0 4px; color: #242f66; font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
.admin-job-info p { margin: 0 0 8px; color: #737b9b; font-size: 11px; line-height: 1.7; }
.status-tag { display: inline-block; margin-bottom: 6px; padding: 4px 8px; border-radius: 999px; font-size: 9px; font-weight: 850; letter-spacing: .35px; }
.status-draft { color: #8b5d00; background: #fff3cf; }
.status-published { color: #11734e; background: #dff8eb; }
.admin-job-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.admin-job-actions button, .admin-job-actions a { padding: 6px 9px; border: 1px solid #dedff1; border-radius: 8px; color: #4b4b83; background: #fff; font-size: 10px; font-weight: 750; text-decoration: none; cursor: pointer; transition: background .18s ease, border-color .18s ease, transform .18s ease; }
.admin-job-actions button:hover, .admin-job-actions a:hover { transform: translateY(-1px); border-color: #b9a8fa; background: #f5f2ff; }
.admin-job-actions .delete-button { color: #b42348; }
.admin-job-actions .delete-button:hover { border-color: #f2b6c4; background: #fff0f3; }
.empty-state { padding: 20px; border: 1px dashed #d9def1; border-radius: 12px; color: #7b83a2; background: #fafaff; font-size: 12px; line-height: 1.8; text-align: center; }
.toast { position: fixed; z-index: 100; right: 20px; bottom: 20px; max-width: min(420px, calc(100vw - 32px)); padding: 12px 16px; border: 1px solid rgba(255,255,255,.2); border-radius: 12px; color: #fff; background: linear-gradient(110deg,#1b2a63,#5930a2); box-shadow: 0 14px 35px rgba(30,34,91,.24); }

/* -------------------- Motion -------------------- */
@keyframes glassy-card-in { from { opacity: 0; transform: translateY(12px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes admin-card-enter { from { opacity: 0; transform: translateY(14px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes admin-text-rise { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
@keyframes admin-art-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes admin-orbit-spin { to { transform: rotate(360deg); } }
@keyframes admin-orbit-drift { from { transform: rotate(0deg) translateX(0); } to { transform: rotate(360deg) translateX(8px); } }
@keyframes admin-light-sweep { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes admin-top-glow { 0%,100% { opacity: .6; background-position: 0 0; } 50% { opacity: 1; background-position: 100% 0; } }

/* -------------------- Responsive -------------------- */
@media (max-width: 900px) {
  .dashboard-layout { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 640px) {
  .admin-body:has(#login-panel:not(.hidden)) { height: auto; min-height: 100vh; overflow: auto; }
  .admin-body:has(#login-panel:not(.hidden)) .admin-main.admin-main-login { height: auto; min-height: 100vh; }
  .admin-body:has(#login-panel:not(.hidden)) .login-container { min-height: 100vh; height: auto; padding: 82px 16px 48px; }
  .admin-body:has(#login-panel:not(.hidden)) .login-container::before { top: 25px; font-size: 25px; letter-spacing: .08em; }
  .admin-body:has(#login-panel:not(.hidden)) .login-right-pane { width: min(100%, 420px); }
  .admin-body:has(#login-panel:not(.hidden)) .login-panel { padding: 27px 21px 23px; }
  .admin-body:has(#login-panel:not(.hidden)) .login-panel h1 { font-size: 20px; }
  .admin-header { height: 64px; padding: 0 13px; }
  .admin-header .brand { gap: 8px; font-size: 14px; }
  .admin-header .brand-mark { width: 35px; height: 35px; border-radius: 10px; }
  .admin-header .nav-admin { padding: 8px 10px; font-size: 10px; }
  .admin-main { padding: 25px 13px 42px; }
  .dashboard-heading { align-items: flex-start; gap: 10px; margin-bottom: 18px; padding-bottom: 15px; }
  .dashboard-heading h1 { font-size: 22px; }
  .dashboard-heading p { max-width: 260px; font-size: 11px; }
  .dashboard-heading #logout-button { min-width: auto; padding: 9px 11px; font-size: 11px; }
  .admin-panel { padding: 15px; border-radius: 15px; }
  .panel-title h2 { font-size: 14px; }
  .form-row { grid-template-columns: minmax(0,1fr); }
  .admin-job { grid-template-columns: 68px minmax(0,1fr); gap: 10px; padding: 9px; }
  .admin-job img, .admin-job-placeholder { width: 68px; height: 68px; }
  .admin-job-info h3 { font-size: 12px; }
  .admin-job-actions { gap: 5px; }
  .admin-job-actions button, .admin-job-actions a { padding: 6px 7px; font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}


/* -------------------- Glassy alerts: one shared style for every modal alert -------------------- */
body.admin-modal-open { overflow: hidden; }
/* Inline message nodes are retained for accessibility/logic; the shared modal is the visible alert UI. */
.admin-body .form-message { display: none !important; }
.admin-modal-backdrop {
  position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center;
  padding: 22px; background: rgba(7, 13, 30, .43);
  -webkit-backdrop-filter: blur(13px) saturate(135%); backdrop-filter: blur(13px) saturate(135%);
  opacity: 1; visibility: visible; transition: opacity .22s ease, visibility .22s ease;
}
.admin-modal-backdrop[aria-hidden="true"] { pointer-events: none; }
.admin-modal-backdrop[aria-hidden="false"] { pointer-events: auto; }
.admin-modal-backdrop.hidden { display: none !important; }
.admin-modal {
  position: relative; isolation: isolate; overflow: hidden; width: min(100%, 430px); padding: 31px 30px 26px;
  border: 1px solid rgba(255,255,255,.43); border-radius: 25px; outline: none; text-align: center; color: #fff;
  background: linear-gradient(135deg, rgba(255,255,255,.22), rgba(255,255,255,.075) 42%, rgba(117,132,255,.19)), rgba(18, 29, 65, .56);
  -webkit-backdrop-filter: blur(28px) saturate(165%); backdrop-filter: blur(28px) saturate(165%);
  box-shadow: 0 28px 85px rgba(3,8,28,.38), inset 0 1px 0 rgba(255,255,255,.36), inset 0 -1px 0 rgba(255,255,255,.08);
  animation: admin-modal-enter .32s cubic-bezier(.2,.8,.2,1) both;
}
.admin-modal::before, .admin-modal::after { content:""; position:absolute; z-index:-1; border:1px solid rgba(255,255,255,.16); border-radius:50%; pointer-events:none; }
.admin-modal::before { width:220px; height:220px; top:-145px; right:-80px; box-shadow:0 0 0 15px rgba(255,255,255,.045), 0 0 0 31px rgba(255,255,255,.025); }
.admin-modal::after { width:140px; height:140px; bottom:-105px; left:-80px; }
.admin-modal-topline { position:absolute; top:0; left:12%; width:76%; height:2px; border-radius:0 0 9px 9px; background:linear-gradient(90deg,transparent,#36d6f3,#b3a5ff,transparent); box-shadow:0 0 18px rgba(54,214,243,.7); }
.admin-modal-icon { display:grid; place-items:center; width:68px; height:68px; margin:0 auto 16px; border:1px solid rgba(255,255,255,.4); border-radius:22px; color:#fff; background:rgba(255,255,255,.13); box-shadow:0 10px 30px rgba(5,10,40,.2), inset 0 1px 0 rgba(255,255,255,.25); }
.admin-modal-icon[hidden] { display:none; }
.admin-modal-icon span { display:grid; place-items:center; width:43px; height:43px; border-radius:15px; font-size:27px; font-weight:800; color:#fff; background:linear-gradient(145deg,#35c9ee,#6374ff 60%,#9854f4); box-shadow:0 5px 18px rgba(60,100,240,.28); }
.admin-modal.is-info .admin-modal-icon span { color:#e5f7ff; background:linear-gradient(145deg,#25c7e8,#456dff); }
.admin-modal.is-success .admin-modal-icon span { color:#d9fff0; background:linear-gradient(145deg,#0bbf91,#087f88); }
.admin-modal.is-error .admin-modal-icon span { color:#fff0f2; background:linear-gradient(145deg,#ff647d,#c52659); }
.admin-modal.is-warning .admin-modal-icon span { color:#fff6d6; background:linear-gradient(145deg,#fbbf24,#f97316); }
.admin-modal.is-info .admin-modal-topline { background:linear-gradient(90deg,transparent,#35d5ff,#6988ff,transparent); }
.admin-modal.is-warning .admin-modal-topline { background:linear-gradient(90deg,transparent,#ffd166,#ff8b45,transparent); }
.admin-modal.is-error .admin-modal-topline { background:linear-gradient(90deg,transparent,#ff7890,#d52b68,transparent); }
.admin-modal.is-success .admin-modal-topline { background:linear-gradient(90deg,transparent,#34e6b0,#00a98f,transparent); }
.admin-modal-eyebrow { margin:0 0 9px; color:#d6e0ff; font-size:9px; font-weight:850; letter-spacing:2px; text-shadow:0 1px 8px rgba(0,0,0,.18); }
.admin-modal h2 { margin:0; color:#fff; font-size:22px; line-height:1.55; font-weight:850; text-shadow:0 2px 12px rgba(0,0,0,.2); }
.admin-modal-message { margin:10px auto 23px; max-width:340px; color:rgba(255,255,255,.92); font-size:13px; line-height:1.9; overflow-wrap:anywhere; text-shadow:0 1px 8px rgba(0,0,0,.16); }
.admin-modal.is-job-preview { display:flex; flex-direction:column; width:min(94vw, 1100px); max-width:1100px; max-height:calc(100vh - 44px); text-align:left; }
.admin-modal.is-job-preview h2 { overflow-wrap:anywhere; }
.admin-modal.is-job-preview .admin-modal-message { flex:1 1 auto; min-width:0; width:100%; max-width:none; max-height:min(68vh, 720px); margin:16px auto 20px; overflow:auto; }
.admin-job-preview { display:grid; grid-template-columns:minmax(230px, .8fr) minmax(0, 1.4fr); gap:20px; align-items:start; width:100%; }
.admin-job-preview:not(.has-poster) { grid-template-columns:minmax(0, 1fr); }
.admin-job-preview-poster-wrap { display:grid; place-items:center; min-width:0; padding:10px; border:1px solid rgba(255,255,255,.22); border-radius:14px; background:rgba(255,255,255,.08); }
.admin-modal-poster { display:block; max-width:100%; max-height:62vh; border-radius:9px; object-fit:contain; background:#fff; box-shadow:0 14px 35px rgba(0,0,0,.22); }
.admin-job-preview-fields { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:9px; min-width:0; }
.admin-job-preview-field { min-width:0; padding:9px 11px; border:1px solid rgba(255,255,255,.18); border-radius:10px; background:rgba(255,255,255,.08); }
.admin-job-preview-field strong { display:block; margin-bottom:4px; color:#d6e0ff; font-size:10px; font-weight:800; }
.admin-job-preview-field span { display:block; color:rgba(255,255,255,.96); font-size:12px; line-height:1.7; overflow-wrap:anywhere; white-space:pre-wrap; }
.admin-job-preview-field.is-wide { grid-column:1 / -1; }
.admin-job-preview-no-poster { grid-column:1 / -1; margin:0; padding:10px 12px; border:1px dashed rgba(255,255,255,.3); border-radius:10px; color:#fff; font-size:12px; }
.admin-job-preview-form { display:flex; flex-direction:column; gap:12px; }
.admin-job-preview-field input:not([type="file"]), .admin-job-preview-field select, .admin-job-preview-field textarea { display:block; width:100%; min-width:0; padding:9px 10px; border:1px solid rgba(255,255,255,.25); border-radius:8px; outline:none; color:#fff; background:rgba(9,18,45,.34); font:inherit; font-size:12px; line-height:1.6; }
.admin-job-preview-field input:focus, .admin-job-preview-field select:focus, .admin-job-preview-field textarea:focus { border-color:#66d9f1; box-shadow:0 0 0 3px rgba(73,203,236,.16); }
.admin-job-preview-field select option { color:#172554; background:#fff; }
.admin-job-preview-field textarea { min-height:150px; resize:vertical; white-space:pre-wrap; }
.admin-job-preview-upload-label { display:grid; gap:7px; width:100%; margin-top:10px; color:#e7edff; font-size:11px; font-weight:750; }
.admin-job-preview-upload-label input { width:100%; min-width:0; padding:7px; border:1px solid rgba(255,255,255,.24); border-radius:8px; color:#fff; background:rgba(9,18,45,.28); font-size:10px; }
.admin-job-preview-upload-label input::file-selector-button { margin-right:8px; padding:6px 9px; border:0; border-radius:6px; color:#1e3a68; background:#e9f1ff; font-weight:750; cursor:pointer; }
.admin-job-preview-notice { padding:9px 12px; border:1px solid rgba(255,144,161,.5); border-radius:9px; color:#fff; background:rgba(180,35,72,.27); font-size:12px; line-height:1.6; }
.admin-modal-actions { display:flex; justify-content:center; gap:10px; }
.admin-modal-actions .button { min-width:126px; min-height:43px; border-radius:12px; font-size:12px; font-weight:800; }
.admin-modal-actions .button-primary { border:1px solid rgba(255,255,255,.42); background:linear-gradient(100deg,rgba(36,198,220,.88),rgba(82,124,255,.9) 58%,rgba(146,81,245,.9)); box-shadow:0 8px 22px rgba(55,115,255,.24), inset 0 1px 0 rgba(255,255,255,.24); }
.admin-modal-actions .button-secondary { color:#fff; border:1px solid rgba(255,255,255,.38); background:rgba(255,255,255,.13); -webkit-backdrop-filter:blur(12px); backdrop-filter:blur(12px); }
.admin-modal-actions .button-danger { color:#fff; border:1px solid rgba(255,255,255,.32); background:linear-gradient(100deg,rgba(239,71,111,.92),rgba(185,28,85,.92)); box-shadow:0 8px 22px rgba(239,71,111,.22); }
.admin-modal-actions .button:hover { transform:translateY(-2px); filter:brightness(1.08); }
/* Keep the fallback toast glassy too, should any future UI use it. */
.admin-body .toast { border:1px solid rgba(255,255,255,.34); background:rgba(25,36,76,.55); -webkit-backdrop-filter:blur(22px) saturate(160%); backdrop-filter:blur(22px) saturate(160%); box-shadow:0 18px 45px rgba(5,10,35,.25), inset 0 1px 0 rgba(255,255,255,.18); }
@keyframes admin-modal-enter { from { opacity:0; transform:translateY(12px) scale(.94); } to { opacity:1; transform:translateY(0) scale(1); } }
@media (max-width: 480px) { .admin-modal-backdrop { padding:16px; } .admin-modal { padding:27px 20px 22px; border-radius:21px; } .admin-modal h2 { font-size:19px; } .admin-modal-message { font-size:12px; } .admin-modal-actions { flex-direction:column-reverse; } .admin-modal-actions .button { width:100%; } }
@media (max-width: 620px) { .admin-modal.is-job-preview { width:min(94vw, 520px); } .admin-modal.is-job-preview .admin-modal-message { max-height:calc(100vh - 250px); } .admin-job-preview, .admin-job-preview.has-poster { grid-template-columns:minmax(0, 1fr); } .admin-modal-poster { max-height:34vh; } .admin-job-preview-fields { grid-template-columns:minmax(0, 1fr); } .admin-job-preview-field.is-wide { grid-column:auto; } }
@media (prefers-reduced-motion: reduce) { .admin-modal { animation:none; } .admin-modal-backdrop { transition:none; } }


/* Hide the old login/welcome layout while the authenticated Dashboard is visible.
   Keep the markup intact so Login, OTP, and Recovery Code can return normally on logout. */
.admin-body:has(#dashboard:not(.hidden)) #login-container {
  display: none !important;
}


/* ---------------- Telegram OTP password reset forms ---------------- */
.admin-body:has(#login-panel:not(.hidden)) .login-panel #password-reset-request-form,
.admin-body:has(#login-panel:not(.hidden)) .login-panel #password-reset-otp-form,
.admin-body:has(#login-panel:not(.hidden)) .login-panel #password-reset-new-form {
  margin-top: 4px;
}
.admin-body:has(#login-panel:not(.hidden)) .login-panel #show-password-reset {
  width: 100%;
  text-align: center;
}
.admin-body:has(#login-panel:not(.hidden)) .login-panel #password-reset-request-form > p,
.admin-body:has(#login-panel:not(.hidden)) .login-panel #password-reset-otp-form > p,
.admin-body:has(#login-panel:not(.hidden)) .login-panel #password-reset-new-form > p {
  color: rgba(255,255,255,.84);
  line-height: 1.9;
}

/* Closed poster controls and status in the admin job list. */
.status-closed { color: #b4233b; background: #ffe3e8; }
.admin-job-actions .reopen-poster-button {
  border-color: #b5d8c6;
  color: #176b48;
  background: #eaf8f0;
}
.admin-job-actions .reopen-poster-button:hover {
  border-color: #67b28a;
  background: #d9f2e4;
}
.admin-body:has(#dashboard:not(.hidden)) .status-closed {
  color: #ffd8df;
  background: rgba(180,35,59,.34);
}
.admin-body:has(#dashboard:not(.hidden)) .admin-job-actions .reopen-poster-button {
  border-color: rgba(92,210,153,.45);
  color: #c8ffe3;
  background: rgba(17,115,78,.24);
}
.admin-body:has(#dashboard:not(.hidden)) .admin-job-actions .reopen-poster-button:hover {
  border-color: rgba(92,210,153,.7);
  background: rgba(17,115,78,.36);
}


/* ---------------- Activity Log & Security Dashboard ---------------- */
.activity-panel { margin: 0 0 24px; min-width: 0; }
.activity-subtitle { margin: 5px 0 0; color: rgba(255,255,255,.65); font-size: .88rem; }
.activity-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin: 18px 0; }
.activity-stats > div { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid rgba(255,255,255,.1); border-radius: 14px; background: rgba(255,255,255,.045); }
.activity-stats strong { font-size: 1.45rem; color: #fff; }
.activity-stats span { color: rgba(255,255,255,.65); font-size: .82rem; }
.activity-integrity { padding: 11px 14px; border-radius: 10px; margin-bottom: 15px; font-size: .88rem; font-weight: 700; }
.activity-integrity.is-valid { color: #b8f5d3; background: rgba(21,128,75,.18); border: 1px solid rgba(83,205,143,.35); }
.activity-integrity.is-invalid { color: #ffd0d0; background: rgba(185,28,28,.2); border: 1px solid rgba(248,113,113,.45); }
.activity-filters { display: grid; grid-template-columns: minmax(180px,2fr) repeat(2,minmax(130px,1fr)) minmax(130px,1fr) auto; gap: 9px; margin: 14px 0; }
.activity-filters input,.activity-filters select { min-width: 0; width: 100%; padding: 10px 12px; border-radius: 9px; border: 1px solid rgba(255,255,255,.16); color: #fff; background: rgba(5,12,28,.55); }
.activity-filters select option { color: #111; }
.activity-table-wrap { overflow-x: auto; border: 1px solid rgba(255,255,255,.1); border-radius: 12px; }
.activity-table { width: 100%; min-width: 850px; border-collapse: collapse; font-size: .82rem; }
.activity-table th,.activity-table td { padding: 11px 12px; text-align: left; border-bottom: 1px solid rgba(255,255,255,.08); vertical-align: top; }
.activity-table th { color: rgba(255,255,255,.75); background: rgba(255,255,255,.05); white-space: nowrap; }
.activity-table td { color: rgba(255,255,255,.88); overflow-wrap: anywhere; }
.activity-status { font-weight: 700; white-space: nowrap; }
.activity-status.status-success { color: #8de0b2; }
.activity-status.status-failed { color: #ff9ca8; }
.activity-status.status-warning { color: #ffd27a; }
.activity-pagination { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 14px; color: rgba(255,255,255,.75); }
@media(max-width:900px) { .activity-filters { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:560px) { .activity-stats { grid-template-columns: repeat(2,minmax(0,1fr)); } .activity-filters { grid-template-columns: 1fr; } }

.activity-failure-counters { margin: 12px 0 16px; }
.activity-failure-counters h3 { margin: 0 0 8px; color: rgba(255,255,255,.8); font-size: .9rem; }
#activity-failure-counters { display: flex; flex-wrap: wrap; gap: 7px; }
#activity-failure-counters span { padding: 7px 10px; border-radius: 8px; color: #ffd7a0; background: rgba(170,100,20,.16); border: 1px solid rgba(255,190,100,.22); font-size: .78rem; }

/* =========================================================
   JOB POSTER ADMIN — CLEAN LIGHT SIDEBAR DASHBOARD
   UI-only layout layer; existing component IDs and behaviors remain.
   ========================================================= */
:root {
  --admin-shell-bg: #f5f7fb;
  --admin-sidebar-bg: #173b70;
  --admin-sidebar-deep: #12315f;
  --admin-brand-yellow: #f7c62f;
  --admin-text-main: #182943;
  --admin-text-muted: #718096;
  --admin-border-clean: #e4eaf2;
}
.admin-body:has(#dashboard:not(.hidden)) {
  min-height: 100vh;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--admin-shell-bg);
  color: var(--admin-text-main);
}
.admin-body:has(#dashboard:not(.hidden)) .admin-header { display: none; }
.admin-body:has(#dashboard:not(.hidden)) .admin-main {
  display: block; width: 100%; max-width: none; min-height: 100vh;
  margin: 0; padding: 0;
}
#dashboard.dashboard {
  display: grid; grid-template-columns: 252px minmax(0,1fr); width:100%; height:100vh; height:100dvh; min-height:0; overflow:hidden;
  background: var(--admin-shell-bg); animation: none;
}
#dashboard.dashboard.hidden { display: none !important; }
.admin-sidebar {
  position: sticky; top: 0; display: flex; flex-direction: column; gap: 0;
  width: 252px; height: 100vh; min-height: 560px; padding: 25px 16px 18px;
  color: #fff; background: linear-gradient(180deg,var(--admin-sidebar-bg),var(--admin-sidebar-deep));
  box-shadow: 8px 0 28px rgba(23,59,112,.10); z-index: 30;
  opacity: 1; filter: none; -webkit-backdrop-filter: none; backdrop-filter: none; isolation: isolate;
}
.admin-sidebar .sidebar-brand { display:flex; align-items:center; gap:11px; padding:0 8px 26px; color:#fff; text-decoration:none; font-size:17px; font-weight:850; letter-spacing:-.3px; opacity:1; }
.admin-sidebar .sidebar-brand-mark { display:grid; place-items:center; width:42px; height:42px; flex:0 0 42px; border:0; border-radius:13px; color:#173b70; background-color:var(--admin-brand-yellow); background-image:none; font-size:21px; font-weight:950; box-shadow:0 5px 14px rgba(0,0,0,.14); opacity:1; }
.admin-sidebar .sidebar-brand small { display:block; margin-top:3px; color:#c4d5ed; font-size:9px; font-weight:650; letter-spacing:1.4px; }
.admin-sidebar .sidebar-section-label { padding:9px 12px 10px; color:#9fb6d3; font-size:9px; font-weight:850; letter-spacing:1.5px; }
.sidebar-nav { display:grid; gap:6px; }
.admin-sidebar .sidebar-link { display:flex; align-items:center; gap:12px; width:100%; min-height:46px; padding:10px 12px; border:1px solid transparent; border-radius:10px; color:#dbe7f7; background:transparent; text-align:left; font:inherit; font-size:12px; font-weight:650; opacity:1; text-shadow:none; cursor:pointer; transition:background .18s ease,color .18s ease,border-color .18s ease,transform .18s ease; }
.admin-sidebar .sidebar-link:hover { color:#fff; background:rgba(255,255,255,.09); transform:translateX(2px); }
.admin-sidebar .sidebar-link.is-active { color:#fff; border-color:rgba(255,255,255,.13); background:rgba(255,255,255,.14); box-shadow:inset 3px 0 0 var(--admin-brand-yellow); }
.sidebar-icon { display:grid; place-items:center; width:22px; flex:0 0 22px; color:#f7cf55; font-size:20px; line-height:1; }
.sidebar-nav-count { display:grid; place-items:center; min-width:23px; height:22px; margin-left:auto; padding:0 6px; border-radius:99px; color:#183b70; background:#f7cf55; font-size:10px; font-weight:850; }
.sidebar-spacer { flex:1; }
.sidebar-website-link { display:block; margin:14px 3px 12px; padding:11px 12px; border:1px solid rgba(255,255,255,.18); border-radius:9px; color:#fff; text-align:center; text-decoration:none; font-size:11px; font-weight:750; }
.sidebar-website-link:hover { background:rgba(255,255,255,.1); }
.sidebar-footer { display:flex; align-items:center; gap:8px; padding:14px 7px 0; border-top:1px solid rgba(255,255,255,.13); color:#a9bfd9; font-size:9px; }
.sidebar-status-dot { width:7px; height:7px; border-radius:50%; background:#55d69a; box-shadow:0 0 0 4px rgba(85,214,154,.12); }
.admin-workspace { min-width:0; min-height:0; height:100%; overflow-y:auto; overscroll-behavior-y:contain; scrollbar-gutter:stable; }
.admin-topbar { position:sticky; top:0; z-index:20; display:flex; align-items:center; justify-content:space-between; min-height:76px; padding:13px clamp(20px,3vw,42px); border-bottom:1px solid var(--admin-border-clean); background:rgba(255,255,255,.94); backdrop-filter:blur(12px); }
.admin-topbar > div { display:grid; gap:3px; }
.topbar-kicker { color:#8492a8; font-size:9px; font-weight:850; letter-spacing:1.35px; }
.admin-topbar strong { color:#1c3150; font-size:14px; font-weight:850; }
.admin-topbar #logout-button { min-height:36px; padding:8px 15px; border:1px solid #e0e6ef; border-radius:9px; color:#344966; background:#fff; font-size:11px; }
.admin-view-content { width:100%; max-width:1540px; margin:0 auto; padding:30px clamp(18px,3vw,42px) 56px; }
.admin-view { display:none; min-width:0; }
.admin-view.is-active { display:block; }
.dashboard-heading { align-items:center; margin:0 0 22px; padding:0 0 18px; border-bottom:1px solid #e3e9f1; }
.admin-body:has(#dashboard:not(.hidden)) .dashboard-heading .eyebrow { color:#b28a10; font-size:9px; font-weight:850; letter-spacing:1.3px; }
.admin-body:has(#dashboard:not(.hidden)) .dashboard-heading h1 { margin:5px 0 4px; color:#1c3150; font-size:clamp(22px,2vw,28px); line-height:1.5; text-shadow:none; }
.admin-body:has(#dashboard:not(.hidden)) .dashboard-heading p { color:#718096; font-size:12px; text-shadow:none; }
.overview-cards { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin-bottom:18px; }
.overview-card { display:grid; grid-template-columns:1fr auto; gap:5px 12px; align-items:center; min-width:0; padding:19px; border:1px solid transparent; border-radius:14px; color:#fff; background:linear-gradient(135deg,#1b477f 0%,#2868a8 100%); text-align:left; cursor:pointer; box-shadow:0 8px 20px rgba(23,59,112,.16); transition:transform .18s ease,box-shadow .18s ease,filter .18s ease; }
.overview-card:hover { transform:translateY(-3px); filter:saturate(1.08) brightness(1.04); box-shadow:0 13px 26px rgba(24,41,67,.2); }
.overview-card-icon { grid-column:2; grid-row:1 / span 2; display:grid; place-items:center; width:42px; height:42px; border:1px solid rgba(255,255,255,.22); border-radius:12px; color:#fff; background:rgba(255,255,255,.16); font-size:22px; }
.overview-card-label { color:rgba(255,255,255,.82); font-size:11px; font-weight:700; }
.overview-card strong { color:#fff; font-size:27px; line-height:1.3; }
.overview-card small { grid-column:1 / -1; margin-top:8px; color:rgba(255,255,255,.88); font-size:10px; font-weight:700; }
.overview-welcome-panel { display:flex; align-items:center; justify-content:space-between; gap:20px; min-height:170px; padding:26px 30px; overflow:hidden; border:1px solid #e1e9f3; border-radius:16px; background:linear-gradient(115deg,#fff 0%,#f7faff 68%,#fff8dc 100%); }
.overview-welcome-panel .eyebrow { color:#b28a10; font-size:9px; font-weight:850; letter-spacing:1.4px; }
.overview-welcome-panel h2 { margin:7px 0; color:#1b3150; font-size:20px; }
.overview-welcome-panel p { margin:0; color:#718096; font-size:12px; }
.overview-welcome-mark { display:grid; place-items:center; width:100px; height:100px; flex:0 0 100px; border-radius:28px; color:#173b70; background:var(--admin-brand-yellow); font-size:48px; font-weight:950; box-shadow:0 14px 30px rgba(196,153,26,.18); transform:rotate(7deg); }
.admin-panel { padding:22px; border:1px solid var(--admin-border-clean); border-radius:14px; background:#fff; box-shadow:0 5px 18px rgba(24,41,67,.035); backdrop-filter:none; }
.panel-title { border-bottom-color:#edf1f6; }
.panel-title-actions { display:flex; align-items:center; gap:10px; }
.panel-title h2 { color:#1c3150; }
.admin-main label { color:#40536d; }
.admin-main input,.admin-main select,.admin-main textarea { border-color:#dce4ee; border-radius:9px; color:#263a55; background:#fff; }
.admin-main input:focus,.admin-main select:focus,.admin-main textarea:focus { border-color:#5d8fc8; box-shadow:0 0 0 3px rgba(58,119,184,.12); }
.admin-main .button-primary,
.admin-topbar #logout-button,
.create-job-panel #reset-form,
.admin-job-actions .edit-button,
.admin-job-actions .preview-job-button,
.admin-job-actions .close-poster-button,
.admin-job-actions .delete-button,
.application-approved-controls #application-export-report {
  border:1px solid #173b70;
  color:#fff;
  background:#1b477f;
  box-shadow:0 5px 12px rgba(23,59,112,.13);
}
.admin-main .button-primary:hover,
.admin-topbar #logout-button:hover,
.create-job-panel #reset-form:hover,
.admin-job-actions .edit-button:hover,
.admin-job-actions .preview-job-button:hover,
.admin-job-actions .close-poster-button:hover,
.admin-job-actions .delete-button:hover,
.application-approved-controls #application-export-report:hover {
  border-color:#24588f;
  color:#fff;
  background:#24588f;
  box-shadow:0 8px 18px rgba(23,59,112,.18);
}
.admin-main .button-primary:active,
.admin-topbar #logout-button:active,
.create-job-panel #reset-form:active,
.admin-job-actions button:active {
  transform:translateY(0);
}
.admin-main .button-secondary,
.small-button:not(#reset-form) {
  border-color:#dce4ee;
  color:#36516f;
  background:#fff;
}
.admin-main .button-secondary:hover,
.small-button:not(#reset-form):hover {
  border-color:#b8c9dc;
  background:#f5f8fc;
}
.listings-panel { margin:0; }
.admin-jobs[aria-busy="true"] { opacity:.72; }
.create-job-panel { max-width:980px; }
.activity-panel { margin:0; }
.activity-subtitle { color:#78879a; }
.activity-stats > div { border:1px solid transparent; color:#fff; background:linear-gradient(135deg,#1b477f 0%,#2868a8 100%); box-shadow:0 6px 16px rgba(23,59,112,.12); }
.activity-stats strong { color:#fff; }
.activity-stats span { color:rgba(255,255,255,.84); }
.activity-integrity.is-valid { color:#176b48; background:#eaf8f0; border:1px solid #c7ead6; }
.activity-integrity.is-invalid { color:#a52f3d; background:#fff0f1; border:1px solid #f4cbd0; }
.activity-filters input,.activity-filters select { border-color:#dce4ee; color:#263a55; background:#fff; }
.activity-filters select option { color:#263a55; background:#fff; }
.activity-table-wrap { border-color:#e5ebf3; }
.activity-table th,.activity-table td { border-bottom-color:#edf1f6; }
.activity-table th { color:#52657d; background:#f5f8fc; }
.activity-table td { color:#344860; }
.activity-status.status-success { color:#16804e; }
.activity-status.status-failed { color:#c0394b; }
.activity-status.status-warning { color:#a56a08; }
.activity-pagination { color:#63758b; }
.activity-failure-counters h3 { color:#53657b; }
#activity-failure-counters span { color:#93600b; background:#fff8e6; border-color:#f1dfb5; }
#sidebar-job-count { display:none; }
@media(max-width:1050px) {
  #dashboard.dashboard { grid-template-columns:220px minmax(0,1fr); }
  .admin-sidebar { width:220px; }
  .overview-cards { gap:10px; }
  .overview-card { padding:15px; }
}
@media(max-width:760px) {
  .admin-body:has(#dashboard:not(.hidden)) { height:auto; min-height:100vh; overflow-x:hidden; overflow-y:auto; }
  #dashboard.dashboard { display:block; height:auto; min-height:100vh; overflow:visible; }
  .admin-workspace { height:auto; min-height:0; overflow:visible; }
  .admin-sidebar { position:sticky; top:0; width:100%; height:auto; min-height:0; padding:10px 12px 9px; }
  .admin-sidebar .sidebar-brand { padding:0 4px 10px; font-size:14px; }
  .admin-sidebar .sidebar-brand-mark { width:34px; height:34px; flex-basis:34px; border-radius:10px; font-size:17px; }
  .admin-sidebar .sidebar-brand small { font-size:8px; }
  .sidebar-section-label,.sidebar-spacer,.sidebar-website-link,.sidebar-footer { display:none; }
  .sidebar-nav { display:flex; gap:5px; overflow-x:auto; padding:0 0 2px; scrollbar-width:thin; }
  .admin-sidebar .sidebar-link { flex:0 0 auto; width:auto; min-height:38px; gap:7px; padding:8px 10px; border-radius:8px; font-size:10px; white-space:nowrap; }
  .admin-sidebar .sidebar-link.is-active { box-shadow:inset 0 -3px 0 var(--admin-brand-yellow); }
  .sidebar-icon { width:17px; flex-basis:17px; font-size:16px; }
  .admin-topbar { min-height:60px; padding:10px 15px; }
  .admin-view-content { padding:22px 14px 38px; }
  .overview-cards { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .overview-card:last-child { grid-column:1 / -1; }
}
@media(max-width:520px) {
  .overview-cards { grid-template-columns:1fr; }
  .overview-card:last-child { grid-column:auto; }
  .overview-card { grid-template-columns:1fr auto; padding:14px; }
  .overview-welcome-panel { min-height:140px; padding:19px; }
  .overview-welcome-panel h2 { font-size:16px; }
  .overview-welcome-mark { width:68px; height:68px; flex-basis:68px; border-radius:20px; font-size:34px; }
  .dashboard-heading { align-items:flex-start; }
  .dashboard-heading .button { flex:0 0 auto; }
  .admin-panel { padding:15px; }
  .activity-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .activity-filters { grid-template-columns:1fr; }
  .form-row { grid-template-columns:1fr; }
}


/* -------------------- Website Visitor Analytics -------------------- */
.analytics-stats {
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:14px;
  margin:0 0 18px;
}
.analytics-stat {
  min-width:0;
  padding:19px;
  border:1px solid var(--admin-line);
  border-radius:16px;
  background:var(--admin-surface);
  box-shadow:0 8px 24px rgba(26,35,86,.06);
}
.application-admin-stats .analytics-stat,
.analytics-primary-stats .analytics-stat {
  border-color:rgba(255,255,255,.2);
  color:#fff;
  box-shadow:0 8px 20px rgba(23,59,112,.16);
}
.application-admin-stats .analytics-stat { background:linear-gradient(135deg,#1b477f 0%,#2868a8 100%); }
.analytics-primary-stats .analytics-stat { background:#1b477f; }
.application-admin-stats .analytics-stat span,
.application-admin-stats .analytics-stat small,
.analytics-primary-stats .analytics-stat span,
.analytics-primary-stats .analytics-stat small { color:rgba(255,255,255,.84); }
.application-admin-stats .analytics-stat strong,
.analytics-primary-stats .analytics-stat strong { color:#fff; }
.analytics-stat span,.analytics-stat small { display:block; color:var(--admin-muted); }
.analytics-stat span { font-size:12px; font-weight:700; }
.analytics-stat strong { display:block; margin:7px 0 3px; color:var(--admin-ink); font-size:clamp(24px,3vw,34px); line-height:1.2; font-variant-numeric:tabular-nums; }
.analytics-stat small { font-size:10px; }
.analytics-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-bottom:16px; }
.analytics-panel { min-width:0; margin-bottom:16px; }
.analytics-panel .panel-title p { margin:4px 0 0; color:var(--admin-muted); font-size:11px; }
.analytics-simple-list { display:grid; gap:9px; }
.analytics-list-row { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:9px 11px; border:1px solid var(--admin-line); border-radius:10px; font-size:12px; }
.analytics-list-row span { min-width:0; overflow-wrap:anywhere; }
.analytics-list-row strong { flex:0 0 auto; color:var(--admin-blue); font-variant-numeric:tabular-nums; }
.analytics-table { min-width:850px; }
.analytics-note { color:var(--admin-muted); font-size:11px; line-height:1.7; }
@media(max-width:1100px) {
  .analytics-stats { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media(max-width:760px) {
  .analytics-grid { grid-template-columns:1fr; }
  .analytics-stats { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .analytics-stat { padding:14px; }
}
@media(max-width:420px) {
  .analytics-stats { grid-template-columns:1fr 1fr; }
  .analytics-stat strong { font-size:25px; }
}


/* Job application admin review workspace */
.application-admin-stats{margin:20px 0 26px}.application-admin-panel{margin:18px 0}.application-admin-detail{margin:22px 0;padding:24px;border:1px solid var(--admin-line);border-radius:18px;background:#fff;box-shadow:var(--admin-shadow)}.application-detail-head{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;padding-bottom:16px;border-bottom:1px solid var(--admin-line)}.application-detail-head h2{margin:5px 0;color:var(--admin-ink)}.application-detail-head p{margin:0;color:var(--admin-muted);font-size:12px}.application-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px;margin:20px 0}.application-detail-grid>div{padding:12px;border-radius:11px;background:#f7f9fd;overflow-wrap:anywhere}.application-detail-grid small{color:var(--admin-muted)}.application-detail-grid p{margin:5px 0 0;color:var(--admin-ink);white-space:pre-wrap}.application-detail-files{display:grid;gap:9px;margin:12px 0}.application-detail-file{display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding:12px;border:1px solid var(--admin-line);border-radius:10px}.application-detail-file strong{flex:1;min-width:180px;overflow-wrap:anywhere}.application-detail-file small{color:var(--admin-muted)}.application-detail-file a{color:var(--admin-blue);font-weight:700;font-size:12px}.application-detail-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px;padding-top:18px;border-top:1px solid var(--admin-line)}
@media(max-width:650px){.application-detail-grid{grid-template-columns:1fr}.application-detail-actions{flex-direction:column}.application-detail-actions button{width:100%}.application-detail-file{align-items:flex-start}}


/* Revision 2 application search, reporting, and in-page file preview */
.application-approved-toolbar{align-items:flex-end;gap:16px}
.application-approved-controls{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.application-name-search{display:flex;align-items:center;gap:8px;min-width:220px;padding:7px 11px;border:1px solid var(--admin-line);border-radius:10px;background:#fff;color:var(--admin-muted)}
.application-name-search span{font-size:20px;color:var(--admin-blue)}
.application-name-search input{width:100%;min-width:0;border:0;outline:0;background:transparent;color:var(--admin-ink);font:inherit;font-size:12px}
.application-approved-controls .button{white-space:nowrap}
.application-detail-file>div:first-child{display:grid;gap:4px;min-width:0}
.application-detail-file>div:first-child strong{overflow-wrap:anywhere}
.application-detail-file-actions{display:flex;align-items:center;gap:7px;flex:0 0 auto}
.application-detail-file-actions .small-button{text-decoration:none}
.application-admin-preview-modal{position:fixed;z-index:21000;inset:0;display:grid;place-items:center;padding:18px;background:rgba(5,12,28,.78);backdrop-filter:blur(7px)}
.application-admin-preview-modal.hidden{display:none}
.application-admin-preview-card{display:flex;flex-direction:column;width:min(1000px,100%);height:min(90vh,800px);overflow:hidden;border:1px solid rgba(255,255,255,.35);border-radius:16px;background:#fff;box-shadow:0 28px 90px rgba(0,0,0,.35)}
.application-admin-preview-card header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border-bottom:1px solid var(--admin-line);color:var(--admin-ink)}
.application-admin-preview-card header strong{min-width:0;overflow-wrap:anywhere}
.application-admin-preview-card header button{width:34px;height:34px;border:0;border-radius:9px;background:#eef2f8;color:var(--admin-ink);font-size:23px;cursor:pointer}
.application-admin-preview-content{display:grid;place-items:center;flex:1;min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:12px;background:#eef2f7}
.application-admin-preview-content iframe{display:block;width:100%;height:100%;min-height:0;border:0;background:#fff}
.application-admin-preview-content img{display:block;justify-self:center;align-self:start;max-width:100%;max-height:none;width:auto;height:auto;object-fit:contain}
@media(max-width:850px){.application-approved-toolbar{align-items:stretch;flex-direction:column}.application-approved-controls{width:100%}.application-name-search{flex:1}}
@media(max-width:650px){.application-approved-controls{align-items:stretch;flex-direction:column}.application-approved-controls .button{width:100%}.application-detail-file{flex-direction:column;align-items:stretch}.application-detail-file-actions{flex-wrap:wrap}.application-admin-preview-modal{padding:env(safe-area-inset-top, 8px) 8px env(safe-area-inset-bottom, 8px)}.application-admin-preview-card{height:calc(100vh - 16px);height:calc(100dvh - env(safe-area-inset-top, 8px) - env(safe-area-inset-bottom, 8px) - 16px);max-height:100%;border-radius:11px}.application-admin-preview-card header{flex:0 0 auto}.application-admin-preview-card header button{width:44px;height:44px;min-width:44px;touch-action:manipulation}}

/* Application submenu and its two independent content views. */
.sidebar-group{display:grid;gap:5px}.sidebar-submenu{display:grid;gap:4px;margin:0 0 8px 38px;padding-left:10px;border-left:1px solid rgba(255,255,255,.22)}.sidebar-submenu[hidden]{display:none}.sidebar-sublink{width:100%;border:0;background:transparent;color:rgba(255,255,255,.72);text-align:left;padding:9px 10px;border-radius:8px;font:inherit;font-size:12px;cursor:pointer}.sidebar-sublink:hover,.sidebar-sublink.is-active{background:rgba(255,255,255,.12);color:#fff}.application-subview{display:none}.application-subview.is-active{display:block}

/* Keep admin navigation usable without a clipped horizontal tab strip. */
@media (max-width: 760px) {
  .sidebar-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    overflow: visible;
    padding: 0;
  }
  .sidebar-group { min-width: 0; }
  .admin-sidebar .sidebar-link {
    width: 100%;
    min-height: 44px;
    align-items: center;
    white-space: normal;
    line-height: 1.45;
  }
  .sidebar-icon { flex: 0 0 17px; }
  .sidebar-group .sidebar-submenu { margin-left: 0; }
}
@media (max-width: 520px) {
  .sidebar-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Match admin dialogs to the shared white modal and soft close-button palette. */
.admin-modal-backdrop {
  background: rgba(13, 30, 52, .48);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
}
.admin-modal {
  color: #344b60;
  border: 1px solid #dce4ec;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(14, 39, 64, .24);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.admin-modal-icon {
  border-color: #dce4ec;
  background: #f0f4f8;
  box-shadow: 0 8px 20px rgba(14, 39, 64, .1);
}
.admin-modal::before,
.admin-modal::after { display: none; }
.admin-modal-topline {
  height: 3px;
  background: linear-gradient(90deg, transparent, #1b477f, #6c93bf, transparent);
  box-shadow: none;
}
.admin-modal.is-info .admin-modal-topline,
.admin-modal.is-success .admin-modal-topline,
.admin-modal.is-warning .admin-modal-topline,
.admin-modal.is-error .admin-modal-topline {
  background: linear-gradient(90deg, transparent, #1b477f, #6c93bf, transparent);
}
.admin-modal-eyebrow,
.admin-modal h2,
.admin-modal-message {
  color: #344b60;
  text-shadow: none;
}
.admin-modal h2 { color: #173653; }
.admin-modal-message { color: #526c82; }
.admin-modal.is-job-preview .admin-modal-message { color: #526c82; }
.admin-job-preview-poster-wrap,
.admin-job-preview-field {
  border-color: #dce4ec;
  background: #f8fafc;
}
.admin-job-preview-field strong { color: #718096; }
.admin-job-preview-field span { color: #344b60; }
.admin-job-preview-no-poster { border-color: #b8c6d4; color: #526c82; }
.admin-job-preview-field input:not([type="file"]),
.admin-job-preview-field select,
.admin-job-preview-field textarea {
  border-color: #d5dfe8;
  color: #263a55;
  background: #fff;
}
.admin-job-preview-field input:focus,
.admin-job-preview-field select:focus,
.admin-job-preview-field textarea:focus {
  border-color: #5d8fc8;
  box-shadow: 0 0 0 3px rgba(58, 119, 184, .12);
}
.admin-job-preview-upload-label { color: #526c82; }
.admin-job-preview-upload-label input { border-color: #d5dfe8; color: #344b60; background: #fff; }
.admin-job-preview-notice { border-color: #efc6cb; color: #8f2636; background: #fff4f5; }
.admin-modal-actions .button-primary {
  border-color: #173b70;
  color: #fff;
  background: #1b477f;
  box-shadow: 0 5px 12px rgba(23, 59, 112, .13);
}
.admin-modal-actions .button-secondary {
  border-color: #dce4ec;
  color: #344b60;
  background: #f0f4f8;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.admin-modal-actions .button-primary:hover { background: #24588f; }
.admin-modal-actions .button-secondary:hover { background: #e4ebf2; }

/* Keep Khmer syllable marks together in alert titles and messages. */
.admin-modal h2,
.admin-modal-message {
  font-family: "Noto Sans Khmer", "Kantumruy Pro", "Khmer OS Battambang", sans-serif !important;
  font-synthesis: none;
  font-kerning: normal;
  text-rendering: auto;
  letter-spacing: 0 !important;
  word-spacing: 0 !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  white-space: normal;
  line-height: 1.85 !important;
}
.admin-modal h2 {
  font-size: 20px !important;
  font-weight: 700 !important;
  text-indent: 0 !important;
}
.admin-modal:not(.is-job-preview) h2,
.admin-modal:not(.is-job-preview) .admin-modal-message {
  text-align: center !important;
}
.admin-modal:not(.is-job-preview) h2 {
  padding-right: 30px !important;
  padding-left: 30px !important;
}
