:root { --cr-radius: 8px; }
.card { border-radius: var(--cr-radius); }
.card-header { border-top-left-radius: var(--cr-radius); border-top-right-radius: var(--cr-radius); }
.table thead.sticky-top { top: 0; background: #fff; }
.navbar .dropdown-menu { border-radius: 12px; }
.form-control, .form-select, .btn { border-radius: 10px; }
.alert { border-radius: 12px; }
.chart-card canvas { width: 100% !important; height: 100% !important; }
html, body { max-width: 100%; overflow-x: hidden; }
img, canvas, svg { max-width: 100%; }
.table-responsive { -webkit-overflow-scrolling: touch; }
.card-header { gap: .5rem; }
.main-content h1, .main-content h2 { overflow-wrap: anywhere; }
.main-content, .main-content-area { min-width: 0; }
.main-content > .container, .main-content > .container-fluid { max-width: 100%; }

.sidebar .nav,
.sidebar .nav.flex-column,
.sidebar-tree {
    flex-wrap: nowrap !important;
}

.sidebar .nav-item {
    width: 100%;
    flex: 0 0 auto;
}

.sidebar .collapse {
    width: 100%;
    min-width: 0;
}

.sidebar ul.nav {
    overflow-x: hidden;
}

.sidebar-tree,
.sidebar-tree .nav-link {
    width: 100%;
    max-width: 100%;
}

.app-update-banner {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translate(-50%, calc(100% + 32px));
    z-index: 2100;
    width: min(520px, calc(100% - 24px));
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: .65rem;
    align-items: center;
    padding: .8rem;
    background: #111827;
    color: #fff;
    border-radius: 8px;
    box-shadow: 0 16px 38px rgba(15, 23, 42, .28);
    transition: transform .2s ease;
}

.app-update-banner.show {
    transform: translate(-50%, 0);
}

.app-update-banner.is-applying {
    background: #0f172a;
}

.app-update-banner.is-done {
    background: #14532d;
}

.app-update-banner.is-error {
    background: #7f1d1d;
}

.app-update-banner .btn:disabled {
    opacity: .82;
    cursor: wait;
}

.app-update-copy {
    min-width: 0;
    display: grid;
    gap: .1rem;
}

.app-update-copy span {
    color: rgba(255,255,255,.78);
    font-size: .88rem;
}

.app-update-dismiss {
    width: 36px;
    min-width: 36px;
    padding-left: 0;
    padding-right: 0;
}

.app-status-page,
.report-page,
.dashboard-page,
.timesheet-page {
    max-width: 100%;
    overflow-x: clip;
}

.app-status-card {
    border: 1px solid rgba(15, 23, 42, .08);
    box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
}

.app-status-row {
    display: grid;
    grid-template-columns: minmax(120px, 38%) 1fr;
    gap: .75rem;
    align-items: center;
    padding: .7rem 0;
    border-bottom: 1px solid rgba(15, 23, 42, .07);
}

.app-status-row:last-child {
    border-bottom: 0;
}

.app-status-row span {
    color: #64748b;
    font-size: .93rem;
}

.app-status-row strong {
    min-width: 0;
    overflow-wrap: anywhere;
    text-align: right;
}

.app-status-row-stack {
    grid-template-columns: 1fr;
    gap: .25rem;
}

.app-status-row-stack strong {
    text-align: left;
}

.app-status-pill,
.push-status-row strong {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: .18rem .55rem;
    border-radius: 999px;
    background: #e5e7eb;
    color: #374151;
    font-size: .88rem;
}

.app-status-pill.is-ok,
.push-status-row strong.is-ok {
    background: #dcfce7;
    color: #166534;
}

.app-status-pill.is-warning,
.push-status-row strong.is-warning {
    background: #fef3c7;
    color: #92400e;
}

.app-status-pill.is-danger,
.push-status-row strong.is-danger {
    background: #fee2e2;
    color: #991b1b;
}

.app-status-pill.is-muted,
.push-status-row strong.is-muted {
    background: #f1f5f9;
    color: #64748b;
}

.app-checklist {
    padding-left: 1.15rem;
}

.app-checklist li {
    margin-bottom: .55rem;
}

.report-page .card,
.dashboard-page .card,
.timesheet-page .card {
    overflow: hidden;
}

.report-page .card-header,
.dashboard-page .card-header,
.timesheet-page .card-header {
    min-width: 0;
}

.report-card-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: .35rem;
}

.report-scroll-panel {
    width: 100%;
    max-width: 100%;
    max-height: 400px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.report-chart-box {
    position: relative;
    min-height: 260px;
}

.report-chart-box canvas {
    width: 100% !important;
    max-width: 100% !important;
}

.tx-filter-panel {
    border: 1px solid rgba(15, 23, 42, .07);
}

.dashboard-kpi-card h2,
.dashboard-store-kpi .fs-5,
.timesheet-page .fs-3 {
    overflow-wrap: anywhere;
}

.timesheet-toolbar {
    min-width: 0;
}

.timesheet-toolbar form {
    min-width: min(100%, 280px);
}

body.login-page {
    background: #0f172a;
}

.login-card input.form-control {
    border-radius: 10px;
}

.login-card .btn {
    border-radius: 12px;
}

.login-card .btn.is-loading {
    cursor: wait;
    opacity: .92;
}

@media (max-width: 991.98px) {
    .topbar {
        padding-left: .75rem !important;
        padding-right: .75rem !important;
    }

    .topbar .dashboard-logo img {
        height: 30px;
    }

    .main-content {
        padding: 1.5rem 1.5rem 1.25rem !important;
    }

    .main-content > .container,
    .main-content > .container-fluid {
        padding-left: .75rem !important;
        padding-right: .75rem !important;
        max-width: 100% !important;
    }

    .sidebar {
        width: 225px !important;
        max-width: 225px !important;
        box-shadow: none;
    }

    .sidebar.show {
        box-shadow: 12px 0 28px rgba(15, 23, 42, .28);
    }

    .sidebar .nav-link {
        min-height: 44px;
        padding: .72rem 1rem !important;
    }

    .topbar .form-select,
    .topbar .form-control {
        min-height: 38px;
        font-size: 16px;
    }
}

@media (max-width: 767.98px) {
    body {
        font-size: 15px !important;
    }

    .main-content h1 {
        font-size: 1.45rem;
        margin-bottom: 1rem !important;
    }

    .main-content h2 {
        font-size: 1.25rem;
        line-height: 1.25;
        margin-bottom: 1rem !important;
    }

    .card {
        border-radius: 10px !important;
    }

    .card-header {
        flex-wrap: wrap;
        align-items: center !important;
        padding: .75rem .85rem;
    }

    .card-body {
        padding: .85rem !important;
    }

    .btn {
        min-height: 42px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: .35rem;
    }

    .btn-sm {
        min-height: 36px;
        padding-left: .65rem;
        padding-right: .65rem;
    }

    .form-control,
    .form-select {
        min-height: 42px;
        font-size: 16px;
    }

    .modal-dialog {
        margin: .5rem;
        max-width: calc(100% - 1rem);
    }

    .modal-content {
        max-height: calc(100vh - 1rem);
    }

    .modal-body {
        overflow-y: auto;
    }

    .modal-footer {
        gap: .5rem;
    }

    .modal-footer .btn {
        flex: 1 1 auto;
    }

    .table {
        font-size: .9rem;
    }

    .app-update-banner {
        bottom: 10px;
        grid-template-columns: 1fr auto;
        align-items: stretch;
    }

    .app-update-dismiss {
        position: absolute;
        top: 6px;
        right: 6px;
        min-height: 30px;
    }

    .app-update-copy {
        padding-right: 28px;
    }

    .app-status-actions {
        width: 100%;
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .app-status-actions .btn {
        min-width: 0;
        padding-left: .45rem;
        padding-right: .45rem;
    }

    .app-status-row {
        grid-template-columns: 1fr;
        gap: .2rem;
    }

    .app-status-row strong {
        text-align: left;
    }

    .app-status-pill {
        justify-self: start;
    }

    .main-content table.table {
        width: 100%;
    }

    .chart-wrapper,
    .yoy-chart-wrapper {
        min-height: 260px !important;
        height: 260px !important;
    }

    .login-container {
        align-items: center !important;
        padding: 1rem;
    }

    .login-card {
        max-width: 100% !important;
        margin: 0 auto;
        border-radius: 14px !important;
    }

    .login-card .card-body {
        max-height: inherit;
        overflow-y: auto;
        padding: 1.5rem 1.15rem !important;
    }

    .login-logo {
        height: 56px !important;
        margin-bottom: 1rem !important;
    }

    .report-page,
    .dashboard-page,
    .timesheet-page {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .report-page > h2,
    .dashboard-page > h1,
    .timesheet-page h2 {
        padding-left: .15rem;
        padding-right: .15rem;
    }

    .report-page .row,
    .dashboard-page .row,
    .timesheet-page .row {
        --bs-gutter-x: .75rem;
    }

    .report-page .card-header {
        align-items: center !important;
    }

    .report-page .card-header > span,
    .report-page .card-header .card-title,
    .dashboard-page .card-title {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .report-card-actions {
        margin-left: auto;
    }

    .report-scroll-panel {
        max-height: min(60vh, 430px);
    }

    .report-chart-box {
        min-height: 250px;
    }

    .tx-filter-panel .form-check {
        min-height: 34px;
        display: flex;
        align-items: center;
    }

    .tx-card .card-body > div,
    .mobile-product-item .card-body > div {
        display: flex;
        justify-content: space-between;
        gap: .75rem;
        border-bottom: 1px solid rgba(15, 23, 42, .06);
        padding: .22rem 0;
    }

    .tx-card .card-body > div:last-child,
    .mobile-product-item .card-body > div:last-child {
        border-bottom: 0;
    }

    .dashboard-store-kpi .row > [class*="col-"] {
        text-align: left !important;
        margin-bottom: .75rem;
    }

    .dashboard-store-kpi .btn {
        width: 100%;
    }

    .timesheet-page > .d-flex:first-child {
        align-items: stretch !important;
    }

    .timesheet-toolbar {
        width: 100%;
        display: grid !important;
        grid-template-columns: 1fr auto;
    }

    .timesheet-toolbar form {
        min-width: 0;
        width: 100%;
    }

    .timesheet-page .table-responsive {
        border-top: 1px solid rgba(15, 23, 42, .07);
    }
}

@media (max-width: 575.98px) {
    .topbar-date span {
        font-size: .82rem;
        white-space: nowrap;
    }

    .topbar-store,
    .topbar-date {
        gap: .45rem !important;
    }

    .topbar-filters {
        gap: .55rem !important;
    }

    .card-header input.form-control,
    .card-header .form-select {
        width: 100% !important;
    }

    .d-flex.align-items-center.gap-2,
    .d-flex.align-items-center.gap-3 {
        min-width: 0;
    }
}

@media (max-width: 767.98px) {
    .mm-wrap {
        display: block !important;
    }

    .mm-left,
    .mm-right {
        width: 100% !important;
        flex: none !important;
    }

    .mm-panel {
        padding: 10px !important;
        margin-bottom: 12px;
    }

    .mm-title-row {
        flex-direction: column;
        align-items: stretch !important;
    }

    .mm-tools {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px !important;
    }

    .mm-tool-btn {
        min-height: 42px;
        padding: 6px 8px !important;
        font-size: .86rem;
    }

    .cat-grid,
    .menu-grid {
        gap: 6px !important;
        padding: 8px !important;
    }

    .cat-grid {
        grid-auto-rows: minmax(54px, auto) !important;
    }

    .menu-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        grid-auto-rows: minmax(68px, auto) !important;
    }

    .cat-tile,
    .cat-nav-tile,
    .tile,
    .nav-tile {
        min-height: 54px;
        overflow: hidden;
        text-align: center;
        word-break: break-word;
    }

    .tile .name {
        font-size: .9rem;
        line-height: 1.15;
    }

    .tile .meta {
        font-size: .76rem;
    }
}

.cr-live-alert-container {
    z-index: 2060;
}

.cr-live-alert-toast {
    border-left: 4px solid;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
}

.cr-live-alert-toast .toast-header {
    gap: 2px;
}

.cr-live-alert-toast .toast-body {
    font-size: 0.92rem;
}

.push-alert-toggle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.45);
    background: rgba(255,255,255,.12);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.push-alert-toggle:hover {
    background: rgba(255,255,255,.2);
}

.push-alert-toggle.is-enabled {
    color: #d1fae5;
    border-color: rgba(209,250,229,.9);
    background: rgba(16,185,129,.2);
}

.push-alert-toggle.is-working {
    opacity: .75;
}

.push-alert-toggle.is-working i {
    animation: pushBellPulse 1s ease-in-out infinite;
}

.push-alert-modal {
    border-radius: 12px;
}

.push-status-list {
    display: grid;
    gap: .6rem;
}

.push-status-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid #eef2f7;
    padding-bottom: .55rem;
}

.push-status-row span {
    color: #64748b;
    font-size: .9rem;
}

.push-status-row strong {
    color: #0f172a;
    font-size: .92rem;
    text-align: right;
    overflow-wrap: anywhere;
}

.push-status-row strong.is-ok {
    color: #047857;
}

.push-status-row strong.is-warning {
    color: #b45309;
}

.push-status-row strong.is-danger {
    color: #b91c1c;
}

.push-status-row strong.is-muted {
    color: #64748b;
}

.push-status-row-stack {
    display: block;
}

.push-status-row-stack strong {
    display: block;
    margin-top: .15rem;
    text-align: left;
}

.push-alert-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .5rem;
}

.push-alert-actions .btn {
    width: 100%;
}

.alert-history-page {
    max-width: 1180px;
    margin: 0 auto;
}

.alert-history-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.alert-history-heading h1 {
    font-size: 1.65rem;
}

.alert-history-subtitle {
    color: #64748b;
    font-size: .95rem;
}

.alert-history-actions {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.alert-history-actions .btn.is-loading i {
    animation: pushBellPulse 1s ease-in-out infinite;
}

.alert-history-filterbar {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 0 0 1rem;
}

.alert-history-filterbar .btn {
    min-height: 38px;
}

.alert-history-empty {
    min-height: 220px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    text-align: center;
    color: #64748b;
    padding: 2rem;
}

.alert-history-empty i {
    font-size: 1.8rem;
    color: #94a3b8;
}

.alert-history-empty strong {
    color: #0f172a;
}

.alert-history-table {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
}

.alert-history-table table {
    min-width: 1180px;
}

.alert-history-table thead th {
    color: #475569;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .02em;
    background: #f8fafc;
    border-bottom-color: #e2e8f0;
}

.alert-history-table td {
    font-size: .92rem;
}

.alert-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: .2rem .55rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
    white-space: nowrap;
}

.alert-status.is-sent {
    color: #065f46;
    background: #d1fae5;
}

.alert-status.is-retrying {
    color: #92400e;
    background: #fef3c7;
}

.alert-status.is-muted {
    color: #475569;
    background: #e2e8f0;
}

.alert-status.is-muted-by-settings {
    color: #1e3a8a;
    background: #dbeafe;
}

.alert-status.is-failed {
    color: #991b1b;
    background: #fee2e2;
}

.alert-history-cards {
    display: none;
}

.alert-history-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .07);
    padding: .95rem;
}

.alert-history-card-top,
.alert-history-card-footer {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    align-items: flex-start;
}

.alert-history-card-top strong {
    display: block;
    font-size: 1.25rem;
}

.alert-type {
    color: #64748b;
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
}

.alert-history-store {
    margin-top: .45rem;
    font-weight: 700;
    color: #0f172a;
}

.alert-history-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55rem .85rem;
    margin: .8rem 0;
}

.alert-history-details div {
    min-width: 0;
}

.alert-history-details dt {
    color: #64748b;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.alert-history-details dd {
    margin: 0;
    color: #0f172a;
    overflow-wrap: anywhere;
}

.alert-history-card-footer {
    border-top: 1px solid #eef2f7;
    padding-top: .75rem;
    color: #64748b;
    font-size: .86rem;
}

.delivery-log-table table {
    min-width: 1040px;
}

.delivery-log-message {
    max-width: 360px;
    overflow-wrap: anywhere;
}

.registered-device-section {
    margin-bottom: 1rem;
}

.registered-device-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .65rem;
}

.registered-device-heading h2 {
    margin: 0;
    font-size: 1.05rem;
}

.registered-device-heading span {
    color: #64748b;
    font-size: .88rem;
}

.registered-device-count {
    white-space: nowrap;
}

.registered-device-empty {
    min-height: 150px;
}

.registered-device-table table {
    min-width: 1320px;
}

.registered-device-label-form {
    margin: .75rem 0 0;
}

.registered-device-label-form-inline {
    max-width: 280px;
}

.registered-device-label-row {
    display: flex;
    align-items: center;
    gap: .4rem;
}

.registered-device-label-row .form-control {
    min-width: 0;
}

.registered-device-label-row .btn {
    white-space: nowrap;
}

.registered-device-disable-form {
    margin: 0;
}

.registered-device-disable-form .btn {
    white-space: nowrap;
}

.registered-device-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .4rem;
}

.registered-device-actions .btn {
    white-space: nowrap;
}

.admin-message-recipient {
    margin-top: .15rem;
    color: #64748b;
    font-size: .88rem;
}

.admin-message-actions {
    display: flex;
    gap: .5rem;
}

.admin-notifications-page {
    max-width: 1240px;
    margin: 0 auto;
}

.admin-notifications-summary {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .75rem;
    margin-bottom: 1rem;
}

.admin-notifications-summary > div {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: .85rem;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .06);
}

.admin-notifications-summary span {
    display: block;
    color: #64748b;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.admin-notifications-summary strong {
    display: block;
    margin-top: .2rem;
    color: #0f172a;
    font-size: 1.45rem;
}

.admin-notifications-filters {
    margin-bottom: 1rem;
}

.admin-notifications-search {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto auto;
    gap: .5rem;
}

.admin-notifications-table table {
    min-width: 1420px;
}

.admin-settings-page {
    max-width: 980px;
    margin: 0 auto;
}

.admin-settings-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.admin-settings-heading h1 {
    font-size: clamp(1.55rem, 3vw, 2.1rem);
}

.admin-settings-subtitle,
.admin-settings-panel p,
.admin-settings-grid small,
.admin-settings-toggle small,
.admin-settings-updated {
    color: #64748b;
}

.admin-settings-saved {
    border-radius: 8px;
}

.admin-settings-form {
    display: grid;
    gap: 1rem;
}

.admin-settings-panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
    padding: 1rem;
}

.admin-settings-panel-heading {
    display: flex;
    gap: .8rem;
    align-items: flex-start;
    margin-bottom: .9rem;
}

.admin-settings-panel-heading i {
    color: #2153a1;
    width: 1.35rem;
    padding-top: .25rem;
    text-align: center;
}

.admin-settings-panel-heading h2 {
    font-size: 1.1rem;
    margin: 0;
}

.admin-settings-panel-heading p {
    margin: .15rem 0 0;
}

.admin-settings-toggle {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    margin: 0;
}

.admin-settings-toggle input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: .15rem;
}

.admin-settings-toggle strong,
.admin-settings-grid span {
    display: block;
    color: #0f172a;
    font-weight: 700;
}

.admin-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.admin-settings-grid label {
    display: grid;
    gap: .35rem;
    margin: 0;
}

.admin-settings-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    align-items: center;
}

.admin-settings-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
}

.admin-settings-updated {
    font-size: .9rem;
}

@media (max-width: 575.98px) {
    .admin-settings-grid {
        grid-template-columns: 1fr;
    }
}

.alert-settings-page {
    max-width: 980px;
    margin: 0 auto;
}

.alert-settings-form {
    display: grid;
    gap: 1rem;
}

.alert-settings-panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
    padding: 1rem;
}

.alert-settings-panel-title {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-bottom: .85rem;
    color: #0f172a;
}

.alert-settings-panel-title i {
    color: #2153a1;
}

.alert-settings-panel-title h2 {
    font-size: 1.05rem;
    margin: 0;
}

.alert-settings-toggle,
.alert-settings-check,
.alert-settings-store-mode label,
.alert-settings-store {
    display: flex;
    align-items: center;
    gap: .65rem;
    min-height: 44px;
    margin: 0;
}

.alert-settings-toggle input,
.alert-settings-check input,
.alert-settings-store-mode input,
.alert-settings-store input {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    accent-color: #2153a1;
}

.alert-settings-toggle strong,
.alert-settings-toggle small {
    display: block;
}

.alert-settings-toggle small {
    color: #64748b;
    font-size: .86rem;
}

.alert-settings-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .6rem;
}

.alert-settings-check,
.alert-settings-store {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: .65rem .75rem;
    background: #f8fafc;
    font-weight: 700;
}

.alert-settings-thresholds {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
    margin-top: .9rem;
}

.alert-settings-thresholds label span {
    display: block;
    color: #64748b;
    font-size: .82rem;
    font-weight: 700;
    margin-bottom: .35rem;
    text-transform: uppercase;
}

.alert-settings-store-mode {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: .75rem;
}

.alert-settings-store-mode label {
    font-weight: 700;
}

.alert-settings-store-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55rem;
}

.alert-settings-store span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.alert-settings-empty {
    color: #64748b;
    padding: .75rem;
}

.alert-settings-footer {
    display: flex;
    justify-content: flex-end;
}

.alert-settings-footer .btn {
    min-width: 180px;
}

.alert-settings-saved {
    display: flex;
    align-items: center;
    gap: .5rem;
}

@keyframes pushBellPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(.82); }
}

@media (max-width: 575.98px) {
    .cr-live-alert-container {
        left: 10px !important;
        right: 10px !important;
        bottom: 10px !important;
        padding: 0 !important;
    }

    .cr-live-alert-container .toast {
        width: 100%;
        max-width: none;
    }

    .push-alert-toggle {
        width: 36px;
        height: 36px;
        margin-left: .25rem !important;
    }

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

    .alert-history-heading {
        display: block;
    }

    .alert-history-heading h1 {
        font-size: 1.45rem;
    }

    .alert-history-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-top: .85rem;
    }

    .alert-history-actions .btn {
        width: 100%;
    }

    .alert-history-filterbar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .alert-history-filterbar .btn {
        width: 100%;
    }

    .alert-history-table {
        display: none;
    }

    .alert-history-cards {
        display: grid;
        gap: .85rem;
    }

    .alert-history-card-footer {
        display: grid;
    }

    .alert-history-card-footer .btn {
        width: 100%;
    }

    .registered-device-actions {
        display: grid;
        grid-template-columns: 1fr;
        justify-content: stretch;
    }

    .registered-device-heading {
        display: block;
    }

    .registered-device-count {
        display: inline-block;
        margin-top: .25rem;
    }

    .registered-device-label-row {
        align-items: stretch;
    }

    .admin-notifications-summary,
    .admin-notifications-search {
        grid-template-columns: 1fr;
    }

    .alert-settings-panel {
        padding: .9rem;
    }

    .alert-settings-grid,
    .alert-settings-thresholds,
    .alert-settings-store-list {
        grid-template-columns: 1fr;
    }

    .alert-settings-store-mode {
        display: grid;
        gap: .35rem;
    }

    .alert-settings-store span {
        white-space: normal;
    }

    .alert-settings-footer .btn {
        width: 100%;
    }
}
