/* Admin top bar */
.admin-topbar {
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.global-search-form {
    position: relative;
    flex: 1;
    max-width: 480px;
}

.global-search-form i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.global-search-form .form-control {
    padding-left: 2.25rem;
    border-radius: 999px;
    background: #f8f9fa;
    border-color: #e9ecef;
}

.page-header-search {
    position: relative;
    max-width: 100%;
    width: min(720px, 100%);
}

.page-header-search > i.ri-search-line {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
    z-index: 1;
    font-size: 1.1rem;
}

.page-header-search .form-control {
    padding-left: 2.5rem;
    padding-right: 3.25rem;
    min-height: 44px;
    border-radius: 999px;
    background: #f8f9fa;
    border-color: #dee2e6;
    font-size: 0.95rem;
}

.page-header-search .form-control:focus {
    background: #fff;
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
}

.page-header-search-clear {
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid #ced4da;
    border-radius: 50%;
    background: #fff;
    color: #495057;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.page-header-search-clear:hover {
    background: #f1f3f5;
    color: #212529;
    border-color: #adb5bd;
}

.page-header-search-clear:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.page-header-search-clear.d-none {
    display: none !important;
}

.admin-topbar--compact {
    justify-content: flex-end;
    margin-bottom: 0.75rem;
    padding: 0.4rem 0.85rem;
}

.admin-topbar--compact .admin-topbar-actions {
    margin-left: 0;
}

/* Page Header — stack breadcrumbs and title vertically */
.page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    border-bottom: none;
    padding-bottom: 0;
}
.customers-toolbar-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
}

.customers-toolbar-title {
    flex: 0 0 auto;
    min-width: 120px;
}

.customers-toolbar-caption {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 0.15rem;
}

.customers-toolbar-search {
    flex: 1 1 320px;
    max-width: none;
    width: auto;
    min-width: min(100%, 280px);
}

.customers-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.customers-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.page-header-search-spinner {
    position: absolute;
    right: 46px;
    top: 50%;
    transform: translateY(-50%);
    color: #667eea;
    font-size: 1.1rem;
    animation: spin 0.8s linear infinite;
    z-index: 2;
}

@keyframes spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

.customers-list-meta {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.65rem;
}

.customers-table-card {
    overflow: hidden;
}

.customers-table thead th {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6c757d;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
    white-space: nowrap;
}

.customers-table tbody td {
    vertical-align: middle;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
}

.customer-list-row {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.customer-list-row:hover {
    background-color: #f8f9ff;
}

.customer-list-row:hover .customer-row-action {
    opacity: 1;
}

.customer-avatar-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    color: #fff;
    background: hsl(var(--avatar-hue, 220), 52%, 46%);
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    letter-spacing: 0.02em;
    font-size: 0.8rem;
    line-height: 1;
}

.customer-avatar-initials.customer-photo-thumb {
    width: 40px;
    height: 40px;
}

.customer-avatar-initials.customer-photo-large {
    width: 180px;
    height: 180px;
    font-size: 2.5rem;
    border-radius: 12px;
}

.customer-name-block {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
}

.customer-name-link {
    font-weight: 600;
    color: #212529;
    text-decoration: none;
}

.customer-name-link:hover {
    color: #667eea;
}

.customer-id-pill {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    color: #6c757d;
    background: #f1f3f5;
    border-radius: 999px;
    padding: 0.1rem 0.45rem;
}

.customer-subline {
    font-size: 0.78rem;
    color: #6c757d;
    margin-top: 0.15rem;
    line-height: 1.35;
}

.customer-address-line {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.customer-guarantor-name {
    font-weight: 500;
    color: #374151;
}

.customer-mobile-link {
    color: #374151;
    text-decoration: none;
    font-variant-numeric: tabular-nums;
}

.customer-mobile-link:hover {
    color: #667eea;
    text-decoration: underline;
}

.customer-status-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.3em 0.55em;
}

.customer-status-active {
    background: #e8eeff;
    color: #4c5fd7;
}

.customer-status-none {
    background: #f1f3f5;
    color: #868e96;
}

.customer-outstanding {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: #212529;
}

.customer-actions-col {
    width: 48px;
}

.customer-row-action {
    opacity: 0.65;
    border-color: #dee2e6;
}

.customer-table-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid #e9ecef;
}

@media (max-width: 991.98px) {
    .customers-toolbar-actions,
    .list-toolbar-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .customers-toolbar-search,
    .list-toolbar-search {
        flex-basis: 100%;
        order: 3;
    }
}

/* Shared list table styles */
.list-table-card,
.customers-table-card {
    overflow: hidden;
}

.list-table thead th,
.customers-table thead th {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6c757d;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
    white-space: nowrap;
}

.list-table tbody td,
.customers-table tbody td {
    vertical-align: middle;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
}

.list-row,
.customer-list-row {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.list-row:hover,
.customer-list-row:hover {
    background-color: #f8f9ff;
}

.list-row--highlight {
    background-color: #e8f4ff;
    box-shadow: inset 3px 0 0 #0d6efd;
}

.list-row--highlight:hover {
    background-color: #dbeafe;
}

.list-row:hover .list-row-action,
.customer-list-row:hover .customer-row-action {
    opacity: 1;
}

.list-name-block,
.customer-name-block {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
}

.list-name-link,
.customer-name-link {
    font-weight: 600;
    color: #212529;
    text-decoration: none;
}

.list-name-link:hover,
.customer-name-link:hover {
    color: #667eea;
}

.list-id-pill,
.customer-id-pill {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    color: #6c757d;
    background: #f1f3f5;
    border-radius: 999px;
    padding: 0.1rem 0.45rem;
}

.list-subline,
.customer-subline {
    font-size: 0.78rem;
    color: #6c757d;
    margin-top: 0.15rem;
    line-height: 1.35;
}

.list-mobile-link,
.customer-mobile-link {
    color: #374151;
    text-decoration: none;
    font-variant-numeric: tabular-nums;
}

.list-mobile-link:hover,
.customer-mobile-link:hover {
    color: #667eea;
    text-decoration: underline;
}

.list-amount-emphasis,
.customer-outstanding {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: #212529;
}

.list-actions-col,
.customer-actions-col {
    width: 48px;
}

.list-row-action,
.customer-row-action {
    opacity: 0.65;
    border-color: #dee2e6;
}

.list-table-footer,
.customers-table-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid #e9ecef;
}

.list-avatar-col {
    width: 52px;
}

.list-avatar-cell {
    width: 52px;
}

.list-status-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.3em 0.55em;
}

.list-filter-card {
    border: 1px solid #e9ecef;
}

.collect-today-grid {
    display: grid;
    gap: 1rem;
}

@media (min-width: 768px) {
    .collect-today-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .collect-today-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.collect-today-card {
    height: 100%;
    padding: 1rem;
    border: 1px solid #e9ecef;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.collect-today-card:hover {
    border-color: #c5d0ff;
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.1);
}

.collect-today-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}

.collect-today-name {
    font-weight: 600;
    color: #212529;
}

.collect-today-amount {
    font-size: 1.1rem;
    font-weight: 700;
    color: #198754;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.collect-today-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.65rem;
    font-size: 0.78rem;
    color: #6c757d;
    margin-bottom: 0.85rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid #f1f3f5;
}

.collect-today-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
}

.collect-today-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

/* Collections section */
.collections-page {
    max-width: 100%;
}

.collections-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.35rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
}

.collections-nav-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 0.9rem;
    border-radius: 8px;
    text-decoration: none;
    color: #495057;
    font-size: 0.88rem;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
}

.collections-nav-item:hover {
    background: #fff;
    color: #212529;
}

.collections-nav-item.is-active {
    background: #fff;
    color: #212529;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.collections-nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
}

.collections-nav-success .collections-nav-badge { background: #d1e7dd; color: #0f5132; }
.collections-nav-warning .collections-nav-badge { background: #fff3cd; color: #664d03; }
.collections-nav-danger .collections-nav-badge { background: #f8d7da; color: #842029; }

.collections-nav-success.is-active { border-bottom: 2px solid #198754; }
.collections-nav-warning.is-active { border-bottom: 2px solid #ffc107; }
.collections-nav-danger.is-active { border-bottom: 2px solid #dc3545; }

.collections-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .collections-stats {
        grid-template-columns: repeat(2, minmax(0, 200px));
    }
}

.collections-stat-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    background: #fff;
}

.collections-stat-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.collections-stat-primary .collections-stat-icon { background: #eef0ff; color: #667eea; }
.collections-stat-success .collections-stat-icon { background: #e8f5e9; color: #2e7d32; }
.collections-stat-warning .collections-stat-icon { background: #fff8e1; color: #f57f17; }
.collections-stat-danger .collections-stat-icon { background: #ffebee; color: #c62828; }

.collections-stat-label {
    font-size: 0.75rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 600;
}

.collections-stat-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: #212529;
    font-variant-numeric: tabular-nums;
}

.collections-filter-bar {
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
}

.collections-filter-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem 1.25rem;
}

.collections-filter-inner .form-field {
    min-width: min(100%, 220px);
}

.collections-filter-hint {
    padding-bottom: 0.35rem;
}

.collections-flash {
    border-radius: 10px;
    margin-bottom: 1rem;
}

.collections-table tbody td {
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
}

.collections-row-warning {
    background-color: #fffdf5 !important;
}

.collections-row-danger {
    background-color: #fff8f8 !important;
}

.collections-days-badge,
.collections-alert-badge,
.collections-status-badge {
    font-size: 0.7rem;
    font-weight: 600;
}

.collect-stack-customer {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.collect-stack-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.customer-photo-col {
    width: 52px;
}

.live-search-target.is-loading {
    opacity: 0.55;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.admin-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.admin-user-menu {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding-left: 0.85rem;
    margin-left: 0.15rem;
    border-left: 1px solid #e9ecef;
}

.admin-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-weight: 700;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.25);
}

.admin-user-details {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    min-width: 0;
}

.admin-user-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #212529;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

.admin-user-role {
    font-size: 0.7rem;
    color: #6c757d;
    white-space: nowrap;
}

.admin-user-logout-form {
    margin: 0;
}

.admin-user-logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.38rem 0.7rem;
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1.2;
    color: #495057;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.admin-user-logout-btn:hover {
    color: #dc3545;
    border-color: #f1aeb5;
    background: #fff5f5;
}

.admin-user-logout-btn i {
    font-size: 0.95rem;
    line-height: 1;
}

.admin-user-menu--mobile {
    border-left: none;
    padding-left: 0;
    margin-left: 0;
    gap: 0.45rem;
}

.admin-user-menu--mobile .admin-user-details {
    display: none;
}

.admin-user-menu--mobile .admin-user-avatar {
    width: 32px;
    height: 32px;
    font-size: 0.78rem;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: none;
}

.admin-user-menu--mobile .admin-user-logout-btn {
    padding: 0.35rem 0.55rem;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.28);
}

.admin-user-menu--mobile .admin-user-logout-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.4);
}

.admin-user-menu--mobile .admin-user-logout-label {
    display: none;
}

@media (min-width: 420px) {
    .admin-user-menu--mobile .admin-user-details {
        display: flex;
    }

    .admin-user-menu--mobile .admin-user-name {
        max-width: 110px;
        color: #fff;
        font-size: 0.78rem;
    }

    .admin-user-menu--mobile .admin-user-role {
        color: rgba(255, 255, 255, 0.78);
        font-size: 0.66rem;
    }
}

@media (max-width: 1199.98px) {
    .admin-user-menu--topbar .admin-user-logout-label {
        display: none;
    }

    .admin-user-menu--topbar .admin-user-logout-btn {
        padding: 0.38rem 0.5rem;
    }
}

.notification-bell {
    position: relative;
    color: #495057;
    font-size: 1.35rem;
    text-decoration: none;
    padding: 0.25rem 0.5rem;
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #dc3545;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

.notification-menu {
    min-width: 280px;
}

.app-breadcrumbs {
    margin-bottom: 0.5rem;
}

.app-breadcrumbs .breadcrumb {
    --bs-breadcrumb-divider: '›';
    font-size: 0.875rem;
}

.app-breadcrumbs .breadcrumb-item a {
    color: #667eea;
    text-decoration: none;
}

.empty-state-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto;
    border-radius: 50%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #9ca3af;
}

/* Collect payment stepper */
.collect-page {
    max-width: 100%;
}

.collect-context-bar {
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
}

.collect-context-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
}

.collect-context-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: min(100%, 240px);
}

.collect-context-text {
    min-width: 0;
}

.collect-context-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.3;
}

.collect-context-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    margin-top: 0.2rem;
    font-size: 0.82rem;
    color: #6c757d;
}

.collect-context-amount {
    text-align: right;
    margin-left: auto;
}

.collect-context-amount-label {
    display: block;
    font-size: 0.72rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 600;
}

.collect-context-amount strong {
    font-size: 1.05rem;
    font-variant-numeric: tabular-nums;
    color: #212529;
}

.collect-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    color: #667eea;
    text-decoration: none;
    flex: 0 0 100%;
}

.collect-back-link:hover {
    color: #4c5fd7;
    text-decoration: underline;
}

.collect-stats {
    margin-bottom: 1rem;
}

.collect-meta-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1.1rem;
    padding: 0.8rem 1.1rem;
    margin-bottom: 1rem;
}

.collect-meta-item {
    display: inline-flex;
    align-items: baseline;
    gap: 0.45rem;
    min-width: 0;
}

.collect-meta-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6c757d;
    flex-shrink: 0;
}

.collect-meta-value {
    font-size: 0.92rem;
    font-weight: 600;
    color: #212529;
    font-variant-numeric: tabular-nums;
    line-height: 1.35;
}

.collect-meta-item-emphasis .collect-meta-value {
    color: #198754;
}

.collect-meta-sep {
    width: 1px;
    height: 1.1rem;
    background: #dee2e6;
    flex-shrink: 0;
}

@media (max-width: 575.98px) {
    .collect-meta-line {
        gap: 0.55rem 0.85rem;
    }

    .collect-meta-sep {
        display: none;
    }
}

.collect-step-trail {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.45rem;
}

.collect-step-trail-item {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #adb5bd;
}

.collect-step-trail-item.is-active {
    color: #667eea;
}

.collect-step-trail-item.is-done {
    color: #2e7d32;
}

.collect-step-trail-sep {
    width: 14px;
    height: 2px;
    background: #dee2e6;
    border-radius: 1px;
}

.collect-step-panel {
    padding: 1rem 1.1rem;
    margin-bottom: 1rem;
}

.collect-step-panel-hint {
    margin: 0 0 0.85rem;
    font-size: 0.88rem;
    color: #6c757d;
}

.collect-loan-grid,
.collect-paytype-grid {
    display: grid;
    gap: 0.75rem;
}

.collect-loan-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.collect-paytype-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 767.98px) {
    .collect-paytype-grid {
        grid-template-columns: 1fr;
    }
}

.collect-loan-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.collect-loan-card:hover {
    border-color: #c5d0ff;
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.12);
    transform: translateY(-1px);
}

.collect-loan-card.is-selected {
    border-color: #667eea;
    background: #f8f9ff;
    box-shadow: 0 0 0 1px #667eea;
}

.collect-loan-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.collect-loan-card-name {
    font-weight: 600;
    font-size: 1rem;
}

.collect-loan-card-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    font-size: 0.82rem;
}

.collect-loan-card-label {
    display: block;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #9ca3af;
    font-weight: 600;
    margin-bottom: 0.1rem;
}

.collect-loan-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.15rem;
    padding-top: 0.65rem;
    border-top: 1px solid #f1f3f5;
}

.collect-loan-card-outstanding {
    font-size: 1rem;
    color: #212529;
    font-variant-numeric: tabular-nums;
}

.collect-loan-card-chevron {
    font-size: 1.35rem;
    color: #667eea;
}

.collect-paytype-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.15rem 0.85rem;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    background: #fff;
    text-decoration: none;
    color: inherit;
    min-height: 100%;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.collect-paytype-card:hover:not(.is-disabled) {
    border-color: #c5d0ff;
    transform: translateY(-1px);
}

.collect-paytype-card.is-selected {
    box-shadow: 0 0 0 2px currentColor;
}

.collect-paytype-card.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    background: #f8f9fa;
}

.collect-paytype-card p {
    font-size: 0.82rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

.collect-paytype-icon {
    font-size: 1.85rem;
    margin-bottom: 0.35rem;
}

.collect-paytype-chevron {
    position: absolute;
    right: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.25rem;
    opacity: 0.5;
}

.collect-paytype-danger { color: #dc3545; }
.collect-paytype-danger.is-selected { background: #fff5f5; border-color: #dc3545; }

.collect-paytype-success { color: #198754; }
.collect-paytype-success.is-selected { background: #f0fff4; border-color: #198754; }

.collect-paytype-primary { color: #667eea; }
.collect-paytype-primary.is-selected { background: #f8f9ff; border-color: #667eea; }

.collect-payment-layout {
    display: grid;
    gap: 1rem;
}

@media (min-width: 992px) {
    .collect-payment-layout {
        grid-template-columns: 1.2fr 0.8fr;
        align-items: start;
    }
}

.collect-dues-panel,
.collect-form-panel {
    min-width: 0;
}

.collect-panel-title {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.collect-payment-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.collect-payment-comments {
    grid-column: 1 / -1;
}

.collect-payment-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.collect-bulk-options {
    display: grid;
    gap: 0.75rem;
}

.collect-bulk-card {
    padding: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    background: #fafbfc;
}

.collect-bulk-title {
    margin: 0 0 0.25rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.collect-bulk-amount {
    margin: 0 0 0.75rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: #212529;
    font-variant-numeric: tabular-nums;
}

.session-timer-widget {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.session-timer-widget i {
    font-size: 1rem;
    line-height: 1;
}

.session-timer-widget--warning {
    background: #fff7ed;
    border-color: #fdba74;
    color: #c2410c;
}

.session-timer-widget--danger {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #b91c1c;
}

.mobile-session-timer {
    margin-left: auto;
    margin-right: 0.35rem;
}

.mobile-session-timer .session-timer-label {
    display: none !important;
}

.collect-allocation-preview {
    margin-top: 0.75rem;
    padding: 0.65rem 0.75rem;
    border-radius: 0.5rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    font-size: 0.85rem;
    line-height: 1.45;
}

.collect-allocation-preview ul {
    margin-top: 0.35rem;
}

.collect-advance-filter {
    max-width: 100%;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f3f5;
}

@media (max-width: 575.98px) {
    .collect-payment-fields {
        grid-template-columns: 1fr;
    }
}

.collect-section {
    margin-bottom: 1rem;
    padding: 1rem 1.1rem;
}

.collect-breadcrumbs {
    margin-bottom: 0.35rem;
}

.collect-page-head {
    margin-bottom: 1rem;
}

.collect-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    color: #667eea;
    text-decoration: none;
    margin-bottom: 0.35rem;
}

.collect-back-link:hover {
    color: #4c5fd7;
    text-decoration: underline;
}

.collect-flash-success {
    border-radius: 10px;
    margin-bottom: 1rem;
}

.collect-due-quick-pay {
    display: inline;
}

.collect-page-caption {
    margin: 0.25rem 0 0;
    font-size: 0.9rem;
    color: #6c757d;
}

.collect-stepper {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 1.25rem;
    padding: 0.85rem 1rem;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow-x: auto;
}

.collect-stepper-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 0 0 auto;
    color: #adb5bd;
    font-size: 0.82rem;
    font-weight: 500;
    white-space: nowrap;
}

.collect-stepper-marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 50%;
    border: 2px solid #dee2e6;
    background: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
}

.collect-stepper-item.active {
    color: #667eea;
}

.collect-stepper-item.active .collect-stepper-marker {
    background: #667eea;
    border-color: #667eea;
    color: #fff;
}

.collect-stepper-item.done {
    color: #2e7d32;
}

.collect-stepper-item.done .collect-stepper-marker {
    background: #e8f5e9;
    border-color: #a5d6a7;
    color: #2e7d32;
}

.collect-stepper-line {
    flex: 1 1 24px;
    min-width: 16px;
    height: 2px;
    margin: 0 0.5rem;
    background: #e9ecef;
}

.collect-stepper-line.done {
    background: #a5d6a7;
}

.collect-sticky-summary {
    position: sticky;
    top: 0.75rem;
    z-index: 10;
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
}

.collect-sticky-summary-inner,
.collect-selected-customer-inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.collect-sticky-summary-text,
.collect-selected-customer-info {
    flex: 1;
    min-width: 0;
}

.collect-sticky-summary-meta,
.collect-selected-customer-meta {
    display: block;
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.1rem;
}

.collect-sticky-summary-amount {
    text-align: right;
}

.collect-sticky-summary-label {
    display: block;
    font-size: 0.75rem;
    color: #6c757d;
}

.collect-customer-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}

.collect-customer-search {
    flex: 1;
    max-width: 420px;
}

.collect-customer-meta {
    margin-bottom: 0.65rem;
}

.collect-customer-table tbody td {
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
}

.collect-row-selected {
    background: #f0f3ff !important;
}

.collect-selected-customer {
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
}

.collect-section {
    margin-bottom: 1rem;
    padding: 1rem 1.1rem;
}

.collect-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.35rem 0.75rem;
    margin-bottom: 0.85rem;
}

.collect-section-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

/* Legacy collect-step (kept for compatibility) */
.collect-step {
    flex: 1;
    min-width: 120px;
    text-align: center;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    font-size: 0.8rem;
    color: #6c757d;
}

.collect-step.active {
    background: #667eea;
    border-color: #667eea;
    color: #fff;
    font-weight: 600;
}

.collect-step.done {
    background: #e8f5e9;
    border-color: #a5d6a7;
    color: #2e7d32;
}

.collect-sticky-summary {
    position: sticky;
    top: 0.75rem;
    z-index: 10;
    margin-bottom: 1rem;
}

.customer-photo-cell {
    width: 52px;
    min-width: 52px;
    vertical-align: middle;
}

.customer-photo-thumb {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    display: block;
    background: #e9ecef;
    border: 1px solid #dee2e6;
}

.customer-photo-large {
    width: 180px;
    height: 180px;
    border-radius: 12px;
    object-fit: cover;
    object-position: center;
    display: block;
    background: #e9ecef;
    border: 1px solid #dee2e6;
}

.customer-photo-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    font-size: 1.1rem;
    border: 1px solid #dee2e6;
}

.customer-photo-placeholder.customer-photo-large {
    width: 180px;
    height: 180px;
    border-radius: 12px;
    font-size: 2.5rem;
}

/* Shared vertical form system (Phase 1) */
.form-stack,
.customer-form-stack {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-field,
.customer-form-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.form-field .form-label,
.customer-form-field .form-label {
    font-weight: 600;
    margin-bottom: 0;
}

.form-section,
.customer-form-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.25rem;
}

.form-section-title,
.customer-form-section-title {
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #374151;
}

.form-requirements,
.customer-form-requirements {
    font-size: 0.9rem;
}

.form-stack-card,
.customer-form-card {
    max-width: 640px;
}

/* Loan type form — fintech layout */
.loan-form-page {
    max-width: 920px;
    margin: 0 auto;
}

.loan-form-shell {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.loan-fintech-card {
    background: #fff;
    border: 1px solid #e8ecf4;
    border-radius: 16px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
    padding: 1.5rem;
}

.loan-fintech-card-header {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    margin-bottom: 1.25rem;
}

.loan-fintech-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.25rem;
}

.loan-fintech-card-icon-primary {
    background: #eef2ff;
    color: #4f46e5;
}

.loan-fintech-card-icon-info {
    background: #e0f2fe;
    color: #0284c7;
}

.loan-fintech-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.25rem;
}

.loan-fintech-card-subtitle {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
    line-height: 1.45;
}

.loan-product-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #eef2f7;
}

.loan-details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.25rem;
}

.loan-form-field {
    min-width: 0;
}

.loan-form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.45rem;
}

.loan-fintech-input .input-group-text {
    background: #f8fafc;
    border-color: #dbe3ef;
    color: #64748b;
    font-size: 0.875rem;
    min-width: 2.75rem;
    justify-content: center;
}

.loan-fintech-control {
    border-color: #dbe3ef;
    border-radius: 10px;
    min-height: 44px;
    font-size: 0.9375rem;
    color: #0f172a;
}

.loan-fintech-input .loan-fintech-control {
    border-radius: 0;
}

.loan-fintech-input .input-group-text:first-child {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}

.loan-fintech-input .input-group-text:last-child {
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}

.loan-fintech-input .loan-fintech-control:first-child {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}

.loan-fintech-input .loan-fintech-control:last-child {
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}

.loan-fintech-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
}

.loan-fintech-input.is-invalid-group .input-group-text,
.loan-fintech-input.is-invalid-group .loan-fintech-control {
    border-color: #dc3545;
}

.loan-field-error {
    color: #dc3545;
    font-size: 0.8125rem;
    margin-top: 0.35rem;
}

.loan-fintech-input input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.loan-fintech-input input[type="number"]::-webkit-outer-spin-button,
.loan-fintech-input input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.loan-reset-block {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #eef2f7;
    text-align: center;
}

.loan-reset-btn {
    min-width: 240px;
    border-radius: 10px;
    font-weight: 600;
}

.loan-reset-help {
    margin: 0.75rem 0 0;
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.45;
}

.loan-summary-list {
    display: flex;
    flex-direction: column;
}

.loan-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid #eef2f7;
}

.loan-summary-row:last-child {
    border-bottom: 0;
}

.loan-summary-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    font-size: 0.875rem;
    color: #475569;
}

.loan-summary-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.loan-summary-icon-primary { background: #eef2ff; color: #4f46e5; }
.loan-summary-icon-success { background: #ecfdf5; color: #059669; }
.loan-summary-icon-purple { background: #f5f3ff; color: #7c3aed; }
.loan-summary-icon-warning { background: #fffbeb; color: #d97706; }
.loan-summary-icon-danger { background: #fef2f2; color: #dc2626; }
.loan-summary-icon-info { background: #e0f2fe; color: #0284c7; }

.loan-summary-value {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #0f172a;
    text-align: right;
    word-break: break-word;
    flex-shrink: 0;
}

.loan-summary-info {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin-top: 1.25rem;
    padding: 0.875rem 1rem;
    border-radius: 12px;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    color: #1e40af;
    font-size: 0.8125rem;
    line-height: 1.5;
}

.loan-summary-info i {
    font-size: 1.1rem;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.loan-form-actions {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.loan-delete-form {
    margin-top: -0.5rem;
}

@media (max-width: 767.98px) {
    .loan-fintech-card {
        padding: 1.125rem;
    }

    .loan-product-row,
    .loan-details-grid {
        grid-template-columns: 1fr;
    }

    .loan-summary-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.35rem;
    }

    .loan-summary-value {
        text-align: left;
        padding-left: 2.85rem;
    }

    .loan-reset-btn {
        width: 100%;
        min-width: 0;
    }
}

.loan-form-section .form-field + .form-field {
    margin-top: 0;
}

.loan-breakdown-section {
    background: #fff;
    border-color: #dfe4f3;
    box-shadow: inset 0 0 0 1px rgba(102, 126, 234, 0.06);
}

.loan-breakdown-section .form-section-title {
    margin-bottom: 0.5rem;
    border-bottom: none;
    padding-bottom: 0;
}

.loan-form-rules {
    max-width: 920px;
    line-height: 1.5;
}

.form-stack-card .form-actions .btn-lg {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    font-weight: 600;
}

.form-stepper {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.form-step {
    flex: 1;
    min-width: 140px;
    text-align: center;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    font-size: 0.8rem;
    color: #6c757d;
}

.form-step.active {
    background: #667eea;
    border-color: #667eea;
    color: #fff;
    font-weight: 600;
}

.filter-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 480px;
}

.report-filter-card .filter-stack {
    max-width: 100%;
}

/* Login (Phase 2) */
.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 2rem 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf4 100%);
}

.login-card {
    max-width: 420px;
}

.login-brand-icon {
    font-size: 2.5rem;
    color: #667eea;
    line-height: 1;
}

.login-form-stack {
    gap: 1rem;
}

/* List search filters (Phase 2) */
.list-search-card {
    padding: 1.25rem;
    max-width: 480px;
}

/* Today's collection — vertical collect (Phase 2) */
.collect-stack {
    gap: 1rem;
}

.collect-stack-header {
    padding: 1rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
}

.preview-confirm-card {
    max-width: 640px;
}

.customer-loan-status-card .stat-card {
    border: 1px solid #e9ecef;
}

.customer-loan-status-card .table th {
    white-space: nowrap;
}

.loan-create-confirm-summary {
    display: grid;
    gap: 0.65rem;
}

.loan-create-confirm-row {
    display: grid;
    grid-template-columns: minmax(8rem, 42%) 1fr;
    gap: 0.75rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid #eef1f4;
}

.loan-create-confirm-row:last-child {
    border-bottom: 0;
}

.loan-create-confirm-row dt {
    margin: 0;
    color: #6c757d;
    font-weight: 500;
}

.loan-create-confirm-row dd {
    margin: 0;
    font-weight: 600;
    text-align: right;
    word-break: break-word;
}

/* Searchable select / combobox */
.searchable-select {
    position: relative;
}

.searchable-select-control {
    position: relative;
}

.searchable-select-control .form-control {
    padding-right: 2.25rem;
}

.searchable-select-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
}

.searchable-select-menu {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 30;
    max-height: 260px;
    overflow-y: auto;
    margin: 0.35rem 0 0;
    padding: 0.35rem;
    list-style: none;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.searchable-select-item {
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.35;
}

.searchable-select-item:hover,
.searchable-select-item.is-active {
    background: #eef1ff;
}

.searchable-select-item.is-selected {
    background: #f8f9fa;
    font-weight: 600;
}

.searchable-select-empty {
    margin-top: 0.35rem;
    padding: 0.65rem 0.75rem;
    font-size: 0.875rem;
    color: #6c757d;
    background: #f8f9fa;
    border-radius: 8px;
}

@media (min-width: 768px) {
    .report-filter-card .filter-stack {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
        max-width: 100%;
    }

    .report-filter-card .filter-stack .form-field:last-child {
        grid-column: 1 / -1;
    }
}

.loan-calc-summary {
    box-shadow: inset 0 0 0 1px #e9ecef;
}

/* Customer form — one field per row */
.customer-form-card {
    max-width: 640px;
}

.customer-form-stack {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.customer-form-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.customer-form-field .form-label {
    font-weight: 600;
    margin-bottom: 0;
}

.customer-form-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.25rem;
}

.customer-form-section-title {
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #374151;
}

.customer-form-requirements {
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .customer-form-card .form-actions,
    .form-stack-card .form-actions {
        position: sticky;
        bottom: 0;
        background: #fff;
        padding: 1rem 0;
        margin: 0 -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
        border-top: 1px solid #e9ecef;
        z-index: 5;
    }
}

@media (min-width: 768px) {
    .customer-form-card,
    .form-stack-card {
        max-width: 720px;
    }
}

/* Loan schedule preview */
.schedule-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.schedule-preview-cell {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.5rem;
    text-align: center;
    background: #f8f9fa;
    font-size: 0.8rem;
}

.schedule-preview-cell .due-no {
    font-weight: 700;
    color: #667eea;
}

.overdue-row-warning {
    background-color: #fff8e1 !important;
}

.overdue-row-danger {
    background-color: #ffebee !important;
}

.permission-group-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #495057;
    margin: 1rem 0 0.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #e9ecef;
}

.todays-tasks-strip {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.task-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e9ecef;
    text-decoration: none;
    color: #212529;
    font-size: 0.875rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    transition: transform 0.15s, box-shadow 0.15s;
}

.task-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    color: #212529;
}

.task-chip .badge {
    font-size: 0.75rem;
}

.stat-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.15s, box-shadow 0.15s;
}

.stat-card-link:hover {
    transform: translateY(-2px);
    color: inherit;
}

.stat-card-link .stat-card-v2 {
    cursor: pointer;
}

.chart-bar-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
}

.chart-bar-wrap .bar {
    width: 100%;
    max-width: 36px;
    border-radius: 6px 6px 0 0;
    background: linear-gradient(180deg, #667eea, #764ba2);
    min-height: 8px;
}

.chart-bar-amount {
    font-size: 0.65rem;
    color: #6c757d;
    white-space: nowrap;
}

.chart-bar-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #495057;
}

@media (max-width: 768px) {
    .dashboard-hero-v2 {
        padding: 20px !important;
        margin-bottom: 1rem !important;
    }

    .dashboard-hero-v2 .user-name {
        font-size: 1.35rem !important;
    }

    .dashboard-hero-v2 .date-time {
        font-size: 0.85rem;
    }

    .collect-sticky-summary {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        margin: 0;
        border-radius: 0;
        z-index: 1040;
    }

    .admin-content {
        padding-bottom: 5rem;
    }
}

.payment-confirm-message {
    font-size: 1.05rem;
    line-height: 1.5;
}

.payment-success-modal .modal-body {
    padding-top: 2rem;
}

.payment-success-icon {
    color: #198754;
    font-size: 3.5rem;
    line-height: 1;
    margin-bottom: 0.75rem;
}

/* Reports */
.reports-page {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.reports-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: #fff;
}

.reports-hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.reports-hero-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.reports-hero-caption {
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    max-width: 42rem;
}

.reports-hero-badge {
    text-align: center;
    padding: 0.75rem 1.1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.reports-hero-badge-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
}

.reports-hero-badge-label {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    opacity: 0.85;
}

.reports-hero-kpis {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: stretch;
}

.reports-hero-kpi {
    text-align: center;
    padding: 0.7rem 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    min-width: 108px;
}

.reports-hero-kpi-muted {
    opacity: 0.92;
}

.reports-hero-kpi-value {
    display: block;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.2;
}

.reports-hero-kpi-label {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.68rem;
    opacity: 0.88;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.reports-alert-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.reports-alert-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.reports-alert-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.reports-alert-chip-danger {
    background: #fff5f5;
    color: #b02a37;
    border-color: #f1aeb5;
}

.reports-alert-chip-warning {
    background: #fff9e6;
    color: #946200;
    border-color: #ffe08a;
}

.reports-alert-chip-info {
    background: #eef2ff;
    color: #4c5fd7;
    border-color: #c7d2fe;
}

.reports-hub-toolbar {
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.reports-hub-search-wrap {
    position: relative;
}

.reports-hub-search-wrap > i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
}

.reports-hub-search {
    padding-left: 2.25rem;
    border-radius: 999px;
    background: #f8f9fa;
    border-color: #e9ecef;
    min-height: 42px;
}

.reports-hub-search:focus {
    background: #fff;
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
}

.reports-hub-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.reports-hub-chip {
    border: 1px solid #dee2e6;
    background: #fff;
    color: #495057;
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.reports-hub-chip:hover {
    border-color: #667eea;
    color: #4c5fd7;
}

.reports-hub-chip.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: #fff;
}

.reports-hub-empty {
    font-size: 0.85rem;
}

.reports-card-stat {
    margin: 0 0 0.35rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: #4c5fd7;
}

.reports-filter-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    margin-bottom: 0.85rem;
}

.reports-active-range {
    font-size: 0.75rem;
    font-weight: 500;
}

.reports-date-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.85rem;
}

.reports-date-preset {
    border: 1px solid #dee2e6;
    background: #f8f9fa;
    color: #495057;
    border-radius: 999px;
    padding: 0.32rem 0.8rem;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.reports-date-preset:hover {
    border-color: #667eea;
    color: #4c5fd7;
    background: #fff;
}

.reports-empty-state {
    text-align: center;
    padding: 2rem 1rem;
}

.reports-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #f1f3f5;
    color: #6c757d;
    font-size: 1.35rem;
    margin-bottom: 0.65rem;
}

.reports-empty-title {
    font-weight: 600;
    color: #343a40;
}

.reports-empty-message {
    font-size: 0.88rem;
    color: #6c757d;
}

.page-header-caption {
    max-width: 42rem;
}

.reports-section-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.reports-section-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
}

.reports-section-icon-primary { background: linear-gradient(135deg, #667eea, #4c5fd7); }
.reports-section-icon-success { background: linear-gradient(135deg, #198754, #157347); }
.reports-section-icon-warning { background: linear-gradient(135deg, #f39c12, #e67e22); }
.reports-section-icon-danger { background: linear-gradient(135deg, #dc3545, #b02a37); }
.reports-section-icon-dark { background: linear-gradient(135deg, #495057, #343a40); }

.reports-section-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #212529;
}

.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.85rem;
}

.reports-card {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 1rem 1.05rem;
    border-radius: 14px;
    border: 1px solid #e9ecef;
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    min-height: 100%;
}

.reports-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(102, 126, 234, 0.12);
    border-color: #cfd4ff;
    color: inherit;
}

.reports-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.reports-card-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef0ff;
    color: #667eea;
    font-size: 1.1rem;
}

.reports-card-badge {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    background: #eef0ff;
    color: #667eea;
}

.reports-card-badge-danger {
    background: #fde8ea;
    color: #b02a37;
}

.reports-card-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #212529;
}

.reports-card-desc {
    margin: 0;
    font-size: 0.84rem;
    color: #6c757d;
    line-height: 1.45;
    flex: 1;
}

.reports-card-link {
    margin-top: 0.35rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #667eea;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.reports-filter-card .filter-stack {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    align-items: end;
}

.reports-table-card {
    overflow: hidden;
}

.reports-table-head {
    padding: 0.9rem 1rem 0.35rem;
    border-bottom: 1px solid #f1f3f5;
}

.reports-table-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #374151;
}

.reports-table-caption {
    margin: 0.2rem 0 0;
    font-size: 0.8rem;
    color: #6c757d;
}

.reports-notice {
    border-radius: 12px;
}

.reports-header-actions,
.page-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
}

.reports-export-dropdown .dropdown-item {
    font-size: 0.88rem;
}

@media (max-width: 767.98px) {
    .reports-hero-title {
        font-size: 1.25rem;
    }

    .reports-hero-kpis {
        width: 100%;
    }

    .reports-hero-kpi {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: 0;
    }

    .reports-grid {
        grid-template-columns: 1fr;
    }

    .reports-hub-chips {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.15rem;
        -webkit-overflow-scrolling: touch;
    }

    .reports-hub-chip {
        flex-shrink: 0;
    }

    .reports-date-presets {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .reports-date-preset {
        flex-shrink: 0;
    }
}

.role-picker-grid,
.role-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.85rem;
}

.role-picker-card {
    display: block;
    margin: 0;
    cursor: pointer;
}

.role-picker-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.role-picker-body {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    height: 100%;
    padding: 0.95rem 1rem;
    border: 1px solid #dfe4f3;
    border-radius: 12px;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.role-picker-card.is-selected .role-picker-body,
.role-picker-input:focus-visible + .role-picker-body {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.14);
}

.role-picker-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.role-picker-desc,
.role-picker-meta {
    font-size: 0.84rem;
    color: #6b7280;
}

.permission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem 1rem;
}

.permission-group-title {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6b7280;
    margin-bottom: 0.45rem;
}

#screen-permissions.is-readonly {
    opacity: 0.92;
}

#screen-permissions.is-readonly .permission-checkbox:disabled + label {
    color: #4b5563;
}

.form-stack-card {
    max-width: 760px;
}

/* Audit logs page */
.audit-logs-page .audit-stat-card .card-body {
    min-height: 108px;
}

.audit-logs-page .audit-stat-label {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.audit-logs-page .audit-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    color: #1f2937;
    margin-top: 0.15rem;
}

.audit-logs-page .audit-stat-caption {
    margin-top: 0.15rem;
}

.audit-logs-page .audit-stat-badge {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    color: #495057;
    font-weight: 500;
    font-size: 0.72rem;
    padding: 0.35rem 0.55rem;
}

.audit-logs-page .audit-action-hub {
    border: 1px solid #e2e8f0;
    background: linear-gradient(165deg, #ffffff 0%, #f8fafc 55%, #f1f5f9 100%);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.audit-logs-page .audit-action-hub.is-collapsed {
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.audit-logs-page .audit-action-hub__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem 0.85rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    transition: padding 0.22s ease, border-color 0.22s ease;
}

.audit-logs-page .audit-action-hub.is-collapsed .audit-action-hub__header {
    padding-bottom: 0.65rem;
    border-bottom-color: transparent;
}

.audit-logs-page .audit-action-hub__intro {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-width: 0;
}

.audit-logs-page .audit-action-hub__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.85rem;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #fff;
    font-size: 1.15rem;
    box-shadow: 0 8px 18px rgba(79, 70, 229, 0.28);
    flex-shrink: 0;
}

.audit-logs-page .audit-action-hub__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.audit-logs-page .audit-action-hub__subtitle {
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.45;
    max-width: 36rem;
    transition: opacity 0.2s ease, max-height 0.25s ease;
}

.audit-logs-page .audit-action-hub__mini-summary {
    display: none;
    font-size: 0.74rem;
    color: #64748b;
    margin-top: 0.2rem;
}

.audit-logs-page .audit-action-hub__mini-summary strong {
    color: #4338ca;
    font-weight: 700;
}

.audit-logs-page .audit-action-hub__mini-dot {
    margin: 0 0.2rem;
}

.audit-logs-page .audit-action-hub.is-collapsed .audit-action-hub__subtitle {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    margin: 0;
}

.audit-logs-page .audit-action-hub.is-collapsed .audit-action-hub__mini-summary {
    display: block;
}

.audit-logs-page .audit-action-hub__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.45rem;
    flex-shrink: 0;
}

.audit-logs-page .audit-action-hub__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.42rem 0.8rem;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
    color: #334155;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
    transition: border-color 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.audit-logs-page .audit-action-hub__toggle:hover {
    border-color: #94a3b8;
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}

.audit-logs-page .audit-action-hub__toggle-glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #fff;
    font-size: 0.95rem;
}

.audit-logs-page .audit-action-hub__toggle-icon {
    display: none;
    line-height: 1;
}

.audit-logs-page .audit-action-hub__toggle-icon--min {
    display: inline;
}

.audit-logs-page .audit-action-hub.is-collapsed .audit-action-hub__toggle-icon--min {
    display: none;
}

.audit-logs-page .audit-action-hub.is-collapsed .audit-action-hub__toggle-icon--max {
    display: inline;
}

.audit-logs-page .audit-action-hub__toggle-label--max {
    display: none;
}

.audit-logs-page .audit-action-hub.is-collapsed .audit-action-hub__toggle-label--min {
    display: none;
}

.audit-logs-page .audit-action-hub.is-collapsed .audit-action-hub__toggle-label--max {
    display: inline;
}

.audit-logs-page .audit-action-hub__peek {
    display: none;
    align-items: center;
    gap: 0.55rem;
    padding: 0 1rem 0.85rem;
}

.audit-logs-page .audit-action-hub.is-collapsed .audit-action-hub__peek {
    display: flex;
}

.audit-logs-page .audit-action-hub__peek-track {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: thin;
    padding-bottom: 0.1rem;
}

.audit-logs-page .audit-action-peek-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    font-size: 0.68rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: border-color 0.15s ease, transform 0.12s ease;
}

.audit-logs-page .audit-action-peek-chip:hover {
    border-color: #94a3b8;
    transform: translateY(-1px);
    color: #0f172a;
}

.audit-logs-page .audit-action-peek-chip.is-active {
    border-color: #6366f1;
    background: #eef2ff;
    color: #4338ca;
}

.audit-logs-page .audit-action-peek-chip__count {
    font-variant-numeric: tabular-nums;
    font-weight: 800;
}

.audit-logs-page .audit-action-peek-chip__label {
    max-width: 7rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.audit-logs-page .audit-action-peek-chip--authentication { color: #4f46e5; }
.audit-logs-page .audit-action-peek-chip--crud { color: #0284c7; }
.audit-logs-page .audit-action-peek-chip--users { color: #7c3aed; }
.audit-logs-page .audit-action-peek-chip--customers { color: #0d9488; }
.audit-logs-page .audit-action-peek-chip--loans { color: #d97706; }
.audit-logs-page .audit-action-peek-chip--payments { color: #16a34a; }
.audit-logs-page .audit-action-peek-chip--reports { color: #db2777; }
.audit-logs-page .audit-action-peek-chip--system { color: #475569; }

.audit-logs-page .audit-action-peek-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.85rem;
    height: 1.85rem;
    border-radius: 999px;
    background: #e2e8f0;
    color: #475569;
    font-size: 0.68rem;
    font-weight: 800;
    flex-shrink: 0;
}

.audit-logs-page .audit-action-hub__peek-expand {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.6rem;
    border: 0;
    border-radius: 999px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 0.68rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    flex-shrink: 0;
}

.audit-logs-page .audit-action-peek-chip.is-hidden-peek {
    display: none;
}

.audit-logs-page .audit-action-hub__peek-expand:hover {
    background: #e0e7ff;
}

.audit-logs-page .audit-action-hub__body {
    display: grid;
    grid-template-rows: 1fr;
    transition: grid-template-rows 0.28s ease, opacity 0.22s ease;
}

.audit-logs-page .audit-action-hub__body > .audit-action-hub__lanes {
    overflow: hidden;
}

.audit-logs-page .audit-action-hub.is-collapsed .audit-action-hub__body {
    grid-template-rows: 0fr;
    opacity: 0;
    pointer-events: none;
}

.audit-logs-page .audit-action-hub__clear {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    border: 1px solid #c7d2fe;
    background: #eef2ff;
    color: #4338ca;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.audit-logs-page .audit-action-hub__clear:hover {
    background: #e0e7ff;
    border-color: #a5b4fc;
    color: #3730a3;
    transform: translateY(-1px);
}

.audit-logs-page .audit-action-hub__lanes {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0.85rem 1rem 1rem;
}

.audit-logs-page .audit-action-lane {
    --lane-accent: #64748b;
    --lane-soft: #f8fafc;
    --lane-border: #e2e8f0;
    border-radius: 0.75rem;
    border: 1px solid var(--lane-border);
    background: var(--lane-soft);
    padding: 0.55rem 0.65rem 0.65rem;
}

.audit-logs-page .audit-action-lane--authentication { --lane-accent: #6366f1; --lane-soft: #f5f3ff; --lane-border: #ddd6fe; }
.audit-logs-page .audit-action-lane--crud { --lane-accent: #0ea5e9; --lane-soft: #f0f9ff; --lane-border: #bae6fd; }
.audit-logs-page .audit-action-lane--users { --lane-accent: #8b5cf6; --lane-soft: #faf5ff; --lane-border: #e9d5ff; }
.audit-logs-page .audit-action-lane--customers { --lane-accent: #14b8a6; --lane-soft: #f0fdfa; --lane-border: #99f6e4; }
.audit-logs-page .audit-action-lane--loans { --lane-accent: #f59e0b; --lane-soft: #fffbeb; --lane-border: #fde68a; }
.audit-logs-page .audit-action-lane--payments { --lane-accent: #22c55e; --lane-soft: #f0fdf4; --lane-border: #bbf7d0; }
.audit-logs-page .audit-action-lane--reports { --lane-accent: #ec4899; --lane-soft: #fdf2f8; --lane-border: #fbcfe8; }
.audit-logs-page .audit-action-lane--system { --lane-accent: #64748b; --lane-soft: #f8fafc; --lane-border: #e2e8f0; }

.audit-logs-page .audit-action-lane__head {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.5rem;
    padding: 0 0.15rem;
}

.audit-logs-page .audit-action-lane__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 0.45rem;
    background: color-mix(in srgb, var(--lane-accent) 14%, white);
    color: var(--lane-accent);
    font-size: 0.9rem;
}

.audit-logs-page .audit-action-lane__name {
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #334155;
}

.audit-logs-page .audit-action-lane__total {
    margin-left: auto;
    font-size: 0.68rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--lane-accent);
    background: #fff;
    border: 1px solid color-mix(in srgb, var(--lane-accent) 25%, white);
    border-radius: 999px;
    padding: 0.1rem 0.45rem;
}

.audit-logs-page .audit-action-lane__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(7.25rem, 1fr));
    gap: 0.45rem;
}

.audit-logs-page .audit-action-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    min-height: 5.1rem;
    padding: 0.55rem 0.55rem 0.65rem;
    border-radius: 0.65rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: #fff;
    color: #1e293b;
    text-decoration: none;
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.audit-logs-page .audit-action-card::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--lane-accent, #64748b);
    opacity: 0.85;
}

.audit-logs-page .audit-action-card:hover {
    border-color: color-mix(in srgb, var(--lane-accent, #64748b) 45%, white);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
    color: #0f172a;
}

.audit-logs-page .audit-action-card.is-active {
    border-color: var(--lane-accent, #2563eb);
    background: linear-gradient(145deg, #fff 0%, color-mix(in srgb, var(--lane-accent, #2563eb) 8%, white) 100%);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--lane-accent, #2563eb) 28%, white);
}

.audit-logs-page .audit-action-card.is-empty:not(.is-active) {
    opacity: 0.78;
    background: #f8fafc;
}

.audit-logs-page .audit-action-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.5rem;
    background: color-mix(in srgb, var(--lane-accent, #64748b) 12%, white);
    color: var(--lane-accent, #64748b);
    font-size: 1rem;
}

.audit-logs-page .audit-action-card__content {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    width: 100%;
    min-width: 0;
}

.audit-logs-page .audit-action-card__count {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    color: #0f172a;
}

.audit-logs-page .audit-action-card__label {
    font-size: 0.64rem;
    font-weight: 600;
    line-height: 1.2;
    color: #475569;
    max-width: 100%;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
}

.audit-logs-page .audit-action-card__meter {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: #e2e8f0;
}

.audit-logs-page .audit-action-card__meter::after {
    content: '';
    display: block;
    height: 100%;
    width: var(--action-pct, 0%);
    background: linear-gradient(90deg, var(--lane-accent, #64748b), color-mix(in srgb, var(--lane-accent, #64748b) 65%, white));
    border-radius: 0 2px 2px 0;
    transition: width 0.25s ease;
}

.audit-logs-page .audit-action-card__check {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 999px;
    background: var(--lane-accent, #2563eb);
    color: #fff;
    font-size: 0.72rem;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
}

.audit-logs-page .audit-action-card--authentication { --lane-accent: #6366f1; }
.audit-logs-page .audit-action-card--crud { --lane-accent: #0ea5e9; }
.audit-logs-page .audit-action-card--users { --lane-accent: #8b5cf6; }
.audit-logs-page .audit-action-card--customers { --lane-accent: #14b8a6; }
.audit-logs-page .audit-action-card--loans { --lane-accent: #f59e0b; }
.audit-logs-page .audit-action-card--payments { --lane-accent: #22c55e; }
.audit-logs-page .audit-action-card--reports { --lane-accent: #ec4899; }
.audit-logs-page .audit-action-card--system { --lane-accent: #64748b; }

@media (max-width: 767.98px) {
    .audit-logs-page .audit-action-hub__header {
        flex-direction: column;
        align-items: stretch;
    }

    .audit-logs-page .audit-action-hub__actions {
        justify-content: space-between;
        width: 100%;
    }

    .audit-logs-page .audit-action-hub__clear {
        align-self: flex-start;
    }

    .audit-logs-page .audit-action-hub.is-collapsed .audit-action-hub__peek {
        flex-direction: column;
        align-items: stretch;
    }

    .audit-logs-page .audit-action-hub__peek-expand {
        align-self: flex-end;
    }

    .audit-logs-page .audit-action-lane__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .audit-logs-page .audit-action-card {
        min-height: 4.75rem;
    }
}

@media (max-width: 399.98px) {
    .audit-logs-page .audit-action-lane__grid {
        grid-template-columns: 1fr;
    }
}

.audit-logs-page .audit-filters-card .form-label {
    color: #6c757d;
    font-weight: 600;
}

.audit-logs-page .audit-filters-row-secondary {
    margin-top: 0.75rem;
}

.audit-logs-page .audit-filters-actions {
    padding-top: 1.45rem;
}

@media (max-width: 767.98px) {
    .audit-logs-page .audit-filters-actions {
        padding-top: 0;
    }
}

/* Sidebar navigation tweaks */
.aquiry-sidebar .aquiry-nav-link:hover {
    transform: none;
}
