/* v1.2.5 — Morandi administration surface. Game routes use .surface-game and are untouched. */
.surface-system{
  --system-ink:#473c4f;
  --system-muted:#7b6e87;
  --system-line:#cdbdd3;
  --system-surface:#ffffff;
  --system-surface-soft:#ede9f4;
  --system-primary:#7b6e87;
  --system-primary-hover:#473c4f;
  color:var(--system-ink);
  font-family:system-ui,"Microsoft JhengHei",sans-serif;
}

/* Flat, cool workspace inspired by the supplied attendance-system reference. */
.surface-system,
.surface-system.role-admin,
.surface-system.role-user{
  background-color:#ede9f4!important;
  background-image:none!important;
}
.surface-system.role-admin>main,
.surface-system.role-user>main{
  max-width:1240px;
  margin:0 auto;
  padding:34px 76px 48px 24px;
}
.surface-system .heading,
.surface-system.role-admin .heading,
.surface-system.role-admin>main>h1,
.surface-system :where(.page-tools) h1{
  padding:0;
  margin-bottom:24px;
  background:none;
  border:0;
  border-radius:0;
  box-shadow:none;
  text-shadow:none;
}
.surface-system .heading h1,
.surface-system h1{
  min-height:0;
  padding:0;
  color:var(--system-ink);
  font:700 clamp(1.55rem,2.5vw,2rem)/1.25 system-ui,"Microsoft JhengHei",sans-serif;
  letter-spacing:-.02em;
  background:none;
  border:0;
  border-radius:0;
  box-shadow:none;
  text-shadow:none;
}
.surface-system h1::before{display:none!important;content:none!important}
.surface-system h2{color:var(--system-ink);font-size:1.15rem;letter-spacing:-.01em}
.surface-system p,.surface-system small{color:var(--system-muted)}

.surface-system .card,
.surface-system .panel,
.surface-system.role-admin .panel,
.surface-system .parchment-panel{
  color:var(--system-ink);
  background:var(--system-surface);
  border:1px solid var(--system-line);
  border-radius:12px;
  box-shadow:0 1px 2px rgba(16,45,77,.035);
}
.surface-system .cards{gap:14px;margin:20px 0 24px}
.surface-system .card{padding:20px}
.surface-system .card b{font-size:1.9rem;line-height:1.2}
.surface-system .card.good,
.surface-system .card.warn,
.surface-system .card.bad{border-top:1px solid var(--system-line)}

.surface-system button,
.surface-system .button,
.surface-system.role-admin button,
.surface-system.role-admin .button{
  min-height:40px;
  padding:9px 15px;
  color:#fff;
  font-weight:700;
  line-height:1.25;
  background:var(--system-primary);
  border:1px solid transparent;
  border-radius:8px;
  box-shadow:none;
  text-shadow:none;
  transform:none;
  transition:background-color .15s ease,border-color .15s ease;
}
.surface-system button:hover,
.surface-system .button:hover{background:var(--system-primary-hover);filter:none;transform:none}
.surface-system button.secondary,
.surface-system .button.secondary,
.surface-system.role-admin button.secondary,
.surface-system.role-admin .button.secondary{
  color:var(--system-ink);
  background:#eef3f1;
  border-color:var(--system-line);
  box-shadow:none;
}
.surface-system button.secondary:hover,
.surface-system .button.secondary:hover{background:#e7edf5}
.surface-system button.ghost{color:var(--system-ink);background:transparent;border-color:transparent}
.surface-system .danger-button,
.surface-system.role-admin .danger-button{color:#fff;background:#a94740;border-color:transparent;box-shadow:none}
.surface-system .actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.surface-system .actions form{margin:0}

.surface-system input,
.surface-system select,
.surface-system textarea,
.surface-system.role-admin input,
.surface-system.role-admin select,
.surface-system.role-admin textarea{
  min-height:42px;
  padding:9px 12px;
  color:var(--system-ink);
  background:#fff;
  border:1px solid #b8c8c2;
  border-radius:8px;
  box-shadow:none;
}
.surface-system input:focus,
.surface-system select:focus,
.surface-system textarea:focus{outline:3px solid rgba(40,116,95,.16);border-color:var(--system-primary)}
.surface-system .search:not(.panel),
.surface-system .scan-form,
.surface-system .game-search{
  padding:14px;
  background:var(--system-surface-soft);
  border:1px solid var(--system-line);
  border-radius:10px;
  box-shadow:none;
}

.surface-system table{background:transparent;border-radius:0}
.surface-system th,
.surface-system.role-admin table th{
  padding:12px 10px;
  color:#53645e;
  font-size:.78rem;
  letter-spacing:.03em;
  background:#f1f5f3;
  border-color:var(--system-line);
}
.surface-system td,
.surface-system.role-admin td{padding:13px 10px;border-color:var(--system-line)}
.surface-system tr:hover td{background:rgba(236,244,240,.68)}
.surface-system .category-header th{color:var(--system-primary);background:#e7f0ec}
.surface-system .badge{font-weight:700;box-shadow:none}

/* Dashboard: keep the information, remove the RPG framing. */
.surface-system .base-titleboard{align-items:center;margin-bottom:20px;padding:0;background:none;border:0;box-shadow:none}
.surface-system .base-titleboard h1{margin:0}
.surface-system .dashboard-player-card{
  min-width:250px;
  padding:12px 14px;
  color:var(--system-ink);
  background:var(--system-surface);
  border:1px solid var(--system-line);
  border-radius:10px;
  box-shadow:none;
}
.surface-system .dashboard-player-card .role-sprite,
.surface-system .dashboard-player-card .admin-base-icon{display:none}
.surface-system .mission-cards{gap:14px;margin:0 0 20px}
.surface-system .mission-card{
  min-height:128px;
  padding:18px;
  color:var(--system-ink);
  background:var(--system-surface);
  border:1px solid var(--system-line);
  border-radius:12px;
  box-shadow:none;
  transform:none;
}
.surface-system .mission-card:hover{transform:none;background:#fff;border-color:rgba(40,116,95,.35)}
.surface-system .mission-card .mission-icon{font-size:1.35rem;filter:none}
.surface-system .mission-card b{font-size:2rem}
.surface-system .mission-card small,
.surface-system .mission-card em{color:var(--system-muted);font-style:normal;text-shadow:none}
.surface-system .quest-ribbon{
  width:auto;
  margin:0 0 16px;
  padding:0;
  color:var(--system-ink);
  font-size:1rem;
  background:none;
  border:0;
  box-shadow:none;
  text-shadow:none;
}
.surface-system .quest-ribbon::before,
.surface-system .quest-ribbon::after{display:none}
.surface-system .dashboard-lower{gap:16px}
.surface-system .game-loan-row{border-color:var(--system-line);box-shadow:none}
.surface-system .quick-grid{gap:10px}
.surface-system .quick-grid a{
  min-height:92px;
  padding:14px;
  color:var(--system-ink);
  background:#f5f8f7;
  border:1px solid var(--system-line);
  border-radius:9px;
  box-shadow:none;
  text-shadow:none;
  transform:none;
}
.surface-system .quick-grid a:hover{transform:none;background:#edf4f1}
.surface-system .quick-grid a>span{font-size:1.3rem;filter:none}
.surface-system .daily-mission-grid{gap:10px}
.surface-system .daily-mission{background:#f6f9f8;border:1px solid var(--system-line);border-radius:9px;box-shadow:none}

/* The menu remains floating but reads as a professional utility drawer. */
.surface-system .admin-dock>summary{
  width:56px;
  height:58px;
  color:#fff;
  background:#123451;
  border:1px solid rgba(255,255,255,.34);
  border-radius:10px;
  box-shadow:0 3px 10px rgba(18,44,36,.2);
}
.surface-system .admin-dock>summary small{color:#e8f3ef}
.surface-system .admin-dock[open]>summary{background:#0b2842}
.surface-system .admin-dock-panel{
  top:66px;
  padding:12px;
  color:var(--system-ink);
  background:#fff;
  border:1px solid var(--system-line);
  border-radius:12px;
  box-shadow:0 12px 34px rgba(18,44,36,.2);
}
.surface-system .admin-profile{border-color:var(--system-line)}
.surface-system .admin-profile span{color:#3e78b8}
.surface-system .admin-dock nav a{color:var(--system-ink);font-weight:650;border:0;border-radius:7px}
.surface-system .admin-dock nav a:hover{color:var(--system-ink);background:#eef3f9;border:0}
.surface-system .admin-menu-label{color:var(--system-muted);border-color:var(--system-line)}
.surface-system .admin-logout{background:#a94740;border:0;box-shadow:none}

.surface-system dialog,
.surface-system.role-admin dialog{
  width:min(920px,calc(100vw - 48px));
  max-width:none;
  max-height:88vh;
  padding:26px;
  overflow:auto;
  color:var(--system-ink);
  background:#fff;
  border:1px solid var(--system-line);
  border-radius:12px;
  box-shadow:0 20px 60px rgba(20,42,35,.28);
}
.surface-system dialog::backdrop{background:rgba(18,35,30,.55)}
.surface-system dialog form{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px;
}
.surface-system dialog form>.heading,
.surface-system dialog form>p,
.surface-system dialog form>.actions,
.surface-system dialog form>button,
.surface-system dialog form>.button,
.surface-system dialog form>a,
.surface-system dialog form>hr{
  grid-column:1/-1;
}
.surface-system dialog form>.heading{
  position:sticky;
  top:-26px;
  z-index:2;
  margin:-26px -26px 2px;
  padding:20px 26px 16px;
  background:#fff;
  border-bottom:1px solid var(--system-line);
}
.surface-system .flash{border:1px solid rgba(40,116,95,.18);box-shadow:none}

@media(max-width:760px){
  .surface-system.role-admin>main,
  .surface-system.role-user>main{padding:84px 12px 32px}
  .surface-system .heading{gap:12px;align-items:flex-start;flex-direction:column}
  .surface-system .heading .actions{width:100%}
  .surface-system .heading .actions>*{flex:1 1 auto;text-align:center}
  .surface-system .cards,.surface-system .mission-cards{grid-template-columns:1fr 1fr}
  .surface-system .base-titleboard{align-items:flex-start;gap:12px}
  .surface-system .dashboard-player-card{width:100%;min-width:0}
  .surface-system .panel,.surface-system.role-admin .panel,.surface-system .parchment-panel{padding:14px}
  .surface-system dialog,
  .surface-system.role-admin dialog{width:calc(100vw - 20px);max-height:94vh;padding:18px}
  .surface-system dialog form{grid-template-columns:1fr;gap:14px}
  .surface-system dialog form>*{grid-column:1!important}
  .surface-system dialog form>.heading{top:-18px;margin:-18px -18px 2px;padding:16px 18px 13px}
}
@media(max-width:460px){
  .surface-system .cards,.surface-system .mission-cards{grid-template-columns:1fr}
}

/* Legacy theme packs intentionally use !important. These final, system-only
   rules win that cascade without changing a single .surface-game screen. */
.surface-system .panel,
.surface-system .card,
.surface-system .parchment-panel,
.surface-system.role-admin .panel{
  color:var(--system-ink)!important;
  background:var(--system-surface)!important;
  border:1px solid var(--system-line)!important;
  border-radius:12px!important;
  box-shadow:0 1px 2px rgba(16,45,77,.035)!important;
}
.surface-system .mission-card{
  color:var(--system-ink)!important;
  background:var(--system-surface)!important;
  border:1px solid var(--system-line)!important;
  border-radius:12px!important;
  box-shadow:none!important;
}
.surface-system .mission-card b{color:var(--system-ink)!important}
.surface-system .mission-card small,
.surface-system .mission-card em{color:var(--system-muted)!important}
.surface-system .quest-ribbon,
.surface-system .quest-ribbon.blue,
.surface-system .quest-ribbon.green,
.surface-system .quest-ribbon.violet{
  color:var(--system-ink)!important;
  background:none!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  text-shadow:none!important;
}
.surface-system .quick-grid a,
.surface-system .game-loan-row{
  color:var(--system-ink)!important;
  background:#f7f9fc!important;
  border:1px solid var(--system-line)!important;
  border-radius:9px!important;
  box-shadow:none!important;
}
.surface-system .quick-grid a:hover{background:#eef3f9!important;transform:none!important}
.surface-system button,
.surface-system .button,
.surface-system.role-admin button,
.surface-system.role-admin .button{
  color:#fff!important;
  background:var(--system-primary)!important;
  border:1px solid transparent!important;
  border-radius:8px!important;
  box-shadow:none!important;
  text-shadow:none!important;
  filter:none!important;
  transform:none!important;
}
.surface-system button.secondary,
.surface-system .button.secondary,
.surface-system.role-admin button.secondary,
.surface-system.role-admin .button.secondary{
  color:var(--system-ink)!important;
  background:#f4f7fb!important;
  border-color:var(--system-line)!important;
}
.surface-system button.ghost{color:var(--system-ink)!important;background:transparent!important}
.surface-system .danger-button,
.surface-system.role-admin .danger-button{color:#fff!important;background:#a94740!important}
.surface-system input,
.surface-system select,
.surface-system textarea,
.surface-system.role-admin input,
.surface-system.role-admin select,
.surface-system.role-admin textarea{
  color:var(--system-ink)!important;
  background:#fff!important;
  border:1px solid #d9e2ee!important;
  border-radius:8px!important;
  box-shadow:none!important;
}
.surface-system .flash{color:#137447!important;background:#eaf8f0!important;border-color:#cfeadb!important}
.surface-system .flash.error{color:#bd3030!important;background:#fff1f1!important;border-color:#f2cccc!important}

/* Reference-color details: navy chrome, white work cards, blue actions and calm status tones. */
.surface-system .system-status-bar{background:#fff!important;border-bottom:1px solid var(--system-line)!important;box-shadow:none!important}
.surface-system .current-time-status{color:var(--system-muted)!important;background:#fff!important;border:1px solid var(--system-line)!important;box-shadow:none!important}
.surface-system .back-base-button,
.surface-system .game-entry-button{background:#fff!important;border:1px solid var(--system-line)!important;box-shadow:none!important}
.surface-system .admin-dock-panel{border-top:5px solid #123451}
.surface-system .category-header th{color:#1c65b8!important;background:#edf5ff!important}
.surface-system code{color:#175eac!important;background:#edf5ff!important}
.surface-system .badge.available,
.surface-system .badge.returned{color:#147345!important;background:#e9f7ef!important}
.surface-system .badge.borrowed,
.surface-system .badge.partial{color:#986318!important;background:#fff6df!important}
.surface-system .badge.pending{color:#265fa9!important;background:#eaf2ff!important}

/* Base selection is navigation, not a primary action: never invert the whole tile. */
.page-base-select.surface-system .base-choice-grid button,
.page-base-select.surface-system.role-admin .base-choice-grid button,
.page-base-select.surface-system.role-user .base-choice-grid button,
.page-base-select.surface-system .base-choice-grid form:last-child button{
  color:var(--system-ink)!important;
  background:#fff!important;
  background-image:none!important;
  border:1px solid var(--system-line)!important;
  border-radius:16px!important;
  box-shadow:0 1px 2px rgba(16,45,77,.04)!important;
}
.page-base-select.surface-system .base-choice-grid button b{color:var(--system-ink)!important}
.page-base-select.surface-system .base-choice-grid button:hover,
.page-base-select.surface-system .base-choice-grid button:focus-visible{
  color:var(--system-ink)!important;
  background:#f8fbff!important;
  border-color:#83aee6!important;
  outline:3px solid rgba(34,118,233,.12)!important;
  transform:none!important;
}

/* Interactive pet artwork may appear on system pages, but it is not a blue
   action button. Keep every pet canvas and its hit area visually transparent. */
.surface-system .floating-pet,
.surface-system.role-admin button.floating-pet,
.surface-system.role-user button.floating-pet,
.surface-system .floating-pet:hover,
.surface-system.role-admin button.floating-pet:hover,
.surface-system.role-user button.floating-pet:hover,
.surface-system .floating-pet:focus,
.surface-system.role-admin button.floating-pet:focus,
.surface-system.role-user button.floating-pet:focus,
.surface-system .floating-pet:focus-visible,
.surface-system.role-admin button.floating-pet:focus-visible,
.surface-system.role-user button.floating-pet:focus-visible,
.surface-system .floating-pet:active,
.surface-system.role-admin button.floating-pet:active,
.surface-system.role-user button.floating-pet:active{
  background:transparent!important;
  background-image:none!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  outline:none!important;
}
.surface-system .floating-pet-shell{
  background:transparent!important;
  background-image:none!important;
  border:0!important;
  box-shadow:none!important;
}
.surface-system .pet-sprite,
.surface-system .user-pet-summary .pet-sprite,
.surface-game .pet-sprite{
  background-color:transparent!important;
  border-color:transparent!important;
  box-shadow:none!important;
}

/* Compact base dashboards: keep identity visible and return the viewport to work. */
.page-dashboard.surface-system>main,
.page-material-dashboard.surface-system>main{
  width:min(100%,1440px)!important;
  max-width:1440px!important;
  padding-left:24px!important;
  padding-right:24px!important;
}
.page-dashboard.surface-system .base-dashboard,
.page-material-dashboard.surface-system .base-dashboard{gap:14px!important}
.app-version{position:fixed;right:10px;bottom:6px;z-index:45;padding:3px 8px;border:1px solid rgba(123,110,135,.28);border-radius:999px;color:#7b6e87;background:rgba(255,255,255,.88);font-size:12px;line-height:1.4;font-weight:700;letter-spacing:.02em;pointer-events:none;box-shadow:0 2px 8px rgba(71,60,79,.08);backdrop-filter:blur(4px)}
.surface-system button.floating-pet,
.surface-system button.floating-pet:hover,
.surface-system button.floating-pet:focus,
.surface-system button.floating-pet:focus-visible,
.surface-system button.floating-pet:active{
  background:transparent!important;
  background-image:none!important;
  border:0!important;
  box-shadow:none!important;
  outline:none!important;
}
.page-base-select.surface-system .base-choice-grid button,
.page-base-select.surface-system.role-admin .base-choice-grid button,
.page-base-select.surface-system.role-user .base-choice-grid button{
  color:#473c4f!important;
  background:#fff!important;
  border-color:#cdbdd3!important;
}
.page-base-select.surface-system .base-choice-grid button:hover,
.page-base-select.surface-system .base-choice-grid button:focus-visible{background:#ede9f4!important;border-color:#7b6e87!important}

/* Three company management areas stay side by side on normal work screens. */
.page-base-select.surface-system .base-choice-grid{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:16px!important;
}
.page-base-select.surface-system .base-choice-grid.has-system-management{grid-template-columns:repeat(4,minmax(0,1fr))!important}
.page-base-select.surface-system .system-management-choice{min-height:142px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:18px;border:1px solid #cdbdd3;border-radius:16px;background:#fff;color:#473c4f;text-decoration:none;box-shadow:0 1px 2px rgba(16,45,77,.04)}
.page-base-select.surface-system .system-management-choice:hover,.page-base-select.surface-system .system-management-choice:focus-visible{background:#ede9f4;border-color:#7b6e87;outline:3px solid rgba(123,110,135,.12)}
.page-base-select.surface-system .system-management-choice span{font-size:42px}
.page-base-select.surface-system .system-management-choice b{font-size:22px}
.page-base-select.surface-system .system-management-choice small{color:var(--system-muted);font-size:13px}
@media(max-width:760px){
  .page-base-select.surface-system .base-choice-grid{grid-template-columns:1fr!important}
  .page-base-select.surface-system .base-choice-grid.has-system-management{grid-template-columns:1fr!important}
}

/* Material dashboard quick actions: compact single-row toolbar on desktop. */
.page-material-dashboard.surface-system .quick-grid.material-quick{
  display:grid!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:10px!important;
  margin:0!important;
}
.page-material-dashboard.surface-system .quick-grid.material-quick a{
  display:flex!important;
  min-width:0!important;
  min-height:58px!important;
  padding:10px 14px!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  border-radius:9px!important;
  white-space:nowrap!important;
}
.page-material-dashboard.surface-system .quick-grid.material-quick a>span{font-size:1.15rem!important}
.page-material-dashboard.surface-system .quick-grid.material-quick a>b{font-size:.95rem!important}
@media(max-width:980px){
  .page-material-dashboard.surface-system .quick-grid.material-quick{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
@media(max-width:560px){
  .page-material-dashboard.surface-system .quick-grid.material-quick{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .page-material-dashboard.surface-system .quick-grid.material-quick a{min-height:52px!important;padding:8px 10px!important}
}

/* The settings trigger is icon chrome, not a filled action button. */
.surface-system .admin-dock>summary,
.surface-system .admin-dock[open]>summary,
.surface-system .admin-dock>summary:hover,
.surface-system .admin-dock>summary:focus-visible{
  color:#7b6e87!important;
  background:transparent!important;
  background-image:none!important;
  border-color:transparent!important;
  box-shadow:none!important;
  outline-color:rgba(123,110,135,.25)!important;
}
.surface-system .admin-dock>summary small{color:#7b6e87!important}
.surface-system .operation-complete-dialog{width:min(720px,calc(100vw - 32px))!important}
.surface-system .operation-complete-dialog[open]{display:block!important;position:fixed!important;inset:50% auto auto 50%!important;transform:translate(-50%,-50%)!important;margin:0!important;z-index:1000!important}
.surface-system .operation-complete-dialog::backdrop{background:rgba(71,60,79,.55)!important;backdrop-filter:blur(2px)}
.surface-system .operation-complete-card{display:grid;gap:14px;padding:8px}
.surface-system .operation-complete-card h2,.surface-system .operation-complete-card p{margin:0;text-align:center}
.surface-system .operation-complete-icon{display:grid;place-items:center;width:52px;height:52px;margin:0 auto;border-radius:50%;color:#fff;background:#7b6e87;font-size:30px;font-weight:800}
.surface-system .operation-record{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:4px 0}
.surface-system .operation-record div,.surface-system .operation-items span,.surface-system .operation-skipped{padding:12px;border:1px solid #cdbdd3;border-radius:10px;background:#f7f5f9}
.surface-system .operation-record dt{color:#7b6e87;font-size:.86rem;font-weight:700}
.surface-system .operation-record dd{margin:4px 0 0;color:#473c4f;font-weight:700}
.surface-system .operation-items{display:grid;gap:8px;max-height:240px;overflow:auto}
.surface-system .operation-items span{display:block}
.surface-system .operation-skipped{display:grid;gap:5px;color:#7b3f4b;background:#fff4f5;border-color:#dabfc5}
.surface-system .complete-record{grid-template-columns:120px minmax(0,1fr);gap:10px 16px;margin:0 0 22px}
.surface-system .complete-record dt{color:#7b6e87;font-weight:700}
.surface-system .complete-record dd{margin:0;color:#473c4f;font-weight:650}
.surface-system .complete-record-items{display:grid;gap:7px}
.surface-system .complete-return-list{display:grid;gap:12px;margin-bottom:22px}
.surface-system .complete-return-list article{padding:14px;border:1px solid #cdbdd3;border-radius:10px;background:#f7f5f9}
.surface-system .complete-return-list article>div{display:flex;gap:10px;align-items:center;margin-bottom:10px}
.surface-system .complete-return-list article dl{grid-template-columns:110px minmax(0,1fr);gap:6px 12px;margin:0}
.surface-system .operation-complete-dialog .actions{justify-content:flex-end}
@media(max-width:560px){
  .surface-system .operation-record{grid-template-columns:1fr}
  .surface-system .complete-record,
  .surface-system .complete-return-list article dl{grid-template-columns:1fr;gap:3px}
  .surface-system .complete-record dd,
  .surface-system .complete-return-list article dd{margin:0 0 8px}
  .surface-system .operation-complete-dialog .actions>*{width:100%;text-align:center}
}
.page-dashboard.surface-system .base-titleboard,
.page-material-dashboard.surface-system .base-titleboard{
  display:flex!important;
  align-items:center!important;
  min-height:0!important;
  margin:0!important;
  padding:8px 0 12px!important;
  gap:18px!important;
  color:var(--system-ink)!important;
  background:transparent!important;
  background-image:none!important;
  border:0!important;
  border-bottom:1px solid var(--system-line)!important;
  border-radius:0!important;
  box-shadow:none!important;
  overflow:visible!important;
}
.page-dashboard.surface-system .base-titleboard::before,
.page-dashboard.surface-system .base-titleboard::after,
.page-material-dashboard.surface-system .base-titleboard::before,
.page-material-dashboard.surface-system .base-titleboard::after{
  content:none!important;
  display:none!important;
}
.page-dashboard.surface-system .base-titleboard h1,
.page-material-dashboard.surface-system .base-titleboard h1{
  font-family:inherit!important;
  font-size:clamp(1.35rem,2vw,1.75rem)!important;
  line-height:1.2!important;
  font-weight:750!important;
}
.page-dashboard.surface-system .dashboard-player-card,
.page-material-dashboard.surface-system .dashboard-player-card{
  display:flex!important;
  width:auto!important;
  min-width:220px!important;
  max-width:360px!important;
  margin-left:auto!important;
  padding:7px 12px!important;
  border-radius:8px!important;
}
.page-dashboard.surface-system .dashboard-player-card>span:last-child,
.page-material-dashboard.surface-system .dashboard-player-card>span:last-child{
  display:grid!important;
  grid-template-columns:auto auto!important;
  gap:1px 12px!important;
  align-items:center!important;
}
.page-dashboard.surface-system .dashboard-player-card b,
.page-material-dashboard.surface-system .dashboard-player-card b{grid-column:1/-1;font-size:.95rem!important}
.page-dashboard.surface-system .dashboard-player-card em,
.page-material-dashboard.surface-system .dashboard-player-card em{font-size:.82rem!important}
.page-dashboard.surface-system .dashboard-player-card label,
.page-material-dashboard.surface-system .dashboard-player-card label{font-size:.75rem!important}
.page-dashboard.surface-system .dashboard-player-card>span:last-child>small:last-child,
.page-material-dashboard.surface-system .dashboard-player-card>span:last-child>small:last-child{display:none!important}
.page-dashboard.surface-system .mission-cards,
.page-material-dashboard.surface-system .cards{margin-bottom:0!important}
@media(max-width:760px){
  .page-dashboard.surface-system>main,
  .page-material-dashboard.surface-system>main{padding-left:12px!important;padding-right:12px!important}
  .page-dashboard.surface-system .base-titleboard,
  .page-material-dashboard.surface-system .base-titleboard{display:grid!important;padding-bottom:10px!important}
  .page-dashboard.surface-system .dashboard-player-card,
  .page-material-dashboard.surface-system .dashboard-player-card{width:100%!important;max-width:none!important;margin:0!important}
}
@media(max-width:760px){
  .surface-system .panel,
  .surface-system .card,
  .surface-system .parchment-panel{border-width:1px!important;border-radius:12px!important}
}

/* Final Morandi system palette. Keep these rules last so legacy theme packs
   cannot reintroduce saturated blues or decorative dashboard chrome. */
.surface-system,
.surface-system.role-admin,
.surface-system.role-user{color:#473c4f!important;background:#ede9f4!important;background-image:none!important}
.surface-system .system-status-bar,
.surface-system .current-time-status,
.surface-system .panel,
.surface-system .card,
.surface-system .parchment-panel,
.surface-system.role-admin .panel{background:#fff!important;border-color:#cdbdd3!important}
.surface-system button,
.surface-system .button,
.surface-system.role-admin button,
.surface-system.role-admin .button{background:#7b6e87!important;border-color:#7b6e87!important}
.surface-system button:hover,
.surface-system .button:hover,
.surface-system.role-admin button:hover,
.surface-system.role-admin .button:hover{background:#473c4f!important;border-color:#473c4f!important}
.surface-system button.secondary,
.surface-system .button.secondary,
.surface-system.role-admin button.secondary,
.surface-system.role-admin .button.secondary{color:#473c4f!important;background:#ede9f4!important;border-color:#cdbdd3!important}
.surface-system button.secondary:hover,
.surface-system .button.secondary:hover{background:#cdbdd3!important}
.surface-system input,
.surface-system select,
.surface-system textarea,
.surface-system.role-admin input,
.surface-system.role-admin select,
.surface-system.role-admin textarea{color:#473c4f!important;background:#fff!important;border-color:#cdbdd3!important}
.surface-system input:focus,
.surface-system select:focus,
.surface-system textarea:focus{border-color:#7b6e87!important;outline-color:rgba(123,110,135,.2)!important}
.surface-system th,
.surface-system.role-admin table th{color:#473c4f!important;background:#ede9f4!important;border-color:#cdbdd3!important}
.surface-system tr:hover td{background:rgba(237,233,244,.72)!important}
.surface-system .search:not(.panel),
.surface-system .scan-form,
.surface-system .game-search,
.surface-system .quick-grid a,
.surface-system .daily-mission{color:#473c4f!important;background:#f7f5f9!important;border-color:#cdbdd3!important}
.surface-system .quick-grid a:hover{background:#ede9f4!important}
.surface-system .admin-dock>summary,
.surface-system .admin-dock[open]>summary{background:#473c4f!important;border-color:#7b6e87!important}
.surface-system .admin-dock-panel{border-color:#cdbdd3!important;border-top-color:#7b6e87!important}
.surface-system .admin-profile span,
.surface-system .category-header th,
.surface-system code{color:#665a70!important}
.surface-system .category-header th,
.surface-system code{background:#ede9f4!important}
.surface-system .danger-button,
.surface-system.role-admin .danger-button,
.surface-system .admin-logout{background:#8c6268!important;border-color:#8c6268!important}
.surface-system .flash{color:#526b5b!important;background:#edf3ee!important;border-color:#c6d4c9!important}
.surface-system .flash.error{color:#80565b!important;background:#f5eaec!important;border-color:#dbc4c8!important}
.surface-system .back-base-button,
.surface-system .game-entry-button{color:#473c4f!important;background:#fff!important;border-color:#cdbdd3!important}
.page-dashboard.surface-system .base-titleboard,
.page-material-dashboard.surface-system .base-titleboard{display:none!important}
.page-dashboard.surface-system .base-dashboard,
.page-material-dashboard.surface-system .base-dashboard{gap:14px!important}
/* v1.3.79 history tabs and compact pagination */
.history-section-tabs,.pagination{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap;margin:14px 0}
.history-section-tabs .button{min-width:180px;text-align:center}
.history-section-tabs .button.primary{background:#7b6e87;color:#fff;border-color:#7b6e87}
.pagination span{color:#716079;font-size:.92rem}
.active-missions .pagination{padding-top:12px;border-top:1px solid rgba(123,110,135,.18)}

/* v1.3.81 tool-status workspace: use 90% of the viewport and keep the table readable. */
.page-tool-status-requests.surface-system>main{
  width:90%;
  max-width:none;
  padding-left:0;
  padding-right:0;
}
.page-tool-status-requests .status-table{width:100%}
.page-tool-status-requests .status-table table{min-width:1120px}
@media(max-width:760px){.page-tool-status-requests.surface-system>main{width:calc(100% - 24px)}}

/* v1.3.83 tool-status request filter. */
.page-tool-status-requests .status-filter{
  display:flex;
  align-items:end;
  gap:10px;
  margin-bottom:14px;
  padding:14px;
}
.page-tool-status-requests .status-filter label{min-width:240px}
.page-tool-status-requests .status-filter button,
.page-tool-status-requests .status-filter .button{margin:0}
@media(max-width:600px){
  .page-tool-status-requests .status-filter{align-items:stretch;flex-direction:column}
  .page-tool-status-requests .status-filter label{min-width:0}
}

/* v1.3.84 personal tool base. */
.page-personal-dashboard.surface-system>main,
.page-personal-tools-manage.surface-system>main,
.page-personal-tools-history.surface-system>main{width:90%;max-width:1440px;padding-left:0;padding-right:0}
.personal-base .mission-cards{grid-template-columns:repeat(4,minmax(0,1fr))}
.personal-event{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 12px;padding:11px 0;border-bottom:1px solid var(--system-line)}
.personal-event small{grid-column:1/-1}
.page-personal-tools-manage td .actions form{display:flex;align-items:center;gap:6px}
.page-personal-tools-manage td .actions input[type="number"]{width:72px}

/* 個人工具歸還：控制欄寬，確保狀態與確認按鈕不會被輸入框推出畫面。 */
.page-personal-issue-return .personal-return-table{table-layout:fixed;min-width:980px}
.page-personal-issue-return .personal-return-table .person-col{width:13%}
.page-personal-issue-return .personal-return-table .erp-col{width:10%}
.page-personal-issue-return .personal-return-table .tool-col{width:12%}
.page-personal-issue-return .personal-return-table .count-col{width:10%}
.page-personal-issue-return .personal-return-table .action-col{width:55%}
.page-personal-issue-return .personal-return-form{display:grid;grid-template-columns:76px 120px minmax(150px,1fr) auto;align-items:center;gap:8px;min-width:0}
.page-personal-issue-return .personal-return-form input,
.page-personal-issue-return .personal-return-form select{min-width:0;width:100%}
.page-personal-issue-return .personal-return-form button{width:auto;min-width:68px;white-space:nowrap;padding:10px 14px}
@media(max-width:900px){.page-personal-issue-return .personal-return-table{min-width:820px}.page-personal-issue-return .personal-return-form{grid-template-columns:68px 105px minmax(110px,1fr) auto}}
.universal-dock .admin-dock-panel a[href$="/personal-tools/history"]{font-size:0!important}
.universal-dock .admin-dock-panel a[href$="/personal-tools/history"]::after{content:"📜 歷史紀錄";font-size:15px!important}
@media(max-width:760px){
  .page-personal-dashboard.surface-system>main,.page-personal-tools-manage.surface-system>main,.page-personal-tools-history.surface-system>main{width:calc(100% - 24px)}
  .personal-base .mission-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
}
.loan-tool-filter{display:grid;grid-template-columns:repeat(3,minmax(180px,1fr));gap:12px;align-items:end;margin:14px 0}.loan-tool-filter label{margin:0}.loan-tool-filter #loan-tool-filter-result{grid-column:1/-1;color:#716079}.add-loan-tool-row.barcode-selected{background:#ede9f4;outline:2px solid #7b6e87;outline-offset:-2px}@media(max-width:850px){.loan-tool-filter{grid-template-columns:1fr}}

/* v1.3.87: always-visible base switch at the upper-left of management pages. */
.system-status-bar .base-switch-icon{display:grid;place-items:center;width:40px;height:40px;padding:0;color:#473c4f!important;background:#fff!important;border:1px solid #cdbdd3!important;border-radius:50%;box-shadow:none!important;font-size:19px;text-decoration:none}
.system-status-bar .base-switch-icon:hover{background:#ede9f4!important;border-color:#7b6e87!important}
.system-status-bar .approval-bell{position:relative;pointer-events:auto;flex:none}
.system-status-bar .approval-bell summary{position:relative;display:grid;place-items:center;width:40px;height:40px;list-style:none;cursor:pointer;color:#473c4f;background:#fff;border:1px solid #cdbdd3;border-radius:50%;font-size:19px}
.system-status-bar .approval-bell summary::-webkit-details-marker{display:none}
.system-status-bar .approval-bell-count{position:absolute;top:-6px;right:-8px;min-width:19px;padding:1px 4px;border-radius:12px;background:#8b626b;color:#fff;font-size:11px;line-height:18px;text-align:center}
.system-status-bar .approval-bell-panel{position:absolute;left:0;top:48px;z-index:1100;width:min(330px,calc(100vw - 24px));max-height:65vh;overflow:auto;padding:14px;background:#fff;border:1px solid #cdbdd3;border-radius:14px;box-shadow:0 12px 30px #473c4f29;color:#473c4f}
.system-status-bar .approval-bell-panel strong{display:block;margin-bottom:8px}
.system-status-bar .approval-bell-panel a{display:flex;justify-content:space-between;gap:10px;padding:9px 6px;border-top:1px solid #ede9f4;color:inherit;text-decoration:none}
.system-status-bar .approval-bell-panel a:hover{background:#f5f2fa}
.system-status-bar .approval-bell-panel p{margin:8px 0 0}
.personal-base .mission-cards{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:700px){.system-status-bar .approval-bell summary{width:34px;height:34px;font-size:17px}}
@media(max-width:700px){.system-status-bar .base-switch-icon{width:34px;height:34px;font-size:17px}}
.base-maintenance-settings{margin-top:18px}.base-maintenance-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.base-maintenance-grid article{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px;border:1px solid var(--system-line);border-radius:12px;background:#f7f5f9}.base-maintenance-grid form{margin:0}.base-maintenance-grid button{margin:0}.base-maintenance-notice{max-width:680px;margin:10vh auto;text-align:center;padding:48px}.base-choice-grid button.is-maintenance{opacity:.62;cursor:not-allowed;background:#eee!important}.base-choice-grid button.is-maintenance small{color:#8c6268;font-weight:800}@media(max-width:850px){.base-maintenance-grid{grid-template-columns:1fr}}

/* v1.3.104: calm, spacious personal-tool issue form. */
.page-personal-issue-new.surface-system{background:#f7faff!important}
.page-personal-issue-new.surface-system>main{width:92%;max-width:1440px;padding:34px 0 64px}
.page-personal-issue-new .personal-issue-page{color:#243750}
.page-personal-issue-new .personal-issue-heading{gap:20px;align-items:center;margin-bottom:24px}
.page-personal-issue-new .personal-issue-heading h1{color:#172b49;font-size:clamp(1.65rem,2.2vw,2.15rem);font-weight:600}
.page-personal-issue-new .personal-issue-heading .actions{justify-content:flex-end}
.page-personal-issue-new .personal-issue-heading .button,
.page-personal-issue-new .personal-issue-heading button{background:#fff!important;color:#36506c!important;border:1px solid #dbe4f0!important;font-weight:600}
.page-personal-issue-new .personal-issue-heading .button:hover,
.page-personal-issue-new .personal-issue-heading button:hover{background:#edf4ff!important}
.page-personal-issue-new .personal-issue-form{display:grid;gap:20px}
.page-personal-issue-new .personal-issue-card{padding:28px 30px;background:#fff!important;border:1px solid #dfe6f0!important;border-radius:20px!important;box-shadow:0 7px 22px rgba(35,60,97,.035)!important}
.page-personal-issue-new .personal-issue-card h2{margin:0 0 22px;color:#243750;font-size:1.3rem;font-weight:650}
.page-personal-issue-new .personal-issue-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 24px}
.page-personal-issue-new .personal-issue-fields .wide{grid-column:1/-1}
.page-personal-issue-new .personal-issue-card label{color:#3a506d;font-weight:600}
.page-personal-issue-new .personal-issue-card input:not([type="checkbox"]){min-height:48px;background:#fff!important;border:1px solid #d8e2ee!important;border-radius:10px!important;color:#1c3553!important}
.page-personal-issue-new .personal-issue-card input:focus-visible{outline:2px solid #7898c1;outline-offset:1px}
.page-personal-issue-new .personal-issue-card input::placeholder{color:#91a0b4}
.page-personal-issue-new .personal-issue-card-heading{display:flex;justify-content:space-between;align-items:center;gap:16px}
.page-personal-issue-new .personal-issue-card-heading h2{margin-bottom:0}
.page-personal-issue-new #personal-tool-selected-count{color:#607895;font-size:.92rem}
.page-personal-issue-new .personal-issue-search{margin:20px 0 18px}
.page-personal-issue-new .personal-issue-table{border:1px solid #e3eaf3;border-radius:12px}
.page-personal-issue-new .personal-issue-table table{min-width:650px}
.page-personal-issue-new .personal-issue-table th{padding:13px 16px;background:#f5f8fd;color:#526984;font-size:.85rem;font-weight:600;text-transform:none;border-bottom:1px solid #e3eaf3}
.page-personal-issue-new .personal-issue-table td{padding:14px 16px;color:#243750;border-bottom:1px solid #edf1f7}
.page-personal-issue-new .personal-issue-table tbody tr:last-child td{border-bottom:0}
.page-personal-issue-new .personal-issue-table tbody tr:hover{background:#f9fbff}
.page-personal-issue-new .personal-issue-table td strong{font-weight:650}
.page-personal-issue-new .personal-issue-table td small{margin-top:2px;color:#8091a6}
.page-personal-issue-new .personal-issue-table input[type="checkbox"]{width:19px;height:19px;min-height:0;accent-color:#5279a5}
.page-personal-issue-new .personal-issue-table input[type="number"]{width:100px;min-height:40px;text-align:center}
.page-personal-issue-new .personal-issue-table input[name^="note_"]{min-width:180px;width:100%}
.page-personal-issue-new .personal-issue-footer{display:flex;justify-content:flex-end}
.page-personal-issue-new .personal-issue-footer button{min-width:150px;min-height:46px;background:#365b85!important;border-color:#365b85!important;border-radius:10px!important}
.page-personal-issue-new .personal-issue-footer button:hover{background:#26496f!important}
@media(max-width:760px){
  .page-personal-issue-new.surface-system>main{width:calc(100% - 24px);padding-top:24px}
  .page-personal-issue-new .personal-issue-heading{align-items:flex-start;flex-direction:column}
  .page-personal-issue-new .personal-issue-heading .actions{justify-content:flex-start}
  .page-personal-issue-new .personal-issue-card{padding:20px 16px}
  .page-personal-issue-new .personal-issue-fields{grid-template-columns:1fr}
  .page-personal-issue-new .personal-issue-fields .wide{grid-column:auto}
  .page-personal-issue-new .personal-issue-footer button{width:100%}
}
