/* ================================
   MODERN CRM UI POLISH - OPTIMIZED
================================ */

/* ---------- Global Variables ---------- */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --success-color: #16a34a;
    --success-hover: #15803d;
    --danger-color: #dc2626;
    --danger-hover: #b91c1c;
    --warning-color: #f59e0b;
    --warning-hover: #d97706;
    --border-radius: 10px;
    --border-radius-lg: 12px;
    --border-radius-xl: 16px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 14px rgba(0,0,0,0.05);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.06);
    --shadow-xl: 0 16px 40px rgba(0,0,0,.12);
}

/* ---------- Base Styles ---------- */
body {
    background-color: #f3f4f6;
}
.main-menu .active a:not(.dropdown-item) {
    background-color: #f3f4f6;
}
/* Cards */
.card,
.full-width-card,
.minimal-card {
    border-radius: var(--border-radius-xl);
    border: none;
    box-shadow: var(--shadow-lg);
    background: #ffffff;
}

.full-width-card {
    padding: 30px;
    width: 100%;
}

.minimal-card {
    /* Additional minimal card styles if needed */
}

.rounded {
    border-radius: var(--border-radius-xl) !important;
}

.card-header {
    color: #4b5563 !important;
    background: #f3f4f6 !important;
    border-bottom: 1px solid #f1f5f9;
    padding: 20px 24px;
    border-radius: var(--border-radius-xl) var(--border-radius-xl) 0 0 !important;
}

.card-body {
    padding: 24px;
}

/* Typography */
h1, h2, h3, h4, h5,
.page-title {
    font-weight: 600;
    color: #1f2937;
}

.page-title {
    font-size: 28px;
    margin-bottom: 4px;
}

.page-subtitle {
    color: #6b7280;
    margin-top: -3px;
    font-size: 15px;
}

.text-muted {
    color: #6b7280 !important;
}
/* ===============================
FONT WEIGHT
=============================== */
.fw-light { font-weight: 300 !important; }
.fw-lighter { font-weight: lighter !important; }
.fw-normal { font-weight: 400 !important; }
.fw-bold { font-weight: 700 !important; }
.fw-bolder { font-weight: bolder !important; }

/* ===============================
    FONT STYLE
    =============================== */
.fst-italic { font-style: italic !important; }
.fst-normal { font-style: normal !important; }

/* ===============================
    FONT SIZE
    =============================== */
.fs-1 { font-size: 2.5rem !important; }
.fs-2 { font-size: 2rem !important; }
.fs-3 { font-size: 1.75rem !important; }
.fs-4 { font-size: 1.5rem !important; }
.fs-5 { font-size: 1.25rem !important; }
.fs-6 { font-size: 1rem !important; }

/* ===============================
    LINE HEIGHT
    =============================== */
.lh-1 { line-height: 1 !important; }
.lh-sm { line-height: 1.25 !important; }
.lh-base { line-height: 1.5 !important; }
.lh-lg { line-height: 2 !important; }

/* ===============================
    TEXT ALIGNMENT
    =============================== */
.text-start { text-align: left !important; }
.text-center { text-align: center !important; }
.text-end { text-align: right !important; }

/* ===============================
    TEXT TRANSFORM
    =============================== */
.text-lowercase { text-transform: lowercase !important; }
.text-uppercase { text-transform: uppercase !important; }
.text-capitalize { text-transform: capitalize !important; }

/* ===============================
    TEXT DECORATION
    =============================== */
.text-decoration-none { text-decoration: none !important; }
.text-decoration-underline { text-decoration: underline !important; }
.text-decoration-line-through { text-decoration: line-through !important; }

/* ===============================
    TEXT WRAP & BREAK
    =============================== */
.text-wrap { white-space: normal !important; }
.text-nowrap { white-space: nowrap !important; }
.text-break {
    word-wrap: break-word !important;
    word-break: break-word !important;
}

/* ===============================
    TEXT COLORS
    =============================== */
.text-primary { color: #0d6efd !important; }
.text-secondary { color: #6c757d !important; }
.text-success { color: #198754 !important; }
.text-danger { color: #dc3545 !important; }
.text-warning { color: #ffc107 !important; }
.text-info { color: #0dcaf0 !important; }
.text-light { color: #f8f9fa !important; }
.text-dark { color: #212529 !important; }
.text-muted { color: #6c757d !important; }
.text-white { color: #ffffff !important; }
.text-black { color: #000000 !important; }

/* ===============================
    TEXT OPACITY
    =============================== */
.text-opacity-25 { opacity: 0.25 !important; }
.text-opacity-50 { opacity: 0.5 !important; }
.text-opacity-75 { opacity: 0.75 !important; }
.text-opacity-100 { opacity: 1 !important; }

/* ===============================
    MISC TEXT HELPERS
    =============================== */
.text-reset { color: inherit !important; }
.small { font-size: 0.875em !important; }
.mark {
    background-color: #fcf8e3 !important;
    padding: 0.2em !important;
}


/* ---------- Forms ---------- */
.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.form-control,
.custom-select,
#franchisee_id,
.bulk-action-container select {
    border-radius: var(--border-radius) !important;
    border: 1px solid #d1d5db !important;
    padding: 9px 14px !important;
    font-size: 15px !important;
    transition: all .2s ease !important;
    background: #ffffff !important;
}

.form-control:focus,
.custom-select:focus,
#franchisee_id:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}

.form-control::placeholder {
    color: #9ca3af;
}
.btn-arrow-right:before, .btn-arrow-left:after{
    background-color: white;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b{
    margin-top: 0px !important;
}

/* ---------- Buttons ---------- */
.btn,
.btn-primary,
.btn-secondary {
    border-radius: var(--border-radius);
    font-weight: 500;
    padding: 8px 18px;
    transition: all .2s ease;
}

/* Button Sizes */
.btn-sm {
    padding: 11px 16px !important;
    border-radius: 10px !important;
}

/* Solid Buttons */

.btn-primary {
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    transition: 0.2s;
}

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

.btn-success {
    background: var(--success-color);
    border-color: var(--success-color);
}

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

.btn-secondary {
    background: #e5e7eb;
    color: #374151;
    border: none;
}

.btn-secondary:hover {
    background: #d1d5db;
}

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

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

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

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

/* Outline Buttons */
.btn-outline-primary {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: var(--border-radius);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: #fff;
}

/* Special Buttons */
.btn-export {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-apply-action {
    padding: 7px 20px;
    background: #3b82f6;
    color: white;
    border: none;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.btn-apply-action:not(:disabled):hover {
    background: var(--primary-hover);
}

.btn-apply-action:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.log-wrapper {
    background: #f5f7fb;
}

/* Master Card - more compact */
.log-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

/* Compact Header */
.log-header-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    font-size: 13px;
}

.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.log-id {
    font-weight: 600;
    color: #374151;
}

.log-type {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    font-weight: 600;
}

.log-type.update {
    background: #eef2ff;
    color: #4338ca;
}

.log-type.add {
    background: #ecfdf5;
    color: #047857;
}

.log-user {
    color: #4b5563;
    font-weight: 500;
}

.log-date {
    color: #6b7280;
    font-size: 12px;
}

/* Compact Body */
.log-body-compact {
    padding: 0;
}

/* Compact Table */
.compact-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.compact-table thead tr {
    background: #f3f4f6;
    border-bottom: 1px solid #e5e7eb;
}

.compact-table th {
    text-align: left;
    padding: 6px 10px;
    font-weight: 600;
    color: #374151;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.compact-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: top;
    line-height: 1.4;
}

.compact-table tr:last-child td {
    border-bottom: none;
}

/* Field name styling */
.field-name {
    font-weight: 500;
    color: #111827;
    white-space: nowrap;
}

/* Value cells */
.value-cell {
    word-break: break-word;
}

.before-value {
    background-color: #fef2f2;
    color: #991b1b;
}

.after-value {
    background-color: #ecfdf5;
    color: #065f46;
}

.add-value {
    background-color: #f3f4f6;
    color: #1f2937;
}

/* For multiple items in array */
.value-cell br {
    display: block;
    content: "";
    margin: 4px 0;
}

/* Optional: Make it even more compact for small screens */
@media (max-width: 768px) {
    .compact-table td {
        padding: 6px 8px;
        font-size: 12px;
    }
    
    .field-name {
        white-space: normal;
        min-width: 100px;
    }
}

/* Hover effect for better readability */
.compact-table tbody tr:hover td {
    background-color: #f9fafb;
}

.compact-table tbody tr:hover .before-value {
    background-color: #fee2e2;
}

.compact-table tbody tr:hover .after-value {
    background-color: #d1fae5;
}
/* =========================
   COMPACT MODE — ADD ONLY
========================= */

.change-card.is-add {
    padding: 10px 12px;
    border-radius: 8px;
    background: #fafafa;
}

.change-card.is-add .change-field {
    font-size: 13px;
    margin-bottom: 6px;
    color: #374151;
}

.change-card.is-add .change-single {
    padding: 8px 10px;
    font-size: 13px;
    background: #f3f4f6;
    border-radius: 6px;
}

/* Reduce vertical spacing */
.change-card.is-add + .change-card.is-add {
    margin-top: 6px;
}
.compact-log {
    display: grid;
    grid-template-columns: 4fr 4fr 4fr 4fr;
    gap: 10px;
}

/* Base gap */
.gap-0 { 
    gap: 0 !important; 
}

.gap-1 { 
    gap: 0.25rem !important; 
}

.gap-2 { 
    gap: 0.5rem !important; 
}

.gap-3 { 
    gap: 1rem !important; 
}

.gap-4 { 
    gap: 1.5rem !important; 
}

.gap-5 { 
    gap: 3rem !important; 
}


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

/* ---------- Tables ---------- */
.table {
    border-collapse: separate !important;
    border-spacing: 0 10px !important;
}

/* Table variants */
.table,
.table-list,
.modern-table {
    width: 100%;
}

.table thead th,
.table-list thead th,
.modern-table thead th {
    background: #f3f4f6;
    border: none;
    font-size: 14px;
    font-weight: 600;
    color: #4b5563;
    padding: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #010000;
}

/* Modern table specific header */
.modern-table thead tr {
    background: #f3f4f6 !important;
}

.modern-table th {
    color: #4b5563 !important;
    background: #f3f4f6 !important;
    border-bottom: none !important;
}

.table tbody tr,
.table-list tbody tr,
.modern-table tbody tr {
    background: #ffffff;
    box-shadow: var(--shadow-md);
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f1f5f9;
}

.table tbody tr:hover,
.table-list tbody tr:hover,
.modern-table tbody tr:hover {
    background-color: #f8fafc;
}

.table td,
.table-list td,
.modern-table td {
    border: none;
    padding: 16px;
    vertical-align: middle;
    color: #374151;
    background-color: white !important;
}

/* Modern table specific cell styles */
.modern-table td {
    border: none !important;
}

/* Rounded table rows */
.table tbody tr td:first-child,
.table-list tbody tr td:first-child,
.modern-table tbody tr td:first-child {
    border-radius: 12px 0 0 12px;
}

.table tbody tr td:last-child,
.table-list tbody tr td:last-child,
.modern-table tbody tr td:last-child {
    border-radius: 0 12px 12px 0;
}

/* Table-specific styles */
.table-list thead th {
    padding: 16px 12px;
    color: #f0f2f5;
}

/* Modern table specific */
.modern-table tbody tr {
    border-radius: 10px;
}

/* Table links */
.table-list a[href*="view"] {
    color: #1e40af;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.table-list a[href*="view"]:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.table-actions {
    font-size: 12px;
    color: #64748b;
}

.table-actions a {
    color: #64748b;
    transition: color 0.2s ease;
}

.table-actions a:hover {
    color: #3b82f6;
    text-decoration: none;
}

.table-actions a.text-danger:hover {
    color: #dc2626;
}

/* Search box */
.dataTables_filter input {
    border-radius: 6px;
    border: 1px solid #cbd5e0;
    padding: 4px 8px;
    margin-left: 6px;
}

/* Length select */
.dataTables_length select {
    border-radius: 6px;
    border: 1px solid #cbd5e0;
    padding: 4px 6px;
}

/* Pagination */
.dataTables_paginate .pagination {
    margin: 0;
}

.dataTables_paginate .page-item .page-link {
    border-radius: 6px;
    margin: 0 2px;
    border: 1px solid #e2e8f0;
    color: #2b6cb0;
}

.dataTables_paginate .page-item.active .page-link {
    background-color: #2b6cb0;
    border-color: #2b6cb0;
    color: #fff;
}

/* Info text */
.dataTables_info {
    font-size: 0.85rem;
    color: #718096;
}

/* Table utilities */
.text-end {
    text-align: right;
}

.table-responsive {
    overflow-x: auto;
}

/* ---------- Badges ---------- */
.badge {
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 999px;
}

/* Soft Badges */
.badge-success,
.badge-soft-success {
    background: #dcfce7;
    color: #166534;
}

.badge-secondary {
    background: #f1f5f9;
    color: #64748b;
}

.badge-soft-muted {
    background: #f3f4f6;
    color: #6b7280;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

/* Custom badges */
.badge-yellow {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white !important;
    padding: 2px 3px;
    border-radius: 4px !important;
    font-size: 10px;
    font-weight: 600;
}

.badge-red {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white !important;
    padding: 2px 3px;
    border-radius: 4px !important;
    font-size: 10px;
    font-weight: 600;
}

.badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
}

/* BASE BADGE */
.badge-soft {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    display: inline-block;
    border: 1px solid transparent;
}

/* VARIANTS */
.badge-soft-success {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.badge-soft-primary {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #dbeafe;
}

.badge-soft-warning {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

.badge-soft-danger {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

.badge-soft-secondary, .badge-soft-info,
.badge-soft-muted {
    background: #f3f4f6;
    color: #6b7280;
    border-color: #e5e7eb;
}

/* ---------- Alerts ---------- */
.alert {
    border-radius: var(--border-radius-lg);
    padding: 14px 18px;
    font-size: 15px;
    border: none;
}

/* Modern Alert */
.modern-alert {
    border-radius: 10px;
    padding: 12px 18px;
    font-size: 15px;
}

.alert-success,
.modern-alert.alert-success {
    background: #ecfdf5;
    color: #065f46;
}

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
}

/* ---------- Dropdowns ---------- */
.dropdown-menu {
    border-radius: 14px;
    border: none;
    box-shadow: var(--shadow-xl);
}

.dropdown-item {
    font-size: 14px;
    padding: 10px 18px;
}

.dropdown-item:hover {
    background: #f1f5f9;
}

/* ---------- Validation ---------- */
.is-invalid {
    border-color: var(--danger-color) !important;
}

.invalid-feedback {
    font-size: 13px;
    color: var(--danger-color);
}

/* ---------- Pagination ---------- */
.pagination-container {
    margin-top: 24px;
    padding: 16px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.pagination {
    margin-bottom: 0;
}

.pagination .page-link {
    color: #475569;
    border: 1px solid #e2e8f0;
    padding: 8px 16px;
    margin: 0 4px;
    border-radius: var(--border-radius);
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.pagination .page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* ---------- Client Page Specific ---------- */
.client-page-container {
    border-radius: 15px;
    min-height: calc(100vh - 140px);
    background-color: #f8fafc;
}

.page-header .card,
.breadcrumbs {
    border-radius: 15px;
    background: linear-gradient(135deg, #ffffff 0%, #fafbfd 100%);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 
                0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
    transition: box-shadow 0.2s ease;
}

.page-header .card:hover,
.breadcrumbs:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 
                0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.breadcrumbs {
    padding: 16px 24px !important;
    margin-bottom: 20px;
    border-bottom: 1px solid #edf2f7;
}

.breadcrumbs .col:first-child {
    font-size: 20px;
    font-weight: 700;
    color: #1a202c;
    letter-spacing: -0.025em;
}

.breadcrumbs .col:first-child::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 24px;
    background: linear-gradient(to bottom, #3b82f6, #8b5cf6);
    margin-right: 12px;
    vertical-align: middle;
    border-radius: 2px;
}

/* Action Controls */
.action-controls-container {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.breadcrumbs select,
.breadcrumbs .btn {
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
}

.breadcrumbs select:focus,
.breadcrumbs .btn:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
}

/* Filters & Actions Bar */
.filters-actions-bar {
    background: #ffffff;
    border-radius: 8px;
    padding: 16px 20px;
    margin-top: 16px;
    border: 1px solid #e2e8f0;
}

/* Quick Links */
.page-links {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding: 4px 0;
}

.page-links a {
    font-weight: 500;
    color: #64748b;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.page-links a:hover {
    color: #3b82f6;
    background-color: #f1f5f9;
    text-decoration: none;
}

.page-links a.text-primary {
    color: #3b82f6;
    background-color: #eff6ff;
    border: 1px solid #dbeafe;
}

.page-links a.text-danger {
    color: #f80505;
    background-color: #facccc;
    border: 1px solid #fce0e0;
}

.page-links a.text-dark {
    color: #64748b;
}

.page-links a.text-dark:hover {
    color: #475569;
}

/* Bulk Action Container */
.bulk-action-container {
    min-width: 280px;
}

.bulk-action-container .input-group {
    box-shadow: var(--shadow-sm);
    border-radius: 8px;
    overflow: hidden;
}

.bulk-action-container select {
    border: none;
    border-right: 1px solid #e2e8f0;
}

/* Franchise Admin */
#franchisee_id {
    min-width: 240px;
}

/* Action Buttons Container */
.action-buttons-container {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Enhanced Success Button */
.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: white;
    font-weight: 500;
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Data Table Container */
.data-table-container {
    background: #ffffff;
    border-radius: var(--border-radius-lg);
    border: 1px solid #e2e8f0;
    box-shadow: var(--shadow-sm);
}

.table-wrapper {
    position: relative;
    overflow-x: auto;
}

/* Checkboxes */
.custom-control.custom-checkbox {
    margin: 0;
}

.custom-checkbox .custom-control-label::before {
    border: 1px solid #3b82f6 !important;
}

/* SIMPLE BLUE CHECKBOX FIX */
.custom-control-input:checked ~ .custom-control-label::before {
    background-color: #3b82f6 !important;
    border-color: #3b82f6 !important;
}

.custom-control-input:focus ~ .custom-control-label::before {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25) !important;
}

/* For standard checkboxes */
input[type="checkbox"]:checked {
    background-color: #3b82f6 !important;
    border-color: #3b82f6 !important;
}

/* Empty State */
.empty-state {
    background: #ffffff;
    border-radius: var(--border-radius-lg);
    padding: 48px 24px;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.empty-state .alert {
    border: none;
    border-radius: 8px;
    padding: 16px;
    max-width: 400px;
    margin: 0 auto;
}

/* Modal */
.search-modal .modal-content {
    border-radius: var(--border-radius-lg);
    border: none;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 
                0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.search-modal .modal-header {
    background: linear-gradient(to right, #3b82f6, #8b5cf6);
    color: white;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    padding: 20px 24px;
}

.search-modal .modal-title {
    font-weight: 600;
    font-size: 18px;
}

.search-modal .modal-body {
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
}

.search-modal .modal-footer {
    border-top: 1px solid #e5e7eb;
    padding: 20px 24px;
    background: #f9fafb;
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
}

.search-modal .form-group label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 14px;
}

.search-modal .form-control {
    border-radius: 6px;
    border: 1px solid #d1d5db;
    padding: 6px 14px !important;
    transition: all 0.2s ease;
}

.search-modal .custom-control-label {
    color: #4b5563;
    font-size: 14px;
}


/* ===============================
   SELECT2 – BOOTSTRAP FORM-CONTROL
   =============================== */

   .select2-container {
    width: 100% !important;
}

.select2-container--default .select2-selection--single {
    height: calc(1.5em + 0.75rem + 2px) !important;
    padding: 19px 14px !important;
    border: 1px solid #ced4da !important; 
    border-radius: 0.375rem !important; 
    background-color: #fff !important;
    display: flex !important;
    align-items: center !important;
}

/* Text */
.select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-left: 0 !important;
    padding-right: 1.75rem !important; 
    line-height: normal !important;
    color: #495057 !important;
}

/* Arrow */
/* .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100% !important;
    right: 0.75rem !important;
} */

/* Focus */
.select2-container--default.select2-container--focus
.select2-selection--single {
    border-color: #86b7fe !important;
    box-shadow: 0 0 0 0.2rem rgba(13,110,253,.25) !important;
}

/* Disabled */
.select2-container--default .select2-selection--single[aria-disabled="true"] {
    background-color: #e9ecef !important;
    cursor: not-allowed !important;
}

/* Placeholder */
.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #6c757d !important;
}

/* ===============================
   DROPDOWN
   =============================== */

.select2-dropdown {
    border-radius: 0.375rem !important;
    border: 1px solid #ced4da !important;
}

.select2-results__option {
    padding: 0.5rem 0.75rem !important;
}

.select2-results__option--highlighted {
    background-color: #0d6efd !important;
    color: #fff !important;
}

/* ===============================
   MULTIPLE SELECT
   =============================== */

.select2-container--default .select2-selection--multiple {
    min-height: calc(1.5em + 0.75rem + 2px) !important;
    border: 1px solid #ced4da !important;
    border-radius: 0.375rem !important;
    padding: 0.25rem 0.5rem !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #e9ecef !important;
    border: 1px solid #ced4da !important;
    border-radius: 0.25rem !important;
    padding: 0.25rem 0.5rem !important;
    margin: 0.15rem !important;
    font-size: 0.875rem !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #495057 !important;
    margin-right: 4px !important;
}

.nav-tabs .nav-link.active {
    background: #007bff !important;
    color: #fff;
}

.shadow-sm {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.custom-radius{
    border: 1px solid rgb(0 0 0 / 24%);
    border-radius: 15px;
    padding: 3px 20px 3px 20px;
}
/* ---------- Layout Utilities ---------- */
.d-flex {
    display: flex;
}

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

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

.mb-4 {
    margin-bottom: 1.5rem;
}

.py-5 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.px-4 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

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

/* Modern Header Styling */
.navbar-light.bg-white {
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.navbar-scrolled {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

/* Notification Badge Animation */

.has-notif {
    position: absolute;
    top: 0px;
    right: -8px;
    width: 25px;
    height: 25px;
    background: none;
    border-radius: 50%;
    border: 2px solid white;
    animation: pulse 1.5s infinite;
    z-index: 1;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* Profile Image Enhancement */
.profile-img-ico {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    cursor: pointer;
}

.profile-img-ico:hover {
    border-color: #007bff;
    transform: scale(1.05);
}

/* Dropdown Enhancements */
.notif-box {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    margin-top: 10px !important;
    max-height: 400px;
    overflow-y: auto;
    width: 320px;
}

.notif-box .unread {
    background-color: rgba(0, 123, 255, 0.05);
    border-left: 3px solid #007bff;
}

.nb-a {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.nb-a:hover {
    background-color: #f8f9fa;
    padding-left: 20px !important;
}

/* Mobile Menu Improvements */
.mobile-menu {
    padding: 8px 0;
    background: white;
    border-radius: 0 0 10px 10px;
}

.mobile-menu .nav-link {
    font-size: 14px;
    transition: all 0.2s ease;
}

.mobile-menu .nav-link:hover {
    transform: translateX(5px);
}

.mobile-menu .dropdown-menu {
    font-size: 14px;
    margin-top: 5px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Hover Effects */
.nav-link {
    transition: all 0.2s ease;
    position: relative;
}

.nav-link:hover {
    color: #007bff;
}

.nav-link.dropdown-toggle::after {
    transition: transform 0.2s ease;
}

.nav-link.dropdown-toggle.show::after {
    transform: rotate(180deg);
}

/* Icon Enhancement */
.h5.mb-0 {
    position: relative;
    padding: 10px;
    border-radius: 50%;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.h5.mb-0:hover {
    background-color: rgba(0, 123, 255, 0.1);
    color: #007bff;
}

/* Ripple Effect */
.ripple {
    position: absolute;
    background: rgba(0, 123, 255, 0.3);
    border-radius: 50%;
    transform: scale(0);
    animation: ripple-animation 0.6s linear;
    width: 100px;
    height: 100px;
    margin-top: -50px;
    margin-left: -50px;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Scrollbar Styling */
.notif-box::-webkit-scrollbar {
    width: 6px;
}

.notif-box::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.notif-box::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.notif-box::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Loading Spinner */
.spinner-border {
    animation: spin 1s linear infinite;
}

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

/* Badge Count */
.badge-count {
    position: absolute;
    top: 0px;
    right: -8px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Menu Open State */
body.mobile-menu-open {
    overflow: hidden;
}

body.mobile-menu-open #header-menu {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border-top: 1px solid #f0f0f0;
}

/* Impersonation Banner */
.bg-light.impersonation-banner {
    background: linear-gradient(90deg, #fff8e1 0%, #fff 100%);
    border-top: 1px solid #ffd54f;
    border-bottom: 1px solid #ffd54f;
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Floating Action Button for Mobile */
.mobile-fab {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: #007bff;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    z-index: 1000;
    transition: all 0.3s ease;
}

.mobile-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

/* ---------- Loading States ---------- */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: inherit;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ---------- Animations ---------- */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

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

/* ---------- Responsive Design ---------- */
@media (max-width: 768px) {
    .breadcrumbs {
        padding: 12px 16px !important;
    }
    
    .breadcrumbs .col:first-child {
        font-size: 18px;
    }
    
    .filters-actions-bar {
        padding: 12px 16px;
    }
    
    .bulk-action-container,
    #franchisee_id {
        min-width: 100%;
        margin-bottom: 12px;
    }
    
    .action-controls-container {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .action-buttons-container {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .table-list,
    .table,
    .modern-table {
        font-size: 14px;
    }
    
    .table-list th,
    .table-list td,
    .table th,
    .table td,
    .modern-table th,
    .modern-table td {
        padding: 12px 8px;
    }
    
    .search-modal .modal-dialog {
        margin: 16px;
    }
    
    .page-title {
        font-size: 24px;
    }
    
    .full-width-card {
        padding: 20px;
    }
}

/* MODAL */
.modal-rounded {
    border-radius: 20px;
    overflow: hidden;
}

.modal-content {
    border: none;
}

/* OPTIONS */
.upload-option {
    cursor: pointer;
    width: 100%;
}

.option-box {
    display: block;
    padding: 20px;
    border-radius: 14px;
    border: 2px dashed #e5e7eb;
    transition: 0.2s ease;
}

.upload-option input:checked + .option-box,
.upload-option:hover .option-box {
    border-color: #2563eb;
    background: #eff6ff;
}

.option-box strong {
    display: block;
    font-size: 15px;
}

.option-box small {
    display: block;
    color: #6b7280;
    margin: 4px 0;
}

.option-box .example {
    font-size: 12px;
    color: #2563eb;
    font-weight: 600;
}

/* FILE INPUT */
.form-control-file {
    max-width: 360px;
    margin: auto;
}

/* BUTTON */
.btn-confirm-upload {
    border-radius: 30px;
    font-weight: 600;
}


@media (max-width: 576px) {
    .page-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .btn-sm {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .d-flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .justify-content-between {
        justify-content: flex-start;
    }
    
    .text-end {
        text-align: left !important;
    }
}

