/* RestroWeb QR tab — scoped qr-* classes. Palette per CLAUDE.md §6. No @container (cssmin drops it). */

.qr-tab { color: #2C3E50; }
.qr-card { margin-bottom: 24px; }
.qr-sub { color: #7F8C8D; font-size: 13px; margin: 4px 0 16px; }
.qr-muted { color: #7F8C8D; }
.qr-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.qr-head-btn { flex: none; }
/* professional outlined secondary button (self-contained — no Bootstrap .btn base) */
.qr-btn-outline { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; font-size: 13px; font-weight: 600; line-height: 1; color: #1E3A5F; background: #FFFFFF; border: 1px solid #C9D4E0; border-radius: 8px; box-shadow: 0 1px 2px rgba(30,58,95,0.06); cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s; }
.qr-btn-outline:hover { background: #F4F8FC; border-color: #2D7DD2; box-shadow: 0 2px 6px rgba(45,125,210,0.15); }
.qr-btn-outline:focus { outline: none; border-color: #2D7DD2; }
.qr-btn-outline:focus-visible { box-shadow: 0 0 0 3px rgba(45,125,210,0.35); }
.qr-btn-outline i { color: #2D7DD2; }
/* loading skeleton — grey shimmer placeholders sized to the real tables (no layout shift) */
.qr-skel { padding: 6px 0 2px; }
.qr-skel-tiles { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.qr-skel-row { display: flex; align-items: center; gap: 16px; padding: 14px 8px; border-bottom: 1px solid #EEF1F4; }
.qr-skel-row:last-child { border-bottom: 0; }
.qr-skel-bar, .qr-skel-tile { background: linear-gradient(90deg, #E9EDF2 25%, #F2F5F8 37%, #E9EDF2 63%); background-size: 400% 100%; animation: qr-shimmer 1.4s ease infinite; }
.qr-skel-bar { height: 12px; border-radius: 4px; }
.qr-skel-tile { flex: 1 1 180px; height: 64px; border-radius: 8px; }
@keyframes qr-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.qr-tab code { background: #EEF2F6; color: #2C3E50; padding: 1px 5px; border-radius: 4px; font-size: 12px; }

/* instance group table */
.qr-ig-table .qr-url { font-family: Menlo, Consolas, monospace; font-size: 12.5px; margin-left: 6px; }
.qr-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.qr-badge-custom { background: #E9F2FB; color: #1E5FA8; } /* darkened to clear AA 4.5:1 on the tint */
.qr-badge-default { background: #EEF1F4; color: #5c6b74; }
/* effective landing URL shown under the default badge — muted second line */
.qr-url-hint { margin-top: 4px; font-family: Menlo, Consolas, monospace; font-size: 11.5px; color: #7F8C8D; }

/* empty state */
.qr-empty { text-align: center; padding: 36px 20px; color: #7F8C8D; }
.qr-empty-ic { width: 48px; height: 48px; border-radius: 12px; background: #E9F2FB; color: #2D7DD2; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 10px; }
.qr-empty h4 { color: #2C3E50; margin: 0 0 4px; }
.qr-empty p { max-width: 46ch; margin: 0 auto 14px; }

/* error box */
.qr-errorbox { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: #FCECEA; border: 1px solid #f2c9c4; color: #b5372a; border-radius: 8px; padding: 12px 16px; }

/* analysis tiles */
.qr-tiles { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.qr-tile { flex: 1 1 180px; text-align: left; background: #FFFFFF; border: 1px solid #E0E4EA; border-radius: 8px; padding: 14px 16px; position: relative; overflow: hidden; cursor: pointer; }
.qr-tile:hover { border-color: #2D7DD2; }
.qr-tile.active { border-color: #2D7DD2; box-shadow: 0 0 0 2px #E9F2FB; }
.qr-tile:before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: #2D7DD2; }
.qr-tile-total:before { background: #1E3A5F; }
.qr-tile-active:before { background: #27AE60; }
.qr-tile-expired:before { background: #E74C3C; }
.qr-tile-disabled:before { background: #7F8C8D; }
.qr-tile-num { font-size: 26px; font-weight: 700; line-height: 1; }
.qr-tile-cap { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: #7F8C8D; margin-top: 7px; font-weight: 600; }
.qr-tile .qr-dot { width: 8px; height: 8px; border-radius: 50%; background: #2D7DD2; }
.qr-tile-total .qr-dot { background: #1E3A5F; }
.qr-tile-active .qr-dot { background: #27AE60; }
.qr-tile-expired .qr-dot { background: #E74C3C; }
.qr-tile-disabled .qr-dot { background: #7F8C8D; }

/* toolbar */
.qr-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.qr-search { display: flex; align-items: center; gap: 8px; background: #FFFFFF; border: 1px solid #E0E4EA; border-radius: 8px; padding: 7px 12px; min-width: 230px; flex: 1; }
.qr-search i { color: #7F8C8D; }
.qr-search input { border: 0; outline: 0; width: 100%; font-size: 14px; color: #2C3E50; background: transparent; }
.qr-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.qr-chip { border: 1px solid #E0E4EA; background: #FFFFFF; color: #7F8C8D; border-radius: 999px; padding: 6px 13px; font-size: 13px; font-weight: 600; }
.qr-chip:hover { color: #2C3E50; border-color: #c9d2db; }
.qr-chip.active { background: #1E3A5F; color: #FFFFFF; border-color: #1E3A5F; }
.qr-cdot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 4px; }
.qr-c-active { background: #27AE60; } .qr-c-soon { background: #F39C12; } .qr-c-expired { background: #E74C3C; } .qr-c-disabled { background: #7F8C8D; }

/* bulk bar */
.qr-bulk { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: #1E3A5F; color: #FFFFFF; border-radius: 8px; padding: 10px 16px; margin-bottom: 14px; }
.qr-bulk-n { font-weight: 600; }
.qr-bulk-sep { width: 1px; height: 20px; background: rgba(255,255,255,0.25); }
.qr-bulk-field { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: #FFFFFF; }
.qr-bulk-swlbl { color: #FFFFFF; font-weight: 600; min-width: 22px; }
/* the date input sits in the dark bulk bar → force its own dark-on-white so the text isn't white-on-white */
.qr-bulk input[type=date] { border: 0; border-radius: 6px; padding: 4px 8px; background: #FFFFFF; color: #2C3E50; }
.qr-bulk-clear { color: #FFFFFF; }

/* deployment table */
.qr-dep-table .qr-row-sel { background: #E9F2FB; }
.qr-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.qr-status-d { width: 8px; height: 8px; border-radius: 50%; }
.qr-status-active { background: #E8F6EE; color: #1e7e46; } .qr-status-active .qr-status-d { background: #27AE60; }
.qr-status-soon { background: #FEF3E2; color: #8A5804; } .qr-status-soon .qr-status-d { background: #F39C12; }
.qr-status-expired { background: #FCECEA; color: #b5372a; } .qr-status-expired .qr-status-d { background: #E74C3C; }
.qr-status-disabled { background: #EEF1F4; color: #5c6b74; } .qr-status-disabled .qr-status-d { background: #7F8C8D; }
/* Expiring-soon days-left info hint (matches the soon pill's AA-safe amber) */
.qr-soon-hint { margin-left: 8px; font-size: 11.5px; font-weight: 600; color: #8A5804; white-space: nowrap; }
.qr-date { display: inline-block; width: 150px; }
.qr-date-past { border-color: #f0b7b0; color: #E74C3C; }

/* toggle switch */
.qr-switch { position: relative; display: inline-block; width: 40px; height: 22px; vertical-align: middle; margin: 0; }
.qr-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.qr-slider { position: absolute; left: 0; top: 0; right: 0; bottom: 0; background: #c7ced6; border-radius: 999px; transition: .2s; }
.qr-slider:before { content: ""; position: absolute; height: 16px; width: 16px; left: 3px; top: 3px; background: #FFFFFF; border-radius: 50%; transition: .2s; }
.qr-switch input:checked + .qr-slider { background: #27AE60; }
.qr-switch input:checked + .qr-slider:before { transform: translateX(18px); }
/* visible keyboard focus (the native checkbox is visually hidden) */
.qr-switch input:focus + .qr-slider,
.qr-switch input:focus-visible + .qr-slider { box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px #2D7DD2; }
.qr-switch-lbl { font-size: 12.5px; color: #5C6B74; font-weight: 600; margin-left: 8px; } /* AA-safe: it carries On/Off state text */

/* modal */
.qr-overlay { position: fixed; left: 0; top: 0; right: 0; bottom: 0; background: rgba(30,44,66,0.45); display: flex; align-items: center; justify-content: center; z-index: 1050; padding: 20px; }
.qr-modal { background: #FFFFFF; border-radius: 10px; width: 100%; max-width: 520px; box-shadow: 0 4px 16px rgba(0,0,0,0.12); overflow: hidden; }
.qr-modal-head { padding: 16px 22px; border-bottom: 1px solid #E0E4EA; }
.qr-modal-head h4 { margin: 0; color: #1E3A5F; }
.qr-modal-body { padding: 20px 22px; }
.qr-modal-foot { padding: 14px 22px; border-top: 1px solid #E0E4EA; background: #fafbfc; text-align: right; }
.qr-modal-foot .btn { margin-left: 8px; }
/* migrate-old-QR-license modal — wider, with a scrollable outlet list */
.qr-mig { max-width: 640px; }
.qr-mig-body { max-height: 60vh; overflow-y: auto; }
/* the History/Migrate tables carry load-bearing audit data — darken muted cells to clear AA 4.5:1 on white */
.qr-mig-body .qr-muted { color: #5C6B74; }
.qr-req { color: #E74C3C; }
.qr-help { font-size: 12px; color: #7F8C8D; margin: 5px 0 0; }
.qr-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: #F4F6F9; border: 1px solid #E0E4EA; border-radius: 8px; }
.qr-switch-row-t { font-weight: 600; font-size: 13.5px; }
.qr-switch-row-s { font-size: 12px; color: #7F8C8D; }
.qr-url-row { display: flex; align-items: stretch; }
.qr-proto { background: #EEF1F4; border: 1px solid #E0E4EA; border-right: 0; border-radius: 4px 0 0 4px; padding: 7px 11px; color: #7F8C8D; font-size: 13px; }
.qr-url-row .form-control { border-radius: 0 4px 4px 0; }

/* bulk-action confirmation modal */
.qr-cf { max-width: 480px; }
.qr-cf-head { display: flex; gap: 14px; padding: 22px 24px 14px; }
.qr-cf-icon { flex: none; width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 19px; }
.qr-cf-ic-info { background: #E9F2FB; color: #2D7DD2; }
.qr-cf-ic-danger { background: #FCECEA; color: #E74C3C; }
.qr-cf-headtext h4 { margin: 2px 0 0; font-size: 17px; color: #1E3A5F; }
.qr-cf-summary { margin: 6px 0 0; font-size: 13px; color: #5C6B74; line-height: 1.5; } /* #5C6B74 clears AA on white */
.qr-cf-summary strong { color: #2C3E50; font-weight: 650; }
.qr-cf-body { padding: 4px 24px 2px; }
.qr-cf-label { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: #7F8C8D; font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.qr-cf-count { background: #EEF1F4; color: #5c6b74; border-radius: 999px; padding: 1px 8px; font-size: 11px; }
.qr-cf-chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 168px; overflow-y: auto; padding: 10px; border: 1px solid #E0E4EA; border-radius: 8px; background: #FAFBFC; }
.qr-cf-chip { background: #FFFFFF; border: 1px solid #E0E4EA; border-radius: 6px; padding: 3px 9px; font-size: 12.5px; color: #2C3E50; }
.qr-cf-more { align-self: center; font-size: 12px; color: #7F8C8D; font-weight: 600; padding: 3px 4px; }
.qr-cf-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 18px 24px 22px; }
.qr-cf-confirm { color: #FFFFFF; border: 0; font-weight: 600; }
.qr-cf-btn-success { background: #27AE60; }
.qr-cf-btn-success:hover { background: #219653; }
.qr-cf-btn-danger { background: #E74C3C; }
.qr-cf-btn-danger:hover { background: #cf4436; }

@media (max-width: 820px) {
  .qr-tile { flex-basis: 45%; }
}

/* one branded focus ring across all interactive controls (the switch already has one) */
.qr-tile:focus-visible,
.qr-chip:focus-visible,
.qr-search:focus-within,
.qr-date:focus-visible,
.qr-cf-chip:focus-visible { outline: 2px solid #2D7DD2; outline-offset: 2px; border-radius: 6px; }

@media (prefers-reduced-motion: reduce) {
  .qr-slider, .qr-slider:before, .qr-tile, .qr-chip { transition: none; }
  .fa-spin, .qr-skel-bar, .qr-skel-tile { animation: none; }
}
