/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f8fafc;
    color: #334155;
    line-height: 1.6;
}

/* Lock scrolling only when overlays are open */
body.no-scroll {
    overflow: hidden;
}

/* App Layout */
.app-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    height: 100vh;
    /* Use dynamic viewport height when supported to avoid iOS 100vh issues */
    height: 100dvh;
}

/* Sidebar */
.sidebar {
    background: white;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid #e2e8f0;
}

.logo-image {
    height: 60px;
    width: auto;
    margin-bottom: 4px;
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
    color: #4f46e5;
    margin-bottom: 4px;
}

.logo p {
    font-size: 14px;
    color: #64748b;
    font-weight: 400;
}

.nav-menu {
    flex: 1;
    padding: 24px 0;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    margin: 0 12px;
    border-radius: 8px;
}

.nav-link:hover {
    background: #f1f5f9;
    color: #334155;
}

.nav-link.active {
    background: #4f46e5;
    color: white;
}

.nav-icon {
    margin-right: 12px;
    width: 16px;
    height: 16px;
}

.sidebar-footer {
    padding: 24px;
    border-top: 1px solid #e2e8f0;
}

.user-profile {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #4f46e5;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    margin-right: 12px;
}

.user-info {
    flex: 1;
}

.user-name {
    display: block;
    font-weight: 600;
    color: #334155;
    font-size: 14px;
}

.user-email {
    display: block;
    font-size: 12px;
    color: #64748b;
}

.logout-btn {
    width: 100%;
    padding: 8px 12px;
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #64748b;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logout-btn:hover {
    background: #f1f5f9;
    color: #334155;
}

.logout-btn i {
    width: 14px;
    height: 14px;
}

/* Main Content */
.main-content {
    padding: 32px;
    overflow-y: auto;
    background: #f8fafc;
    -webkit-overflow-scrolling: touch; /* Smooth, reliable scrolling on iOS */
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
}

.header-content h1 {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.header-content p {
    color: #64748b;
    font-size: 16px;
}

.header-actions {
    display: flex;
    gap: 12px;
}

.date-filters {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Custom Dropdown Styles */
.custom-dropdown {
    position: relative;
    min-width: 140px;
}

/* Specific widths for different dropdowns */
.date-filters .custom-dropdown {
    min-width: 140px;
}

.filters .custom-dropdown {
    min-width: 160px;
}

.dropdown-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    color: #374151;
    font-weight: 500;
}

.dropdown-trigger:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.dropdown-trigger.active {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.dropdown-value {
    flex: 1;
    text-align: left;
}

.dropdown-icon {
    width: 16px;
    height: 16px;
    color: #64748b;
    transition: transform 0.2s ease;
    margin-left: 8px;
}

.dropdown-trigger.active .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    margin-top: 4px;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    padding: 10px 14px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 14px;
    color: #374151;
    border-bottom: 1px solid #f1f5f9;
}

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

.dropdown-item:hover {
    background: #f8fafc;
    color: #1e293b;
}

.dropdown-item.selected {
    background: #4f46e5;
    color: white;
}

.dropdown-item.selected:hover {
    background: #4338ca;
}

/* Custom scrollbar for dropdown */
.dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.dropdown-menu::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.dropdown-menu::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Legacy filter-select for other dropdowns */
.filter-select {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    color: #374151;
    min-width: 120px;
}

.filter-select:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}



/* Buttons */
.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: #4f46e5;
    color: white;
}

.btn-primary:hover {
    background: #4338ca;
    transform: translateY(-1px);
}

.btn-secondary {
    background: white;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #f8fafc;
    color: #334155;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Team Stats */
.team-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.team-stat-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon i {
    width: 20px;
    height: 20px;
}

.stat-icon.blue {
    background: #dbeafe;
    color: #3b82f6;
}

.stat-icon.green {
    background: #dcfce7;
    color: #22c55e;
}

.stat-icon.yellow {
    background: #fef3c7;
    color: #f59e0b;
}

.stat-icon.purple {
    background: #f3e8ff;
    color: #8b5cf6;
}

.stat-content h3 {
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-card .stat-icon i {
    width: 20px;
    height: 20px;
}

/* Dashboard Stat Icon Colors - using same classes as team management */
.stat-icon.purple {
    background: #f3e8ff;
    color: #8b5cf6;
}

.stat-card .stat-content h3 {
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.stat-card .stat-number {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.chart-container,
.team-performance {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.chart-container h3,
.team-performance h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

/* Modern Status Chart */
.status-chart-modern {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 16px 0;
}

.status-overview {
    flex-shrink: 0;
}

.total-leads-circle {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.circle-progress {
    position: relative;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-background {
    fill: none;
    stroke: #f1f5f9;
    stroke-width: 8;
}

.progress-ring-new {
    fill: none;
    stroke: #f59e0b;
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 314;
    stroke-dashoffset: 314;
    transition: stroke-dashoffset 0.8s ease;
}

.progress-ring-assigned {
    fill: none;
    stroke: #22c55e;
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 314;
    stroke-dashoffset: 314;
    transition: stroke-dashoffset 0.8s ease;
}

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

.total-number {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
}

.total-label {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

.status-legend {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.legend-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.legend-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.unassigned-indicator {
    background: #f59e0b;
}

.assigned-indicator {
    background: #22c55e;
}

.legend-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.legend-label {
    font-weight: 600;
    color: #1e293b;
    font-size: 16px;
    line-height: 1.2;
}

.legend-percentage {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

.legend-count {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
}

/* Team Performance */
.team-member-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #ecf0f1;
}

.team-member-item:last-child {
    border-bottom: none;
}

.member-name {
    font-weight: 500;
    color: #2c3e50;
}

.member-leads {
    background: #3498db;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.clickable-leads {
    cursor: pointer;
    transition: all 0.2s ease;
}

.clickable-leads:hover {
    background-color: #2980b9 !important;
    transform: scale(1.05);
}

/* Filters */
.filters {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
    flex-wrap: wrap;
    align-items: center;
}

/* Date Range Filter */
.date-range-filter {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.date-range-filter:focus-within {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.date-input-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.date-input-group label {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    white-space: nowrap;
}

.date-input {
    padding: 6px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    color: #374151;
    min-width: 140px;
    transition: all 0.2s ease;
}

.date-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
}

.btn-clear-dates {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-clear-dates:hover {
    background: #f1f5f9;
    color: #334155;
}

.btn-clear-dates i {
    width: 16px;
    height: 16px;
}

.search-input {
    flex: 1;
    min-width: 280px;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: white;
}

.search-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.search-input::placeholder {
    color: #94a3b8;
}

/* Legacy filter-select for other sections */
.filter-select {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    color: #374151;
    min-width: 120px;
}

.filter-select:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Table */
.table-container {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.leads-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
    /* Increased minimum width to accommodate new Assigned Date column */
}

.leads-table th {
    background: #2c3e50;
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.leads-table td {
    padding: 15px;
    border-bottom: 1px solid #ecf0f1;
}

.leads-table tbody tr:hover {
    background: #f8f9fa;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-unassigned {
    background: #fff3cd;
    color: #856404;
}

.status-assigned {
    background: #d4edda;
    color: #155724;
}

/* Team Members Grid */
.team-members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.team-member-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.team-member-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.member-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.member-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.member-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #4f46e5;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
}

.member-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.member-details h4 {
    color: #1e293b;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.role-badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-badge.agent {
    background: #dbeafe;
    color: #1e40af;
}

.role-badge.team-leader {
    background: #fef3c7;
    color: #92400e;
}

.member-contact {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #64748b;
    font-size: 14px;
}

.member-actions {
    position: relative;
}

.member-menu-dropdown {
    position: relative;
}

.member-menu-btn {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.member-menu-btn:hover {
    background: #f1f5f9;
    color: #334155;
}

.member-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    margin-top: 4px;
}

.member-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 14px;
    color: #374151;
    border-bottom: 1px solid #f1f5f9;
}

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

.menu-item:hover {
    background: #f8fafc;
    color: #1e293b;
}

.menu-item.delete {
    color: #dc2626;
}

.menu-item.delete:hover {
    background: #fef2f2;
    color: #b91c1c;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 8px;
}

.member-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.status-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toggle-switch {
    position: relative;
    width: 48px;
    height: 24px;
    background: #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.toggle-switch.active {
    background: #4f46e5;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.toggle-switch.active::after {
    transform: translateX(24px);
}

.status-label {
    font-weight: 600;
    color: #1e293b;
}

.status-label.active {
    color: #22c55e;
}

.status-label.inactive {
    color: #64748b;
}

.leads-assigned {
    text-align: right;
}

.leads-count {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
}

.leads-label {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.member-joined {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #64748b;
    font-size: 14px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

.member-last-lead {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #64748b;
    font-size: 14px;
    margin-top: 8px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close {
    position: absolute;
    right: 15px;
    top: 15px;
    background: none;
    border: none;
    cursor: pointer;
    color: #64748b;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.close:hover {
    background: #f1f5f9;
    color: #334155;
}

.close i {
    width: 20px;
    height: 20px;
}

.modal-content h3 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-content input,
.modal-content select {
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.modal-content input:focus,
.modal-content select:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.form-group textarea {
    resize: vertical;
    min-height: 60px;
    max-height: 100px;
}

.btn-modal {
    justify-content: center;
    align-items: center;
    padding: 14px 24px;
    font-weight: 600;
}

.btn-modal span {
    margin-left: 2px;
}

/* Modal dropdown specific styling */
.modal-content .custom-dropdown {
    width: 100%;
}

.modal-content .dropdown-trigger {
    width: 100%;
    justify-content: space-between;
}

.modal-content .dropdown-menu {
    width: 100%;
    left: 0;
    right: 0;
}

/* Phone Input with Fixed Prefix */
.phone-input-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s ease;
    background: white;
}

.phone-input-wrapper:focus-within {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.phone-prefix {
    padding: 12px 8px 12px 16px;
    background-color: #f8fafc;
    border-right: 1px solid #e2e8f0;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    user-select: none;
    white-space: nowrap;
}

.phone-input-wrapper input[type="tel"] {
    flex: 1;
    padding: 12px 16px 12px 8px;
    border: none;
    outline: none;
    font-size: 14px;
    background: transparent;
}

.phone-input-wrapper input[type="tel"]::placeholder {
    color: #9ca3af;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: white;
    border-top: 1px solid #f1f5f9;
}

.pagination-info {
    color: #64748b;
    font-size: 14px;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #64748b;
}

.pagination-btn:hover:not(:disabled) {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn i {
    width: 16px;
    height: 16px;
}

.page-numbers {
    display: flex;
    gap: 4px;
    margin: 0 8px;
}

.page-number {
    min-width: 36px;
    height: 36px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    padding: 0 8px;
}

.page-number:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
}

.page-number.active {
    background: #4f46e5;
    border-color: #4f46e5;
    color: white;
}

.page-number.ellipsis {
    border: none;
    background: none;
    cursor: default;
    color: #94a3b8;
}

.page-number.ellipsis:hover {
    background: none;
    border: none;
    color: #94a3b8;
}

/* Settings Section */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.settings-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.settings-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    border-bottom: 1px solid #f1f5f9;
}

.settings-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.settings-icon.whatsapp {
    background: #dcfce7;
    color: #16a34a;
}



.settings-icon i {
    width: 20px;
    height: 20px;
}

.settings-title {
    flex: 1;
}

.settings-title h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.settings-title p {
    font-size: 14px;
    color: #64748b;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.connection-status.connected {
    background: #dcfce7;
    color: #166534;
}

.connection-status.disconnected {
    background: #fef2f2;
    color: #991b1b;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.connection-status.connected .status-indicator {
    background: #22c55e;
}

.connection-status.disconnected .status-indicator {
    background: #ef4444;
}

.settings-card-content {
    padding: 24px;
}

.integration-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #374151;
}

.info-item i {
    width: 16px;
    height: 16px;
    color: #22c55e;
}

.connection-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.form-input {
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.input-with-copy {
    display: flex;
    gap: 8px;
}

.input-with-copy .form-input {
    flex: 1;
}

.copy-btn {
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.copy-btn i {
    width: 16px;
    height: 16px;
    color: #64748b;
}

.form-help {
    font-size: 12px;
    color: #64748b;
}

.settings-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}



/* Enhanced Confirmation Dialog */
.enhanced-confirm-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    animation: fadeIn 0.2s ease-out;
}

.enhanced-confirm-dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    min-width: 400px;
    max-width: 500px;
    animation: slideIn 0.3s ease-out;
}

.enhanced-confirm-icon {
    display: flex;
    justify-content: center;
    padding: 24px 24px 16px 24px;
}

.enhanced-confirm-icon i {
    width: 48px;
    height: 48px;
    color: #f59e0b;
    background: #fffbeb;
    border-radius: 50%;
    padding: 12px;
}

.enhanced-confirm-content {
    padding: 0 24px 24px 24px;
    text-align: center;
}

.enhanced-confirm-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.enhanced-confirm-content p {
    font-size: 16px;
    color: #6b7280;
    line-height: 1.5;
}

.enhanced-confirm-buttons {
    display: flex;
    gap: 12px;
    padding: 20px 24px 24px 24px;
    background: #f9fafb;
    border-top: 1px solid #f3f4f6;
    border-radius: 0 0 16px 16px;
}

.enhanced-confirm-btn {
    flex: 1;
    padding: 12px 24px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.enhanced-confirm-cancel {
    background: white;
    color: #374151;
}

.enhanced-confirm-cancel:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.enhanced-confirm-ok {
    background: #dc2626;
    color: white;
    border-color: #dc2626;
}

.enhanced-confirm-ok:hover {
    background: #b91c1c;
    border-color: #b91c1c;
    transform: translateY(-1px);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Responsive Design */

/* Mobile Header */
.mobile-header {
    display: none;
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 16px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.mobile-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-logo-image {
    height: 40px;
    width: auto;
}

.mobile-menu-toggle {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.mobile-menu-toggle:hover {
    background-color: #f1f5f9;
}

.hamburger-icon {
    width: 24px;
    height: 24px;
    color: #334155;
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.mobile-nav-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 280px;
    height: 100%;
    background: white;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.mobile-nav-overlay.active .mobile-nav-content {
    transform: translateX(0);
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.mobile-nav-logo-image {
    height: 40px;
    width: auto;
}

.mobile-nav-close {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.mobile-nav-close:hover {
    background-color: #f1f5f9;
}

.close-icon {
    width: 20px;
    height: 20px;
    color: #334155;
}

.mobile-nav-menu {
    flex: 1;
    padding: 20px 0;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    margin: 0 12px;
    border-radius: 8px;
}

.mobile-nav-link:hover {
    background: #f1f5f9;
    color: #334155;
}

.mobile-nav-link.active {
    background: #4f46e5;
    color: white;
}

.mobile-nav-icon {
    margin-right: 12px;
    width: 16px;
    height: 16px;
}

.mobile-nav-footer {
    padding: 20px;
    border-top: 1px solid #e2e8f0;
}

.mobile-user-profile {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.mobile-user-avatar {
    width: 40px;
    height: 40px;
    background: #4f46e5;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    margin-right: 12px;
}

.mobile-user-info {
    display: flex;
    flex-direction: column;
}

.mobile-user-name {
    font-weight: 600;
    color: #334155;
    font-size: 14px;
}

.mobile-user-email {
    font-size: 12px;
    color: #64748b;
}

.mobile-logout-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 10px 16px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    gap: 8px;
}

.mobile-logout-btn:hover {
    background: #dc2626;
}

@media (max-width: 1024px) {
    .app-container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }

    .mobile-header {
        display: block;
    }

    .mobile-nav-overlay {
        display: block;
    }

    .main-content {
        padding: 0;
    }

    .content-section {
        padding: 24px;
    }

    .team-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .team-members-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .content-section {
        padding: 16px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .team-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

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

    .status-chart-modern {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }

    .filters {
        flex-direction: column;
        align-items: stretch;
    }

    .search-input {
        min-width: auto;
    }

    .date-range-filter {
        flex-wrap: wrap;
        gap: 8px;
        padding: 12px;
    }

    .date-input-group {
        flex: 1;
        min-width: 120px;
    }

    .date-input {
        min-width: 100px;
    }

    /* Mobile table responsive handling */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 8px;
    }

    .leads-table {
        font-size: 14px;
        min-width: 800px;
        /* Maintain minimum width for readability with new column */
    }

    .leads-table th,
    .leads-table td {
        padding: 10px 8px;
        white-space: nowrap;
        /* Prevent text wrapping in cells */
    }

    /* Add scrollbar styling for mobile */
    .table-container::-webkit-scrollbar {
        height: 6px;
    }

    .table-container::-webkit-scrollbar-track {
        background: #f1f5f9;
        border-radius: 3px;
    }

    .table-container::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 3px;
    }

    .table-container::-webkit-scrollbar-thumb:hover {
        background: #94a3b8;
    }
    
    /* Tablet pagination adjustments */
    .pagination-container {
        padding: 16px;
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .pagination-controls {
        gap: 6px;
    }
    
    .page-numbers {
        margin: 0 6px;
        gap: 3px;
    }
    
    .pagination-btn,
    .page-number {
        width: 34px;
        height: 34px;
        min-width: 34px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-card {
        flex-direction: column;
        text-align: center;
        gap: 8px;
        padding: 16px;
    }

    .stat-card .stat-icon {
        width: 40px;
        height: 40px;
    }

    .stat-card .stat-icon i {
        width: 16px;
        height: 16px;
    }

    .stat-card .stat-number {
        font-size: 24px;
    }

    .stat-card .stat-content h3 {
        font-size: 12px;
    }

    .team-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .team-stat-card {
        flex-direction: column;
        text-align: center;
        gap: 8px;
        padding: 16px;
    }

    .team-stat-card .stat-icon {
        width: 40px;
        height: 40px;
    }

    .team-stat-card .stat-icon i {
        width: 16px;
        height: 16px;
    }

    .team-stat-card .stat-number {
        font-size: 24px;
    }

    .team-stat-card .stat-content h3 {
        font-size: 12px;
    }

    .btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .enhanced-confirm-dialog {
        min-width: 320px;
        max-width: 90vw;
        margin: 0 20px;
    }

    .enhanced-confirm-buttons {
        flex-direction: column;
    }

    .enhanced-confirm-btn {
        width: 100%;
    }

    /* Extra small screen table adjustments */
    .leads-table {
        font-size: 12px;
        min-width: 650px;
        /* Slightly smaller but still scrollable */
    }

    .leads-table th,
    .leads-table td {
        padding: 8px 6px;
    }

    /* Make table header sticky on mobile for better UX */
    .leads-table thead th {
        position: sticky;
        top: 0;
        z-index: 10;
        background: #2c3e50;
    }
    
    /* Mobile pagination adjustments */
    .pagination-container {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
        text-align: center;
    }
    
    .pagination-info {
        font-size: 12px;
        order: 2;
    }
    
    .pagination-controls {
        order: 1;
        gap: 2px;
        flex-wrap: nowrap;
        justify-content: center;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0 4px;
    }
    
    .page-numbers {
        margin: 0 2px;
        gap: 1px;
        flex-wrap: nowrap;
        justify-content: center;
        flex-shrink: 0;
    }
    
    .pagination-btn,
    .page-number {
        width: 28px;
        height: 28px;
        min-width: 28px;
        font-size: 11px;
        padding: 0;
        flex-shrink: 0;
    }
    
    .pagination-btn i {
        width: 12px;
        height: 12px;
    }
    
    /* Hide some page numbers on very small screens to fit everything */
    .page-number.ellipsis {
        display: none;
    }
    
    /* Limit visible page numbers on mobile */
    .page-numbers .page-number:nth-child(n+6) {
        display: none;
    }
}

/* Marketing Materials Section */
/* Marketing filters */
.marketing-filters {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
    flex-wrap: wrap;
    align-items: center;
}

.marketing-filters .search-input {
    flex: 1;
    min-width: 280px;
}

.marketing-filters .custom-dropdown {
    min-width: 140px;
}

.marketing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.file-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    position: relative;
}

.file-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.file-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.file-icon.image {
    background: #dbeafe;
    color: #3b82f6;
}

.file-icon.video {
    background: #fce7f3;
    color: #ec4899;
}

.file-icon.document {
    background: #dcfce7;
    color: #22c55e;
}

.file-icon.other {
    background: #f3e8ff;
    color: #8b5cf6;
}

.file-icon i {
    width: 24px;
    height: 24px;
}

.item-name {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
    font-size: 14px;
    word-break: break-word;
}

.item-description,
.item-info {
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
}

.item-menu {
    position: absolute;
    top: 12px;
    right: 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.file-item:hover .item-menu {
    opacity: 1;
}

.item-menu-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 4px;
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s ease;
}

.item-menu-btn:hover {
    background: white;
    color: #334155;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.item-menu-btn i {
    width: 16px;
    height: 16px;
}

/* File thumbnail for images */
.file-thumbnail {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: #f8fafc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-icon i {
    width: 40px;
    height: 40px;
    color: #94a3b8;
}

.empty-state h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.empty-state p {
    color: #64748b;
    margin-bottom: 24px;
}

.empty-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* Upload Modal Styles */
.upload-modal {
    max-width: 500px;
    width: 90%;
    margin: 5vh auto;
    padding: 20px;
}

.upload-area {
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    background: #f8fafc;
    transition: all 0.3s ease;
    cursor: pointer;
    margin: 10px 0;
}

.upload-area.dragover {
    border-color: #4f46e5;
    background: #f8fafc;
}

.upload-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    background: #f8fafc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-icon i {
    width: 30px;
    height: 30px;
    color: #64748b;
}

.upload-area h4 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.upload-area p {
    color: #64748b;
    margin-bottom: 20px;
}

.file-list {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px;
    margin: 10px 0;
    background: #f8fafc;
}

.file-list h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 16px;
}

.selected-files {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.selected-file {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 8px;
}

.selected-file-icon {
    width: 32px;
    height: 32px;
    background: #e2e8f0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.selected-file-icon i {
    width: 16px;
    height: 16px;
    color: #64748b;
}

.selected-file-info {
    flex: 1;
}

.selected-file-name {
    font-weight: 500;
    color: #1e293b;
    font-size: 14px;
    margin-bottom: 2px;
}

.selected-file-size {
    font-size: 12px;
    color: #64748b;
}

.remove-file-btn {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.remove-file-btn:hover {
    background: #fef2f2;
}

.remove-file-btn i {
    width: 16px;
    height: 16px;
}

.upload-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

/* Preview Modal */
.preview-modal {
    max-width: 90vw;
    max-height: 90vh;
    width: 800px;
    overflow: hidden;
    margin: 5vh auto;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
    position: relative;
}

.preview-header h3 {
    margin: 0;
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

.preview-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.close-preview {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    margin-left: 8px;
}

.close-preview:hover {
    background: #f1f5f9;
    color: #334155;
}

.close-preview i {
    width: 20px;
    height: 20px;
}

.preview-content {
    max-height: 70vh;
    overflow: auto;
    text-align: center;
}

.preview-image {
    max-width: 100%;
    max-height: 65vh;
    border-radius: 8px;
    object-fit: contain;
}

/* Separate class for marketing materials preview with white background */
.marketing-preview-image {
    max-width: 100%;
    max-height: 65vh;
    border-radius: 8px;
    object-fit: contain;
    background: white;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.preview-video {
    max-width: 100%;
    max-height: 60vh;
    border-radius: 8px;
}

.preview-document {
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
    text-align: left;
}

.document-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: #e2e8f0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.document-icon i {
    width: 40px;
    height: 40px;
    color: #64748b;
}

.document-info h4 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.document-info p {
    color: #64748b;
    margin-bottom: 4px;
}

/* Form textarea */
.modal-content textarea {
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.2s ease;
}

.modal-content textarea:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Responsive adjustments for marketing grid */
@media (max-width: 768px) {
    .marketing-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 16px;
    }
    
    .file-item {
        padding: 16px;
    }
    
    .empty-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .preview-modal {
        max-width: 95vw;
        width: 95vw;
        margin: 2vh auto;
        max-height: 95vh;
    }
    
    .preview-content {
        max-height: 75vh;
    }
    
    .upload-modal {
        max-width: 95vw;
        margin: 2vh auto;
        padding: 15px;
    }
    

    
    .header-actions {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }
    
    .preview-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .preview-header h3 {
        width: 100%;
    }
    
    .preview-header-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .close-preview {
        margin-left: 0;
        order: 3;
    }
}

/* WhatsApp QR Code Modal Styles */
.qr-modal {
    max-width: 400px;
    width: 85%;
    margin: 3vh auto;
    padding: 16px;
}

.qr-modal-header {
    text-align: center;
    margin-bottom: 20px;
}

.qr-icon {
    width: 64px;
    height: 64px;
    background: #dcfce7;
    color: #16a34a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.qr-icon i {
    width: 28px;
    height: 28px;
}

.qr-modal-header h3 {
    font-size: 24px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.qr-modal-header p {
    color: #64748b;
    font-size: 14px;
}

.qr-code-container {
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    margin-bottom: 20px;
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

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

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

.qr-loading p {
    color: #64748b;
    font-size: 14px;
    margin: 0;
}

.qr-code-display img {
    max-width: 60%;
    height: auto;
    border-radius: 8px;
}

.qr-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: #dc2626;
}

.qr-error i {
    width: 32px;
    height: 32px;
}

.qr-error p {
    margin: 0;
    font-size: 14px;
}

.qr-instructions {
    margin-bottom: 20px;
}

.instruction-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.step-number {
    width: 24px;
    height: 24px;
    background: #3b82f6;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.step-text {
    font-size: 14px;
    color: #475569;
    line-height: 1.5;
}

.qr-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.qr-modal-actions .btn {
    min-width: 120px;
}

/* Mobile responsive for QR modal */
@media (max-width: 768px) {
    .qr-modal {
        max-width: 95vw;
        margin: 2vh auto;
    }
    
    .qr-code-container {
        padding: 20px;
        min-height: 240px;
    }
    
    .qr-modal-actions {
        flex-direction: column;
    }
    
    .qr-modal-actions .btn {
        width: 100%;
    }
}

/* Settings Tabs */
.settings-tabs {
    margin-top: 24px;
}

.tab-nav {
    display: flex;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 32px;
    gap: 8px;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: none;
    border: none;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    position: relative;
}

.tab-btn:hover {
    color: #4f46e5;
    background: #f8fafc;
}

.tab-btn.active {
    color: #4f46e5;
    border-bottom-color: #4f46e5;
    background: #f8fafc;
}

.tab-btn i {
    width: 16px;
    height: 16px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Personalization Settings */
.settings-icon.personalization {
    background: #fef3c7;
    color: #d97706;
}

.background-settings-layout {
    display: flex;
    gap: 2rem;
    margin-top: 1.5rem;
    justify-content: space-between;
}

.settings-left {
    flex: 0 0 auto;
    max-width: 300px;
}

.settings-right {
    flex: 0 0 auto;
    max-width: 400px;
    margin-left: auto;
}

.background-preview {
    margin-bottom: 24px;
}

.preview-container {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16/9;
    max-width: 400px;
    position: relative;
}

.preview-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.default-gradient {
    color: white;
    font-size: 14px;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.upload-section {
    space-y: 24px;
}

.upload-info {
    background: #f8fafc;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.upload-info p {
    margin: 4px 0;
    font-size: 14px;
    color: #64748b;
}

.upload-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.upload-progress {
    background: #f8fafc;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

/* Mobile responsive for settings tabs */
@media (max-width: 768px) {
    .tab-nav {
        flex-direction: row;
        gap: 8px;
        justify-content: center;
        flex-wrap: nowrap;
    }
    
    .tab-btn {
        border-bottom: 2px solid transparent;
        border-radius: 8px;
        flex: 1;
        min-width: 0;
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .tab-btn.active {
        border-bottom-color: #4f46e5;
        background: #f8fafc;
    }
    
    .background-settings-layout {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .settings-left,
    .settings-right {
        max-width: none;
    }
    
    .upload-actions {
        flex-direction: column;
    }
    
    .preview-container {
        max-width: 100%;
    }
}