:root {
  font-family: system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color: #203c4f; background: #f4f7fb; font-synthesis: none;
  --muted: #657b89; --teal: #136961; --line: #dce5e9;
}
* { box-sizing: border-box; }
body { margin: 0; }
button,input,select,textarea { font: inherit; }
button,a,input,select { touch-action: manipulation; }
button {
  cursor: pointer; border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 17px; background: #fff; color: inherit; font-weight: 650;
}
button:disabled { opacity: .5; cursor: default; }
.primary { background: var(--teal); color: #fff; border-color: var(--teal); }
a { color: var(--teal); }
.shell { width: 100%; max-width: 1240px; margin: 0 auto; padding: 32px 24px; }
h1 { font-size: clamp(25px,4vw,35px); letter-spacing: -.035em; margin: 6px 0 10px; }
h2 { font-size: 20px; letter-spacing: -.02em; margin: 4px 0 14px; }
h3 { font-size: 16px; margin: 0 0 5px; }
.heading { margin-bottom: 26px; }
.eyebrow { font-size: 11px; font-weight: 750; letter-spacing: .16em; color: var(--teal); margin: 0 0 8px; }
.muted { color: var(--muted); line-height: 1.65; font-size: 14px; }
label { display: block; font-size: 14px; font-weight: 650; margin: 16px 0 10px; }
input,select {
  display: block; width: 100%; min-width: 0; border: 1px solid #c9d9df;
  border-radius: 10px; background: #fff; color: #203c4f; padding: 12px; margin-top: 7px; font-size: 16px;
}
input:focus,select:focus,button:focus-visible,a:focus-visible,summary:focus-visible { outline: 3px solid #92c9c4; outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: center; line-height: 1.5; }
input[type=checkbox] { display: inline; width: 20px; height: 20px; flex: 0 0 20px; margin: 0; accent-color: var(--teal); }
.card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 26px; margin-bottom: 18px; }
.notice { padding: 15px 18px; border-radius: 12px; background: #edf6f3; line-height: 1.6; font-size: 14px; }
.error { background: #fff0eb; color: #8c3627; }
.badge { display: inline-block; border-radius: 99px; padding: 7px 12px; background: #edf6f3; color: var(--teal); font-size: 12px; white-space: nowrap; }
.badge.closed { background: #f0f2f4; color: #6c7681; }
details > summary { cursor: pointer; font-weight: 650; line-height: 1.6; }
details > summary::marker { color: var(--teal); }
.empty-state { text-align: center; padding: 50px 20px; }
.login { max-width: 430px; margin: 45px auto; }
.login h1 { font-size: 36px; }
.login form { margin-top: 28px; }
.login .primary { width: 100%; margin-top: 18px; }

/* Central visual language, scoped to the independent group portal. */
.portal {
  --muted: #60718a; --teal: #1e4e8c; --line: #d5e1f0;
  display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; padding-top: 64px;
  font-family: 'Poppins',system-ui,-apple-system,'Segoe UI',Roboto,Arial,sans-serif; color: #172c4c;
  background:
    radial-gradient(900px 500px at 15% 10%,rgba(99,102,241,.14),transparent 60%),
    radial-gradient(900px 500px at 85% 20%,rgba(34,197,94,.10),transparent 60%),
    linear-gradient(120deg,#f1f4f9,#dff1ff);
}
.portal-shell { flex: 1; max-width: 1020px; padding: 28px 20px 40px; }
.portal .card { border-radius: 20px; background: rgba(255,255,255,.96); box-shadow: 0 12px 30px rgba(30,60,114,.08); }
.portal .primary { background: linear-gradient(135deg,#1e3c72,#2f67b7); border: 0; border-radius: 13px; font-weight: 800; box-shadow: 0 8px 18px #1e3c7226; }
.portal input,.portal select { border-radius: 12px; border-color: #bfcfe5; }
.portal :is(input,select):focus,.portal :is(button,a,summary):focus-visible { outline: 3px solid #7faaff; outline-offset: 3px; }
.portal button,.portal a { -webkit-tap-highlight-color: transparent; }
.portal .login { border-top: 5px solid #3775c3; padding: 30px; }
.portal .login h1 { color: #1e3c72; }
.panel-header {
  position: fixed; z-index: 1000; top: 0; left: 0; right: 0; height: 64px;
  display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 12px; padding: 0 22px;
  background: linear-gradient(135deg,rgba(30,78,140,.95),rgba(15,42,68,.97));
  border-bottom: 1px solid #ffffff30; box-shadow: 0 10px 28px #0f2a4430; color: #fff;
}
.panel-name { color: #fff; text-decoration: none; font-size: 14px; font-weight: 700; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.header-center { justify-self: center; border-radius: 99px; padding: 8px 18px; background: #ffffff1f; border: 1px solid #ffffff38; box-shadow: inset 0 0 0 1px #ffffff14; font-size: 15px; font-weight: 800; letter-spacing: .3px; white-space: nowrap; }
.panel-header form { justify-self: end; margin: 0; }
.logout-btn { padding: 8px 14px; border: 0; border-radius: 10px; background: linear-gradient(135deg,#ef4444,#dc2626); color: #fff; font-size: 13.5px; font-weight: 750; box-shadow: 0 10px 22px #ef444440; white-space: nowrap; }
.panel-footer { margin-top: auto; background: linear-gradient(135deg,rgba(15,42,68,.97),rgba(30,78,140,.97)); border-top: 1px solid #ffffff26; box-shadow: 0 -10px 26px #0f2a4420; padding: 22px 18px; display: flex; flex-direction: column; align-items: center; gap: 12px; color: #e5e7eb; }
.footer-home { display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; background: linear-gradient(135deg,#169b49,#15803d); border: 1px solid #ffffff30; border-radius: 14px; padding: 12px 22px; font-size: 15px; font-weight: 900; box-shadow: 0 10px 24px #16a34a40; }
.panel-footer p { font-size: 12px; margin: 0; opacity: .8; }

/* Same home menu structure as the central panel, with granted pages only. */
.portal .index-hero,.portal .personnel-heading {
  border: 1px solid #ffffff6b; border-radius: 22px;
  background: linear-gradient(120deg,#1e3c72,#2a5298,#346fbd,#2a5298,#1e3c72);
  background-size: 250% 250%; animation: portalFlow 10s ease-in-out infinite;
  color: #fff; box-shadow: 0 18px 40px #1e3c722b,inset 0 0 0 1px #ffffff18;
}
.portal .index-hero { text-align: center; padding: 32px 24px; margin: 8px 0 28px; }
.portal .index-hero h1 { margin: 6px 0 10px; font-size: clamp(25px,4vw,32px); font-weight: 900; letter-spacing: .2px; }
.portal .index-hero > p:last-child { margin: 0; font-size: 14px; color: #e1edff; }
.portal .index-hero .eyebrow,.portal .personnel-heading .eyebrow { color: #e1edff; overflow-wrap: anywhere; }
.portal .menu-section { margin: 14px 0 18px; }
.portal .menu-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 2px 12px; }
.portal .menu-section__head h2 { margin: 0; font-size: 16px; font-weight: 900; }
.portal .menu-section__head > span { color: var(--muted); font-size: 12px; }
.portal .menu-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.portal .menu-card { display: flex; align-items: center; gap: 14px; padding: 20px 18px; border-radius: 18px; background: rgba(255,255,255,.95); border: 1px solid #c8d9f0; box-shadow: 0 14px 30px #1e3c7214; text-decoration: none; transition: transform .18s ease,box-shadow .18s ease; }
.portal .menu-card__icon { display: grid; place-items: center; width: 52px; height: 52px; flex: 0 0 52px; border-radius: 17px; font-size: 25px; background: linear-gradient(135deg,#b4d5ff,#ddd6fe); box-shadow: inset 0 0 0 1px #ffffff80,0 8px 20px #3b82f626; }
.portal .menu-card__body { flex: 1; min-width: 0; }
.portal .menu-card__title { display: block; color: #17365f; font-size: 17px; font-weight: 900; }
.portal .menu-card__desc { display: block; color: var(--muted); font-size: 12px; line-height: 1.55; margin-top: 5px; }
.portal .menu-card__chev { color: #447bc0; font-size: 30px; }
@keyframes portalFlow { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

/* Central group/account management. */
.top { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px max(22px,calc((100vw - 1200px)/2)); background: #183e53; color: #fff; }
.brand { color: inherit; font-weight: 700; text-decoration: none; }
.stats { display: flex; flex-wrap: wrap; gap: 12px 28px; color: var(--muted); font-size: 13px; margin-bottom: 28px; }
.stats strong { color: #203c4f; font-size: 20px; margin-right: 4px; }
.settings > summary .badge { margin-left: 12px; }
.settings form { max-width: 640px; margin-top: 22px; }
.group-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; margin: 22px 0; overflow: hidden; }
.group-card > summary { padding: 24px 26px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.group-card > summary::after { content: "+"; font-size: 22px; color: var(--teal); }
.group-card[open] > summary::after { content: "−"; }
.group-card > summary > span:first-child { flex: 1; min-width: 0; }
.group-card > summary strong { display: block; font-size: 21px; overflow-wrap: anywhere; }
.group-card > summary small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 5px; }
.group-content { border-top: 1px solid var(--line); padding: 0 26px; }
.group-section { padding: 26px 0; }
.group-section + .group-section { border-top: 1px solid var(--line); }
.empty-inline { padding: 18px 20px; border: 1px dashed #c9d9df; border-radius: 12px; background: #f7fafb; font-size: 14px; line-height: 1.7; }
.empty-inline p { color: var(--muted); margin: 5px 0 0; }
.account-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(300px,100%),1fr)); gap: 18px; margin-top: 22px; align-items: start; }
.account-card { border: 1px solid var(--line); border-radius: 14px; padding: 20px; min-width: 0; }
.account-card > summary { overflow-wrap: anywhere; }
.account-card form { margin-top: 20px; }
.page-permission { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.page-permission > div { flex: 1 1 260px; }
.page-permission p { margin: 4px 0 0; }
.page-permission .check { margin: 0; }
[hidden] { display: none !important; }
.personnel-back { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 15px; margin-bottom: 18px; border: 1px solid #c9d9ee; border-radius: 12px; background: #ffffffc9; box-shadow: 0 5px 14px #1e3c720a; font-size: 13px; font-weight: 800; text-decoration: none; }
.personnel-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 28px; }
.personnel-heading-main { display: flex; align-items: center; gap: 18px; min-width: 0; }
.personnel-heading-main > div { min-width: 0; }
.personnel-heading h1 { margin: 4px 0 8px; font-weight: 900; overflow-wrap: anywhere; }
.personnel-heading .muted { margin-bottom: 0; color: #e1edff; }
.personnel-hero-icon { display: grid; place-items: center; width: 64px; height: 64px; flex: 0 0 64px; border-radius: 20px; background: #ffffff24; border: 1px solid #ffffff40; box-shadow: inset 0 0 18px #ffffff12; font-size: 32px; }
.readonly-badge { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid #ffffff45; border-radius: 99px; background: #102f5a42; color: #fff; font-size: 11px; font-weight: 750; white-space: nowrap; }
.portal .period-card { border-top: 4px solid #3b82f6; }
.section-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.section-heading h2 { display: flex; align-items: center; gap: 10px; margin: 0; color: #1e3c72; font-size: 18px; font-weight: 850; }
.section-icon { display: inline-grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; border-radius: 12px; background: #dbeafe; font-size: 21px; }
.period-label { color: #244f8e; background: #edf4ff; border: 1px solid #c8daf4; border-radius: 99px; padding: 7px 12px; font-size: 12px; font-weight: 800; }
.personnel-period { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 16px; padding-top: 18px; border-top: 1px solid #e3ebf6; }
.personnel-period label { flex: 1 1 140px; margin: 0; }
.personnel-period select { min-height: 50px; }
.personnel-period button { min-height: 50px; }
.portal .personnel-list { padding: 0; overflow: hidden; border-color: #badfcf; }
.personnel-list-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 24px; background: linear-gradient(135deg,#15803d,#169663); color: #fff; }
.personnel-list-heading h2 { margin: 0; font-size: 19px; font-weight: 900; }
.personnel-list-heading .badge { background: #ffffff24; border: 1px solid #ffffff40; color: #fff; font-weight: 800; }
.personnel-rows { list-style: none; padding: 18px; margin: 0; display: grid; gap: 10px; }
.personnel-row { display: flex; align-items: center; gap: 16px; padding: 17px; color: inherit; text-decoration: none; border: 1px solid #dce5f2; border-radius: 15px; background: linear-gradient(115deg,#f7faff,#fff 65%); box-shadow: 0 5px 12px #1e3c7206; transition: border-color .18s ease,transform .18s ease; }
.personnel-avatar { width: 48px; height: 48px; flex: 0 0 48px; display: grid; place-items: center; background: linear-gradient(135deg,#bfdbfe,#ddd6fe); border-radius: 15px; font-size: 24px; box-shadow: inset 0 0 0 1px #ffffff88; }
.personnel-rows li:nth-child(3n+2) .personnel-avatar { background: linear-gradient(135deg,#a7f3d0,#c5e9fe); }
.personnel-rows li:nth-child(3n) .personnel-avatar { background: linear-gradient(135deg,#fde68a,#fed7aa); }
.personnel-row-info { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 5px; overflow-wrap: anywhere; }
.personnel-row-info strong { font-size: 17px; font-weight: 850; color: #1e3c72; }
.personnel-row-info span,.personnel-row-info small { color: var(--muted); font-size: 13px; }
.personnel-row-info small { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.personnel-row-info .personnel-active { color: #166534; border: 1px solid #bce8ce; background: #eafbf1; padding: 3px 8px; border-radius: 99px; font-size: 10px; font-weight: 800; }
.personnel-row-action { font-size: 12px; font-weight: 800; color: #245398; background: #eaf2ff; border: 1px solid #cfe0fa; border-radius: 10px; padding: 9px 12px; white-space: nowrap; }
.empty-icon { display: grid; place-items: center; width: 62px; height: 62px; margin: 0 auto 16px; font-size: 30px; background: #e6f2ff; border-radius: 20px; }
.portal .personnel-details,.portal .personnel-identity { padding: 0; overflow: hidden; border-top: 4px solid var(--detail-accent,#7c65c7); }
.detail-tone-blue { --detail-accent: #3b82f6; --detail-tint: #eff6ff; --detail-ink: #1e40af; --detail-icon: #dbeafe; }
.detail-tone-amber { --detail-accent: #e7a126; --detail-tint: #fffbeb; --detail-ink: #92400e; --detail-icon: #fef3c7; }
.detail-tone-purple { --detail-accent: #8b5cf6; --detail-tint: #f5f3ff; --detail-ink: #5b21b6; --detail-icon: #ede9fe; }
.detail-tone-green { --detail-accent: #22a66b; --detail-tint: #effcf4; --detail-ink: #166534; --detail-icon: #dcfce7; }
.detail-section-title { display: flex; align-items: center; gap: 12px; margin: 0; padding: 18px 24px; border-bottom: 1px solid #e3eaf3; background: linear-gradient(120deg,var(--detail-tint,#f5f3ff),#fff); color: var(--detail-ink,#5b21b6); font-size: 18px; font-weight: 850; }
.detail-section-title .section-icon { background: var(--detail-icon,#ede9fe); }
.detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 28px; padding: 8px 24px 18px; margin: 0; }
.detail-grid > div { padding: 16px 0; border-bottom: 1px solid #edf1f7; }
.detail-grid dt { font-size: 12px; color: var(--muted); margin-bottom: 7px; font-weight: 650; }
.detail-grid dd { font-size: 15px; margin: 0; overflow-wrap: anywhere; line-height: 1.6; font-weight: 650; }
.personnel-identity > .muted { padding: 0 24px 8px; }
.identity-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(230px,100%),1fr)); gap: 14px; margin-top: 20px; }
.personnel-identity .identity-grid { padding: 22px 24px; margin: 0; }
.identity-link { display: flex; align-items: center; gap: 14px; padding: 18px; border: 1px solid #dcd4f6; border-radius: 14px; background: linear-gradient(120deg,#f5f3ff,#fff); color: #50358e; text-decoration: none; transition: transform .18s ease,box-shadow .18s ease; }
.identity-link > span:first-child { display: grid; place-items: center; width: 46px; height: 46px; flex: 0 0 46px; border-radius: 13px; font-size: 26px; background: #e9e1ff; }
.identity-link strong,.identity-link small { display: block; }
.identity-link small { margin-top: 6px; color: #6e5b94; }
@media(hover:hover) {
  .portal .menu-card:hover,.portal .identity-link:hover { transform: translateY(-2px); box-shadow: 0 18px 32px #1e3c7220; }
  .portal .personnel-row:hover { transform: translateY(-1px); border-color: #90b5e7; }
  .portal .primary:hover,.portal .footer-home:hover { filter: brightness(1.08); }
}
@media(max-width:880px) {
  .portal .menu-grid { grid-template-columns: 1fr; }
  .personnel-heading { flex-wrap: wrap; }
}
@media(max-width:600px) {
  .shell { padding: 24px 15px; }
  .card { padding: 22px 18px; }
  .portal { padding-top: 60px; }
  .portal-shell { padding: 22px 14px 30px; }
  .portal .index-hero { padding: 26px 18px; margin-top: 0; }
  .portal .menu-section__head { flex-wrap: wrap; }
  .portal .menu-card { padding: 18px 14px; gap: 12px; }
  .portal .menu-card__icon { width: 46px; height: 46px; flex-basis: 46px; font-size: 23px; }
  .portal .menu-card__title { font-size: 16px; }
  .portal .login { padding: 26px 22px; }
  .panel-header { height: 60px; padding: 0 12px; gap: 8px; grid-template-columns: minmax(0,1fr) auto auto; }
  .panel-name { font-size: 12px; }
  .header-center { padding: 6px 10px; font-size: 12px; }
  .logout-btn { padding: 7px 9px; font-size: 12px; }
  .top { padding: 16px; font-size: 13px; }
  .group-card > summary { padding: 20px 18px; gap: 12px; }
  .group-card > summary strong { font-size: 19px; }
  .group-card > summary .badge { display: none; }
  .group-content { padding: 0 18px; }
  .account-card { padding: 18px 14px; }
  .login { margin: 20px auto; }
  .personnel-heading { align-items: flex-start; flex-direction: column; gap: 18px; padding: 22px 18px; }
  .personnel-heading-main { gap: 12px; }
  .personnel-hero-icon { width: 48px; height: 48px; flex-basis: 48px; border-radius: 15px; font-size: 26px; }
  .personnel-heading .muted { font-size: 12px; }
  .personnel-heading .eyebrow { font-size: 10px; letter-spacing: .1em; }
  .section-heading h2 { font-size: 16px; }
  .section-icon { width: 34px; height: 34px; flex-basis: 34px; font-size: 19px; }
  .personnel-period { gap: 12px; }
  .personnel-period label { flex-basis: calc(50% - 6px); }
  .personnel-period button { width: 100%; }
  .personnel-list-heading { padding: 18px 15px; gap: 8px; }
  .personnel-list-heading h2 { font-size: 16px; }
  .personnel-list-heading .badge { padding: 6px 9px; font-size: 11px; }
  .personnel-rows { padding: 12px; }
  .personnel-row { gap: 10px; padding: 14px 10px; flex-wrap: wrap; }
  .personnel-row-info strong { font-size: 15px; }
  .personnel-row-info span,.personnel-row-info small { font-size: 11px; }
  .personnel-avatar { width: 38px; height: 38px; flex-basis: 38px; font-size: 20px; border-radius: 12px; }
  .personnel-row-action { padding: 7px 9px; font-size: 11px; }
  .detail-section-title { padding: 16px 18px; font-size: 16px; gap: 10px; }
  .detail-grid { grid-template-columns: 1fr; gap: 0; padding: 2px 18px 14px; }
  .personnel-identity .identity-grid { padding: 18px; }
  .personnel-identity > .muted { padding: 0 18px 4px; }
  .footer-home { font-size: 14px; padding: 10px 18px; }
}
@media(prefers-reduced-motion:reduce) {
  .portal .index-hero,.portal .personnel-heading { animation: none; }
  .portal .menu-card,.portal .personnel-row,.portal .identity-link { transition: none; }
}

/* Central operation account administration uses the real shared header/footer. */
body.operation-admin {
  --teal: #1e4e8c; --line: #d5e1f0; --muted: #60718a;
  display: flex; flex-direction: column; min-height: 100vh; padding-top: 80px;
  font-family: 'Poppins',system-ui,-apple-system,'Segoe UI',Roboto,Arial,sans-serif;
  background: radial-gradient(900px 500px at 15% 10%,#6366f11f,transparent 60%),linear-gradient(120deg,#f1f4f9,#dff1ff);
}
.operation-admin .shell { flex: 1; max-width: 1200px; padding-top: 20px; }
.operation-admin .card,.operation-admin .group-card { box-shadow: 0 12px 30px #1e3c7214; border-radius: 20px; }
.operation-admin .primary { background: linear-gradient(135deg,#1e3c72,#2f67b7); border: 0; border-radius: 12px; font-weight: 800; box-shadow: 0 8px 18px #1e3c7220; }
.operation-admin input:not([type=checkbox]) { min-height: 48px; border-radius: 12px; border-color: #bfd1e9; }
.operation-admin input:focus,.operation-admin :is(button,a,summary):focus-visible { outline: 3px solid #7faaff; outline-offset: 3px; }
.admin-group-hero { display: flex; align-items: center; gap: 20px; padding: 30px; border-radius: 22px; background: linear-gradient(120deg,#1e3c72,#2a5298,#3778c5); border: 1px solid #ffffff75; box-shadow: 0 18px 40px #1e3c7229; color: #fff; }
.admin-group-hero > div { min-width: 0; }
.admin-group-hero h1 { font-size: clamp(24px,4vw,34px); font-weight: 900; letter-spacing: -.02em; }
.admin-group-hero .eyebrow,.admin-group-hero .muted { color: #e1edff; }
.admin-group-hero .muted { margin-bottom: 0; }
.admin-hero-icon { width: 72px; height: 72px; flex: 0 0 72px; display: grid; place-items: center; background: #ffffff22; border: 1px solid #ffffff4d; border-radius: 22px; font-size: 36px; }
.operation-admin .stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin-bottom: 24px; }
.admin-stat { display: flex; align-items: center; gap: 14px; background: #fff; padding: 20px; border: 1px solid #cedef2; border-top: 4px solid #3b82f6; border-radius: 17px; box-shadow: 0 8px 20px #1e3c720d; }
.admin-stat > span { display: grid; place-items: center; width: 48px; height: 48px; flex: 0 0 48px; border-radius: 15px; font-size: 24px; background: #e3efff; }
.admin-stat > div > span { display: block; color: #60718a; font-size: 12px; margin-top: 3px; }
.operation-admin .admin-stat strong { display: block; color: #1e3c72; font-size: 26px; line-height: 1.1; }
.admin-stat:nth-child(2) { border-top-color: #22a66b; }.admin-stat:nth-child(2) > span { background: #dcfce7; }
.admin-stat:nth-child(3) { border-top-color: #8b5cf6; }.admin-stat:nth-child(3) > span { background: #ede9fe; }
.operation-admin .settings { padding: 0; overflow: hidden; border-top: 4px solid #22a66b; }
.operation-admin .settings > summary { display: flex; align-items: center; gap: 12px; padding: 22px 24px; list-style: none; color: #185f43; background: linear-gradient(120deg,#edfdf3,#fff); }
.operation-admin .settings > summary::-webkit-details-marker { display: none; }
.operation-admin .settings > summary::after { content: '＋'; margin-left: auto; font-size: 22px; }
.operation-admin .settings[open] > summary::after { content: '−'; }
.operation-admin .settings form { max-width: 700px; margin: 0; padding: 4px 24px 24px; }
.operation-admin .group-card { scroll-margin-top: 90px; border-top: 4px solid #3b82f6; }
.operation-admin .group-card > summary { list-style: none; background: linear-gradient(120deg,#edf4ff,#fff); }
.operation-admin .group-card > summary::-webkit-details-marker { display: none; }
.operation-admin .group-card > summary::after { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; background: #e0edff; border: 1px solid #c2d6f3; border-radius: 11px; color: #245398; }
.operation-admin .group-card:nth-of-type(even) { border-top-color: #8b5cf6; }
.operation-admin .group-card:nth-of-type(even) > summary { background: linear-gradient(120deg,#f5f3ff,#fff); }
.admin-group-name { display: flex; align-items: center; gap: 14px; }
.admin-group-name > span:last-child { min-width: 0; }
.admin-group-icon { display: grid; place-items: center; width: 50px; height: 50px; flex: 0 0 50px; background: linear-gradient(135deg,#bfdbfe,#ddd6fe); border-radius: 16px; font-size: 24px; }
.operation-admin .group-card > summary strong { color: #1e3c72; font-weight: 900; }
.operation-admin .group-section h2 { color: #244f8e; font-weight: 850; }
.operation-admin .page-permission { margin-top: 14px; padding: 18px; border: 1px solid #d7e3f4; background: linear-gradient(120deg,#f7faff,#fff); border-radius: 15px; }
.operation-admin .page-permission h3 { color: #1e3c72; }
.operation-admin .page-permission .check { border-radius: 12px; background: #eaf9f0; border: 1px solid #bce4cc; padding: 11px 13px; color: #166534; }
.operation-admin .page-permission input { accent-color: #169663; }
.operation-admin .account-card { padding: 0; overflow: hidden; background: #fff; border-color: #d5e1f0; }
.operation-admin .account-card > summary { padding: 18px; color: #244f8e; background: #f0f6ff; }
.operation-admin .account-card form { margin: 0; padding: 0 18px 18px; }
.operation-admin .badge { background: #e7f7ee; color: #166534; font-weight: 750; }
.operation-admin .badge.closed { background: #edf0f5; color: #64748b; }

/* Group-paid advances: central-style input and horizontally scrollable days. */
.portal .menu-card-advance .menu-card__icon { background: linear-gradient(135deg,#a7f3d0,#c6efc8); }
.portal .menu-card-advance { border-color: #b9dfcb; }
.advance-stats { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; margin-bottom: 22px; }
.advance-stat { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 20px 16px; border: 1px solid #d5e1f0; border-radius: 17px; background: #fff; box-shadow: 0 8px 20px #1e3c720d; }
.advance-stat > span { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; font-size: 23px; border-radius: 13px; background: #e6f1ff; }
.advance-stat small { display: block; color: #60718a; font-size: 11px; line-height: 1.5; }
.advance-stat strong { display: block; color: #1e3c72; font-size: 24px; margin-top: 3px; overflow-wrap: anywhere; }
.advance-stat-total { border-color: #b6dfc6; background: linear-gradient(120deg,#effcf4,#fff); }
.advance-stat-total > span { background: #d2f8e0; }.advance-stat-total strong { color: #166534; }
.portal .advance-entry { border-top: 4px solid #169663; }
.advance-entry .section-icon { background: #dcfce7; }
.advance-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.advance-form label { margin: 0; }
.advance-form input,.advance-form select { min-height: 50px; }
.advance-form small { display: block; color: var(--muted); font-weight: 500; font-size: 11px; margin-top: 6px; }
.advance-person,.advance-note,.advance-help,.advance-save { grid-column: 1 / -1; }
.advance-help { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.6; }
.portal .advance-save { background: linear-gradient(135deg,#15803d,#169663); min-height: 50px; }
.portal .advance-success { background: #e9f9ef; border: 1px solid #b9e4ca; color: #166534; margin-bottom: 20px; }
.portal .advance-table-panel { padding: 0; overflow: hidden; }
.advance-table-help { padding: 0 20px; margin: 16px 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.advance-table-scroll { overflow: auto; max-width: 100%; -webkit-overflow-scrolling: touch; padding-bottom: 6px; }
.advance-table-scroll:focus-visible { outline: 3px solid #7faaff; outline-offset: -3px; }
.advance-table { border-collapse: separate; border-spacing: 0; font-size: 12px; width: 100%; }
.advance-table th,.advance-table td { border-bottom: 1px solid #e1e9f3; border-right: 1px solid #e1e9f3; padding: 14px 12px; text-align: center; vertical-align: top; min-width: 100px; }
.advance-table thead th { background: #eaf2ff; color: #244f8e; font-weight: 850; }
.advance-table .advance-person-cell { position: sticky; left: 0; z-index: 1; min-width: 160px; width: 160px; max-width: 160px; text-align: left; overflow-wrap: anywhere; background: #f4f8ff; color: #1e3c72; box-shadow: 3px 0 8px #1e3c7210; }
.advance-table td > strong { display: block; white-space: nowrap; color: #166534; }
.advance-table td > small { display: block; margin-top: 6px; color: #60718a; max-width: 180px; overflow-wrap: anywhere; }
.advance-table .advance-filled { background: #f2fcf5; }
.advance-dash { color: #acb9ca; }.advance-row-total { color: #166534; font-weight: 800; white-space: nowrap; }
.advance-table tfoot th,.advance-table tfoot td { background: #edf8f1; color: #166534; font-weight: 850; white-space: nowrap; }
.advance-cancel { margin-top: 10px; font-size: 11px; }
.advance-cancel > summary { color: #a42c2c; padding: 6px; border-radius: 8px; background: #fff1f1; list-style: none; }
.advance-cancel > summary::-webkit-details-marker { display: none; }
.advance-cancel p { color: #923131; line-height: 1.5; }
.advance-cancel .danger { border: 1px solid #efb1b1; color: #a42c2c; background: #fff1f1; padding: 8px; white-space: nowrap; }
@media(max-width:720px) {
  body.operation-admin { padding-top: 70px; }
  .operation-admin .shell { padding: 18px 14px 30px; }
  .admin-group-hero { gap: 14px; padding: 24px 18px; align-items: flex-start; }
  .admin-hero-icon { width: 46px; height: 46px; flex-basis: 46px; border-radius: 15px; font-size: 26px; }
  .operation-admin .stats { gap: 9px; }.admin-stat { padding: 14px 8px; flex-direction: column; gap: 10px; text-align: center; }
  .admin-stat > span { width: 38px; height: 38px; flex-basis: 38px; font-size: 20px; }
  .admin-stat > div > span { font-size: 10px; }.operation-admin .admin-stat strong { font-size: 23px; }
  .operation-admin .settings > summary { padding: 20px 16px; font-size: 14px; gap: 8px; }
  .operation-admin .settings > summary .badge { margin: 0; }
  .operation-admin .settings form { padding: 0 18px 22px; }
  .operation-admin .group-card > summary { padding: 20px 16px; }
  .admin-group-name { gap: 10px; }.admin-group-icon { width: 42px; height: 42px; flex-basis: 42px; border-radius: 13px; font-size: 22px; }
  .operation-admin .page-permission { padding: 15px; gap: 12px; }
  .operation-admin .page-permission > div { flex-basis: 100%; }
  .operation-admin .page-permission .check { flex: 1; font-size: 13px; }
  .operation-admin .account-card { padding: 0; }
  .advance-stats { grid-template-columns: 1fr 1fr; }
  .advance-stat-total { grid-column: 1 / -1; }
  .advance-stat { padding: 16px 12px; }.advance-stat strong { font-size: 22px; }
  .advance-stat > span { width: 36px; height: 36px; flex-basis: 36px; font-size: 21px; }
  .advance-form { gap: 16px 12px; }
  .advance-table .advance-person-cell { min-width: 125px; width: 125px; max-width: 125px; }
  .advance-table th,.advance-table td { padding: 12px 9px; }
}
