/* ===== Brand theme variables ===== */
:root {
    --brand-primary: #7FB069;
    --brand-secondary: #30343F;
    --brand-tertiary: #60666E;
    --brand-surface: #E7E9EC;
    --brand-neutral: #F7F9FA;
    --brand-error: #FF5C5C;
}

/* ===== Login page ===== */
.login-page {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #eef6ea 0%, var(--brand-neutral) 45%, #ffffff 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
}

.login-wrapper {
    width: 100%;
    max-width: 400px;
}

.login-logo {
    width: 44px;
    height: 44px;
    background: var(--brand-primary);
    color: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin: 0 auto 10px;
}

.brand-name {
    color: var(--brand-secondary);
    font-weight: 700;
    margin-bottom: 2px;
}

.brand-tagline {
    color: var(--brand-tertiary);
    font-size: 13px;
    margin-bottom: 0;
}

.login-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px 28px;
    box-shadow: 0 10px 40px rgba(48, 52, 63, 0.08);
    border: 1px solid var(--brand-surface);
}

.login-card h5 {
    color: var(--brand-secondary);
}

.custom-input {
    background: var(--brand-neutral);
    border: 1px solid var(--brand-surface);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
}

.custom-input:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(127, 176, 105, 0.15);
    background: #ffffff;
}

.btn-toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--brand-tertiary);
    padding: 0;
}

.forgot-link {
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: 500;
}

.forgot-link:hover {
    text-decoration: underline;
}

.form-check-input:checked {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
}

.btn-brand {
    background: var(--brand-primary);
    color: #ffffff;
    border-radius: 8px;
    padding: 11px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    transition: 0.2s ease;
}

.btn-brand:hover {
    background: #6fa058;
    color: #fff;
}

.support-divider {
    font-size: 11px;
    color: var(--brand-tertiary);
    letter-spacing: 0.5px;
    position: relative;
}

.btn-outline-support {
    border: 1px solid var(--brand-surface);
    color: var(--brand-secondary);
    background: var(--brand-neutral);
    border-radius: 8px;
    font-size: 13px;
    padding: 8px;
}

.btn-outline-support:hover {
    background: var(--brand-surface);
    color: var(--brand-secondary);
}

.footer-text {
    font-size: 12px;
    color: var(--brand-tertiary);
}

.footer-links {
    font-size: 12px;
}

.footer-links a {
    color: var(--brand-tertiary);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--brand-primary);
}

/* ===== App Layout ===== */
body {
    font-family: 'Poppins', sans-serif;
    background: var(--brand-neutral);
    margin: 0;
}

.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
    width: 260px;
    background: var(--brand-secondary);
    color: #fff;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: width 0.25s ease, transform 0.25s ease;
    position: relative;
    padding: 20px 16px;
}

.sidebar.collapsed {
    width: 76px;
    padding: 20px 10px;
}

.sidebar.collapsed .brand-text,
.sidebar.collapsed .sidebar-menu span,
.sidebar.collapsed .storage-box {
    display: none;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
}

.brand-icon {
    width: 38px;
    height: 38px;
    background: var(--brand-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
}

.brand-text h6 { margin: 0; font-weight: 700; font-size: 15px; }
.brand-text span { font-size: 10px; color: #9aa0a8; letter-spacing: 0.5px; }

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
}

.sidebar-menu li { margin-bottom: 6px; }

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 10px;
    color: #cbd0d6;
    text-decoration: none;
    font-size: 14.5px;
    transition: 0.15s ease;
}

.sidebar-menu a i { font-size: 16px; width: 18px; text-align: center; }

.sidebar-menu a:hover {
    background: rgba(255,255,255,0.06);
    color: #fff;
}

.sidebar-menu a.active {
    background: var(--brand-primary);
    color: #fff;
}

.storage-box {
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 12px;
    color: #cbd0d6;
}

.storage-progress {
    height: 5px;
    background: rgba(255,255,255,0.15);
    margin-bottom: 6px;
}

.storage-progress .progress-bar {
    background: var(--brand-primary);
}

/* MAIN CONTENT */
.main-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fff;
    padding: 14px 24px;
    border-bottom: 1px solid var(--brand-surface);
    position: sticky;
    top: 0;
    z-index: 10;
}

.sidebar-toggle-btn {
    background: var(--brand-neutral);
    border: 1px solid var(--brand-surface);
    border-radius: 8px;
    width: 38px;
    height: 38px;
    color: var(--brand-secondary);
    flex-shrink: 0;
}

.search-box {
    flex: 1;
    max-width: 480px;
    background: var(--brand-neutral);
    border: 1px solid var(--brand-surface);
    border-radius: 10px;
    padding: 9px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--brand-tertiary);
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 13.5px;
}

.topbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 14px;
}

.icon-btn {
    background: none;
    border: none;
    color: var(--brand-tertiary);
    font-size: 18px;
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 12px;
    border-left: 1px solid var(--brand-surface);
}

.admin-role { font-size: 11px; }

.avatar-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--brand-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
}

.page-content {
    padding: 24px;
}

.page-title {
    font-weight: 700;
    color: var(--brand-secondary);
    margin-bottom: 2px;
}

.page-subtitle {
    color: var(--brand-tertiary);
    font-size: 13.5px;
    margin: 0;
}

.btn-light-outline {
    background: #fff;
    border: 1px solid var(--brand-surface);
    color: var(--brand-secondary);
    border-radius: 8px;
    font-size: 13.5px;
    padding: 8px 14px;
}

/* STAT CARDS */
.stat-card {
    background: #fff;
    border-radius: 14px;
    padding: 18px;
    border: 1px solid var(--brand-surface);
    height: 100%;
}

.stat-icon {
    width: 42px;
    height: 42px;
    background: var(--brand-neutral);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-primary);
    font-size: 18px;
}

.stat-change {
    font-size: 12px;
    font-weight: 600;
}

.stat-change.up { color: var(--brand-primary); }
.stat-change.down { color: var(--brand-error); }

.stat-label {
    font-size: 11px;
    color: var(--brand-tertiary);
    letter-spacing: 0.5px;
    margin: 14px 0 2px;
}

.stat-value {
    font-weight: 700;
    color: var(--brand-secondary);
    margin: 0;
}

/* PANEL CARDS */
.panel-card {
    background: #fff;
    border-radius: 14px;
    padding: 20px;
    border: 1px solid var(--brand-surface);
}

.panel-title {
    font-weight: 700;
    color: var(--brand-secondary);
}

.legend-dot {
    font-size: 12px;
    color: var(--brand-tertiary);
}

.legend-dot i { color: var(--brand-primary); font-size: 8px; margin-right: 4px; }

.dist-row { margin-bottom: 16px; }

.dist-progress { height: 6px; background: var(--brand-surface); }

.bar-primary { background: var(--brand-primary); }
.bar-secondary { background: var(--brand-secondary); }
.bar-tertiary { background: var(--brand-tertiary); }
.bar-light { background: #c9cdd2; }

.view-all-link {
    color: var(--brand-primary);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

/* TABLE */
.activity-table thead th {
    font-size: 11px;
    color: var(--brand-tertiary);
    letter-spacing: 0.5px;
    background: var(--brand-neutral);
    border: none;
    padding: 12px 14px;
}

.activity-table tbody td {
    padding: 14px;
    border-color: var(--brand-surface);
    font-size: 13.5px;
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #d8dee3;
    color: var(--brand-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.avatar-alt1 { background: #d7ecd0; }
.avatar-alt2 { background: #f8d5d5; }
.avatar-alt3 { background: #d8dde3; }

.tiny { font-size: 11px; }

.status-pill {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-block;
}

.status-success { background: #e4f2df; color: #4d8a3b; }
.status-failed { background: #fde2e2; color: #d64545; }
.status-deleted { background: var(--brand-surface); color: var(--brand-tertiary); }

.icon-btn-sm {
    background: none;
    border: none;
    color: var(--brand-tertiary);
}

.add-btn {
    background: var(--brand-primary);
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
}

/* RESPONSIVE: sidebar collapses to off-canvas on small screens */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 1000;
        transform: translateX(-100%);
    }
    .sidebar.mobile-open {
        transform: translateX(0);
    }
}

/* ===== Breadcrumb ===== */
.breadcrumb-nav {
    font-size: 13px;
    color: var(--brand-tertiary);
}

.breadcrumb-nav i { font-size: 10px; margin: 0 6px; }

.breadcrumb-nav .active { color: var(--brand-primary); font-weight: 600; }

/* ===== Stat card alt label (Users page) ===== */
.stat-label-alt {
    font-size: 13px;
    color: var(--brand-tertiary);
    margin: 10px 0 2px;
}

.icon-muted { background: var(--brand-surface); color: var(--brand-secondary); }
.icon-danger { background: #fde2e2; color: var(--brand-error); }

/* ===== User tabs ===== */
.user-tabs { border: none; gap: 6px; }

.user-tabs .nav-link {
    border: none;
    color: var(--brand-tertiary);
    font-size: 13.5px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 8px;
}

.user-tabs .nav-link.active {
    background: #e4f2df;
    color: #4d8a3b;
    font-weight: 600;
}

.icon-square-btn {
    width: 38px;
    height: 38px;
    border: 1px solid var(--brand-surface);
    background: #fff;
    border-radius: 8px;
    color: var(--brand-secondary);
}

/* ===== Status pill with dot ===== */
.status-pill .dot {
    font-size: 6px;
    margin-right: 5px;
    vertical-align: middle;
}

/* ===== View details button ===== */
.btn-view-details {
    border: 1px solid var(--brand-surface);
    background: #fff;
    color: var(--brand-secondary);
    font-size: 12.5px;
    font-weight: 600;
    padding: 7px 16px;
    border-radius: 8px;
}

.btn-view-details:hover {
    background: var(--brand-neutral);
}

/* ===== Pagination ===== */
.table-footer {
    border-top: 1px solid var(--brand-surface);
}

.pagination-custom {
    display: flex;
    list-style: none;
    gap: 6px;
    margin: 0;
    padding: 0;
}

.page-btn {
    width: 34px;
    height: 34px;
    border: 1px solid var(--brand-surface);
    background: #fff;
    border-radius: 8px;
    color: var(--brand-secondary);
    font-size: 13px;
}

.page-btn.active {
    background: var(--brand-primary);
    color: #fff;
    border-color: var(--brand-primary);
}

/* avatar variant for photo-style circles on Users page */
.avatar-photo {
    background: #d8dee3;
}

/* ===== User Detail: Profile header ===== */
.profile-avatar-wrap { position: relative; }

.profile-avatar {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: #d8dee3;
    color: var(--brand-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
}

.verified-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: var(--brand-primary);
    color: #fff;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    border: 2px solid #fff;
}

.btn-outline-danger-custom {
    border: 1px solid #f5c6c6;
    background: #fff;
    color: var(--brand-error);
    border-radius: 8px;
    font-size: 13.5px;
    padding: 8px 14px;
}

.btn-outline-danger-custom:hover { background: #fdeded; }

.stat-change-danger {
    font-size: 12px;
    color: var(--brand-error);
    font-weight: 600;
}

/* ===== Timeline ===== */
.timeline-item {
    display: flex;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid var(--brand-surface);
}

.timeline-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--brand-neutral);
    border: 1px solid var(--brand-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--brand-secondary);
    font-size: 14px;
}

/* ===== Alert cards ===== */
.alert-card {
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--brand-surface);
}

.alert-danger-card { background: #fdeeee; border-color: #f6d5d5; }
.alert-success-card { background: #fff; }

.alert-tag {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4px;
}

.tag-danger { color: var(--brand-error); }
.tag-success { color: #4d8a3b; }

.btn-danger-solid {
    background: var(--brand-error);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 9px;
    font-weight: 600;
    font-size: 13.5px;
}

.btn-danger-solid:hover { background: #e04545; color: #fff; }

/* ===== Portfolio health (dark card) ===== */
.portfolio-health-card {
    background: var(--brand-secondary);
    color: #e7e9ec;
    border-radius: 12px;
    padding: 18px;
}

.portfolio-health-card h6 { color: var(--brand-primary); }

.health-progress {
    height: 6px;
    background: rgba(255,255,255,0.15);
}

.health-progress .progress-bar { background: var(--brand-primary); }

.health-link {
    color: var(--brand-primary);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

/* ===== Clickable table rows ===== */
.clickable-row { cursor: pointer; }
.clickable-row:hover { background: var(--brand-neutral); }

.breadcrumb-nav a { color: var(--brand-tertiary); text-decoration: none; }
.breadcrumb-nav a:hover { color: var(--brand-primary); }

/* ===== Send Notification ===== */
.notify-textarea {
    background: var(--brand-neutral);
    border: 1px solid var(--brand-surface);
    border-radius: 10px;
    resize: vertical;
    font-size: 13.5px;
}

.notify-textarea:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(127, 176, 105, 0.15);
    background: #fff;
}

/* ===== Activity table icon ===== */
.activity-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--brand-neutral);
    border: 1px solid var(--brand-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-secondary);
    font-size: 13px;
    flex-shrink: 0;
}

.small-tag {
    font-size: 9px;
    padding: 2px 7px;
    margin-left: 6px;
    vertical-align: middle;
}

/* ===== Asset Details ===== */
.btn-danger-solid-sm {
    background: var(--brand-error);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13.5px;
    padding: 9px 16px;
    font-weight: 600;
}

.btn-danger-solid-sm:hover { background: #e04545; color: #fff; }

.scan-preview {
    background: #1c1c1c;
    border-radius: 18px;
    padding: 14px;
    max-width: 220px;
    margin: 0 auto;
}

.scan-mock-header {
    color: #7FB069;
    font-size: 11px;
    margin-bottom: 8px;
}

.scan-mock-body {
    background: #fff;
    border-radius: 10px;
    padding: 12px;
    text-align: left;
}

.scan-mock-label {
    font-size: 9px;
    color: var(--brand-tertiary);
    letter-spacing: 0.5px;
}

.scan-mock-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--brand-secondary);
}

.scan-mock-value-sm {
    font-size: 11px;
    font-weight: 600;
    color: var(--brand-secondary);
}

.detail-label {
    font-size: 12px;
    color: var(--brand-tertiary);
    margin-bottom: 2px;
}

.detail-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--brand-secondary);
    margin: 0;
}

.detail-value-lg {
    font-size: 24px;
    font-weight: 700;
    color: var(--brand-primary);
    margin: 0;
}

.tax-icon {
    width: 40px;
    height: 40px;
    background: #dce7f5;
    color: #3b6fb0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tax-row {
    background: var(--brand-neutral);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.tax-available {
    color: #4d8a3b;
    font-weight: 600;
    font-size: 13.5px;
}

/* Side panels */
.side-panel {
    background: var(--brand-neutral);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--brand-surface);
}

.side-panel-header {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--brand-tertiary);
    padding: 14px 18px;
    background: #edeff1;
}

.side-panel-body {
    background: #fff;
    padding: 16px 18px;
}

.side-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--brand-surface);
    font-size: 13.5px;
    color: var(--brand-secondary);
}

.product-row {
    padding: 12px 0;
    border-bottom: 1px dashed var(--brand-surface);
}

.chip {
    background: var(--brand-neutral);
    border: 1px solid var(--brand-surface);
    border-radius: 6px;
    font-size: 10.5px;
    padding: 3px 8px;
    color: var(--brand-tertiary);
}

.bill-summary { padding-top: 10px; }

.total-bill-box {
    background: #e4f2df;
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-bill-amount {
    font-size: 18px;
    font-weight: 700;
    color: #4d8a3b;
}

/* ===== Settings page ===== */
.settings-icon {
    width: 42px;
    height: 42px;
    background: var(--brand-neutral);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-primary);
    font-size: 18px;
    flex-shrink: 0;
}

.text-brand { color: var(--brand-primary); }

.interval-display {
    font-size: 20px;
    font-weight: 700;
    color: var(--brand-secondary);
}

.custom-range {
    accent-color: var(--brand-primary);
    height: 6px;
}

.range-marks {
    font-size: 11px;
    color: var(--brand-tertiary);
    margin-top: 6px;
}

.info-callout {
    border-left: 3px solid var(--brand-primary);
    background: var(--brand-neutral);
    padding: 12px 14px;
    font-size: 13px;
    font-style: italic;
    color: var(--brand-tertiary);
    border-radius: 0 8px 8px 0;
}

/* AI option cards */
.ai-option-card {
    display: block;
    border: 1px solid var(--brand-surface);
    border-radius: 12px;
    padding: 16px 10px;
    text-align: center;
    cursor: pointer;
    height: 100%;
    transition: 0.15s ease;
}

.ai-option-card:hover { border-color: #c7d9c0; }

.ai-option-card.selected {
    border-color: var(--brand-primary);
    background: #f2f8ef;
}

.ai-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--brand-neutral);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 18px;
    color: var(--brand-secondary);
}

.ai-option-card.selected .ai-icon {
    background: var(--brand-primary);
    color: #fff;
}

.ai-name {
    font-weight: 700;
    font-size: 13.5px;
    color: var(--brand-secondary);
    margin-bottom: 4px;
}

.ai-desc {
    font-size: 11px;
    color: var(--brand-tertiary);
    line-height: 1.4;
}

/* Filter box */
.filter-box {
    background: var(--brand-neutral);
    border: 1px solid var(--brand-surface);
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 220px;
}

.filter-box input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 13px;
    width: 100%;
}

.role-chip {
    background: var(--brand-neutral);
    border: 1px solid var(--brand-surface);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--brand-secondary);
}

/* Toggle switch */
.switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider-toggle {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #d8dee3;
    border-radius: 24px;
    transition: 0.2s;
}

.slider-toggle::before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    border-radius: 50%;
    transition: 0.2s;
}

.switch input:checked + .slider-toggle {
    background-color: var(--brand-primary);
}

.switch input:checked + .slider-toggle::before {
    transform: translateX(18px);
}

/* Admin detail card */
.admin-photo-wrap {
    position: relative;
    width: 90px;
}

.admin-photo {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--brand-secondary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
}

.camera-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 28px;
    height: 28px;
    background: #fff;
    border: 2px solid var(--brand-surface);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--brand-secondary);
}

.permission-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--brand-neutral);
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 8px;
    font-size: 13px;
    text-align: left;
    color: var(--brand-secondary);
}

/* ===== Category cards ===== */
.category-card {
    background: #fff;
    border: 1px solid var(--brand-surface);
    border-radius: 14px;
    overflow: hidden;
    height: 100%;
}

.category-thumb {
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    color: #fff;
    position: relative;
}

.cat-blue { background: linear-gradient(135deg, #6b8cae, #3f5c78); }
.cat-amber { background: linear-gradient(135deg, #d8b06a, #a97e3d); }
.cat-green { background: linear-gradient(135deg, #8fb87a, #5c8a4a); }
.cat-slate { background: linear-gradient(135deg, #8b929a, #5a6169); }

.cat-menu-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255,255,255,0.25);
    border: none;
    color: #fff;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    font-size: 13px;
}

.category-body { padding: 14px; }

.add-category-card {
    width: 100%;
    height: 100%;
    min-height: 190px;
    background: var(--brand-neutral);
    border: 2px dashed var(--brand-surface);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--brand-tertiary);
}

.add-category-card:hover {
    border-color: var(--brand-primary);
    background: #f2f8ef;
    color: var(--brand-primary);
}

.add-category-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--brand-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin-bottom: 6px;
}

/* Top performing list */
.top-performing-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--brand-surface);
}

.top-performing-row:last-child { border-bottom: none; padding-bottom: 0; }

.rank-badge {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: var(--brand-neutral);
    color: var(--brand-secondary);
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.skeleton-loader {
    display: inline-block;
    width: 60px;
    height: 20px;
    background: linear-gradient(90deg, var(--brand-surface) 25%, #f0f2f4 50%, var(--brand-surface) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: 4px;
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Add this to your dashboard.css for consistent profile avatar styling */

/* Profile Avatar - User Detail Page */
.profile-avatar-wrap {
    width: 100px !important;
    height: 100px !important;
    border-radius: 50% !important;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.profile-avatar-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Profile Avatar - Table (Users List) */
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Verified Badge positioning */
.verified-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    background: #ffffff;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    font-size: 16px;
    color: #10b981;
}

/* Initials fallback styling */
.profile-avatar {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 700;
    font-size: 36px;
}

.cat-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

/* ===== Compact stats (Categories page) ===== */
.stat-card-compact {
    background: #fff;
    border: 1px solid var(--brand-surface);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-card-compact .stat-icon {
    width: 38px;
    height: 38px;
    font-size: 15px;
    flex-shrink: 0;
}

.stat-card-compact-text .stat-label-alt {
    font-size: 11px;
}

.stat-card-compact-text .stat-value {
    font-size: 20px;
}

/* ===== Pagination controls (Categories page) ===== */
.pager-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pager-controls .page-btn {
    width: 28px;
    height: 28px;
    font-size: 12px;
}

.pager-controls .page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ===== Category contribution row (Default + Custom Categories) ===== */
.cat-row {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 8px;
    background: var(--brand-neutral);
}

.cat-row-fill {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.16;
    transition: width 0.3s ease;
}

.cat-row-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
}

.cat-row-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid var(--brand-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: var(--brand-secondary);
}

.cat-row-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cat-row-info {
    flex: 1;
    min-width: 0;
}

.cat-row-value {
    flex-shrink: 0;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--brand-secondary);
    white-space: nowrap;
}

.top-badge {
    background: #fff3cd;
    color: #9a7008;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.top-badge i {
    font-size: 8px;
}

/* Gradient palette. Indices align with the PALETTE array in the page script. */
.cat-row.grad-0 .cat-row-fill { background: linear-gradient(135deg, #7FB069, #5c8a4a); }
.cat-row.grad-1 .cat-row-fill { background: linear-gradient(135deg, #6b8cae, #3f5c78); }
.cat-row.grad-2 .cat-row-fill { background: linear-gradient(135deg, #d8b06a, #a97e3d); }
.cat-row.grad-3 .cat-row-fill { background: linear-gradient(135deg, #8b929a, #5a6169); }
.cat-row.grad-4 .cat-row-fill { background: linear-gradient(135deg, #c17a6f, #964f45); }
.cat-row.grad-5 .cat-row-fill { background: linear-gradient(135deg, #5c7cae, #34537d); }
.cat-row.grad-6 .cat-row-fill { background: linear-gradient(135deg, #9b7fc7, #6a4f97); }
.cat-row.grad-7 .cat-row-fill { background: linear-gradient(135deg, #4a9b8e, #2f6b61); }

/* ===== Topbar brand (replaces the removed search bar) ===== */
.topbar-brand {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.topbar-brand-name {
    font-weight: 700;
    font-size: 15px;
    color: var(--brand-secondary);
}

.topbar-brand-tagline {
    font-size: 11.5px;
    color: var(--brand-tertiary);
}

/* ===== Notification bell + badge ===== */
.notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--brand-error);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    min-width: 15px;
    height: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
}

.notif-dropdown {
    width: 340px;
    max-width: 90vw;
    border: 1px solid var(--brand-surface);
    box-shadow: 0 10px 40px rgba(48, 52, 63, 0.12);
    overflow: hidden;
}

.notif-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: var(--brand-neutral);
    border-bottom: 1px solid var(--brand-surface);
}

.notif-dropdown-body {
    max-height: 360px;
    overflow-y: auto;
}

.notif-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border-bottom: 1px solid var(--brand-surface);
    cursor: pointer;
}

.notif-item:hover { background: var(--brand-neutral); }
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { background: #f2f8ef; }

.notif-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand-primary);
    flex-shrink: 0;
    margin-top: 5px;
}

.notif-item.read .notif-dot { background: transparent; }

.notif-item-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--brand-secondary);
    margin-bottom: 2px;
}

.notif-item-body {
    font-size: 12px;
    color: var(--brand-tertiary);
}

.btn-link-sm {
    background: none;
    border: none;
    color: var(--brand-primary);
    font-size: 12px;
    font-weight: 600;
    padding: 0;
}

/* ===== Admin profile dropdown trigger ===== */
.admin-profile { cursor: pointer; }

.avatar-circle-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* ===== Logo placement helper (sidebar brand icon, when using an <img>) ===== */
.brand-icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}


/* ===== Banner logo (login page + topbar) ===== */
.login-banner {
    max-width: 260px;
    width: 100%;
    height: auto;
    margin: 0 auto 24px;
    display: block;
}

.topbar-banner-wrap {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    height: 100%;
    max-height: 44px;
}

.topbar-banner {
    height: 40px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    display: block;
}

/* ===== Sidebar mark (favicon only, no card/background) ===== */
.sidebar-brand-mark {
    height: 34px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

/* ===== Sidebar mark (large banner, no card/background) ===== */
.sidebar-brand-mark {
    width: 90%;
    height: auto;
    max-height: 72px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.sidebar-brand {
    display: flex;
    justify-content: center;
    padding: 4px 0 8px;
}

/* ===== Topbar welcome column (replaces removed banner) ===== */
.topbar-welcome {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    min-width: 0;
}

.topbar-welcome-name {
    font-weight: 700;
    font-size: 15px;
    color: var(--brand-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-welcome-email {
    font-size: 12px;
    color: var(--brand-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== User Directory: elevated stat tiles (left column) ===== */
.stat-elevated {
    position: relative;
    background: #fff;
    border: 1px solid var(--brand-surface);
    border-radius: 16px;
    padding: 18px 20px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(48, 52, 63, 0.06), 0 2px 6px rgba(48, 52, 63, 0.04);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-elevated-orb {
    position: absolute;
    top: -30px;
    right: -30px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    opacity: 0.10;
    filter: blur(2px);
}

.orb-primary { background: var(--brand-primary); }
.orb-secondary { background: var(--brand-secondary); }

.stat-elevated-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--brand-neutral);
    color: var(--brand-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 12px;
    box-shadow: 0 4px 10px rgba(127, 176, 105, 0.25), inset 0 1px 0 rgba(255,255,255,0.6);
    position: relative;
    z-index: 1;
}

.stat-elevated-icon.icon-muted {
    color: var(--brand-secondary);
    box-shadow: 0 4px 10px rgba(48, 52, 63, 0.15), inset 0 1px 0 rgba(255,255,255,0.6);
}

.stat-elevated .stat-value {
    position: relative;
    z-index: 1;
    font-size: 30px;
}

.stat-elevated .stat-label-alt {
    position: relative;
    z-index: 1;
}

/* ===== User Directory: growth chart year selector ===== */
.growth-year-select {
    border: 1px solid var(--brand-surface);
    background: var(--brand-neutral);
    color: var(--brand-secondary);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 30px 6px 12px;
}

.growth-year-select:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(127, 176, 105, 0.15);
    outline: none;
}

/* ===== User Directory: compact elevated stat tiles (left column) ===== */
.stat-elevated {
    position: relative;
    background: #fff;
    border: 1px solid var(--brand-surface);
    border-radius: 14px;
    padding: 12px 14px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(48, 52, 63, 0.06), 0 2px 5px rgba(48, 52, 63, 0.04);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.stat-elevated-orb {
    position: absolute;
    top: -24px;
    right: -24px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    opacity: 0.08;
    filter: blur(2px);
}

.orb-primary { background: var(--brand-primary); }
.orb-secondary { background: var(--brand-secondary); }

.stat-elevated-main {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
    min-width: 0;
}

.stat-elevated-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--brand-neutral);
    color: var(--brand-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(127, 176, 105, 0.25), inset 0 1px 0 rgba(255,255,255,0.6);
}

.stat-elevated-icon.icon-muted {
    color: var(--brand-secondary);
    box-shadow: 0 3px 8px rgba(48, 52, 63, 0.15), inset 0 1px 0 rgba(255,255,255,0.6);
}

.stat-elevated .stat-label-alt {
    font-size: 10.5px;
    margin: 0 0 1px;
}

.stat-elevated .stat-value {
    font-size: 20px;
    line-height: 1.1;
}

/* Mini sparkline — purely visual "trend" indicator, static bars */
.mini-sparkline {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 32px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.mini-sparkline span {
    width: 5px;
    border-radius: 3px 3px 1px 1px;
    background: linear-gradient(180deg, var(--brand-primary) 0%, rgba(127,176,105,0.35) 100%);
    box-shadow: 0 2px 4px rgba(127, 176, 105, 0.25);
}

.mini-sparkline.spark-muted span {
    background: linear-gradient(180deg, var(--brand-secondary) 0%, rgba(48,52,63,0.25) 100%);
    box-shadow: 0 2px 4px rgba(48, 52, 63, 0.18);
}

/* ===== Decorative elevated bar illustration — fills leftover space,
   anchored bottom-right, purely static/visual (no numbers to read) ===== */
.stat-decorative-card {
    background: #fff;
    border: 1px solid var(--brand-surface);
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(48, 52, 63, 0.06), 0 2px 5px rgba(48, 52, 63, 0.04);
    padding: 14px;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    flex-grow: 1;
    min-height: 70px;
}

.decorative-bars {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 100%;
}

.decorative-bars span {
    width: 10px;
    border-radius: 5px 5px 2px 2px;
    box-shadow: 0 3px 6px rgba(48, 52, 63, 0.15);
}

.decorative-bars span:nth-child(1) { background: linear-gradient(180deg, #c7ddba, rgba(127,176,105,0.3)); }
.decorative-bars span:nth-child(2) { background: linear-gradient(180deg, var(--brand-primary), rgba(127,176,105,0.4)); }
.decorative-bars span:nth-child(3) { background: linear-gradient(180deg, #6fa058, rgba(111,160,88,0.4)); }
.decorative-bars span:nth-child(4) { background: linear-gradient(180deg, var(--brand-secondary), rgba(48,52,63,0.35)); }
.decorative-bars span:nth-child(5) { background: linear-gradient(180deg, var(--brand-primary), rgba(127,176,105,0.4)); }

/* ===== User Directory: growth chart year selector ===== */
.growth-year-select {
    border: 1px solid var(--brand-surface);
    background: var(--brand-neutral);
    color: var(--brand-secondary);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 30px 6px 12px;
}

.growth-year-select:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(127, 176, 105, 0.15);
    outline: none;
}

/* ===== User Directory: stat cards (3-box stack) ===== */
.stat-mini-card {
    background: #fff;
    border: 1px solid var(--brand-surface);
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: 0 6px 18px rgba(48, 52, 63, 0.05), 0 2px 5px rgba(48, 52, 63, 0.03);
}

.stat-mini-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.stat-mini-label {
    font-size: 11px;
    color: var(--brand-tertiary);
    letter-spacing: 0.3px;
    margin-bottom: 2px;
}

.stat-mini-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--brand-secondary);
    line-height: 1.1;
}

.stat-mini-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.stat-mini-badge.up { background: #e4f2df; color: #4d8a3b; }
.stat-mini-badge.down { background: #fde2e2; color: #d64545; }
.stat-mini-badge.flat { background: var(--brand-neutral); color: var(--brand-tertiary); }

.stat-mini-sparkline {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 26px;
    margin-top: 6px;
}

.stat-mini-sparkline span {
    flex: 1;
    min-width: 4px;
    border-radius: 2px 2px 1px 1px;
    background: linear-gradient(180deg, var(--brand-primary) 0%, rgba(127,176,105,0.30) 100%);
}

.stat-mini-sparkline.spark-secondary span {
    background: linear-gradient(180deg, var(--brand-secondary) 0%, rgba(48,52,63,0.22) 100%);
}

.stat-mini-sparkline.spark-accent span {
    background: linear-gradient(180deg, #6b8cae 0%, rgba(107,140,174,0.25) 100%);
}

/* ===== User Growth: horizontal bar panel header controls ===== */
.growth-year-select {
    border: 1px solid var(--brand-surface);
    background: var(--brand-neutral);
    color: var(--brand-secondary);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 30px 6px 12px;
}

.growth-year-select:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(127, 176, 105, 0.15);
    outline: none;
}

/* ===== Categories page: summary card (total + donut) ===== */
.cat-summary-card {
    background: #fff;
    border: 1px solid var(--brand-surface);
    border-radius: 14px;
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.cat-summary-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--brand-neutral);
    color: var(--brand-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin-bottom: 12px;
}

.cat-summary-label {
    font-size: 11px;
    color: var(--brand-tertiary);
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.cat-summary-value {
    font-size: 30px;
    font-weight: 700;
    color: var(--brand-secondary);
    line-height: 1.1;
}

.cat-summary-divider {
    border-top: 1px solid var(--brand-surface);
    margin: 16px 0;
}

.cat-donut-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.cat-donut-wrap {
    position: relative;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
}

.cat-donut-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.cat-donut-center-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--brand-secondary);
    line-height: 1;
}

.cat-donut-center-label {
    font-size: 7px;
    color: var(--brand-tertiary);
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.cat-donut-legend-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--brand-secondary);
    margin-bottom: 6px;
}

.cat-donut-legend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--brand-tertiary);
    gap: 10px;
    margin-bottom: 2px;
}

.cat-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
    flex-shrink: 0;
}

.cat-dot-system { background: var(--brand-secondary); }
.cat-dot-custom { background: var(--brand-primary); }

/* ===== Categories page: System Defaults & Distribution panel ===== */
.default-cat-list { margin-top: 4px; }

.default-cat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 0;
    border-bottom: 1px solid var(--brand-surface);
}

.default-cat-row:last-child { border-bottom: none; }

.default-cat-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.default-cat-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--brand-neutral);
    color: var(--brand-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
    overflow: hidden;
}

.default-cat-icon img { width: 100%; height: 100%; object-fit: cover; }

.default-cat-count {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--brand-primary);
    flex-shrink: 0;
}

.asset-dist-header {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--brand-tertiary);
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.asset-dist-row { margin-bottom: 12px; }

.asset-dist-row:last-child { margin-bottom: 0; }

.asset-dist-top {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 4px;
}

.asset-dist-name { color: var(--brand-secondary); font-weight: 500; }
.asset-dist-count { color: var(--brand-secondary); font-weight: 700; }

.asset-dist-bar-track {
    height: 6px;
    background: var(--brand-surface);
    border-radius: 4px;
    overflow: hidden;
}

.asset-dist-bar-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--brand-primary), #5c8a4a);
}

/* ===== Categories page: custom categories table ===== */
.custom-cat-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--brand-neutral);
    color: var(--brand-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    overflow: hidden;
}

.custom-cat-icon img { width: 100%; height: 100%; object-fit: cover; }

.row-menu-btn {
    background: none;
    border: none;
    color: var(--brand-tertiary);
    font-size: 16px;
    padding: 4px 8px;
    border-radius: 6px;
}

.row-menu-btn:hover { background: var(--brand-neutral); }

/* ===== Categories page: summary card (total + donut) ===== */
.cat-summary-card {
    background: #fff;
    border: 1px solid var(--brand-surface);
    border-radius: 14px;
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.cat-summary-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 18px;
}

.cat-summary-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--brand-neutral);
    color: var(--brand-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin-bottom: 10px;
}

.cat-summary-label {
    font-size: 11px;
    color: var(--brand-tertiary);
    letter-spacing: 0.5px;
}

.cat-summary-value-elevated {
    font-size: 40px;
    font-weight: 800;
    color: var(--brand-secondary);
    line-height: 1;
    text-align: right;
    text-shadow: 0 2px 0 rgba(127, 176, 105, 0.15);
    align-self: flex-end;
    padding-right: 2px;
}

.cat-summary-divider {
    border-top: 1px solid var(--brand-surface);
    margin: 4px 0 18px;
}

.cat-donut-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

.cat-donut-wrap {
    position: relative;
    width: 96px;
    height: 96px;
    flex-shrink: 0;
}

.cat-donut-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.cat-donut-center-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--brand-secondary);
    line-height: 1;
}

.cat-donut-center-label {
    font-size: 8px;
    color: var(--brand-tertiary);
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.cat-donut-legend-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--brand-secondary);
    margin-bottom: 8px;
}

.cat-donut-legend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--brand-tertiary);
    gap: 14px;
    margin-bottom: 6px;
}

.cat-donut-legend-item .fw-semibold {
    color: var(--brand-secondary);
}

.cat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 7px;
    flex-shrink: 0;
}

.cat-dot-system { background: var(--brand-secondary); }
.cat-dot-custom { background: var(--brand-primary); }

/* ===== Categories page: System Defaults & Distribution panel ===== */
.default-dist-split {
    display: flex;
    gap: 0;
}

.default-dist-col {
    flex: 1;
    min-width: 0;
    padding: 0 18px;
}

.default-dist-col:first-child { padding-left: 0; }
.default-dist-col:last-child { padding-right: 0; }

.default-dist-divider {
    width: 1px;
    background: var(--brand-surface);
    flex-shrink: 0;
    margin: 2px 0;
}

.default-cat-list { margin-top: 4px; }

.default-cat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 0;
    border-bottom: 1px solid var(--brand-surface);
}

.default-cat-row:last-child { border-bottom: none; }

.default-cat-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.default-cat-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--brand-neutral);
    color: var(--brand-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
    overflow: hidden;
}

.default-cat-icon img { width: 100%; height: 100%; object-fit: cover; }

.default-cat-count {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--brand-primary);
    flex-shrink: 0;
}

/* ── Asset distribution: dynamic-width elevated cells ─────────────────── */
.asset-dist-title {
    font-size: 10px;
    color: var(--brand-tertiary);
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.asset-dist-cells {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.asset-dist-cell {
    background: #fff;
    border: 1px solid var(--brand-surface);
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(48, 52, 63, 0.06);
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
    /* width set inline per-cell via JS, proportional to asset share */
}

.asset-dist-cell::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--brand-primary), #5c8a4a);
}

.asset-dist-cell-name {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--brand-secondary);
    padding-left: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.asset-dist-cell-count {
    font-size: 13px;
    font-weight: 700;
    color: var(--brand-primary);
    flex-shrink: 0;
}

/* ===== Categories page: custom categories table ===== */
.custom-cat-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--brand-neutral);
    color: var(--brand-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    overflow: hidden;
}

.custom-cat-icon img { width: 100%; height: 100%; object-fit: cover; }

.cat-donut-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex: 1;
}

.cat-donut-wrap {
    position: relative;
    width: 128px;
    height: 128px;
    flex-shrink: 0;
}

.cat-donut-legend {
    text-align: right;
}

.cat-donut-legend-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--brand-secondary);
    margin-bottom: 8px;
}

.cat-donut-legend-item {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    font-size: 13px;
    color: var(--brand-tertiary);
    gap: 14px;
    margin-bottom: 6px;
}

.cat-donut-legend-item .fw-semibold {
    color: var(--brand-secondary);
    min-width: 18px;
    text-align: right;
}
