@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&display=swap");

:root {
    --bg: #f7f8fc;
    --surface: #ffffff;
    --surface-muted: #f1f5f9;
    --ink: #0f172a;
    --muted: #64748b;
    --primary: #2563eb;
    --primary-contrast: #ffffff;
    --danger: #ef4444;
    --border: #e2e8f0;
    --success: #22c55e;
    --shadow-xs: 0 1px 3px rgba(15, 23, 42, 0.08);
    --shadow-sm: 0 8px 20px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 18px 40px rgba(15, 23, 42, 0.1);
    --shadow: var(--shadow-md);
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 20px;
    --layout-max: 1280px;
    --topbar-height: 70px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Manrope", "Segoe UI", sans-serif;
    color: var(--ink);
    background: radial-gradient(1200px 600px at 85% -15%, rgba(59, 130, 246, 0.14), transparent),
        var(--bg);
}

html.i18n-loading body {
    visibility: hidden;
}

a {
    color: inherit;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    backdrop-filter: blur(10px);
    background: rgba(248, 250, 252, 0.9);
}

.layout {
    max-width: var(--layout-max);
    margin: 0 auto;
    padding: 24px;
    display: grid;
    grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
    gap: 24px;
    min-height: calc(100vh - var(--topbar-height));
}

.topbar-inner {
    max-width: var(--layout-max);
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--primary);
    color: var(--primary-contrast);
    font-weight: 700;
    display: grid;
    place-items: center;
    letter-spacing: 1px;
}

.top-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-actions-group {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    display: grid;
    place-items: center;
    cursor: pointer;
    color: var(--muted);
    padding: 0;
    transition: background 0.2s ease, color 0.2s ease;
}

.icon-btn:hover {
    background: var(--surface-muted);
    color: var(--ink);
}

.notifications-btn {
    position: relative;
}

.notifications-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 2px solid #fff;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: grid;
    place-items: center;
    padding: 0 4px;
    line-height: 1;
}

.notifications-badge.is-hidden {
    display: none;
}

.notifications-popover {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(420px, 92vw);
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16);
    padding: 10px;
    z-index: 90;
}

.notifications-popover.is-hidden {
    display: none;
}

.notifications-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 6px 10px;
    border-bottom: 1px solid var(--border);
}

.notifications-head-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.notifications-action-btn {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--muted);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 10px;
    cursor: pointer;
}

.notifications-action-btn:hover {
    background: var(--surface-muted);
    color: var(--ink);
}

.notifications-action-btn.danger {
    color: #b91c1c;
    border-color: #fecaca;
    background: #fff7f7;
}

.notifications-action-btn.danger:hover {
    background: #fee2e2;
    color: #991b1b;
}

.notifications-list {
    max-height: min(420px, 60vh);
    overflow-y: auto;
    padding: 8px 4px 4px;
    display: grid;
    gap: 8px;
}

.notifications-empty {
    color: var(--muted);
    font-size: 13px;
    padding: 10px 8px;
}

.notification-item {
    width: 100%;
    text-align: left;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    padding: 10px 12px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: flex-start;
    column-gap: 10px;
    row-gap: 6px;
    font: inherit;
}

.notification-item.success {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.notification-item.error {
    border-color: #fecaca;
    background: #fef2f2;
}

.notification-item.warning {
    border-color: #fde68a;
    background: #fffbeb;
}

.notification-item.info {
    border-color: #bfdbfe;
    background: #eff6ff;
}

.notification-item.unread {
    border-color: #93c5fd;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.22), 0 6px 16px rgba(37, 99, 235, 0.16);
    background-image: linear-gradient(90deg, rgba(37, 99, 235, 0.16) 0, rgba(37, 99, 235, 0.08) 14px, rgba(255, 255, 255, 0.98) 38px);
}

.notification-item.read {
    opacity: 0.8;
}

.notification-open-btn {
    border: none;
    background: transparent;
    text-align: left;
    display: grid;
    gap: 6px;
    padding: 0;
    margin: 0;
    width: 100%;
    min-width: 0;
    cursor: pointer;
    color: inherit;
    font: inherit;
}

.notification-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-unread-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
    flex: 0 0 auto;
}

.notification-item.read .notification-unread-dot {
    visibility: hidden;
}

.notification-delete-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    background: #fff;
    color: #94a3b8;
    cursor: pointer;
    display: grid;
    place-items: center;
    padding: 0;
    margin: 0;
    align-self: start;
}

.notification-delete-btn svg {
    width: 14px;
    height: 14px;
}

.notification-delete-btn:hover {
    color: #b91c1c;
    border-color: #fecaca;
    background: #fff1f2;
}

.notification-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.3;
}

.notification-item.unread .notification-title {
    color: #1d4ed8;
    font-weight: 800;
}

.notification-message {
    font-size: 12px;
    color: #1f2937;
    line-height: 1.4;
    word-break: break-word;
}

.notification-meta {
    font-size: 11px;
    color: var(--muted);
    margin-top: 2px;
}

.menu-btn {
    display: none;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s ease, color 0.2s ease;
}

.menu-label {
    white-space: nowrap;
}

.menu-btn:hover {
    background: var(--surface-muted);
    color: var(--ink);
}

.user-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s ease;
}

.user-pill:hover {
    background: var(--surface-muted);
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #1f2937;
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

.topbar .status {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
}

.topbar .status.show {
    display: inline-flex;
}

.topbar .status.error {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.sidebar-header {
    display: none;
}

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

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

.nav-icon {
    width: 18px;
    height: 18px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--muted);
    text-decoration: none;
    font-weight: 600;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    font: inherit;
    width: 100%;
    text-align: left;
}

.nav-item:hover {
    background: rgba(37, 99, 235, 0.05);
}

.nav-item.has-submenu {
    justify-content: space-between;
}

.nav-item.active {
    color: var(--ink);
    background: var(--surface);
    border-color: var(--border);
    box-shadow: var(--shadow-xs);
}

.nav-arrow {
    font-size: 16px;
    color: var(--muted);
    transition: transform 0.2s ease, color 0.2s ease;
}

.nav-group.open .nav-arrow {
    transform: rotate(90deg);
    color: var(--ink);
}

.nav-submenu {
    display: none;
    margin-left: 18px;
    padding-left: 12px;
    border-left: 1px dashed var(--border);
    gap: 6px;
}

.nav-group.open .nav-submenu {
    display: grid;
}

.nav-subitem {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    padding: 6px 8px;
    border-radius: 10px;
    text-decoration: none;
}

.nav-subitem.active {
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--border);
}

.sidebar-backdrop {
    display: none;
}

.content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.layout > main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.card {
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
    padding: 22px 24px;
}

.card h2 {
    margin: 0 0 12px;
    font-size: 16px;
    font-family: inherit;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.dashboard-kpis {
    margin-top: 4px;
}

.kpi-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kpi-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.kpi-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #fff;
}

.kpi-icon svg {
    width: 22px;
    height: 22px;
}

.kpi-blue {
    background: #2563eb;
}

.kpi-green {
    background: #16a34a;
}

.kpi-amber {
    background: #f97316;
}

.kpi-label {
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
}

.kpi-value {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.kpi-trend {
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
}

.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.quick-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.quick-list {
    display: grid;
    gap: 12px;
}

.quick-action {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    background: #f1f5ff;
    border: 1px solid rgba(37, 99, 235, 0.08);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.quick-action:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.quick-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #fff;
    flex-shrink: 0;
}

.quick-icon svg {
    width: 22px;
    height: 22px;
}

.quick-blue {
    background: #2563eb;
}

.quick-green {
    background: #16a34a;
}

.quick-purple {
    background: #7c3aed;
}

.quick-amber {
    background: #f97316;
}

.quick-title {
    font-weight: 600;
    font-size: 14px;
}

.quick-subtitle {
    font-size: 12px;
    color: var(--muted);
}

.mode-card {
    display: none !important;
}

.mode-card.active {
    display: block !important;
}

.page-header,
.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 8px;
}

.page-header .page-title,
.page-head h1 {
    margin: 0 0 6px;
    font-size: 24px;
    font-family: inherit;
}

.page-header .page-description,
.page-head p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.page-actions,
.toolbar,
.table-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.btn {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--ink);
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    font-family: inherit;
}

.btn:hover {
    background: var(--surface-muted);
}

.btn:disabled {
    opacity: 0.6;
    cursor: default;
}

.btn.primary {
    background: var(--primary);
    color: var(--primary-contrast);
    border-color: var(--primary);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);
}

.btn.primary:hover {
    background: #1d4ed8;
}

.btn.danger {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}

.btn.ghost {
    background: transparent;
}

label {
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    font-size: 13px;
    font-family: inherit;
    background: var(--surface);
}

/* Keep checkbox/radio controls stable across pages that use generic input rules. */
input[type="checkbox"],
input[type="radio"] {
    width: 16px;
    min-width: 16px;
    height: 16px;
    padding: 0;
    margin: 0;
    flex: 0 0 16px;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.field {
    display: grid;
    gap: 6px;
}

.table-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.table-header {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.table-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-title h2 {
    margin: 0;
    line-height: 1.2;
}

.count-badge {
    display: inline-flex;
    align-items: center;
    background: #e0e7ff;
    color: #1e40af;
    border-radius: 999px;
    height: 22px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.table-filters,
.filters-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.filters-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.filters-grid input,
.filters-grid select {
    width: 100%;
    padding: 9px 12px;
    border-radius: 12px;
}

.vb-filter-group {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    overflow: hidden;
}

.vb-filter-summary {
    cursor: pointer;
    list-style: none;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
}

.vb-filter-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vb-filter-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.vb-filter-summary::-webkit-details-marker {
    display: none;
}

.vb-filter-count {
    color: var(--muted);
    font-weight: 600;
}

.vb-filter-arrow {
    font-size: 16px;
    line-height: 1;
    color: var(--muted);
    transition: transform 0.2s ease, color 0.2s ease;
}

.vb-filter-group[open] .vb-filter-arrow {
    transform: rotate(90deg);
    color: var(--ink);
}

.vb-filter-options {
    display: grid;
    gap: 8px;
    border-top: 1px solid var(--border);
    padding: 8px 10px 10px;
}

.vb-filter-search {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--surface);
}

.vb-filter-search-input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    font-size: 13px;
    padding: 8px 10px;
}

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

.vb-filter-action-btn {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--muted);
    font: inherit;
    font-size: 12px;
    line-height: 1.2;
    padding: 6px 10px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.vb-filter-action-btn:hover:not(:disabled) {
    border-color: rgba(37, 99, 235, 0.35);
    color: var(--ink);
}

.vb-filter-action-btn.is-active {
    border-color: rgba(37, 99, 235, 0.35);
    background: rgba(37, 99, 235, 0.12);
    color: var(--primary);
}

.vb-filter-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.vb-filter-options-list {
    display: grid;
    gap: 6px;
    max-height: 220px;
    overflow: auto;
    padding-right: 2px;
}

.vb-filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.vb-filter-empty {
    color: var(--muted);
    font-size: 12px;
    padding: 4px 0;
}

.vb-filter-empty-search {
    padding-top: 0;
}

.filters-grid.vb-filters-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    max-height: 60vh;
    overflow: auto;
    padding-right: 4px;
}

.form-field.checkbox-field,
.form-field:has(> .checkbox-row) {
    align-self: stretch;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding-top: 0;
}

.form-field.checkbox-field .checkbox-row,
.form-field:has(> .checkbox-row) > .checkbox-row {
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    white-space: nowrap;
}

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

.table th,
.table td {
    text-align: left;
    padding: 12px 10px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    vertical-align: top;
}

.table th {
    color: var(--muted);
    font-weight: 600;
}

.table thead {
    background: var(--surface-muted);
}

.table tbody tr:hover {
    background: rgba(37, 99, 235, 0.04);
}

.empty {
    text-align: center;
    padding: 24px;
    color: var(--muted);
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    font-size: 12px;
    color: var(--muted);
}

.pill.success {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.2);
    color: #15803d;
}

.pill.danger {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.2);
    color: #b91c1c;
}

.tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.tab-btn {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--muted);
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.tab-btn.active {
    background: rgba(37, 99, 235, 0.12);
    color: var(--primary);
    border-color: rgba(37, 99, 235, 0.2);
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
}

.status.error {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
}

.status:empty {
    display: none;
}

.page-btn {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--ink);
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.page-btn:hover {
    background: var(--surface-muted);
}

.page-btn[disabled] {
    opacity: 0.5;
    cursor: default;
}

.page-btn.active {
    background: rgba(37, 99, 235, 0.12);
    color: var(--primary);
    border-color: rgba(37, 99, 235, 0.2);
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 80;
    padding: 24px;
}

.modal.open {
    display: flex;
}

.modal-panel {
    width: min(860px, 96vw);
    max-height: 90vh;
    overflow: auto;
    background: var(--surface);
    border-radius: 18px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    padding: 20px;
    display: grid;
    gap: 12px;
}

.sticky-actions {
    position: sticky;
    bottom: 0;
    z-index: 5;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, var(--surface) 24%);
    padding-top: 12px;
}

.auth-page {
    display: grid;
    place-items: center;
    padding: 24px;
    background: radial-gradient(900px 500px at 50% -20%, rgba(37, 99, 235, 0.18), transparent),
        var(--bg);
}

.auth-page .card {
    width: min(420px, 100%);
    padding: 26px;
    box-shadow: var(--shadow-md);
}

.brand-title {
    font-weight: 600;
}

.brand-subtitle {
    font-size: 12px;
    color: var(--muted);
}

.nav-label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.overflow-auto {
    overflow: auto;
}

.is-hidden {
    display: none;
}

.is-muted {
    opacity: 0.6;
}

.flex {
    display: flex;
}

.inline-flex {
    display: inline-flex;
}

.items-center {
    align-items: center;
}

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

.gap-8 {
    gap: 8px;
}

.gap-10 {
    gap: 10px;
}

.gap-12 {
    gap: 12px;
}

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

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

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

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

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

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

.mt-neg-6 {
    margin-top: -6px;
}

.mb-14 {
    margin-bottom: 14px;
}

.text-muted {
    color: var(--muted);
}

.text-muted-sm {
    color: var(--muted);
    font-size: 13px;
}

.text-danger {
    color: #b91c1c;
}

.text-warn {
    color: #9a3412;
    font-weight: 600;
}

.text-muted-uppercase {
    font-size: 13px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.font-600 {
    font-weight: 600;
}

.title-sm {
    margin: 0;
    font-size: 15px;
}

.col-checkbox {
    width: 40px;
}

@media (max-width: 960px) {
    .topbar-inner {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-areas:
            "brand"
            "actions";
        row-gap: 10px;
        align-items: center;
        padding: 12px 16px;
        max-width: none;
        width: 100%;
        margin: 0;
    }

    .brand {
        grid-area: brand;
        justify-self: center;
    }

    .top-actions {
        grid-area: actions;
        margin-left: 0;
        justify-self: stretch;
        justify-content: space-between;
        width: 100%;
    }

    .top-actions-group {
        margin-left: 12px;
        flex-shrink: 0;
    }

    .menu-btn {
        display: inline-flex;
        justify-content: flex-start;
        min-width: 0;
    }

    .layout {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        right: 0;
        width: 100vw;
        max-width: 100vw;
        margin: 0;
        padding: 18px;
        background: var(--surface);
        box-shadow: var(--shadow-md);
        transform: translateX(-100%);
        transition: transform 0.2s ease;
        z-index: 80;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 0;
    }

    .sidebar-header {
        position: sticky;
        top: 0;
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        padding: 6px 0 14px;
        background: var(--surface);
    }

    .sidebar-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(15, 23, 42, 0.35);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.2s ease;
        z-index: 70;
    }

    body.sidebar-open,
    html.sidebar-open body {
        overflow: hidden;
    }

    body.sidebar-open .sidebar,
    html.sidebar-open .sidebar {
        transform: translateX(0);
    }

    body.sidebar-open .sidebar-backdrop,
    html.sidebar-open .sidebar-backdrop {
        opacity: 1;
        visibility: visible;
    }
}
