/*
 * ERP UI: the app's shared building blocks (loaded after the theme, so it wins over it).
 * Pages use these classes instead of their own <style> blocks.
 */
:root {
  --erp-primary: #2563eb;
  --erp-primary-dark: #1d4ed8;
  --erp-ink: #0f172a;
  --erp-muted: #64748b;
  --erp-line: #e2e8f0;
  --erp-soft: #f8fafc;
  --erp-radius: 10px;
  --erp-control-h: 32px;
}

/* ---------- Page bar (resources/views/vendor/pagination/erp.blade.php) ---------- */
.erp-pager { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; padding: 10px 12px; border-top: 1px solid var(--erp-line); background: #fff; font-size: .8rem; color: var(--erp-muted); }
.erp-pager .pagination { flex-wrap: wrap; }
.erp-pager .page-link { min-width: 32px; text-align: center; color: var(--erp-ink); border-color: var(--erp-line); }
.erp-pager .page-item.active .page-link { background: var(--erp-primary); border-color: var(--erp-primary); color: #fff; }
.erp-pager .page-item.disabled .page-link { color: #cbd5e1; }
.erp-pager-size label { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.erp-pager-size select { width: auto; min-width: 70px; height: 30px; }
@media (max-width: 575.98px) { .erp-pager { justify-content: center; } .erp-pager-info { width: 100%; text-align: center; } }
@media print { .erp-pager { display: none !important; } }

/* ---------- Quick Fee POS: one screen at 1366x768 ---------- */
.erp-pos .card-body { padding: .6rem .75rem; }
.erp-pos .card-header { padding-top: .4rem !important; padding-bottom: .4rem !important; }
.erp-pos .pos-month { padding: 4px 2px; line-height: 1.15; }
.erp-pos .pos-month-name { font-weight: 700; font-size: .82rem; }
.erp-pos .pos-month-amt { font-size: .74rem; font-weight: 700; color: var(--erp-ink); }
.erp-pos .pos-month-tag .badge { font-size: .58rem; padding: 1px 4px; }
.erp-pos .pos-month.bg-primary .pos-month-amt, .erp-pos .pos-month.text-white .pos-month-amt { color: #fff; }
.erp-pos #display_net_payable { font-size: 1.6rem; }
.erp-pos .form-group { margin-bottom: .45rem !important; }
.erp-pos label.small { margin-bottom: 2px !important; }
.erp-pos #student_profile_card .list-group-item, .erp-pos #student_profile_card .d-flex.justify-content-between { padding-top: 3px; padding-bottom: 3px; }
@media (min-width: 992px) {
  /* The payment box stays on screen while the month list scrolls. */
  .erp-pos #pos_payment_form { position: sticky; bottom: 0; background: #fff; z-index: 2; padding-top: .4rem; }
}

/* ---------- Admin dashboard: 12 key figures in two compact rows on desktop ---------- */
@media (min-width: 1200px) {
  .row .executive-kpi-card { min-height: 64px; padding: 9px 10px; margin-bottom: 10px; }
  .executive-kpi-card .executive-kpi-icon { width: 32px; height: 32px; font-size: .95rem; margin-right: 8px; border-radius: 8px; }
  .executive-kpi-card .executive-kpi-title { font-size: .62rem; letter-spacing: .3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .executive-kpi-card .executive-kpi-value { font-size: 1.15rem; }
  .executive-kpi-card .executive-kpi-meta { font-size: .62rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .executive-kpi-card > div:first-child { min-width: 0; }
  .executive-kpi-card .kpi-watermark-icon { font-size: 3rem; }
  /* The whole card opens its page (the link's words stay for screen readers). */
  .executive-kpi-card .executive-kpi-action { position: absolute; inset: 0; opacity: 0; z-index: 2; }
  .executive-kpi-card .executive-kpi-action:focus-visible { opacity: 1; background: transparent; outline: 2px solid #fff; outline-offset: -4px; }
}

/* ---------- Rosters as cards (public/js/erp-ui.js switches it): a whole class on one screen ----------
   Cells say what they are: r-no (serial / roll), r-name, r-meta (one small line), r-mark (the buttons),
   r-sync (saved dot), r-hide (only in the list view). */
@media (min-width: 1200px) {
  .table.erp-roster-tiles.erp-roster-tiles thead { display: none; }
  .table.erp-roster-tiles.erp-roster-tiles, .table.erp-roster-tiles.erp-roster-tiles tbody { display: block; }
  .table.erp-roster-tiles.erp-roster-tiles tbody { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 6px; padding: 8px; }
  .table.erp-roster-tiles.erp-roster-tiles tbody tr { display: flex; flex-wrap: wrap; align-items: center; position: relative; background: #fff; border: 1px solid var(--erp-line); border-radius: 8px; padding: 5px 6px 6px; }
  .table.erp-roster-tiles.erp-roster-tiles tbody tr:only-child { grid-column: 1 / -1; }
  .table.erp-roster-tiles.erp-roster-tiles tbody td { display: block; border: 0 !important; padding: 0 !important; background: transparent !important; line-height: 1.2; height: auto !important; width: auto !important; }
  .table.erp-roster-tiles.erp-roster-tiles tbody td.r-no { width: 24px !important; font-size: .7rem !important; text-align: left !important; white-space: nowrap; color: var(--erp-muted); }
  .table.erp-roster-tiles.erp-roster-tiles tbody td.r-name { flex: 1; min-width: 0; padding-right: 16px !important; }
  .table.erp-roster-tiles.erp-roster-tiles tbody td.r-name .rounded-circle { display: none !important; }
  .table.erp-roster-tiles.erp-roster-tiles tbody td.r-name a, .table.erp-roster-tiles.erp-roster-tiles tbody td.r-name strong { display: block; font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .table.erp-roster-tiles.erp-roster-tiles tbody td.r-hide { display: none; }
  .table.erp-roster-tiles.erp-roster-tiles tbody td.r-meta { width: 100% !important; font-size: .68rem; margin: -1px 0 4px 24px; }
  .table.erp-roster-tiles.erp-roster-tiles tbody td.r-meta .badge { display: none; }
  .table.erp-roster-tiles.erp-roster-tiles tbody td.r-meta .small { margin: 0 !important; font-size: .68rem; }
  .table.erp-roster-tiles.erp-roster-tiles tbody td.r-mark { width: 100% !important; margin-top: 3px; }
  .table.erp-roster-tiles.erp-roster-tiles tbody td.r-mark > div { display: flex !important; gap: 4px; flex-wrap: wrap; }
  .table.erp-roster-tiles.erp-roster-tiles tbody td.r-mark label { flex: 1; margin: 0 !important; }
  .table.erp-roster-tiles.erp-roster-tiles tbody td.r-mark .attend-option { display: block; text-align: center; padding: 3px 4px !important; font-size: .72rem !important; }
  .table.erp-roster-tiles.erp-roster-tiles tbody td.r-mark .badge { position: absolute; top: 4px; right: 5px; margin: 0 !important; font-size: .55rem; }
  .table.erp-roster-tiles.erp-roster-tiles tbody td.r-sync { position: absolute; top: 4px; right: 5px; }
  .table.erp-roster-tiles.erp-roster-tiles tbody td.r-sync .badge { font-size: 0 !important; padding: 0 !important; width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
  .table.erp-roster-tiles.erp-roster-tiles tbody td.r-sync .badge-idle { background: #cbd5e1; }
}
.erp-roster-view .btn.active { background: var(--erp-primary); border-color: var(--erp-primary); color: #fff; }

/* ---------- Entry grids (marks, assessments): the grid scrolls, its header and Save bar stay in view ---------- */
.erp-entry-scroll { max-height: calc(100vh - 340px); min-height: 240px; overflow: auto; }
.erp-entry-scroll > .table td, .erp-entry-scroll > .table th { padding-top: 4px !important; padding-bottom: 4px !important; vertical-align: middle !important; }
.erp-entry-scroll > .table .form-control { height: 30px !important; min-height: 30px !important; padding-top: 2px !important; padding-bottom: 2px !important; }
.erp-entry-scroll > .table td small { display: block; line-height: 1.1; }
.erp-entry-scroll > .table thead th { position: sticky; top: 0; z-index: 3; background: #f1f5f9 !important; box-shadow: inset 0 -1px 0 var(--erp-line); }
.erp-savebar { position: sticky; bottom: 0; z-index: 4; background: #fff; border-top: 1px solid var(--erp-line); padding: 8px 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; box-shadow: 0 -4px 12px rgba(15, 23, 42, .06); }
.erp-savebar .erp-savebar-hint { font-size: .75rem; color: var(--erp-muted); }
@media print { .erp-entry-scroll { max-height: none; overflow: visible; } .erp-savebar { display: none !important; } }

/* ---------- Admission wizard: each step's Back / Next bar stays on screen ---------- */
.form-step-pane .form-nav-footer { position: sticky; bottom: 0; z-index: 6; background: #fff; box-shadow: 0 -4px 12px rgba(15, 23, 42, .07); }
.form-step-pane .form-section-card { overflow: visible; }
.form-step-pane .form-section-card .card-header-styled { border-radius: 12px 12px 0 0; }
.form-step-pane .form-section-card .card-body { padding: 16px 20px; }
.form-step-pane .form-nav-footer { padding: 10px 20px; }

/* Pinned bars sit above the fixed page footer (copyright line) when the layout has one. */
body.layout-footer-fixed .erp-savebar,
body.layout-footer-fixed .form-step-pane .form-nav-footer { bottom: 37px; }

/* ---------- Student / parent dashboard on desktop: shortcuts in two rows, a slimmer banner ---------- */
@media (min-width: 992px) {
  .student-squircle-grid { grid-template-columns: repeat(6, 1fr) !important; gap: 8px !important; padding-bottom: 4px !important; }
  .student-squircle-grid .squircle-icon-box { width: 44px; height: 44px; font-size: 1.1rem; }
  .student-squircle-grid .squircle-label { font-size: .72rem; }
  div.student-hero-banner.shadow { padding: .85rem 1.1rem !important; margin-bottom: .9rem !important; }
  div.student-hero-banner.shadow .rounded-circle { width: 64px !important; height: 64px !important; font-size: 1.6rem !important; }
}

/* ---------- Page headers: the breadcrumb sits at the right of the title row (it fell under it) ---------- */
@media (min-width: 576px) {
  .content-header .row > [class*="col-"] > .breadcrumb { display: flex; justify-content: flex-end; float: none !important; margin: 0 !important; background: transparent; }
}
/* The theme puts a .5rem gap between the header columns; with two 50% columns that is more than the
   row, so the right one (breadcrumb or buttons) dropped to a second line. The columns' own padding spaces them. */
@media (min-width: 768px) {
  .content-header .row.mb-2, .content-header .row.align-items-center { column-gap: 0 !important; }
}
.content-header h1 { margin-bottom: 0; }

/* ---------- Tables: several action buttons in a cell stay on one line (rows were doubling in height) ---------- */
.table td:has(> .btn ~ .btn), .table td:has(> a.btn ~ form), .table td:has(> form ~ .btn), .table td:has(> form ~ form),
.table td > .d-flex:has(> .btn ~ .btn), .table td > .btn-group { white-space: nowrap; }
.table td:has(> .btn ~ .btn) > form, .table td:has(> a.btn ~ form) > form, .table td:has(> form ~ form) > form { display: inline-block; }
.btn { white-space: nowrap; }
.btn-block, .btn:has(> div), .btn:has(.d-block) { white-space: normal; }

/* ---------- Filter forms in a card header use the full width ----------
   The theme makes .card-header a flex row, so a form in it shrank to its content and its grid columns
   collapsed (search boxes 20px wide, the year box cut to one digit). Grid forms take the whole header. */
.card-header > form.row, .card-header > form.form-row,
.card-header > form:has(> .row), .card-header > form:has(> .form-row) { flex: 1 1 100%; min-width: 0; }
.lh-sm { line-height: 1.2; }

/* ---------- Month tiles on the fee collect forms: twelve months in two rows ---------- */
.erp-month-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
@media (max-width: 575.98px) { .erp-month-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.erp-month { position: relative; display: flex; flex-direction: column; align-items: center; margin: 0; padding: 6px 4px 5px; border: 1px solid var(--erp-line); border-radius: 8px; background: #fff; cursor: pointer; line-height: 1.15; user-select: none; }
.erp-month input { position: absolute; top: 5px; left: 6px; margin: 0; }
.erp-month-name { font-weight: 700; font-size: .85rem; color: #0f172a; }
.erp-month-amt { font-size: .72rem; color: var(--erp-muted); }
.erp-month-state { font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; margin-top: 2px; }
.erp-month.is-due .erp-month-state { color: #b45309; }
.erp-month.is-paid { background: #f0fdf4; border-color: #bbf7d0; cursor: default; }
.erp-month.is-paid .erp-month-state { color: #15803d; }
.erp-month.is-locked { background: #f8fafc; cursor: default; opacity: .6; }
.erp-month.is-locked .erp-month-state { color: var(--erp-muted); }
.erp-month:has(input:checked) { border-color: #2563eb; background: #eff6ff; box-shadow: 0 0 0 2px rgba(37, 99, 235, .25); }
/* Totals in one strip */
.erp-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 0; border: 1px solid var(--erp-line); border-radius: 8px; overflow: hidden; background: #f8fafc; }
.erp-totals > div { padding: 6px 10px; border-right: 1px solid var(--erp-line); font-size: .85rem; white-space: nowrap; }
.erp-totals > div:last-child { border-right: 0; }
.erp-totals span { display: block; font-size: .66rem; text-transform: uppercase; letter-spacing: .3px; color: var(--erp-muted); font-weight: 600; }
.erp-totals .is-key { background: #eff6ff; }
.erp-totals .is-key strong { color: #1d4ed8; font-size: 1rem; }
/* Tiles inside a .form-group (transport / hostel drawers): the theme's label rules flattened them. */
.erp-month-grid > label.erp-month { display: flex !important; flex-direction: column !important; align-items: center !important; justify-content: flex-start !important; width: auto !important; margin: 0 !important; padding: 6px 4px 5px !important; font-weight: 400 !important; white-space: nowrap; min-width: 0; }
.erp-month-grid > label.erp-month > input[type="checkbox"] { position: absolute !important; top: 5px; left: 6px; margin: 0 !important; width: 13px; height: 13px; }
.erp-month-grid > label.erp-month > span { display: block; }
.form-group .erp-month-grid, .col-md-5 .erp-month-grid, .col-md-6 .erp-month-grid { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }

/* ---------- Fee Reports & Ledger (resources/views/FeeReports) ---------- */
.fr-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: thin; border-bottom: 1px solid var(--erp-line); margin-bottom: 2px; }
.fr-tab { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; font-size: .82rem; font-weight: 600; color: #475569; border-bottom: 2px solid transparent; white-space: nowrap; }
.fr-tab:hover { color: #1d4ed8; text-decoration: none; }
.fr-tab.is-active { color: #1d4ed8; border-bottom-color: #2563eb; }
.fr-filters { padding: 8px 10px; gap: 6px; }
.fr-filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.fr-filter-row + .fr-filter-row { margin-top: 6px; }
.fr-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.fr-chip { padding: 3px 10px; border: 1px solid var(--erp-line); border-radius: 999px; font-size: .76rem; font-weight: 600; color: #475569; background: #fff; white-space: nowrap; }
.fr-chip:hover { border-color: #93c5fd; color: #1d4ed8; text-decoration: none; }
.fr-chip.is-active { background: #2563eb; border-color: #2563eb; color: #fff; }
.fr-dates { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.fr-dates input { width: 9.2rem; }
.fr-filter-fields > select { flex: 1 1 8.5rem; min-width: 7.5rem; max-width: 12rem; }
.fr-filter-fields > .fr-search { flex: 2 1 14rem; min-width: 10rem; }
.fr-filter-buttons { display: flex; gap: 4px; }
.fr-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0; background: #fff; border: 1px solid var(--erp-line); border-radius: 10px; overflow: hidden; }
.fr-kpi { padding: 7px 12px; border-right: 1px solid var(--erp-line); color: inherit; min-width: 0; }
.fr-kpi:last-child { border-right: 0; }
a.fr-kpi:hover { background: #f8fafc; text-decoration: none; color: inherit; }
.fr-kpi span { display: block; font-size: .66rem; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; color: var(--erp-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fr-kpi strong { display: block; font-size: 1rem; color: #0f172a; white-space: nowrap; }
.fr-kpi small { display: block; font-size: .7rem; color: var(--erp-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fr-kpi.is-key { background: #eff6ff; grid-column: span 2; }
.fr-kpi.is-key strong { font-size: 1.25rem; color: #1d4ed8; }
.fr-kpi.is-warn strong { color: #b45309; }
.fr-card .card-header { padding: 8px 12px; }
.fr-table thead th { position: sticky; top: 0; z-index: 2; background: #f8fafc; font-size: .7rem; text-transform: uppercase; letter-spacing: .3px; color: #64748b; white-space: nowrap; }
.fr-table td { vertical-align: middle; font-size: .82rem; padding-top: 5px; padding-bottom: 5px; }
.fr-table td small { font-size: .7rem; line-height: 1.2; }
.fr-table tr.fr-void td { color: #94a3b8; }
.fr-table tr.fr-void td .font-weight-bold { text-decoration: line-through; }
.fr-table .fr-total td { background: #f1f5f9; font-weight: 700; border-top: 2px solid #cbd5e1; }
.fr-src { display: inline-block; padding: 0 6px; border-radius: 4px; font-size: .64rem; font-weight: 700; background: #f1f5f9; color: #475569; }
.fr-src-monthly, .fr-src-admission { background: #eef2ff; color: #4338ca; }
.fr-src-transport { background: #ecfeff; color: #0e7490; }
.fr-src-hostel { background: #fdf4ff; color: #a21caf; }
.fr-src-all_in_one, .fr-src-quick_pos, .fr-src-collect_desk { background: #ecfdf5; color: #047857; }
.fr-src-online, .fr-src-bank_challan { background: #fff7ed; color: #c2410c; }
.fr-src-advance_deposit, .fr-src-advance_applied { background: #fefce8; color: #a16207; }
@media (max-width: 767.98px) {
  .fr-dates { margin-left: 0; width: 100%; flex-wrap: wrap; }
  .fr-dates input { flex: 1 1 7.5rem; width: auto; min-width: 0; }
  .fr-dates select { flex: 1 1 100%; width: auto !important; }
  .fr-filter-fields > select, .fr-filter-fields > .fr-search { flex: 1 1 45%; max-width: none; }
  .fr-kpi.is-key { grid-column: 1 / -1; }
}
@media print {
  .fr-tabs, .fr-filters { display: none !important; }
  .fr-table thead th { position: static; }
}
.fr-bar + .fr-bar { margin-top: 8px; }
.fr-bar-track { height: 6px; background: #f1f5f9; border-radius: 4px; overflow: hidden; margin-top: 2px; }
.fr-bar-fill { height: 100%; background: #3b82f6; border-radius: 4px; }
.fr-age { display: inline-block; min-width: 3.4rem; text-align: center; padding: 1px 6px; border-radius: 4px; font-size: .7rem; font-weight: 700; }
.fr-age-current { background: #f1f5f9; color: #475569; }
.fr-age-0-30 { background: #fef9c3; color: #854d0e; }
.fr-age-31-60 { background: #ffedd5; color: #9a3412; }
.fr-age-61-90 { background: #fee2e2; color: #b91c1c; }
.fr-age-90 { background: #7f1d1d; color: #fff; }
.fr-grid td.fr-m { text-align: center; font-size: .72rem; padding: 4px 2px !important; min-width: 46px; }
.fr-m-paid { background: #f0fdf4; color: #15803d; }
.fr-m-due { background: #fffbeb; color: #b45309; }
.fr-m-overdue { background: #fef2f2; color: #b91c1c; font-weight: 700; }
.fr-m-before, .fr-m-future, .fr-m-none { color: #cbd5e1; }
.fr-grid th.fr-m-head { text-align: center; min-width: 46px; }
.fr-grid td.fr-name { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 180px; }
.fr-grid thead th.fr-name { left: 0; z-index: 3; }

/* ---------- Export & Print split button: both halves one height, joined (the arrow sat lower and shorter) ---------- */
.erp-export-btn-group, .btn-group:has(> .btn-open-export-modal) { display: inline-flex !important; align-items: stretch !important; vertical-align: middle; flex-wrap: nowrap; }
.erp-export-btn-group > .btn, .btn-group:has(> .btn-open-export-modal) > .btn {
  height: auto !important; min-height: 30px; padding-top: .25rem !important; padding-bottom: .25rem !important;
  font-size: .8rem; line-height: 1.2 !important; display: inline-flex !important; align-items: center !important; margin-top: 0 !important; margin-bottom: 0 !important;
}
.erp-export-btn-group > .btn:first-child, .btn-group:has(> .btn-open-export-modal) > .btn:first-child { border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; }
.erp-export-btn-group > .dropdown-toggle-split, .btn-group:has(> .btn-open-export-modal) > .dropdown-toggle-split {
  margin-left: -1px !important; padding-left: .45rem !important; padding-right: .45rem !important; min-width: 0 !important;
  border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important;
}
.erp-export-btn-group > .dropdown-toggle-split::after { margin: 0 !important; vertical-align: middle; }
/* Small buttons in a card header share one height, so toolbars (Day closing · Export & Print …) line up. */
.card-header .btn-sm:not(.btn-block):not(.dropdown-item), .card-header .btn-group-sm > .btn { min-height: 30px; display: inline-flex; align-items: center; justify-content: center; line-height: 1.2; padding-top: .25rem; padding-bottom: .25rem; }

/* ---------- Card headers: no clearfix inside the theme's flex header ----------
   AdminLTE adds .card-header::after (a float clearfix). The theme turns the header into a flex row
   with space-between, where that empty ::after became the last item — so the real last item (a
   badge, "View all", Export & Print) sat in the middle of the header instead of at the right. */
.card-header::after { content: none !important; display: none !important; }
.card-header > .card-tools { margin-left: auto; }

/* Short fields inside wide editing tables keep a readable width (they were squeezed under 64px). */
input[name^="sections["][name$="[label]"], input[name^="sections["][name$="[count]"], input[name^="sections["][name$="[marks]"] { min-width: 5rem; }
input[name^="rules["][name$="[prefix]"] { min-width: 6rem; }

/* ---------- Fee counters (resources/views/FeeCounter) ---------- */
.fc-notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.fc-note { display: flex; align-items: center; gap: 6px; margin: 0; padding: 4px 6px; border: 1px solid var(--erp-line); border-radius: 8px; background: #fff; font-weight: 400; }
.fc-note-face { min-width: 3.2rem; padding: 2px 6px; border-radius: 4px; background: #ecfdf5; color: #047857; font-weight: 700; font-size: .8rem; text-align: center; }
.fc-note-face.fc-coins { background: #fef9c3; color: #854d0e; }
.fc-note-x { color: var(--erp-muted); font-size: .8rem; }
.fc-note .form-control { width: 5rem; min-width: 5rem; }
.fc-note-sum { margin-left: auto; font-size: .78rem; font-weight: 600; color: #334155; }
.fc-total { width: 11rem; font-size: 1.15rem; font-weight: 700; }
.fc-counters { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.fc-counter { position: relative; margin: 0; padding: 10px 12px 10px 34px; border: 1px solid var(--erp-line); border-radius: 10px; background: #fff; cursor: pointer; font-weight: 400; }
.fc-counter input { position: absolute; left: 12px; top: 13px; }
.fc-counter:has(input:checked) { border-color: #16a34a; background: #f0fdf4; box-shadow: 0 0 0 2px rgba(22, 163, 74, .2); }
.fc-counter.is-busy { opacity: .6; cursor: not-allowed; }
.fc-counter-name { font-weight: 700; }
.fc-compare { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--erp-line); border-radius: 10px; overflow: hidden; }
.fc-compare > div { padding: 10px 14px; border-right: 1px solid var(--erp-line); }
.fc-compare > div:last-child { border-right: 0; }
.fc-compare span { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .3px; font-weight: 700; color: var(--erp-muted); }
.fc-compare strong { display: block; font-size: 1.35rem; }
.fc-compare small { display: block; font-size: .72rem; color: var(--erp-muted); }
.fc-compare .is-ok { background: #f0fdf4; } .fc-compare .is-ok strong { color: #15803d; }
.fc-compare .is-short { background: #fef2f2; } .fc-compare .is-short strong { color: #b91c1c; }
.fc-compare .is-over { background: #fffbeb; } .fc-compare .is-over strong { color: #b45309; }
.fc-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.fc-board-card { display: block; padding: 10px 12px; border: 1px solid var(--erp-line); border-left: 4px solid #16a34a; border-radius: 10px; background: #fff; color: inherit; }
.fc-board-card:hover { text-decoration: none; color: inherit; box-shadow: 0 2px 8px rgba(15, 23, 42, .08); }
.fc-board-card.is-stale { border-left-color: #dc2626; }
.fc-board-cash { font-size: 1.25rem; font-weight: 700; margin-top: 4px; }
.fc-board-cash small { font-size: .7rem; font-weight: 600; color: var(--erp-muted); margin-left: 6px; }
.fc-live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #16a34a; margin-right: 6px; box-shadow: 0 0 0 3px rgba(22, 163, 74, .2); }
.fc-kv th { width: 9rem; color: var(--erp-muted); font-weight: 600; font-size: .78rem; }
.fc-kv td, .fc-cash td { font-size: .84rem; }
.fc-cash .fc-strong td { font-weight: 700; border-top: 1px solid #cbd5e1; }
.fc-signs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
.fc-signs > div { border-top: 1px solid #94a3b8; padding-top: 4px; font-size: .78rem; color: var(--erp-muted); }
.fc-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.fc-chip.is-open { background: #dcfce7; color: #166534; }
.fc-chip.is-counted { background: #e0f2fe; color: #075985; }
.fc-chip.is-closed { background: #fee2e2; color: #991b1b; }
.fc-chip:hover { text-decoration: none; filter: brightness(.97); }
@media (max-width: 575.98px) { .fc-compare { grid-template-columns: 1fr; } .fc-compare > div { border-right: 0; border-bottom: 1px solid var(--erp-line); } .fc-signs { grid-template-columns: 1fr; } }
@media print {
  .fc-report { border: 0 !important; box-shadow: none !important; }
  .fc-report .card-header { background: #fff !important; }
}
/* Top bar links stay on one line (a long item pushed "Terms & Conditions" onto two). */
.main-header .navbar-nav .nav-link { white-space: nowrap; }

/* ---------- My Workspace (resources/views/MyWorkspace) ---------- */
.pw-user-item { display: flex !important; align-items: center; }
.pw-ws-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-left: 6px; }
.fr-tab .badge { font-size: .62rem; }
.ws-flow { display: flex; align-items: stretch; flex-wrap: wrap; gap: 0; padding: 10px 12px; }
.ws-flow > div { padding: 6px 10px; }
.ws-flow > div span { display: block; font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: var(--erp-muted); white-space: nowrap; }
.ws-flow > div strong { display: block; font-size: 1.05rem; white-space: nowrap; }
.ws-flow .is-op { align-self: center; font-size: 1.2rem; color: #94a3b8; padding: 0 2px; }
.ws-flow .is-key { background: #eff6ff; border-radius: 8px; }
.ws-flow .is-key strong { color: #1d4ed8; font-size: 1.25rem; }
.ws-flow .is-key.is-short { background: #fef2f2; }
.ws-flow .is-key.is-short strong { color: #b91c1c; }
.ws-confirm-row td { background: #fffbeb; border-top: 0 !important; }
/* Bell */
.ws-bell-menu { width: 340px; max-width: 92vw; padding: 0; }
.ws-bell-list { max-height: 420px; overflow-y: auto; }
.ws-bell-item { display: flex; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--erp-line); color: inherit; }
.ws-bell-item:hover { background: #f8fafc; text-decoration: none; color: inherit; }
.ws-bell-item.is-unread { background: #eff6ff; }
.ws-bell-item > i { margin-top: 3px; }
.ws-bell-item strong { display: block; font-size: .82rem; }
.ws-bell-item small { display: block; font-size: .72rem; line-height: 1.25; }
.ws-bell-actions { display: flex; gap: 4px; margin-top: 4px; }
.ws-bell-actions button { border: 1px solid var(--erp-line); background: #fff; border-radius: 4px; font-size: .68rem; padding: 1px 6px; }
.ws-bell-actions button.is-done { border-color: #16a34a; color: #16a34a; }
/* Notebook */
.nb-nav a { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 6px; color: #334155; font-size: .84rem; }
.nb-nav a span { margin-left: auto; font-size: .72rem; color: var(--erp-muted); }
.nb-nav a:hover { background: #f1f5f9; text-decoration: none; }
.nb-nav a.is-active { background: #eff6ff; color: #1d4ed8; font-weight: 600; }
.nb-editor .nb-title { border: 0; font-weight: 700; font-size: 1rem; padding-left: 0; background: transparent; box-shadow: none; }
.nb-editor .nb-body { border: 0; padding-left: 0; resize: vertical; background: transparent; box-shadow: none; }
.nb-check-row { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.nb-check-row .form-control { background: transparent; }
.nb-colors { display: flex; gap: 4px; }
.nb-swatch { width: 20px; height: 20px; border-radius: 50%; border: 1px solid #cbd5e1; margin: 0; cursor: pointer; position: relative; }
.nb-swatch input { position: absolute; opacity: 0; }
.nb-swatch:has(input:checked) { box-shadow: 0 0 0 2px #2563eb; }
.nb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; align-items: start; }
.nb-card { border: 1px solid var(--erp-line); border-radius: 10px; background: #fff; display: flex; flex-direction: column; }
.nb-card.is-open { box-shadow: 0 0 0 2px #2563eb; }
.nb-card-body { display: block; padding: 10px 12px 6px; color: inherit; position: relative; }
.nb-card-body:hover { text-decoration: none; color: inherit; }
.nb-pin { position: absolute; top: 8px; right: 10px; color: #2563eb; font-size: .75rem; }
.nb-text { font-size: .82rem; color: #334155; max-height: 12rem; overflow: hidden; }
.nb-card-checks { padding: 0 12px 4px; }
.nb-tick { border: 0; background: none; padding: 1px 0; font-size: .8rem; text-align: left; color: #334155; }
.nb-tick.is-done { color: #94a3b8; text-decoration: line-through; }
.nb-card-foot { display: flex; align-items: flex-start; gap: 4px; padding: 4px 8px 6px 12px; border-top: 1px solid rgba(15, 23, 42, .06); }
.nb-foot-meta { display: flex; flex-wrap: wrap; gap: 4px; flex: 1 1 auto; min-width: 0; padding-top: 3px; }
.nb-foot-acts { display: flex; flex: 0 0 auto; white-space: nowrap; }
.nb-tag { font-size: .68rem; color: #475569; background: rgba(15, 23, 42, .06); border-radius: 4px; padding: 0 5px; }
.nb-tag.nb-remind { background: #fef3c7; color: #92400e; }
.nb-tag.nb-remind.is-due { background: #fee2e2; color: #b91c1c; }
.nb-act { border: 0; background: none; color: #64748b; padding: 2px 5px; font-size: .78rem; }
.nb-act:hover { color: #1d4ed8; }
.nb-due td { background: #fef2f2; }
.nb-c-default { background: #fff; } .nb-c-yellow { background: #fef9c3 !important; } .nb-c-green { background: #dcfce7 !important; }
.nb-c-blue { background: #dbeafe !important; } .nb-c-pink { background: #fce7f3 !important; } .nb-c-purple { background: #ede9fe !important; }
.nb-editor .card-footer { background: transparent; }
@media print { .ws-confirm-row, .nb-card-foot { display: none !important; } }
.fr-shift { display: inline-block; margin-left: 4px; font-size: .64rem; font-weight: 600; color: #047857; white-space: nowrap; }

/* ---------- My Workspace home ---------- */
.ws-crumb { font-size: .74rem; color: var(--erp-muted); margin-bottom: 2px; }
.ws-crumb a { color: var(--erp-muted); font-weight: 600; }
.ws-crumb a:hover { color: #1d4ed8; text-decoration: none; }
.ws-crumb span { margin: 0 6px; }
.ws-att .card-header { border-bottom: 1px solid var(--erp-line); }
.ws-att.is-clear { border-left: 3px solid #16a34a; }
.ws-att:not(.is-clear) { border-left: 3px solid #f59e0b; }
.ws-att-clear { padding: 12px 16px; color: #166534; font-weight: 600; font-size: .88rem; }
.ws-att-list { list-style: none; margin: 0; padding: 0; }
.ws-att-list li { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--erp-line); }
.ws-att-list li:first-child { border-top: 0; }
.ws-att-list li > i { font-size: 1.05rem; width: 20px; text-align: center; flex: 0 0 auto; }
.ws-att-text { flex: 1 1 auto; min-width: 0; }
.ws-att-text strong { display: block; font-size: .88rem; }
.ws-att-text small { display: block; color: var(--erp-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-att-do { display: flex; gap: 6px; flex: 0 0 auto; }
.ws-att-do form { margin: 0; }
a.fr-kpi { color: inherit; text-decoration: none; transition: box-shadow .15s; }
a.fr-kpi:hover { box-shadow: inset 0 -2px 0 #2563eb; }
.ws-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; padding: 12px; }
.ws-tile { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--erp-line); border-radius: 10px; background: #fff; color: inherit; text-align: left; width: 100%; transition: border-color .15s, box-shadow .15s; }
.ws-tile:hover { border-color: #93c5fd; box-shadow: 0 2px 8px rgba(37, 99, 235, .08); text-decoration: none; color: inherit; }
.ws-tile:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.ws-tile-icon { width: 40px; height: 40px; border-radius: 10px; background: #eff6ff; color: #1d4ed8; display: flex; align-items: center; justify-content: center; font-size: 1.05rem; flex: 0 0 auto; }
.ws-tile-icon.is-warn { background: #fffbeb; color: #b45309; }
.ws-tile-text { min-width: 0; }
.ws-tile-text strong { display: flex; align-items: center; gap: 6px; font-size: .9rem; }
.ws-tile-text small { display: block; color: var(--erp-muted); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-mini-list { padding: 4px 0; }
.ws-mini { display: block; padding: 8px 16px; border-top: 1px solid var(--erp-line); color: inherit; }
.ws-mini:first-child { border-top: 0; }
a.ws-mini:hover { background: #f8fafc; text-decoration: none; color: inherit; }
.ws-mini strong { display: block; font-size: .84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-mini small { display: block; color: var(--erp-muted); font-size: .74rem; }
.ws-mini[class*="nb-c-"] { border-left: 3px solid transparent; background: transparent !important; }
.ws-mini.nb-c-yellow { border-left-color: #facc15; } .ws-mini.nb-c-green { border-left-color: #4ade80; } .ws-mini.nb-c-blue { border-left-color: #60a5fa; }
.ws-mini.nb-c-pink { border-left-color: #f472b6; } .ws-mini.nb-c-purple { border-left-color: #a78bfa; }
.ws-bell-foot { display: block; text-align: center; padding: 8px; font-size: .8rem; font-weight: 600; border-top: 1px solid var(--erp-line); }
@media (max-width: 575.98px) {
  .ws-att-list li { flex-wrap: wrap; align-items: flex-start; }
  .ws-att-list li > i { margin-top: 2px; }
  .ws-att-text { flex: 1 1 calc(100% - 40px); }
  .ws-att-do { width: 100%; padding-left: 32px; }
  .ws-att-do .btn { flex: 1 1 auto; }
  .ws-att-do form { flex: 1 1 auto; display: flex; }
  .ws-att-do form .btn { width: 100%; }
  .ws-tiles { grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px; }
  .ws-tile { flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px; }
  .ws-tile-text small { white-space: normal; }
}


/* ---------- ID card print wizard (components/card-print-wizard) ---------- */
html.cw-open, html.cw-open body { overflow: hidden !important; }
.cw { position: fixed; inset: 0; z-index: 20050; background: rgba(15, 23, 42, .72); display: flex; padding: 12px; }
.cw[hidden] { display: none; }
.cw-dialog { background: #f8fafc; border-radius: 12px; width: 100%; max-width: 1480px; margin: 0 auto; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 25px 60px rgba(0, 0, 0, .35); }
.cw-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: #0f172a; color: #e2e8f0; flex-wrap: wrap; }
.cw-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.cw-title i { color: #60a5fa; }
.cw-count { font-size: 12px; font-weight: 600; color: #94a3b8; margin-left: 4px; }
.cw-steps { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.cw-step { border: 1px solid #334155; background: #1e293b; color: #cbd5e1; border-radius: 999px; padding: 4px 12px 4px 4px; font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.cw-step b { width: 22px; height: 22px; border-radius: 50%; background: #334155; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; }
.cw-step.is-done b { background: #16a34a; color: #fff; }
.cw-step.is-active { background: #2563eb; border-color: #2563eb; color: #fff; }
.cw-step.is-active b { background: #fff; color: #1d4ed8; }
.cw-step:focus-visible, .cw-x:focus-visible { outline: 2px solid #60a5fa; outline-offset: 2px; }
.cw-x { border: 0; background: transparent; color: #cbd5e1; font-size: 26px; line-height: 1; padding: 0 6px; }
.cw-x:hover { color: #fff; }
.cw-body { flex: 1 1 auto; display: flex; min-height: 0; }
.cw-panel { flex: 0 0 380px; max-width: 380px; overflow-y: auto; padding: 14px 16px; background: #fff; border-right: 1px solid #e2e8f0; display: flex; flex-direction: column; }
.cw-sec { flex: 1 0 auto; }
.cw-sec[hidden], .cw [hidden] { display: none !important; }
.cw-sec h3 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: #475569; margin: 14px 0 8px; }
.cw-sec h3:first-child { margin-top: 0; }
.cw-sec h3 small { text-transform: none; font-weight: 500; color: #94a3b8; }
.cw-row { display: flex; gap: 8px; flex-wrap: wrap; }
.cw-row > .cw-f { flex: 1 1 0; min-width: 100px; }
.cw-f { display: block; font-size: 12px; font-weight: 600; color: #334155; margin-bottom: 8px; }
.cw-f .form-control, .cw-f select { margin-top: 3px; }
.cw-grow { flex: 2 1 0 !important; }
.cw-check { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-bottom: 8px; }
.cw-hint { font-size: 12px; color: #64748b; margin: 2px 0 8px; }
.cw-link { font-size: 12px; display: inline-block; margin: 2px 0 6px; }
.cw-stat { display: flex; align-items: center; gap: 12px; background: #eff6ff; border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.cw-stat i { font-size: 20px; color: #2563eb; }
.cw-stat strong { display: block; font-size: 20px; line-height: 1; }
.cw-stat small { color: #475569; }
.cw-missing { border: 1px solid #fde68a; background: #fffbeb; border-radius: 8px; margin-top: 4px; }
.cw-missing-head { width: 100%; border: 0; background: none; display: flex; align-items: center; gap: 6px; padding: 7px 10px; font-size: 12.5px; font-weight: 600; color: #92400e; }
.cw-missing ul { margin: 0; padding: 0 10px 8px 28px; max-height: 160px; overflow: auto; font-size: 12px; color: #78350f; }
.cw-formats { display: grid; gap: 6px; }
.cw-format, .cw-tile { position: relative; margin: 0; }
.cw-format input, .cw-tile input, .cw-seg input { position: absolute; opacity: 0; pointer-events: none; }
.cw-format span { display: flex; align-items: center; gap: 8px; border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 10px; font-size: 13px; cursor: pointer; }
.cw-format span i { color: #94a3b8; }
.cw-format input:checked + span, .cw-tile input:checked + span { border-color: #2563eb; background: #eff6ff; color: #1d4ed8; font-weight: 600; box-shadow: 0 0 0 1px #2563eb; }
.cw-format input:checked + span i { color: #2563eb; }
.cw-format input:focus-visible + span, .cw-tile input:focus-visible + span, .cw-seg input:focus-visible + span { outline: 2px solid #2563eb; outline-offset: 2px; }
.cw-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.cw-tile span { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; border: 1px solid #e2e8f0; border-radius: 8px; padding: 9px 6px; font-size: 12px; cursor: pointer; height: 100%; }
.cw-tile span i { font-size: 16px; color: #64748b; }
.cw-tile input:checked + span i { color: #2563eb; }
.cw-seg { display: inline-flex; border: 1px solid #cbd5e1; border-radius: 6px; overflow: hidden; margin-top: 3px; }
.cw-seg label { margin: 0; position: relative; }
.cw-seg span { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 31px; cursor: pointer; color: #64748b; }
.cw-seg input:checked + span { background: #2563eb; color: #fff; }
.cw-margins { display: grid; grid-template-columns: 1fr 38px 1fr; gap: 2px 8px; align-items: end; max-width: 300px; margin: 0 auto 6px; }
.cw-m-top { grid-column: 1 / 4; grid-row: 1; justify-self: center; width: 110px; }
.cw-m-left { grid-column: 1; grid-row: 2; }
.cw-link-btn { grid-column: 2; grid-row: 2; width: 34px; height: 31px; margin-bottom: 8px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; color: #94a3b8; }
.cw-m-right { grid-column: 3; grid-row: 2; }
.cw-m-bottom { grid-column: 1 / 4; grid-row: 3; justify-self: center; width: 110px; }
.cw-link-btn[aria-pressed="true"] { background: #eff6ff; border-color: #2563eb; color: #2563eb; }
.cw-adv { margin-top: 10px; border-top: 1px solid #e2e8f0; padding-top: 8px; }
.cw-adv summary { font-size: 13px; font-weight: 600; color: #334155; cursor: pointer; }
.cw-facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px 12px; margin: 0 0 10px; }
.cw-facts dt { color: #64748b; font-weight: 600; }
.cw-facts dd { margin: 0; font-weight: 700; }
.cw-warn { list-style: none; padding: 8px 10px; margin: 0 0 10px; background: #fef2f2; border: 1px solid #fecaca; border-radius: 8px; color: #991b1b; font-size: 12.5px; }
.cw-warn li + li { margin-top: 4px; }
.cw-tip { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px; padding: 9px 12px; font-size: 12.5px; color: #166534; }
.cw-tip ul { margin: 4px 0 0; padding-left: 18px; }
.cw-presets { display: flex; gap: 6px; margin-bottom: 8px; }
.cw-save { align-items: center; flex-wrap: nowrap; }
.cw-save input[type=text] { flex: 1 1 auto; }
.cw-nav { display: flex; justify-content: space-between; padding-top: 12px; margin-top: 12px; border-top: 1px solid #f1f5f9; }
.cw-stage { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; background: #cbd5e1; }
.cw-stagebar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: #e2e8f0; border-bottom: 1px solid #cbd5e1; font-size: 13px; font-weight: 600; color: #334155; }
.cw-sbtn { width: 30px; height: 30px; border-radius: 6px; border: 1px solid #94a3b8; background: #fff; color: #334155; }
.cw-sbtn:disabled { opacity: .4; }
.cw-badge { background: #2563eb; color: #fff; border-radius: 999px; padding: 2px 10px; font-size: 11px; }
.cw-zoom { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 12px; }
.cw-zoom select { height: 30px; border-radius: 6px; border: 1px solid #94a3b8; font-size: 12.5px; }
.cw-frame-wrap { position: relative; flex: 1 1 auto; min-height: 0; }
.cw-frame-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #cbd5e1; }
.cw-loading { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); background: #0f172a; color: #fff; border-radius: 999px; padding: 6px 14px; font-size: 12.5px; box-shadow: 0 4px 12px rgba(0, 0, 0, .2); }
.cw-foot { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #fff; border-top: 1px solid #e2e8f0; flex-wrap: wrap; }
.cw-summary { flex: 1 1 260px; font-size: 13px; color: #334155; }
.cw-err { color: #b91c1c; font-weight: 600; }
.cw-actions { display: flex; gap: 6px; flex-wrap: wrap; }
#cwPrintFrame { position: fixed; width: 1px; height: 1px; left: -9999px; top: 0; border: 0; opacity: 0; }
@media (max-width: 991.98px) {
  .cw { padding: 0; }
  .cw-dialog { border-radius: 0; }
  .cw-body { flex-direction: column; }
  .cw-panel { flex: 0 0 auto; max-width: none; max-height: 48vh; border-right: 0; border-bottom: 1px solid #e2e8f0; }
  .cw-stage { min-height: 38vh; }
  .cw-steps { margin-left: 0; width: 100%; order: 3; overflow-x: auto; flex-wrap: nowrap; }
  .cw-step { white-space: nowrap; }
  .cw-x { margin-left: auto; }
  .cw-actions { width: 100%; }
  .cw-actions .btn { flex: 1 1 auto; }
}

/* ---------- ID card lists (students and staff) ---------- */
.ic-photo { width: 34px; height: 40px; border-radius: 4px; object-fit: cover; background: #f1f5f9; border: 1px solid #e2e8f0; }
.ic-nophoto { width: 34px; height: 40px; border-radius: 4px; background: #fffbeb; border: 1px dashed #f59e0b; color: #b45309; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
.ic-printed { font-size: 11.5px; color: #166534; background: #dcfce7; border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.ic-never { font-size: 11.5px; color: #64748b; }
.ic-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--erp-line); background: #f8fafc; }
.ic-bar .ic-sel { font-size: 13px; font-weight: 700; color: #1d4ed8; }
.ic-table tbody tr.is-selected { background: #eff6ff; }
.ic-table td, .ic-table th { vertical-align: middle !important; }
