@font-face { font-family: 'BCSans'; src: url('../fonts/2023_01_01_BCSans-Regular_2f.woff2') format('woff2'); font-weight: 400; font-style: normal; }
@font-face { font-family: 'BCSans'; src: url('../fonts/2023_01_01_BCSans-Italic_2f.woff2') format('woff2'); font-weight: 400; font-style: italic; }
@font-face { font-family: 'BCSans'; src: url('../fonts/2023_01_01_BCSans-Bold_2f.woff2') format('woff2'); font-weight: 700; font-style: normal; }
@font-face { font-family: 'BCSans'; src: url('../fonts/2023_01_01_BCSans-BoldItalic_2f.woff2') format('woff2'); font-weight: 700; font-style: italic; }

:root {
  --bg: #f2f2f2; --surface: #fff; --border: #d6d6d6; --border2: #bcbbbb;
  --text: #2d2d2d; --text2: #474543; --text3: #9f9d9c;
  --primary: #013366; --primary-hover: #1a5a96; --link: #255a90;
  --green: #2e8540; --green-bg: #dff0d8; --green-text: #1d4d28; --green-border: #a8d5a2;
  --yellow: #c8a400; --yellow-bg: #fff7cc; --yellow-text: #6b5500; --yellow-border: #ffe680;
  --red: #ce3e39; --red-bg: #f9dedd; --red-text: #7a1b18; --red-border: #f4abaa;
  --blue-bg: #e8f0f8; --blue-text: #013366;
  --radius: 14px; --radius-sm: 8px; --radius-pill: 999px;
  --shadow: 0 1px 3px rgba(0,0,0,0.1); --shadow-md: 0 4px 12px rgba(0,0,0,0.12);
  --focus-ring: 0 0 0 3px rgba(37,90,144,0.4);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'BCSans','BC Sans',sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; font-size: 13px; line-height: 1.5; }

/* ── ACCESSIBILITY ── */
.skip-link { position: absolute; top: -100px; left: 8px; background: var(--primary); color: #fff; padding: 8px 16px; border-radius: 0 0 var(--radius-sm) var(--radius-sm); font-weight: 700; font-size: 13px; z-index: 9999; text-decoration: none; }
.skip-link:focus { top: 0; }
*:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; box-shadow: var(--focus-ring); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ── HEADER ── */
.header { background: #013366; padding: 12px 24px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; position: sticky; top: 0; z-index: 200; min-height: 72px; gap: 12px; }
.header-left { display: flex; align-items: center; }
.header-center { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.header-title { font-size: 20px; font-weight: 700; color: #fff; letter-spacing: -0.02em; text-align: center; }
.header-week { font-size: 12px; color: rgba(255,255,255,0.75); text-align: center; }
.header-right { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.hbtn { font-size: 12px; font-weight: 600; padding: 5px 14px; border-radius: var(--radius-pill); border: 1px solid rgba(255,255,255,0.5); background: rgba(255,255,255,0.12); color: #fff; cursor: pointer; font-family: 'BCSans',sans-serif; transition: all 0.15s; white-space: nowrap; }
.hbtn:hover { background: rgba(255,255,255,0.25); border-color: white; }
.hbtn[aria-pressed='true'] { background: #fff; color: #013366; border-color: #fff; font-weight: 700; }
.hbtn.danger { border-color: rgba(255,150,150,0.6); color: rgba(255,200,200,1); }
.hbtn.danger:hover { background: rgba(255,100,100,0.2); }

/* ── MAIN ── */
.main { padding: 24px 28px; max-width: 1600px; margin: 0 auto; }
.section-heading { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text2); margin-bottom: 10px; padding-left: 2px; }

/* ── SUMMARY ── */
.summary { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0; margin-bottom: 20px; box-shadow: var(--shadow); overflow: hidden; }
.summary-top { display: grid; grid-template-columns: 160px 1px 1fr 1px 1fr; gap: 0; align-items: start; }
.summary-bottom { border-top: 1px solid var(--border); padding: 14px 20px; background: var(--bg); }
.summary-meetings { border-top: 1px solid var(--border); padding: 12px 20px; }
.summary-cell { padding: 16px 20px; }
.summary-divider { background: var(--border); align-self: stretch; }
.summary-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text3); margin-bottom: 8px; }
.summary-news-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text3); margin-bottom: 6px; }
.overall-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 6px 14px; border-radius: var(--radius-pill); border: 1px solid; width: fit-content; margin-bottom: 8px; }
.overall-pill.green { background: var(--green-bg); color: var(--green-text); border-color: var(--green-border); }
.overall-pill.yellow { background: var(--yellow-bg); color: var(--yellow-text); border-color: var(--yellow-border); }
.overall-pill.red { background: var(--red-bg); color: var(--red-text); border-color: var(--red-border); }
.ryg-counts { display: flex; gap: 10px; }
.ryg-count { display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.dot.green { background: var(--green); }
.dot.yellow { background: var(--yellow); }
.dot.red { background: var(--red); }
.summary-items { display: flex; flex-direction: column; }
.summary-item { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; padding: 5px 0; border-bottom: 1px solid var(--border); }
.summary-item:last-child { border-bottom: none; }
.summary-item-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--text3); margin-top: 5px; flex-shrink: 0; }
.summary-item-team { font-size: 10px; font-weight: 700; color: var(--primary); white-space: nowrap; padding-top: 1px; min-width: 52px; max-width: 72px; overflow: hidden; text-overflow: ellipsis; }
.summary-item-text { flex: 1; color: var(--text); line-height: 1.4; }
.news-text { font-size: 12px; color: var(--text2); line-height: 1.6; }
.news-empty { font-size: 12px; color: var(--text3); font-style: italic; }
.meeting-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.meeting-chip { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px 12px; font-size: 12px; box-shadow: var(--shadow); }
.meeting-chip-title { font-weight: 700; color: var(--text); }
.meeting-chip-time { color: var(--text3); font-size: 11px; white-space: nowrap; }
.meeting-chip-link { font-size: 11px; color: var(--link); text-decoration: none; white-space: nowrap; }
.meeting-chip-link:hover { text-decoration: underline; }
.meeting-empty { font-size: 12px; color: var(--text3); font-style: italic; }

/* ── COORDINATOR BAR ── */
.coord-bar { background: var(--blue-bg); border: 1px solid #bfdbfe; border-radius: var(--radius-sm); padding: 14px 18px; margin-bottom: 20px; display: none; flex-direction: column; gap: 12px; position: relative; }
.coord-bar.show { display: flex; }
.coord-close { position: absolute; top: 10px; right: 12px; background: none; border: none; font-size: 16px; color: var(--text3); cursor: pointer; line-height: 1; padding: 4px 8px; border-radius: 4px; }
.coord-close:hover { background: rgba(0,0,0,0.06); color: var(--text); }
.coord-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.coord-label { font-size: 12px; font-weight: 700; color: var(--blue-text); min-width: 130px; }
.coord-select, .coord-input { font-family: 'BCSans',sans-serif; font-size: 12px; padding: 6px 10px; border: 1px solid #93c5fd; border-radius: var(--radius-sm); background: white; color: var(--text); }
.coord-input { flex: 1; min-width: 240px; }
.coord-saving { font-size: 11px; color: var(--text3); font-style: italic; }
.featured-chip { font-size: 11px; padding: 3px 10px; border-radius: var(--radius-pill); border: 1px solid var(--border); background: var(--surface); color: var(--text2); cursor: pointer; font-family: 'BCSans',sans-serif; transition: all 0.1s; }
.featured-chip.on, .featured-chip[aria-pressed='true'] { background: var(--primary); color: white; border-color: var(--primary); }
.coord-featured { display: flex; gap: 6px; flex-wrap: wrap; }

/* ── CARD EDIT BTN ── */
.card-edit-btn { position: absolute; bottom: 10px; right: 10px; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text3); font-size: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.1s; padding: 0; line-height: 1; }
.card-edit-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }

/* ── FILTER BAR ── */
.filter-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-label { font-size: 12px; color: var(--text2); font-weight: 600; }
.filter-btn { font-size: 12px; font-weight: 600; padding: 4px 14px; border-radius: var(--radius-pill); border: 1px solid var(--border); background: var(--surface); color: var(--text2); cursor: pointer; font-family: 'BCSans',sans-serif; transition: all 0.1s; }
.filter-btn[aria-pressed='true'] { background: var(--primary); color: white; border-color: var(--primary); }
.filter-btn.active-green[aria-pressed='true'] { background: var(--green-bg); color: var(--green-text); border-color: var(--green-border); }
.filter-btn.active-yellow[aria-pressed='true'] { background: var(--yellow-bg); color: var(--yellow-text); border-color: var(--yellow-border); }
.filter-btn.active-red[aria-pressed='true'] { background: var(--red-bg); color: var(--red-text); border-color: var(--red-border); }

/* ── BENTO GRID ── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px 36px 18px; box-shadow: var(--shadow); position: relative; overflow: hidden; transition: box-shadow 0.15s, transform 0.15s; animation: fadeIn 0.25s ease both; }
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.card.green::before { background: var(--green); }
.card.yellow::before { background: var(--yellow); }
.card.red::before { background: var(--red); }
.card.empty::before { background: var(--border2); }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; }
.card-team { font-size: 15px; font-weight: 700; letter-spacing: -0.02em; }
.status-pill { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: var(--radius-pill); border: 1px solid; }
.status-pill.green { background: var(--green-bg); color: var(--green-text); border-color: var(--green-border); }
.status-pill.yellow { background: var(--yellow-bg); color: var(--yellow-text); border-color: var(--yellow-border); }
.status-pill.red { background: var(--red-bg); color: var(--red-text); border-color: var(--red-border); }
.card-row { display: flex; gap: 8px; margin-bottom: 5px; align-items: flex-start; }
.card-lbl { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text3); min-width: 58px; padding-top: 1px; flex-shrink: 0; }
.card-val { font-size: 12px; color: var(--text); line-height: 1.45; }
.card-divider { height: 1px; background: var(--border); margin: 8px 0; }
.deps-row { display: flex; gap: 5px; flex-wrap: wrap; }
.dep-tag { font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: var(--radius-pill); background: var(--bg); border: 1px solid var(--border); color: var(--text2); }
.dep-tag.out { background: var(--yellow-bg); border-color: var(--yellow-border); color: var(--yellow-text); }
.card-summary { font-size: 11px; color: var(--text2); font-style: italic; margin-top: 6px; line-height: 1.5; }
.card-empty-body { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px 0; gap: 8px; }
.card-empty-icon { font-size: 22px; opacity: 0.3; }
.card-empty-text { font-size: 12px; color: var(--text3); text-align: center; }
.card-add-btn { margin-top: 4px; padding: 6px 18px; border-radius: var(--radius-pill); border: 1px solid var(--border); background: var(--surface); color: var(--primary); font-size: 12px; font-weight: 700; cursor: pointer; font-family: 'BCSans',sans-serif; transition: all 0.1s; }
.card-add-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }
.card-saving { position: absolute; bottom: 10px; left: 12px; font-size: 10px; color: var(--text3); font-style: italic; }

/* ── MODAL ── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 500; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.show { display: flex; }
.modal { background: var(--surface); border-radius: var(--radius); box-shadow: 0 8px 40px rgba(0,0,0,0.2); width: 100%; max-width: 620px; max-height: 90vh; overflow-y: auto; }
.modal-header { background: #013366; padding: 18px 24px; border-radius: var(--radius) var(--radius) 0 0; display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-size: 16px; font-weight: 700; color: white; }
.modal-close { background: none; border: none; color: rgba(255,255,255,0.8); font-size: 20px; cursor: pointer; line-height: 1; padding: 4px 8px; border-radius: 4px; }
.modal-close:hover { color: white; background: rgba(255,255,255,0.15); }
.modal-body { padding: 24px; }
.field-group { margin-bottom: 16px; }
.field-label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text2); margin-bottom: 6px; }
.field-label .req { color: var(--red); margin-left: 2px; }
input[type='text'], textarea, select { width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 12px; font-family: 'BCSans',sans-serif; font-size: 13px; color: var(--text); outline: none; transition: border-color 0.15s; }
input[type='text']:focus, textarea:focus, select:focus { border-color: #255a90; box-shadow: 0 0 0 2px rgba(37,90,144,0.15); }
textarea { min-height: 70px; resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ryg-pick { display: flex; gap: 8px; }
.ryg-opt { flex: 1; padding: 8px; border-radius: var(--radius-sm); border: 2px solid var(--border); text-align: center; cursor: pointer; font-size: 12px; font-weight: 700; background: var(--bg); transition: all 0.1s; font-family: 'BCSans',sans-serif; }
.ryg-opt.sel-green { border-color: var(--green); background: var(--green-bg); color: var(--green-text); }
.ryg-opt.sel-yellow { border-color: var(--yellow); background: var(--yellow-bg); color: var(--yellow-text); }
.ryg-opt.sel-red { border-color: var(--red); background: var(--red-bg); color: var(--red-text); }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; align-items: center; }
.modal-save-status { font-size: 11px; color: var(--text3); font-style: italic; margin-right: auto; }
.mbtn { font-size: 13px; font-weight: 700; padding: 8px 20px; border-radius: var(--radius-pill); cursor: pointer; font-family: 'BCSans',sans-serif; transition: all 0.15s; border: 1px solid; }
.mbtn.cancel { background: var(--surface); color: var(--text2); border-color: var(--border); }
.mbtn.cancel:hover { background: var(--bg); }
.mbtn.save { background: var(--primary); color: white; border-color: var(--primary); }
.mbtn.save:hover { background: var(--primary-hover); }

/* ── HISTORY VIEW ── */
.history-view { display: none; }
.history-view.show { display: block; }
.week-selector { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; align-items: center; }
.week-btn { font-size: 12px; font-weight: 600; padding: 5px 16px; border-radius: var(--radius-pill); border: 1px solid var(--border); background: var(--surface); color: var(--text2); cursor: pointer; font-family: 'BCSans',sans-serif; transition: all 0.1s; }
.week-btn:hover { border-color: var(--primary); color: var(--primary); }
.week-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
.history-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.history-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; position: relative; overflow: hidden; }
.history-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.history-card.green::before { background: var(--green); }
.history-card.yellow::before { background: var(--yellow); }
.history-card.red::before { background: var(--red); }

/* ── TOAST ── */
.toast { position: fixed; bottom: 24px; right: 24px; background: #2d2d2d; color: white; padding: 12px 20px; border-radius: var(--radius-pill); font-size: 13px; font-weight: 600; display: none; z-index: 999; box-shadow: var(--shadow-md); }
.toast.show { display: block; animation: fadeIn 0.2s ease; }

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 768px) {
  .main { padding: 16px; }
  .summary-top { grid-template-columns: 1fr; }
  .summary-divider { display: none; }
  .grid, .history-grid { grid-template-columns: 1fr; }
  .row2 { grid-template-columns: 1fr; }
  .header { padding: 10px 16px; }
  .header-title { font-size: 16px; }
  .header-right { gap: 4px; }
  .hbtn { padding: 4px 10px; font-size: 11px; }
}
