/* QC Induk brand, loaded after app.css. app.css stays identical to induk Qulhaq (indigo) so its
   fixes carry over; only this file differs. QC red (#EB2227) marks the brand: logo, active menu,
   focus ring. Primary buttons are charcoal, so "Simpan" never looks like "Padam" (Bootstrap red).
   Owner decision 2026-10-09; replaces the teal of 2026-10-07. */
body.portal {
  --q-brand: #EB2227;
  --q-primary: #1F2937;
  --q-primary-hover: #111827;
  --q-primary-soft: #F3F4F6;
  --bs-link-color-rgb: 31, 41, 55;
  --bs-link-hover-color-rgb: 17, 24, 39;
  background:
    radial-gradient(1200px 400px at 50% -200px, #ECEEF2 0%, rgba(236, 238, 242, 0) 70%),
    var(--q-bg);
}
.q-brand-logo { display: block; height: 26px; width: auto; }
.q-admin-bar .q-brand-logo { height: 24px; }
.portal .q-hint a, .portal .form-text a, .portal p a:not(.btn) { text-decoration: underline; text-underline-offset: 2px; }
.portal .btn-outline-primary { --bs-btn-border-color: #D1D5DB; }
.portal .form-control:focus, .admin .form-select:focus { border-color: #F3A5A7; box-shadow: 0 0 0 .2rem rgba(235, 34, 39, .12); }
.q-logo { background: var(--q-brand); box-shadow: 0 4px 12px rgba(235, 34, 39, .3); }
.q-nav a.active, .q-admin-nav .nav-link.active { box-shadow: inset 0 -2px 0 var(--q-brand); }
.portal-card:hover, .portal-card:focus-visible { border-color: #D1D5DB;
  box-shadow: 0 2px 4px rgba(15, 23, 42, .04), 0 16px 32px rgba(15, 23, 42, .10); }
.q-user-chip:hover { border-color: #D1D5DB; }

/* QC portal card (owner 2026-11-13; only portal/index.php uses .portal-card). The icon fills the top-left corner: it
   grows up and left from the 44 px icon, so the text keeps its place (20 + 44 + 16 = 0 + 64 + 16) and the card's own
   radius rounds the outer corner. Then the system's address, then two cells: the way in (Masuk terus / Log masuk /
   Buka) and the login badge. The whole card stays one link. */
.portal-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.q-pcard-head { display: flex; align-items: flex-start; gap: 1rem; padding: 0 1.25rem 1.25rem 0; flex: 1 1 auto; }
.q-pcard-text { flex-grow: 1; min-width: 0; padding-top: 1.25rem; }
.portal-card .q-app-icon { width: 64px; height: 64px; border-radius: 0 0 14px 0; font-size: 1.5rem; }
.portal-card .q-app-logo { background: var(--q-surface-2, #FAFBFE); }   /* dark themes: the light tile in theme.css wins */
.portal-card .q-app-icon.q-app-logo { padding: 8px; border: solid var(--q-border); border-width: 0 1px 1px 0; }
.q-pcard-url { border-top: 1px solid var(--q-border); padding: .55rem 1rem; text-align: center; font-size: .85rem;
  color: var(--q-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-pcard-foot { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--q-border); }
.q-pcard-foot.q-pcard-solo { grid-template-columns: 1fr; }
.q-pcard-foot > * { display: flex; align-items: center; justify-content: center; min-height: 2.9rem; padding: .6rem .5rem; text-align: center; }
.q-pcard-foot > * + * { border-left: 1px solid var(--q-border); }
.q-pcard-go { font-weight: 600; font-size: .9rem; color: var(--q-primary); transition: background-color .15s ease; }
.portal-card:hover .q-pcard-go, .portal-card:focus-visible .q-pcard-go { background: var(--q-primary-soft); }
/* The cell is the frame: no pill around the badge, so "QC Induk + QCXIS" fits one line at three cards a row. */
.q-pcard-badge .q-pill.q-pill-login { border: 0; padding: 0; background: transparent; white-space: nowrap; font-size: .82rem; }
/* QC card order and pins (owner 2026-11-14): pin markers, the ordering screens (portal-sort.js). */
.q-pcard-pin { float: right; display: inline-flex; align-items: center; gap: .25rem; margin: -.2rem 0 .2rem .5rem; padding: .15rem .45rem;
  border-radius: 999px; font-size: .72rem; font-weight: 600; color: var(--q-muted); background: var(--q-hover, #F1F5F9); }
.q-pcard-pin-dept { color: var(--q-primary); background: var(--q-primary-soft); }
.q-portal-tools { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; margin-bottom: 1rem; }
.q-sort-bar { position: sticky; top: 60px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem;
  margin-bottom: 1.25rem; padding: .75rem 1rem; background: var(--q-surface); border: 1px solid var(--q-border);
  border-radius: var(--q-radius); box-shadow: var(--q-shadow); }
.q-sort-bar .q-sort-what { flex: 1 1 10rem; font-size: .9rem; }
.q-sorting .portal-card:hover { transform: none; }
.q-pcard-tools > * { padding: .35rem; }
.q-sort-cell { gap: .25rem; }
.q-pcard-tools button { border: 0; background: transparent; color: var(--q-text); border-radius: 8px; font-size: .85rem; font-weight: 600; padding: .35rem .5rem; }
.q-pcard-tools button:hover:not(:disabled) { background: var(--q-primary-soft); }
.q-pcard-tools button:disabled { opacity: .35; }
.q-pcard-tools button:focus-visible { outline: 2px solid var(--q-brand); outline-offset: 1px; }
.q-sort-handle { display: inline-flex; align-items: center; gap: .3rem; cursor: grab; touch-action: none; user-select: none; }
.q-sort-active, .q-sort-active * { cursor: grabbing !important; user-select: none; }
.q-pin-toggle { min-width: 6.5rem; }
.q-pin-toggle[aria-pressed="true"] { color: var(--q-primary) !important; }
[data-sort-static] .q-sort-cell { display: none !important; }
[data-sort-static] .q-pcard-tools { grid-template-columns: 1fr; }
[data-sort-static] .q-pcard-tools > * + * { border-left: 0; }
.q-sort-dragging .portal-card { box-shadow: 0 18px 40px rgba(15, 23, 42, .25); transform: rotate(1.5deg); }
.q-sort-ph-box { border: 2px dashed var(--q-outline-border, var(--q-border)); border-radius: var(--q-radius); background: var(--q-primary-soft); }
.q-sort-empty { border: 2px dashed var(--q-border); border-radius: var(--q-radius); padding: 1rem; text-align: center; color: var(--q-muted); font-size: .9rem; }
/* Pautan Portal → Susun: one row per link. */
.q-sort-row { display: flex; align-items: center; gap: .75rem; padding: .5rem .75rem; background: var(--q-surface);
  border: 1px solid var(--q-border); border-radius: 10px; }
.q-sort-row .q-sort-cell { display: flex; align-items: center; margin-left: auto; }
.q-sort-row button { border: 0; background: transparent; color: var(--q-text); border-radius: 8px; font-size: .85rem; font-weight: 600; padding: .35rem .5rem; }
.q-sort-row button:hover:not(:disabled) { background: var(--q-primary-soft); }
.q-sort-row button:disabled { opacity: .35; }
.q-sort-dragging.q-sort-row, .q-sort-dragging .q-sort-row { box-shadow: 0 12px 28px rgba(15, 23, 42, .22); }
.q-sort-ph.q-sort-row { padding: 0; border: 0; background: none; }
.admin .table-hover > tbody > tr:hover > * { --bs-table-bg-state: #F9FAFB; }
.admin .border.rounded { background: #FCFCFD; }

/* Orang: one column per system, so the table outgrows the screen as systems are added. Nama (with the
   department label and e-mel under it) stays put while the system columns scroll sideways. */
.q-person-table { table-layout: fixed; width: 100%; }
.q-person-table col.q-c-name { width: 260px; }
/* app.css makes admin tables transparent (the card is the wrapper); a sticky cell needs its own background or the
   scrolled columns show through. Header cells already have one. */
.q-person-table .q-sticky-1 { position: sticky; left: 0; z-index: 1; --bs-table-bg: var(--q-surface); overflow-wrap: anywhere; }
.q-person-table .q-sticky-1::after { content: ""; position: absolute; top: 0; bottom: 0; right: -8px; width: 8px;
  pointer-events: none; background: linear-gradient(to right, rgba(15, 23, 42, .08), rgba(15, 23, 42, 0)); }
/* The label wraps rather than being cut, so "· Ketua" always shows; only the e-mel is cut, or moves to its own line. */
.q-person-table .q-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .375rem; margin-top: .125rem; }
.q-person-table .q-dept { white-space: normal; text-align: left; font-weight: 500; color: #374151; }
.q-person-table .q-email { flex: 1 1 8rem; min-width: 0; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 575.98px) { .q-person-table col.q-c-name { width: 190px; } }
