/* Semantic palette adapters. Do not recolor receipts, logos, product media or status alerts. */
.product-option-badges {
    display: flex;
    min-width: 165px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
}
.product-option-badge {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    max-width: 220px;
    padding: 4px 10px;
    border: 1px solid var(--theme-line, #e4dde8);
    border-radius: 999px;
    background: var(--theme-soft, #efecfa);
    color: var(--theme-hover, #594da0);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
}
.product-option-badge--inactive {
    border-color: #d8dfe7;
    background: #f1f3f5;
    color: #526174;
}
:root {
    --dashboard-border: var(--theme-line);
    --dashboard-muted: var(--theme-muted);
}
.master-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}
.master-kpi-grid--supporting {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.master-kpi {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px;
    border: 1px solid var(--theme-line);
    border-radius: 12px;
    background: #fff;
    color: var(--theme-ink);
    text-decoration: none;
    min-width: 0;
}
.master-kpi-label,
.master-kpi small {
    color: var(--theme-muted);
    font-size: 13px;
}
.master-kpi-value {
    font-size: 23px;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}
.master-kpi--hero {
    padding: 22px;
    border-top: 3px solid var(--theme-brand);
}
.master-kpi--hero .master-kpi-value {
    font-size: 30px;
}
.master-kpi--warn {
    border-left: 4px solid #995200;
    background: #fff4df;
}
.master-kpi--warn .master-kpi-value {
    color: #995200;
}
.master-kpi--bad {
    border-left: 4px solid #b3261e;
    background: #fdecea;
}
.master-kpi--bad .master-kpi-value {
    color: #b3261e;
}
a.master-kpi:hover {
    border-color: var(--theme-brand);
    box-shadow: 0 0 0 2px var(--theme-soft);
}
.desktop-workspace .page-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--theme-ink);
}
.desktop-workspace .page-subtitle {
    font-size: 14px;
    line-height: 1.6;
    color: var(--theme-muted);
    max-width: 85ch;
}
.desktop-workspace .section-title {
    margin: 28px 0 14px;
    font-size: 16px;
    font-weight: 700;
    color: var(--theme-ink);
}
.desktop-workspace .muted,
.desktop-workspace .text-secondary,
.desktop-workspace .text-muted,
.desktop-workspace .sidebar .app-nav-category,
.desktop-workspace .location-title small {
    color: var(--theme-muted) !important;
}
.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0;
}
.quick-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.badge-status {
    display: inline-block;
    border-radius: 20px;
    padding: 4px 10px;
    background: #edf0f4;
    color: #526174;
    font-size: 13px;
}
.badge-status--active {
    background: #e3f5ee;
    color: #176447;
}
.desktop-workspace .sidebar .nav-item.active > .nav-link {
    background: var(--theme-soft) !important;
}
.desktop-workspace .sidebar .nav-item.active .menu-title,
.desktop-workspace .sidebar .nav-item.active .menu-icon {
    color: var(--theme-brand) !important;
}
@media (min-width: 992px) {
    .desktop-workspace .navbar .navbar-brand-wrapper {
        width: 84px;
        min-width: 84px;
        padding: 0 16px;
    }
    .desktop-workspace .navbar .navbar-menu-wrapper {
        width: calc(100% - 84px);
        flex: 1;
    }
    .desktop-workspace .branch-switch .form-select {
        width: 280px;
        max-width: 280px;
    }
}
@media (max-width: 767px) {
    .master-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .master-kpi--hero .master-kpi-value {
        font-size: 24px;
    }
}
@media (max-width: 420px) {
    .master-kpi-grid {
        grid-template-columns: 1fr;
    }
}
body.subscription-page {
    --sub-ink: var(--theme-ink);
    --sub-blue: var(--theme-brand);
    background-color: var(--theme-background);
}
body.auth-shell,
body.auth-page {
    background-color: var(--theme-background);
}
.simple-pos {
    --simple-navy: var(--theme-ink);
    --simple-teal: var(--theme-brand);
}
.pos-payment-buttons .btn[aria-pressed='true'] {
    background: var(--theme-brand) !important;
    border-color: var(--theme-brand) !important;
    color: #fff !important;
}
.sub-button-primary:hover {
    background: var(--theme-hover);
    border-color: var(--theme-hover);
}
.gradient-text {
    background-image: linear-gradient(95deg, var(--theme-brand), var(--theme-hover)) !important;
}
.pharmacy-pos .pharmacy-pay {
    color: var(--theme-accent-ink);
}
.pharmacy-pos .pharmacy-pay:hover {
    background: var(--theme-brand);
    color: #fff;
}
a:not([class]):hover {
    color: var(--theme-hover);
}
:where(button, a, input, select, textarea):focus-visible {
    outline: 2px solid var(--theme-brand);
    outline-offset: 3px;
}
.btn-primary,
.btn-gradient-primary {
    background: var(--theme-brand) !important;
    border-color: var(--theme-brand) !important;
    color: #fff !important;
}
.btn-primary:hover,
.btn-gradient-primary:hover {
    background: var(--theme-hover) !important;
    border-color: var(--theme-hover) !important;
}
.btn-secondary,
.btn-teal {
    background: var(--theme-brand) !important;
    border-color: var(--theme-brand) !important;
    color: #fff !important;
}
.btn-secondary:hover,
.btn-teal:hover {
    background: var(--theme-hover) !important;
    border-color: var(--theme-hover) !important;
}
.btn-accent {
    background: var(--theme-accent);
    color: var(--theme-accent-ink);
}
/* Success stays green regardless of decorative brand accents. */
.btn-success {
    background: #167344 !important;
    border-color: #167344 !important;
    color: #fff !important;
}
.btn-success:hover,
.btn-success:focus {
    background: #105b35 !important;
    border-color: #105b35 !important;
}
