:root {
  --gutter: clamp(14px, 3vw, 56px);
  /* 管理画面 */
  --bg: #f5f6f7;
  --card: #fff;
  --ink: #111827;
  --ink-2: #374151;
  --muted: #6b7280;
  --faint: #9ca3af;
  --line: #e5e7eb;
  --line-2: #f0f1f3;
  --teal: #0d9488;
  --teal-d: #0b7a70;
  --teal-l: #e6f6f4;
  --amber: #f59e0b;
  --amber-l: #fff6e5;
  --green: #16a34a;
  --green-l: #e8f7ee;
  --red: #dc2626;
  --red-l: #fdecec;
  --blue-l: #eef4ff;
  /* タブレット */
  --k-bg: #0e1113;
  --k-card: #181c20;
  --k-card-2: #20262b;
  --k-ink: #f3f4f6;
  --k-muted: #8a939d;
  --k-line: #2a3137;
}
* { box-sizing: border-box; }
html, body { margin: 0; overflow-x: clip; }
body { font-family: "IBM Plex Sans JP", "Hiragino Sans", sans-serif; color: var(--ink); background: var(--bg); font-size: 15.5px; line-height: 1.75; letter-spacing: .02em; -webkit-font-smoothing: antialiased; touch-action: manipulation; }
h1, h2, h3, h4 { margin: 0; line-height: 1.5; letter-spacing: .04em; font-weight: 700; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
input, select, textarea { font-size: 16px; }
[hidden] { display: none !important; }
.t { font-feature-settings: "tnum" 1; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.strip { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 12px; padding: 7px var(--gutter); background: #fff; border-bottom: 1px solid var(--line); font-size: 13px; }
.strip-tag { background: var(--ink); color: #fff; font-weight: 700; font-size: 11px; letter-spacing: .12em; padding: 1px 8px; border-radius: 4px; }
.strip-text { color: var(--muted); }
.mode { margin-left: auto; display: flex; gap: 4px; background: #f1f2f4; border-radius: 10px; padding: 3px; }
.mode button { border: none; background: none; padding: 5px 14px; border-radius: 8px; font-weight: 600; font-size: 13.5px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.mode button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.1); }
@media (max-width: 820px) { .strip-text { display: none; } }

/* =============== タブレット打刻 =============== */
.kstage { position: relative; min-height: calc(100vh - 56px); display: grid; place-items: center; padding: clamp(10px, 3vw, 48px) clamp(10px, 3vw, 48px) clamp(44px, 5vw, 64px); overflow: hidden; background: #2b2f33; }
.kstage > img.bgp { position: absolute; inset: -20px; width: calc(100% + 40px); height: calc(100% + 40px); object-fit: cover; filter: blur(14px) brightness(.55) saturate(1.1); }
.ipad { position: relative; z-index: 2; width: min(1320px, 100%); aspect-ratio: 1.43; max-height: calc(100vh - 172px); min-height: 600px; border-radius: 34px; background: #050607; padding: 14px; box-shadow: 0 40px 90px rgba(0,0,0,.5), inset 0 0 0 2px #24292e; }
.kiosk { width: 100%; height: 100%; border-radius: 22px; overflow: hidden; background: var(--k-bg); color: var(--k-ink); display: grid; grid-template-columns: clamp(270px, 29%, 380px) minmax(0, 1fr); position: relative; }
.k-peek { position: absolute; z-index: 3; bottom: clamp(10px, 1.6vw, 18px); left: 50%; transform: translateX(-50%); border: 1px solid rgba(255,255,255,.28); background: rgba(10,12,14,.55); backdrop-filter: blur(8px); color: #fff; border-radius: 99px; padding: 6px 18px; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; display: flex; gap: 8px; align-items: center; }
.k-peek span { color: #f5b743; }
.k-peek:hover { background: rgba(10,12,14,.75); }

.k-side { background: #090b0d; border-right: 1px solid var(--k-line); padding: clamp(14px, 1.6vw, 22px); display: flex; flex-direction: column; gap: clamp(12px, 1.4vw, 18px); min-height: 0; overflow: hidden; }
.k-cover { position: relative; height: clamp(96px, 13vh, 150px); border-radius: 16px; overflow: hidden; flex: none; }
.k-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.k-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.82), rgba(0,0,0,.35) 60%, rgba(0,0,0,0)); }
.k-cover div { position: absolute; left: 14px; bottom: 9px; z-index: 2; color: #fff; }
.k-cover small { display: block; font-size: 13px; color: #f3f4f6; line-height: 1.3; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.k-cover b { font-size: 22px; line-height: 1.35; letter-spacing: .06em; }
.k-clock .time { font-size: clamp(46px, 5.2vw, 78px); font-weight: 600; line-height: 1; letter-spacing: .02em; font-feature-settings: "tnum" 1; }
.k-clock .time small { font-size: .4em; color: var(--k-muted); margin-left: 6px; }
.k-clock .date { color: var(--k-muted); font-size: 14px; margin-top: 8px; }
.k-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.k-stats div { background: var(--k-card); border: 1px solid var(--k-line); border-radius: 12px; padding: 7px 12px; }
.k-stats b { display: block; font-size: 26px; line-height: 1.25; font-feature-settings: "tnum" 1; }
.k-stats span { font-size: 13px; color: var(--k-muted); }
.k-stats .work b { color: #4ade80; }
.k-stats .brk b { color: #fbbf24; }
.k-feed { flex: 1; min-height: 0; overflow-y: auto; }
.k-feed h4 { font-size: 13px; color: var(--k-muted); font-weight: 600; margin-bottom: 4px; }
.k-feed .empty { color: var(--k-muted); font-size: 14px; margin: 6px 0; }
.ev { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--k-line); }
.ev img { width: 32px; height: 32px; border-radius: 9px; object-fit: cover; flex: none; }
.ev span { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; font-size: 14px; }
.ev b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev i { font-style: normal; font-size: 12px; font-weight: 700; padding: 0 8px; border-radius: 99px; white-space: nowrap; line-height: 1.7; }
.ev i.in { background: #0f3a22; color: #4ade80; }
.ev i.bs, .ev i.be { background: #3d2a07; color: #fbbf24; }
.ev i.out { background: #23292e; color: #cbd5e1; }
.ev time { font-size: 14px; font-weight: 600; font-feature-settings: "tnum" 1; }

.k-main { min-height: 0; overflow-y: auto; padding: clamp(14px, 1.6vw, 22px) clamp(16px, 2vw, 26px) clamp(14px, 1.6vw, 22px); display: flex; flex-direction: column; gap: clamp(12px, 1.3vw, 16px); }
.k-store { display: flex; gap: 8px; flex-wrap: wrap; }
.k-store button { display: flex; align-items: center; gap: 8px; border: 1px solid var(--k-line); background: var(--k-card); color: var(--k-muted); border-radius: 12px; padding: 5px 12px 5px 5px; cursor: pointer; font-weight: 600; font-size: 14px; }
.k-store button img { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; }
.k-store button.on { color: #fff; border-color: #f5b743; background: #2a2416; }
.k-hint { font-size: clamp(19px, 1.8vw, 25px); display: flex; align-items: center; gap: 10px; line-height: 1.4; }
.k-hint svg { width: 1.2em; height: 1.2em; color: #f5b743; stroke-width: 1.8; }
.k-back { align-self: flex-start; background: none; border: 1px solid #3a434a; color: #c9d1d9; border-radius: 12px; padding: 8px 16px; cursor: pointer; font-size: 14.5px; }
.k-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(140px, 12.5vw, 196px), 1fr)); gap: clamp(10px, 1.1vw, 14px); }
.k-helpcard { border: 2px dashed #3a434a; background: transparent; align-content: center; justify-items: center; text-align: center; gap: 4px; color: #d1d5db; min-height: 180px; }
.k-helpcard:hover { border-color: #f5b743; }
.k-helpcard svg.i { width: 40px; height: 40px; stroke-width: 1.5; color: #f5b743; margin-bottom: 6px; }
.k-helpcard span { font-size: 13px; color: var(--k-muted); }

.k-gantt { flex: 1 0 auto; min-height: 190px; background: var(--k-card); border: 1px solid var(--k-line); border-radius: 18px; padding: 12px 16px 10px; display: flex; flex-direction: column; }
.g-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.g-head h4 { font-size: 15px; }
.g-leg { display: flex; gap: 14px; font-size: 13px; color: var(--k-muted); }
.g-leg span { display: inline-flex; align-items: center; gap: 6px; }
.g-leg i { width: 16px; height: 10px; border-radius: 3px; display: inline-block; }
.g-body { --nmw: clamp(104px, 9vw, 132px); position: relative; flex: 1; display: grid; grid-auto-rows: minmax(34px, 1fr); align-items: center; }
.g-row { display: grid; grid-template-columns: var(--nmw) 1fr; align-items: center; }
.g-nm { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; }
.g-nm img { width: 26px; height: 26px; border-radius: 7px; object-fit: cover; flex: none; }
.g-track { position: relative; height: 22px; border-radius: 6px; background-color: #111518; background-image: repeating-linear-gradient(to right, #262d33 0 1px, transparent 1px 18.75%); }
.g-track i { position: absolute; top: 0; bottom: 0; border-radius: 6px; }
.g-track i.plan, .g-leg i.plan { box-shadow: inset 0 0 0 1.5px #55606a; background: transparent; }
.g-track i.act, .g-leg i.act { background: #0d9488; }
.g-track i.act.live { background: linear-gradient(90deg, #0d9488, #2dd4bf); }
.g-track i.br, .g-leg i.br { background: repeating-linear-gradient(135deg, #fbbf24 0 4px, #b7861a 4px 8px); top: 4px; bottom: 4px; border-radius: 4px; }
.g-track em { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 12.5px; color: var(--k-muted); }
.g-axis { display: grid; grid-template-columns: var(--nmw) 1fr; height: 22px; }
.g-axis div { position: relative; }
.g-axis b { position: absolute; top: 2px; transform: translateX(-50%); font-size: 12px; font-weight: 500; color: var(--k-muted); font-feature-settings: "tnum" 1; }
.g-axis b:first-child { transform: none; }
.g-axis b.near { visibility: hidden; }
.g-now { position: absolute; top: -4px; bottom: 20px; left: calc(var(--nmw) + (100% - var(--nmw)) * var(--x)); width: 2px; background: #f87171; border-radius: 2px; pointer-events: none; }
.g-now span { position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%); background: #f87171; color: #1a0b0b; font-size: 11.5px; font-weight: 700; padding: 0 6px; border-radius: 99px; line-height: 1.6; font-feature-settings: "tnum" 1; }

@media (max-width: 760px) {
  .kstage { padding: 0; display: block; }
  .ipad { aspect-ratio: auto; height: auto; min-height: calc(100svh - 43px); max-height: none; border-radius: 0; padding: 0; box-shadow: none; }
  .kiosk { border-radius: 0; display: flex; flex-direction: column; min-height: calc(100svh - 43px); }
  .k-side { border-right: none; border-bottom: 1px solid var(--k-line); display: grid; grid-template-columns: 1fr; padding: 14px 16px; overflow: visible; }
  .k-cover, .k-feed { display: none; }
  .k-main { overflow: visible; padding: 14px 16px 76px; }
  .k-grid { grid-template-columns: repeat(2, 1fr); }
  .k-helpcard { min-height: 0; }
  .k-peek { display: none; }
  .k-main { padding-bottom: 28px; }
  .k-store { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 2px; scrollbar-width: none; }
  .k-store button { flex: none; font-size: 13.5px; }
  .k-hint { font-size: 17px; }
  .g-axis b.odd { display: none; }
  .ipad, .kiosk { min-height: calc(100svh - 56px); }
  .g-body { --nmw: 96px; }
  .g-nm { font-size: 12.5px; }
  .g-nm img { display: none; }
}
.k-card { position: relative; background: var(--k-card); border: 1px solid var(--k-line); border-radius: 18px; padding: 12px; cursor: pointer; text-align: left; color: inherit; display: grid; gap: 10px; transition: transform .1s, border-color .15s; }
.k-card:hover { border-color: #3d464e; }
.k-card:active { transform: scale(.98); }
.k-card .ph { width: 100%; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #2a2f34; position: relative; }
.k-card .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.k-card.done .ph img { filter: grayscale(.8) brightness(.7); }
.k-card b { font-size: 16px; display: block; line-height: 1.4; }
.k-card .sub { font-size: 12.5px; color: var(--k-muted); }
.badge { position: absolute; left: 10px; top: 10px; z-index: 2; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 99px; display: inline-flex; align-items: center; gap: 5px; backdrop-filter: none; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.work { background: #0f3a22; color: #4ade80; }
.badge.brk { background: #3d2a07; color: #fbbf24; }
.badge.done { background: #23292e; color: #9aa4ae; }
.badge.none { background: rgba(14,17,19,.75); color: #d1d5db; }
.badge.help { top: auto; bottom: 10px; background: #1e2b45; color: #93c5fd; }
.badge.help::before { display: none; }
.k-modal { position: absolute; inset: 0; z-index: 10; background: rgba(5,6,7,.72); display: grid; place-items: center; padding: 20px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.k-sheet { width: min(620px, 100%); background: var(--k-card); border: 1px solid var(--k-line); border-radius: 26px; padding: clamp(18px, 2.4vw, 30px); display: grid; gap: 18px; }
.k-who { display: flex; gap: 16px; align-items: center; }
.k-who img { width: 84px; height: 84px; border-radius: 18px; object-fit: cover; }
.k-who b { font-size: 24px; display: block; line-height: 1.35; }
.k-who .sub { color: var(--k-muted); font-size: 14px; }
.k-who .close { margin-left: auto; align-self: flex-start; background: var(--k-card-2); border: none; color: var(--k-muted); width: 40px; height: 40px; border-radius: 12px; cursor: pointer; display: grid; place-items: center; }
.k-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.k-act { height: clamp(78px, 9vw, 104px); border-radius: 18px; border: none; cursor: pointer; font-size: clamp(18px, 1.6vw, 22px); font-weight: 700; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #0e1113; }
.k-act small { font-size: 12.5px; font-weight: 500; opacity: .75; }
.k-act.in { background: #4ade80; }
.k-act.bs { background: #fbbf24; }
.k-act.be { background: #fcd34d; }
.k-act.out { background: #e5e7eb; }
.k-act[disabled] { background: var(--k-card-2); color: #4b545c; cursor: not-allowed; }
.k-log { display: grid; gap: 6px; font-size: 13.5px; color: var(--k-muted); }
.k-log div { display: flex; justify-content: space-between; border-top: 1px solid var(--k-line); padding-top: 6px; }
.k-log b { color: var(--k-ink); font-weight: 600; }
.k-done { text-align: center; padding: 18px 10px; }
.k-done .big { width: 96px; height: 96px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: #4ade80; color: #0e1113; animation: pop .35s cubic-bezier(.2,1.6,.4,1); }
.k-done .big svg { width: 48px; height: 48px; stroke-width: 2.6; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.k-done h3 { font-size: 24px; }
.k-done p { margin: 6px 0 0; color: var(--k-muted); font-size: 16px; }
.k-done .time { font-size: 46px; font-weight: 600; line-height: 1.2; margin-top: 4px; font-feature-settings: "tnum" 1; }

/* =============== 管理画面 =============== */
.admin { padding: 18px var(--gutter) 70px; }
.a-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.a-brand { display: flex; align-items: center; gap: 10px; }
.a-brand svg { width: 34px; height: 34px; }
.a-brand b { font-size: 18px; letter-spacing: .06em; display: block; line-height: 1.2; }
.a-brand small { font-size: 12px; color: var(--muted); }
.a-tabs { display: flex; gap: 2px; margin-left: 18px; flex-wrap: wrap; }
.a-tabs button { border: none; background: none; padding: 8px 14px; border-radius: 9px; font-weight: 600; font-size: 14.5px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.a-tabs button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 0 0 1px var(--line); }
.a-role { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); }
.a-role select { border: 1px solid var(--line); border-radius: 9px; padding: 6px 10px; background: #fff; font-size: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.btn { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; color: var(--ink-2); }
.btn:hover { background: #fafafa; }
.btn.primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn.primary:hover { background: var(--teal-d); }
.btn.sm { height: 32px; padding: 0 10px; font-size: 13px; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; padding: 1px 9px; border-radius: 99px; white-space: nowrap; background: #f1f2f4; color: var(--ink-2); }
.pill.work { background: var(--green-l); color: var(--green); }
.pill.brk { background: var(--amber-l); color: #b45309; }
.pill.done { background: #f1f2f4; color: var(--muted); }
.pill.none { background: #fff; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.pill.late { background: var(--red-l); color: var(--red); }
.pill.teal { background: var(--teal-l); color: var(--teal-d); }
.face { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; flex: none; }
.face.lg { width: 64px; height: 64px; border-radius: 14px; }

.today-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.store-col { overflow: hidden; }
.store-col .cover { height: 110px; position: relative; }
.store-col .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.store-col .cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.72), rgba(0,0,0,0) 70%); }
.store-col .cover h3 { position: absolute; left: 14px; bottom: 9px; color: #fff; z-index: 2; font-size: 17px; }
.store-col .cover span { position: absolute; right: 12px; bottom: 11px; z-index: 2; color: #fff; font-size: 13px; font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.srow { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-top: 1px solid var(--line-2); }
.srow .nm { flex: 1; min-width: 0; }
.srow .nm b { display: block; font-size: 14.5px; line-height: 1.4; }
.srow .nm span { font-size: 12.5px; color: var(--muted); white-space: nowrap; display: block; overflow: hidden; text-overflow: ellipsis; }
.srow .tm { font-size: 13px; color: var(--muted); text-align: right; white-space: nowrap; }
.alerts { margin-bottom: 14px; display: grid; gap: 8px; }
.alert { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--amber-l); color: #92400e; font-size: 14px; border: 1px solid #fde4b5; }
.alert.red { background: var(--red-l); color: #991b1b; border-color: #f8cfcf; }
.alert b { color: inherit; }

.book { display: grid; grid-template-columns: clamp(250px, 20vw, 330px) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 980px) { .book { grid-template-columns: 1fr; } }
.staff-list { padding: 8px; position: sticky; top: 56px; max-height: calc(100vh - 80px); overflow: auto; }
.staff-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; cursor: pointer; }
.staff-item:hover { background: #f8f9fa; }
.staff-item.on { background: var(--teal-l); }
.staff-item b { display: block; font-size: 14.5px; line-height: 1.4; }
.staff-item span { font-size: 12.5px; color: var(--muted); }
.staff-group { font-size: 12px; font-weight: 700; color: var(--faint); padding: 10px 8px 4px; letter-spacing: .06em; }
.sheet { padding: 0; overflow: hidden; }
.sheet-head { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.sheet-head h2 { font-size: 20px; }
.sheet-head .sub { color: var(--muted); font-size: 13.5px; }
.sheet-head .acts { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.month { display: flex; align-items: center; gap: 4px; font-weight: 700; }
.sums { display: grid; grid-template-columns: repeat(6, 1fr); border-bottom: 1px solid var(--line); }
.sum { padding: 12px 16px; border-right: 1px solid var(--line-2); }
.sum:last-child { border-right: none; }
.sum .k { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.sum .v { font-size: 22px; font-weight: 700; line-height: 1.35; font-feature-settings: "tnum" 1; }
.sum .v small { font-size: 12.5px; color: var(--muted); margin-left: 2px; font-weight: 500; }
@media (max-width: 900px) { .sums { grid-template-columns: repeat(3, 1fr); } .sum { border-bottom: 1px solid var(--line-2); } }
.tblwrap { overflow-x: auto; }
table.att { width: 100%; border-collapse: collapse; font-size: 14px; font-feature-settings: "tnum" 1; min-width: 860px; }
table.att th { position: sticky; top: 0; background: #fafafa; text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.att td { padding: 8px 12px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
table.att tr.sat td { background: #f6f9ff; }
table.att tr.sun td { background: #fff7f7; }
table.att tr.today td { background: #effaf8; }
table.att tr.today td:first-child { box-shadow: inset 3px 0 0 var(--teal); font-weight: 700; }
table.att tr.future td { color: var(--faint); }
table.att td.r { text-align: right; }
table.att .edited { color: var(--teal-d); font-size: 12px; font-weight: 600; cursor: help; }
table.att .warn { color: var(--red); font-weight: 600; }
table.att .edit { border: none; background: none; color: var(--teal); cursor: pointer; font-weight: 600; font-size: 13px; padding: 2px 6px; border-radius: 6px; }
table.att .edit:hover { background: var(--teal-l); }
.modal-back { position: fixed; inset: 0; z-index: 60; background: rgba(17,24,39,.4); display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.modal { width: min(560px, 100%); background: #fff; border-radius: 18px; padding: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.25); max-height: 90vh; overflow: auto; }
.modal h3 { font-size: 18px; margin-bottom: 4px; }
.modal .sub { color: var(--muted); font-size: 13.5px; margin-bottom: 14px; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.form label.full { grid-column: 1 / -1; }
.form input, .form select, .form textarea { border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; font-weight: 400; outline: none; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-l); }
.modal .acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.hist { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; font-size: 13px; color: var(--muted); display: grid; gap: 6px; }
.hist b { color: var(--ink); }
.err { color: var(--red); font-size: 13px; }

.chart { padding: 18px; }
.bars { display: grid; gap: 14px; }
.brow { display: grid; grid-template-columns: 140px 1fr 110px; gap: 12px; align-items: center; }
.brow .nm { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.brow .nm img { width: 36px; height: 36px; border-radius: 9px; object-fit: cover; }
.track { height: 26px; border-radius: 8px; background: #f1f2f4; overflow: hidden; display: flex; }
.track i { display: block; height: 100%; }
.brow .v { text-align: right; font-weight: 700; font-feature-settings: "tnum" 1; }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--muted); margin: 14px 0 0; flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
table.list { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.list th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.list td { padding: 10px 14px; border-bottom: 1px solid var(--line-2); }
.who { display: flex; align-items: center; gap: 10px; }
.who b { display: block; line-height: 1.4; white-space: nowrap; }
.who span { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.sec-title { font-size: 16px; margin: 0 0 10px; display: flex; align-items: baseline; gap: 10px; }
.sec-title span { font-size: 13px; color: var(--muted); font-weight: 400; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 99; background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 12px; font-size: 14.5px; font-weight: 600; display: flex; gap: 8px; align-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.2); }
.toast svg { color: #5eead4; }

@media (max-width: 640px) {
  .admin { padding-top: 14px; }
  .a-head { gap: 10px; }
  .a-tabs { order: 3; width: calc(100% + 2 * var(--gutter)); margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter); flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .a-tabs button { flex: none; }
  .a-role { margin-left: auto; }
  .a-role select { max-width: 190px; }
  .sec-title { flex-direction: column; gap: 0; }
  .alert { flex-wrap: wrap; }
  .staff-list { position: static; max-height: none; display: flex; gap: 4px; overflow-x: auto; padding: 8px; scrollbar-width: none; }
  .staff-group { display: none; }
  .staff-item { flex: none; flex-direction: column; width: 78px; gap: 4px; padding: 8px 4px; text-align: center; }
  .staff-item b { font-size: 12.5px; white-space: nowrap; }
  .staff-item span { display: none; }
}
