/*
 * Flexiqueue shared components: settings pages, dialogs, notices, lock screens,
 * help, account, transactions and invoices. Used by the dashboard and the Queue Manager.
 * Load after sb-admin-2.min.css and fq-brand.css.
 */

/* Palette shared by every component (pages can override inside their own scope). */
:root {
    --fq-accent: #22847a;
    --fq-accent-strong: #22847a;
    --fq-accent-soft: #e3f3f0;
    --fq-text: #2f3a4a;
    --fq-muted: #6b7780;
    --fq-border: #e3e7ea;
    --fq-danger: #b54848;
}

/* ---------- Flexiqueue settings redesign ---------- */
.fq-settings {
    --fq-accent: #22847a;
    --fq-accent-strong: #22847a;
    --fq-accent-soft: #e3f3f0;
    --fq-text: #2f3a4a;
    --fq-muted: #6b7780;
    --fq-border: #e3e7ea;
    --fq-danger: #b54848;
    max-width: 860px;
    margin: 0 auto;
    color: var(--fq-text);
}
.fq-tabs {
    border-bottom: 1px solid var(--fq-border);
    margin-bottom: 1.5rem;
    flex-wrap: nowrap;
    overflow-x: auto;
}
.fq-tabs .nav-link {
    color: var(--fq-muted);
    font-weight: 600;
    border: 0;
    border-bottom: 3px solid transparent;
    padding: .75rem 1rem;
    white-space: nowrap;
}
.fq-tabs .nav-link i { margin-right: .35rem; }
.fq-tabs .nav-link:hover { color: var(--fq-text); }
.fq-tabs .nav-link.active {
    color: var(--fq-accent-strong);
    border-bottom-color: var(--fq-accent);
}
.fq-card {
    background: #fff;
    border: 1px solid var(--fq-border);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(30, 40, 60, .05);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
}
.fq-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: linear-gradient(135deg, var(--fq-accent-soft), #fff 70%);
}
.fq-hero-main { display: flex; align-items: center; gap: 1rem; }
.fq-hero-icon, .fq-section-icon {
    display: flex; align-items: center; justify-content: center;
    background: var(--fq-accent-soft);
    color: var(--fq-accent-strong);
    border-radius: 12px;
    flex-shrink: 0;
}
.fq-hero-icon { width: 56px; height: 56px; font-size: 1.5rem; background: var(--fq-accent); color: #fff; }
.fq-hero-title { font-size: 1.35rem; font-weight: 700; }
.fq-hero-sub { color: var(--fq-muted); font-size: .9rem; }
.fq-hero-links { display: flex; flex-wrap: wrap; gap: .5rem; }
.fq-section-head {
    display: flex; align-items: center; gap: .85rem;
    padding-bottom: .9rem;
    border-bottom: 1px solid var(--fq-border);
}
.fq-section-icon { width: 40px; height: 40px; font-size: 1.05rem; }
.fq-section-title { font-weight: 700; font-size: 1.05rem; }
.fq-section-desc, .fq-page-desc { color: var(--fq-muted); font-size: .875rem; }
.fq-page-head {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: .75rem; margin-bottom: 1.25rem;
}
.fq-page-title { font-size: 1.35rem; font-weight: 700; }
.fq-row, .fq-action-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1.5rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--fq-border);
}
.fq-row:last-child, .fq-action-row:last-child { border-bottom: 0; padding-bottom: 0; }
.fq-row-text { flex: 1; min-width: 0; }
.fq-row-title { display: block; font-weight: 600; margin: 0 0 .15rem; cursor: pointer; }
.fq-action-row .fq-row-title { cursor: default; }
.fq-row-desc { color: var(--fq-muted); font-size: .85rem; line-height: 1.45; }
.fq-select { width: auto; min-width: 140px; max-width: 220px; border-radius: 8px; }
.fq-select:focus, .fq-switch .custom-control-input:focus ~ .custom-control-label::before {
    border-color: var(--fq-accent);
    box-shadow: 0 0 0 .2rem rgba(34, 132, 122, .2);
}
.fq-switch { flex-shrink: 0; padding-left: 2.75rem; min-height: 1.5rem; }
.fq-switch .custom-control-label { cursor: pointer; }
.fq-switch .custom-control-label::before {
    left: -2.75rem; width: 2.5rem; height: 1.4rem; border-radius: 1rem; top: .05rem;
}
.fq-switch .custom-control-label::after {
    left: calc(-2.75rem + 3px); top: calc(.05rem + 3px);
    width: calc(1.4rem - 6px); height: calc(1.4rem - 6px); border-radius: 1rem;
}
.fq-switch .custom-control-input:checked ~ .custom-control-label::before {
    background-color: var(--fq-accent-strong); border-color: var(--fq-accent-strong);
}
.fq-switch .custom-control-input:checked ~ .custom-control-label::after {
    transform: translateX(1.1rem);
}
.fq-btn-primary { background: var(--fq-accent-strong); border-color: var(--fq-accent-strong); color: #fff; }
.fq-btn-primary:hover { background: #1b6e65; border-color: #1b6e65; color: #fff; }
.fq-btn-outline { background: #fff; border: 1px solid var(--fq-border); color: var(--fq-text); }
.fq-btn-outline:hover { border-color: var(--fq-accent); color: var(--fq-accent-strong); }
.fq-hero-links .btn i, .fq-action-row .btn i, .fq-page-head .btn i { margin-right: .35rem; }
.fq-danger-zone .fq-row-title { color: var(--fq-danger); }
.fq-save-status {
    display: inline-flex; align-items: center; gap: .4rem;
    font-size: .8rem; font-weight: 600;
    padding: .35rem .75rem; border-radius: 999px;
    background: var(--fq-accent-soft); color: var(--fq-accent-strong);
    transition: background-color .2s, color .2s;
}
.fq-save-status[data-state="saving"] { background: #e3f3f0; color: var(--fq-muted); }
.fq-save-status[data-state="error"] { background: #f8eeee; color: var(--fq-danger); }
.fq-empty { text-align: center; padding: 3rem 1.5rem; }
.fq-empty-icon { font-size: 2.25rem; color: var(--fq-accent); margin-bottom: .75rem; }
@media (max-width: 576px) {
    .fq-card { padding: 1rem; }
    .fq-row { flex-wrap: wrap; gap: .75rem; }
    .fq-row .fq-select { max-width: none; width: 100%; }
    .fq-action-row { flex-wrap: wrap; gap: .75rem; }
}
    /* ---------- Flexiqueue dialog redesign ---------- */
.fq-modal {
    --fq-accent: #22847a;
    --fq-accent-strong: #22847a;
    --fq-accent-soft: #e3f3f0;
    --fq-text: #2f3a4a;
    --fq-muted: #6b7780;
    --fq-border: #e3e7ea;
    --fq-danger: #b54848;
}
.modal-backdrop.show { opacity: .45; }
.fq-modal .modal-dialog { max-width: 460px; }
.fq-modal .modal-content {
    border: 0;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(30, 40, 60, .22);
    color: var(--fq-text);
}
.fq-modal .modal-header {
    border-bottom: 0;
    padding: 1.4rem 1.5rem .5rem;
    align-items: center;
}
.fq-modal .modal-title {
    display: flex; align-items: center; gap: .75rem;
    font-size: 1.1rem; font-weight: 700; color: var(--fq-text);
}
.fq-modal .close { color: var(--fq-muted); opacity: .8; text-shadow: none; }
.fq-modal .close:hover { opacity: 1; }
.fq-modal-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--fq-accent-soft); color: var(--fq-accent-strong);
    font-size: 1rem; flex-shrink: 0;
}
.fq-modal-icon.fq-danger { background: #f8eeee; color: var(--fq-danger); }
.fq-modal .modal-body {
    padding: .5rem 1.5rem 1rem;
    color: #4f5b63; font-size: .95rem; line-height: 1.55;
}
.fq-modal .modal-body p { margin-bottom: .9rem; }
.fq-modal .modal-footer {
    border-top: 0;
    padding: .25rem 1.5rem 1.4rem;
}
.fq-modal .modal-footer > * { margin: 0 0 0 .5rem; }
.fq-modal .btn { border-radius: 8px; font-weight: 600; padding: .5rem 1rem; }
.fq-btn-light { background: #e3f3f0; border: 1px solid #e3f3f0; color: var(--fq-text, #2f3a4a); }
.fq-btn-light:hover { background: #e3e7ea; color: var(--fq-text, #2f3a4a); }
.fq-modal .fq-btn-primary { background: var(--fq-accent-strong); border-color: var(--fq-accent-strong); color: #fff; }
.fq-modal .fq-btn-primary:hover { background: #1b6e65; border-color: #1b6e65; color: #fff; }
.fq-modal .form-control { border-radius: 8px; height: calc(1.5em + 1rem + 2px); }
.fq-modal .form-control:focus {
    border-color: var(--fq-accent);
    box-shadow: 0 0 0 .2rem rgba(34, 132, 122, .2);
}
.fq-pin-input { letter-spacing: .4em; font-weight: 600; max-width: 160px; }
.fq-pin-input::placeholder { letter-spacing: normal; font-weight: 400; }
.fq-field-label { display: block; font-weight: 600; font-size: .85rem; color: var(--fq-text); margin: .9rem 0 .35rem; }
.fq-hint { color: var(--fq-muted); font-size: .85rem; margin: .5rem 0 0; }
.fq-step-actions { display: flex; justify-content: flex-start; margin-top: 1rem; }
.fq-modal .alert { border-radius: 8px; font-size: .875rem; padding: .6rem .9rem; margin: .75rem 0 0; }
.fq-modal .alert br:first-child { display: none; }
.fq-modal-subject {
    display: flex; flex-direction: column;
    background: #f5f7f8; border-radius: 10px;
    padding: .75rem 1rem; margin-bottom: 1rem;
}
.fq-modal-subject strong { color: var(--fq-text); }
.fq-modal-subject span { color: var(--fq-muted); font-size: .85rem; }
.fq-notice {
    display: flex; gap: .85rem; align-items: flex-start;
    background: #e3f3f0; border-radius: 10px; padding: .9rem 1rem;
    color: #4f5b63; text-align: left;
}
.fq-notice > i { font-size: 1.25rem; color: #22847a; margin-top: .1rem; }
.fq-notice strong { display: block; color: #2f3a4a; margin-bottom: .2rem; }
.fq-notice p { margin: 0 0 .25rem; font-size: .9rem; }
.fq-notice.fq-warning { background: #f8f4ea; }
.fq-notice.fq-warning > i { color: #a16207; }
.fq-notice.fq-error { background: #f8eeee; }
.fq-notice.fq-error > i { color: #b54848; }
.fq-notice.fq-success > i { color: #3f8f6b; }
.fq-modal .progress-bar { background-color: #22847a; }

    /* ---------- Flexiqueue locked / running screens ---------- */
.fq-gate {
    max-width: 420px;
    margin: 2.5rem auto;
    padding: 2.25rem 2rem;
    background: #fff;
    border: 1px solid #e3e7ea;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(30, 40, 60, .08);
    text-align: center;
    color: #2f3a4a;
}
.fq-gate-icon {
    width: 64px; height: 64px; margin: 0 auto 1.1rem;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: #e3f3f0; color: #22847a; font-size: 1.5rem;
}
.fq-gate-icon.fq-warning { background: #f8f4ea; color: #a16207; }
.fq-gate-title { font-size: 1.35rem; font-weight: 700; margin-bottom: .5rem; color: #2f3a4a; }
.fq-gate-desc { color: #6b7780; font-size: .95rem; line-height: 1.55; margin-bottom: 1.5rem; }
.fq-gate-label { display: block; text-align: left; font-weight: 600; font-size: .85rem; margin-bottom: .35rem; }
.fq-gate-pin {
    height: 3rem; border-radius: 10px; text-align: center;
    font-size: 1.25rem; font-weight: 600; letter-spacing: .5em;
}
.fq-gate-pin::placeholder { letter-spacing: normal; font-size: 1rem; font-weight: 400; }
.fq-gate-pin:focus { border-color: #22847a; box-shadow: 0 0 0 .2rem rgba(34, 132, 122, .2); }
.fq-gate-error { color: #b54848; font-size: .875rem; margin-top: .6rem; text-align: left; }
.fq-gate .alert { border-radius: 8px; font-size: .875rem; padding: .6rem .9rem; margin: .75rem 0 0; text-align: left; }
.fq-gate .alert br:first-child { display: none; }
.fq-gate-btn { display: block; width: 100%; border-radius: 10px; font-weight: 600; padding: .65rem 1rem; }
.fq-gate-primary { background: #22847a; border: 1px solid #22847a; color: #fff; }
.fq-gate-primary:hover { background: #1b6e65; border-color: #1b6e65; color: #fff; }
.fq-gate-outline { background: #fff; border: 1px solid #e3e7ea; color: #2f3a4a; }
.fq-gate-outline:hover { border-color: #22847a; color: #22847a; }
.fq-gate-link { display: inline-block; margin-top: 1rem; font-size: .875rem; font-weight: 600; color: #22847a; }
.fq-gate-link:hover { color: #1b6e65; }
.fq-gate-divider { border-top: 1px solid #e3e7ea; margin: 1.5rem 0 1.25rem; }
@media (max-width: 576px) { .fq-gate { margin: 1rem auto; padding: 1.75rem 1.25rem; } }

    /* ---------- Change operator photo ---------- */
.fq-op-subject { flex-direction: row; align-items: center; gap: .85rem; }
.fq-op-subject img { width: 48px; height: 48px; object-fit: cover; flex-shrink: 0; }
.fq-op-subject > div { display: flex; flex-direction: column; }
.fq-crop-area { margin-top: .75rem; max-height: 320px; }
.fq-crop-area canvas { max-width: 100%; }
.fq-modal .custom-file-label { border-radius: 8px; }
    /* ---------- Setting help ---------- */
.fq-help-link { display: inline-flex; align-items: center; gap: .3rem; margin-top: .35rem; font-size: .8rem; font-weight: 600; color: #22847a; }
.fq-help-link:hover { color: #1b6e65; text-decoration: none; }
.fq-help-modal .modal-dialog { max-width: 560px; }
.fq-help-modal .modal-body { max-height: 65vh; }
.fq-help-img { display: block; width: 100%; height: auto; border-radius: 12px; margin-bottom: 1rem; }
.fq-help-lead { color: #2f3a4a; font-size: 1rem; margin-bottom: 1rem; }
.fq-help-section { margin-bottom: 1rem; }
.fq-help-section h6 { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #6b7780; margin-bottom: .4rem; }
.fq-help-section ul { padding-left: 1.1rem; margin: 0; }
.fq-help-section li { margin-bottom: .3rem; }
.fq-help-compare { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-bottom: 1rem; }
.fq-help-compare > div { background: #f5f7f8; border: 1px solid #e3e7ea; border-radius: 10px; padding: .75rem .9rem; font-size: .9rem; }
.fq-help-compare strong { display: block; color: #2f3a4a; margin-bottom: .25rem; font-size: .8rem; }
.fq-help-example { background: #e3f3f0; border-radius: 10px; padding: .75rem .9rem; font-size: .9rem; color: #2f3a4a; margin-bottom: 1rem; }
.fq-help-pro { display: inline-block; font-size: .7rem; font-weight: 700; background: #e3f3f0; color: #22847a; border-radius: 4px; padding: .1rem .35rem; margin-left: .25rem; }
@media (max-width: 576px) { .fq-help-compare { grid-template-columns: 1fr; } }
    /* ---------- Account page ---------- */
.fq-account { max-width: 980px; }
.fq-account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: start; }
.fq-account-grid .fq-card { margin-bottom: 0; }
.fq-acc-value { color: #4f5b63; text-align: right; word-break: break-all; }
.fq-acc-value.fq-expired { color: #b54848; font-weight: 600; }
.fq-plan-badge { display: inline-block; font-size: .8rem; font-weight: 700; border-radius: 999px; padding: .25rem .75rem; background: #e3f3f0; color: #22847a; }
.fq-plan-badge.fq-free { background: #eff1f3; color: #6b7780; }
.fq-acc-actions { display: flex; flex-wrap: wrap; gap: .5rem; padding-top: 1rem; }
.fq-sms-balance { display: flex; align-items: baseline; gap: .5rem; padding: 1.25rem 0 1rem; }
.fq-sms-count { font-size: 2.5rem; font-weight: 700; line-height: 1; color: #2f3a4a; }
.fq-sms-count.fq-low { color: #a16207; }
.fq-sms-unit { color: #6b7780; font-weight: 600; }
.fq-acc-back { margin-top: 1.25rem; }
@media (max-width: 768px) { .fq-account-grid { grid-template-columns: 1fr; } }
    /* ---------- Transactions page ---------- */
.fq-tx-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-bottom: 1.25rem; }
.fq-tx-stat { display: flex; align-items: center; gap: .85rem; margin-bottom: 0; }
.fq-tx-stat-label { color: #6b7780; font-size: .8rem; font-weight: 600; }
.fq-tx-stat-value { color: #2f3a4a; font-size: 1.35rem; font-weight: 700; line-height: 1.2; }
.fq-tx-card { padding-top: 1rem; }
.fq-tx-filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .75rem; }
.fq-chip { border: 1px solid #e3e7ea; background: #fff; color: #4f5b63; border-radius: 999px; padding: .3rem .9rem; font-size: .85rem; font-weight: 600; cursor: pointer; }
.fq-chip:hover { border-color: #8fd3ca; color: #22847a; }
.fq-chip.active { background: #22847a; border-color: #22847a; color: #fff; }
.fq-chip:focus { outline: none; box-shadow: 0 0 0 .2rem rgba(34, 132, 122, .2); }
.fq-tx-table { color: #4f5b63; }
.fq-tx-table thead th { border-top: 0; border-bottom: 1px solid #e3e7ea; color: #6b7780; font-size: .75rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.fq-tx-table td { border-top: 1px solid #eef1f3; vertical-align: middle; }
.fq-tx-table tbody tr:hover { background: #f5f7f8; }
.fq-tx-date { white-space: nowrap; color: #2f3a4a; font-weight: 600; }
.fq-tx-time { display: block; color: #6b7780; font-size: .8rem; font-weight: 400; }
.fq-tx-desc { display: flex; align-items: center; gap: .65rem; min-width: 220px; }
.fq-tx-type { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px; background: #e3f3f0; color: #22847a; flex-shrink: 0; }
.fq-tx-type .ph-duotone { font-size: 1.1rem; vertical-align: 0; }
.fq-tx-id { display: inline-flex; align-items: center; gap: .35rem; font-family: SFMono-Regular, Menlo, Consolas, monospace; font-size: .8rem; color: #6b7780; white-space: nowrap; }
.fq-tx-copy { border: 0; background: transparent; color: #8fd3ca; padding: 0 .2rem; cursor: pointer; }
.fq-tx-copy:hover { color: #22847a; }
.fq-tx-amount { text-align: right; white-space: nowrap; color: #2f3a4a; font-weight: 700; }
.fq-tx-none { text-align: center; color: #6b7780; padding: 1.5rem 0 .5rem; }
.fq-tx-skeleton .placeholder .phLine { margin: 6px 0; width: 80%; }
@media (max-width: 768px) { .fq-tx-stats { grid-template-columns: 1fr; } }
    /* ---------- Transactions: filters and charts ---------- */
.fq-tx {
    --tx-surface: #ffffff;
    --tx-sub: #2a9d8f;      /* Subscription (validated pair with SMS) */
    --tx-sms: #e9b44c;      /* SMS credits */
    --tx-other: #9aa4ab;    /* Other: neutral, de-emphasised */
    --tx-grid: #eef1f3;
    --tx-axis: #6b7780;
}
.fq-tx-filterbar { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; margin-bottom: 1.25rem; }
.fq-tx-filterbar .fq-tx-filters { margin-bottom: 0; align-items: center; }
.fq-tx-filter-label { font-size: .75rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #6b7780; margin-right: .25rem; }
.fq-tx-charts { display: grid; grid-template-columns: 3fr 2fr; gap: 1.25rem; margin-bottom: 1.25rem; }
.fq-tx-chart-card { margin-bottom: 0; position: relative; min-width: 0; }
.fq-tx-chart-title { font-weight: 700; color: #2f3a4a; }
.fq-tx-chart-sub { font-size: .8rem; color: #6b7780; margin-bottom: .75rem; }
.fq-tx-chart { position: relative; }
.fq-tx-chart svg { display: block; width: 100%; overflow: visible; }
.fq-tx-chart .tx-axis-text { font-size: 11px; fill: var(--tx-axis); font-variant-numeric: tabular-nums; }
.fq-tx-chart .tx-hit { fill: transparent; cursor: default; outline: none; }
.fq-tx-chart .tx-seg { cursor: default; outline: none; transition: opacity .15s; }
.fq-tx-chart .tx-seg:hover, .fq-tx-chart .tx-seg:focus { opacity: .8; }
.fq-tx-chart-empty { color: #6b7780; font-size: .9rem; padding: 2.5rem 0; text-align: center; }
.fq-tx-tip {
    position: absolute; z-index: 5; pointer-events: none; min-width: 150px;
    background: #fff; border: 1px solid #e3e7ea; border-radius: 10px;
    box-shadow: 0 .625rem 1.5rem rgba(0, 0, 0, .08); padding: .55rem .7rem; font-size: .8rem; color: #4f5b63;
}
.fq-tx-tip-head { font-weight: 600; color: #6b7780; margin-bottom: .2rem; }
.fq-tx-tip-total { font-size: 1rem; font-weight: 700; color: #2f3a4a; margin-bottom: .25rem; }
.fq-tx-tip-row { display: flex; align-items: center; gap: .45rem; }
.fq-tx-tip-row strong { color: #2f3a4a; margin-left: auto; padding-left: .75rem; }
.fq-tx-key { display: inline-block; width: 12px; height: 3px; border-radius: 2px; }
.fq-tx-legend { margin-top: 1rem; }
.fq-tx-inline-legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .8rem; color: #4f5b63; margin: -.35rem 0 .5rem; }
.fq-tx-inline-item { display: inline-flex; align-items: center; gap: .4rem; }
.fq-tx-legend-row { display: flex; align-items: center; gap: .6rem; padding: .45rem 0; border-top: 1px solid #eef1f3; font-size: .9rem; }
.fq-tx-legend-row:first-child { border-top: 0; }
.fq-tx-swatch { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
.fq-tx-legend-name { color: #2f3a4a; font-weight: 600; }
.fq-tx-legend-amount { margin-left: auto; color: #2f3a4a; font-weight: 700; font-variant-numeric: tabular-nums; }
.fq-tx-legend-pct { width: 3.2rem; text-align: right; color: #6b7780; font-variant-numeric: tabular-nums; }
.fq-tx-charts.fq-tx-refetch { opacity: .5; }
@media (max-width: 992px) { .fq-tx-charts { grid-template-columns: 1fr; } }
    /* ---------- Sidebar logo tile ---------- */
.fq-brand-tile { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; }  /* sidebar logo mark, drawn for the dark sidebar */
.fq-brand-tile img { width: auto; height: 38px; opacity: 1 !important; }
.sidebar-brand-text .fq-wordmark { display: block; height: 24px; width: auto; }

/* ---------- Invoices ---------- */
.fq-tx-invoice { border: 1px solid #e3e7ea; background: #fff; color: #22847a; border-radius: 8px; padding: .25rem .6rem; font-size: .8rem; font-weight: 600; white-space: nowrap; cursor: pointer; }
.fq-tx-invoice:hover { border-color: #8fd3ca; background: #e3f3f0; }
.fq-tx-invoice .ph-duotone { font-size: 1rem; }
.fq-invoice-modal .modal-dialog { max-width: 680px; }
.fq-invoice { border: 1px solid #e3e7ea; border-radius: 12px; padding: 1.5rem; color: #4f5b63; font-size: .9rem; }
.fq-inv-top { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.fq-inv-brand { font-size: 1.35rem; font-weight: 700; color: #22847a; }
.fq-inv-seller { color: #6b7780; font-size: .8rem; white-space: pre-line; }
.fq-inv-title { font-size: 1.2rem; font-weight: 700; letter-spacing: .08em; color: #2f3a4a; }
.fq-inv-paid { display: inline-flex; align-items: center; gap: .3rem; margin-top: .3rem; font-size: .75rem; font-weight: 700; color: #22847a; background: #e3f3f0; border-radius: 999px; padding: .15rem .6rem; }
.fq-inv-meta { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem 1.5rem; padding: 1rem 0; border-top: 1px solid #eef1f3; border-bottom: 1px solid #eef1f3; margin-bottom: 1rem; }
.fq-inv-meta span { display: block; font-size: .75rem; color: #6b7780; }
.fq-inv-meta strong { color: #2f3a4a; font-weight: 600; word-break: break-all; }
.fq-inv-table { width: 100%; margin-bottom: 1rem; }
.fq-inv-table th { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: #6b7780; background: #f5f7f8; padding: .5rem .6rem; }
.fq-inv-table td { padding: .65rem .6rem; border-bottom: 1px solid #eef1f3; color: #2f3a4a; font-variant-numeric: tabular-nums; }
.fq-inv-totals { margin-left: auto; max-width: 260px; }
.fq-inv-totals > div { display: flex; justify-content: space-between; padding: .25rem 0; font-variant-numeric: tabular-nums; }
.fq-inv-total { border-top: 1px solid #e3e7ea; margin-top: .25rem; padding-top: .5rem !important; font-weight: 700; color: #2f3a4a; }
.fq-inv-foot { margin-top: 1.25rem; color: #6b7780; font-size: .8rem; text-align: center; }
@media (max-width: 576px) { .fq-inv-meta { grid-template-columns: 1fr; } .fq-invoice { padding: 1rem; } }

/* ---------- Status pills, controls and count badges (Queue Manager and Operator portal) ---------- */
.fq-qm-controls { display: flex; align-items: center; gap: .5rem; }
.fq-qm-status { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 700; border-radius: 999px; padding: .3rem .75rem; margin-right: .25rem; white-space: nowrap; }
.fq-qm-status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.fq-qm-status.fq-running { background: #e3f3f0; color: #22847a; }
.fq-qm-status.fq-running::before { animation: fqPulse 1.6s ease-in-out infinite; }
.fq-qm-status.fq-stopped { background: #eff1f3; color: #6b7780; }
.fq-qm-status.fq-paused { background: #fbf1dc; color: #a16207; }
@keyframes fqPulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.fq-qm-controls .btn { font-weight: 600; border-radius: 8px; padding: .4rem .9rem; display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; }
.fq-qm-controls .btn .ph-duotone { font-size: 1.15rem; vertical-align: 0; }
.fq-btn-stop { background: #fff; border: 1px solid #e3c4c4; color: #b54848; }
.fq-btn-stop:hover { background: #b54848; border-color: #b54848; color: #fff; }
.fq-btn-pause { background: #fff; border: 1px solid #e7d6b3; color: #a16207; }
.fq-btn-pause:hover { background: #a16207; border-color: #a16207; color: #fff; }

.fq-serving-count { display: inline-flex; align-items: center; justify-content: center; min-width: 1.6rem; height: 1.6rem; padding: 0 .45rem; border-radius: 999px; background: #e3f3f0; color: #22847a; font-size: .8rem; font-weight: 700; }

/* ---------- Customer messages (Queue settings) ---------- */
.fq-msg-intro { margin: -.35rem 0 .75rem; }
.fq-msg-list { display: flex; flex-direction: column; gap: .6rem; }
.fq-msg { border: 1px solid var(--fq-border); border-radius: 12px; background: #fff; }
.fq-msg[open] { border-color: #cfd6db; box-shadow: 0 4px 14px rgba(47, 58, 74, .06); }
.fq-msg > summary { list-style: none; display: flex; align-items: center; gap: .75rem; padding: .85rem 1rem; cursor: pointer; border-radius: 12px; }
.fq-msg > summary::-webkit-details-marker { display: none; }
.fq-msg > summary:hover { background: #f8fafa; }
.fq-msg > summary:focus-visible { outline: 2px solid var(--fq-accent); outline-offset: 2px; }
.fq-msg-head { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fq-msg-title { font-weight: 600; color: var(--fq-text); }
.fq-msg-when { color: var(--fq-muted); font-size: .85rem; line-height: 1.4; }
.fq-msg-badge { flex-shrink: 0; font-size: .75rem; font-weight: 700; color: var(--fq-muted); background: #eff1f3; border-radius: 999px; padding: .2rem .65rem; white-space: nowrap; }
.fq-msg-badge.is-custom { color: #1b6e65; background: var(--fq-accent-soft); }
.fq-msg-caret { flex-shrink: 0; color: var(--fq-muted); font-size: 1.1rem; transition: transform .15s ease; }
.fq-msg[open] .fq-msg-caret { transform: rotate(180deg); }
.fq-msg-body { padding: 0 1rem 1rem; border-top: 1px solid var(--fq-border); }
.fq-msg-vars { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; padding: .75rem 0 .65rem; font-size: .82rem; color: var(--fq-muted); }
.fq-msg-vars-label { font-weight: 700; font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; margin-right: .1rem; }
.fq-msg-var { border: 1px solid #c2e4de; background: var(--fq-accent-soft); color: #1b6e65; border-radius: 6px; padding: .1rem .45rem; font: 600 .8rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; cursor: pointer; }
.fq-msg-var:hover { background: #d6eeea; }
.fq-msg-vars-help { flex-basis: 100%; }
.fq-msg-versions { display: flex; flex-direction: column; gap: .6rem; }
.fq-msg-version { display: grid; grid-template-columns: 1fr auto; column-gap: .4rem; }
.fq-msg-text { resize: vertical; min-height: 3.25rem; font-size: .92rem; line-height: 1.45; border-color: var(--fq-border); border-radius: 10px; }
.fq-msg-text:focus { border-color: var(--fq-accent); box-shadow: 0 0 0 3px rgba(34, 132, 122, .15); }
.fq-msg-text.is-invalid { border-color: var(--fq-danger); }
.fq-msg-remove { align-self: start; width: 36px; height: 36px; border: 1px solid var(--fq-border); background: #fff; color: var(--fq-muted); border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; }
.fq-msg-remove:hover { color: var(--fq-danger); border-color: #e3c4c4; background: #fbf5f5; }
.fq-msg-status { grid-column: 1 / -1; min-height: 1.2rem; margin-top: .25rem; font-size: .78rem; color: var(--fq-muted); }
.fq-msg-status .placeholder { margin: .35rem 0 0; }
.fq-msg-status.fq-msg-ok { color: var(--fq-muted); }
.fq-msg-status.fq-msg-warn { color: #a16207; }
.fq-msg-status.fq-msg-error { color: var(--fq-danger); font-weight: 600; }
.fq-msg-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .85rem; }
.fq-msg-reset { color: var(--fq-muted); font-weight: 600; }
.fq-msg-reset:hover { color: var(--fq-text); text-decoration: none; }
@media (max-width: 575px) {
    .fq-msg > summary { flex-wrap: wrap; }
    .fq-msg-badge { order: 3; margin-left: 0; }
}

/* ---------- Portal messages (Queue settings) ---------- */
.fq-portal-group { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--fq-muted); margin: .25rem 0 .5rem; }
.fq-portal-field { padding: .6rem 0; }
.fq-portal-field .fq-row-desc { margin-bottom: .45rem; }
.fq-portal-input { border-color: var(--fq-border); border-radius: 10px; }
.fq-portal-input:focus { border-color: var(--fq-accent); box-shadow: 0 0 0 3px rgba(34, 132, 122, .15); }
.fq-portal-input.is-invalid { border-color: var(--fq-danger); }
.fq-portal-preview { margin-top: .75rem; padding: 1.25rem 1rem; border-radius: 12px; background: #f5f7f8; border: 1px dashed #cfd6db; text-align: center; }
.fq-portal-preview-label { display: block; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--fq-muted); margin-bottom: .5rem; }
.fq-portal-preview-title { font-size: 1.6rem; font-weight: 800; color: #2f3a4a; line-height: 1.2; overflow-wrap: anywhere; }
.fq-portal-preview-lead { margin-top: .35rem; color: #4f5b63; overflow-wrap: anywhere; }

/* ---------- Token display screen (Queue settings) ---------- */
.fq-display-links { display: flex; flex-wrap: wrap; gap: .5rem; flex-shrink: 0; }
.fq-display-links .btn i { margin-right: .3rem; }
.fq-counter-field { padding: .45rem 0; }
.fq-counter-field .fq-row-title { font-weight: 600; font-size: .9rem; }
.fq-pro-badge { display: inline-flex; align-items: center; gap: .25rem; margin-left: .4rem; padding: .1rem .5rem; border-radius: 999px; background: #fbf1dc; color: #a16207; letter-spacing: .03em; vertical-align: 1px; }
.fq-display-upgrade { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding: .75rem 1rem; margin: .25rem 0 .5rem; border-radius: 12px; background: #fbf1dc; color: #7a4b05; font-size: .875rem; }
.fq-display-upgrade .btn i { margin-right: .3rem; }
.fq-pro-locked { opacity: .55; }
.fq-pro-locked .fq-row-title { cursor: default; }
.fq-display-voice { display: flex; gap: .5rem; align-items: center; }
.fq-display-voice .form-control { flex: 1 1 auto; min-width: 0; }
.fq-display-voice .btn { flex-shrink: 0; white-space: nowrap; }
.fq-display-voice .btn i, .fq-display-logo .btn i { margin-right: .3rem; }
.fq-display-logo { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; }
.fq-display-logo-preview { width: 220px; max-width: 100%; height: 72px; padding: .5rem .75rem; border: 1px dashed #cfd6db; border-radius: 12px; background: #f5f7f8; display: flex; align-items: center; }
.fq-display-logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.fq-display-logo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.fq-display-logo-actions label.btn.disabled { pointer-events: none; }
@media (max-width: 575px) {
    .fq-display-voice { flex-wrap: wrap; }
    .fq-display-voice .btn { width: 100%; }
}

/* Queue Manager top bar on phones: icon-only buttons (the label stays for screen readers and the tooltip) so Stop and the profile menu fit. */
@media (max-width: 575px) {
    .fq-qm-controls { gap: .35rem; }
    .fq-qm-controls .btn { padding: .45rem .6rem; }
    .fq-qm-controls .btn .ph-duotone { font-size: 1.35rem; }
    .fq-qm-controls .fq-btn-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
    .fq-qm-status { padding: .3rem .6rem; }
    #sidebarToggleTop { margin-right: .5rem !important; }
}

/* ---------- Devices (Queue settings) ---------- */
.fq-device-list { display: flex; flex-direction: column; gap: .5rem; margin-top: .5rem; }
.fq-device { display: flex; align-items: center; gap: .85rem; padding: .75rem .9rem; border: 1px solid var(--fq-border); border-radius: 12px; }
.fq-device-icon { width: 40px; height: 40px; flex-shrink: 0; border-radius: 11px; background: var(--fq-accent-soft); color: var(--fq-accent-strong); display: inline-flex; align-items: center; justify-content: center; font-size: 1.35rem; }
.fq-device-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fq-device-text strong { color: #2f3a4a; overflow-wrap: anywhere; }
.fq-device-text span { font-size: .82rem; color: var(--fq-muted); }
.fq-device-remove { color: var(--fq-danger); font-weight: 600; flex-shrink: 0; }
.fq-device-remove:hover { color: var(--fq-danger); }
.fq-device-empty { display: flex; gap: .85rem; align-items: flex-start; padding: .9rem 1rem; border-radius: 12px; background: #f5f7f8; }
.fq-device-empty .ph-duotone { font-size: 1.6rem; color: var(--fq-muted); }
.fq-device-empty div { display: flex; flex-direction: column; font-size: .875rem; color: var(--fq-muted); }
.fq-device-empty strong { color: #2f3a4a; }
.fq-device-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.fq-device-form .fq-select { max-width: 230px; }
.fq-device-form .form-control { flex: 1 1 220px; min-width: 0; }
.fq-device-form .btn i { margin-right: .3rem; }
.fq-device-code { margin-top: .75rem; padding: 1.25rem; border-radius: 14px; background: var(--fq-accent-soft); text-align: center; }
.fq-device-code-label { font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #1b6e65; }
.fq-device-code-value { font-size: 2.6rem; font-weight: 800; letter-spacing: .12em; color: #2f3a4a; font-variant-numeric: tabular-nums; margin: .25rem 0; }
.fq-device-code-how { font-size: .875rem; color: #4f5b63; overflow-wrap: anywhere; }
.fq-device-code-left { margin-top: .35rem; font-size: .8rem; color: var(--fq-muted); }
@media (max-width: 575px) {
    .fq-device { flex-wrap: wrap; }
    .fq-device-form .fq-select, .fq-device-form .btn { max-width: none; width: 100%; }
}
