/* «الجدول» (schedule.html), in the navy design: the head with its tabs, then «جدول الأسبوع» or «أيام الغياب». The page
   frame comes from room.css; cards, tags and rows from interview.css. */
.sc { --ink-3: var(--ink-3); --fill: var(--fill); --navy-2: var(--navy-2);
  max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.sc .i-card { padding: 18px 22px 20px; gap: 14px; }
.sc .i-card > h3, .wk-card-top h3, .vac-head h3 { font-size: 18px; font-weight: 700; }
.cap { font-size: var(--text-md); color: var(--ink-2); }
.muted-p { margin: 0; font-size: var(--text-md); color: var(--ink-2); }
.warn-box { margin: 0; padding: 10px 12px; border-radius: 14px; background: var(--amber-bg); color: var(--amber); font-size: var(--text-md); line-height: 1.6; }
.sc > .result { margin: 0; }

/* the head: «الجدول», a line about the tab, the tabs as one pill; the tab's buttons at the end */
.sc-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 20px; }
.sc-title { min-width: 0; }
.sc-head h1 { margin: 0; font-size: 34px; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; }
.sc-sub { margin: 4px 0 0; max-width: 72ch; font-size: var(--text-base); color: var(--ink-2); }
.views { margin-top: 14px; display: inline-flex; gap: 4px; padding: 4px; border-radius: var(--radius-pill); background: var(--surface); box-shadow: var(--shadow); }
.views button { min-height: 36px; padding: 0 16px; border: 0; border-radius: var(--radius-pill); background: none; color: var(--ink-2); font-size: 14.5px; font-weight: 500; white-space: nowrap; }
.views button:hover { color: var(--ink); }
.views button[aria-pressed="true"] { background: var(--grad); color: var(--on-accent); font-weight: 700; box-shadow: var(--shadow-navy); }
.sc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn.sc-pill { height: 36px; padding: 0 16px; border: 0; background: var(--surface); color: var(--brand); font-size: 14.5px; font-weight: 700; box-shadow: var(--shadow); }
.btn.sc-pill:hover { box-shadow: 0 0 0 1px rgba(16, 27, 58, .07), 0 14px 30px -14px rgba(16, 27, 58, .22); }
.sc-av { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: var(--on-accent); font-size: var(--text-input); font-weight: 800; }

/* ---------- جدول الأسبوع: the grid's card beside a side column ---------- */
.wk { display: grid; grid-template-columns: minmax(0, 1fr) 272px; gap: 20px; align-items: start; }
.wk-card { min-width: 0; background: var(--surface); border-radius: var(--radius-card); box-shadow: var(--shadow); }
.wk-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; padding: 18px 22px 14px; }
.wk-card-head h2 { margin: 0; font-size: 18px; font-weight: 700; white-space: nowrap; }
.wk-card-head h2 small { font-size: 13.5px; font-weight: 500; color: var(--ink-3); }
.wk-hint { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--ink-3); }
.wk-hint svg { flex: none; color: var(--brand); }
.wk-card-head .result, .wk-card-head .move-bar { flex-basis: 100%; margin: 0; }
.grid-box { overflow-x: auto; padding: 0 10px 14px; }
/* the whole week fits beside the side column on a 1280px laptop (the menu takes 248px); narrower, the box scrolls */
.wgrid { display: grid; grid-template-columns: 44px repeat(7, minmax(84px, 1fr)); grid-template-rows: 72px; grid-auto-rows: 52px; column-gap: 4px; min-width: 660px; }
.wgrid > * { min-width: 0; }
.g-day { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; margin-bottom: 8px; border-radius: 12px; line-height: 1.2; text-align: center; }
.g-day b { font-size: 14.5px; font-weight: 700; }
.g-day small { font-size: 12.5px; font-weight: 500; color: var(--ink-3); white-space: nowrap; }
.g-day.today { background: var(--grad); color: var(--on-accent); box-shadow: var(--shadow-navy); }
.g-day.today small { color: rgba(255, 255, 255, .82); }
.g-vac { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: var(--radius-pill); background: var(--gold); color: var(--gold-ink); box-shadow: inset 0 0 0 1px var(--gold-edge); font-size: 11.5px; font-weight: 700; }
.g-time { align-self: start; transform: translateY(-50%); font-size: var(--text-xs); font-weight: 500; color: var(--ink-3); text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* a day's column: a line every half hour (one row), striped on a vacation day */
.wk-col { border-radius: 12px; background: repeating-linear-gradient(to bottom, transparent 0 51px, #E3E7F0 51px 52px), #F0F2F7; }
.wk-col.today { background: repeating-linear-gradient(to bottom, transparent 0 51px, #DCE2F1 51px 52px), #EAEEF8; }
.wk-col.vac { background: repeating-linear-gradient(135deg, #F5EAD2 0 7px, #FBF6EA 7px 14px); box-shadow: inset 0 0 0 1px var(--gold-edge); }
.g-cell { position: relative; }
/* the real side: a cell nothing covers is a tap to «أضف موعدًا لطالب» (schedule-add.js) */
.g-cell.add { cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .g-cell.add:hover::after { content: ""; position: absolute; inset: 3px; border-radius: 9px; background: var(--brand-soft); } }
.g-cell.drop::after { content: ""; position: absolute; inset: 3px; border-radius: 9px; background: var(--brand-soft); box-shadow: inset 0 0 0 2px var(--brand); }

/* «أضف موعدًا لطالب»'s first step: the students as a column of buttons, each with his times under his name (the sheet is base.css's) */
.wk-add-list { display: flex; flex-direction: column; gap: 8px; }
.wk-add-list .choice-btn { align-items: flex-start; text-align: start; }
.wk-add-list .choice-btn > span { font-size: var(--text-base); font-weight: 700; }

/* blocks: sessions navy, a new booking ringed in gold, make-ups dashed gold, interviews outlined, called off faded;
   each differs in lightness too */
.blk { position: relative; z-index: 1; margin: 3px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; padding: 2px 8px; border: 0; border-radius: 9px; text-align: start; line-height: 1.2; overflow: hidden; transition: filter 200ms ease; }
/* no press-scale here: a drag measures the block (schedule-week.js startDrag) to know which half hour he took */
/* the whole name, on two lines when it is long (a real name is often four words) */
.blk b { max-width: 100%; font-size: 12.5px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.blk small { max-width: 100%; font-size: 11.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blk.ses { background: var(--grad); color: var(--on-accent); box-shadow: 0 6px 14px -8px rgba(22, 41, 92, .7); cursor: grab; }
.blk.ses small { color: rgba(255, 255, 255, .8); }
.blk.new { box-shadow: inset 0 0 0 2px var(--gold-mark), 0 6px 14px -8px rgba(22, 41, 92, .7); }
.blk.new small { color: #E9C77D; }
.blk.iv { background: var(--surface); color: var(--amber); box-shadow: inset 0 0 0 1.5px var(--amber); }
.blk.iv small { color: var(--amber); }
.blk.mk { background: var(--gold); color: var(--gold-ink); outline: 1.5px dashed var(--gold-mark); outline-offset: -1.5px; }
.blk.mk small { color: var(--gold-ink); }
.blk.off { background: #E6E9F0; color: var(--ink-3); box-shadow: none; outline: 0; }
.blk.off b { text-decoration: line-through; text-decoration-color: rgba(110, 119, 146, .55); }
.blk.off small { color: var(--ink-3); }
@media (hover: hover) and (pointer: fine) { .blk.ses:not(.off):hover { filter: brightness(1.12); } }
.blk[aria-pressed="true"] { z-index: 2; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4.5px var(--gold-mark), var(--shadow-navy); }
/* moving sessions by hand: the block in hand, a moved block not saved yet, the bar and the form */
.blk.ses:active { cursor: grabbing; }
.blk.dragging { opacity: .4; pointer-events: none; }
.blk.moved { outline: 2px dashed var(--gold-mark); outline-offset: 2px; }
.move-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 14px; border-radius: 14px; background: var(--gold); color: var(--gold-ink); box-shadow: inset 0 0 0 1px var(--gold-edge); }
.move-bar p { flex: 1; min-width: 220px; margin: 0; font-size: var(--text-md); line-height: 1.6; }
.move-bar .btn { height: 36px; font-weight: 700; }

/* the side: the new booking, what he picked, the colours */
.wk-side { min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.wk-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wk-card-top h3 { margin: 0; }
.wk-kicker { font-size: 18px; font-weight: 700; }
.wk-x { flex: none; width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink-2); }
.wk-x:hover { background: var(--fill); }
.wk-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.wk-who h3 { margin: 0; font-size: var(--text-input); font-weight: 700; line-height: 1.35; }
.wk-who small { display: block; font-size: 13.5px; color: var(--ink-3); }
.wk-det .rows { gap: 0; padding: 4px 14px; border-radius: 14px; background: var(--fill); font-size: var(--text-md); }
.wk-det .rows dt, .wk-det .rows dd { padding: 9px 0; }
.wk-det .rows dt { color: var(--ink-3); }
.wk-det .rows dd { padding-inline-start: 14px; font-weight: 700; text-align: end; text-wrap: balance; }
.wk-det .rows dt ~ dt, .wk-det .rows dt ~ dt + dd { border-top: 1px solid var(--line); }
.move-form { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.move-form h4 { margin: 0; font-size: 14.5px; font-weight: 700; }
.btn.mv-go { width: 100%; height: 44px; border: 0; background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.btn.mv-go:hover:not(:disabled) { background: #DDE3F4; }
.btn.mv-go:disabled { opacity: .5; cursor: default; }
.mv-help { margin: 0; font-size: var(--text-md); line-height: 1.5; color: var(--ink-3); }
.news { display: flex; flex-direction: column; gap: 4px; }
.news p { margin: 0; font-size: var(--text-base); line-height: 1.6; }
.news small { font-size: 13.5px; color: var(--ink-3); }
.tag.new-tag { height: 24px; padding: 0 10px; background: var(--gold); color: var(--gold-ink); box-shadow: inset 0 0 0 1px var(--gold-edge); font-size: 12.5px; font-weight: 700; }
.legend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 8px; font-size: var(--text-sm); line-height: 1.35; }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend li.wide { grid-column: 1 / -1; }
.sw { flex: none; width: 22px; height: 14px; border-radius: 5px; }
.sw.ses { background: var(--grad); }
.sw.new { background: var(--grad); box-shadow: inset 0 0 0 2px var(--gold-mark); }
.sw.iv { background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--amber); }
.sw.mk { background: var(--gold); outline: 1.5px dashed var(--gold-mark); outline-offset: -1.5px; }
.sw.vac { background: repeating-linear-gradient(135deg, #F0E2C2 0 4px, #FBF6EA 4px 8px); box-shadow: inset 0 0 0 1px var(--gold-edge); }
.sw.off { background: #E6E9F0; }
.legend + .muted-p { padding-top: 12px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--ink-3); }
/* the side column goes under the grid, its cards side by side, once the grid (660px) no longer fits beside it */
@media (max-width: 1267px) {
  .wk { grid-template-columns: minmax(0, 1fr); }
  .wk-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: start; }
}

/* ---------- إجازاتي: the new vacation beside what its days hold, then his vacations ---------- */
.vac-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: 20px; align-items: start; }
.vac-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }
.vac-head h3 { margin: 0; }
.vac-head > span { font-size: 13.5px; color: var(--ink-3); }
.vac-label { margin: 6px 0 -4px; font-size: 14.5px; font-weight: 700; }
.vac-quick .count-btn { min-height: 38px; min-width: 0; padding: 0 16px; border: 0; border-radius: var(--radius-pill); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); font-size: 14.5px; }
.vac-quick .count-btn:hover { background: var(--fill); }
.vac-quick .count-btn[aria-pressed="true"] { background: var(--brand-soft); box-shadow: inset 0 0 0 1.5px var(--navy-2); color: var(--brand); font-weight: 700; }
.vac-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.vac-dates label, .vac-note { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: 13.5px; color: var(--ink-2); }
.vac-dates input { width: 100%; height: 46px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; background: var(--fill); font: inherit; font-size: var(--text-input); color: var(--ink); }
.vac-span { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--fill); font-size: 14.5px; color: var(--ink-2); }
.vac-span svg { flex: none; color: var(--brand); }
.vac-span b { color: var(--ink); }
.vac-note > span { font-size: 14.5px; font-weight: 700; color: var(--ink); }
.vac-note small { font-size: 13.5px; font-weight: 500; color: var(--ink-3); }
.sc .vac-note textarea { min-height: 76px; border-radius: 12px; background: var(--fill); }
.vac-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding-top: 16px; border-top: 1px solid var(--line); }
.vac-go { height: 48px; padding: 0 22px; border-radius: var(--radius-pill); font-size: var(--text-input); font-weight: 700; }
.vac-go[disabled] { background: var(--fill-2); color: #8E96AE; box-shadow: none; cursor: not-allowed; }
.vac-help { margin: 0; font-size: 13.5px; color: var(--ink-3); }
.vac-count { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: var(--radius-pill); background: var(--brand-soft); color: var(--brand) !important; font-size: 12.5px !important; font-weight: 700; }
.vac-day h4 { display: flex; align-items: center; gap: 8px; margin: 4px 0 0; font-size: 14.5px; font-weight: 700; color: var(--ink-2); }
.vac-day h4 span { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: var(--radius-pill); box-shadow: inset 0 0 0 1px var(--line); font-size: var(--text-xs); color: var(--ink-2); }
.vac-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
/* a row: the time, the student, then what happens to the session */
.vac-prev .vac-list > li { display: grid; grid-template-columns: 58px 32px minmax(0, 1fr) auto auto; align-items: center; gap: 8px 12px; padding: 11px 0; }
.vac-prev .vac-list > li + li { border-top: 1px solid var(--line); }
.vac-prev .sc-av { width: 32px; height: 32px; background: var(--brand-soft); color: var(--brand); font-size: 13.5px; }
.vac-prev .vac-list > li > svg { flex: none; color: var(--ink-3); }
.vac-time { font-size: var(--text-base); font-weight: 800; font-variant-numeric: tabular-nums; }
.vac-who { flex: 1 1 160px; min-width: 0; display: flex; flex-direction: column; line-height: 1.45; }
.vac-who b { font-size: var(--text-base); font-weight: 700; }
.vac-who small { font-size: var(--text-sm); color: var(--ink-3); }
.vac-list a.tag { text-decoration: none; }
.sc .vac-saved { padding: 0; gap: 0; }
.vac-saved > h3 { padding: 18px 22px 6px; }
.vac-saved > .muted-p { padding: 0 22px 20px; }
.vac-saved .vac-list > li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 10px 14px; padding: 16px 22px; }
.vac-saved .vac-list > li + li { border-top: 1px solid var(--line); }
.vac-ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--gold-ink); }
.is-past .vac-ic { background: #EEF0F5; color: var(--ink-3); }
.vac-saved .vac-who b { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: var(--text-input); }
.is-past .vac-who b { color: var(--ink-2); }
.vac-saved .vac-who .tag { height: 24px; padding: 0 10px; font-size: 12.5px; font-weight: 700; }
.vac-saved .vac-who .tag.ok { background: var(--gold); color: var(--gold-ink); box-shadow: inset 0 0 0 1px var(--gold-edge); }
.vac-word { margin-top: 2px; }
.btn.vac-stop { height: 36px; border: 0; background: transparent; color: var(--danger); font-weight: 700; }
.btn.vac-stop:hover { background: var(--danger-bg); }
.vac-undo { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 14px; background: var(--danger-bg); color: var(--danger); font-size: var(--text-md); }
.vac-undo > span { flex: 1 1 220px; }
.vac-undo .btn { height: 36px; }
.btn.vac-danger { background: var(--danger); border-color: var(--danger); color: var(--on-accent); }
@media (max-width: 1100px) { .vac-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- a phone ---------- */
/* the week as one day at a time (schedule-week.js agenda): a strip of the seven days, then that day's list */
.ag-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; padding: 0 10px 12px; }
.ag-day { position: relative; min-height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 4px 0; border: 0; border-radius: 14px; background: var(--fill); color: var(--ink); }
.ag-day b { font-size: 12px; font-weight: 500; white-space: nowrap; }
.ag-day small { font-size: 15px; font-weight: 700; color: var(--ink-2); }
.ag-day.today b { color: var(--navy-2); }
.ag-day.vac { background: repeating-linear-gradient(135deg, #F5EAD2 0 7px, #FBF6EA 7px 14px); }
.ag-day > i { position: absolute; bottom: 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--navy-2); }
.ag-day[aria-pressed="true"] { background: var(--grad); color: var(--on-accent); }
.ag-day[aria-pressed="true"] small, .ag-day[aria-pressed="true"] b { color: inherit; }
.ag-day[aria-pressed="true"] > i { background: #E9C77D; }
.ag-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.ag-list > li + li { border-top: 1px solid var(--line); }
.ag-list .wk-det { margin: 0 12px 12px; box-shadow: inset 0 0 0 1px var(--line); }
.ag-row { width: 100%; min-height: 64px; display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 16px; border: 0; border-inline-start: 4px solid var(--navy-2); background: none; color: var(--ink); text-align: start; }
.ag-row[aria-expanded="true"] { background: var(--navy-wash); }
.ag-row[aria-expanded="true"] > svg { transform: rotate(-90deg); }
.ag-time { font-size: 15px; font-weight: 700; color: var(--ink-2); }
.ag-t b { display: block; font-size: 17px; font-weight: 700; }
.ag-t small { display: block; margin-top: 2px; font-size: 14px; color: var(--ink-3); }
.ag-row.mk { border-inline-start-color: var(--gold-ink); }
.ag-row.iv { border-inline-start-color: var(--live); }
.ag-row.off { border-inline-start-color: #C9CFDD; }
.ag-row.off .ag-t b { color: var(--ink-3); text-decoration: line-through; }
.ag-none { padding: 22px 16px 26px; text-align: center; }
@media (max-width: 760px) {
  .sc-head .sc-sub { font-size: 15px; }
  .wk-card-head { padding: 14px 16px 12px; }
  .wk-card { overflow: hidden; }
  .sc-head h1 { font-size: 30px; }
  .views button { padding: 0 12px; }
  .vac-dates { grid-template-columns: minmax(0, 1fr); }
  .vac-prev .vac-list > li { grid-template-columns: 52px 32px minmax(0, 1fr); }
  .vac-prev .vac-list > li > :nth-child(n+4) { grid-column: 3; justify-self: start; }
  .vac-prev .vac-list > li > svg { display: none; }
  .vac-saved .vac-list > li { grid-template-columns: 40px minmax(0, 1fr); padding-inline: 16px; }
  .vac-saved .vac-list > li > .btn { grid-column: 2; justify-self: start; }
  .vac-go { flex: 1; }
}
/* a phone: tighter cards, the saved vacations edge to edge */
@media (max-width: 480px) {
  .sc .i-card { padding: 16px; }
  .sc .vac-saved { padding: 0; }
  .vac-saved > h3 { padding-inline: 16px; }
  .vac-saved > .muted-p { padding-inline: 16px; }
  .vac-quick .count-btn { padding: 0 12px; }
}
