/* layout.css — screen containers, header, list structure */

/* ---- Screen system ---- */

.screen {
  min-height: 100vh;
  display:    flex;
  flex-direction: column;
}

/* ---- Login screen ---- */

#screen-login {
  align-items:     center;
  justify-content: center;
  background:      var(--bg);
}

.login-card {
  background:    var(--surface);
  border:        1px solid var(--border);
  border-radius: var(--radius);
  padding:       2.5rem 3rem;
  width:         360px;
  max-width:     92vw;
  text-align:    center;
  box-shadow:    var(--shadow-lg);
}

.login-card img {
  height: 60px;
  margin-bottom: 1rem;
}

.login-card h1 {
  font-size:     1.3rem;
  color:         var(--primary);
  margin-bottom: 0.5rem;
}

.login-card p {
  font-size:     0.9rem;
  color:         var(--muted);
  margin-bottom: 1.5rem;
}

/* ---- App header (shared across list, report, section, admin screens) ---- */

.app-header {
  display:         flex;
  align-items:     center;
  height:          var(--header-height);
  background:      var(--primary-light);
  border-bottom:   1px solid var(--border-dark);
  padding:         0 10px;
  gap:             0.5rem;
  flex-shrink:     0;
}

.app-header h1 {
  font-size:   1rem;
  font-weight: 700;
  color:       #fff;
  flex:        1;
}

.header-right {
  display:     flex;
  align-items: center;
  gap:         0.5rem;
  flex-shrink: 0;
}

.user-name {
  font-size:   0.82rem;
  color:       #fff;
  white-space: nowrap;
}

.app-header .btn-ghost {
  color: #fff;
  font-size: 0.82rem;
}
.app-header .btn-ghost:hover:not(:disabled) {
  background: rgba(0,0,0,.15);
}

/* ---- Report list screen toolbar ---- */

#list-toolbar {
  display:     flex;
  align-items: center;
  gap:         0.5rem;
  padding:     8px 10px;
  background:  var(--bg);
  border-bottom: 1px solid var(--border);
  flex-wrap:   wrap;
}

#list-toolbar input[type="search"] {
  width:     240px;
  flex-shrink: 0;
}

.toolbar-spacer { flex: 1; }

#list-status {
  display:       flex;
  gap:           1.5rem;
  padding:       5px 12px;
  background:    #e8ecf6;
  border-bottom: 1px solid var(--border);
  font-size:     0.8rem;
  color:         var(--muted);
}
#list-status .stat-open     strong { color: var(--primary); }
#list-status .stat-past-due strong { color: var(--overdue-high); }
#list-status .stat-done     strong { color: var(--success); }

/* ---- Report groups ---- */

#report-groups {
  flex:      1;
  overflow-y: auto;
  padding:   0 0 2rem;
}

.report-group {
  border-bottom: 1px solid var(--border);
}

.group-header {
  display:     flex;
  align-items: center;
  gap:         0.5rem;
  height:      34px;
  padding:     0 10px;
  background:  var(--primary);
  color:       #fff;
  cursor:      pointer;
  user-select: none;
  font-size:   0.88rem;
  font-weight: 700;
}
.group-header:hover { background: var(--primary-dark); }

.group-chevron { width: 14px; flex-shrink: 0; }
.group-title   { flex: 1; }
.group-count   { font-size: 0.78rem; font-weight: 400; opacity: 0.85; }

/* ---- Report rows ---- */

.report-row {
  display:       flex;
  align-items:   center;
  height:        35px;
  padding:       0 10px;
  font-size:     0.82rem;
  border-bottom: 1px solid #eef0f7;
  cursor:        pointer;
}
.report-row:hover:not(.report-row--head) { background: var(--hover-fill); }

.report-row--head {
  height:         28px;
  font-size:      0.75rem;
  font-weight:    700;
  color:          var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background:     #e8ecf6;
  cursor:         default;
}

/* Due-date colour coding matches PowerApps */
.report-row--overdue-high            { background: var(--overdue-high); color: #fff; }
.report-row--overdue-high:hover      { background: #c93a00; color: #fff; }
.report-row--overdue-mid             { background: var(--overdue-mid); }
.report-row--overdue-low             { background: var(--overdue-low); }

/* ---- Row columns ---- */

.col-title    { flex: 3;   overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 8px; }
.col-student  { flex: 2;   overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 8px; }
.col-assigned { flex: 2.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 8px; }
.col-status   { flex: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 8px; }
.col-due      { width: 72px; flex-shrink: 0; padding-right: 8px; }
.col-period   { flex: 2.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-actions  { width: 86px; flex-shrink: 0; display: flex; align-items: center; justify-content: flex-end; }

.btn-open-entry {
  font-size:     0.72rem;
  padding:       2px 7px;
  border:        1px solid var(--primary);
  border-radius: 3px;
  background:    transparent;
  color:         var(--primary);
  cursor:        pointer;
  white-space:   nowrap;
  line-height:   1.4;
}
.btn-open-entry:hover { background: var(--primary); color: #fff; }

/* ---- Placeholder panels (Phase 1 only) ---- */

.phase-placeholder {
  display:     flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding:     3rem 1rem;
  gap:         0.75rem;
  color:       var(--muted);
  text-align:  center;
}

.phase-placeholder h2 {
  font-size:   1.1rem;
  color:       var(--primary);
}

.phase-placeholder p {
  font-size: 0.88rem;
  max-width: 360px;
}

/* ---- Report screen ---- */

.locked-banner {
  background:    #fff8e1;
  border:        1px solid #ffc107;
  border-radius: var(--radius);
  padding:       0.6rem 1rem;
  font-size:     0.88rem;
  color:         #7c5c00;
}
.locked-banner a { color: inherit; font-weight: 700; }

.report-meta-card {
  background:    var(--surface);
  border:        1px solid var(--border);
  border-radius: var(--radius);
  padding:       0.75rem 1rem;
  display:       flex;
  flex-direction: column;
  gap:           0.5rem;
}

.meta-row {
  display:   flex;
  gap:       1.5rem;
  flex-wrap: wrap;
}

.meta-field {
  display:        flex;
  flex-direction: column;
  min-width:      100px;
  flex:           1;
}
.meta-field--wide { flex: 3; }

.meta-label {
  font-size:      0.72rem;
  font-weight:    700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color:          var(--muted);
  margin-bottom:  0.15rem;
}

.meta-value { font-size: 0.88rem; }

.report-card {
  background:    var(--surface);
  border:        1px solid var(--border);
  border-radius: var(--radius);
  overflow:      hidden;
}

.report-card-label {
  font-size:      0.75rem;
  font-weight:    700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color:          var(--muted);
  padding:        0.45rem 1rem;
  background:     #eef1fa;
  border-bottom:  1px solid var(--border);
  display:        flex;
  justify-content: space-between;
  align-items:    center;
  cursor:         pointer;
  user-select:    none;
}
.report-card-label:hover { background: #e4e9f6; }

.report-card.collapsed .report-card-body { display: none; }
.report-card.collapsed .report-card-label,
.report-card.collapsed .section-field-header { border-bottom: none; }

.rich-display {
  padding:     0.75rem 1rem;
  font-size:   0.88rem;
  line-height: 1.6;
}
.rich-display p             { margin: 0 0 0.5rem; }
.rich-display p:last-child  { margin-bottom: 0; }
.rich-display ul, .rich-display ol { margin: 0 0 0.5rem 1.25rem; }

.report-empty {
  padding:   0.75rem 1rem;
  font-size: 0.85rem;
  color:     var(--muted);
}

/* Section cards (inside .report-card) */

.section-card { border-top: 1px solid var(--border); }
.section-card:first-child { border-top: none; }

.section-card-header {
  display:     flex;
  align-items: center;
  gap:         0.5rem;
  padding:     0.45rem 1rem;
  background:  #f5f7fc;
  flex-wrap:   wrap;
}

.section-program {
  font-size:   0.88rem;
  font-weight: 700;
  color:       var(--primary);
  flex:        1;
}

.section-lessons {
  font-size:   0.82rem;
  color:       var(--muted);
  flex-shrink: 0;
}

.section-badges {
  display:   flex;
  gap:       0.3rem;
  flex-wrap: wrap;
}

.section-card-body {
  display: flex;
  align-items: stretch;
}

.section-col {
  flex:      1;
  min-width: 0;
  padding:   0;
}
.section-col + .section-col {
  border-left: 1px solid var(--border);
  flex: 1.3;
}

.section-col-label {
  font-size:      0.7rem;
  font-weight:    700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color:          var(--muted);
  padding:        0.35rem 1rem 0.1rem;
}

/* Badges */

.badge {
  display:        inline-block;
  font-size:      0.7rem;
  font-weight:    700;
  padding:        0.15rem 0.5rem;
  border-radius:  99px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.badge--in-progress    { background: #dbeafe; color: #1e40af; }
.badge--fast-track     { background: #d1fae5; color: #065f46; }
.badge--section-status { background: #f3e8ff; color: #6b21a8; }

/* ---- Screen bodies ---- */

.screen-body {
  flex:     1;
  overflow-y: auto;
  display:  flex;
  flex-direction: column;
}

/* Report and section screens share a scrollable body with top padding */
#screen-report .screen-body,
#screen-section .screen-body {
  padding: 1rem;
  gap:     1rem;
}

/* Admin screen — full-height split layout, panels scroll independently */
#screen-admin {
  height: 100vh;
}

#screen-admin .screen-body {
  padding:  0;
  gap:      0;
  overflow: hidden;
}

/* ---- Section card actions (edit/delete) ---- */

.section-card-actions {
  display:    flex;
  gap:        0.35rem;
  margin-left: auto;
  flex-shrink: 0;
}

.section-add-row {
  padding:     0.6rem 1rem;
  border-top:  1px solid var(--border);
}

/* ---- Rich-text editor ---- */

.rte-wrap {
  border:        1px solid var(--border);
  border-radius: var(--radius);
  overflow:      hidden;
}

.rte-toolbar {
  display:     flex;
  gap:         2px;
  padding:     4px 6px;
  background:  #f0f3fa;
  border-bottom: 1px solid var(--border);
}

.rte-btn {
  padding:       3px 8px;
  font-family:   var(--font);
  font-size:     0.82rem;
  border:        1px solid transparent;
  border-radius: var(--radius);
  background:    transparent;
  cursor:        pointer;
  color:         var(--text);
  line-height:   1.4;
}
.rte-btn:hover  { background: var(--surface); border-color: var(--border); }
.rte-btn:active { background: #dde3f5; }

.rte-editor {
  min-height:  120px;
  padding:     0.6rem 0.8rem;
  font-family: var(--font);
  font-size:   0.9rem;
  line-height: 1.6;
  outline:     none;
  background:  var(--surface);
}
.rte-editor:focus { box-shadow: inset 0 0 0 2px rgba(56,96,178,.25); }
.rte-editor ul, .rte-editor ol { margin: 0 0 0.5rem 1.25rem; }
.rte-editor p  { margin: 0 0 0.4rem; }
.rte-editor p:last-child { margin-bottom: 0; }

/* ---- Section edit form ---- */

.section-form {
  display:        flex;
  flex-direction: column;
  gap:            1rem;
  min-width:      860px;
  width:          100%;
}

.sec-flags-group { flex-shrink: 0; }

.sec-flags {
  display:    flex;
  flex-wrap:  wrap;
  gap:        0.75rem;
  padding-top: 0.25rem;
}

.toggle-check {
  display:     flex;
  align-items: center;
  gap:         0.4rem;
  font-size:   0.88rem;
  cursor:      pointer;
  user-select: none;
}
.toggle-check input[type="checkbox"] {
  width:  auto;
  cursor: pointer;
}

.section-field-block {
  display:        flex;
  flex-direction: column;
  gap:            0;
  border:         1px solid var(--border);
  border-radius:  var(--radius);
  overflow:       hidden;
}

.section-field-header {
  display:      flex;
  align-items:  center;
  gap:          0.5rem;
  padding:      0.4rem 0.75rem;
  background:   #eef1fa;
  border-bottom: 1px solid var(--border);
  flex-wrap:    wrap;
}

.section-field-label {
  font-size:      0.75rem;
  font-weight:    700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color:          var(--muted);
  flex:           1;
}

.section-field-actions {
  display: flex;
  gap:     0.35rem;
}

.section-field-header--toggle {
  cursor:      pointer;
  user-select: none;
}
.section-field-header--toggle:hover { background: #e4e9f6; }

.field-chevron { font-size: 0.7rem; margin-left: 0.3rem; }

.section-field-block.collapsed .skills-layout { display: none; }

.section-field-block .rte-wrap {
  border:        none;
  border-radius: 0;
}

/* ---- Prompts / templates panels ---- */

.sec-panel {
  border-bottom: 1px solid var(--border);
  background:    #fafbff;
  max-height:    260px;
  overflow-y:    auto;
}

.sec-panel-content {
  padding:     0.65rem 0.85rem;
  font-size:   0.88rem;
  line-height: 1.6;
}
.sec-panel-content p             { margin: 0 0 0.5rem; }
.sec-panel-content p:last-child  { margin-bottom: 0; }
.sec-panel-content ul, .sec-panel-content ol { margin: 0 0 0.5rem 1.25rem; }

.template-select {
  font-size:  0.75rem;
  padding:    0.2rem 0.4rem;
  max-width:  180px;
}

/* ---- Report edit form ---- */

.form-static {
  font-size:   0.88rem;
  padding:     0.38rem 0;
  color:       var(--text);
  display:     block;
}

/* RTE embedded directly in a report-card (no extra border/radius) */
.rte-wrap--card {
  border:        none;
  border-radius: 0;
  border-top:    1px solid var(--border);
}
.rte-wrap--card .rte-toolbar {
  border-radius: 0;
}

/* ---- RTE symbol panel ---- */

.rte-sym-panel {
  position:      fixed;
  z-index:       999;
  background:    var(--surface);
  border:        1px solid var(--border);
  border-radius: var(--radius);
  box-shadow:    var(--shadow-lg);
  padding:       0.4rem;
  display:       flex;
  flex-wrap:     wrap;
  gap:           2px;
  max-width:     268px;
}

.rte-sym-btn {
  font-size:     1.1rem;
  width:         2rem;
  height:        2rem;
  border:        1px solid transparent;
  border-radius: var(--radius);
  background:    transparent;
  cursor:        pointer;
  display:       flex;
  align-items:   center;
  justify-content: center;
  transition:    background 0.1s;
}
.rte-sym-btn:hover { background: var(--hover-fill); border-color: var(--border); }

/* ---- Skills side-by-side layout ---- */

.skills-layout {
  display: flex;
  align-items: stretch;
}

.skills-rte-col {
  flex: 1;
  min-width: 0;
  border-right: 1px solid var(--border);
}

.skills-rte-col .rte-wrap {
  border:        none;
  border-radius: 0;
  height:        100%;
}

.skills-rte-col .rte-editor { min-height: 120px; }

.skills-picker-col {
  flex:       0 0 42%;
  overflow-y: auto;
  background: #fafbff;
}

.skills-picker-inner { padding: 0.5rem 0.6rem; }

.skills-picker-list {
  display:        flex;
  flex-direction: column;
  gap:            2px;
}

.skills-picker-empty {
  font-size:   0.82rem;
  color:       var(--muted);
  font-style:  italic;
  padding:     0.4rem 0;
  margin:      0;
}

.skill-group-label {
  font-size:      0.7rem;
  font-weight:    700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color:          var(--muted);
  padding:        0.5rem 0 0.2rem;
  margin-top:     0.2rem;
}
.skill-group-label:first-child { padding-top: 0.1rem; margin-top: 0; }

.skill-check {
  display:     flex;
  align-items: flex-start;
  gap:         0.4rem;
  font-size:   0.82rem;
  cursor:      pointer;
  padding:     0.2rem 0.25rem;
  border-radius: var(--radius);
  line-height: 1.4;
  user-select: none;
}
.skill-check:hover { background: var(--hover-fill); }
.skill-check input[type="checkbox"] {
  flex-shrink: 0;
  margin-top:  0.15rem;
  cursor:      pointer;
  width: auto;
}
.skill-check > span:first-of-type { flex: 1; }
.skill-lessons {
  flex-shrink: 0;
  margin-left: 0.4rem;
  color:       var(--muted);
  font-size:   0.73rem;
  white-space: nowrap;
  align-self:  center;
}

/* ---- Autosave status (header) ---- */

.sec-save-status {
  font-size:   0.78rem;
  color:       rgba(255,255,255,0.85);
  transition:  opacity 0.6s;
  white-space: nowrap;
}

/* Autosave toggle button — dim when off */
#btn-autosave-section        { opacity: 0.55; }
#btn-autosave-section.active { opacity: 1; }
#btn-autosave-report         { opacity: 0.55; }
#btn-autosave-report.active  { opacity: 1; }

/* ---- Check Status dialog ---- */

#dlg-check-status {
  padding:       0;
  border:        none;
  border-radius: var(--radius);
  box-shadow:    0 8px 32px rgba(0,0,0,0.2);
  width:         min(720px, 95vw);
  max-height:    88vh;
  overflow:      hidden;
  display:       flex;
  flex-direction: column;
}
#dlg-check-status::backdrop { background: rgba(0,0,0,0.45); }

.dlg-panel { display: flex; flex-direction: column; height: 100%; max-height: 88vh; }

.dlg-header {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  padding:         0.65rem 1rem;
  background:      var(--primary);
  color:           #fff;
  flex-shrink:     0;
}
.dlg-header h2  { margin: 0; font-size: 1rem; font-weight: 600; color: #fff; }
.dlg-close      { color: #fff !important; font-size: 1rem; line-height: 1; }

.dlg-body { padding: 1rem; overflow-y: auto; flex: 1; }

/* Picker row */
.csr-picker-row {
  display:     flex;
  align-items: center;
  gap:         0.5rem;
  margin-bottom: 0.75rem;
}
.csr-picker-row label { font-weight: 600; white-space: nowrap; }
.csr-picker-row input { flex: 1; }

.csr-divider { border: none; border-top: 1px solid var(--border); margin: 0.75rem 0; }

/* Threshold badges */
.csr-thresholds {
  display:     flex;
  flex-wrap:   wrap;
  gap:         0.4rem;
  align-items: center;
  margin-bottom: 0.75rem;
}
.csr-note { font-size: 0.82rem; color: var(--muted); }

/* Sessions table */
.csr-table-wrap    { overflow-x: auto; margin-bottom: 1rem; }
.csr-table         { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.csr-table th,
.csr-table td      { padding: 0.3rem 0.65rem; border-bottom: 1px solid var(--border); text-align: left; }
.csr-table th      { background: var(--surface); font-weight: 600; }
.csr-table tfoot td { font-weight: 600; background: #f8fafc; }
.csr-table tr.csr-twelfth td { background: #fef9c3; } /* 12th session highlight */
.csr-empty         { color: var(--muted); font-style: italic; }

/* Create form */
.csr-create-form   { border-top: 1px solid var(--border); padding-top: 0.9rem; }
.csr-create-form h3 { margin: 0 0 0.65rem; font-size: 0.95rem; font-weight: 600; }
.csr-form-grid {
  display:               grid;
  grid-template-columns: auto 1fr;
  gap:                   0.4rem 0.75rem;
  align-items:           center;
  margin-bottom:         0.65rem;
  max-width:             440px;
}
.csr-form-grid label { font-weight: 600; font-size: 0.88rem; white-space: nowrap; }
.csr-optional        { font-weight: 400; color: var(--muted); font-size: 0.8rem; }
.csr-suggestion      { font-size: 0.88rem; color: var(--muted); margin: 0 0 0.65rem; }

/* ---- Admin screen — split layout ---- */

#admin-body {
  display:    flex;
  flex:       1;
  overflow:   hidden;
  min-height: 0;
}

/* Left: assignment queue */

.admin-queue-panel {
  width:          380px;
  flex-shrink:    0;
  display:        flex;
  flex-direction: column;
  border-right:   2px solid var(--border-dark);
  overflow-y:     auto;
}

.admin-queue-hdr {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  padding:         0.55rem 0.85rem;
  background:      var(--primary);
  color:           #fff;
  font-size:       0.88rem;
  font-weight:     700;
  position:        sticky;
  top:             0;
  z-index:         1;
  flex-shrink:     0;
}

.admin-queue-hdr .btn-ghost {
  color: #fff;
}

.admin-queue-empty {
  padding:    2rem 1rem;
  color:      var(--muted);
  font-size:  0.88rem;
  text-align: center;
}

/* Report card in the queue */

.admin-report-card {
  padding:       0.75rem 0.9rem;
  border-bottom: 1px solid var(--border);
}

.admin-card-title {
  font-size:     0.95rem;
  font-weight:   700;
  color:         var(--primary);
  margin-bottom: 0.15rem;
}

.admin-card-period {
  font-size:     0.82rem;
  color:         var(--muted);
  margin-bottom: 0.1rem;
}

.admin-card-due {
  font-size:     0.8rem;
  color:         var(--muted);
  margin-bottom: 0.5rem;
}

.admin-card-dates {
  display:               grid;
  grid-template-columns: 1fr 1fr;
  gap:                   0.4rem;
  margin-bottom:         0.55rem;
}

.admin-date-label {
  display:        block;
  font-size:      0.65rem;
  font-weight:    700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color:          var(--muted);
  margin-bottom:  0.15rem;
}

.admin-date-input {
  width:       100%;
  padding:     0.2rem 0.3rem;
  font-size:   0.75rem;
  font-family: inherit;
  border:      1px solid var(--border);
  border-radius: 4px;
  background:  #fff;
  color:       var(--text);
  box-sizing:  border-box;
}

.admin-date-input:disabled {
  opacity: 0.5;
}

.admin-card-teaching {
  margin-bottom: 0.6rem;
}

.admin-card-teaching summary {
  font-size:      0.68rem;
  font-weight:    700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color:          var(--muted);
  cursor:         pointer;
  user-select:    none;
  margin-bottom:  0.3rem;
}

.admin-card-teaching-table {
  overflow-x: auto;
}

.admin-card-teaching-table table {
  width:           100%;
  border-collapse: collapse;
  font-size:       0.78rem;
}

.admin-card-teaching-table th,
.admin-card-teaching-table td {
  padding:       0.2rem 0.5rem;
  text-align:    left;
  border-bottom: 1px solid var(--border);
  white-space:   nowrap;
}

.admin-card-teaching-table th {
  font-weight: 700;
  background:  #eef1fa;
  color:       var(--muted);
}

.admin-assign-label {
  font-size:      0.68rem;
  font-weight:    700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color:          var(--muted);
  margin-bottom:  0.3rem;
}

.admin-multiselect {
  position:      relative;
  margin-bottom: 0.55rem;
}

.admin-ms-btn {
  width:         100%;
  padding:       0.35rem 2rem 0.35rem 0.6rem;
  text-align:    left;
  background:    #fff;
  border:        1px solid var(--border);
  border-radius: 4px;
  font-size:     0.84rem;
  font-family:   inherit;
  cursor:        pointer;
  color:         var(--text);
  white-space:   nowrap;
  overflow:      hidden;
  text-overflow: ellipsis;
  position:      relative;
}

.admin-ms-btn::after {
  content:  '▾';
  position: absolute;
  right:    0.6rem;
  top:      50%;
  transform: translateY(-50%);
  color:    var(--muted);
  pointer-events: none;
}

.admin-ms-dropdown {
  display:       none;
  position:      absolute;
  left:          0;
  right:         0;
  top:           calc(100% + 2px);
  background:    #fff;
  border:        1px solid var(--border);
  border-radius: 4px;
  box-shadow:    0 4px 12px rgba(0,0,0,0.12);
  z-index:       100;
  max-height:    220px;
  overflow-y:    auto;
  padding:       0.2rem 0;
}

.admin-ms-dropdown.open {
  display: block;
}

.admin-ms-option {
  display:     flex;
  align-items: center;
  gap:         0.5rem;
  padding:     0.3rem 0.75rem;
  cursor:      pointer;
  font-size:   0.84rem;
}

.admin-ms-option:hover {
  background: var(--hover-fill);
}

.admin-ms-option input {
  cursor: pointer;
  flex-shrink: 0;
}

/* Right: ReportsVsHours */

.admin-rvh-panel {
  flex:           1;
  display:        flex;
  flex-direction: column;
  overflow-y:     auto;
  min-width:      0;
}

.admin-rvh-hdr {
  padding:     0.55rem 1rem;
  background:  var(--primary);
  color:       #fff;
  font-size:   0.88rem;
  font-weight: 700;
  position:    sticky;
  top:         0;
  z-index:     1;
  flex-shrink: 0;
}

.admin-rvh-table {
  width:           100%;
  border-collapse: collapse;
  font-size:       0.85rem;
}

.admin-rvh-table th,
.admin-rvh-table td {
  padding:       0.35rem 0.85rem;
  text-align:    left;
  border-bottom: 1px solid var(--border);
  white-space:   nowrap;
}

.admin-rvh-table th {
  font-size:      0.72rem;
  font-weight:    700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color:          var(--muted);
  background:     #eef1fa;
  position:       sticky;
  top:            36px;  /* below the panel header */
}

.admin-rvh-th-clickable {
  cursor:         pointer;
  user-select:    none;
}

.admin-rvh-table.chart-active tbody td:first-child {
  cursor:      pointer;
  user-select: none;
}

.admin-rvh-th-clickable:hover {
  color:          var(--primary);
}

.admin-rvh-th-clickable.active-chart {
  color:          var(--primary);
  border-bottom:  2px solid var(--primary);
}

/* Pie chart */

#admin-rvh-chart:not(:empty) {
  border-bottom: 1px solid var(--border);
  background:    #f8faff;
}

.admin-chart-wrap {
  padding:    0.65rem 1rem 0.75rem;
  text-align: center;
}

.admin-chart-title {
  font-size:      0.72rem;
  font-weight:    700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color:          var(--primary);
  margin-bottom:  0.5rem;
}

.admin-chart-svg {
  display: block;
  width:   180px;
  height:  180px;
  margin:  0 auto;
}

.admin-chart-svg path {
  transition: opacity 0.15s, stroke-width 0.15s;
}

.admin-chart-empty {
  padding:   0.5rem 1rem;
  font-size: 0.82rem;
  color:     var(--muted);
}

.admin-rvh-table tbody tr:last-child td  { border-bottom: none; }
.admin-rvh-table tbody tr:hover td,
.admin-rvh-table tbody tr.rvh-row-highlight td { background: var(--hover-fill); }
