/* aSc-style desktop UI extras */
html, body { height: 100%; }

.ribbon-tab {
  padding: 0.45rem 1.1rem;
  border-radius: 0.4rem 0.4rem 0 0;
  cursor: pointer;
  white-space: nowrap;
  color: rgba(255,255,255,.85);
}
.ribbon-tab:hover { background: rgba(255,255,255,.12); color: #fff; }
.ribbon-tab.active { background: #fff; color: #1e3f70; font-weight: 700; }

.ribbon-btn {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; min-width: 4.2rem; padding: .3rem .6rem; border-radius: .375rem;
  font-size: .72rem; color: #374151; cursor: pointer; border: 1px solid transparent;
}
.ribbon-btn:hover { background: #eef4ff; border-color: #c7dbff; }
.ribbon-btn .ico { font-size: 1.25rem; line-height: 1; }
.ribbon-sep { width: 1px; align-self: stretch; background: #e5e7eb; margin: 0 .25rem; }

/* data table */
.dtable { width: 100%; border-collapse: collapse; background: #fff; font-size: .85rem; }
.dtable th { background: #f0f4fa; border: 1px solid #d8e0ec; padding: .45rem .6rem; text-align: right; font-weight: 700; color: #1e3f70; }
.dtable td { border: 1px solid #e3e8f0; padding: .4rem .6rem; }
.dtable tr:hover td { background: #f6f9ff; }

/* time-off matrix */
.to-cell {
  width: 2.6rem; height: 2.2rem; border: 1px solid #cfd8e6; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 1rem; font-weight: 700;
  background: #fff; user-select: none;
}
.to-cell.ok          { background: #e8f7ee; color: #15803d; }
.to-cell.conditional { background: #fdf6e3; color: #b45309; }
.to-cell.blocked     { background: #fdecec; color: #dc2626; }
.to-cell:hover { outline: 2px solid #2b579a; outline-offset: -2px; z-index: 1; }

/* timetable grid */
.tt-grid { border-collapse: collapse; background: #fff; }
.tt-grid th, .tt-grid td { border: 1px solid #c9d4e4; }
.tt-grid th { background: #eef2f9; color: #1e3f70; font-size: .75rem; padding: .3rem .5rem; }
.tt-slot { width: 7.2rem; height: 3.4rem; vertical-align: top; position: relative; }
.tt-slot.droppable-ok   { background: #e8f7ee !important; }
.tt-slot.droppable-bad  { background: #fdecec !important; }
.tt-slot.timeoff-blocked { background: repeating-linear-gradient(45deg,#fdecec,#fdecec 6px,#fbdada 6px,#fbdada 12px); }
.tt-slot.timeoff-conditional { background: repeating-linear-gradient(45deg,#fdf6e3,#fdf6e3 6px,#faeecb 6px,#faeecb 12px); }

.tt-card {
  border-radius: .3rem; color: #fff; padding: .15rem .35rem; font-size: .68rem; line-height: 1.25;
  cursor: grab; box-shadow: 0 1px 2px rgba(0,0,0,.25); margin: 2px;
}
.tt-card:active { cursor: grabbing; }
.tt-card .sub { font-weight: 700; font-size: .74rem; }
.tt-card.dragging { opacity: .4; }

/* unplaced lesson chips */
.chip {
  display: inline-flex; flex-direction: column; border-radius: .35rem; color: #fff;
  padding: .25rem .5rem; font-size: .7rem; cursor: grab; box-shadow: 0 1px 3px rgba(0,0,0,.3);
  min-width: 4.5rem;
}
.chip .cnt { font-size: .62rem; opacity: .9; }

/* ===== aSc-style manager window ===== */
.asc-win { display: flex; gap: .75rem; min-height: 22rem; }
.asc-sidebar {
  display: flex; flex-direction: column; gap: .6rem; padding: .5rem .35rem;
  background: #f3f4f8; border: 1px solid #d9dee8; border-radius: .4rem;
}
.asc-side-ico {
  width: 3rem; height: 3rem; display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; border-radius: .4rem; cursor: pointer; border: 1px solid transparent; background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.asc-side-ico:hover { border-color: #9db8e8; background: #eef4ff; }
.asc-side-ico.active { border-color: #2b579a; background: #dcebff; box-shadow: inset 0 0 0 1px #2b579a; }
.asc-list { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.asc-list-scroll { overflow: auto; max-height: 20rem; border: 1px solid #d9dee8; border-radius: .3rem; }
.asc-table { font-size: .8rem; }
.asc-table thead th { position: sticky; top: 0; }
.asc-row { cursor: pointer; user-select: none; }
.asc-row.selected td { background: #cfe3ff !important; }
.asc-actions { display: flex; flex-direction: column; gap: .4rem; width: 11rem; }
.asc-btn {
  width: 100%; text-align: center; font-size: .8rem; padding: .35rem .5rem; border-radius: .35rem;
  background: linear-gradient(#ffffff, #eef1f6); border: 1px solid #b9c4d6; color: #1f2937; cursor: pointer;
  box-shadow: 0 1px 1px rgba(0,0,0,.06);
}
.asc-btn:hover { background: linear-gradient(#f4f8ff, #dcebff); border-color: #2b579a; }
.asc-btn-primary { border-color: #2b579a; box-shadow: inset 0 0 0 1px #2b579a, 0 1px 1px rgba(0,0,0,.06); font-weight: 700; }
.asc-swatch {
  width: 9rem; height: 3.2rem; border: 1px solid #94a3b8; border-radius: .25rem; cursor: pointer;
  box-shadow: inset 0 0 0 2px #fff;
}
.sr-only { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

@media print {
  body * { visibility: hidden; }
  #print-area, #print-area * { visibility: visible; }
  #print-area { position: absolute; inset: 0; padding: 1cm; }
  #print-area table, #print-area th, #print-area td { border: 1px solid #000 !important; }
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
}
