/* Modern Affiliate Management UI - Inspired by Prodify Design */

:root {
    --primary-purple: #6366f1;
    --primary-purple-light: #8b5cf6;
    --secondary-blue: #3b82f6;
    --secondary-teal: #06b6d4;
    --success-green: #10b981;
    --warning-orange: #f59e0b;
    --danger-red: #ef4444;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --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);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: var(--gray-700);
    line-height: 1.6;
    overflow-x: hidden;
}

/* App Container */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--white);
    border-right: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 1000;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--gray-200);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-image {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-purple), var(--primary-purple-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 20px;
}

.user-info {
    flex: 1;
}

.user-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 4px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 20px;
    background: var(--success-green);
    color: var(--white);
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: currentColor;
    border-radius: 50%;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    margin: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.nav-link:hover {
    background: var(--gray-50);
    color: var(--gray-800);
}

.nav-link.active {
    background: var(--primary-purple);
    color: var(--white);
}

.nav-link i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

/* Sidebar Sections */
.sidebar-section {
    margin-top: auto;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-header h6 {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-add {
    width: 24px;
    height: 24px;
    border: none;
    background: var(--gray-200);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-add:hover {
    background: var(--primary-purple);
    color: var(--white);
}

.action-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.action-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-item:hover {
    background: var(--gray-50);
}

.action-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 14px;
}

.action-icon.purple {
    background: var(--primary-purple);
}

.action-icon.blue {
    background: var(--secondary-blue);
}

.action-icon.teal {
    background: var(--secondary-teal);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 24px 16px;
    border-top: 1px solid var(--gray-200);
}

.promo-card {
    background: linear-gradient(135deg, var(--primary-purple), var(--primary-purple-light));
    border-radius: var(--border-radius);
    padding: 20px;
    color: var(--white);
}

.promo-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 600;
}

.promo-card p {
    font-size: 14px;
    margin-bottom: 16px;
    opacity: 0.9;
}

.btn-upgrade {
    width: 100%;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius-sm);
    color: var(--white);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-upgrade:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Main Content */
.main-content {
    flex: 1;
	margin-left: 280px;
    padding: 32px;
    background: transparent;
}

/* Collapsed sidebar state for desktop */
@media (min-width: 769px) {
	body.sidebar-toggled .sidebar {
		width: 80px;
	}
	body.sidebar-toggled .main-content {
		margin-left: 80px;
	}
	/* Icons-only sidebar links when collapsed */
	body.sidebar-toggled .sidebar .navbar-brand .sidebar-brand-text {
		display: none;
	}
	body.sidebar-toggled .sidebar .navbar-nav .nav-link span {
		display: none;
	}
	body.sidebar-toggled .sidebar .navbar-nav .nav-link {
		justify-content: center;
		text-align: center;
		padding-left: 12px;
		padding-right: 12px;
	}
	body.sidebar-toggled .sidebar .navbar-nav .nav-link i {
		margin: 0;
		font-size: 18px;
		width: 24px;
		text-align: center;
	}
}

/* Content Header */
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
}

.header-left {
    flex: 1;
}

.date-display {
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 8px;
}

.greeting {
    font-size: 32px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 8px;
}

.subtitle {
    font-size: 16px;
    color: var(--gray-600);
    margin-bottom: 0;
}

.header-actions {
    display: flex;
    gap: 12px;
}

.btn-primary, .btn-secondary {
    padding: 12px 20px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary-purple);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-purple-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--white);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: start;
}

/* Full width cards */
.content-card.full-width {
    grid-column: 1 / -1;
}

/* Content Cards */
.content-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    overflow: hidden;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.card-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0;
}

.card-actions {
    display: flex;
    gap: 8px;
}

.btn-refresh {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--white);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--gray-300);
    position: relative;
    overflow: hidden;
}

.btn-refresh:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

.btn-refresh:hover {
    background: var(--gray-50);
    color: var(--primary-purple);
}

.btn-refresh:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: var(--gray-100);
}

.btn-refresh:disabled:hover {
    background: var(--gray-100);
    color: var(--gray-600);
}

.btn-refresh .fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.btn-toggle-overview {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--white);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--gray-300);
    margin-right: 8px;
}

.btn-toggle-overview:hover {
    background: var(--gray-50);
    color: var(--primary-purple);
}

.btn-toggle-overview.collapsed i {
    transform: rotate(180deg);
}

/* Collapsible overview card */
.affiliate-overview.collapsed .card-content {
    display: none;
}

/* Contacts Management Styles */
.contacts-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--gray-200);
}

.contacts-title h6 {
    margin: 0 0 5px 0;
    color: var(--gray-800);
    font-weight: 600;
}

.contacts-title p {
    margin: 0;
    font-size: 14px;
}

.contacts-actions {
    display: flex;
    gap: 10px;
}

.contacts-container {
    min-height: 200px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    align-items: start;
}

.no-contacts-message {
    color: var(--gray-500);
}

.no-contacts-message i {
    color: var(--gray-400);
}

.contact-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-sm);
    padding: 20px;
    position: relative;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    height: fit-content;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.contact-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--gray-300);
}

/* Clickable Contact Cards */
.clickable-contact-card {
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    position: relative;
}

.clickable-contact-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-purple);
}

.clickable-contact-card:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.contact-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    min-height: 80px;
}

.contact-info {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    flex: 1;
    min-height: 60px;
}

.contact-avatar {
    width: 48px;
    height: 48px;
    background: var(--gray-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
    font-size: 20px;
    flex-shrink: 0;
}

.contact-details {
    flex: 1;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.contact-name {
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 5px;
    font-size: 16px;
}

.contact-email {
    color: var(--gray-600);
    font-size: 14px;
    word-break: break-all;
}

.contact-phone {
    color: var(--gray-600);
    font-size: 14px;
    margin-top: 3px;
}

.contact-title {
    color: var(--gray-500);
    font-size: 13px;
    font-style: italic;
    margin-top: 3px;
}

.contact-cell {
    color: var(--gray-600);
    font-size: 14px;
    margin-top: 3px;
}

.affiliate-name {
    color: var(--gray-500);
    font-size: 12px;
    margin-top: 5px;
    font-weight: 500;
}

.contact-card-body {
    margin: 15px 0;
    padding: 15px 0;
    border-top: 1px solid var(--gray-100);
    border-bottom: 1px solid var(--gray-100);
}

.contact-notes {
    color: var(--gray-600);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 10px;
    font-style: italic;
}

.contact-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--gray-500);
    font-size: 12px;
}

.badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: var(--primary-purple);
    color: var(--white);
}

/* Contacts Loading Styles */
.contacts-loading {
    padding: 60px 40px;
    animation: fadeIn 0.4s ease-out;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.contacts-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(99, 102, 241, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.contacts-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
    animation: shimmer 2s infinite;
}

.contacts-loading .spinner-border {
    width: 3.5rem;
    height: 3.5rem;
    color: var(--primary-purple);
    border-width: 3px;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
    animation: spinner-border 0.75s linear infinite, pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

.contacts-loading p {
    margin-top: 20px;
    font-size: 16px;
    font-weight: 500;
    color: var(--gray-700);
    letter-spacing: 0.5px;
    animation: textGlow 2s ease-in-out infinite;
}

@keyframes textGlow {
    0%, 100% {
        color: var(--gray-700);
        text-shadow: none;
    }
    50% {
        color: var(--primary-purple);
        text-shadow: 0 0 8px rgba(99, 102, 241, 0.3);
    }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.contact-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.contact-remove {
    width: 24px;
    height: 24px;
    border: none;
    background: var(--danger-red);
    border-radius: 50%;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
}

.contact-remove:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.contact-remove:active {
    transform: scale(0.95);
}

.contact-card-footer {
    display: flex;
    justify-content: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--gray-100);
    margin-top: auto;
}

.btn-reset-password {
    background: var(--danger-red);
    color: var(--white);
    border: none;
    padding: 8px 16px;
    border-radius: var(--border-radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-reset-password:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.btn-reset-password:active {
    transform: translateY(0);
}

/* Contact Form Modal Styles */
.contact-form-modal .modal-dialog {
    max-width: 600px;
}

.contact-form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.contact-form-group {
    flex: 1;
}

.contact-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--gray-700);
    font-size: 14px;
}

.contact-form-group input,
.contact-form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.contact-form-group input:focus,
.contact-form-group select:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Responsive design for contact cards */
@media (max-width: 1200px) {
    .contacts-container {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .contacts-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .contacts-actions {
        justify-content: center;
    }
    
    .contacts-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .contact-card {
        padding: 15px;
    }
    
    .contact-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .contact-avatar {
        align-self: center;
    }
    
    .contact-actions {
        position: absolute;
        top: 15px;
        right: 15px;
    }
}

@media (max-width: 480px) {
    .contacts-container {
        gap: 12px;
    }
    
    .contact-card {
        padding: 12px;
    }
}

/* Animation for contact cards */
.contact-card {
    animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover effects for contact cards */
.contact-card:hover .contact-avatar {
    background: var(--primary-purple);
    color: var(--white);
    transform: scale(1.05);
    transition: all 0.2s ease;
}

.contact-card:hover .contact-name {
    color: var(--primary-purple);
    transition: color 0.2s ease;
}

.affiliate-overview.collapsed {
    min-height: auto;
    transition: all 0.3s ease;
}

.affiliate-overview {
    transition: all 0.3s ease;
}

.btn-view-all {
    background: var(--success-green);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-sm);
    margin-left: 12px;
}

.btn-view-all:hover {
    background: #28a745;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-view-all i {
    font-size: 14px;
}

.btn-export {
    background: var(--primary-purple);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-sm);
    margin-left: 8px;
}

.btn-export:hover {
    background: var(--primary-purple-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-export i {
    font-size: 14px;
}

/* Sidebar toggle button */
#sidebarToggle {
	width: 36px;
	height: 36px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--gray-300);
	background: var(--white);
	border-radius: 9999px;
	cursor: pointer;
	color: var(--gray-600);
	box-shadow: var(--shadow-sm);
}

#sidebarToggle:hover {
	background: var(--gray-50);
	color: var(--primary-purple);
	border-color: var(--gray-400);
}

.btn-reset-columns {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--white);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--gray-300);
    margin-left: 8px;
}

.btn-reset-columns:hover {
    background: var(--gray-50);
    color: var(--primary-purple);
}

.resize-hint {
    display: flex;
    align-items: center;
    color: var(--gray-500);
    font-size: 12px;
    margin-left: 8px;
    cursor: help;
}

.resize-hint i {
    font-size: 14px;
}

.resize-hint:hover {
    color: var(--primary-purple);
}

/* Card actions layout */
.card-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-container {
    flex: 1;
    max-width: 300px;
}

.card-content {
    padding: 24px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--gray-50);
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-200);
    transition: all 0.2s ease;
}

.stat-item.clickable {
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.stat-item.clickable:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-purple);
}

.stat-item.clickable.active {
    background: var(--primary-purple);
    color: white;
    border-color: var(--primary-purple);
}

.stat-item.clickable.active .stat-number,
.stat-item.clickable.active .stat-label {
    color: white;
}

.stat-item.clickable.active .stat-icon {
    background: rgba(255, 255, 255, 0.2);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 20px;
}

.stat-icon.purple {
    background: var(--primary-purple);
}

.stat-icon.green {
    background: var(--success-green);
}

.stat-icon.orange {
    background: var(--warning-orange);
}

.stat-icon.red {
    background: var(--danger-red);
}

.stat-info {
    flex: 1;
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: var(--gray-600);
    font-weight: 500;
}

/* Search Container */
.search-container {
    position: relative;
}

.search-input {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input i {
    position: absolute;
    left: 12px;
    color: var(--gray-400);
    z-index: 1;
}

.search-input input {
    width: 300px;
    padding: 10px 12px 10px 40px;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    background: var(--white);
    transition: all 0.2s ease;
}

.search-input input:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Table Styles */
.table-container {
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
    transition: max-height 0.3s ease, min-height 0.3s ease;
}

/* When showing all affiliates, expand the table */
.affiliate-list.expanded .table-container {
    max-height: calc(100vh - 300px);
    min-height: 600px;
}

.affiliate-list.expanded {
    grid-row: span 2;
    min-height: 80vh;
    transition: all 0.3s ease;
}



.affiliate-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.affiliate-table thead th {
    background: var(--gray-50);
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-200);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    user-select: none;
    min-width: 80px; /* Ensure minimum width for resize handles */
    /* Ensure proper header alignment */
    box-sizing: border-box;
    vertical-align: middle;
}

/* Resize handle */
.resize-handle {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: transparent;
    cursor: col-resize;
    transition: background-color 0.2s ease;
}

.resize-handle:hover,
.resize-handle.active {
    background: var(--primary-purple);
}

/* Make handles more visible on hover */
.affiliate-table thead th:hover .resize-handle {
    background: var(--gray-300);
}

/* Add a subtle indicator for resize handles */
.resize-handle::after {
    content: '';
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 16px;
    background: var(--gray-400);
    border-radius: 1px;
    opacity: 0.3;
}

.resize-handle:hover::after {
    opacity: 1;
    background: var(--primary-purple);
}

/* Show resize indicator when hovering over header edge */
.affiliate-table thead th:hover .resize-handle::after {
    opacity: 0.6;
}

/* Table resizing */
.affiliate-table {
    table-layout: fixed;
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    position: relative;
}

/* Ensure proper column alignment */
.affiliate-table tbody td {
    position: relative;
    vertical-align: middle;
    padding: 16px 12px;
    border-bottom: 1px solid var(--gray-100);
    /* Ensure proper table cell layout */
    box-sizing: border-box;
    word-wrap: break-word;
}

.affiliate-table th,
.affiliate-table td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    /* Ensure proper table cell behavior */
    display: table-cell;
    vertical-align: middle;
}

/* Default column widths */
.affiliate-table th[data-column="affiliate-id"] { width: 8%; }
.affiliate-table th[data-column="affiliate-name"] { width: 25%; }
.affiliate-table th[data-column="status"] { width: 12%; }
.affiliate-table th[data-column="website"] { width: 30%; }
.affiliate-table th[data-column="created"] { width: 10%; }
.affiliate-table th[data-column="actions"] { width: 15%; }

/* Make affiliate ID bold */
.affiliate-id {
    font-weight: 700;
    color: var(--gray-800);
}

.affiliate-table tbody tr {
    border-bottom: 1px solid var(--gray-100);
    transition: all 0.2s ease;
}

.affiliate-table tbody tr:hover {
    background: var(--gray-50);
}



/* Clickable Row Styles */
.clickable-row {
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    position: relative;
    /* Ensure proper table layout */
    display: table-row;
}



.clickable-row:hover {
    background-color: var(--gray-50);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.clickable-row:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}



/* Ensure action buttons and links don't inherit row hover effects */
.clickable-row .action-buttons,
.clickable-row .website-link {
    position: relative;
    z-index: 2;
}

.clickable-row .action-buttons button,
.clickable-row .website-link {
    cursor: pointer;
}

/* Row selection indicator */
.clickable-row.selected {
    background-color: rgba(99, 102, 241, 0.1);
}



/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-green);
}

.status-badge.inactive {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-red);
}

.status-badge.pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-orange);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-view, .btn-edit {
    padding: 6px 12px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-view {
    background: var(--primary-purple);
    color: var(--white);
}

.btn-view:hover {
    background: var(--primary-purple-light);
}

.btn-edit {
    background: var(--white);
    color: var(--gray-600);
    border: 1px solid var(--gray-300);
}

.btn-edit:hover {
    background: var(--gray-50);
    color: var(--gray-800);
}

/* Modal Styles */
.modal-content {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    padding: 24px;
}

.modal-title {
    color: var(--gray-800);
    font-weight: 600;
    display: flex;
    align-items: center;
}

.modal-body {
    padding: 24px;
}

/* Tab Styles */
.nav-tabs {
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 24px;
}

.nav-tabs .nav-link {
    border: none;
    background: transparent;
    color: var(--gray-600);
    padding: 12px 16px;
    font-weight: 500;
    border-radius: 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.nav-tabs .nav-link:hover {
    background: transparent;
    color: var(--gray-800);
}

.nav-tabs .nav-link.active {
    background: transparent;
    color: var(--primary-purple);
    border-bottom-color: var(--primary-purple);
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.form-control, .form-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    background: var(--white);
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-control[readonly] {
    background: var(--gray-50);
    color: var(--gray-600);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner-container {
    text-align: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-200);
    border-top: 4px solid var(--primary-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
    }
    
    .main-content {
        margin-left: 240px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 20px;
    }
    
    .content-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .header-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .content-card.full-width {
        grid-column: 1 / -1;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 16px;
    }
    
    .search-input input {
        width: 100%;
    }
    
    .card-actions {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .btn-view-all {
        margin-left: 0;
        justify-content: center;
    }
    
    .affiliate-table {
        font-size: 12px;
    }
    
    .affiliate-table th,
    .affiliate-table td {
        padding: 12px 8px;
    }
    
    .affiliate-list.expanded {
        min-height: 60vh;
    }
}

/* Utility Classes */
.d-none {
    display: none !important;
}

.d-flex {
    display: flex !important;
}

.align-items-center {
    align-items: center !important;
}

.justify-content-center {
    justify-content: center !important;
}

.text-center {
    text-align: center !important;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Contact Detail Modal Styles */
.contact-detail-modal .modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-detail-modal .footer-left {
    display: flex;
    gap: 10px;
}

.contact-detail-modal .footer-right {
    display: flex;
    gap: 10px;
}

.contact-detail-modal .form-check {
    margin-top: 10px;
}

.contact-detail-modal .form-check-input {
    margin-right: 8px;
}

.contact-detail-modal .form-check-label {
    font-size: 14px;
    color: var(--gray-700);
}

.contact-detail-modal .modal-dialog {
    max-width: 600px;
}

.contact-detail-modal .form-control:read-only {
    background-color: var(--gray-50);
    color: var(--gray-600);
}

/* Add Affiliate Modal Styles */
.add-affiliate-modal .form-section {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--gray-50);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--gray-200);
}

.add-affiliate-modal .section-title {
    color: var(--gray-800);
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-purple);
    font-size: 16px;
}

.add-affiliate-modal .form-group {
    margin-bottom: 20px;
}

.add-affiliate-modal .form-label {
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 8px;
    font-size: 14px;
}

.add-affiliate-modal .form-control,
.add-affiliate-modal .form-select {
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    padding: 10px 12px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.add-affiliate-modal .form-control:focus,
.add-affiliate-modal .form-select:focus {
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
}

.add-affiliate-modal .form-control::placeholder {
    color: var(--gray-400);
}

.add-affiliate-modal .modal-dialog {
    max-width: 1000px;
}

.add-affiliate-modal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

.add-affiliate-modal .row {
    margin-left: -10px;
    margin-right: -10px;
}

.add-affiliate-modal .col-md-6 {
    padding-left: 10px;
    padding-right: 10px;
}

.add-affiliate-modal select[multiple] {
    min-height: 100px;
}

.add-affiliate-modal .form-text {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 4px;
}

/* Address Validation Styles */
.add-affiliate-modal .form-control.is-invalid,
.add-affiliate-modal .form-select.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.add-affiliate-modal .invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 12px;
    color: #dc3545;
}

.add-affiliate-modal .form-group {
    position: relative;
}

/* Required field styling */
.add-affiliate-modal label[for*="required"]::after,
.add-affiliate-modal label:contains("*")::after {
    content: " *";
    color: #dc3545;
    font-weight: bold;
}

.add-affiliate-modal .form-select:required:invalid {
    color: var(--gray-400);
}

.add-affiliate-modal .form-select:required:valid {
    color: var(--gray-800);
} 

/* Contact Information Section Styling */
.form-section .alert-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border: 1px solid #93c5fd;
    color: #1e40af;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    line-height: 1.5;
}

.form-section .alert-info i {
    color: #3b82f6;
}

.form-section .section-title small {
    font-size: 12px;
    font-weight: 400;
    opacity: 0.8;
}

/* Contact fields styling */
.form-section .form-group label[for*="contact-"] {
    color: var(--gray-600);
    font-weight: 500;
}

.form-section .form-group input[id*="contact-"],
.form-section .form-group select[id*="contact-"] {
    border: 1px solid var(--gray-200);
    transition: all 0.2s ease;
}

.form-section .form-group input[id*="contact-"]:focus,
.form-section .form-group select[id*="contact-"]:focus {
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Contact section header styling */
.form-section .section-title i.fa-user {
    color: var(--primary-purple);
}

/* Responsive adjustments for contact section */
@media (max-width: 768px) {
    .form-section .row .col-md-6 {
        margin-bottom: 15px;
    }
    
    .form-section .alert-info {
        margin-top: 15px;
        font-size: 13px;
    }
} 

/* ========================================================================
   Offer Detail Modal — Landing Pages & Contracts tabs
   ======================================================================== */
.offer-detail-modal .om-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.offer-detail-modal .om-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.offer-detail-modal .om-search {
    position: relative;
    flex: 1 1 280px;
    min-width: 220px;
    max-width: 480px;
}

.offer-detail-modal .om-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    font-size: 13px;
}

.offer-detail-modal .om-search input {
    width: 100%;
    height: 38px;
    padding: 0 14px 0 36px;
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius-sm, 8px);
    background: #fff;
    font-size: 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.offer-detail-modal .om-search input:focus {
    outline: none;
    border-color: var(--primary-purple, #6366f1);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.offer-detail-modal .om-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.offer-detail-modal .om-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #475569;
    user-select: none;
    margin: 0;
    cursor: pointer;
}

.offer-detail-modal .om-checkbox input[type="checkbox"] {
    accent-color: var(--primary-purple, #6366f1);
    cursor: pointer;
}

.offer-detail-modal .om-btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    border-radius: var(--border-radius-sm, 8px);
    cursor: pointer;
    transition: all 0.15s ease;
}

.offer-detail-modal .om-btn-ghost:hover {
    color: var(--primary-purple, #6366f1);
    border-color: var(--primary-purple, #6366f1);
    background: #f5f5ff;
}

.offer-detail-modal .om-table-wrap {
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius-sm, 8px);
    overflow: hidden;
    background: #fff;
}

.offer-detail-modal .om-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
}

.offer-detail-modal .om-table thead th {
    background: #f8fafc;
    color: #64748b;
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.offer-detail-modal .om-table tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    color: #1e293b;
}

.offer-detail-modal .om-table tbody tr:last-child td {
    border-bottom: none;
}

.offer-detail-modal .om-table tbody tr.om-row {
    transition: background-color 0.12s ease;
}

.offer-detail-modal .om-table tbody tr.om-row:hover {
    background-color: #f8fafc;
}

.offer-detail-modal .om-table tbody tr.om-row-default {
    background-color: #fefce8;
}

.offer-detail-modal .om-table tbody tr.om-row-default:hover {
    background-color: #fef9c3;
}

/* Column-specific widths */
.offer-detail-modal .om-col-flag { width: 36px; text-align: center; }
.offer-detail-modal .om-col-id { width: 70px; color: #475569; font-variant-numeric: tabular-nums; }
.offer-detail-modal .om-col-money { width: 110px; text-align: right; }
.offer-detail-modal .om-col-flags { width: 200px; }
.offer-detail-modal .om-col-type,
.offer-detail-modal .om-col-format { width: 110px; }
.offer-detail-modal .om-col-category,
.offer-detail-modal .om-col-targeting { width: 140px; }
.offer-detail-modal .om-col-contract { width: 90px; }
.offer-detail-modal .om-col-url { max-width: 320px; }

.offer-detail-modal .om-name-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.offer-detail-modal .om-name {
    font-weight: 500;
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.offer-detail-modal .om-subtle {
    color: #94a3b8;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.offer-detail-modal .om-money {
    font-variant-numeric: tabular-nums;
    font-weight: 500;
    color: #0f172a;
}

.offer-detail-modal .om-url {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-purple, #6366f1);
    text-decoration: none;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.offer-detail-modal .om-url:hover {
    text-decoration: underline;
}

.offer-detail-modal .om-url-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    direction: ltr;
}

.offer-detail-modal .om-url-icon {
    font-size: 10px;
    opacity: 0.6;
    flex-shrink: 0;
}

/* Chips / pills */
.offer-detail-modal .om-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
}

.offer-detail-modal .om-chip-muted {
    background: #f1f5f9;
    color: #475569;
}

.offer-detail-modal .om-chip-link {
    background: #ecfeff;
    color: #0e7490;
    font-variant-numeric: tabular-nums;
}

.offer-detail-modal .om-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    margin-right: 4px;
}

.offer-detail-modal .om-pill-default {
    background: linear-gradient(135deg, #fde68a, #fcd34d);
    color: #78350f;
}

.offer-detail-modal .om-pill-hidden {
    background: #fee2e2;
    color: #991b1b;
}

/* Tab count badges */
.offer-detail-modal .om-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 18px;
    padding: 0 6px;
    margin-left: 6px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #475569;
    font-size: 11px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.offer-detail-modal .nav-link.active .om-tab-count {
    background: var(--primary-purple, #6366f1);
    color: #fff;
}

/* Skeleton rows */
.offer-detail-modal .om-row-skel td {
    padding: 12px 14px;
}

.offer-detail-modal .om-skel {
    height: 14px;
    border-radius: 4px;
    background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 50%, #f1f5f9 100%);
    background-size: 200% 100%;
    animation: om-shimmer 1.4s ease-in-out infinite;
}

@keyframes om-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Empty state */
.offer-detail-modal .om-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 36px 16px;
    color: #94a3b8;
    text-align: center;
}

.offer-detail-modal .om-empty i {
    font-size: 24px;
    color: #cbd5e1;
}

.offer-detail-modal .om-empty-error i { color: #f59e0b; }
.offer-detail-modal .om-empty-error { color: #b45309; }

.offer-detail-modal .om-empty-row td {
    padding: 0;
}

/* Footer meta */
.offer-detail-modal .om-footer-meta {
    color: #94a3b8;
    font-size: 12px;
    padding: 0 2px;
}

@media (max-width: 768px) {
    .offer-detail-modal .om-col-category,
    .offer-detail-modal .om-col-targeting,
    .offer-detail-modal .om-col-contract { display: none; }

    .offer-detail-modal .om-toolbar { flex-direction: column; align-items: stretch; }
    .offer-detail-modal .om-toolbar-actions { justify-content: space-between; }
}

/* Clickable rows */
.offer-detail-modal .om-row-clickable {
    cursor: pointer;
}

.offer-detail-modal .om-row-clickable:focus-visible {
    outline: 2px solid var(--primary-purple, #6366f1);
    outline-offset: -2px;
}

/* Stacked detail edit modal */
.om-detail-modal .modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: var(--shadow-md, 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1));
}

.om-detail-modal .modal-header {
    border-bottom: 1px solid #f1f5f9;
    padding: 16px 20px;
}

.om-detail-modal .modal-title {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
}

.om-detail-modal .modal-body {
    padding: 20px;
}

.om-detail-modal .modal-footer {
    border-top: 1px solid #f1f5f9;
    padding: 14px 20px;
}

.om-warn-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    margin-bottom: 18px;
    border-radius: var(--border-radius-sm, 8px);
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    font-size: 13px;
    line-height: 1.4;
}

.om-warn-banner i {
    margin-top: 2px;
    color: #b45309;
}

.om-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.om-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.om-form-row:has(.om-toggle) {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    align-items: center;
}

.om-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.om-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin: 0;
}

.om-input {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius-sm, 8px);
    background: #fff;
    font-size: 14px;
    color: #0f172a;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

select.om-input,
.om-input[type="number"],
.om-input[type="url"],
.om-input[type="text"] {
    font-variant-numeric: tabular-nums;
}

.om-input:focus {
    outline: none;
    border-color: var(--primary-purple, #6366f1);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.om-input[readonly] {
    background: #f8fafc;
    color: #64748b;
    cursor: not-allowed;
}

.om-form-hint-link {
    align-self: flex-start;
    font-size: 12px;
    color: var(--primary-purple, #6366f1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.om-form-hint-link:hover {
    text-decoration: underline;
}

.om-input-group {
    display: flex;
    align-items: stretch;
}

.om-input-group .om-input {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    flex: 1;
}

.om-input-suffix {
    width: 60px;
    border: 1px solid #e2e8f0;
    border-left: none;
    border-top-right-radius: var(--border-radius-sm, 8px);
    border-bottom-right-radius: var(--border-radius-sm, 8px);
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
    text-align: center;
    padding: 0 8px;
    cursor: pointer;
}

.om-input-suffix:focus {
    outline: none;
    border-color: var(--primary-purple, #6366f1);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.om-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--border-radius-sm, 8px);
    border: 1px solid #e2e8f0;
    background: #fff;
    cursor: pointer;
    user-select: none;
    font-size: 13px;
    color: #334155;
    transition: all 0.15s ease;
    margin: 0;
}

.om-toggle:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.om-toggle input[type="checkbox"] {
    accent-color: var(--primary-purple, #6366f1);
    cursor: pointer;
    margin: 0;
}

.om-toggle:has(input[type="checkbox"]:checked) {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #4338ca;
    font-weight: 500;
}

.om-form-feedback {
    padding: 10px 14px;
    border-radius: var(--border-radius-sm, 8px);
    font-size: 13px;
}

.om-form-feedback-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.om-form-feedback-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

@media (max-width: 560px) {
    .om-form-row { grid-template-columns: 1fr; }
}

