/* The sheikh's app frame (sheikh.html). Header and page frame come from room.css; cards (.i-card), tags (.tag),
   rows (.rows), level buttons and choices from interview.css. Screen-specific styles live in sheikh/*.css.
   The shared pieces below follow the navy design canvas: white cards on a soft shadow, navy pills, gold for positions. */
.i-wrap.wide { max-width: 1240px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 16px; }
.page-head h1 { margin: 0; font-size: 32px; font-weight: 800; line-height: 1.2; }
.page-head .lede { margin: 4px 0 0; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.page-actions .btn { height: 44px; }
.muted-p { margin: 0; font-size: var(--text-md); color: var(--ink-2); }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sec-head h2 { margin: 0; font-size: var(--text-lg); font-weight: 700; display: flex; align-items: center; gap: 8px; }
.sec-head a { color: var(--brand); font-size: var(--text-md); font-weight: 500; text-decoration: none; }

/* number cards: a white card on a soft shadow, the number large. With an icon (.kpi-ic) the icon sits in a circle on
   the start side and the number on the end, the label under both; .hero is the one navy card of a row (with a meter). */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.kpis > .hero { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .kpis { display: flex; }
  .kpis > .kpi { flex: 1 1 0; min-width: 0; }
  .kpis > .hero { flex-grow: 1.55; }
}
.kpi { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--shadow); text-decoration: none; color: inherit; }
.kpi b { font-size: 30px; font-weight: 800; line-height: 1.15; color: var(--ink); }
.kpi > span { font-size: var(--text-md); font-weight: 500; color: var(--ink-2); }
a.kpi:hover { box-shadow: 0 0 0 1px rgba(16, 27, 58, .07), 0 14px 30px -14px rgba(16, 27, 58, .22); }
.kpi:has(> .kpi-ic) { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "ic n" "l l" "m m"; align-content: start; row-gap: 14px; padding: 20px 22px; }
.kpi > .kpi-ic { grid-area: ic; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.kpi:has(> .kpi-ic) > b { grid-area: n; justify-self: end; font-size: 34px; line-height: 1; white-space: nowrap; }
.kpi:has(> .kpi-ic) > span:not(.kpi-ic, .kpi-meter) { grid-area: l; font-size: var(--text-base); font-weight: 700; color: var(--ink); }
.kpi small { display: block; margin-top: 3px; font-size: var(--text-sm); font-weight: 500; color: var(--ink-2); }
.kpi-meter { grid-area: m; display: grid; gap: 7px; }
.kpi.hero { background: var(--grad); box-shadow: var(--shadow-navy); }
.kpi.hero > .kpi-ic { background: rgba(255, 255, 255, .14); color: var(--on-accent); }
.kpi.hero b, .kpi.hero > span:not(.kpi-ic, .kpi-meter) { color: var(--on-accent); }
.kpi.hero small { color: rgba(255, 255, 255, .8); }
.kpi.hero .bar { background: rgba(255, 255, 255, .18); }
.kpi.hero .bar i { background: #E9C77D; }

/* a list of rows inside a card; a row that opens something lights on hover */
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.list > li { border-bottom: 1px solid var(--divider); }
.list > li:last-child { border-bottom: 0; }
.row { width: 100%; min-height: 60px; display: flex; align-items: center; gap: 12px; padding: 10px 0; border: 0; background: none; color: inherit; text-align: start; text-decoration: none; }
.row .rt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.4; }
.row .rt b { font-size: var(--text-base); font-weight: 700; }
.row .rt small { font-size: var(--text-sm); color: var(--ink-2); }
.row .re { flex: none; display: flex; align-items: center; gap: 8px; }
a.row, button.row { width: calc(100% + 20px); margin-inline: -10px; padding-inline: 10px; border-radius: var(--radius-md); transition: background-color 150ms ease-out; }
a.row:hover, button.row:hover { background: var(--navy-wash); }
a.row:hover .rt b, button.row:hover .rt b { color: var(--brand); }

/* a table: a white card, quiet headings, a hairline between rows and a soft navy wash on the row under the pointer;
   a wide table scrolls in its own box, which also holds anything positioned inside it (a screen-reader label) */
.tbl-box { position: relative; overflow-x: auto; background: var(--surface); border-radius: var(--radius-card); box-shadow: var(--shadow); }
.tbl { width: 100%; border-collapse: collapse; font-size: var(--text-base); }
.tbl th { padding: 14px; text-align: start; font-size: var(--text-sm); font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.tbl td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr { transition: background-color 120ms ease-out; }
.tbl tbody tr:hover { background: var(--navy-wash); }
.tbl a { color: var(--ink); font-weight: 700; text-decoration: none; }
.tbl a:hover { color: var(--brand); }

/* filters and sub-pages: a white pill on a shadow, the chosen one navy */
.seg-tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: var(--radius-pill); background: var(--surface); box-shadow: var(--shadow); }
.seg-tabs button { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px; border: 0; border-radius: var(--radius-pill); background: none; font-size: var(--text-md); font-weight: 500; color: var(--ink-2); white-space: nowrap; transition: background-color 150ms ease-out, color 150ms ease-out; }
.seg-tabs button:hover { color: var(--ink); background: var(--navy-wash); }
.seg-tabs button[aria-pressed="true"] { background: var(--grad); color: var(--on-accent); font-weight: 700; box-shadow: var(--shadow-navy); }
.field { display: flex; flex-direction: column; gap: 4px; font-size: var(--text-sm); color: var(--ink-2); }
.field input, .field select, .field textarea { height: 42px; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 0 12px; background: var(--surface); font-size: var(--text-input); color: var(--ink); transition: border-color 150ms ease-out, box-shadow 150ms ease-out; }
.field textarea { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; }
.field :is(input, select, textarea):focus { outline: none; border-color: var(--navy-2); box-shadow: 0 0 0 4px var(--brand-soft); }
.bar { display: block; height: 7px; border-radius: var(--radius-pill); background: var(--neutral-bg); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--grad); }
.small-avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: var(--brand-soft); }
.small-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* «حضر» marked (sheikh/attend.js): the tag and «تراجع» side by side */
.at-done { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.at-done .tag { gap: 5px; }
.at-done .at-to { font-size: var(--text-sm); color: var(--ink-2); }
