:root {
    --app-radius-sm: 6px;
    --app-radius-md: 10px;
    --app-radius-lg: 16px;
    --app-radius-full: 9999px;
    --app-primary: #4f7cff;
    --app-primary-hover: #3d6ae8;
    --app-accent: #69be28;
    --app-accent-hover: #5aab22;
    --app-danger: #ef4444;
    --app-warning: #f59e0b;
    --app-success: #22c55e;
    --app-text: #1e293b;
    --app-text-muted: #64748b;
    --app-border: #e2e8f0;
    --app-bg: #f1f5f9;
    --app-surface: #ffffff;
    --app-sidebar-bg: #1e293b;
    --app-sidebar-hover: #334155;
    --app-sidebar-active: #69be28;
    --app-sidebar-sub-active: rgba(105, 190, 40, 0.18);
    --app-sidebar-sub-active-text: #a3e635;
    --app-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
    --app-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.06);
    --app-shadow-lg: 0 10px 25px -5px rgba(15, 23, 42, 0.12);
}

/* ── Shell layout ── */
body.app-shell {
    background: var(--app-bg);
    color: var(--app-text);
}

body.app-shell .content-wrap {
    background: var(--app-bg);
}

body.app-shell .main {
    padding: 1rem 1.25rem 3.5rem;
    min-height: calc(100vh - 60px);
    max-width: 100%;
    overflow-x: hidden;
}

body.app-shell .container-fluid,
body.app-shell #main-content {
    max-width: 100%;
}

body.app-shell #main-content {
    animation: appFadeIn 0.35s ease-out;
}

@keyframes appFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Sidebar ── */
body.app-shell .sidebar {
    background: var(--app-sidebar-bg);
    box-shadow: var(--app-shadow-lg);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

body.app-shell .sidebar .logo {
    background: rgba(0, 0, 0, 0.15);
    padding: 1.25rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

body.app-shell .sidebar .logo span {
    color: #f8fafc;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

body.app-shell .sidebar .nano-content > ul li > a {
    background: transparent !important;
    color: #cbd5e1 !important;
    padding: 0.75rem 1.25rem;
    margin: 0.2rem 0.75rem;
    border-radius: var(--app-radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

body.app-shell .sidebar .nano-content > ul li > a:hover,
body.app-shell .sidebar .nano-content > ul li > a:focus {
    background: var(--app-sidebar-hover) !important;
    color: #f8fafc !important;
}

body.app-shell .sidebar .nano-content > ul > li.active > a,
body.app-shell .sidebar .nano-content > ul > li.open > a {
    background: var(--app-sidebar-active) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(105, 190, 40, 0.35);
}

body.app-shell .sidebar .nano-content > ul > li > ul {
    background: transparent !important;
    padding: 0.15rem 0 0.25rem;
}

body.app-shell .sidebar .nano-content > ul > li > ul > li > a {
    position: relative;
    margin: 0.2rem 0.75rem;
    padding: 0.625rem 1.25rem 0.625rem 2.25rem;
    font-size: 0.8125rem;
    font-weight: 400;
}

body.app-shell .sidebar .nano-content > ul > li > ul > li > a:hover,
body.app-shell .sidebar .nano-content > ul > li > ul > li > a:focus {
    background: var(--app-sidebar-hover) !important;
    color: #f8fafc !important;
}

body.app-shell .sidebar .nano-content > ul > li > ul > li.active > a {
    background: var(--app-sidebar-sub-active) !important;
    color: var(--app-sidebar-sub-active-text) !important;
    box-shadow: none;
    font-weight: 500;
}

body.app-shell .sidebar .nano-content > ul > li > ul > li.active > a::before {
    display: block !important;
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--app-sidebar-active);
    width: 3px;
    border-radius: 0 2px 2px 0;
}

body.app-shell .sidebar .nano-content > ul > li.active > a::before,
body.app-shell .sidebar .nano-content > ul > li > a::before {
    display: none !important;
}

body.app-shell .sidebar .nano-content > ul li > a i {
    opacity: 0.85;
    font-size: 1rem;
}

body.app-shell .sidebar .nano-content > ul li > a b {
    font-weight: 500;
}

/* ── Header / navbar ── */
body.app-shell .header {
    background: var(--app-surface);
    border-bottom: 1px solid var(--app-border);
    box-shadow: var(--app-shadow-sm);
    padding: 0.35rem 0;
}

body.app-shell .hamburger .line {
    background: var(--app-text);
    border-radius: var(--app-radius-full);
}

body.app-shell .header-icon.user-menu-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.35rem 0.75rem 0.35rem 0.35rem;
    border-radius: var(--app-radius-full);
    background: var(--app-bg);
    border: 1px solid var(--app-border);
    color: var(--app-text);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    float: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.app-shell .header-icon.user-menu-trigger:hover,
body.app-shell .header-icon.user-menu-trigger:focus {
    background: var(--app-bg);
    border-color: #cbd5e1;
    box-shadow: var(--app-shadow-sm);
    color: var(--app-text);
}

body.app-shell .user-avatar-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: var(--app-radius-full);
    background: linear-gradient(135deg, var(--app-primary) 0%, #6366f1 100%);
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 700;
    flex-shrink: 0;
}

body.app-shell .user-name {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.app-shell .drop-down.dropdown-profile {
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-lg);
    box-shadow: var(--app-shadow-lg);
    overflow: hidden;
    padding: 0;
    margin-top: 0.5rem !important;
}

body.app-shell .dropdown-content-heading {
    padding: 1rem 1.25rem;
    background: var(--app-bg);
    border-bottom: 1px solid var(--app-border);
}

body.app-shell .dropdown-content-heading span {
    color: var(--app-text-muted);
    font-size: 0.8125rem;
}

body.app-shell .dropdown-content-body li {
    padding: 0;
    border-top: none;
}

body.app-shell .dropdown-content-body li a {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1.25rem;
    color: var(--app-text);
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.15s ease;
}

body.app-shell .dropdown-content-body li a:hover {
    background: var(--app-bg);
    color: var(--app-danger);
}

/* ── Status bar ── */
body.app-shell .status-bar {
    background: var(--app-surface);
    border-top: 1px solid var(--app-border);
    box-shadow: 0 -2px 10px rgba(15, 23, 42, 0.04);
    color: var(--app-text-muted);
    font-size: 0.8125rem;
    padding: 0.5rem 1.25rem;
}

body.app-shell .status-bar a {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.35rem 0.875rem;
    border-radius: var(--app-radius-md);
    color: var(--app-text-muted) !important;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

body.app-shell .status-bar a:hover {
    background: #fef2f2;
    color: var(--app-danger) !important;
}

/* ── Cards & panels ── */
body.app-shell .card {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-lg);
    box-shadow: var(--app-shadow);
    padding: 1.25rem;
    margin: 0.75rem 0 1rem;
}

body.app-shell .bootstrap-data-table-panel {
    border-radius: var(--app-radius-md);
    max-width: 100%;
}

body.app-shell .bootstrap-data-table-panel .table-responsive,
body.app-shell .dataTables_wrapper {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

body.app-shell table.data-table {
    width: 100% !important;
    max-width: 100%;
    table-layout: fixed;
}

body.app-shell table.data-table th,
body.app-shell table.data-table td {
    overflow-wrap: anywhere;
    word-break: break-word;
    vertical-align: middle;
}

body.app-shell table.data-table td.details-control,
body.app-shell table.data-table th.details-control {
    width: 1.75rem;
    min-width: 1.75rem;
    max-width: 1.75rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    word-break: normal;
    white-space: nowrap;
}

body.app-shell table.data-table th.text-center:not(.col-actions),
body.app-shell table.data-table td.text-center:not(.col-actions) {
    width: 2.75rem;
    min-width: 2.75rem;
    max-width: 2.75rem;
    word-break: normal;
    white-space: nowrap;
}

body.app-shell table.data-table .col-id {
    width: 4rem;
    min-width: 4rem;
    max-width: 5rem;
    word-break: normal;
    white-space: nowrap;
}

body.app-shell table.data-table .col-active {
    width: 5.5rem;
    min-width: 5.5rem;
    max-width: 6rem;
    word-break: normal;
    white-space: nowrap;
}

body.app-shell table.data-table .col-actions {
    width: 7.5rem;
    min-width: 7.5rem;
    max-width: 8rem;
    white-space: nowrap;
    word-break: normal;
    overflow: visible;
}

body.app-shell table.data-table .col-long-text {
    word-break: break-all;
    overflow-wrap: anywhere;
    line-height: 1.45;
    white-space: normal;
}

body.app-shell table.data-table .col-compact {
    width: 5rem;
    min-width: 4rem;
    word-break: normal;
    white-space: nowrap;
}

/* ── Tables ── */
body.app-shell .table {
    margin-bottom: 0;
    color: var(--app-text);
}

body.app-shell .table thead th {
    background: var(--app-bg);
    border-color: var(--app-border) !important;
    color: var(--app-text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.875rem 1rem;
    vertical-align: middle;
}

body.app-shell table.dataTable thead th.sorting,
body.app-shell table.dataTable thead th.sorting_asc,
body.app-shell table.dataTable thead th.sorting_desc,
body.app-shell table.dataTable thead th.sorting_asc_disabled,
body.app-shell table.dataTable thead th.sorting_desc_disabled {
    background-image: none !important;
    position: relative;
    padding-right: 1.75rem !important;
    cursor: pointer;
}

body.app-shell table.dataTable thead th.sorting:before,
body.app-shell table.dataTable thead th.sorting:after,
body.app-shell table.dataTable thead th.sorting_asc:before,
body.app-shell table.dataTable thead th.sorting_asc:after,
body.app-shell table.dataTable thead th.sorting_desc:before,
body.app-shell table.dataTable thead th.sorting_desc:after,
body.app-shell table.dataTable thead th.sorting_asc_disabled:before,
body.app-shell table.dataTable thead th.sorting_asc_disabled:after,
body.app-shell table.dataTable thead th.sorting_desc_disabled:before,
body.app-shell table.dataTable thead th.sorting_desc_disabled:after {
    font-family: inherit;
    font-weight: 700;
    font-size: 0.72rem;
    line-height: 1;
    opacity: 0.35;
    bottom: auto;
    top: 50%;
    transform: translateY(-50%);
}

body.app-shell table.dataTable thead th.sorting:before,
body.app-shell table.dataTable thead th.sorting_asc:before,
body.app-shell table.dataTable thead th.sorting_desc:before,
body.app-shell table.dataTable thead th.sorting_asc_disabled:before,
body.app-shell table.dataTable thead th.sorting_desc_disabled:before {
    right: 0.85rem;
}

body.app-shell table.dataTable thead th.sorting:after,
body.app-shell table.dataTable thead th.sorting_asc:after,
body.app-shell table.dataTable thead th.sorting_desc:after,
body.app-shell table.dataTable thead th.sorting_asc_disabled:after,
body.app-shell table.dataTable thead th.sorting_desc_disabled:after {
    right: 0.45rem;
}

body.app-shell table.dataTable thead th.sorting_asc:before,
body.app-shell table.dataTable thead th.sorting_desc:after {
    opacity: 0.95;
    color: var(--app-primary);
}

body.app-shell .table tbody td {
    border-color: var(--app-border) !important;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    vertical-align: middle;
}

body.app-shell .table-striped tbody tr:nth-of-type(odd) {
    background: rgba(248, 250, 252, 0.7);
}

body.app-shell .table-hover tbody tr:hover {
    background: rgba(79, 124, 255, 0.04);
}

body.app-shell .table-bordered {
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-md);
    overflow: hidden;
}

body.app-shell .table-detail th {
    background: var(--app-bg);
    font-weight: 600;
    color: var(--app-text-muted);
    width: 8rem;
    vertical-align: top;
}

body.app-shell .table-detail td {
    overflow-wrap: anywhere;
    word-break: break-word;
}

body.app-shell .table-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    flex-wrap: nowrap;
    white-space: nowrap;
}

body.app-shell table.data-table td.text-right .table-actions,
body.app-shell table.data-table th.text-right {
    text-align: right;
}

body.app-shell table.data-table td.text-center {
    text-align: center;
}

body.app-shell .badge-rules-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--app-radius-full);
    background: var(--app-bg);
    border: 1px solid var(--app-border);
    color: var(--app-text);
    font-size: 0.8125rem;
    font-weight: 600;
}

body.app-shell .modal-body p {
    line-height: 1.6;
}

body.app-shell .section-toolbar {
    gap: 0.75rem;
}

body.app-shell .btn-outline-primary {
    background: transparent;
    border: 1px solid var(--app-primary);
    color: var(--app-primary);
    box-shadow: none;
}

body.app-shell .btn-outline-primary:hover {
    background: rgba(79, 124, 255, 0.08);
    color: var(--app-primary-hover);
}

body.app-shell .btn-outline-secondary {
    background: transparent;
    border: 1px solid var(--app-border);
    color: var(--app-text-muted);
    box-shadow: none;
}

body.app-shell .btn-outline-secondary:hover {
    background: var(--app-bg);
    color: var(--app-text);
    border-color: #cbd5e1;
}

/* ── Buttons ── */
body.app-shell .btn {
    border-radius: var(--app-radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border: none;
    transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

body.app-shell .btn:active {
    transform: translateY(0);
}

body.app-shell .btn-sm {
    padding: 0.35rem 0.65rem;
    font-size: 0.8125rem;
    border-radius: var(--app-radius-sm);
}

body.app-shell .btn-primary {
    background: linear-gradient(135deg, var(--app-primary) 0%, #6366f1 100%);
    box-shadow: 0 2px 8px rgba(79, 124, 255, 0.3);
}

body.app-shell .btn-primary:hover {
    background: linear-gradient(135deg, var(--app-primary-hover) 0%, #5558e3 100%);
    box-shadow: 0 4px 12px rgba(79, 124, 255, 0.35);
}

body.app-shell .btn-success,
body.app-shell .custom-add-button {
    background: linear-gradient(135deg, var(--app-accent) 0%, #7dce3a 100%);
    box-shadow: 0 2px 8px rgba(105, 190, 40, 0.3);
    color: #fff;
}

body.app-shell .btn-success:hover,
body.app-shell .custom-add-button:hover {
    background: linear-gradient(135deg, var(--app-accent-hover) 0%, #6bc030 100%);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(105, 190, 40, 0.35);
}

body.app-shell .btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}

body.app-shell .btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}

body.app-shell .btn-info {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: #fff;
}

body.app-shell .btn-default {
    background: var(--app-bg);
    border: 1px solid var(--app-border);
    color: var(--app-text);
}

body.app-shell .btn-default:hover {
    background: #e2e8f0;
    color: var(--app-text);
}

/* ── Forms ── */
body.app-shell .form-control {
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-md);
    background: var(--app-bg);
    color: var(--app-text);
    font-size: 0.875rem;
    padding: 0.625rem 0.875rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

body.app-shell .form-control:focus {
    border-color: var(--app-primary);
    background: var(--app-surface);
    box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.12);
}

body.app-shell .form-group.errorvalidator .form-control {
    border-color: var(--app-danger);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

body.app-shell .custom-file-label {
    border-radius: var(--app-radius-md);
    border-color: var(--app-border);
    background: var(--app-bg);
}

body.app-shell .custom-file-input:focus ~ .custom-file-label {
    border-color: var(--app-primary);
    box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.12);
}

body.app-shell select.form-control {
    appearance: auto;
}

/* ── Modals (global) ── */
body.app-shell .modal-backdrop.show {
    opacity: 0.45;
}

body.app-shell .modal-dialog {
    margin: 1.75rem auto;
    display: flex;
    align-items: center;
    min-height: calc(100% - 3.5rem);
}

body.app-shell .modal-content {
    border: none;
    border-radius: var(--app-radius-lg);
    box-shadow: var(--app-shadow-lg);
    overflow: hidden;
    width: 100%;
    text-align: left;
}

body.app-shell .modal-header {
    padding: 1.25rem 1.5rem 0.75rem;
    border-bottom: none;
    background: var(--app-surface);
}

body.app-shell .modal-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--app-text);
    letter-spacing: -0.01em;
}

body.app-shell .modal-header .close {
    padding: 0.25rem 0.5rem;
    margin: -0.25rem -0.25rem -0.25rem auto;
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--app-text-muted);
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

body.app-shell .modal-header .close:hover {
    opacity: 1;
    color: var(--app-text);
}

body.app-shell .modal-body {
    padding: 0.75rem 1.5rem 1.5rem;
    color: var(--app-text);
    font-size: 0.9375rem;
    line-height: 1.6;
}

body.app-shell .modal-body h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--app-text);
    line-height: 1.5;
}

body.app-shell .modal-body .form-group.text-center {
    margin-top: 1.25rem;
    margin-bottom: 0;
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

body.app-shell .modal-body .form-group.text-center .btn {
    min-width: 100px;
}

body.app-shell .modal-body p {
    color: var(--app-text-muted);
}

body.app-shell .modal-body--confirm {
    text-align: center;
}

body.app-shell .modal-confirm-text {
    margin: 0 0 0.5rem;
    padding: 1rem 1.25rem;
    border-radius: var(--app-radius-md);
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    font-size: 0.9375rem;
    line-height: 1.5;
}

body.app-shell .license-key-display {
    display: block;
    margin: 0 0 1rem;
    padding: 1rem;
    border-radius: var(--app-radius-md);
    background: var(--app-bg);
    border: 1px solid var(--app-border);
    color: var(--app-text);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.75rem;
    line-height: 1.6;
    word-break: break-all;
    text-align: left;
    max-height: 200px;
    overflow-y: auto;
}

body.app-shell .modal-sm {
    max-width: 400px;
}

body.app-shell .modal-lg {
    max-width: 800px;
}

body.app-shell .modal-body .table {
    border-radius: var(--app-radius-md);
    overflow: hidden;
}

body.app-shell .modal-body .credentials-table {
    table-layout: fixed;
    overflow: visible;
}

body.app-shell .modal-body .credentials-table th.credentials-table__action,
body.app-shell .modal-body .credentials-table td:last-child {
    width: 6.25rem;
    min-width: 6.25rem;
    white-space: nowrap;
    padding-left: 0.375rem;
    padding-right: 0.375rem;
}

body.app-shell .modal-body .credentials-table td:last-child .btn {
    white-space: nowrap;
}

/* Auth modal reuse inside app */
body.app-shell .auth-modal .modal-content,
body.app-shell .modal.auth-modal .modal-content {
    border-radius: var(--app-radius-lg);
}

/* ── DataTables ── */
body.app-shell .dataTables_wrapper .dataTables_filter input,
body.app-shell .dataTables_wrapper .dataTables_length select {
    border-radius: var(--app-radius-md);
    border: 1px solid var(--app-border);
    padding: 0.375rem 0.625rem;
}

body.app-shell .dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: var(--app-radius-sm) !important;
}

body.app-shell .dt-buttons .btn {
    border-radius: var(--app-radius-md) !important;
    margin-right: 0.35rem;
}

/* ── Page toolbar row ── */
body.app-shell #main-content > .row.pt-3:first-child {
    margin-bottom: 0.25rem;
}

body.app-shell #main-content > .row.pt-3:first-child .custom-add-button {
    border-radius: var(--app-radius-md);
    padding: 0.55rem 1.125rem;
}

/* ── Release wizard steps ── */
body.app-shell #main-content code {
    display: block;
    padding: 0.5rem 0.75rem;
    margin: 0.25rem 0 0.75rem;
    border-radius: var(--app-radius-md);
    background: var(--app-bg);
    border: 1px solid var(--app-border);
    font-size: 0.8125rem;
    color: var(--app-text-muted);
}

body.app-shell #main-content li h6 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--app-text);
}

body.app-shell #main-content > .row.pt-3 p {
    color: var(--app-text-muted);
    line-height: 1.6;
    max-width: 52rem;
}

@media (max-width: 768px) {
    body.app-shell .main {
        padding: 0.75rem 0.75rem 3.5rem;
    }

    body.app-shell .user-name {
        display: none;
    }

    body.app-shell .modal-dialog {
        margin: 0.75rem;
        min-height: calc(100% - 1.5rem);
    }
}

/* ── Dashboard overview ── */
body.app-shell .dashboard-overview__header {
    margin-bottom: 1.5rem;
}

body.app-shell .dashboard-overview__title {
    margin: 0 0 0.25rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--app-text);
}

body.app-shell .dashboard-overview__subtitle {
    margin: 0;
    color: var(--app-text-muted);
    font-size: 0.9375rem;
}

body.app-shell .dashboard-overview__section {
    margin-bottom: 1.75rem;
}

body.app-shell .dashboard-overview__section-title {
    margin: 0 0 0.875rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--app-text-muted);
}

body.app-shell .dashboard-stat-card {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    height: 100%;
    padding: 1.125rem 1rem;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-lg);
    box-shadow: var(--app-shadow-sm);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

body.app-shell .dashboard-stat-card:hover {
    text-decoration: none;
    color: inherit;
    border-color: rgba(79, 124, 255, 0.35);
    box-shadow: var(--app-shadow);
    transform: translateY(-2px);
}

body.app-shell .dashboard-stat-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: var(--app-radius-md);
    font-size: 1.125rem;
}

body.app-shell .dashboard-stat-card--primary .dashboard-stat-card__icon {
    background: rgba(79, 124, 255, 0.12);
    color: var(--app-primary);
}

body.app-shell .dashboard-stat-card--accent .dashboard-stat-card__icon {
    background: rgba(105, 190, 40, 0.14);
    color: var(--app-accent);
}

body.app-shell .dashboard-stat-card--warning .dashboard-stat-card__icon {
    background: rgba(245, 158, 11, 0.14);
    color: var(--app-warning);
}

body.app-shell .dashboard-stat-card--slate .dashboard-stat-card__icon {
    background: rgba(100, 116, 139, 0.12);
    color: var(--app-text-muted);
}

body.app-shell .dashboard-stat-card__body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

body.app-shell .dashboard-stat-card__label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--app-text-muted);
    line-height: 1.3;
}

body.app-shell .dashboard-stat-card__count {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--app-text);
    margin-top: 0.125rem;
}

body.app-shell .dashboard-stat-card__meta {
    font-size: 0.75rem;
    color: var(--app-text-muted);
    margin-top: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.app-shell .dashboard-stat-card__arrow {
    flex-shrink: 0;
    color: var(--app-text-muted);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

body.app-shell .dashboard-stat-card:hover .dashboard-stat-card__arrow {
    opacity: 1;
    transform: translateX(2px);
}

body.app-shell .datafeed-status-legend .badge {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: lowercase;
    vertical-align: middle;
}

body.app-shell .datafeed-status-legend {
    line-height: 1.8;
}

body.app-shell .data-table .datafeed-last-update--stale,
body.app-shell .data-table .datafeed-count--empty {
    white-space: nowrap;
}

body.app-shell .bootstrap-data-table-panel .table-responsive--fit,
body.app-shell .bootstrap-data-table-panel .table-responsive--fit .dataTables_wrapper {
    overflow-x: visible;
}

body.app-shell table.data-feed-list-table {
    table-layout: fixed;
}

body.app-shell table.data-feed-list-table .col-title {
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.35;
}

body.app-shell table.data-feed-list-table .col-period {
    width: 5.5rem;
    min-width: 5.5rem;
    max-width: 5.5rem;
    white-space: nowrap;
    word-break: normal;
}

body.app-shell table.data-feed-list-table .col-datetime {
    width: 8rem;
    min-width: 8rem;
    max-width: 8rem;
    white-space: nowrap;
    font-size: 0.8125rem;
    word-break: normal;
}

body.app-shell table.data-feed-list-table .col-count {
    width: 4.5rem;
    min-width: 4.5rem;
    white-space: nowrap;
    word-break: normal;
}

body.app-shell table.data-feed-list-table thead th {
    white-space: nowrap;
    font-size: 0.6875rem;
    padding: 0.625rem 0.5rem;
}

body.app-shell table.data-feed-list-table tbody td {
    padding: 0.5rem;
    font-size: 0.8125rem;
}

body.app-shell table.data-feed-list-table .col-actions {
    width: 7.5rem;
    min-width: 7.5rem;
    max-width: 7.5rem;
}

body.app-shell table.data-table.template-rules-table {
    min-width: 64rem;
}

body.app-shell table.data-table.template-rules-table .col-long-text {
    word-break: normal;
    overflow-wrap: break-word;
}

body.app-shell table.data-table.template-rules-table .col-cis-id,
body.app-shell table.data-table.template-rules-table th.col-cis-id,
body.app-shell table.data-table.template-rules-table td.col-cis-id {
    width: 4.5rem;
    min-width: 4.5rem;
    max-width: 5rem;
    white-space: nowrap;
    word-break: normal;
}

body.app-shell table.data-table.template-rules-table .col-severity,
body.app-shell table.data-table.template-rules-table th.col-severity,
body.app-shell table.data-table.template-rules-table td.col-severity {
    width: 5.5rem;
    min-width: 5.5rem;
    max-width: 5.75rem;
    white-space: nowrap;
    word-break: normal;
}

body.app-shell table.data-table.template-rules-table .col-rule-active,
body.app-shell table.data-table.template-rules-table th.col-rule-active,
body.app-shell table.data-table.template-rules-table td.col-rule-active {
    width: 4.25rem;
    min-width: 4.25rem;
    max-width: 4.75rem;
    white-space: nowrap;
    word-break: normal;
    text-align: center;
}

body.app-shell table.data-table.template-rules-table thead th.col-cis-id,
body.app-shell table.data-table.template-rules-table thead th.col-severity,
body.app-shell table.data-table.template-rules-table thead th.col-rule-active {
    padding-left: 0.5rem;
    padding-right: 1.15rem !important;
    letter-spacing: 0.02em;
    font-size: 0.6875rem;
}

body.app-shell table.data-table.template-rules-table thead th.col-cis-id.sorting:before,
body.app-shell table.data-table.template-rules-table thead th.col-cis-id.sorting_asc:before,
body.app-shell table.data-table.template-rules-table thead th.col-cis-id.sorting_desc:before,
body.app-shell table.data-table.template-rules-table thead th.col-severity.sorting:before,
body.app-shell table.data-table.template-rules-table thead th.col-severity.sorting_asc:before,
body.app-shell table.data-table.template-rules-table thead th.col-severity.sorting_desc:before,
body.app-shell table.data-table.template-rules-table thead th.col-rule-active.sorting:before,
body.app-shell table.data-table.template-rules-table thead th.col-rule-active.sorting_asc:before,
body.app-shell table.data-table.template-rules-table thead th.col-rule-active.sorting_desc:before {
    right: 0.55rem;
}

body.app-shell table.data-table.template-rules-table thead th.col-cis-id.sorting:after,
body.app-shell table.data-table.template-rules-table thead th.col-cis-id.sorting_asc:after,
body.app-shell table.data-table.template-rules-table thead th.col-cis-id.sorting_desc:after,
body.app-shell table.data-table.template-rules-table thead th.col-severity.sorting:after,
body.app-shell table.data-table.template-rules-table thead th.col-severity.sorting_asc:after,
body.app-shell table.data-table.template-rules-table thead th.col-severity.sorting_desc:after,
body.app-shell table.data-table.template-rules-table thead th.col-rule-active.sorting:after,
body.app-shell table.data-table.template-rules-table thead th.col-rule-active.sorting_asc:after,
body.app-shell table.data-table.template-rules-table thead th.col-rule-active.sorting_desc:after {
    right: 0.15rem;
}

body.app-shell table.data-table.template-rules-table .col-actions {
    width: 9rem;
    min-width: 9rem;
    max-width: 9rem;
}

body.app-shell table.data-table.template-rules-table .col-datetime,
body.app-shell table.data-table.template-rules-table .template-rule-updated-at {
    white-space: nowrap;
    word-break: normal;
}

body.app-shell .modal-body:has(.template-rule-form) {
    padding: 0.75rem 1rem 1rem;
}

body.app-shell .template-rule-form-body {
    padding: 0;
}

body.app-shell .template-rule-form .form-group {
    margin-bottom: 0.75rem;
}

body.app-shell .template-rule-form .row {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
}

body.app-shell .template-rule-form .row > [class*="col-"] {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

body.app-shell .template-rule-form .form-group.text-center {
    margin-top: 0.75rem;
}

body.app-shell .template-rule-form .title-synapsa-field .form-control.is-locked {
    background-color: var(--app-bg);
    cursor: not-allowed;
}

body.app-shell .template-rule-form .title-synapsa-lock-btn {
    min-width: 2.5rem;
}

body.app-shell .ruleset-form-top-tabs .nav-link,
body.app-shell .ruleset-subtabs .nav-link {
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.45rem 0.85rem;
}

body.app-shell .ruleset-form-top-tabs .nav-link.active,
body.app-shell .ruleset-subtabs .nav-link.active {
    border-color: var(--app-accent, #69be28) var(--app-accent, #69be28) #fff;
    color: var(--app-accent, #69be28);
}

body.app-shell .ruleset-mode-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--app-border, #dee2e6);
    border-radius: 0.35rem;
    background: var(--app-surface-muted, #f8f9fa);
}

body.app-shell .ruleset-mode-bar__label {
    font-weight: 600;
    margin-right: 0.25rem;
}

body.app-shell .ruleset-mode-bar__hint {
    color: var(--app-text-muted, #6c757d);
    font-size: 0.8125rem;
}

body.app-shell .ruleset-mode-bar__hint--end {
    margin-left: -0.35rem;
}

body.app-shell .ruleset-mode-select {
    max-width: 9rem;
}

body.app-shell .ruleset-subtabs-shell {
    border: 1px solid var(--app-accent, #69be28);
    border-radius: 0 0.35rem 0.35rem 0.35rem;
    background: #fff;
}

body.app-shell .ruleset-subtabs {
    border-bottom: 1px solid var(--app-accent, #69be28);
    padding: 0.35rem 0.5rem 0;
    margin-bottom: 0;
}

body.app-shell .ruleset-subtabs-panel {
    padding: 0.85rem;
}

body.app-shell .ruleset-criterion-row {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

body.app-shell .ruleset-criterion-row__main,
body.app-shell .ruleset-criterion-row__side {
    display: flex;
    gap: 0.65rem;
    align-items: stretch;
}

body.app-shell .ruleset-section {
    position: relative;
    flex: 1 1 auto;
    border: 1px solid var(--app-border, #dee2e6);
    border-radius: 0.35rem;
    padding: 1.1rem 0.75rem 0.65rem;
    background: var(--app-surface-muted, #f8f9fa);
}

body.app-shell .ruleset-section__title {
    position: absolute;
    top: -0.55rem;
    left: 0.65rem;
    padding: 0 0.35rem;
    background: var(--app-surface-muted, #f8f9fa);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--app-text-muted, #6c757d);
    line-height: 1;
}

body.app-shell .ruleset-section .form-control {
    background: #fff;
}

body.app-shell .ruleset-rule-modal .ruleset-value-widget {
    min-width: 0;
}

body.app-shell .ruleset-rule-modal .ruleset-chip-editor {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    min-height: 2.55rem;
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--app-border, #dee2e6);
    border-radius: 0.3rem;
    background: #fff;
}

body.app-shell .ruleset-rule-modal .ruleset-chip-list {
    display: contents;
}

body.app-shell .ruleset-rule-modal .ruleset-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    background: var(--app-primary, #4f7cff);
    color: #fff;
    font-size: 0.8125rem;
    line-height: 1.2;
}

body.app-shell .ruleset-rule-modal .ruleset-chip__remove {
    width: 1rem;
    height: 1rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    cursor: pointer;
    font-size: 1rem;
    line-height: 0.85rem;
}

body.app-shell .ruleset-rule-modal .ruleset-chip-token-input {
    min-width: 12rem;
    flex: 1 1 12rem;
    height: 1.8rem;
    padding: 0.2rem;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 0.875rem;
}

body.app-shell .ruleset-rule-modal .ruleset-chip-editor:focus-within {
    border-color: var(--app-primary, #4f7cff);
    box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.12);
}

body.app-shell .ruleset-section .form-control.is-disabled-by-rule,
body.app-shell .ruleset-section .form-control:disabled,
body.app-shell .ruleset-section .form-control[readonly].is-disabled-by-rule {
    background-color: #eceff1;
    color: #6c757d;
    cursor: not-allowed;
}

body.app-shell .ruleset-section--condition,
body.app-shell .ruleset-section--negate {
    min-width: 7.5rem;
}

body.app-shell .ruleset-section--operator {
    max-width: 7.5rem;
    flex: 0 0 7.5rem;
}

body.app-shell .ruleset-section--service {
    flex: 1.7 1 auto;
}

body.app-shell .ruleset-section--protocol {
    flex: 0 0 14rem;
}

body.app-shell .ruleset-protocol-toggle {
    display: flex;
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--app-border, #dee2e6);
    border-radius: 0.3rem;
}

body.app-shell .ruleset-protocol-option {
    flex: 1 1 33.333%;
    height: 2.35rem;
    padding: 0.25rem;
    border: 0;
    border-right: 1px solid var(--app-border, #dee2e6);
    background: #fff;
    color: var(--app-text-muted, #6c757d);
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 700;
}

body.app-shell .ruleset-protocol-option:last-child {
    border-right: 0;
}

body.app-shell .ruleset-protocol-option--selected {
    background: var(--app-primary, #4f7cff);
    color: #fff;
}

body.app-shell .ruleset-protocol-option:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

body.app-shell .ruleset-service-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}

body.app-shell .ruleset-inline-label {
    display: block;
    font-size: 0.75rem;
    color: var(--app-text-muted, #6c757d);
    margin-bottom: 0.25rem;
}

body.app-shell .ruleset-edl-row {
    margin-bottom: 0.75rem;
}

body.app-shell .ruleset-policy-actions {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px dashed var(--app-border, #dee2e6);
}

@media (max-width: 991.98px) {
    body.app-shell .ruleset-criterion-row {
        grid-template-columns: 1fr;
    }

    body.app-shell .ruleset-criterion-row__main,
    body.app-shell .ruleset-criterion-row__side {
        flex-direction: column;
    }

    body.app-shell .ruleset-section--operator {
        max-width: none;
        flex: 1 1 auto;
    }
}

/* ── Ruleset template rule editor ─────────────────────────────────────────
 * This is a production work surface, not a compact confirmation dialog.
 */
body.app-shell .ruleset-rule-modal .modal-dialog {
    width: min(94vw, 1440px);
    max-width: none;
    height: min(92vh, 960px);
    min-height: 0;
    margin: 4vh auto;
    align-items: stretch;
}

body.app-shell .ruleset-rule-modal .modal-content {
    height: 100%;
    min-height: 0;
}

body.app-shell .ruleset-rule-modal .modal-header {
    flex: 0 0 auto;
    padding: 1.25rem 1.5rem 1rem;
    border-bottom: 1px solid var(--app-border, #dee2e6);
}

body.app-shell .ruleset-rule-modal .modal-title {
    font-size: 1.25rem;
}

body.app-shell .ruleset-rule-modal .modal-body {
    min-height: 0;
    overflow-y: auto;
    padding: 1.25rem 1.5rem;
}

body.app-shell .ruleset-rule-modal .template-rule-form {
    min-height: 100%;
}

body.app-shell .ruleset-rule-modal .form-control {
    min-height: 2.55rem;
    font-size: 0.9375rem;
}

body.app-shell .ruleset-rule-modal textarea.form-control {
    min-height: 5.5rem;
}

body.app-shell .ruleset-rule-modal .ruleset-form-top-tabs {
    margin-bottom: 1.25rem !important;
}

body.app-shell .ruleset-rule-modal .ruleset-form-top-tabs .nav-link {
    padding: 0.65rem 1.25rem;
    font-size: 0.9375rem;
}

body.app-shell .ruleset-rule-modal .ruleset-mode-bar {
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}

body.app-shell .ruleset-rule-modal .ruleset-vendor-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
    padding: 0.8rem 1.25rem;
    border: 1px solid var(--app-border, #dee2e6);
    border-radius: 0.35rem;
    background: var(--app-surface-muted, #f8f9fa);
}

body.app-shell .ruleset-rule-modal .ruleset-vendor-bar__label {
    display: inline-block;
    margin-right: 0.7rem;
    font-weight: 600;
}

body.app-shell .ruleset-rule-modal .ruleset-vendor-selector {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

body.app-shell .ruleset-rule-modal .ruleset-vendor-selector .ruleset-vendor-bar__label {
    margin-right: 0;
}

body.app-shell .ruleset-rule-modal .ruleset-vendor-selector .form-control {
    min-width: 15rem;
}

body.app-shell .ruleset-rule-modal .ruleset-vendor-bar__note {
    color: var(--app-text-muted, #6c757d);
    font-size: 0.8125rem;
}

body.app-shell .ruleset-switch-control {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.55rem;
    margin: 0;
    cursor: pointer;
    user-select: none;
}

body.app-shell .ruleset-switch-control__label {
    color: var(--app-text-muted, #6c757d);
    font-size: 0.875rem;
    white-space: nowrap;
}

body.app-shell .ruleset-switch-control__label--name {
    margin-left: 0.05rem;
}

body.app-shell .ruleset-switch {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

body.app-shell .ruleset-switch-control__track {
    position: relative;
    display: inline-block;
    width: 3.05rem;
    height: 1.65rem;
    flex: 0 0 auto;
    border: 2px solid #9ca3af;
    border-radius: 999px;
    background: #fff;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

body.app-shell .ruleset-switch-control__track::after {
    content: "";
    position: absolute;
    top: 0.17rem;
    left: 0.17rem;
    width: 1.05rem;
    height: 1.05rem;
    border-radius: 50%;
    background: #9ca3af;
    transition: transform 0.15s ease, background-color 0.15s ease;
}

body.app-shell .ruleset-switch:checked + .ruleset-switch-control__track {
    border-color: var(--app-accent, #69be28);
    background: var(--app-accent, #69be28);
}

body.app-shell .ruleset-switch:checked + .ruleset-switch-control__track::after {
    transform: translateX(1.35rem);
    background: #fff;
}

body.app-shell .ruleset-switch:focus + .ruleset-switch-control__track {
    box-shadow: 0 0 0 3px rgba(105, 190, 40, 0.2);
}

body.app-shell .ruleset-switch-control--disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

body.app-shell .ruleset-section--operator .ruleset-switch-control,
body.app-shell .ruleset-section--negate .ruleset-switch-control {
    justify-content: center;
    width: 100%;
}

body.app-shell .ruleset-policy-negate .ruleset-switch-control {
    min-height: 2.55rem;
    margin-top: 1.7rem;
}

body.app-shell .ruleset-rule-modal .ruleset-subtabs {
    padding: 0.55rem 0.75rem 0;
}

body.app-shell .ruleset-rule-modal .ruleset-subtabs .nav-link {
    padding: 0.65rem 1rem;
    font-size: 0.875rem;
}

body.app-shell .ruleset-rule-modal .ruleset-subtabs .ruleset-subtab--invalid {
    color: var(--app-danger, #dc3545);
}

body.app-shell .ruleset-rule-modal .ruleset-subtabs .ruleset-subtab--invalid::after {
    content: "!";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    margin-left: 0.35rem;
    border-radius: 50%;
    background: var(--app-danger, #dc3545);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
}

body.app-shell .ruleset-rule-modal .ruleset-subtabs-panel {
    padding: 1.5rem;
}

body.app-shell .ruleset-rule-modal .ruleset-criterion-row {
    grid-template-columns: minmax(0, 1.8fr) minmax(23rem, 1fr);
    gap: 1rem;
    margin-bottom: 1.25rem;
}

body.app-shell .ruleset-rule-modal .ruleset-criterion-row__main,
body.app-shell .ruleset-rule-modal .ruleset-criterion-row__side {
    gap: 1rem;
}

body.app-shell .ruleset-rule-modal .ruleset-section {
    min-height: 5.5rem;
    padding: 1.6rem 1rem 0.9rem;
}

body.app-shell .ruleset-rule-modal .ruleset-section__title {
    top: -0.65rem;
    left: 0.85rem;
    padding: 0 0.45rem;
    font-size: 0.875rem;
}

body.app-shell .ruleset-rule-modal .ruleset-section--invalid {
    border-color: var(--app-danger, #dc3545);
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.12);
}

body.app-shell .ruleset-rule-modal .ruleset-section--invalid .ruleset-section__title {
    color: var(--app-danger, #dc3545);
}

body.app-shell .ruleset-rule-modal .ruleset-section--condition,
body.app-shell .ruleset-rule-modal .ruleset-section--negate {
    min-width: 9.5rem;
}

body.app-shell .ruleset-rule-modal .ruleset-section--operator {
    max-width: 9.5rem;
    flex-basis: 9.5rem;
}

body.app-shell .ruleset-rule-modal .ruleset-inline-label {
    font-size: 0.8125rem;
}

body.app-shell .ruleset-rule-modal .ruleset-form-submit-bar {
    position: sticky;
    bottom: -1.25rem;
    z-index: 2;
    margin: 1.5rem -1.5rem -1.25rem;
    padding: 1rem 1.5rem;
    text-align: right;
    background: var(--app-surface, #fff);
    border-top: 1px solid var(--app-border, #dee2e6);
}

body.app-shell .ruleset-rule-modal .ruleset-form-submit-button {
    min-width: 10rem;
    min-height: 2.75rem;
    font-size: 0.9375rem;
}

body.app-shell .ruleset-rule-modal .ruleset-form-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0.5rem 0 1.5rem;
    color: var(--app-text-muted, #6c757d);
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.app-shell .ruleset-rule-modal .ruleset-form-divider::before,
body.app-shell .ruleset-rule-modal .ruleset-form-divider::after {
    content: "";
    height: 1px;
    flex: 1 1 auto;
    background: var(--app-border, #dee2e6);
}

body.app-shell .ruleset-rule-modal .ruleset-form-divider + .row {
    margin-bottom: 0.25rem;
}

@media (max-width: 1199.98px) {
    body.app-shell .ruleset-rule-modal .modal-dialog {
        width: calc(100vw - 2rem);
        height: 94vh;
        margin: 3vh auto;
    }

    body.app-shell .ruleset-rule-modal .ruleset-criterion-row {
        grid-template-columns: minmax(0, 1.4fr) minmax(19rem, 1fr);
    }
}

@media (max-width: 767.98px) {
    body.app-shell .ruleset-rule-modal .modal-dialog {
        width: calc(100vw - 1rem);
        height: 96vh;
        margin: 2vh auto;
    }

    body.app-shell .ruleset-rule-modal .modal-body {
        padding: 1rem;
    }

    body.app-shell .ruleset-rule-modal .ruleset-subtabs-panel {
        padding: 1rem;
    }

    body.app-shell .ruleset-rule-modal .ruleset-criterion-row {
        grid-template-columns: 1fr;
    }

    body.app-shell .ruleset-rule-modal .ruleset-criterion-row__main,
    body.app-shell .ruleset-rule-modal .ruleset-criterion-row__side {
        flex-direction: column;
    }
}
