/* 学校管理システム 共通デザイン基盤 v27 */
:root{
  --sys-navy:#101a2d;--sys-navy-2:#17243a;--sys-navy-3:#26364f;
  --sys-bg:#edf1f5;--sys-surface:#fff;--sys-surface-2:#f7f9fb;
  --sys-line:#d5dde8;--sys-line-strong:#bdc9d8;--sys-text:#172033;--sys-muted:#64748b;
  --sys-teal:#245dcc;--sys-teal-hover:#1748aa;--sys-teal-soft:#eaf1ff;
  --sys-danger:#b42318;--sys-radius:8px;--sys-radius-lg:12px;
  --sys-shadow:0 4px 14px rgba(15,23,42,.06);--sys-shadow-raised:0 8px 22px rgba(15,23,42,.11);
  --sys-ring:0 0 0 3px rgba(36,93,204,.22);
}
html{color-scheme:light}
body.oai-system-ui-v27{margin:0;color:var(--sys-text);background:var(--sys-bg);font-family:Inter,"Noto Sans JP","Yu Gothic UI","Yu Gothic",Meiryo,system-ui,-apple-system,"Segoe UI",sans-serif;font-size:14px;line-height:1.55;-webkit-font-smoothing:antialiased}
body.oai-system-ui-v27 *,body.oai-system-ui-v27 *::before,body.oai-system-ui-v27 *::after{box-sizing:border-box}
body.oai-system-ui-v27 a{color:inherit}
body.oai-system-ui-v27 :where(h1,h2,h3){letter-spacing:-.015em}
body.oai-system-ui-v27 :where(.pm-main,.tm-page,.container,.wrap,.mmg-wrap,.ss-wrap){width:100%;max-width:1440px}
body.oai-system-ui-v27 :where(.pm-main,.tm-page){margin-inline:auto}
body.oai-system-ui-v27 :where(.pm-shell,.tm-shell,.app-shell){min-height:100vh;background:var(--sys-bg)}

/* 管理ヘッダー */
body.oai-system-ui-v27 :where(.pm-top,.topbar,.tm-topbar){position:sticky;top:0;z-index:100;background:var(--sys-navy)!important;border:0!important;border-bottom:1px solid var(--sys-navy-3)!important;box-shadow:0 2px 8px rgba(2,8,23,.15)!important;backdrop-filter:none!important}
body.oai-system-ui-v27 :where(.pm-topin,.topbar-inner,.tm-topbar__inner,.tm-topbar-inner){width:100%;max-width:1440px!important;min-height:58px;margin:0 auto!important;padding:10px 20px!important;display:flex;align-items:center;gap:14px}
body.oai-system-ui-v27 :where(.pm-brandtxt .t1,.brand-title,.tm-brand-title){color:#fff!important;font-size:16px!important;font-weight:850!important}
body.oai-system-ui-v27 :where(.pm-brandtxt .t2,.brand-sub,.tm-brand-sub){color:#a9b8ce!important;font-size:11px!important}
body.oai-system-ui-v27 :where(.pm-dot,.dot,.ss-dot,.tm-pill-dot){background:#22c55e!important;box-shadow:0 0 0 3px rgba(34,197,94,.16)!important}
body.oai-system-ui-v27 :where(.pm-mark,.db-mark,.dc-mark,.ss-logo,.mmg-logo,.logo,.tm-brand-badge){width:40px!important;height:40px!important;min-width:40px!important;padding:3px!important;border:1px solid rgba(15,23,42,.12)!important;border-radius:8px!important;background:#fff!important;box-shadow:0 2px 8px rgba(2,8,23,.16)!important;display:grid!important;place-items:center!important;overflow:hidden!important}
body.oai-system-ui-v27 :where(.pm-mark,.db-mark,.dc-mark,.ss-logo,.mmg-logo,.logo,.tm-brand-badge) svg{width:30px!important;height:30px!important;max-width:30px!important;max-height:30px!important;display:block!important}
body.oai-system-ui-v27 :where(.ss-top,.mmg-top){margin:0 0 14px!important;padding:10px 14px!important;border:1px solid var(--sys-navy-3)!important;border-radius:8px!important;background:var(--sys-navy)!important;box-shadow:var(--sys-shadow)!important}
body.oai-system-ui-v27 :where(.ss-title,.mmg-brand h1){color:#fff!important}
body.oai-system-ui-v27 :where(.ss-sub,.mmg-brand p){color:#a9b8ce!important}
body.oai-system-ui-v27 :where(.pm-userbar,.tm-topbar__right,.tm-topbar-right,.ss-right,.mmg-nav,.actions){gap:7px!important}
body.oai-system-ui-v27 :where(.pm-userbar form,.tm-topbar__right form,.tm-topbar-right form){margin:0}
body.oai-system-ui-v27 :where(.pm-top .pm-pill,.pm-top .pm-btn,.topbar .pill,.topbar .nav a,.tm-topbar .tm-btn,.tm-topbar .tm-pill,.ss-top .ss-chip,.ss-top .ss-topbtn,.mmg-top .mmg-chip){min-height:36px!important;padding:7px 11px!important;border:1px solid #34435e!important;border-radius:6px!important;background:var(--sys-navy-2)!important;color:#e7edf7!important;box-shadow:none!important;font-size:12px!important;font-weight:800!important;text-decoration:none!important;white-space:nowrap}
body.oai-system-ui-v27 :where(.pm-top .pm-pill,.topbar .pill,.tm-topbar .tm-pill,.ss-top .ss-chip){color:#b9c6d8!important}

/* 操作フィードバック */
body.oai-system-ui-v27 :where(button,[type="button"],[type="submit"],.btn,.pm-btn,.pm-pill,.cs-btn,.cs-tab,.cs-toggle,.tm-btn,.tm-tile,.ss-topbtn,.ss-item,.mmg-chip,.chip,.rec-student-item,.oai-nav-tab,.oai-nav-item){position:relative;cursor:pointer;user-select:none;touch-action:manipulation;transition:transform .10s ease,background-color .15s ease,border-color .15s ease,color .15s ease,box-shadow .15s ease,opacity .15s ease!important}
body.oai-system-ui-v27 :where(.btn,.pm-btn,.cs-btn,.tm-btn,.ss-topbtn,.mmg-chip,.chip){min-height:38px;border-radius:6px!important;font-weight:800;text-decoration:none}
body.oai-system-ui-v27 :where(.btn,.pm-btn,.tm-btn,.ss-topbtn,.mmg-chip,.chip):not(:disabled):not([aria-disabled="true"]):hover{border-color:#8faee5!important;background:#f3f7ff;color:#1748aa;box-shadow:0 4px 10px rgba(15,23,42,.09)!important;transform:translateY(-1px);text-decoration:none}
body.oai-system-ui-v27 :where(.pm-top,.topbar,.tm-topbar,.ss-top,.mmg-top) :where(button,a,.pm-btn,.pm-pill,.tm-btn,.tm-pill,.ss-topbtn,.mmg-chip):not(:disabled):hover{border-color:#60728f!important;background:#22314b!important;color:#fff!important;box-shadow:0 4px 10px rgba(0,0,0,.2)!important}
body.oai-system-ui-v27 :where(.primary,.btn-primary,.pm-primary,.tm-btn-primary,.mmg-chip.primary):not(:disabled){border-color:var(--sys-teal)!important;background:var(--sys-teal)!important;color:#fff!important;box-shadow:none!important}
body.oai-system-ui-v27 :where(.primary,.btn-primary,.pm-primary,.tm-btn-primary,.mmg-chip.primary):not(:disabled):hover{border-color:var(--sys-teal-hover)!important;background:var(--sys-teal-hover)!important;color:#fff!important;box-shadow:0 5px 12px rgba(36,93,204,.22)!important}
body.oai-system-ui-v27 :where(.danger,.btn-danger,.pm-danger):not(:disabled):hover{border-color:var(--sys-danger)!important;background:var(--sys-danger)!important;color:#fff!important}
body.oai-system-ui-v27 :where(button,a,.btn,.pm-btn,.pm-pill,.cs-btn,.cs-tab,.cs-toggle,.tm-btn,.ss-topbtn,.ss-item,.mmg-chip,.chip):not(:disabled):not([aria-disabled="true"]):active,body.oai-system-ui-v27 .is-pressing{transform:translateY(1px) scale(.98)!important;box-shadow:inset 0 2px 5px rgba(15,23,42,.2)!important;transition-duration:.04s!important}
body.oai-system-ui-v27 :where(button,a,input,select,textarea,[tabindex]):focus-visible{outline:3px solid rgba(36,93,204,.28)!important;outline-offset:2px!important}
body.oai-system-ui-v27 :where(button,.btn,.pm-btn,.cs-btn,.tm-btn):disabled,body.oai-system-ui-v27 :where([aria-disabled="true"],.is-disabled){cursor:not-allowed!important;opacity:.52!important;transform:none!important;box-shadow:none!important}
body.oai-system-ui-v27 .is-loading{pointer-events:none;opacity:.72!important}
body.oai-system-ui-v27 .is-loading::before{content:"";width:13px;height:13px;margin-right:7px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;display:inline-block;vertical-align:-2px;animation:sysSpin .7s linear infinite}
@keyframes sysSpin{to{transform:rotate(360deg)}}

/* パネルと一覧 */
body.oai-system-ui-v27 :where(.pm-card,.rec-card,.ss-card,.card,.tm-card,.mmg-card,.content-card,.panel){border:1px solid var(--sys-line)!important;border-radius:var(--sys-radius-lg)!important;background:var(--sys-surface)!important;box-shadow:var(--sys-shadow)!important;backdrop-filter:none!important}
body.oai-system-ui-v27 :where(.pm-cardin,.rec-cardin,.card-b,.card-body,.tm-card-body){padding:16px!important}
body.oai-system-ui-v27 :where(.ss-item,.tm-tile,.rec-student-item){border-radius:7px!important;border:1px solid var(--sys-line)!important;background:#fff!important;box-shadow:none!important}
body.oai-system-ui-v27 :where(.ss-item,.tm-tile,.rec-student-item):hover{border-color:#8faee5!important;background:#f3f7ff!important;box-shadow:0 3px 10px rgba(15,23,42,.07)!important;text-decoration:none}

/* 入力欄 */
body.oai-system-ui-v27 :where(input:not([type="checkbox"]):not([type="radio"]),select,textarea,.pm-input,.pm-select,.cs-input,.cs-select,.cs-textarea){min-height:40px;border:1px solid var(--sys-line-strong)!important;border-radius:6px!important;background:#fff!important;color:var(--sys-text)!important;box-shadow:none!important;font:inherit}
body.oai-system-ui-v27 textarea{min-height:78px}
body.oai-system-ui-v27 :where(input:not([type="checkbox"]):not([type="radio"]),select,textarea,.pm-input,.pm-select,.cs-input,.cs-select,.cs-textarea):hover{border-color:#8fa0b4!important}
body.oai-system-ui-v27 :where(input:not([type="checkbox"]):not([type="radio"]),select,textarea,.pm-input,.pm-select,.cs-input,.cs-select,.cs-textarea):focus{outline:none!important;border-color:var(--sys-teal)!important;box-shadow:var(--sys-ring)!important}
body.oai-system-ui-v27 :where(input,select,textarea):disabled{background:#eef2f6!important;color:#8995a5!important;cursor:not-allowed}
body.oai-system-ui-v27 :where(label,.pm-label,.cs-field>span){font-weight:750;color:#42526a}

/* 表 */
body.oai-system-ui-v27 :where(.table-wrap,.rec-table-wrap){overflow:auto;border:1px solid var(--sys-line)!important;border-radius:8px!important;background:#fff}
body.oai-system-ui-v27 table{border-collapse:collapse;background:#fff}
body.oai-system-ui-v27 :where(table th,.table th,.rec-table th){padding:10px 12px!important;border-bottom:1px solid var(--sys-line)!important;background:#eef2f6!important;color:#42526a!important;font-size:11px!important;font-weight:850!important;letter-spacing:.02em}
body.oai-system-ui-v27 :where(table td,.table td,.rec-table td){padding:11px 12px!important;border-bottom:1px solid #e6ebf1!important}
body.oai-system-ui-v27 tbody tr:hover td{background:#f3f7ff}
body.oai-system-ui-v27 :where(.flash,.pm-note,.ss-alert,.tm-alert){border-radius:7px!important;box-shadow:none!important}

/* 業務メニュー */
body.oai-system-ui-v27 .oai-menu-btn{animation:none!important;box-shadow:none!important}
body.oai-system-ui-v27 .oai-menu-btn::after{display:none!important}
#oai-nav-overlay{font-family:Inter,"Noto Sans JP","Yu Gothic UI",Meiryo,system-ui,sans-serif!important}
#oai-nav-overlay .oai-nav-backdrop{background:rgba(2,8,23,.56)!important;backdrop-filter:blur(2px)!important}
#oai-nav-overlay .oai-nav-drawer{top:0!important;right:0!important;bottom:0!important;width:min(820px,94vw)!important;border:0!important;border-left:1px solid #cbd5e1!important;border-radius:0!important;background:#edf1f5!important;box-shadow:-12px 0 34px rgba(2,8,23,.25)!important}
#oai-nav-overlay .oai-nav-head{padding:14px 18px!important;border-bottom:1px solid #293a56!important;background:#101a2d!important}
#oai-nav-overlay .oai-nav-title{font-size:19px!important;color:#fff!important}
#oai-nav-overlay .oai-nav-subtitle{color:#a9b8ce!important;font-weight:650!important}
#oai-nav-overlay .oai-nav-close{min-height:36px;padding:7px 11px!important;border:1px solid #41516b!important;border-radius:6px!important;background:#17243a!important;color:#fff!important;box-shadow:none!important}
#oai-nav-overlay .oai-nav-close:hover{background:#26364f!important;border-color:#667995!important}
#oai-nav-overlay .oai-nav-head-main{min-width:0}
#oai-nav-overlay .oai-nav-head-actions{display:flex;align-items:center;gap:8px;margin-left:auto}
#oai-nav-overlay .oai-nav-home{min-height:36px;padding:7px 13px!important;border:1px solid #5f7fb8!important;border-radius:6px!important;background:#2563eb!important;color:#fff!important;text-decoration:none!important;font-weight:900!important;display:inline-flex;align-items:center;justify-content:center;box-shadow:none!important}
#oai-nav-overlay .oai-nav-home:hover{background:#1d4ed8!important;border-color:#93b4ff!important}
#oai-nav-overlay .oai-nav-search-wrap{padding:11px 14px!important;border-bottom:1px solid #d5dde8!important;background:#fff!important}
#oai-nav-overlay .oai-nav-search{height:40px!important;border:1px solid #bdc9d8!important;border-radius:6px!important;box-shadow:none!important}
#oai-nav-overlay .oai-nav-search:focus{border-color:#245dcc!important;box-shadow:0 0 0 3px rgba(36,93,204,.16)!important}
#oai-nav-overlay .oai-nav-body{grid-template-columns:205px minmax(0,1fr)!important;gap:0!important;padding:0!important}
#oai-nav-overlay .oai-nav-tabs{gap:4px!important;padding:12px!important;border-right:1px solid #d5dde8;background:#e6ebf1}
#oai-nav-overlay .oai-nav-tab{min-height:44px!important;padding:9px 10px!important;border:1px solid transparent!important;border-radius:6px!important;background:transparent!important;color:#34445b!important;box-shadow:none!important}
#oai-nav-overlay .oai-nav-tab:hover{border-color:#c8d2df!important;background:#f7f9fb!important;transform:none!important}
#oai-nav-overlay .oai-nav-tab.is-active{border-color:#245dcc!important;background:#245dcc!important;color:#fff!important;box-shadow:none!important}
#oai-nav-overlay .oai-nav-tab-count{min-width:22px!important;height:22px!important;border-radius:4px!important;background:#d9e1ea!important;color:#43546a!important}
#oai-nav-overlay .oai-nav-tab.is-active .oai-nav-tab-count{background:rgba(255,255,255,.2)!important;color:#fff!important}
#oai-nav-overlay .oai-nav-content{padding:14px!important;background:#f5f7f9}
#oai-nav-overlay .oai-nav-panel-title{margin:0 0 8px!important;color:#42526a!important;font-size:12px!important}
#oai-nav-overlay .oai-nav-panel-list{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
#oai-nav-overlay .oai-nav-item{min-height:72px!important;padding:11px!important;border:1px solid #d5dde8!important;border-radius:7px!important;background:#fff!important;box-shadow:none!important}
#oai-nav-overlay .oai-nav-item:hover{border-color:#8faee5!important;background:#f3f7ff!important;box-shadow:0 3px 9px rgba(15,23,42,.06)!important;transform:none!important}
#oai-nav-overlay .oai-nav-icon{width:36px!important;height:36px!important;border:0!important;border-radius:6px!important;background:#eaf1ff!important;color:#245dcc!important}
#oai-nav-overlay .oai-nav-label{font-size:14px!important;color:#172033!important}
#oai-nav-overlay .oai-nav-desc{margin-top:2px!important;color:#64748b!important;font-size:11px!important;font-weight:650!important}
#oai-nav-overlay .oai-nav-arrow{color:#245dcc!important;font-size:16px!important}

/* v29 default blue theme. Closely related workflow pages may keep their own scoped accent. */
body.oai-system-ui-v27 :where(.dc-btn.primary,.dc-btn.blue){border-color:#245dcc!important;background:#245dcc!important;color:#fff!important}
body.oai-system-ui-v27 :where(.dc-btn.primary,.dc-btn.blue):hover{border-color:#1748aa!important;background:#1748aa!important}
body.oai-system-ui-v27 :where(.dc-kicker,.dc-title,.dc-rule-name,.dc-side-title){color:#163f91!important}
body.oai-system-ui-v27 .dc-rule-state.on{border-color:#9db8eb!important;background:#edf3ff!important;color:#1748aa!important}
body.oai-system-ui-v27 .dc-switch input:checked + .dc-slider{background:#245dcc!important}
body.oai-system-ui-v27 .dc-check input,body.oai-system-ui-v27 .dc-rule input[type="checkbox"]{accent-color:#245dcc!important}
#oai-nav-overlay .oai-nav-item.is-disabled{background:#eef2f5!important}
body.oai-system-ui-v27 :where(.rec-card,.rec-table-wrap,.rec-student-results,.ss-logo,.ss-item,.tm-tile,.tm-brand-badge,.mmg-logo,.logo,.badge){border-radius:8px!important}
body.oai-system-ui-v27 :where(.footer,.tm-footer){color:#7b8797}

@media(max-width:900px){
  body.oai-system-ui-v27 :where(.pm-topin,.topbar-inner,.tm-topbar__inner,.tm-topbar-inner){align-items:stretch;flex-direction:column;padding:9px 12px!important;gap:7px}
  body.oai-system-ui-v27 :where(.pm-userbar,.nav,.tm-topbar__right,.tm-topbar-right){width:100%;justify-content:flex-start!important;flex-wrap:nowrap!important;overflow-x:auto;padding-bottom:2px;scrollbar-width:none}
  body.oai-system-ui-v27 :where(.pm-userbar,.nav,.tm-topbar__right,.tm-topbar-right)::-webkit-scrollbar{display:none}
  #oai-nav-overlay .oai-nav-drawer{width:100vw!important}
  #oai-nav-overlay .oai-nav-body{grid-template-columns:1fr!important;grid-template-rows:auto minmax(0,1fr)!important}
  #oai-nav-overlay .oai-nav-tabs{flex-direction:row!important;overflow-x:auto!important;border-right:0!important;border-bottom:1px solid #d5dde8!important;padding:8px!important}
  #oai-nav-overlay .oai-nav-tab{flex:0 0 auto!important}
  #oai-nav-overlay .oai-nav-tab-count{display:none!important}
}
@media(max-width:620px){
  body.oai-system-ui-v27{font-size:13px}
  body.oai-system-ui-v27 :where(.pm-main,.tm-page,.container,.wrap,.mmg-wrap,.ss-wrap){padding-left:10px!important;padding-right:10px!important}
  #oai-nav-overlay .oai-nav-panel-list{grid-template-columns:1fr!important}
  #oai-nav-overlay .oai-nav-content{padding:9px!important}
}
@media(prefers-reduced-motion:reduce){body.oai-system-ui-v27 *,#oai-nav-overlay *{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}
@media print{body.oai-system-ui-v27{background:#fff}body.oai-system-ui-v27 :where(.pm-top,.topbar,.tm-topbar,.ss-top,.mmg-top),#oai-nav-overlay{display:none!important}body.oai-system-ui-v27 :where(.pm-card,.rec-card,.ss-card,.card,.tm-card,.mmg-card){box-shadow:none!important}}
