:root{
  --p:#8B5CF6;
  --p-strong:#7C3AED;
  --p-deep:#5B21B6;
  --pink:#F5D0FE;
  --cream:#FFF7FB;
  --muted:#6B7280;
  --text:#201335;
  --card:#ffffffcc;
  --card-solid:#ffffff;
  --border:#E9D5FF;
  --border-strong:#D8B4FE;
  --success:#16A34A;
  --warning:#D97706;
  --danger:#DC2626;
  --shadow:0 18px 48px rgba(76,29,149,.10);
  --shadow-soft:0 10px 26px rgba(139,92,246,.10);
  --radius-xl:30px;
  --radius-lg:22px;
  --radius-md:16px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:"Mitr", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color:var(--text);
  min-height:100vh;
  background:
    radial-gradient(1100px 520px at 0% 0%, rgba(139,92,246,.15), transparent 58%),
    radial-gradient(900px 500px at 100% 10%, rgba(245,208,254,.75), transparent 45%),
    linear-gradient(180deg, #fffafd 0%, var(--cream) 58%, #fff 100%);
}

a{color:var(--p-strong); text-decoration:none}
a:hover{color:var(--p-deep)}
img{max-width:100%; display:block}

.site-shell{min-height:100vh; display:flex; flex-direction:column}
.site-content{flex:1}
.container{
  width:min(1180px, calc(100% - 32px));
  margin:0 auto;
}

.topbar{
  position:sticky;
  top:0;
  z-index:50;
  padding:18px 0 14px;
  backdrop-filter: blur(16px);
  background:linear-gradient(180deg, rgba(255,247,251,.96), rgba(255,247,251,.80));
  border-bottom:1px solid rgba(216,180,254,.45);
  box-shadow:0 8px 30px rgba(91,33,182,.06);
}
.topbar-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:0 0 14px;
}
.brand{
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0;
}
.brand-mark{
  width:62px;
  height:62px;
  border-radius:20px;
  display:grid;
  place-items:center;
  flex:0 0 62px;
  background:linear-gradient(135deg, rgba(139,92,246,.20), rgba(245,208,254,.92));
  border:1px solid rgba(139,92,246,.18);
  box-shadow:0 12px 30px rgba(139,92,246,.14);
  overflow:hidden;
}
.brand-mark img{width:100%; height:100%; object-fit:contain; background:#fff8ff; padding:8px}
.brand-copy{min-width:0}
.brand-title{
  margin:0;
  font-size:clamp(22px, 2.5vw, 32px);
  line-height:1.1;
  font-weight:600;
  letter-spacing:.01em;
  color:#40215f;
}
.brand-sub{
  margin-top:6px;
  color:var(--muted);
  font-family:"Sarabun",sans-serif;
  font-size:14px;
}
.topbar-meta{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}
.topbar-badge,
.pill,
.status-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:38px;
  padding:8px 14px;
  border-radius:999px;
  border:1px solid rgba(139,92,246,.16);
  background:rgba(255,255,255,.85);
  color:#5a3ea3;
  font-size:13px;
  font-family:"Sarabun",sans-serif;
  white-space:nowrap;
}
.topbar-badge strong{font-weight:700}

.main-nav{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:nowrap;
  overflow-x:auto;
  overflow-y:hidden;
  padding-bottom:4px;
  -webkit-overflow-scrolling:touch;
}
.main-nav::-webkit-scrollbar{height:8px}
.main-nav::-webkit-scrollbar-thumb{background:rgba(139,92,246,.22); border-radius:999px}
.main-nav::-webkit-scrollbar-track{background:transparent}
.nav-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:46px;
  padding:10px 16px;
  border-radius:16px;
  color:#5f4f83;
  background:rgba(255,255,255,.72);
  border:1px solid transparent;
  font-family:"Sarabun",sans-serif;
  font-weight:700;
  transition:all .18s ease;
}
.nav-link:hover{
  color:#49248a;
  border-color:rgba(139,92,246,.16);
  transform:translateY(-1px);
  box-shadow:var(--shadow-soft);
}
.nav-link.active{
  color:#fff;
  border-color:transparent;
  background:linear-gradient(135deg, var(--p), #EC4899);
  box-shadow:0 14px 30px rgba(139,92,246,.24);
}
.nav-link.muted-link{background:rgba(255,255,255,.55)}

.card{
  position:relative;
  overflow:hidden;
  margin:22px 0;
  padding:24px;
  border-radius:var(--radius-xl);
  background:linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.88));
  border:1px solid rgba(216,180,254,.42);
  box-shadow:var(--shadow);
}
.card::before{
  content:"";
  position:absolute;
  inset:0 auto auto 0;
  width:180px;
  height:180px;
  background:radial-gradient(circle, rgba(245,208,254,.55), rgba(245,208,254,0));
  pointer-events:none;
}
.card > *{position:relative; z-index:1}

.page-hero{
  padding:28px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(255,248,252,.98)),
    linear-gradient(135deg, rgba(139,92,246,.12), rgba(245,208,254,.16));
}
.dashboard-hero,
.page-hero{
  border:1px solid rgba(216,180,254,.46);
}
.dashboard-hero::after,
.page-hero::after{
  content:"";
  position:absolute;
  right:-55px;
  bottom:-80px;
  width:240px;
  height:240px;
  border-radius:50%;
  background:radial-gradient(circle, rgba(139,92,246,.20), rgba(139,92,246,0));
  pointer-events:none;
}
.eyebrow{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:34px;
  padding:7px 12px;
  border-radius:999px;
  background:rgba(139,92,246,.10);
  color:#6D28D9;
  font-size:12px;
  font-family:"Sarabun",sans-serif;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.page-title,
h2{
  margin:0;
  font-size:clamp(28px, 3.1vw, 40px);
  line-height:1.1;
  color:#31194f;
}
.page-subtitle,
.muted,
p,li,label,.small{
  font-family:"Sarabun",sans-serif;
}
.page-subtitle,
.muted{
  color:var(--muted);
}
.page-subtitle{margin:10px 0 0; max-width:780px; font-size:15px}

h3{
  margin:0 0 12px;
  font-size:20px;
  color:#3f246b;
}
form h3,
.section-head h3{
  display:flex;
  align-items:center;
  gap:12px;
  margin:28px 0 14px;
  padding-bottom:10px;
  border-bottom:1px solid rgba(216,180,254,.40);
}
form h3:first-of-type{margin-top:10px}
form h3::before,
.section-head h3::before{
  content:"";
  width:10px;
  height:10px;
  border-radius:999px;
  background:linear-gradient(135deg, var(--p), #EC4899);
  box-shadow:0 0 0 6px rgba(139,92,246,.10);
}

.row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
}
.grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
}
.col2{grid-column:span 2}
@media (max-width:900px){
  .grid,
  .info-grid,
  .admin-grid-2,
  .stats-grid{grid-template-columns:1fr !important}
  .col2,
  .info-item.wide{grid-column:span 1}
}

.parent-block{
  padding:18px 20px;
  border:1px solid rgba(216,180,254,.52);
  border-radius:24px;
  background:linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,247,251,.84));
  box-shadow:0 10px 28px rgba(139,92,246,.06);
}
.parent-grid{
  display:grid;
  grid-template-columns:minmax(0,1.45fr) minmax(220px, .9fr);
  gap:16px 18px;
  align-items:start;
}
.parent-main-field,
.parent-side-field{
  min-width:0;
}
.parent-status-row{
  grid-column:1 / -1;
  max-width:260px;
  width:100%;
}
.parent-name-row{
  grid-column:1 / -1;
}
.field-compact-end{
  max-width:260px;
  width:100%;
  justify-self:end;
}
.parent-phone-side input[type="text"],
.parent-phone-side input[type="tel"],
.parent-phone-side input[type="number"],
.parent-phone-side input:not([type]){
  width:100%;
}
.check-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  margin-top:8px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(216,180,254,.62);
  background:rgba(255,255,255,.92);
  font-size:13px;
  line-height:1.1;
  white-space:nowrap;
}
.check-chip-mini{
  padding:4px 8px;
  font-size:12px;
  border-radius:12px;
}
.check-chip input[type="checkbox"]{
  width:16px;
  height:16px;
  min-height:16px;
  margin:0;
  accent-color:var(--p);
}
.check-chip-mini input[type="checkbox"]{
  width:14px;
  height:14px;
  min-height:14px;
}
.talent-card{
  overflow:hidden;
}
.talent-top-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px 18px;
  flex-wrap:wrap;
}
.talent-copy{
  min-width:0;
  flex:1 1 320px;
}
.talent-title{
  font-weight:700;
  color:#312e81;
}
.talent-desc{
  margin-top:4px;
}
.talent-chip{
  align-self:flex-start;
  margin-top:0;
  flex:0 0 auto;
}
.talent-options-box{
  padding-top:4px;
}
.talent-grid{
  grid-template-columns:minmax(0,1fr);
}
.talent-select-wrap{
  grid-column:auto;
  max-width:420px;
}
@media (max-width:900px){
  .talent-top-row{
    flex-direction:column;
    align-items:stretch;
  }
  .talent-chip{
    width:max-content;
    max-width:100%;
  }
  .talent-select-wrap{
    max-width:none;
  }
}
@media (max-width:900px){
  .parent-block{
    padding:16px;
    border-radius:20px;
  }
  .parent-grid{
    grid-template-columns:1fr;
    gap:14px;
  }
  .parent-status-row,
  .parent-name-row,
  .field-compact-end{
    grid-column:auto;
    max-width:none;
    justify-self:stretch;
  }
}

label{
  display:block;
  margin:0 0 8px;
  font-size:14px;
  font-weight:600;
  color:#4b5563;
}
input,select,textarea{
  width:100%;
  min-height:52px;
  padding:13px 16px;
  border-radius:16px;
  border:1px solid rgba(216,180,254,.72);
  background:rgba(255,255,255,.95);
  color:var(--text);
  font-family:"Sarabun",sans-serif;
  font-size:15px;
  outline:none;
  transition:border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
textarea{min-height:130px; resize:vertical}
input:hover,select:hover,textarea:hover{border-color:rgba(139,92,246,.42)}
input:focus,select:focus,textarea:focus{
  border-color:rgba(139,92,246,.82);
  box-shadow:0 0 0 4px rgba(139,92,246,.12);
}
input[readonly], select[disabled], input[disabled]{
  background:#faf5ff;
  color:#6b5b85;
}
input[type="file"]{padding:11px 14px}

.actions{
  display:flex;
  gap:12px;
  align-items:center;
  flex-wrap:wrap;
  margin-top:18px;
}
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  min-height:50px;
  padding:12px 18px;
  border-radius:16px;
  border:1px solid transparent;
  background:linear-gradient(135deg, var(--p), #EC4899);
  color:#fff;
  text-decoration:none;
  cursor:pointer;
  font-family:"Mitr",sans-serif;
  font-size:15px;
  font-weight:500;
  transition:transform .14s ease, box-shadow .14s ease, filter .14s ease;
  box-shadow:0 14px 32px rgba(139,92,246,.22);
}
.btn:hover{transform:translateY(-1px); filter:saturate(1.02); color:#fff}
.btn:disabled{
  opacity:.55;
  cursor:not-allowed;
  transform:none;
  box-shadow:none;
}
.btn.outline,
.btn-outline,
.logout{
  color:#6D28D9;
  background:rgba(255,255,255,.92);
  border-color:rgba(139,92,246,.24);
  box-shadow:none;
}
.btn.outline:hover,
.btn-outline:hover,
.logout:hover{background:#fff; color:#4c1d95}
.btn-success-soft{
  background:linear-gradient(180deg,#effcf3,#e4faec);
  color:#0f7a44;
  border:1px solid rgba(22,163,74,.22);
  box-shadow:none;
}
.btn-warning-soft{
  background:linear-gradient(180deg,#fff9ec,#fff1d1);
  color:#a16207;
  border:1px solid rgba(217,119,6,.24);
  box-shadow:none;
}
.danger-solid{background:linear-gradient(135deg,#ef4444,#dc2626); color:#fff}
.danger-outline{border-color:rgba(220,38,38,.40)!important; color:#dc2626!important}
.danger-soft{background:rgba(254,242,242,.96); color:#b91c1c; border-color:rgba(220,38,38,.16)}

.link{font-weight:700}
.msg{
  display:none;
  margin-top:14px;
  padding:14px 16px;
  border-radius:18px;
  border:1px solid rgba(216,180,254,.35);
  background:#faf5ff;
  font-size:15px;
}
.msg.ok{display:block; border-color:rgba(34,197,94,.24); background:#f0fdf4; color:#166534}
.msg.error{display:block; border-color:rgba(244,114,182,.24); background:#fff1f7; color:#9d174d}

.pill.ok,
.status-badge.success{background:#eefbf3; border-color:#bbf7d0; color:#166534}
.pill.warn{background:#fff7ed; border-color:#fed7aa; color:#9a3412}
.pill.danger,
.status-badge.danger{background:#fff1f2; border-color:#fecdd3; color:#be123c}
.status-badge.pending{background:#faf5ff; border-color:#e9d5ff; color:#6d28d9}

.box,
.modern-box,
.info-item,
.stat-card{
  border-radius:20px;
  border:1px solid rgba(216,180,254,.40);
  background:linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,247,251,.92));
  box-shadow:var(--shadow-soft);
}
.box{padding:16px}
.stat-card{padding:18px}
.stat-label{font-size:13px; color:var(--muted)}
.stat-value{margin-top:8px; font-size:30px; font-weight:600; color:#3b1d63}
.stats-grid,
.quick-actions-grid,
.external-actions-grid,
.detail-actions-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:14px;
}
.section-card{padding:24px}
.section-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  flex-wrap:wrap;
  margin-bottom:16px;
}
.selection-toolbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
  padding:16px 18px;
  margin:8px 0 16px;
  border-radius:22px;
  border:1px solid rgba(216,180,254,.42);
  background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(250,245,255,.92));
}
.selection-label{font-size:12px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:#8b7cae}
.selection-value{margin-top:4px; font-size:18px; color:#382157; font-weight:600}

.tablewrap{
  overflow:auto;
  border-radius:22px;
  border:1px solid rgba(216,180,254,.32);
  background:rgba(255,255,255,.82);
}
.table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  font-family:"Sarabun",sans-serif;
  font-size:14px;
}
.table th,.table td{
  padding:14px 12px;
  border-bottom:1px solid rgba(216,180,254,.26);
  text-align:left;
  vertical-align:middle;
  white-space:nowrap;
}
.table thead th{
  position:sticky;
  top:0;
  z-index:1;
  background:#fcf7ff;
  color:#5b3aa6;
  font-weight:700;
}
.table tbody tr:hover{background:rgba(139,92,246,.035)}
.table tbody tr:last-child td{border-bottom:none}

.info-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
.info-item{padding:16px 18px}
.info-item.wide{grid-column:span 2}
.info-label{display:block; margin-bottom:8px; color:var(--muted); font-size:13px}

.dashboard-hero__content{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  flex-wrap:wrap;
  margin-bottom:18px;
}
.hero-pills{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}
.quick-action-btn,
.action-inline-btn,
.quick-back-btn{width:100%; min-height:52px}
.quick-back-btn{width:auto}

.auth-layout{
  display:grid;
  grid-template-columns:minmax(280px,.92fr) minmax(360px,1.08fr);
  gap:22px;
  align-items:start;
}
.auth-info{
  display:flex;
  flex-direction:column;
  gap:16px;
}
.info-list{margin:0; padding-left:18px}
.info-list li{margin:7px 0; color:#574f6b}
.summary-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px 18px;
}
.summary-item{
  padding:16px 18px;
  border-radius:20px;
  border:1px solid rgba(216,180,254,.34);
  background:rgba(255,255,255,.76);
}
.summary-item .k{display:block; margin-bottom:8px; color:var(--muted); font-family:"Sarabun",sans-serif; font-size:13px}
.summary-item .v{font-size:26px; font-weight:600; color:#31194f}
.summary-item .v.small{font-size:18px}

.footer{
  margin-top:28px;
  padding:0 0 26px;
}
.footer-inner{
  width:min(1180px, calc(100% - 32px));
  margin:0 auto;
  padding:18px 22px;
  border-radius:24px;
  border:1px solid rgba(216,180,254,.34);
  background:linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,247,251,.80));
  box-shadow:var(--shadow-soft);
  text-align:center;
}
.footer-title{
  font-family:"Mitr",sans-serif;
  font-size:16px;
  color:#4c1d95;
}
.footer-note{
  margin-top:4px;
  font-family:"Sarabun",sans-serif;
  color:var(--muted);
  font-size:13px;
}

.toast{
  position:fixed;
  top:20px;
  right:20px;
  z-index:9999;
  min-width:260px;
  max-width:360px;
  padding:14px 16px;
  border-radius:18px;
  background:rgba(255,255,255,.95);
  border:1px solid rgba(216,180,254,.50);
  box-shadow:0 22px 50px rgba(76,29,149,.16);
  backdrop-filter:blur(12px);
  transform:translateY(-10px);
  opacity:0;
  pointer-events:none;
  transition:all .18s ease;
}
.toast.show{transform:translateY(0); opacity:1}
.toast.ok{border-color:rgba(22,163,74,.22)}
.toast.err{border-color:rgba(244,114,182,.28)}
.toast .t-title{font-weight:700; margin-bottom:2px}
.toast .t-msg{opacity:.88}

.modalBg{display:none; position:fixed; inset:0; background:rgba(33,12,59,.26); z-index:9999}
.modalBg.show{display:flex; align-items:center; justify-content:center}
.modal{
  background:#fff;
  border-radius:24px;
  padding:20px;
  max-width:440px;
  width:92%;
  box-shadow:0 22px 50px rgba(76,29,149,.18);
  border:1px solid rgba(216,180,254,.40);
}
#saveOkBg{display:none; position:fixed; inset:0; background:rgba(33,12,59,.26); z-index:99999; align-items:center; justify-content:center}
#saveOkBg.show{display:flex !important}
#saveOkBg .modal{width:min(520px,92vw)}

.user{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  font-family:"Sarabun",sans-serif;
}
.logout{padding:11px 15px}

code{
  padding:2px 7px;
  border-radius:10px;
  background:#faf5ff;
  color:#6d28d9;
}

.admission-banner{
  padding:20px 22px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(252,245,255,.95)),
    linear-gradient(135deg, rgba(139,92,246,.08), rgba(245,208,254,.18));
}
.admission-banner.compact{padding:18px 20px}
.admission-banner.ok{border-color:rgba(34,197,94,.22)}
.admission-banner.warn{border-color:rgba(245,158,11,.24)}
.admission-banner.danger{border-color:rgba(236,72,153,.22)}

.status-callout{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  gap:18px;
  align-items:center;
}
.status-callout.compact{grid-template-columns:minmax(0,1fr) auto}
.status-callout.admin{grid-template-columns:auto minmax(0,1fr) auto}
.status-callout__icon{
  width:62px;
  height:62px;
  border-radius:22px;
  display:grid;
  place-items:center;
  font-size:28px;
  color:#7C3AED;
  background:linear-gradient(135deg, rgba(139,92,246,.16), rgba(245,208,254,.65));
  border:1px solid rgba(139,92,246,.16);
  box-shadow:var(--shadow-soft);
}
.status-callout__copy{min-width:0}
.status-callout__eyebrow{
  font:700 12px/1 "Sarabun",sans-serif;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#8b5cf6;
}
.status-callout__title{
  margin:6px 0 4px;
  font-size:clamp(24px, 2.6vw, 32px);
  color:#31194f;
}
.status-callout.compact .status-callout__title,
.status-callout.admin .status-callout__title{font-size:24px}
.status-callout__text{
  margin:0;
  font-size:15px;
  color:#5f6171;
}
.status-callout__meta{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:12px;
}
.status-chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:36px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(139,92,246,.15);
  background:rgba(255,255,255,.76);
  color:#5e4f84;
  font:700 13px/1.2 "Sarabun",sans-serif;
}
.countdown-panel{
  min-width:310px;
  padding:16px;
  border-radius:24px;
  border:1px solid rgba(139,92,246,.16);
  background:linear-gradient(180deg, rgba(255,255,255,.94), rgba(249,244,255,.92));
  box-shadow:var(--shadow-soft);
}
.countdown-panel.compact{min-width:280px}
.countdown-caption{
  margin-bottom:12px;
  color:#6b4bb1;
  font:700 13px/1 "Sarabun",sans-serif;
  text-transform:uppercase;
  letter-spacing:.07em;
}
.countdown-box{
  display:grid;
  grid-template-columns:repeat(4, minmax(52px,1fr));
  gap:10px;
}
.countdown-item{
  padding:12px 8px;
  border-radius:18px;
  text-align:center;
  background:rgba(139,92,246,.08);
  border:1px solid rgba(139,92,246,.10);
}
.countdown-item strong{
  display:block;
  font-size:28px;
  line-height:1;
  color:#3c1e72;
}
.countdown-item span{
  display:block;
  margin-top:6px;
  color:#726987;
  font:700 12px/1 "Sarabun",sans-serif;
}
.countdown-target{
  margin-top:12px;
  color:#7a6f90;
  font:600 13px/1.4 "Sarabun",sans-serif;
}
.countdown-box.compact .countdown-item strong{font-size:22px}

.countdown-panel--hero{
  min-width:min(100%, 400px);
  padding:20px;
  border-radius:30px;
}
.countdown-panel--hero .countdown-caption{font-size:14px}
.countdown-box--hero .countdown-item{
  padding:16px 10px;
  border-radius:22px;
  background:linear-gradient(180deg, rgba(139,92,246,.12), rgba(245,208,254,.22));
}
.countdown-box--hero .countdown-item strong{font-size:34px}
.countdown-panel--stage{
  min-width:min(100%, 340px);
}
.stage-card{
  position:relative;
  overflow:hidden;
}
.stage-card::before{
  content:"";
  position:absolute;
  inset:auto -80px -120px auto;
  width:240px;
  height:240px;
  border-radius:999px;
  background:radial-gradient(circle, rgba(245,208,254,.55), rgba(245,208,254,0));
  pointer-events:none;
}
.stage-card--locked{
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(254,247,251,.96)),
    linear-gradient(135deg, rgba(139,92,246,.10), rgba(245,208,254,.24));
}
.status-callout--stage{
  align-items:stretch;
}
.stage-inline-note{
  margin-top:14px;
  display:inline-flex;
  gap:8px;
  align-items:flex-start;
  padding:12px 14px;
  border-radius:16px;
  background:rgba(255,255,255,.76);
  border:1px solid rgba(139,92,246,.14);
  color:#5e4f84;
  font:600 14px/1.5 "Sarabun",sans-serif;
}
.stage-cta-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:18px;
  padding-top:18px;
  border-top:1px solid rgba(139,92,246,.12);
}
.stage-cta-hint{
  color:#6b7280;
  font:600 14px/1.5 "Sarabun",sans-serif;
}
.auth-card--restricted{
  border-style:dashed;
}
.application-lock-box{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-top:18px;
  padding:18px;
  border-radius:22px;
  background:linear-gradient(180deg, rgba(255,255,255,.96), rgba(252,245,255,.92));
  border:1px dashed rgba(139,92,246,.28);
}
.application-lock-box__title{
  color:#4c1d95;
  font:700 18px/1.3 "Mitr",sans-serif;
}
.application-lock-box__text{
  margin-top:6px;
  color:#6b7280;
  font:400 14px/1.6 "Sarabun",sans-serif;
}
.btn.disabled,
.btn[aria-disabled="true"]{
  opacity:.62;
  cursor:not-allowed;
  pointer-events:none;
  filter:grayscale(.08);
  box-shadow:none;
}
.btn.outline.disabled{
  background:rgba(255,255,255,.84);
}

.admin-status-shell{display:grid; gap:18px}
.control-cards{
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:14px;
}
.control-card{
  padding:18px;
  border-radius:22px;
  border:1px solid rgba(216,180,254,.34);
  background:linear-gradient(180deg, rgba(255,255,255,.96), rgba(250,244,255,.88));
}
.control-card__label{
  color:#7a6f90;
  font:700 13px/1.1 "Sarabun",sans-serif;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.control-card__value{
  margin-top:10px;
  font-size:28px;
  font-weight:600;
  color:#321956;
}
.control-card__meta{
  margin-top:8px;
  color:#6b7280;
  font:400 14px/1.5 "Sarabun",sans-serif;
}
.settings-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:18px;
}
.settings-panel{
  padding:22px;
  border-radius:26px;
  border:1px solid rgba(216,180,254,.35);
  background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(251,245,255,.92));
  box-shadow:var(--shadow-soft);
}
.settings-panel--full{grid-column:1 / -1}
.settings-panel__head{margin-bottom:18px}
.settings-kicker{
  display:inline-block;
  margin-bottom:8px;
  color:#8B5CF6;
  font:700 12px/1 "Sarabun",sans-serif;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.form-stack{display:grid; gap:16px}
.settings-two-col{grid-template-columns:repeat(2, minmax(0,1fr)); gap:14px}
.preset-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.preview-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:14px;
  margin-bottom:18px;
}
.preview-card{
  padding:18px;
  border-radius:22px;
  background:rgba(255,255,255,.86);
  border:1px solid rgba(216,180,254,.32);
}
.preview-card__title{
  color:#5f3ea5;
  font:700 14px/1 "Sarabun",sans-serif;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.preview-card__body{margin-top:12px}
.preview-card__body p{margin:12px 0 0; color:#5f6171}
.preview-note{
  padding:16px;
  border-radius:18px;
  background:rgba(245,208,254,.24);
  border:1px dashed rgba(139,92,246,.28);
}
.preview-note__label{
  margin-bottom:8px;
  color:#7C3AED;
  font:700 13px/1 "Sarabun",sans-serif;
}
.preview-note__box{
  color:#4a4656;
  font:400 14px/1.6 "Sarabun",sans-serif;
}

@media (max-width:860px){
  .topbar{padding:14px 0 12px}
  .status-callout,
  .status-callout.compact,
  .status-callout.admin,
  .settings-grid,
  .control-cards,
  .preview-grid,
  .settings-two-col{grid-template-columns:1fr}
  .countdown-panel,
  .countdown-panel.compact{min-width:0}
  .topbar-inner{flex-direction:column; align-items:flex-start}
  .topbar-meta{justify-content:flex-start}
  .main-nav{overflow:auto; padding-bottom:2px; width:100%; flex-wrap:nowrap}
  .nav-link{white-space:nowrap}
  .card{padding:20px; border-radius:24px}
  .page-title,h2{font-size:26px}
  .auth-layout,
  .summary-grid{grid-template-columns:1fr}
}
@media (max-width:560px){
  .status-callout{gap:14px}
  .status-callout__icon{width:52px; height:52px; border-radius:18px; font-size:24px}
  .status-callout__title{font-size:22px}
  .countdown-box{grid-template-columns:repeat(2, minmax(0,1fr))}
  .container,
  .footer-inner{width:min(100% - 20px, 1180px)}
  .brand-mark{width:54px; height:54px; flex-basis:54px}
  .brand-title{font-size:22px}
  .brand-sub{font-size:13px}
  .card{padding:18px}
  .selection-toolbar,
  .section-head,
  .dashboard-hero__content,
  .row{align-items:flex-start; flex-direction:column}
  .page-title,h2{font-size:24px}
  .summary-item .v{font-size:22px}
}


@media (max-width:860px){
  .stage-cta-row,
  .application-lock-box{flex-direction:column; align-items:flex-start}
  .countdown-panel--hero,
  .countdown-panel--stage{width:100%}
}
@media (max-width:560px){
  .countdown-box--hero .countdown-item strong{font-size:28px}
  .stage-inline-note{font-size:13px}
  .application-lock-box{padding:16px}
}

/* admin users page refresh: visual only, no logic changes */
.admin-users-hero__top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:18px;
  flex-wrap:wrap;
}
.admin-users-meta{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:18px;
}
.admin-section-head{margin-bottom:14px}
.admin-section-head h3{margin:0 0 6px; padding-bottom:0; border-bottom:none}
.admin-create-box{
  padding:20px;
  border-radius:24px;
  background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(250,245,255,.94));
}
.admin-create-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
.admin-create-grid .col2{grid-column:span 2}
.admin-help{margin-top:6px}
.admin-create-actions{margin-top:16px}
.admin-list-card{overflow:visible}
.admin-users-tablewrap{
  overflow-x:auto;
  overflow-y:visible;
}
.admin-users-table{
  min-width:1080px;
}
.admin-users-table td,
.admin-users-table th{
  vertical-align:top;
}
.admin-users-cell-main{
  font-weight:600;
  color:#2f184f;
}
.admin-users-cell-sub{
  margin-top:4px;
  font-size:12px;
  color:#8a7aa8;
  white-space:normal;
}
.admin-role-badge{
  min-height:34px;
  padding:6px 12px;
  background:rgba(139,92,246,.08);
}
.admin-actions-cell{
  min-width:430px;
  white-space:normal !important;
}
.admin-action-stack{
  display:grid;
  gap:12px;
}
.admin-action-row{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}
.admin-inline-form{
  margin:0;
}
.admin-action-btn{
  min-height:42px;
  padding:10px 14px;
  font-size:14px;
  border-radius:14px;
}
.admin-action-note{
  margin-bottom:4px;
  font-size:13px;
  font-weight:600;
  color:#6b5b85;
}
.admin-password-panel{
  display:block;
  width:100%;
}
.admin-password-panel summary{
  list-style:none;
}
.admin-password-panel summary::-webkit-details-marker{display:none}
.admin-password-toggle{
  width:100%;
  justify-content:center;
}
.admin-password-box{
  margin-top:10px;
  padding:16px;
  border-radius:18px;
}
.admin-password-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.admin-password-submit{
  margin-top:12px;
  width:100%;
}
@media (max-width:1080px){
  .admin-create-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:720px){
  .admin-create-grid,
  .admin-password-grid{grid-template-columns:1fr}
  .admin-users-hero__top{align-items:stretch}
  .admin-users-meta{flex-direction:column; align-items:flex-start}
  .admin-actions-cell{min-width:320px}
  .admin-action-row > *{flex:1 1 100%}
  .admin-action-btn{width:100%}
}


/* ===== Safe patch: dashboard search/stat responsive ===== */
.external-actions-grid--secondary{
  margin-top:12px;
  align-items:center;
}
.search-inline-form{
  flex:1 1 440px;
}
.search-inline-form input{
  width:min(100%,380px);
}
@media (max-width: 900px){
  .external-actions-grid--secondary{
    grid-template-columns:1fr;
  }
  .search-inline-form{
    width:100%;
  }
  .search-inline-form input{
    width:100%;
    min-width:0 !important;
  }
}
@media (max-width: 768px){
  .tablewrap{
    overflow-x:auto;
  }
  .dashboard-hero .stats-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}


/* ===== Talent confirm modal patch ===== */
body.modal-open{
  overflow:hidden;
}
.talent-confirm-modal{
  position:fixed;
  inset:0;
  z-index:1200;
}
.talent-confirm-backdrop{
  position:absolute;
  inset:0;
  background:rgba(15,23,42,.42);
  backdrop-filter:blur(2px);
}
.talent-confirm-dialog{
  position:relative;
  z-index:1;
  width:min(92vw, 440px);
  margin:12vh auto 0;
  background:#fff;
  border:1px solid rgba(139,92,246,.14);
  border-radius:22px;
  box-shadow:0 24px 60px rgba(15,23,42,.22);
  overflow:hidden;
}
.talent-confirm-head{
  padding:18px 22px 10px;
}
.talent-confirm-head h3{
  margin:0;
  font-size:1.08rem;
  color:#312e81;
}
.talent-confirm-body{
  padding:0 22px 18px;
  color:#475569;
  line-height:1.6;
}
.talent-confirm-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  padding:0 22px 20px;
}
.talent-confirm-actions .btn{
  min-width:96px;
}
@media (max-width:640px){
  .talent-confirm-dialog{
    width:min(94vw, 420px);
    margin-top:10vh;
    border-radius:18px;
  }
  .talent-confirm-actions{
    flex-direction:column-reverse;
  }
  .talent-confirm-actions .btn{
    width:100%;
  }
}


/* ===== compact doc buttons + talent table selector patch ===== */
.external-actions-grid--secondary{
  grid-template-columns:minmax(280px, 1.1fr) repeat(2, minmax(180px, .55fr));
  align-items:stretch;
}
.external-actions-grid--secondary .search-inline-form{
  margin:0;
}
#btnDocReceived,
#btnDocNotReceived{
  width:100% !important;
  min-height:46px !important;
  padding:10px 14px !important;
  font-size:15px;
  border-radius:18px !important;
}
#btnDocReceived i,
#btnDocNotReceived i{
  font-size:16px;
}
@media (max-width: 980px){
  .external-actions-grid--secondary{
    grid-template-columns:1fr;
  }
}

/* talent table: keep buttons, add radio only at front */
#talentTbody td:first-child,
.tablewrap .table thead th:first-child{
  width:44px;
  min-width:44px;
  text-align:center;
  vertical-align:middle;
}
#talentTbody td:first-child input[type="radio"]{
  width:18px;
  height:18px;
  cursor:pointer;
  accent-color:#8b5cf6;
}
#talentTbody tr:has(td:first-child input[type="radio"]:checked){
  background:rgba(139,92,246,.05);
}
.talent-action-group{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
}
.talent-action-group .talent-status-btn{
  min-height:42px;
  padding:9px 16px;
  border-radius:999px !important;
  font-weight:700;
}
.talent-action-group .talent-status-btn[data-status="present"]{
  background:#edf8f0 !important;
  color:#177a4b !important;
  border:1px solid rgba(22,163,74,.20) !important;
}
.talent-action-group .talent-status-btn[data-status="failed"]{
  background:#fff1f2 !important;
  color:#d1435b !important;
  border:1px solid rgba(220,38,38,.18) !important;
}
.talent-action-group .talent-status-btn[data-status="absent"]{
  background:#fff7eb !important;
  color:#c16a07 !important;
  border:1px solid rgba(217,119,6,.18) !important;
}
@media (max-width: 760px){
  .talent-action-group{
    flex-direction:column;
    align-items:stretch;
  }
  .talent-action-group .talent-status-btn{
    width:100%;
  }
}


/* ===== Final fix patch ===== */
.dashboard-subtools{
  display:flex;
  flex-direction:column;
  gap:14px;
  margin-top:14px;
}
.filter-chip-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
}
.admin-filter-btn{
  width:auto !important;
  min-height:42px;
  padding:0 16px !important;
  flex:0 0 auto;
  border-radius:999px !important;
  cursor:pointer;
}
.admin-filter-btn.is-active{
  background:rgba(139,92,246,.10) !important;
  border-color:rgba(139,92,246,.30) !important;
  box-shadow:0 0 0 3px rgba(139,92,246,.10) !important;
}
.external-actions-grid--secondary{
  display:grid;
  grid-template-columns:minmax(300px,1fr) minmax(180px,220px) minmax(180px,220px);
  gap:12px !important;
  align-items:stretch;
}
.dashboard-search-form{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}
.dashboard-search-form input{
  min-width:220px !important;
  flex:1 1 260px;
}
.dashboard-search-status{
  margin-left:6px;
}
.compact-doc-btn{
  min-height:44px !important;
  padding:8px 14px !important;
  font-size:14px !important;
  width:100%;
  border-radius:18px !important;
}
.compact-doc-btn i{
  font-size:15px;
}
.tablewrap{
  overflow:auto;
  max-width:100%;
}
#appTable thead th,
.table.table-modern thead th{
  position:sticky;
  top:0;
  z-index:3;
  background:linear-gradient(180deg, #faf5ff 0%, #f4ecff 100%);
  box-shadow:0 1px 0 rgba(139,92,246,.10);
}
.pager{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}
.pager .pgbtn{
  min-height:40px;
  padding:8px 14px;
}
.pager .pgbtn-nav{
  font-weight:700;
}
#talentTbody td:first-child,
.table.table-modern thead th:first-child{
  width:44px;
  min-width:44px;
  text-align:center;
  vertical-align:middle;
}
#talentTbody td:first-child input[type="radio"]{
  width:18px;
  height:18px;
  cursor:pointer;
  accent-color:#8b5cf6;
}
#talentTbody tr:has(td:first-child input[type="radio"]:checked) td{
  background:rgba(139,92,246,.05);
}
.field-grid-4 select[data-json-field],
.field-grid-3 select[data-json-field]{
  width:100%;
}
@media (max-width: 980px){
  .external-actions-grid--secondary{
    grid-template-columns:1fr;
  }
}
@media (max-width: 760px){
  .filter-chip-row{ gap:8px; }
  .admin-filter-btn{ min-height:40px; padding:0 14px !important; }
  .dashboard-search-form{ flex-direction:column; align-items:stretch; }
  .dashboard-search-form > *{ width:100%; }
  .dashboard-search-status{ margin-left:0; }
}


/* ===== Patch: compact doc buttons + real sticky header ===== */
.external-actions-grid--secondary{
  align-items: center;
}
.external-actions-grid--secondary .compact-doc-btn{
  min-height: 40px !important;
  padding: 6px 12px !important;
  font-size: 13px !important;
  line-height: 1.15 !important;
  border-radius: 16px !important;
  width: auto !important;
  min-width: 250px;
  flex: 0 1 auto;
}
.external-actions-grid--secondary .compact-doc-btn span{
  white-space: nowrap;
}
.btn-pending-soft{
  background: #fff !important;
  color: #7c3aed !important;
  border: 1.5px solid rgba(124,58,237,.22) !important;
}
.btn-pending-soft:hover{
  background: #f7f2ff !important;
  color: #6d28d9 !important;
}
.tablewrap{
  overflow-x: auto !important;
  overflow-y: visible !important;
  max-width: 100%;
}
.table.table-modern.table-sticky-head thead th,
#appTable.table-sticky-head thead th{
  position: sticky !important;
  top: 0 !important;
  z-index: 30 !important;
  background: linear-gradient(180deg, #faf5ff 0%, #f4ecff 100%) !important;
  box-shadow: 0 2px 0 rgba(139,92,246,.10) !important;
}
@media (max-width: 1200px){
  .external-actions-grid--secondary .compact-doc-btn{
    min-width: 220px;
  }
}
@media (max-width: 768px){
  .external-actions-grid--secondary .compact-doc-btn{
    width: 100% !important;
    min-width: 0;
  }
}


/* ===== emergency dashboard/admin fix pack ===== */
.external-actions-grid--secondary{
  align-items:center;
}
.external-actions-grid--secondary .compact-doc-btn{
  min-height:38px !important;
  padding:6px 12px !important;
  font-size:13px !important;
  line-height:1.15 !important;
  border-radius:16px !important;
  width:auto !important;
  min-width:0 !important;
  flex:0 1 auto;
}
.external-actions-grid--secondary .compact-doc-btn span{ white-space:nowrap; }
.btn-pending-soft{
  background:#fff !important;
  color:#7c3aed !important;
  border:1.5px solid rgba(124,58,237,.22) !important;
}
.btn-pending-soft:hover{ background:#f7f2ff !important; color:#6d28d9 !important; }
.tablewrap.sticky-wrap, .tablewrap{ overflow-x:auto !important; overflow-y:visible !important; }
.table.table-modern.table-sticky-head thead th,
#appTable.table-sticky-head thead th{
  position:sticky !important;
  top:0 !important;
  z-index:30 !important;
  background:linear-gradient(180deg, #faf5ff 0%, #f4ecff 100%) !important;
  box-shadow:0 2px 0 rgba(139,92,246,.10) !important;
}


/* ===== sticky header hard fix ===== */
.tablewrap.sticky-wrap{
  position: relative !important;
  max-height: 72vh !important;
  overflow: auto !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.table.table-modern.table-sticky-head{
  border-collapse: separate !important;
  border-spacing: 0 !important;
}
.table.table-modern.table-sticky-head thead th,
#appTable.table-sticky-head thead th{
  position: sticky !important;
  top: 0 !important;
  z-index: 60 !important;
}

/* === SAFE UI BUTTON PATCH (non-breaking) === */

/* ปุ่มหลัก */
.btn-main {
  border-radius: 14px !important;
  padding: 10px 18px !important;
  font-weight: 600 !important;
  border: 2px solid #e0d4ff !important;
  background: #f7f2ff !important;
  color: #6b4eff !important;
  transition: all .2s ease !important;
}
.btn-main:hover {
  background: #6b4eff !important;
  color: #fff !important;
}

/* ปุ่มสถานะ */
.btn-status {
  border-radius: 18px !important;
  padding: 14px 22px !important;
  font-weight: 600 !important;
  border: none !important;
  transition: all .2s ease !important;
}

/* เขียว */
.btn-received { background:#e6f6ee !important; color:#1f9d62 !important; }
.btn-received:hover { background:#1f9d62 !important; color:#fff !important; }

/* ส้ม */
.btn-notreceived { background:#fff3e6 !important; color:#d9822b !important; }
.btn-notreceived:hover { background:#d9822b !important; color:#fff !important; }

/* ม่วง */
.btn-pending { background:#f2edff !important; color:#7a5cff !important; }
.btn-pending:hover { background:#7a5cff !important; color:#fff !important; }

/* น้ำเงิน */
.btn-confirm { background:#eef4ff !important; color:#3b82f6 !important; }
.btn-confirm:hover { background:#3b82f6 !important; color:#fff !important; }


/* เฉพาะสิทธิ์ super/admin: แสดงสถานะรับเอกสารแล้วเป็นสีแดง */
.admin-red-received.status-badge.success,
.status-badge.success.admin-red-received{
  background:#fff1f2 !important;
  border-color:#fecdd3 !important;
  color:#be123c !important;
}

.admin-red-received-btn.btn-success-soft,
.btn-success-soft.admin-red-received-btn{
  background:linear-gradient(180deg,#fff1f2,#ffe4e6) !important;
  color:#b91c1c !important;
  border:1px solid rgba(220,38,38,.22) !important;
  box-shadow:none !important;
}

.admin-red-received-btn.btn-success-soft:hover,
.btn-success-soft.admin-red-received-btn:hover{
  filter:saturate(1.02);
}


/* ===== admin dashboard table action polish patch (UI only, no logic) ===== */
.external-actions-grid{
  gap:12px;
}

.external-actions-grid--secondary{
  grid-template-columns:minmax(320px,1.2fr) repeat(4, minmax(180px,.62fr));
  gap:12px;
}

.external-actions-grid--secondary .dashboard-search-form,
.dashboard-search-form{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  padding:12px 14px;
  border:1px solid rgba(139,92,246,.14);
  border-radius:20px;
  background:linear-gradient(180deg, rgba(255,255,255,.96), rgba(252,247,255,.88));
  box-shadow:0 12px 26px rgba(91,33,182,.08);
}

.dashboard-search-form input,
#adminSearchInput{
  min-height:46px;
  border-radius:14px;
  border:1px solid rgba(139,92,246,.18);
  background:#fff;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9), 0 8px 16px rgba(139,92,246,.05);
}

.dashboard-search-form input:focus,
#adminSearchInput:focus{
  border-color:rgba(139,92,246,.45);
  box-shadow:0 0 0 4px rgba(139,92,246,.12);
}

.action-inline-btn.compact-doc-btn,
#btnDocReceived,
#btnDocNotReceived,
#btnDocPending,
#btnConfirmSubmit,
#userBtnDocReceived,
#userBtnViewDoc,
#userBtnLegacyStudentNo{
  position:relative;
  overflow:hidden;
  justify-content:center;
  gap:10px;
  min-height:50px !important;
  padding:12px 16px !important;
  border-radius:18px !important;
  font-weight:700;
  letter-spacing:.1px;
  box-shadow:0 14px 26px rgba(91,33,182,.08);
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}

.action-inline-btn.compact-doc-btn::before,
#btnDocReceived::before,
#btnDocNotReceived::before,
#btnDocPending::before,
#btnConfirmSubmit::before,
#userBtnDocReceived::before,
#userBtnViewDoc::before,
#userBtnLegacyStudentNo::before{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(135deg, rgba(255,255,255,.32), rgba(255,255,255,0) 55%);
  pointer-events:none;
}

.action-inline-btn.compact-doc-btn:hover:not(:disabled),
#btnDocReceived:hover:not(:disabled),
#btnDocNotReceived:hover:not(:disabled),
#btnDocPending:hover:not(:disabled),
#btnConfirmSubmit:hover:not(:disabled),
#userBtnDocReceived:hover:not(:disabled),
#userBtnViewDoc:hover:not(:disabled),
#userBtnLegacyStudentNo:hover:not(:disabled){
  transform:translateY(-2px);
  box-shadow:0 18px 32px rgba(91,33,182,.12);
}

#btnDocReceived,
#userBtnDocReceived{
  background:linear-gradient(180deg,#eefbf3,#dcfce7) !important;
  color:#166534 !important;
  border:1px solid rgba(34,197,94,.18) !important;
}

#btnDocNotReceived{
  background:linear-gradient(180deg,#fff7ed,#ffedd5) !important;
  color:#c2410c !important;
  border:1px solid rgba(249,115,22,.18) !important;
}

#btnDocPending{
  background:linear-gradient(180deg,#faf5ff,#f3e8ff) !important;
  color:#7c3aed !important;
  border:1px solid rgba(168,85,247,.18) !important;
}

#btnConfirmSubmit{
  background:linear-gradient(180deg,#eef4ff,#dbeafe) !important;
  color:#1d4ed8 !important;
  border:1px solid rgba(59,130,246,.18) !important;
}

#userBtnViewDoc,
#userBtnLegacyStudentNo{
  background:linear-gradient(180deg,#ffffff,#faf5ff) !important;
  color:#5b21b6 !important;
  border:1px solid rgba(139,92,246,.18) !important;
}

.admin-red-received-btn.btn-success-soft,
.btn-success-soft.admin-red-received-btn,
#btnDocReceived.admin-red-received-btn,
#userBtnDocReceived.admin-red-received-btn{
  background:linear-gradient(180deg,#fff1f2,#ffe4e6) !important;
  color:#b91c1c !important;
  border:1px solid rgba(220,38,38,.22) !important;
  box-shadow:0 14px 26px rgba(220,38,38,.10) !important;
}

.dashboard-search-status{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:0 6px;
}

#appTable tbody tr,
#userReceiveTbody tr,
#userMyReceivedTbody tr{
  transition:background .16s ease, box-shadow .16s ease, transform .16s ease;
}

#appTable tbody tr:hover,
#userReceiveTbody tr:hover,
#userMyReceivedTbody tr:hover{
  background:linear-gradient(180deg, rgba(139,92,246,.04), rgba(139,92,246,.025));
}

#appTable tbody tr.row-selected,
#userReceiveTbody tr.row-selected,
#userMyReceivedTbody tr.row-selected,
#appTable tbody tr:has(input[type="radio"]:checked),
#userReceiveTbody tr:has(input[type="radio"]:checked),
#userMyReceivedTbody tr:has(input[type="radio"]:checked){
  background:linear-gradient(180deg, rgba(139,92,246,.08), rgba(236,72,153,.04));
  box-shadow:inset 3px 0 0 #8b5cf6;
}

#appTable input[type="radio"],
#userReceiveTbody input[type="radio"],
#userMyReceivedTbody input[type="radio"]{
  width:18px;
  height:18px;
  accent-color:#8b5cf6;
  cursor:pointer;
}

.selection-toolbar{
  padding:14px 16px;
  border-radius:20px;
  background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(252,247,255,.92));
  border:1px solid rgba(139,92,246,.12);
  box-shadow:0 14px 30px rgba(91,33,182,.07);
}

@media (max-width: 1220px){
  .external-actions-grid--secondary{
    grid-template-columns:repeat(2, minmax(0,1fr));
  }
  .external-actions-grid--secondary .dashboard-search-form,
  .dashboard-search-form{
    grid-column:1 / -1;
  }
}

@media (max-width: 780px){
  .external-actions-grid--secondary,
  .external-actions-grid{
    grid-template-columns:1fr;
  }
  .action-inline-btn.compact-doc-btn,
  #btnDocReceived,
  #btnDocNotReceived,
  #btnDocPending,
  #btnConfirmSubmit,
  #userBtnDocReceived,
  #userBtnViewDoc,
  #userBtnLegacyStudentNo{
    min-height:48px !important;
  }
}


/* ===== HOTFIX: ลดขนาดปุ่มแดชบอร์ดแอดมินให้กระชับขึ้น ===== */
.external-actions-grid--secondary{
  align-items:start !important;
}

.external-actions-grid--secondary .dashboard-search-form,
.dashboard-search-form{
  padding:10px 12px !important;
  border-radius:18px !important;
}

.dashboard-search-form input,
#adminSearchInput{
  min-height:42px !important;
  padding:10px 14px !important;
  font-size:14px !important;
  border-radius:14px !important;
}

/* ปุ่มชุดบนแดชบอร์ด */
.action-inline-btn.compact-doc-btn,
#btnDocReceived,
#btnDocNotReceived,
#btnDocPending,
#btnConfirmSubmit,
#userBtnDocReceived,
#userBtnViewDoc,
#userBtnLegacyStudentNo{
  min-height:42px !important;
  padding:8px 12px !important;
  font-size:13px !important;
  line-height:1.15 !important;
  border-radius:16px !important;
  gap:8px !important;
  box-shadow:0 8px 18px rgba(91,33,182,.06) !important;
}

.action-inline-btn.compact-doc-btn i,
#btnDocReceived i,
#btnDocNotReceived i,
#btnDocPending i,
#btnConfirmSubmit i,
#userBtnDocReceived i,
#userBtnViewDoc i,
#userBtnLegacyStudentNo i{
  font-size:14px !important;
}

.action-inline-btn.compact-doc-btn span,
#btnDocReceived span,
#btnDocNotReceived span,
#btnDocPending span,
#btnConfirmSubmit span,
#userBtnDocReceived span,
#userBtnViewDoc span,
#userBtnLegacyStudentNo span{
  white-space:nowrap;
}

/* กดแล้วไม่บวมเกิน */
.action-inline-btn.compact-doc-btn:hover:not(:disabled),
#btnDocReceived:hover:not(:disabled),
#btnDocNotReceived:hover:not(:disabled),
#btnDocPending:hover:not(:disabled),
#btnConfirmSubmit:hover:not(:disabled),
#userBtnDocReceived:hover:not(:disabled),
#userBtnViewDoc:hover:not(:disabled),
#userBtnLegacyStudentNo:hover:not(:disabled){
  transform:translateY(-1px) !important;
  box-shadow:0 12px 22px rgba(91,33,182,.08) !important;
}

/* คุมปุ่มในกริดไม่ให้สูงใหญ่ */
.external-actions-grid--secondary .compact-doc-btn{
  width:100% !important;
  min-width:0 !important;
}

/* responsive */
@media (max-width: 1220px){
  .external-actions-grid--secondary{
    grid-template-columns:repeat(2, minmax(0,1fr)) !important;
  }
  .external-actions-grid--secondary .dashboard-search-form,
  .dashboard-search-form{
    grid-column:1 / -1;
  }
}

@media (max-width: 780px){
  .external-actions-grid--secondary{
    grid-template-columns:1fr !important;
  }

  .action-inline-btn.compact-doc-btn,
  #btnDocReceived,
  #btnDocNotReceived,
  #btnDocPending,
  #btnConfirmSubmit,
  #userBtnDocReceived,
  #userBtnViewDoc,
  #userBtnLegacyStudentNo{
    min-height:40px !important;
    padding:8px 10px !important;
    font-size:12.5px !important;
  }
}



/* ===== MOVE SEARCH AREA TO BOTTOM OF ADMIN DASHBOARD ACTIONS ===== */
.external-actions-grid--secondary{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:12px !important;
  align-items:stretch !important;
}

.external-actions-grid--secondary .action-inline-btn,
.external-actions-grid--secondary .compact-doc-btn,
.external-actions-grid--secondary > button,
.external-actions-grid--secondary > a{
  order:1 !important;
  flex:1 1 220px;
}

.external-actions-grid--secondary .dashboard-search-form,
.external-actions-grid--secondary .dashboard-search-box,
.external-actions-grid--secondary .dashboard-search,
.external-actions-grid--secondary .search-box,
.external-actions-grid--secondary form:first-child{
  order:999 !important;
  width:100% !important;
  flex:0 0 100% !important;
  margin-top:10px !important;
}

.external-actions-grid--secondary .dashboard-search-form{
  background:#faf7ff !important;
  padding:12px !important;
  border-radius:16px !important;
  box-shadow:0 6px 18px rgba(91,33,182,.04) !important;
}

.external-actions-grid--secondary .dashboard-search-form input,
.external-actions-grid--secondary .dashboard-search-form button{
  max-width:100% !important;
}

.page-settings .container{
  width:min(1380px, calc(100% - 32px));
}
.page-settings .topbar{
  padding-bottom:18px;
}
.settings-shell{
  display:grid;
  grid-template-columns:290px minmax(0, 1fr);
  gap:22px;
  align-items:start;
  margin-top:22px;
}
.settings-main{min-width:0}
.settings-anchor-section{scroll-margin-top:110px}
.settings-sidemenu{
  position:sticky;
  top:106px;
  padding:22px;
  display:grid;
  gap:18px;
}
.settings-sidebrand__title{
  margin:10px 0 8px;
  font-size:28px;
  color:#321956;
}
.settings-sidebrand__text,
.settings-side-tip p{
  margin:0;
  color:#6b7280;
  font:400 14px/1.65 "Sarabun",sans-serif;
}
.settings-sidegroup{
  display:grid;
  gap:10px;
}
.settings-sidegroup__label{
  color:#7C3AED;
  font:700 12px/1 "Sarabun",sans-serif;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.admin-mini-nav,
.settings-outline{
  display:grid;
  gap:8px;
}
.admin-mini-link,
.settings-outline a{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:44px;
  padding:11px 14px;
  border-radius:16px;
  border:1px solid rgba(216,180,254,.34);
  background:rgba(255,255,255,.86);
  color:#54446f;
  font:700 14px/1.2 "Sarabun",sans-serif;
  transition:all .18s ease;
}
.admin-mini-link:hover,
.settings-outline a:hover{
  transform:translateX(2px);
  border-color:rgba(139,92,246,.42);
  box-shadow:var(--shadow-soft);
}
.admin-mini-link.active{
  color:#fff;
  border-color:transparent;
  background:linear-gradient(135deg, var(--p), #EC4899);
  box-shadow:0 14px 30px rgba(139,92,246,.22);
}
.admin-mini-link__dot{
  width:9px;
  height:9px;
  border-radius:50%;
  background:currentColor;
  opacity:.72;
  flex:0 0 9px;
}
.settings-side-summary{
  display:grid;
  gap:10px;
}
.settings-side-stat{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 14px;
  border-radius:16px;
  border:1px solid rgba(216,180,254,.28);
  background:linear-gradient(180deg, rgba(255,255,255,.96), rgba(251,245,255,.86));
}
.settings-side-stat span{
  color:#736a86;
  font:700 13px/1.3 "Sarabun",sans-serif;
}
.settings-side-stat strong{
  color:#321956;
  font:700 14px/1.2 "Sarabun",sans-serif;
}
.settings-side-stat strong.is-ok{color:#15803d}
.settings-side-stat strong.is-danger{color:#b91c1c}
.settings-side-tip{
  border:1px dashed rgba(139,92,246,.3);
  background:linear-gradient(180deg, rgba(245,208,254,.20), rgba(255,255,255,.92));
}
.settings-hero{
  margin-top:0;
}
.settings-control-cards{
  grid-template-columns:repeat(3, minmax(0,1fr));
}
.settings-grid--single-flow{
  grid-template-columns:1fr;
}
.preview-grid--triple{
  grid-template-columns:repeat(3, minmax(0,1fr));
}
.preview-note--soft{
  background:rgba(224,231,255,.24);
  border-style:solid;
}
.btn-sm{
  min-height:40px;
  padding:8px 12px;
  border-radius:14px;
  font-size:14px;
}
.page-settings .section-card{
  overflow:visible;
}
@media (max-width:1100px){
  .settings-shell{
    grid-template-columns:1fr;
  }
  .settings-sidemenu{
    position:static;
  }
  .admin-mini-nav{
    grid-template-columns:repeat(auto-fit, minmax(200px,1fr));
  }
  .settings-outline{
    grid-template-columns:repeat(auto-fit, minmax(180px,1fr));
  }
  .preview-grid--triple,
  .settings-control-cards{
    grid-template-columns:1fr;
  }
}
@media (max-width:860px){
  .page-settings .container{
    width:min(100% - 20px, 1380px);
  }
  .settings-sidebrand__title{
    font-size:24px;
  }
  .admin-mini-nav,
  .settings-outline{
    grid-template-columns:1fr;
  }
}


.report-locked-plan-box{
  border:1px solid rgba(148,163,184,.28);
  background:linear-gradient(180deg,#f8fafc 0%,#eef2f7 100%);
  border-radius:18px;
  padding:16px 18px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.65);
}
.report-locked-plan-box__title{
  display:flex;
  align-items:center;
  gap:8px;
  font-weight:800;
  color:#475569;
  margin-bottom:6px;
}
.report-locked-plan-box__desc{
  color:#64748b;
  font-size:.95rem;
  margin-bottom:12px;
}
.report-locked-plan-select{
  background:#e5e7eb !important;
  color:#475569 !important;
  border-color:#cbd5e1 !important;
  cursor:not-allowed;
}
.report-locked-plan-select:disabled{
  opacity:1;
  -webkit-text-fill-color:#475569;
}
.report-locked-plan-tags{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:12px;
}
.report-locked-plan-tag{
  display:inline-flex;
  align-items:center;
  padding:7px 12px;
  border-radius:999px;
  background:#dfe4ea;
  color:#475569;
  font-weight:700;
  font-size:.92rem;
  border:1px solid rgba(100,116,139,.18);
}


.report-entry-card--disabled{
  opacity:.72;
  pointer-events:none;
  cursor:not-allowed;
  filter:saturate(.88);
}
.report-entry-card--disabled .report-entry-card__arrow{
  color:#8b7aa8;
}


/* ===== 2026-04 light rebrand support ===== */
:root{
  --p:#a78bfa;
  --p-strong:#8b5cf6;
  --p-deep:#7c63bf;
  --pink:#fde7f3;
  --cream:#fbf8ff;
  --muted:#7a6f90;
  --text:#4b3a67;
  --border:#e9ddff;
  --border-strong:#d7c7ff;
  --shadow:0 14px 34px rgba(148,163,184,.10);
  --shadow-soft:0 8px 22px rgba(148,163,184,.08);
}
body{
  background:
    radial-gradient(1100px 520px at 0% 0%, rgba(221,214,254,.55), transparent 58%),
    radial-gradient(900px 500px at 100% 10%, rgba(251,207,232,.40), transparent 45%),
    linear-gradient(180deg, #fffdfd 0%, var(--cream) 58%, #fff 100%);
}
.topbar{box-shadow:0 8px 24px rgba(148,163,184,.08);}
.brand-title{color:#564571;font-weight:600;}
.brand-sub{color:#7a6f90;}
.card{background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,252,255,.94));border-color:rgba(167,139,250,.14);box-shadow:var(--shadow);}
.page-hero{background:linear-gradient(135deg, rgba(255,255,255,.98), rgba(255,250,254,.96));}
.eyebrow{background:rgba(167,139,250,.10);color:#8b5cf6;}
.nav-link.active{background:linear-gradient(135deg,#f3ebff 0%,#fdeff7 100%);color:#6c4db6;}
@media (max-width:768px){
  .container{width:calc(100% - 20px);}
  .topbar{position:relative;}
  .brand-title{font-size:clamp(20px,6vw,28px);}
  .brand-sub{font-size:12.5px;}
  .topbar-inner{gap:14px;}
}
@media (max-width:520px){
  .container{width:calc(100% - 16px);}
  .brand-title{font-size:20px;}
  .card{padding:14px;}
}


/* ===== 2026-04 vivid premium overhaul ===== */
:root{
  --p:#8b5cf6;
  --p-strong:#7c3aed;
  --p-deep:#5b21b6;
  --pink:#f472b6;
  --pink-soft:#fdf2f8;
  --cream:#f7f1ff;
  --surface:#ffffff;
  --surface-soft:rgba(255,255,255,.88);
  --border:#ddccff;
  --border-strong:#c4b5fd;
  --text:#2d164f;
  --muted:#6f5f8d;
  --shadow:0 22px 54px rgba(91,33,182,.16);
  --shadow-soft:0 12px 28px rgba(139,92,246,.12);
  --hero-gradient:linear-gradient(135deg,#7c3aed 0%,#a855f7 48%,#ec4899 100%);
  --hero-soft:linear-gradient(180deg,rgba(255,255,255,.98),rgba(255,245,252,.94));
}
body{color:var(--text);background:radial-gradient(1100px 540px at -8% -10%, rgba(124,58,237,.24), transparent 54%),radial-gradient(900px 520px at 108% 0%, rgba(236,72,153,.18), transparent 44%),linear-gradient(180deg,#fff9fe 0%, #f8f1ff 56%, #ffffff 100%);}
.topbar,.admin-topbar{background:linear-gradient(180deg, rgba(255,255,255,.90), rgba(255,248,252,.84));backdrop-filter:blur(16px);border-bottom:1px solid rgba(124,58,237,.12);box-shadow:0 12px 34px rgba(91,33,182,.08);}
.brand-mark{background:linear-gradient(135deg, rgba(124,58,237,.18), rgba(236,72,153,.18));border-color:rgba(124,58,237,.18);box-shadow:0 18px 40px rgba(124,58,237,.16);}
.brand-title{color:#391a67;font-weight:700;}.brand-sub{color:#776790;}
.card,.page-hero,.dashboard-hero,.admin-sidebar,.report-modal__dialog,.summary-card,.settings-card,.admin-widget,.footer-inner{background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,247,252,.94));border:1px solid rgba(124,58,237,.12);box-shadow:var(--shadow);}
.card::before{background:radial-gradient(circle, rgba(236,72,153,.16), rgba(236,72,153,0) 68%);}
.page-hero,.dashboard-hero,.premium-stage-card{overflow:hidden;position:relative;background:linear-gradient(135deg, rgba(255,255,255,.96), rgba(255,245,251,.92)),linear-gradient(135deg, rgba(124,58,237,.09), rgba(236,72,153,.08));}
.page-hero::after,.dashboard-hero::after,.premium-stage-card::after{content:"";position:absolute;right:-70px;top:-70px;width:220px;height:220px;border-radius:50%;background:radial-gradient(circle, rgba(124,58,237,.20), rgba(124,58,237,0) 70%);pointer-events:none;}
.eyebrow{background:linear-gradient(135deg, rgba(124,58,237,.12), rgba(236,72,153,.12));color:#7c3aed;border:1px solid rgba(124,58,237,.10);}
.pill,.topbar-badge,.status-badge{background:rgba(255,255,255,.88);border-color:rgba(124,58,237,.12);color:#6e45b5;box-shadow:0 10px 22px rgba(124,58,237,.08);}
.pill.ok,.status-badge.success,.badge-success{background:linear-gradient(135deg,#ecfdf5,#d1fae5);color:#0f8a53;}
.nav-link,.admin-side-link,.admin-mini-link,.settings-outline a{border:1px solid transparent;background:rgba(255,255,255,.80);color:#5d4c80;box-shadow:0 8px 18px rgba(139,92,246,.06);}
.nav-link:hover,.admin-side-link:hover,.admin-mini-link:hover,.settings-outline a:hover{border-color:rgba(124,58,237,.16);box-shadow:0 16px 28px rgba(124,58,237,.10);}
.nav-link.active,.admin-side-link.active,.admin-mini-link.active{background:var(--hero-gradient);color:#fff !important;border-color:transparent;box-shadow:0 18px 36px rgba(124,58,237,.24);}
.nav-link.active i,.admin-side-link.active i,.admin-mini-link.active i{color:#fff !important;}
.admin-sidebar{background:linear-gradient(180deg, rgba(255,255,255,.94), rgba(250,243,255,.92));}
.admin-sidebar__head{padding-bottom:14px;margin-bottom:12px;border-bottom:1px solid rgba(124,58,237,.10);}
.admin-sidebar__title{color:#3a1d68;font-weight:700;}
.sidebar-toggle,.sidebar-close,.logout{border-radius:16px;box-shadow:0 10px 22px rgba(124,58,237,.10);}
.btn,.button,a.btn,button{border-radius:18px !important;font-weight:700;}
.btn,.btn.primary,.btn-primary,button.primary{background:var(--hero-gradient) !important;color:#fff !important;border:none !important;box-shadow:0 16px 30px rgba(124,58,237,.24);}
.btn:hover,button:hover,a.btn:hover{transform:translateY(-2px);box-shadow:0 20px 34px rgba(124,58,237,.20);}
.btn.outline,.btn-outline-primary,.btn-outline-secondary{background:#fff !important;color:#6d28d9 !important;border:1px solid rgba(124,58,237,.18) !important;box-shadow:0 10px 20px rgba(124,58,237,.08);}
.btn.btn-danger-soft,.btn-danger,.danger-outline{background:linear-gradient(135deg,#fb7185,#f43f5e) !important;color:#fff !important;border:none !important;}
.btn.btn-success-soft{background:linear-gradient(135deg,#34d399,#22c55e) !important;color:#fff !important;border:none !important;}
input,select,textarea,.form-control,.form-select{border-radius:18px !important;border:1px solid rgba(124,58,237,.14) !important;background:#fff !important;color:#2f194f !important;box-shadow:inset 0 1px 0 rgba(255,255,255,.95), 0 6px 14px rgba(124,58,237,.03);}
input:focus,select:focus,textarea:focus,.form-control:focus,.form-select:focus{border-color:rgba(124,58,237,.42) !important;box-shadow:0 0 0 .22rem rgba(124,58,237,.14), 0 14px 28px rgba(124,58,237,.10) !important;}
.table thead th,.table-modern thead th,#appTable thead th,#talentTable thead th{background:linear-gradient(180deg, rgba(124,58,237,.10), rgba(236,72,153,.08));color:#4b2b79;border-bottom:1px solid rgba(124,58,237,.14);}
.table tbody td,.table-modern tbody td,#appTable tbody td,#talentTable tbody td{background:rgba(255,255,255,.78);}
.table tbody tr:hover td,.table-modern tbody tr:hover td,#appTable tbody tr:hover td,#talentTable tbody tr:hover td{background:rgba(249,244,255,.96);}
.page-report-menu .report-entry-grid{gap:20px !important;}
.report-entry-card{min-height:100%;display:grid;grid-template-rows:auto auto 1fr;gap:16px;border-radius:28px;background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,244,250,.96));border:1px solid rgba(124,58,237,.12);box-shadow:0 18px 36px rgba(124,58,237,.12);}
.report-entry-card__icon{width:64px;height:64px;border-radius:22px;display:grid;place-items:center;background:var(--hero-gradient);color:#fff;font-size:28px;box-shadow:0 18px 30px rgba(124,58,237,.20);}
.report-entry-card h3{margin:0;color:#34185f;font-size:1.35rem;}
.report-entry-card p{margin:4px 0 0;color:#6f5f8d;}
.report-entry-card__form{display:grid;gap:10px;margin-top:auto;}
.report-entry-card__form label{font-weight:700;color:#593e8b;}
.report-entry-card__form select{background:#fffafc !important;}
.countdown-panel--hero{border-radius:28px;background:linear-gradient(135deg, rgba(124,58,237,.94), rgba(236,72,153,.90));color:#fff;box-shadow:0 24px 44px rgba(124,58,237,.24);}
.countdown-panel--hero .countdown-caption,.countdown-panel--hero .countdown-target{color:#fff;}
.countdown-box--hero{background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.16);}
.countdown-item strong{color:#fff;text-shadow:0 6px 16px rgba(0,0,0,.14);}
.page-admin-login .admin-login-hero,.page-admin-login .admin-login-card{max-width:1100px;margin-left:auto;margin-right:auto;}
.page-admin-login .admin-login-card{padding:18px;background:linear-gradient(180deg, rgba(255,255,255,.95), rgba(251,244,255,.92));}
.page-admin-login .admin-login-layout{align-items:stretch;gap:20px;}
.page-admin-login .auth-info,.page-admin-login .admin-login-form--premium{border-radius:24px;background:linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,247,252,.92));border:1px solid rgba(124,58,237,.10);box-shadow:0 16px 30px rgba(124,58,237,.10);padding:20px;}
.page-admin-login .admin-login-info-box{background:linear-gradient(135deg, rgba(124,58,237,.08), rgba(236,72,153,.06));border:1px solid rgba(124,58,237,.10);border-radius:22px;}
.page-admin-login .admin-login-grid{grid-template-columns:1fr;gap:14px;}
.page-admin-dashboard .dashboard-hero{margin-top:0;}
.page-admin-dashboard .summary-card,.page-admin-dashboard .summary-metric,.page-admin-dashboard .stat-card{border-radius:24px;border:1px solid rgba(124,58,237,.10);box-shadow:0 16px 28px rgba(124,58,237,.10);background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(249,244,255,.94));}
.page-admin-dashboard .summary-metric__value,.page-admin-dashboard .stat-number{color:#4f1fb8;text-shadow:0 1px 0 rgba(255,255,255,.5);}
.msg.ok,.msg.error{border-radius:18px;box-shadow:0 12px 22px rgba(124,58,237,.08);}
.footer-inner{border-radius:28px;margin-top:22px;}
@media (max-width: 991.98px){.page-admin-login .admin-login-layout{grid-template-columns:1fr;}.page-report-menu .section-title-row{flex-direction:column;}.countdown-panel--hero{width:100%;}}
@media (max-width: 768px){body{background:#fbf6ff;}.topbar,.admin-topbar{backdrop-filter:none;position:relative;}.brand-mark{width:52px;height:52px;flex-basis:52px;border-radius:16px;}.card,.page-hero,.dashboard-hero,.admin-sidebar,.footer-inner,.report-entry-card{padding:16px;border-radius:22px;}.report-entry-card__icon{width:54px;height:54px;border-radius:18px;font-size:24px;}.page-admin-login .auth-info,.page-admin-login .admin-login-form--premium{padding:16px;}.page-report-menu .report-entry-grid{grid-template-columns:1fr !important;}.countdown-item strong{font-size:1.6rem;}}
@media (max-width: 520px){.container,.no-sidebar-shell{width:calc(100% - 16px) !important;}.topbar-badge,.pill,.status-badge{font-size:11.5px;padding:6px 10px;}.card,.page-hero,.dashboard-hero,.report-entry-card{padding:14px;border-radius:18px;}.report-entry-card h3{font-size:1.16rem;}}

/* ===== Mobile hotfix: report menu cards should never stretch ===== */
@media (max-width: 768px){
  .page-report-menu .stage-card,
  .page-report-menu .premium-stage-card{
    padding:16px !important;
  }
  .page-report-menu .section-title-row{
    display:flex !important;
    flex-direction:column !important;
    align-items:stretch !important;
    gap:14px !important;
  }
  .page-report-menu .report-entry-grid{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:14px !important;
    align-items:start !important;
  }
  .page-report-menu .report-entry-card{
    width:100% !important;
    min-height:unset !important;
    height:auto !important;
    display:flex !important;
    flex-direction:column !important;
    align-items:flex-start !important;
    justify-content:flex-start !important;
    gap:12px !important;
    padding:16px !important;
  }
  .page-report-menu .report-entry-card > *{
    width:100% !important;
  }
  .page-report-menu .report-entry-card__icon{
    width:52px !important;
    height:52px !important;
    min-width:52px !important;
    border-radius:16px !important;
    font-size:22px !important;
  }
  .page-report-menu .report-entry-card h3{
    font-size:1.12rem !important;
    line-height:1.35 !important;
    margin:0 !important;
  }
  .page-report-menu .report-entry-card p{
    font-size:.96rem !important;
    line-height:1.5 !important;
    margin:4px 0 0 !important;
  }
  .page-report-menu .report-entry-card__arrow{
    width:auto !important;
    min-height:0 !important;
    margin-top:0 !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:flex-start !important;
  }
  .page-report-menu .report-entry-card__form{
    width:100% !important;
    display:grid !important;
    gap:10px !important;
    margin-top:0 !important;
  }
  .page-report-menu .report-entry-card__form select,
  .page-report-menu .report-entry-card__form button,
  .page-report-menu .report-entry-card__form .btn{
    width:100% !important;
  }
}

@media (max-width: 520px){
  .page-report-menu .container,
  .page-report-menu .no-sidebar-shell{
    width:calc(100% - 20px) !important;
  }
  .page-report-menu .report-entry-card{
    border-radius:18px !important;
    padding:14px !important;
  }
  .page-report-menu .countdown-panel--hero,
  .page-report-menu .stage-inline-note,
  .page-report-menu .msg{
    width:100% !important;
  }
}
