/* Special Access Links Page Styles */

/* Button hover effects */
button[style*="padding: 0.4rem 0.6rem"]:hover {
    background: #f3f4f6 !important;
    color: #374151 !important;
    border-color: #9ca3af !important;
}

button[style*="color: #dc2626"]:hover {
    background: #fee2e2 !important;
    color: #dc2626 !important;
    border-color: #fca5a5 !important;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.page-header h1 {
    font-size: 2rem;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-description {
    color: #6b7280;
    margin: 0;
    font-size: 0.95rem;
    max-width: 600px;
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    transition: box-shadow 0.2s;
}

.stat-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* Alert Messages */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
}

.alert i {
    font-size: 1.25rem;
}

.alert-success {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
}

.alert-error {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fca5a5;
}

.alert-warning {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fcd34d;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* Card Styles */
.card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9fafb;
}

.card-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: #1f2937;
}

.card-header-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.search-input {
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9rem;
    width: 300px;
    transition: all 0.2s ease;
    background: white;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: #fafbfc;
}

.search-input::placeholder {
    color: #9ca3af;
    font-style: italic;
}

/* Search input container */
.search-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
}

.search-container i {
    color: #6b7280;
    font-size: 0.9rem;
}

.search-clear-btn {
    background: none !important;
    border: none !important;
    color: #6b7280 !important;
    cursor: pointer !important;
    padding: 0.25rem !important;
    border-radius: 4px !important;
    transition: all 0.2s !important;
    display: none !important;
}

.search-clear-btn:hover {
    background: #f3f4f6 !important;
    color: #374151 !important;
}

.search-clear-btn:focus {
    outline: 2px solid #667eea !important;
    outline-offset: 2px !important;
}

/* Table Styles */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table thead {
    background: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
}

.data-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
}

.data-table tbody tr {
    transition: background-color 0.15s;
}

.data-table tbody tr:hover {
    background-color: #f9fafb;
}

/* Table Cell Styles */
.link-name-cell {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.link-name-cell strong {
    color: #1f2937;
}

.link-code {
    background: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.text-muted {
    color: #6b7280;
    font-size: 0.8rem;
}

.text-danger {
    color: #dc2626;
}

.d-block {
    display: block;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

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

.badge-secondary {
    background: #f3f4f6;
    color: #4b5563;
    font-size: 0.7rem;
}

.badge-warning {
    background: #fef3c7;
    color: #b45309;
}

.badge-success {
    background: #dcfce7;
    color: #15803d;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-active {
    background: #dcfce7;
    color: #15803d;
}

.status-inactive {
    background: #fee2e2;
    color: #dc2626;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.btn-icon {
    padding: 0.4rem 0.6rem;
    border: 1px solid #d1d5db;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.btn-icon:hover {
    background: #f3f4f6;
    color: #374151;
    border-color: #9ca3af;
}

.btn-icon.btn-danger:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fca5a5;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: white;
    color: #6b7280;
    border: 2px solid #e5e7eb;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
}

.btn-link {
    background: none;
    border: none;
    color: #3b82f6;
    padding: 0;
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: none;
}

.btn-link:hover {
    text-decoration: underline;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #6b7280;
}

.empty-state i {
    font-size: 4rem;
    color: #d1d5db;
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: #374151;
    margin: 1rem 0 0.5rem;
}

.empty-state p {
    margin-bottom: 1.5rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    padding: 0;
    overflow: hidden;
    backdrop-filter: blur(4px);
}

.modal.active {
    display: block;
    padding: 0;
}

.modal-dialog {
    width: 100%;
    height: 100vh;
    margin: 0;
    padding: 0;
    animation: modalSlideIn 0.3s ease-out;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.modal-dialog.modal-lg {
    max-width: 100vw !important;
    width: 100vw !important;
    max-height: 100vh !important;
    height: 100vh !important;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-30px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes modalSlideOut {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.9) translateY(-30px);
    }
}

/* Modal exit animation */
.modal.closing .modal-dialog {
    animation: modalSlideOut 0.2s ease-in;
}

.modal-content {
    background: white;
    border-radius: 0;
    box-shadow: none;
    max-height: 100vh;
    height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
    border: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* Force modal to be responsive and fit page better */
#linkModal .modal-dialog.modal-lg {
    max-width: 100vw !important;
    width: 100vw !important;
    min-width: 100vw !important;
    max-height: 100vh !important;
    height: 100vh !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    transform: none !important;
}

/* Override the conflicting admin.css modal-content */
#linkModal .modal-content {
    max-width: 100vw !important;
    width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    max-height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    transform: none !important;
}

/* Ensure modal body has proper padding and scrolling */
#linkModal .modal-body {
    padding: 2rem 2rem 4rem 2rem !important;
    flex: 1 !important;
    overflow-y: auto !important;
    min-height: 0 !important;
    max-height: calc(100vh - 7rem) !important;
    background: #fafbfc;
    position: relative !important;
}

/* Make product selection area scrollable */
#linkModal .product-selection-grid {
    max-height: 350px !important;
    overflow-y: auto !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    padding: 1.25rem !important;
    background: white !important;
    scrollbar-width: thin !important;
    scrollbar-color: #cbd5e1 #f1f5f9 !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

/* Custom scrollbar styling for webkit browsers */
#linkModal .product-selection-grid::-webkit-scrollbar {
    width: 8px !important;
}

#linkModal .product-selection-grid::-webkit-scrollbar-track {
    background: #f1f5f9 !important;
    border-radius: 4px !important;
}

#linkModal .product-selection-grid::-webkit-scrollbar-thumb {
    background: #cbd5e1 !important;
    border-radius: 4px !important;
}

#linkModal .product-selection-grid::-webkit-scrollbar-thumb:hover {
    background: #94a3b8 !important;
}

/* Ensure modal header stays at top */
#linkModal .modal-header {
    flex-shrink: 0 !important;
    border-bottom: 1px solid #2d333e !important;
    padding: 1rem 2rem !important;
    background: #2d333e !important;
    color: white !important;
    border-radius: 0 !important;
}

#linkModal .modal-header h2 {
    color: white !important;
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    margin: 0 !important;
}

#linkModal .modal-close {
    color: white !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 6px !important;
    transition: all 0.2s !important;
}

#linkModal .modal-close:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
}

/* Ensure modal footer stays at bottom */
#linkModal .modal-footer {
    flex-shrink: 0 !important;
    margin-top: auto !important;
    border-top: 1px solid #e5e7eb !important;
    padding: 1rem 2rem !important;
    background: white !important;
    position: sticky !important;
    bottom: 0 !important;
    z-index: 10 !important;
    border-radius: 0 !important;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1) !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 2rem !important;
    align-items: center !important;
}

/* Footer URL Section - Left Column */
.footer-url-section {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.url-section-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    max-width: 500px;
}

.url-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

.url-preview-minimal {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f8fafc;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    width: 100%;
}

.url-preview-minimal code {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.8rem;
    color: #374151;
    word-break: break-all;
    flex: 1;
    min-width: 0;
}

.url-preview-minimal code span {
    color: #667eea;
    font-weight: 600;
}

/* Footer Buttons - Right Column */
.footer-buttons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Ensure modal dialog takes full width */
#linkModal .modal-dialog {
    max-width: 100vw !important;
    width: 100vw !important;
    min-width: 100vw !important;
    margin: 0 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    transform: none !important;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #1f2937;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    background: #f9fafb;
}

/* Form Styles */
.form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 1.5rem;
}

/* Two-column layout for modal */
.modal-two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 2rem;
    padding: 0 0.5rem;
}

.modal-two-column .form-section {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.modal-two-column .form-section:not(:last-child) {
    border-bottom: none;
    padding-bottom: 1.5rem;
    margin-bottom: 0;
}

/* Full width sections */
.modal-full-width {
    grid-column: 1 / -1;
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    margin: 0 0.5rem 1rem 0.5rem;
}

/* Responsive modal */
@media (max-width: 1200px) {
    #linkModal .modal-dialog.modal-lg {
        width: 100vw !important;
        min-width: 100vw !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        transform: none !important;
    }
    
    #linkModal .product-selection-grid {
        max-height: 300px !important;
    }
    
    .modal-two-column {
        gap: 1.5rem;
    }
}

@media (max-width: 1024px) {
    #linkModal .modal-dialog.modal-lg {
        width: 100vw !important;
        min-width: 100vw !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        transform: none !important;
    }
    
    #linkModal .modal-body {
        padding: 1.5rem 1.5rem 3rem 1.5rem !important;
        max-height: calc(100vh - 5rem) !important;
    }
    
    #linkModal .product-selection-grid {
        max-height: 250px !important;
    }
    
    .modal-two-column {
        gap: 1rem;
    }
    
    .modal-two-column .form-section,
    .modal-full-width {
        padding: 1.25rem;
    }
}

@media (max-width: 768px) {
    .modal {
        padding: 0;
    }
    
    .modal.active {
        padding: 0;
    }
    
    #linkModal .modal-dialog.modal-lg {
        width: 100vw !important;
        min-width: 100vw !important;
        max-height: 100vh !important;
        height: 100vh !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        transform: none !important;
    }
    
    #linkModal .modal-content {
        max-height: 100vh !important;
        height: 100vh !important;
        border-radius: 0 !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        transform: none !important;
    }
    
    #linkModal .modal-header {
        padding: 0.75rem 1.5rem !important;
        border-radius: 0 !important;
    }
    
    #linkModal .modal-header h2 {
        font-size: 1.1rem !important;
    }
    
    #linkModal .modal-body {
        padding: 1rem 1rem 2.5rem 1rem !important;
        max-height: calc(100vh - 4rem) !important;
    }
    
    #linkModal .modal-footer {
        padding: 0.75rem 1.5rem !important;
        border-radius: 0 !important;
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .footer-url-section {
        justify-content: center;
    }
    
    .url-section-content {
        align-items: center;
        max-width: 100%;
    }
    
    .url-preview-minimal {
        width: 100%;
    }
    
    .footer-buttons {
        justify-content: center;
    }
    
    .modal-two-column {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0;
    }
    
    .modal-two-column .form-section,
    .modal-full-width {
        margin: 0;
        padding: 1rem;
    }
    
    #linkModal .product-selection-grid {
        max-height: 200px !important;
    }
}

.form-section h3 {
    font-size: 1.25rem;
    color: #1f2937;
    margin: 0 0 1.5rem 0;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
    letter-spacing: 0.025em;
}

.form-label.required::after {
    content: ' *';
    color: #dc2626;
    font-weight: 700;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    background: #fafbfc;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: white;
    transform: translateY(-1px);
}

.form-input:hover:not(:focus) {
    border-color: #cbd5e1;
    background: white;
}

.form-input:disabled {
    background: #f3f4f6;
    cursor: not-allowed;
    opacity: 0.6;
}

.form-input:invalid {
    border-color: #f87171;
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.1);
}

.form-input:valid {
    border-color: #10b981;
}

.form-help {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #6b7280;
    font-style: italic;
}

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

.input-group {
    display: flex;
    gap: 0.5rem;
}

.input-group .form-input {
    flex: 1;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.checkbox-group input[type="checkbox"] {
    margin-top: 0.25rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-group label {
    margin: 0;
    cursor: pointer;
    color: #374151;
}

/* Product Selection Grid */
.product-selection-grid {
    max-height: 400px;
    overflow-y: auto;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.25rem;
    background: white;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.product-category-group {
    margin-bottom: 1.5rem;
}

.product-category-group:last-child {
    margin-bottom: 0;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.category-header strong {
    flex: 1;
    color: #1e293b;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.025em;
}

.product-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
    cursor: pointer;
    min-height: 80px;
}

.product-checkbox:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.product-checkbox:has(input:checked) {
    background: #f0f9ff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.product-checkbox:has(input:checked) .product-price {
    background: #dbeafe;
    color: #1e40af;
    border-color: #93c5fd;
}

.product-checkbox input[type="checkbox"] {
    margin-top: 0.25rem;
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
}

.product-checkbox label {
    margin: 0;
    cursor: pointer;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.875rem;
    color: #374151;
}

.product-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

/* First Line - Product Name and Status */
.product-line-1 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.product-name {
    font-weight: 700;
    color: #1f2937;
    font-size: 1.1rem;
    line-height: 1.2;
    flex: 1;
}

.product-status-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Second Line - Code, Price, and Badges */
.product-line-2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.product-details {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
}

.product-code {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: #6b7280;
    background: #f3f4f6;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-weight: 500;
    border: 1px solid #e5e7eb;
}

.product-price {
    font-weight: 800;
    color: #059669;
    font-size: 1rem;
    background: #ecfdf5;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    border: 1px solid #d1fae5;
    min-width: 80px;
    text-align: center;
}

.product-badges {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.badge-success {
    background: #dcfce7;
    color: #15803d;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    border: 1px solid #bbf7d0;
}

/* URL Preview */
.url-preview {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.url-preview code {
    flex: 1;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.9rem;
    color: #1e293b;
    word-break: break-all;
    background: white;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

.url-preview code span {
    color: #667eea;
    font-weight: 700;
    background: #f0f9ff;
    padding: 0.125rem 0.25rem;
    border-radius: 3px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .data-table {
        font-size: 0.8rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.625rem;
    }
    
    .modal {
        padding: 1rem;
    }
    
    .modal-dialog {
        max-width: 100%;
    }
    
    .action-buttons {
        flex-direction: column;
    }
}

/* Loading State */
.loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    border: 3px solid #e5e7eb;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Button loading state */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Focus states for better accessibility */
.btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.form-input:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Smooth transitions for all interactive elements */
* {
    transition: all 0.2s ease;
}

/* Hover effects for better interactivity */
.product-checkbox:hover label {
    color: #1e293b;
}

.btn-link:hover {
    color: #4f46e5;
    text-decoration: underline;
}

/* View Details Modal - Make it wider */
#viewModal .modal-dialog {
    max-width: 1200px !important;
    width: 90% !important;
    margin: 2% auto !important;
}

#viewModal .modal-content {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    max-height: calc(100vh - 2rem) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

#viewModal .modal-body {
    padding: 2rem !important;
    flex: 1 !important;
    overflow-y: auto !important;
    min-height: 0 !important;
    max-height: calc(100vh - 8rem) !important;
}

#viewModal .modal-header {
    flex-shrink: 0 !important;
    border-bottom: 1px solid #e5e7eb !important;
    padding: 1.5rem 2rem !important;
    background: white !important;
}

#viewModal .modal-footer {
    flex-shrink: 0 !important;
    margin-top: auto !important;
    border-top: 1px solid #e5e7eb !important;
    padding: 1.5rem 2rem !important;
    background: #f9fafb !important;
    position: sticky !important;
    bottom: 0 !important;
    z-index: 10 !important;
}

/* View Details Styles */
.view-details {
    padding: 0;
}

.detail-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.detail-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.detail-section h3 {
    font-size: 1.1rem;
    color: #1f2937;
    margin: 0 0 1rem 0;
    font-weight: 600;
}

.detail-list {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 1rem;
    margin: 0;
}

.detail-list dt {
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
}

.detail-list dd {
    margin: 0;
    color: #6b7280;
    font-size: 0.875rem;
}

.url-copy-box {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    background: #f9fafb;
    padding: 0.5rem;
    border-radius: 4px;
}

.url-copy-box code {
    flex: 1;
    word-break: break-all;
}

.product-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.product-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
}

.product-item .product-name {
    flex: 1;
    font-size: 0.875rem;
    color: #374151;
}

/* Notification Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #1f2937;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 10000;
    animation: slideIn 0.3s ease;
}

.toast.success {
    background: #15803d;
}

.toast.error {
    background: #dc2626;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* View Modal Responsive Styles */
@media (max-width: 1200px) {
    #viewModal .modal-dialog {
        width: 95% !important;
        max-width: 1000px !important;
    }
    
    #viewModal .modal-body {
        padding: 1.5rem !important;
        max-height: calc(100vh - 7rem) !important;
    }
}

@media (max-width: 768px) {
    #viewModal .modal-dialog {
        width: 95% !important;
        max-width: 800px !important;
    }
    
    #viewModal .modal-body {
        padding: 1rem !important;
        max-height: calc(100vh - 6rem) !important;
    }
    
    .detail-list {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .detail-list dt {
        font-weight: 700;
        margin-bottom: 0.25rem;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

