* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f7fb;
    color: #1f2937;
}

a {
    color: inherit;
    text-decoration: none;
}

.app-shell {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: linear-gradient(180deg, #102542 0%, #163967 100%);
    color: #fff;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.sidebar-brand,
.topbar,
.section-head,
.button-row,
.actions,
.inline-form,
.invoice-totals > div {
    display: flex;
    align-items: center;
}

.sidebar-brand {
    gap: 12px;
}

.brand-mark {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: #f59e0b;
    color: #0f172a;
    font-weight: 800;
    letter-spacing: 1px;
}

.brand-mark.small {
    width: 44px;
    height: 44px;
    border-radius: 12px;
}

.brand-title {
    font-size: 20px;
    font-weight: 700;
}

.brand-subtitle,
.muted,
.user-role,
.small {
    color: #6b7280;
    font-size: 13px;
}

.sidebar .brand-subtitle,
.sidebar .user-role,
.sidebar .field span {
    color: rgba(255, 255, 255, 0.75);
}

.nav {
    display: grid;
    gap: 8px;
}

.nav-link {
    padding: 12px 14px;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.82);
    background: transparent;
    transition: background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.user-name {
    font-size: 16px;
    font-weight: 700;
}

.main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    justify-content: space-between;
    padding: 22px 28px 12px;
}

.topbar h1 {
    margin: 0 0 6px;
    font-size: 28px;
}

.content {
    padding: 0 28px 28px;
}

.grid {
    display: grid;
    gap: 18px;
}

.stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 18px;
}

.two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.top-align {
    align-items: start;
}

.form-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
    background: #fff;
    border: 1px solid #dbe2ea;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 10px 32px rgba(15, 23, 42, 0.05);
    margin-bottom: 18px;
}

.stat-card {
    min-height: 132px;
}

.stat-label {
    color: #6b7280;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stat-value {
    margin-top: 12px;
    font-size: 30px;
    font-weight: 800;
}

.success {
    color: #15803d;
}

.danger {
    color: #b91c1c;
}

.section-head {
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.section-head h2 {
    margin: 0;
    font-size: 22px;
}

.field,
.stack-lg,
.stack-md {
    display: grid;
}

.stack-lg {
    gap: 16px;
}

.stack-md {
    gap: 12px;
}

.field {
    gap: 6px;
}

.field span {
    font-size: 13px;
    color: #4b5563;
    font-weight: 600;
}

input,
select,
textarea,
button {
    font: inherit;
}

input,
select,
textarea {
    width: 100%;
    padding: 11px 12px;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #0f172a;
}

textarea {
    resize: vertical;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.checkbox input {
    width: auto;
}

.btn {
    border: none;
    border-radius: 12px;
    padding: 11px 16px;
    cursor: pointer;
    font-weight: 700;
}

.btn-sm {
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 13px;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: #1d4ed8;
    color: #fff;
}

.btn-secondary {
    background: #e2e8f0;
    color: #0f172a;
}

.btn-danger {
    background: #dc2626;
    color: #fff;
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.button-row,
.actions,
.inline-form {
    gap: 10px;
    flex-wrap: wrap;
}

.inline-label {
    margin-right: 6px;
    font-size: 13px;
    color: #4b5563;
}

.table-wrap {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px 10px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
}

.table th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7280;
}

.compact-table input,
.compact-table select {
    padding: 9px 10px;
}

.text-right {
    text-align: right !important;
}

.empty {
    text-align: center;
    color: #6b7280;
    padding: 20px 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.callout {
    padding: 12px 14px;
    border-radius: 12px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
}

.alert {
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-weight: 600;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
}

.invoice-totals {
    margin-left: auto;
    width: min(100%, 360px);
    border-top: 1px solid #dbe2ea;
    padding-top: 12px;
    display: grid;
    gap: 10px;
}

.invoice-totals > div {
    justify-content: space-between;
    gap: 12px;
}

.invoice-totals .grand {
    border-top: 2px solid #cbd5e1;
    padding-top: 10px;
    font-size: 18px;
}

.invoice-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 16px;
    align-items: center;
    margin-bottom: 16px;
}

.invoice-logo-wrap {
    max-width: 120px;
}

.invoice-logo {
    max-width: 100%;
    height: auto;
    display: block;
}

.invoice-company {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 6px;
}

.invoice-config-logo {
    max-width: 140px;
    display: block;
    margin-top: 10px;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.print-card {
    background: #fffef8;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: radial-gradient(circle at top, #dbeafe, #f8fafc 55%);
}

.login-card {
    width: min(100%, 460px);
    background: #fff;
    border-radius: 24px;
    padding: 32px;
    border: 1px solid #dbe2ea;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
}

.login-card h1 {
    margin: 18px 0 8px;
}

.login-card p {
    margin: 0 0 24px;
    color: #64748b;
}

.login-note {
    margin-top: 18px;
    padding: 14px;
    background: #f8fafc;
    border-radius: 12px;
    color: #475569;
}

.mt-8 {
    margin-top: 8px;
}

.mt-12 {
    margin-top: 12px;
}

.mt-16 {
    margin-top: 16px;
}

hr {
    border: 0;
    border-top: 1px solid #e5e7eb;
    margin: 16px 0;
}

@media (max-width: 1100px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        gap: 14px;
    }

    .stats-grid,
    .two-col,
    .form-grid-2,
    .form-grid-3 {
        grid-template-columns: 1fr;
    }
}

@media print {
    .sidebar,
    .topbar,
    .btn,
    form,
    .alert,
    .card:not(.print-card) {
        display: none !important;
    }

    body,
    .main,
    .content {
        background: #fff;
        padding: 0;
        margin: 0;
    }

    .print-card {
        box-shadow: none;
        border: none;
        padding: 0;
        margin: 0;
    }
}

.badge-info {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge-warning {
    background: #fef3c7;
    color: #b45309;
}

.billing-groups {
    display: grid;
    gap: 14px;
}

.billing-group {
    border: 1px solid #dbe2ea;
    border-radius: 16px;
    background: #f8fbff;
    overflow: hidden;
}

.billing-group summary {
    list-style: none;
    cursor: pointer;
}

.billing-group summary::-webkit-details-marker {
    display: none;
}

.billing-group-summary {
    display: grid;
    grid-template-columns: 54px minmax(220px, 2fr) repeat(3, minmax(120px, 1fr));
    gap: 14px;
    align-items: center;
    padding: 18px;
}

.billing-toggle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #1d4ed8;
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease;
}

.billing-group[open] .billing-toggle {
    transform: rotate(45deg);
    background: #0f766e;
}

.billing-customer-name {
    font-size: 18px;
    font-weight: 800;
}

.billing-metric {
    display: grid;
    gap: 4px;
}

.billing-metric span {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7280;
}

.billing-metric strong {
    font-size: 18px;
}

.billing-group-body {
    background: #fff;
    border-top: 1px solid #dbe2ea;
    padding: 6px 18px 18px;
}

.billing-detail-table th,
.billing-detail-table td {
    font-size: 14px;
}

@media (max-width: 1100px) {
    .billing-group-summary {
        grid-template-columns: 1fr;
    }
}

.nav-group {
    display: grid;
    gap: 6px;
}

.nav-group-title {
    padding: 6px 14px 2px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.58);
}

.nav-sublink {
    margin-left: 18px;
    width: calc(100% - 18px);
}

/* Report Styles */
.report-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.tab-link {
    padding: 12px 16px;
    text-decoration: none;
    color: #6b7280;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    font-weight: 600;
}

.tab-link:hover {
    color: #374151;
    background: #f9fafb;
}

.tab-link.active {
    color: #1d4ed8;
    border-bottom-color: #1d4ed8;
}

.report-filters {
    display: grid;
    gap: 16px;
}

.form-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.filter-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.table-controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.table-wrap {
    overflow-x: auto;
    margin-bottom: 16px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}

.customer-group-header .customer-group-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

.customer-group-toggle-btn:hover {
    text-decoration: underline;
}

.toggle-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    background: #e2e8f0;
    color: #0f172a;
    font-weight: 700;
}

.customer-toggle-meta {
    color: #334155;
    font-size: 0.95rem;
    font-weight: 400;
}

.customer-group-row.group-row-hidden {
    display: none;
}

@media (max-width: 768px) {
    .form-grid-4 {
        grid-template-columns: 1fr;
    }

    .report-tabs {
        flex-wrap: wrap;
    }

    .tab-link {
        flex: 1;
        text-align: center;
        min-width: 120px;
    }
}

/* ── Import Cards ─────────────────────────────────── */
.hint-text {
    font-size: 0.85rem;
    color: #475569;
    margin-bottom: 14px;
    line-height: 1.6;
}

.hint-text code {
    background: #e2e8f0;
    color: #1e40af;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.82rem;
    font-family: "Courier New", monospace;
}


.import-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-right: 4px;
}

.import-stat-inserted { background: #dcfce7; color: #166534; }
.import-stat-updated  { background: #dbeafe; color: #1e40af; }
.import-stat-skipped  { background: #fef3c7; color: #92400e; }

/* CSV preview row highlight */
#product-preview-table tbody tr td:first-child,
#customer-preview-table tbody tr td:first-child {
    font-weight: 600;
    color: #1e293b;
}

/* ── Icon Action Buttons ──────────────────────────── */
.actions-icon {
    white-space: nowrap;
}

.actions-icon form {
    display: inline-block;
    margin: 0;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    vertical-align: middle;
    text-decoration: none;
    color: inherit;
    padding: 0;
}

.icon-btn svg {
    display: block;
    flex-shrink: 0;
}

/* Edit — blue tint */
.icon-btn-edit {
    color: #2563eb;
    border-color: #bfdbfe;
    background: #eff6ff;
}
.icon-btn-edit:hover {
    background: #dbeafe;
    border-color: #93c5fd;
}

/* Disable — amber tint */
.icon-btn-disable {
    color: #d97706;
    border-color: #fde68a;
    background: #fffbeb;
}
.icon-btn-disable:hover {
    background: #fef3c7;
    border-color: #fcd34d;
}

/* Enable — green tint */
.icon-btn-enable {
    color: #16a34a;
    border-color: #bbf7d0;
    background: #f0fdf4;
}
.icon-btn-enable:hover {
    background: #dcfce7;
    border-color: #86efac;
}

/* Delete — red tint */
.icon-btn-delete {
    color: #dc2626;
    border-color: #fecaca;
    background: #fff1f2;
}
.icon-btn-delete:hover {
    background: #fee2e2;
    border-color: #fca5a5;
}

/* Tooltip via title — native browser tooltip is fine, but add spacing */
.icon-btn + .icon-btn,
.icon-btn + form,
form + .icon-btn,
form + form {
    margin-left: 4px;
}

/* ── Collapsible Import Panel ─────────────────────── */
.import-panel {
    padding: 0;
    overflow: hidden;
    margin-bottom: 16px;
}

.import-panel-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
    text-align: left;
    transition: background 0.15s;
    gap: 8px;
}

.import-panel-toggle:hover {
    background: #f1f5f9;
}

.import-panel-toggle[aria-expanded="true"] {
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.import-panel-toggle-left {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #2563eb;
}

.import-panel-toggle-left svg {
    color: #2563eb;
    flex-shrink: 0;
}

.import-panel-chevron {
    color: #94a3b8;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
}

.import-panel-toggle[aria-expanded="true"] .import-panel-chevron {
    transform: rotate(180deg);
}

.import-panel-body {
    padding: 0;
}

.import-panel-inner {
    padding: 16px 18px 18px;
}

.import-panel-desc {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.import-panel-desc .hint-text {
    margin-bottom: 0;
    flex: 1;
}

.import-form-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.import-form-btns {
    display: flex;
    gap: 8px;
    align-items: center;
    padding-bottom: 1px;
}

/* ── Customer Autocomplete Combo ─────────────────── */
.ac-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.ac-input {
    flex: 1;
    min-width: 0;
    padding: 0.45rem 2.2rem 0.45rem 0.65rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    background: #fff;
    color: #1e293b;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.ac-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
    z-index: 1;
}

.ac-input.ac-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

/* Arrow toggle button — sits inside the wrap, overlaps the input on the right */
.ac-arrow {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 2rem;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 6px 6px 0;
    transition: color 0.15s, background 0.15s;
    z-index: 2;
}

.ac-arrow:hover {
    color: #334155;
    background: rgba(0,0,0,0.04);
}

.ac-open .ac-arrow {
    color: #6366f1;
}

/* Dropdown list */
.ac-list {
    display: none;
    position: absolute;
    top: calc(100% + 3px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.13);
    max-height: 260px;
    overflow-y: auto;
    z-index: 9999;
    list-style: none;
    padding: 4px 0;
    margin: 0;
}

.ac-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    cursor: pointer;
    gap: 10px;
    transition: background 0.08s;
    list-style: none;
}

.ac-item:hover,
.ac-item.ac-active {
    background: #f1f5f9;
}

.ac-name {
    font-size: 0.88rem;
    font-weight: 500;
    color: #1e293b;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ac-meta {
    font-size: 0.78rem;
    color: #94a3b8;
    white-space: nowrap;
    flex-shrink: 0;
}

.ac-no-results {
    padding: 10px 14px;
    font-size: 0.85rem;
    color: #94a3b8;
    list-style: none;
    text-align: center;
}

/* ── Invoice Modal ───────────────────────────────── */
.inv-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(2px);
}

.inv-modal {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.22);
    width: 100%;
    max-width: 860px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.inv-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
    background: #f8fafc;
}

.inv-modal-header h2 {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.inv-modal-header-btns {
    display: flex;
    align-items: center;
    gap: 8px;
}

.inv-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    color: #1e293b;
}

.inv-modal-loading {
    text-align: center;
    padding: 40px;
    color: #94a3b8;
    font-size: 0.9rem;
}

/* Invoice content inside modal */
.inv-doc-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.inv-doc-logo {
    max-height: 70px;
    max-width: 140px;
    object-fit: contain;
}

.inv-doc-company { font-weight: 700; font-size: 1.05rem; margin-bottom: 4px; }
.inv-doc-company-sub { font-size: 0.82rem; color: #475569; line-height: 1.6; }
.inv-doc-meta { text-align: right; font-size: 0.85rem; line-height: 1.8; }
.inv-doc-meta strong { color: #6366f1; font-size: 1.2rem; display: block; margin-bottom: 4px; }

.inv-doc-parties {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 14px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 18px;
    font-size: 0.85rem;
    line-height: 1.7;
}

.inv-doc-party-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
    margin-bottom: 4px;
}

.inv-doc-party-name { font-weight: 700; font-size: 0.92rem; }

.inv-doc-totals {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    margin-top: 14px;
}

.inv-doc-totals .inv-total-row {
    display: flex;
    gap: 24px;
    font-size: 0.85rem;
    justify-content: flex-end;
}

.inv-doc-totals .inv-total-row span { color: #64748b; min-width: 80px; text-align: right; }
.inv-doc-totals .inv-total-row strong { min-width: 100px; text-align: right; font-weight: 500; }

.inv-doc-totals .inv-grand-row {
    display: flex;
    gap: 24px;
    font-size: 1rem;
    font-weight: 700;
    border-top: 2px solid #e2e8f0;
    padding-top: 8px;
    margin-top: 4px;
    justify-content: flex-end;
}

.inv-doc-totals .inv-grand-row span { color: #1e293b; min-width: 80px; text-align: right; }
.inv-doc-totals .inv-grand-row strong { color: #6366f1; min-width: 100px; text-align: right; }

/* Print: only show modal content */
@media print {
    body > *:not(#invoice-modal-overlay) { display: none !important; }
    .inv-modal-overlay { position: static !important; background: none !important; padding: 0 !important; display: block !important; }
    .inv-modal { box-shadow: none !important; max-height: none !important; border-radius: 0 !important; }
    .inv-modal-header { display: none !important; }
    .inv-modal-body { padding: 0 !important; }
}

/* ── Billing Search Autocomplete ─────────────────── */
.ac-search-item[data-value] { cursor: pointer; }

/* ── Note / ref-tag in billing table ─────────────── */
.note-cell { max-width: 160px; font-size: 0.78rem; color: #64748b; }
.ref-tag {
    display: inline-block;
    background: #e0f2fe;
    color: #0369a1;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 0.72rem;
    font-weight: 600;
    margin-left: 4px;
    white-space: nowrap;
}
