/**
 * Wiko ERP - Compact Professional Green Theme
 * A-Z Zero Inline Custom Framework
 */

:root {
    --erp-green-50: #ecfdf5;
    --erp-green-100: #d1fae5;
    --erp-green-400: #34d399;
    --erp-green-500: #10b981;
    --erp-green-600: #059669;
    --erp-green-700: #047857;
    --erp-gray-50: #f8fafc;
    --erp-gray-100: #f1f5f9;
    --erp-gray-200: #e2e8f0;
    --erp-gray-300: #cbd5e1;
    --erp-gray-600: #475569;
    --erp-gray-800: #1e293b;
    --erp-gray-900: #0f172a;

    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 10px;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);

    --sidebar-w: 240px;
    --header-h: 56px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Plus Jakarta Sans', sans-serif;
    background: var(--erp-gray-50);
    color: var(--erp-gray-800);
    font-size: 14px;
    /* Professional Compact */
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Global Premium Green Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #04865f;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #036d4d;
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #04865f transparent;
}

a {
    text-decoration: none;
    color: var(--erp-green-600);
    transition: 0.15s;
    font-weight: 500;
}

a:hover {
    color: var(--erp-green-700);
}

/* Typography */
h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--erp-gray-900);
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--erp-gray-900);
    margin-bottom: 0.5rem;
}

h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--erp-gray-900);
}

p {
    color: var(--erp-gray-600);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: 0.15s;
    font-family: inherit;
}

.btn-primary {
    background: var(--erp-green-600);
    color: #fff !important;
}

.btn-primary:hover {
    background: var(--erp-green-700);
    color: #fff !important;
    box-shadow: var(--shadow-sm);
}

.btn-outline {
    border-color: var(--erp-green-600);
    color: var(--erp-green-600);
    background: transparent;
}

.btn-outline:hover {
    background: var(--erp-green-50);
    color: var(--erp-green-700);
}

.btn-full {
    width: 100%;
}

.btn-icon-only {
    background: none;
    border: none;
    color: var(--erp-gray-600);
    cursor: pointer;
    padding: 2px 4px;
    border-radius: var(--radius-sm);
    transition: 0.1s;
}

.btn-icon-only:hover {
    background: var(--erp-green-50);
    color: var(--erp-green-700);
}

/* Inputs */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--erp-gray-800);
    margin-bottom: 0.35rem;
}

.form-control {
    width: 100%;
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--erp-gray-300);
    border-radius: var(--radius-sm);
    font-size: 13px;
    background: #fff;
    color: var(--erp-gray-900);
    transition: 0.15s;
    font-family: inherit;
    height: 34px;
}

.form-control:focus {
    outline: none;
    border-color: var(--erp-green-500);
    box-shadow: 0 0 0 3px var(--erp-green-100);
}

.form-error {
    display: block;
    color: #dc2626;
    font-size: 12px;
    margin-top: 0.35rem;
    font-weight: 500;
}

/* Input Icons */
.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-wrapper i {
    position: absolute;
    left: 0.75rem;
    color: var(--erp-gray-600);
    font-size: 14px;
}

.input-icon-wrapper .form-control {
    padding-left: 2.25rem;
}

.input-icon-wrapper select.form-control {
    appearance: none;
    -webkit-appearance: none;
    padding-left: 2.25rem;
    padding-right: 2rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23475569' d='M6 8.825a.5.5 0 01-.354-.146l-3.5-3.5a.5.5 0 01.708-.708L6 7.618l3.146-3.147a.5.5 0 01.708.708l-3.5 3.5A.5.5 0 016 8.825z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    cursor: pointer;
}

/* Custom File Upload Design */
.custom-file-wrapper {
    margin-bottom: 0.5rem;
}

.custom-file-upload {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: #fff;
    border: 1px dashed var(--erp-green-500);
    border-radius: var(--radius-sm);
    color: var(--erp-green-600);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: 0.15s;
}

.custom-file-upload:hover {
    background: var(--erp-green-50);
}

.custom-file-upload i {
    font-size: 16px;
}

.hidden-file-input {
    display: none;
}

.file-name-display {
    font-size: 12px;
    color: var(--erp-gray-600);
    font-weight: 500;
    font-style: italic;
    margin-left: 0.5rem;
}

/* Cards & Badges */
.card {
    background: #fff;
    border: 1px solid var(--erp-gray-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}

/* Premium Glow Cards */
.card-glow-green {
    border: none;
    border-top: 3px solid var(--erp-green-400);
    box-shadow: 0 4px 20px -5px rgba(16, 185, 129, 0.15);
}

.card-glow-amber {
    border: none;
    border-top: 3px solid #fbbf24;
    box-shadow: 0 4px 20px -5px rgba(217, 119, 6, 0.15);
}

.card-glow-indigo {
    border: none;
    border-top: 3px solid #818cf8;
    box-shadow: 0 4px 20px -5px rgba(79, 70, 229, 0.15);
}

.card-body {
    padding: 1.25rem;
}

.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--erp-gray-100);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.card-title {
    font-size: 14px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.badge-green {
    background: var(--erp-green-100);
    color: var(--erp-green-700);
}

.badge-gray {
    background: var(--erp-gray-100);
    color: var(--erp-gray-600);
}

/* Tables (High Density) */
.table-responsive {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
    border-radius: var(--radius-md);
    width: 100%;
}

/* Stable Scrollbar for table responsiveness */
.table-responsive::-webkit-scrollbar {
    height: 6px;
    width: 6px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #04865f;
    border-radius: 10px;
}

.table-responsive::-webkit-scrollbar-track {
    background: transparent;
}

/* Ensure tables inside cards look perfect on mobile */
.card .table-responsive {
    margin: 0;
    border: none;
}

.erp-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13px;
}

/* Force horizontal scroll on small devices by preventing column crushing */
@media (max-width: 1024px) {

    .erp-table th,
    .erp-table td {
        white-space: nowrap;
    }
}

.erp-table th {
    padding: 0.75rem 1rem;
    border-bottom: 2px solid var(--erp-gray-200);
    color: var(--erp-gray-600);
    font-weight: 600;
    font-size: 12px;
    user-select: none;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.erp-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--erp-gray-100);
    color: var(--erp-gray-800);
}

.erp-table tr:hover td {
    background: var(--erp-gray-50);
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--erp-gray-600);
    font-size: 13px;
}

/* Custom Pagination Styling */
.pagination {
    display: flex;
    padding-left: 0;
    list-style: none;
    justify-content: center;
    gap: 0.5rem;
    margin: 0;
    align-items: center;
    flex-wrap: wrap;
}

.page-item {
    margin: 0;
}

.page-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 0.75rem;
    font-size: 14px;
    font-weight: 700;
    color: var(--erp-gray-800);
    background-color: #fff;
    border: 1px solid var(--erp-gray-300);
    border-radius: var(--radius-md);
    transition: all 0.2s;
    text-decoration: none;
}

.page-link:hover {
    z-index: 2;
    color: var(--erp-green-700);
    background-color: var(--erp-green-100);
    border-color: var(--erp-green-400);
}

.page-item.active .page-link {
    background: var(--erp-green-500) !important;
    color: white !important; /* Adding !important to ensure color overrides any default bootstrap */
    border-color: var(--erp-green-500) !important;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25) !important;
}

.page-item.disabled .page-link {
    color: var(--erp-gray-400);
    pointer-events: none;
    background-color: var(--erp-gray-100);
    border-color: var(--erp-gray-200);
}

.page-link svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

/* Guest Layout */
.guest-wrapper {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    background: #fff;
}

.guest-nav {
    height: 60px;
    background: #fff;
    border-bottom: 1px solid var(--erp-gray-200);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    justify-content: space-between;
}

.guest-nav .brand {
    font-size: 18px;
    font-weight: 900;
    color: var(--erp-gray-900);
    letter-spacing: -0.02em;
}

.guest-nav .brand span {
    color: var(--erp-green-600);
}

.guest-nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.guest-nav-links a.active {
    color: var(--erp-green-600);
    font-weight: 600;
}

.guest-content {
    flex: 1;
}

/* Welcome Page Specifics */
.hero-section {
    padding: 6rem 1.5rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-p {
    font-size: 16px;
    margin: 1rem 0 2rem;
    color: var(--erp-gray-600);
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 900px;
    margin: 4rem auto;
    padding: 0 1.5rem;
    border-top: 1px solid var(--erp-gray-200);
    padding-top: 3rem;
}

.feature-item {
    text-align: center;
}

.feature-icon {
    font-size: 24px;
    color: var(--erp-green-600);
    margin-bottom: 0.75rem;
}

/* Split-Screen Auth Layout */
.auth-split {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.auth-split-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 60px 20px;
    background: #fff;
    overflow-y: auto;
}

.auth-split-right {
    flex: 1;
    background: linear-gradient(135deg, var(--erp-green-700), var(--erp-green-600));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    color: white;
    height: 100vh;
}

/* Mobile Responsiveness for Split Auth */
@media (max-width: 991px) {
    .auth-split {
        flex-direction: column;
        height: auto;
        overflow: visible;
    }

    .auth-split-left {
        height: auto;
        overflow: visible;
        padding: 40px 20px;
    }

    .auth-split-right {
        display: none;
    }
}

.auth-right-content {
    max-width: 400px;
}

.auth-right-content h2 {
    color: white;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.auth-right-content p {
    color: var(--erp-green-50);
    font-size: 15px;
    line-height: 1.6;
}

.auth-form-container {
    width: 100%;
    max-width: 360px;
}

.auth-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    font-size: 14px;
    margin-bottom: 2rem;
    color: var(--erp-gray-600);
}

.auth-footer {
    margin-top: 1.5rem;
    font-size: 13px;
    text-align: center;
}

/* Form Radio Grids */
.radio-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.radio-card {
    border: 1px solid var(--erp-gray-200);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: 0.15s;
    font-size: 13px;
    font-weight: 500;
    background: #fff;
}

.radio-card:hover {
    border-color: var(--erp-green-500);
    background: var(--erp-green-50);
}

.radio-card input {
    accent-color: var(--erp-green-600);
    margin: 0;
}

/* App Sidebar Layout */
.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    width: var(--sidebar-w);
    background: #fff;
    border-right: 1px solid var(--erp-gray-200);
    display: flex;
    flex-direction: column;
    z-index: 40;
}

.sidebar-header {
    height: var(--header-h);
    border-bottom: 1px solid var(--erp-gray-200);
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    font-weight: 800;
    font-size: 16px;
    color: var(--erp-gray-900);
    letter-spacing: -0.02em;
}

.sidebar-header span {
    color: var(--erp-green-600);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-close {
    display: none;
    background: var(--erp-gray-100);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: var(--erp-gray-600);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: 0.2s;
}

.sidebar-close:hover {
    background: var(--erp-gray-200);
    color: var(--erp-gray-900);
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 35;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius-md);
    color: var(--erp-gray-600);
    font-size: 13.5px;
    font-weight: 500;
    border: none;
    background: transparent;
    width: 100%;
    cursor: pointer;
    transition: 0.15s;
}

.sidebar-item i {
    font-size: 14px;
    width: 16px;
    text-align: center;
}

.sidebar-item:hover,
.sidebar-item.active {
    background: var(--erp-green-50);
    color: var(--erp-green-700);
}

.sidebar-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--erp-gray-600);
    margin: 1.5rem 0 0.5rem 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* App Workspace */
.app-workspace {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--erp-gray-50);
    min-width: 0;
}

.app-header {
    height: var(--header-h);
    background: #fff;
    border-bottom: 1px solid var(--erp-gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    z-index: 30;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 18px;
    color: var(--erp-gray-600);
    cursor: pointer;
    margin-right: 1rem;
}

.header-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--erp-gray-900);
}

.header-user {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 13px;
    font-weight: 600;
    color: var(--erp-gray-800);
}

.header-avatar {
    width: 30px;
    height: 30px;
    background: var(--erp-green-100);
    color: var(--erp-green-700);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.app-main {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: start;
}

/* Dashboard Info List */
.info-box {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--erp-gray-100);
    font-size: 13px;
}

.info-box:last-child {
    border-bottom: none;
}

.info-lbl {
    color: var(--erp-gray-600);
    font-weight: 500;
}

.info-val {
    font-weight: 600;
    color: var(--erp-gray-900);
}

/* Service Chips & Forms inline */
.chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.chip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border: 1px solid var(--erp-gray-200);
    border-radius: var(--radius-sm);
    padding: 0.35rem 0.6rem;
    font-size: 12px;
    font-weight: 500;
    gap: 0.5rem;
}

.service-form-inline {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

/* Global Loader */
.global-page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: 0.2s ease;
}

.global-page-loader.active {
    opacity: 1;
    visibility: visible;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--erp-green-100);
    border-top: 3px solid var(--erp-green-600);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Alerts / States */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-success {
    background: var(--erp-green-50);
    border: 1px solid var(--erp-green-100);
    color: var(--erp-green-700);
}

.auth-success-box {
    text-align: center;
}

.auth-success-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--erp-green-100);
    color: var(--erp-green-600);
    font-size: 24px;
    margin: 0 auto 1.5rem;
}

/* Responsiveness */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .auth-split-right {
        display: none;
    }

    .auth-split-left {
        padding-top: 10vh;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        transform: translateX(-100%);
        transition: 0.3s;
        box-shadow: var(--shadow-md);
    }

    .sidebar.open {
        transform: translateX(0);
        width: 280px;
    }

    .sidebar-close {
        display: flex;
    }

    .sidebar-header {
        justify-content: space-between;
    }

    .mobile-toggle {
        display: block;
    }

    /* Form Responsiveness */
    form[action*="dashboard"],
    .erp-filter-form {
        grid-template-columns: 1fr !important;
        height: auto !important;
        gap: 0.75rem !important;
    }

    form[action*="dashboard"] .btn-primary {
        width: 100%;
    }

    /* General Grid Stacking */
    .dashboard-grid {
        grid-template-columns: 1fr !important;
    }

    .metrics-row-grid {
        grid-template-columns: 1fr !important;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .radio-grid {
        grid-template-columns: 1fr;
    }

    .service-form-inline {
        flex-direction: column;
    }

    .app-header {
        padding: 0 1rem;
    }

    .app-main {
        padding: 1rem;
    }

    .activity-feed-grid {
        grid-template-columns: 1fr;
    }
}

/* Task Manager Specific Components */
.task-manager-grid {
    display: grid;
    /* grid-template-columns: 1fr 360px; */
    gap: 2rem;
    align-items: start;
}

@media (max-width: 1200px) {
    .task-manager-grid {
        grid-template-columns: 1fr;
    }
}

.task-card {
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--erp-gray-200);
    border-radius: 12px;
    overflow: hidden;
}

.task-header-premium {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border-bottom: 1px solid var(--erp-gray-100);
    padding: 1.25rem 1.5rem;
}

.task-header-flex {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.task-header-title {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: var(--erp-gray-900);
}

.task-header-subtitle {
    font-size: 11px;
    color: var(--erp-gray-500);
    margin: 2px 0 0 0;
}

.task-count-badge {
    padding: 0.6rem 1.25rem;
    border-radius: 50px;
    font-weight: 800;
    font-size: 11px;
}

.task-count-badge i {
    margin-right: 6px;
    opacity: 0.7;
}

.task-table-card-body {
    padding: 0 !important;
}

.table-no-margin {
    margin: 0 !important;
}

.task-header-icon {
    width: 42px;
    height: 42px;
    background: var(--erp-green-50);
    color: var(--erp-green-600);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: inset 0 0 0 1px rgba(13, 148, 136, 0.1);
}

.task-row {
    transition: all 0.2s ease;
}

.task-row:hover {
    background: var(--erp-gray-50);
    box-shadow: inset 4px 0 0 0 var(--erp-green-500);
}

.task-row td {
    vertical-align: middle;
    border-bottom: 1px solid var(--erp-gray-100);
}

.task-row:last-child td {
    border-bottom: none;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    position: relative;
}

.status-dot.pending {
    background: #ea580c;
    box-shadow: 0 0 0 4px rgba(234, 88, 12, 0.1);
}

.status-dot.completed {
    background: var(--erp-green-600);
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.1);
}

.priority-pill {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 800;
    text-transform: uppercase;
    border: 1px solid transparent;
}

.priority-pill.urgent {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.2);
}

.priority-pill.high {
    background: rgba(234, 88, 12, 0.1);
    color: #ea580c;
    border-color: rgba(234, 88, 12, 0.2);
}

.priority-pill.normal {
    background: rgba(13, 148, 136, 0.1);
    color: #0d9488;
    border-color: rgba(13, 148, 136, 0.2);
}

.priority-pill.low {
    background: rgba(100, 116, 139, 0.1);
    color: #64748b;
    border-color: rgba(100, 116, 139, 0.2);
}

.type-indicator {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.type-indicator.task {
    background: var(--erp-green-100);
    color: var(--erp-green-700);
}

.type-indicator.note {
    background: var(--erp-gray-100);
    color: var(--erp-gray-600);
}

.action-btn-circle {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

.action-btn-circle.success {
    color: var(--erp-green-600);
    border-color: var(--erp-green-100);
}

.action-btn-circle.success:hover {
    background: var(--erp-green-600);
    color: #fff;
    transform: translateY(-3px) rotate(8deg);
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.2);
}

.action-btn-circle.danger {
    color: var(--erp-gray-400);
    border-color: var(--erp-gray-200);
}

.action-btn-circle.danger:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fecaca;
    transform: translateY(-3px) rotate(-8deg);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.15);
}

.action-btn-circle.info {
    color: var(--erp-gray-600);
    border-color: var(--erp-gray-200);
}

.action-btn-circle.info:hover {
    background: var(--erp-gray-100);
    color: var(--erp-gray-900);
    border-color: var(--erp-gray-300);
    transform: translateY(-3px);
}

.activity-type-selector {
    position: relative;
    cursor: pointer;
    display: block;
}

.activity-type-selector input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.activity-type-selector span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0.6rem 0.5rem;
    background: #fff;
    border: 1px solid var(--erp-gray-200);
    border-radius: 8px;
    font-size: 10px;
    font-weight: 800;
    color: var(--erp-gray-500);
    transition: all 0.2s ease;
    letter-spacing: 0.02em;
}

.activity-type-selector input:checked~span {
    background: var(--erp-green-50);
    border-color: var(--erp-green-600);
    color: var(--erp-green-700);
    box-shadow: 0 2px 4px rgba(13, 148, 136, 0.05);
}

.activity-type-selector:hover span {
    border-color: var(--erp-green-200);
    color: var(--erp-green-600);
}

/* Layout Utilities (Single Class) */
.flex-column-gap {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.activity-feed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 1.5rem;
    align-items: start;
    margin-bottom: 2rem;
}

/* Row & Column Specifics */
.task-row-title-container {
    font-weight: 800;
    color: var(--erp-gray-900);
    font-size: 14px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.task-row-desc-text {
    font-size: 12px;
    color: var(--erp-gray-500);
    line-height: 1.4;
    max-width: 320px;
}

.task-date-group {
    display: flex;
    flex-direction: column;
}

.task-date-main {
    font-size: 13px;
    font-weight: 700;
    color: var(--erp-gray-800);
}

.task-date-sub {
    font-size: 10px;
    color: var(--erp-gray-400);
    font-weight: 700;
}

.task-status-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.task-status-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.task-status-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.task-action-wrapper {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    align-items: center;
}

/* Indicators */
.type-indicator.plan {
    background: #f5f3ff;
    color: #7c3aed;
}

.priority-pill.overdue-badge {
    font-size: 8px;
    padding: 1px 4px;
}

/* Creation Form */
.form-section-label {
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.type-selection-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 0.75rem;
}

/* Vault Info Card */
.privacy-vault-card {
    background: var(--erp-green-50);
    border: 1px dashed var(--erp-green-300);
    border-radius: 16px;
}

.privacy-vault-body {
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.privacy-vault-icon {
    color: var(--erp-green-600);
    font-size: 20px;
}

.privacy-vault-title {
    font-size: 13px;
    font-weight: 900;
    color: var(--erp-green-800);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.privacy-vault-text {
    font-size: 11px;
    color: var(--erp-green-700);
    line-height: 1.7;
    margin: 0;
    font-weight: 600;
}

/* Empty State */
.task-empty-state {
    text-align: center;
    padding: 6rem 2rem;
    color: var(--erp-gray-400);
}

.task-empty-icon {
    font-size: 56px;
    margin-bottom: 2rem;
    color: var(--erp-gray-200);
    opacity: 0.5;
}

.task-empty-title {
    font-weight: 900;
    color: var(--erp-gray-800);
    margin-bottom: 0.75rem;
    font-size: 18px;
}

.task-empty-desc {
    font-size: 14px;
    color: var(--erp-gray-500);
}

/* Modals (Premium Glassmorphic) */
.erp-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.erp-modal-overlay.active {
    display: flex;
}

.erp-modal {
    background: #fff;
    border-radius: 20px;
    width: 100%;
    max-width: 550px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.erp-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--erp-gray-100);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.erp-modal-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--erp-gray-900);
}

.erp-modal-close {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--erp-gray-400);
    cursor: pointer;
    transition: 0.15s;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.erp-modal-close:hover {
    background: var(--erp-gray-100);
    color: var(--erp-gray-900);
}

.erp-modal-body {
    padding: 1.25rem 1.5rem;
    max-height: 80vh;
    overflow-y: auto;
}

.erp-modal-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--erp-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.erp-modal-desc {
    font-size: 14px;
    color: var(--erp-gray-800);
    line-height: 1.7;
    white-space: pre-wrap;
    background: var(--erp-gray-50);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--erp-gray-100);
}

.erp-modal-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.erp-modal-footer {
    padding: 0.75rem 1.5rem;
    background: var(--erp-gray-50);
    border-top: 1px solid var(--erp-gray-100);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* --- Provision Console Specifics (PVC) --- */
.pvc-container {
    width: 100%;
    padding: 1rem 0;
}

.pvc-card {
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--erp-gray-200);
}

.pvc-header {
    background: var(--erp-gray-50);
    border-bottom: 1px solid var(--erp-gray-200);
    padding: 1.5rem 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pvc-title {
    font-size: 1.5rem;
    color: var(--erp-gray-900);
    font-weight: 800;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.pvc-title i {
    color: var(--erp-green-600);
}

.pvc-body {
    padding: 2.5rem 3rem;
}

.pvc-intro-text {
    color: var(--erp-gray-600);
    font-size: 14px;
    margin-bottom: 2rem;
    line-height: 1.6;
    max-width: 850px;
}

.pvc-form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 0.5rem;
}

.pvc-service-box {
    margin-bottom: 0.75rem;
    background: var(--erp-gray-50);
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px dashed var(--erp-gray-300);
}

.pvc-section-label {
    display: block;
    margin-bottom: 1rem;
    font-weight: 800;
    color: var(--erp-gray-900);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.05em;
}

.pvc-multi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.pvc-check-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    cursor: pointer;
    border-radius: 6px;
    background: white;
    border: 1px solid var(--erp-gray-200);
    transition: 0.2s;
}

.pvc-check-item:hover {
    border-color: var(--erp-green-500);
}

.pvc-check-item input {
    width: 16px;
    height: 16px;
    accent-color: var(--erp-green-600);
}

.pvc-check-item span {
    font-size: 13px;
    color: var(--erp-gray-800);
    font-weight: 700;
}

.pvc-file-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--erp-gray-100);
}

.pvc-security-block {
    background: var(--erp-gray-900);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pvc-security-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--erp-green-500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.pvc-security-info {
    font-size: 13px;
    opacity: 0.9;
    line-height: 1.5;
}

.pvc-security-info strong {
    display: block;
    font-size: 14px;
    margin-bottom: 2px;
    color: var(--erp-green-400);
}

.pvc-submit-wrap {
    text-align: right;
}

.pvc-submit-btn {
    padding: 0.75rem 2.5rem;
    font-size: 14px;
    border-radius: var(--radius-sm);
    font-weight: 700;
}

/* --- Utility Classes --- */
.text-center {
    text-align: center;
}

.d-block {
    display: block;
}

.mt-1 {
    margin-top: 0.25rem;
}

.m-l-10 {
    margin-left: 10px;
}

.btn-full {
    width: 100%;
}

/* Custom Select Component (Premium with Icons) */
.erp-select-custom {
    position: relative;
    width: 100%;
    min-width: 0;
}

.erp-select-trigger {
    width: 100%;
    padding: 0.5rem 0.25rem 0.5rem 0.25rem;
    padding-left: 0.75rem;
    border: 1px solid var(--erp-gray-300);
    border-radius: var(--radius-sm);
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: 0.15s;
    gap: 8px;
    min-height: 27px;
    height: 34px;
}

.erp-select-trigger:focus-within,
.erp-select-custom.active .erp-select-trigger {
    border-color: var(--erp-green-500);
    box-shadow: 0 0 0 3px var(--erp-green-100);
    outline: none;
}

.erp-select-trigger .trigger-icon {
    position: initial;
    color: var(--erp-gray-500);
    font-size: 13px;
}

.erp-select-trigger .trigger-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.erp-select-options {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    min-width: 160px;
    background: #fff;
    border: 1px solid var(--erp-gray-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.erp-select-custom.active .erp-select-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.erp-select-option {
    padding: 0.6rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 13.5px;
    color: var(--erp-gray-800);
    transition: 0.1s;
}

.erp-select-option:hover {
    background: var(--erp-green-50);
    color: var(--erp-green-700);
}

.erp-select-option i {
    color: var(--erp-green-600);
    font-size: 14px;
    width: 18px;
    text-align: center;
}

.erp-select-option.selected {
    background: var(--erp-green-100);
    font-weight: 600;
}

.erp-select-trigger .arrow {
    font-size: 10px;
    color: var(--erp-gray-600);
    transition: 0.2s;
}

.erp-select-custom.active .arrow {
    transform: rotate(180deg);
}

/* Modal Specific Compact Layouts */
.erp-modal .form-group {
    margin-bottom: 0.85rem;
}

.erp-modal .type-selection-grid {
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.erp-modal .form-section-label {
    font-size: 10px;
}

/* ============================================
   SEARCHABLE DROPDOWN COMPONENT
   ============================================ */
.searchable-select-wrapper {
    position: relative;
    width: 100%;
    margin-top: 0.5rem;
}

.searchable-select-display {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 2.25rem;
    border: 1px solid var(--erp-gray-300);
    border-radius: 10px;
    font-size: 13px;
    background: #fff;
    color: var(--erp-gray-900);
    cursor: pointer;
    transition: 0.15s;
    font-family: inherit;
    min-height: 40px;
    user-select: none;
}

.searchable-select-wrapper.open .searchable-select-display {
    border-color: var(--erp-green-500);
    box-shadow: 0 0 0 3px var(--erp-green-100);
    border-radius: 10px 10px 0 0;
}

.searchable-select-display .ss-placeholder {
    color: var(--erp-gray-600);
    flex: 1;
    font-size: 12px;
    font-style: italic;
}

.searchable-select-display .ss-selected-text {
    flex: 1;
    font-weight: 700;
    font-size: 13px;
    color: var(--erp-gray-900);
}

.searchable-select-display .ss-chevron {
    color: var(--erp-gray-600);
    font-size: 11px;
    transition: transform 0.2s ease;
    margin-left: auto;
    padding-left: 8px;
}

.searchable-select-wrapper.open .ss-chevron {
    transform: rotate(180deg);
}

.searchable-select-panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--erp-green-500);
    border-top: none;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 8px 25px -5px rgba(5, 150, 105, 0.15);
    z-index: 9999;
    flex-direction: column;
    overflow: hidden;
}

.searchable-select-wrapper.open .searchable-select-panel {
    display: flex;
}

.ss-search-bar {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--erp-gray-100);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--erp-gray-50);
}

.ss-search-bar i {
    color: var(--erp-gray-600);
    font-size: 12px;
}

.ss-search-input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 13px;
    width: 100%;
    font-family: inherit;
    color: var(--erp-gray-900);
}

.ss-options-list {
    overflow-y: auto;
    max-height: 175px;
}

.ss-option {
    padding: 0.55rem 1rem;
    font-size: 13px;
    cursor: pointer;
    color: var(--erp-gray-800);
    transition: background 0.1s;
    border-bottom: 1px solid var(--erp-gray-50);
}

.ss-option:last-child {
    border-bottom: none;
}

.ss-option:hover,
.ss-option.focused {
    background: var(--erp-green-50);
    color: var(--erp-green-700);
}

.ss-option.selected {
    background: var(--erp-green-100);
    color: var(--erp-green-700);
}

.ss-opt-name {
    font-weight: 700;
    display: block;
    font-size: 13px;
}

.ss-opt-company {
    font-size: 11px;
    color: var(--erp-gray-500);
    font-weight: 500;
}

.ss-option.selected .ss-opt-company {
    color: var(--erp-green-600);
}

.ss-no-results {
    padding: 1.25rem;
    text-align: center;
    font-size: 12px;
    color: var(--erp-gray-500);
    font-style: italic;
}

.ss-icon-wrapper {
    position: absolute;
    left: 0.75rem;
    top: 10px;
    color: var(--erp-gray-600);
    font-size: 14px;
    pointer-events: none;
}

/* ============================================
   CLIENT SEARCH FIELD (always-visible input)
   ============================================ */
.client-search-field {
    position: relative;
    width: 100%;
    margin-top: 0.5rem;
}

.client-results-panel {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--erp-green-500);
    border-radius: 0 0 10px 10px;
    box-shadow: 0 8px 25px -5px rgba(5, 150, 105, 0.15);
    z-index: 9999;
    max-height: 200px;
    overflow-y: auto;
}

.client-result-item {
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    border-bottom: 1px solid var(--erp-gray-50);
    transition: background 0.1s;
}

.client-result-item:last-child {
    border-bottom: none;
}

.client-result-item:hover {
    background: var(--erp-green-50);
}

.client-result-item.is-selected {
    background: var(--erp-green-50);
}

.client-result-info .cr-name {
    font-weight: 700;
    font-size: 13px;
    color: var(--erp-gray-900);
    display: block;
}

.client-result-info .cr-company {
    font-size: 11px;
    color: var(--erp-gray-500);
}

.client-result-check {
    font-size: 15px;
    color: var(--erp-green-600);
    opacity: 0;
    transition: opacity 0.15s;
}

.client-result-item.is-selected .client-result-check {
    opacity: 1;
}

.client-selected-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 7px;
    padding: 4px 10px 4px 8px;
    background: var(--erp-green-50);
    border: 1px solid var(--erp-green-200);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: var(--erp-green-700);
}

.client-selected-tag i {
    font-size: 12px;
    color: var(--erp-green-600);
}

.client-tag-remove {
    background: none;
    border: none;
    color: var(--erp-green-600);
    cursor: pointer;
    font-size: 13px;
    padding: 0;
    line-height: 1;
    margin-left: 2px;
    opacity: 0.7;
    transition: opacity 0.1s;
}

.client-tag-remove:hover {
    opacity: 1;
}

.client-no-results {
    padding: 1rem;
    text-align: center;
    font-size: 12px;
    color: var(--erp-gray-500);
    font-style: italic;
}

/* ============================================
   PAGINATION STYLING (Zero-Inline Custom Bootstrap 5 API Override)
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.page-item {
    margin: 0;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 0.5rem;
    font-size: 13px;
    font-weight: 600;
    color: var(--erp-gray-600);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
}

.page-link:hover {
    background: var(--erp-gray-100);
    color: var(--erp-gray-900);
}

.page-item.active .page-link {
    background: var(--erp-green-500);
    color: white;
    border-color: var(--erp-green-500);
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25);
}

.page-item.disabled .page-link {
    color: var(--erp-gray-400);
    pointer-events: none;
    background: transparent;
}

/* ============================================
   DASHBOARD METRICS ROW
   ============================================ */
.metrics-row-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 1024px) {
    .metrics-row-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .metrics-row-grid {
        grid-template-columns: 1fr;
    }
}

.metrics-row-grid .card {
    height: 200px;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
}

/* ============================================
   DASHBOARD GRID SYMMETRY ENFORCEMENT
   ============================================ */
.activity-feed-grid .card {
    height: 200px;
    /* Lock perfect professional height */
    display: flex;
    flex-direction: column;
}

.activity-feed-grid .card-header {
    flex-shrink: 0;
}

.activity-feed-grid .card-body {
    flex: 1 1 auto;
    overflow-y: auto;
    /* Beautiful inner scrolling for long tables */
    /* Custom Scrollbar for inner card */
    scrollbar-width: thin;
    scrollbar-color: var(--erp-gray-300) transparent;
}

.activity-feed-grid .card-body::-webkit-scrollbar {
    width: 6px;
}

.activity-feed-grid .card-body::-webkit-scrollbar-thumb {
    background-color: var(--erp-gray-300);
    border-radius: 10px;
}

.activity-feed-grid .card-footer {
    flex-shrink: 0;
    margin-top: auto;
}

/* ============================================
 IMAGE VIEWER MODAL
 ============================================ */
.image-viewer-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: 0.3s;
}

.image-viewer-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    animation-name: zoom;
    animation-duration: 0.4s;
    cursor: default;
}

@keyframes zoom {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.image-viewer-close {
    position: absolute;
    top: 25px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 10001;
    background: rgba(255, 255, 255, 0.1);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    line-height: 1;
}

.image-viewer-close:hover,
.image-viewer-close:focus {
    color: #fff;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Pagination Premium Styles */
.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 6px;
    align-items: center;
}

.pagination .page-item {
    display: inline-block;
}

.pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--erp-gray-600);
    background: white;
    border: 1px solid var(--erp-gray-200);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination .page-item.active .page-link {
    background: var(--erp-primary);
    color: white;
    border-color: var(--erp-primary);
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.2);
}

.pagination .page-link:hover:not(.active) {
    background: var(--erp-gray-50);
    border-color: var(--erp-gray-300);
    color: var(--erp-primary);
    transform: translateY(-1px);
}

.pagination .page-item.disabled .page-link {
    color: var(--erp-gray-300);
    background: var(--erp-gray-50);
    cursor: not-allowed;
    transform: none;
}

.pagination .page-item:first-child .page-link,
.pagination .page-item:last-child .page-link {
    font-size: 14px;
}

.pagination svg {
    width: 16px;
    height: 16px;
}