/* Meeting management (public/js/meetings.js): admin page and teacher portal. */
.mt { color: var(--text); min-width: 0; }
.mt-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.mt-head h3 { margin: 0; font-size: 20px; }
.mt-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.mt-tab { border: 1px solid var(--border); background: var(--card); color: var(--text-secondary, var(--text)); border-radius: 999px; padding: 6px 14px; font-size: 13px; cursor: pointer; min-height: 32px; }
.mt-tab[aria-selected="true"] { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.mt-subtabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 12px 0; border-bottom: 1px solid var(--border); }
.mt-subtab { border: 0; border-bottom: 3px solid transparent; background: none; padding: 8px 12px; font-size: 13px; cursor: pointer; color: var(--text-muted); min-height: 36px; }
.mt-subtab[aria-selected="true"] { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.mt-subtab .mt-count { margin-left: 4px; font-size: 11px; color: var(--text-muted); }
.mt-muted { color: var(--text-muted); }
.mt-small { font-size: 12px; }
.mt-error { color: var(--danger); padding: 8px 0; }
.mt-note { font-size: 12px; color: var(--text-muted); margin: 4px 0 10px; line-height: 1.5; }
.mt-banner { border-radius: 8px; padding: 10px 12px; margin: 10px 0; font-size: 13px; line-height: 1.5; background: var(--bg-alt); border: 1px solid var(--border); }
.mt-banner-warn { background: var(--warning-bg); border-color: var(--warning); color: var(--text); }
.mt-banner-danger { background: var(--danger-bg); border-color: var(--danger); color: var(--text); }
.mt-banner-info { background: var(--primary-light); border-color: var(--primary); color: var(--text); }
.mt-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 14px; }
.mt-tile { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: var(--card); text-align: left; cursor: pointer; font: inherit; color: inherit; min-height: 72px; }
.mt-tile:hover, .mt-tile:focus-visible { border-color: var(--primary); }
.mt-tile .mt-tile-label { font-size: 12px; color: var(--text-muted); display: block; }
.mt-tile .mt-tile-value { font-size: 24px; font-weight: 700; margin-top: 4px; display: block; }
.mt-tile.mt-tone-danger .mt-tile-value { color: var(--danger); }
.mt-tile.mt-tone-warn .mt-tile-value { color: var(--warning); }
.mt-tile.mt-tone-ok .mt-tile-value { color: var(--success); }
.mt-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.mt-card { border: 1px solid var(--border); border-radius: 10px; padding: 14px; background: var(--card); min-width: 0; margin-bottom: 14px; }
.mt-card h4 { margin: 0 0 8px; font-size: 14px; }
.mt-badge { display: inline-block; border-radius: 999px; padding: 1px 8px; font-size: 11px; font-weight: 600; margin: 1px 4px 1px 0; white-space: nowrap; background: var(--bg-alt); color: var(--text-muted); }
.mt-badge-danger { background: var(--danger-bg); color: var(--danger); }
.mt-badge-warn { background: var(--warning-bg); color: var(--warning); }
.mt-badge-ok { background: var(--success-bg); color: var(--success); }
.mt-badge-info { background: var(--primary-light); color: var(--primary); }
.mt-badge-conf { background: #3b0764; color: #fff; }
.mt-scroll { overflow-x: auto; max-width: 100%; }
.mt-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mt-table th, .mt-table td { padding: 7px 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.mt-table th { font-size: 12px; color: var(--text-muted); font-weight: 600; background: var(--bg-alt); }
.mt-table tr.mt-click { cursor: pointer; }
.mt-table tr.mt-click:hover td { background: var(--card-hover, var(--bg-alt)); }
.mt-table td.mt-num, .mt-table th.mt-num { text-align: right; font-variant-numeric: tabular-nums; }
.mt-link { background: none; border: 0; padding: 0; margin: 0; min-height: 0; height: auto; line-height: 1.4; box-shadow: none; color: var(--primary); cursor: pointer; font: inherit; text-align: left; }
.mt-link:hover { text-decoration: underline; }
.mt-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.mt-btn { border: 1px solid var(--border); background: var(--card); color: var(--text); border-radius: 6px; padding: 6px 12px; font-size: 13px; cursor: pointer; min-height: 32px; }
.mt-btn:hover { background: var(--card-hover, var(--bg-alt)); }
.mt-btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.mt-btn-primary:hover { background: var(--primary-hover, var(--primary)); }
.mt-btn-danger { color: var(--danger); border-color: var(--danger); }
.mt-btn-sm { padding: 3px 8px; font-size: 12px; min-height: 26px; }
.mt-btn[disabled] { opacity: .55; cursor: default; }
.mt-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-bottom: 12px; }
.mt-filters label, .mt-field label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 3px; }
.mt-filters input, .mt-filters select { min-width: 130px; max-width: 100%; }
.mt-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 14px; }
.mt-form .mt-wide { grid-column: 1 / -1; }
.mt-field input, .mt-field select, .mt-field textarea { width: 100%; box-sizing: border-box; }
.mt-field textarea { min-height: 80px; resize: vertical; font: inherit; }
/* shared.css styles typed text inputs only: give untyped (title, location) and time inputs the same look (admin page and portal). */
.mt input:not([type]), .mt input[type="time"],
.mt-modal input:not([type]), .mt-modal input[type="time"] {
  padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-md, 8px); background: var(--card); color: var(--text);
  font-size: 14px; font-family: inherit; min-height: 36px; max-width: 100%; box-sizing: border-box;
}
.mt-field .mt-check { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--text); }
.mt-field .mt-check input { width: auto; }
.mt-dl { display: grid; grid-template-columns: minmax(120px, 170px) 1fr; gap: 6px 12px; font-size: 13px; margin: 0; }
.mt-dl dt { color: var(--text-muted); }
.mt-dl dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.mt-pre { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.mt-picker { border: 1px solid var(--border); border-radius: 8px; padding: 8px; }
.mt-picker-list { max-height: 220px; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 2px 10px; margin-top: 6px; }
.mt-picker-list label { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--text); margin: 0; padding: 3px 0; }
.mt-picker-list label input { width: auto; }
.mt-chip { display: inline-flex; gap: 4px; align-items: center; border: 1px solid var(--border); border-radius: 999px; padding: 2px 4px 2px 10px; font-size: 12px; margin: 2px 4px 2px 0; background: var(--bg-alt); }
.mt-chip button { border: 0; background: none; cursor: pointer; font-size: 14px; color: var(--text-muted); padding: 0 4px; min-height: 0; }
.mt-modal { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); display: flex; align-items: flex-start; justify-content: center; padding: 24px 12px; overflow-y: auto; z-index: 1200; }
.mt-modal-card { background: var(--card); color: var(--text); border-radius: 12px; width: 100%; max-width: 640px; padding: 16px 18px; box-shadow: var(--shadow-modal, 0 8px 32px rgba(0,0,0,.18)); }
.mt-modal-card.mt-wide { max-width: 900px; }
.mt-modal-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.mt-modal-head h3 { margin: 0; font-size: 17px; }
.mt-x { border: 0; background: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--text-muted); min-height: 0; padding: 4px 8px; }
.mt-modal-foot { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.mt-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--border); border-left: 1px solid var(--border); }
.mt-cal-dow { font-size: 12px; font-weight: 600; color: var(--text-muted); padding: 6px; background: var(--bg-alt); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.mt-cal-day { min-height: 92px; padding: 4px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--card); min-width: 0; }
.mt-cal-day.mt-other { background: var(--bg-alt); opacity: .7; }
.mt-cal-day.mt-today { outline: 2px solid var(--primary); outline-offset: -2px; }
.mt-cal-num { font-size: 12px; color: var(--text-muted); }
.mt-cal-item { display: block; width: 100%; text-align: left; font-size: 11px; line-height: 1.3; border: 0; border-left: 3px solid var(--primary); background: var(--primary-light); color: var(--text); border-radius: 4px; padding: 2px 4px; margin-top: 3px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-height: 0; }
.mt-cal-item.mt-cancelled { border-left-color: var(--text-muted); background: var(--bg-alt); text-decoration: line-through; }
.mt-cal-item.mt-completed { border-left-color: var(--success); background: var(--success-bg); }
.mt-cal-item.mt-conf { border-left-color: #6b21a8; }
.mt-agenda-row { display: grid; grid-template-columns: 32px 1fr auto; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); align-items: start; }
.mt-agenda-pos { font-weight: 700; color: var(--primary); }
.mt-files { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; font-size: 12px; }
.mt-minutes h5 { margin: 14px 0 6px; font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .03em; }
.mt-results-bar { display: inline-block; height: 8px; background: var(--primary); border-radius: 4px; vertical-align: middle; margin-right: 6px; }
@media (max-width: 640px) {
  .mt-dl { grid-template-columns: 1fr; }
  .mt-dl dt { margin-top: 6px; }
  .mt-cal-day { min-height: 64px; }
  .mt-cal-item { font-size: 10px; }
  .mt-modal { padding: 0; }
  .mt-modal-card { border-radius: 0; min-height: 100%; }
  .mt-filters input, .mt-filters select { min-width: 0; width: 100%; }
  .mt-filters > div { flex: 1 1 45%; }
}

/* Selects in Meetings (admin page and teacher portal) look the same in
   Safari/WebKit, which otherwise draws a 23 px native menulist. */
.mt select:not([multiple]):not([size]), .mt-modal select:not([multiple]):not([size]) {
  -webkit-appearance: none; appearance: none; min-height: 36px; padding: 8px 32px 8px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-md, 8px); background-color: var(--card); color: var(--text);
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
