/* Sync Store Button */


.sync-store-btn.admin-feature {
    background-color: #6f42c1; /* Purple color for admin features */
    color: white;
    border: 2px solid #563d7c;
    position: relative;
    margin-right: 5px;
    padding-left: 30px; /* Space for the shield icon */
}

.sync-store-btn.admin-feature:hover {
    background-color: #563d7c;
    box-shadow: 0 0 5px rgba(111, 66, 193, 0.3);
}

.sync-store-btn.admin-feature i {
    margin-right: 5px;
    font-size: 14px;
}

.sync-store-btn.disabled {
    background-color: #6c757d;
    opacity: 0.65;
    cursor: not-allowed;
}

/* Add a subtle pulsing effect for admin buttons */
@keyframes adminPulse {
    0% { box-shadow: 0 0 0 0 rgba(111, 66, 193, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(111, 66, 193, 0); }
    100% { box-shadow: 0 0 0 0 rgba(111, 66, 193, 0); }
}

.sync-store-btn.admin-feature:not(:hover) {
    animation: adminPulse 2s infinite;
}


    .sidebar-admin {
        margin: 2px 0;
        padding: 4px 8px;
        position: relative;
        border-left: 3px solid #ffd700; /* Gold left border for admin items */
    }

    .sidebar-admin strong {
        color: #ffd700;  /* Golden color for admin title */
        display: flex;
        align-items: center;
        gap: 5px;
    }

    .sidebar-admin strong i {
        font-size: 14px;
    }

    .sidebar-admin a {
        color: white !important;
        transition: all 0.3s ease;
        padding: 5px 8px;
        border-radius: 3px;
        display: flex;
        align-items: center;
        gap: 5px;
    }

    .sidebar-admin a:hover {
        background-color: rgba(255, 215, 0, 0.2); /* Subtle gold highlight on hover */
    }
    
/* copy button click event */
.copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 5px;
    font-size: 0.8rem;
    color: #555;
}
.copy-btn:hover {
    color: #000;
}
.copy-tooltip {
    position: fixed;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 1500;
    animation: fadeIn 0.3s;
}
.copy-tooltip.fade-out {
    animation: fadeOut 0.5s;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.ai-icon {
    margin-left: 5px;
    font-size: 1.2em;
    color: #007BFF;
    cursor: pointer;
}
.ai-icon.active {
    color: #28a745;
}
.ai-icon.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Loading Indicator Base */
.loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    color: white;
    font-size: 1.2em;
}

/* Spinner Animation */
.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Bounce Animation */
.bounce {
    display: flex;
    gap: 5px;
}

.bounce div {
    width: 15px;
    height: 15px;
    background-color: white;
    border-radius: 50%;
    animation: bounce 1.5s infinite ease-in-out;
}

.bounce div:nth-child(2) {
    animation-delay: 0.3s;
}

.bounce div:nth-child(3) {
    animation-delay: 0.6s;
}

/* Rotating Square Animation */
.rotating-square {
    width: 40px;
    height: 40px;
    background-color: white;
    animation: rotate-square 1.5s linear infinite;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

@keyframes rotate-square {
    0% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(180deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* End of spin animation */


.bulk-actions-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.listing-stats {
    display: flex;
    gap: 15px;
    font-weight: bold;
    font-size: 14px;
    color: #333;
}

.table-container {
    max-height: 60vh; /* Set the desired maximum height */
    overflow-y: auto; /* Enable vertical scrolling */
    border: 1px solid #ccc; /* Optional: Add a border to the container */
}

.styled-table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    font-size: 0.9em;
    font-family: Arial, sans-serif;
    border: 1px solid #ddd;
}

.styled-table thead tr {
    background-color: #009879;
    color: #ffffff;
    text-align: left;
}

.styled-table th, .styled-table td {
    padding: 12px 15px;
}

.styled-table tbody tr {
    border-bottom: 1px solid #ddd;
}

.styled-table tbody tr:nth-of-type(even) {
    background-color: #f3f3f3;
}

/* Enhanced Separator Line for Pairs */
.pair-separator {
    height: 4px; /* Thicker line for better visibility */
    background-color: #000; /* Solid black color */
    margin: 0;
    border-bottom: 2px solid #000; /* Extra bold border */
    opacity: 1;
}

/* Remove extra padding/margin for tighter layout */
.pair-row {
    margin: 0;
    padding: 0;
}

.pair-separator-row {
    padding: 0;
    margin: 0;
}

/* Table Cell Padding Adjustments */
.styled-table th, .styled-table td {
    padding: 8px 10px; /* Reduce padding to minimize overall row height */
}


.styled-message {
    background-color: #f9f9f9; /* Light gray background */
    border-left: 4px solid #1a73e8; /* Blue border for distinction */
    padding: 10px;
    margin-bottom: 20px;
}

:root {
    --header-height: 96px; /* Adjust this single value to fine-tune */
}

/* Main Header Styling */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background-color: #252961; /* Dark blue background */
    color: #ffffff; /* White text color */
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Adds a shadow for better visibility */
    border-bottom: 2px solid #1a1d4f;  /* Optional: adds a subtle bottom border */
    z-index: 200; /* Above sidebar */
    box-sizing: border-box;
}

.main-header-title {
    font-size: 1.8em;
    font-weight: 700;
    color: #ffffff;  /* Ensure the title text is white */
    margin: 0;
}

/* Main Navigation Styling */
.main-nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px; /* Space between menu items */
}

.main-nav ul li {
    margin: 0;
}

.main-nav ul li a {
    color: #ffffff; /* White text color */
    text-decoration: none;
    font-weight: bold;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.main-nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.1); /* Light hover effect */
}

/* Active Link Styling (Optional) */
.main-nav ul li a.active {
    background-color: rgba(255, 255, 255, 0.2); /* Highlight active link */
}

.logout-link {
    color: #007bff; /* Blue text (or any color you prefer) */
    text-decoration: none; /* Remove underline */
    font-size: 0.9em; /* Slightly smaller font size */
    margin-top: 4px; /* Add some spacing above the link */
    display: inline-block; /* Ensure it behaves like a block element */
}
.logout-link:hover {
    text-decoration: underline; /* Underline on hover */
}

/* Buttons */
.btn {
    padding: 10px 15px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    font-size: 0.9em;
}

.btn-add {
    background-color: #28a745;
    color: white;
}

.btn-edit {
    background-color: #007bff;
    color: white;
}

.btn:hover {
    opacity: 0.9;
}

.btn-refresh {
    background-color: #117a8b;
}

.btn-refresh:hover {
    background-color: #0056b3;
}

/* Forgot Password Button */
.btn-forgot-password {
    background-color: #17a2b8; /* Teal color for forgot password */
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s;
    width: 100%;
    box-sizing: border-box;
}

.btn-forgot-password:hover {
    background-color: #117a8b; /* Darker teal on hover */
}

/* static/style.css */
.success {
    color: green;
    font-weight: bold;
}

.warning {
    color: orange;
    font-weight: bold;
}

.error {
    color: red;
    font-weight: bold;
}
/* Error indicator styling */
.error-indicator {
    color: red; /* Default error color; later you can adjust this based on data-error-level */
    cursor: pointer;
    position: relative;
    display: inline-block;
    margin-left: 8px; /* spacing between status text and error icon */
}

/* Tooltip styling (hidden by default) */
.error-tooltip {
    display: none;
    position: absolute;
    top: 120%; /* Positions the tooltip below the icon */
    left: 50%;
    transform: translateX(-50%);
    background-color: #f8d7da; /* Light red background */
    color: #721c24; /* Dark red text */
    padding: 8px;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    white-space: normal;
    z-index: 10;
    width: 220px;  /* Adjust as needed */
    box-shadow: 0px 2px 8px rgba(0,0,0,0.15);
}

/* Show the tooltip on hover */
.error-indicator:hover .error-tooltip {
    display: block;
}

/* Optional: different styling for different error levels */
.error-indicator[data-error-level="warning"] {
    color: orange;
}

.error-indicator[data-error-level="info"] {
    color: blue;
}

.details-section {
    background-color: #f9f9f9;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 10px;
}

/* Basic Styling */
html {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f9;
    height: 100%;
}

/* Container to hold everything */
.container {
    display: flex;
    flex-direction: column;
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    min-height: 100vh;
}

/* Header styling - spans across the top */
header {
    background-color:  #252961;
    color: #fff;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

/* Main layout styling for sidebar and content */
.main-layout {
    display: flex;
    flex: 1;
    width: 100%;
    max-width: 100%;
    min-height: 0; /* Important for flexbox children */
}

/* Sidebar styling */
.sidebar {
    width: 200px;
    background-color: #252961;
    color: white;
    padding-top: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 62px);
    position: fixed;
    left: 0;
    top: 62px;    
    overflow-y: auto;
    align-items: center;
    font-size: 14px; /* Control the default font size of the sidebar */
    z-index: 100;
}

/* Sidebar navigation - takes available space and allows scrolling */
.sidebar nav {
    flex: 1;
    overflow-y: auto;
    width: 100%;
}

/* Sidebar navigation */
.sidebar nav ul {
    list-style-type: none;
    padding: 0 5px;
    margin: 0;
    width: 100%; /* Makes menu items take full width of sidebar */
}

.sidebar nav ul li {
    margin: 4px 0; /* Slightly reduce margin for compact look */
    text-align: left;
}

.sidebar nav ul li a {
    display: block;
    color: #ffffff;
    text-decoration: none;
    padding: 8px 12px; /* Reduce padding for smaller links */
    border-radius: 4px;
    transition: background-color 0.3s;
    font-size: 13px; /* Slightly smaller font size for links */
}

.sidebar nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}



/* Sidebar Style Block */
.sidebar-style-block {
    width: 100%; /* Full width */
    background-color: #252961; /* Same as sidebar background */
    padding: 20px 0; /* Add padding for spacing */
    text-align: center; /* Center-align content */
    margin-top: 0; /* Ensure no extra margin pushes it down */
}

/* Sidebar Content */
.sidebar-content {
    max-width: 1200px; /* Optional: Limit width for better readability */
    margin: 0 auto; /* Center the content horizontally */
    display: flex;
    flex-direction: column;
    align-items: center; /* Center-align items vertically */
    gap: 10px; /* Space between version text and logo */
}

/* Version Text */
.version {
    font-size: 0.85em;
    font-weight: 600;
    text-align: center;
    margin-bottom: 15px;
    /* Dynamic color based on background */
    color: var(--version-text-color, #333);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: color 0.3s ease;
}

/* Light background version (default) */
.light-bg .version,
.login-container .version {
    --version-text-color: #333; /* Dark text on light background */
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Dark background version */
.dark-bg .version,
.sidebar .version,
.main-header .version {
    --version-text-color: #ffffff; /* White text on dark background */
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Navy blue background specific styling */
.navy-bg .version {
    --version-text-color: #ecf0f1;
    background: linear-gradient(45deg, #00bcd4, #0099cc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

/* Auto-detect based on parent background using CSS filters */
@supports (color: color-contrast(white vs black)) {
    .version {
        color: color-contrast(var(--bg-color, white) vs white, black);
    }
}

/* Main content styling */
main {
    flex: 1; /* Takes the remaining space */
    width: 100%; /* Ensure full width when sidebar is hidden */
    padding: 20px;
    overflow-y: auto;
    margin-top: var(--header-height); /* May need this if layout shifts */
    margin-left: 200px; /* Match sidebar width to prevent overlap */
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black background */
}

.modal-content {
    position: relative;
    background-color: white;
    margin: 5% auto; /* Add margin auto for horizontal centering */
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px; /* Add max-width for consistency */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#store-checkboxes {
    margin: 10px 0;
}

#store-checkboxes label {
    display: block;
    margin: 5px 0;
}

#apply-filter-button {
    margin-top: 10px;
    padding: 8px 15px;
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#apply-filter-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.close {
    font-size: 18px;
    cursor: pointer;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Full-width textarea */
#product-urls {
    width: 100%;
    box-sizing: border-box;
}

/* Full-width dropdown */
#store-name {
    width: 100%;
    box-sizing: border-box;
}

/* Button styling for right alignment */
.btn-import {
    background-color: #007BFF;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-import:hover {
    background-color: #0056b3;
}

/* Refresh Button Styling */
.refresh-container {
    margin-top: 20px;
}

#refresh-message {
    margin-left: 10px;
    color: #28a745; /* Success message color */
    font-weight: bold;
}

/* General Button Styling */
button {
    padding: 10px 15px;
    font-size: 1em;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Primary Button (default style for all buttons) */
button {
    background-color: #007bff; /* Blue */
}

button:hover {
    background-color: #0056b3;
}

/* Optional: Different styles for specific types of actions */
.btn-filter {
    background-color:  #117a8b;
}

.btn-filter:hover {
    background-color: #218838;
}

.header-buttons button {
    margin-left: 10px; /* Adds space between buttons */
}

/* Tooltip container */
.tooltip {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

/* Tooltip text */
.tooltip .tooltip-text {
    visibility: hidden;
    background-color: #555;
    color: #fff;
    text-align: left;
    padding: 8px;
    border-radius: 4px;
    
    /* Set dynamic width with max-width */
    max-width: 50vw; /* Up to 50% of the viewport width */
    white-space: normal; /* Allows wrapping */
    
    /* Position relative to the viewport for free expansion */
    position: fixed;
    z-index: 1;
    
    /* Adjust positioning so it appears near the hovered element */
    top: 20px; /* Adjust as needed to place tooltip above */
    left: 50%; /* Center horizontally across the viewport */
    transform: translateX(-50%);

    /* Fade-in effect */
    opacity: 0;
    transition: opacity 0.3s;
}

/* Show the tooltip text when hovering over the tooltip container */
.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Flash Container Styling */
.flash-container {
    width: 100%;  /* Take the full width of the screen */
    max-width: 100%;
    padding-left: 5px; /* Optional: Add padding for indentation */
}

/* Full-width Flash Messages */
.full-width {
    width: 100%;
    max-width: 100%;
}

/* Default styling for tab links */
.tab {
    padding: 12px 20px;
    cursor: pointer;
    background: #f4f4f4; /* Light gray background */
    border: 1px solid #ccc;
    border-bottom: none;
    margin-right: 5px;
    color: #333; /* Dark text to be visible */
    font-weight: bold;
    border-radius: 5px 5px 0 0; /* Rounded top corners */
    transition: background 0.3s, color 0.3s;
}

.tab:hover {
    background: #e0e0e0; /* Slightly darker on hover */
}

.tab.active {
    background: white !important; /* Active tab gets white background */
    font-weight: bold;
    border-bottom: 2px solid #009879; /* Green bottom border for active tab */
}



.cross-store-table-container {
    max-width: 100%;
    padding: 20px;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background-color: #f8f8f8;
}

.comparison-table th {
    background-color: #333;
    color: #fff;
    padding: 10px;
    text-align: left;
}

.comparison-table td {
    padding: 10px;
    border: 1px solid #ddd;
    vertical-align: top;
}

/* Constrain image size in table cells */
.small-image {
    max-width: 60px;
    max-height: 60px;
    object-fit: cover; /* Ensures the image maintains aspect ratio */
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.missing-image-icon {
    font-size: 40px; /* Match .small-image size */
    color: red; /* Red color for visibility */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 40px; /* Match .small-image height */
    width: 40px; /* Match .small-image width */
    border: 1px solid #ddd; /* Optional border for consistency */
    border-radius: 4px; /* Match .small-image style */
}

/* Image hover enlargement (shared) */
.image-container {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    position: relative;
    max-height: 60px;
}
.hover-image {
    display: none;
    position: absolute;
    top: 0;
    left: 100%;
    margin-left: 10px;
    border: 1px solid #ddd;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 10;
    background: #fff;
    padding: 5px;
}
.hover-image img {
    width: 150px;
    height: auto;
    max-width: 200px;
}
.image-container:hover .hover-image {
    display: block;
}

/* Store Name Styling */
.store-name {
    display: inline-block;
    margin-left: 10px;
    font-weight: bold;
    color: #007bff;
}

.diff {
    color: red;
    font-weight: bold;
}

.same {
    background-color: yellow;
    color: red;
    font-weight: bold;
}

/* Button with spinner */
.btn-import-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-import-loading::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: import-spin 0.6s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes import-spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Suppliers Overview Section */
.suppliers-overview {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
}

.suppliers-table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.suppliers-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 0.95rem;
}

.suppliers-table thead {
    background: #252961;
    color: white;
}

.suppliers-table th {
    padding: 1rem 1.5rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #1e1f4b;
}

.suppliers-table th i {
    margin-right: 0.5rem;
    opacity: 0.8;
}

.suppliers-table tbody tr {
    transition: background-color 0.2s ease;
}

.suppliers-table tbody tr:nth-child(even) {
    background-color: #f8fafc;
}

.suppliers-table tbody tr:hover {
    background-color: #e0e7ff;
}

.suppliers-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
}

.suppliers-table td:first-child {
    font-weight: 500;
    color: #252961;
}

.suppliers-table td:last-child {
    text-align: right;
    font-weight: 600;
    color: #059669;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .suppliers-table th,
    .suppliers-table td {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

/* Empty state */
.suppliers-table tbody tr:only-child td {
    text-align: center;
    padding: 2rem;
    color: #9ca3af;
    font-style: italic;
}

/* Store Cards Section - Modified for Vertical Layout */
.store-cards-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
    width: 100%;
}

.store-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.store-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.store-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 15px 20px 10px 20px; /* Reduced bottom padding */
    border-bottom: 1px solid #e5e7eb;
}

.store-card-icon {
    background: linear-gradient(135deg, #252961, #3b4096);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    box-shadow: 0 4px 8px rgba(37, 41, 97, 0.3);
}

.store-card-icon i {
    font-size: 1.8rem;
}

.store-card-title h3 {
    margin: 0 0 5px 0;
    font-size: 1.2em;
    color: #1f2937;
}

.store-card-title p {
    color: #6b7280;
    margin: 0.25rem 0 0 0;
    font-size: 0.9rem;
}

.store-card-stats {
    padding: 15px 20px 20px 20px; /* Reduced top padding */
}

.stats-row {
    margin-bottom: 15px; /* Reduced margin */
}

.suppliers-section h4 {
    margin: 10px 0 8px 0; /* Reduced margins */
    font-size: 1em;
}

/* Remove the old bottom actions since we moved them to header */
.store-card-actions {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .store-card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .store-card-actions-header {
        margin-left: 0;
        margin-top: 10px;
        flex-direction: row;
        justify-content: flex-start;
    }
    
    .btn-compact {
        min-width: auto;
        flex: 0 0 auto;
    }
}


/* Sidebar Footer Styling */
.sidebar-footer {
    margin-top: auto;
    padding: 20px 0;
    text-align: center;
}

.version-info {
    font-size: 0.85em;
    color: #ffffff;
    margin-bottom: 15px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.disclaimer-link {
    color: #ffffff;
    text-decoration: underline;
    font-size: 0.75em;
    transition: color 0.3s ease;
}

.disclaimer-link:hover {
    color: #ff8c00;
}

/* Login Page Footer Styling */
.disclaimer {
    margin: 20px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-left: 4px solid #007bff;
    border-radius: 4px;
}

.disclaimer p {
    margin: 0;
    color: #495057;
    font-size: 0.9em;
    line-height: 1.5;
}

.legal-notice {
    margin: 20px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-left: 4px solid #6c757d;
    border-radius: 4px;
}

.legal-notice p {
    margin: 0;
    color: #495057;
    font-size: 0.85em;
    line-height: 1.4;
}

/* Universal Logo Container Styling */
.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 160px; /* Fixed pixel size instead of responsive */
    height: 160px; /* Exact same size for perfect circle */
    margin: 0 auto;
    background: white;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    overflow: visible; /* Changed from hidden to visible to prevent cropping */
    flex-shrink: 0; /* Prevent shrinking */
    padding: 20px; /* Add padding to ensure logo is not cropped */
    box-sizing: border-box; /* Include padding in total size */
}

/* Logo Header - Smaller version for headers */
.logo-header {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    padding: 10px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.logo-container:hover,
.logo-header:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 140, 0, 0.3);
}

.logo-container img {
    width: 100%; /* Use full available space within padding */
    height: 100%; /* Use full available space within padding */
    max-width: 120px; /* Maximum size to prevent overflow */
    max-height: 120px; /* Maximum size to prevent overflow */
    object-fit: contain; /* Maintain aspect ratio and fit within bounds */
    transition: all 0.3s ease;
    border-radius: 0; /* Remove border-radius from img to prevent clipping */
}

.logo-header img {
    width: 100%;
    height: 100%;
    max-width: 40px;
    max-height: 40px;
    object-fit: contain;
    transition: all 0.3s ease;
}

.logo-container:hover img,
.logo-header:hover img {
    transform: rotate(5deg);
    filter: brightness(1.1) contrast(1.1);
}

.logo-container a,
.logo-header a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

/* Login Form Container and Centering */
.login-container {
    max-width: 400px;
    margin: 0 auto; /* Center the login container */
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center; /* Center all content within the container */
}

.login-links {
    margin-top: 15px;
    margin-bottom: 0;
    text-align: center;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center; /* Center form elements horizontally */
    width: 100%;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%; /* Full width within the container */
    text-align: left; /* Left-align labels */
}

.form-group label {
    text-align: left;
    font-weight: 500;
    color: #333;
}

.form-input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
    transition: border-color 0.3s;
    width: 100%;
    box-sizing: border-box; /* Include padding in width calculation */
}

.form-input:focus {
    border-color: #007bff;
    outline: none;
}

.btn-login {
    background-color: #007bff;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s;
    width: 100%; /* Full width button */
    box-sizing: border-box;
}

.btn-login:hover {
    background-color: #0056b3;
}

.login-link {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

.login-link:hover {
    color: #0056b3;
}

/* Register Form Specific Styles */
.btn-register {
    background-color: #28a745; /* Green color for registration */
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s;
    width: 100%;
    box-sizing: border-box;
}

.btn-register:hover {
    background-color: #218838; /* Darker green on hover */
}

.required-field {
    color: red;
}

/* Phone input styling */
.phone-input-container {
    display: flex;
    gap: 10px;
    position: relative;
    flex-wrap: nowrap;
    align-items: center;
    width: 100%;
}

.phone-input {
    flex: 1;
}

.country-code-container {
    position: relative;
    width: 100%;
    max-width: 150px;
}

.country-search {
    width: 100%;
}

.country-list-container {
    position: absolute;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    z-index: 1000;
    display: none;
    top: 100%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.country-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.country-list li {
    padding: 8px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.country-list li:hover {
    background-color: #f5f5f5;
}

.country-flag {
    width: 20px;
    height: 14px;
}



/* ====================================================================== */
/* ENHANCEMENT STYLES - AI BULK PROCESSING AND MODALS                   */
/* ====================================================================== */

/* Enhancement Styles */
.warning-message {
    background: #fff3cd;
    color: #856404;
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 4px;
    text-align: center;
}

.progress-section {
    margin: 20px 0;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background-color: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background-color: #4CAF50;
    transition: width 0.3s ease;
}

.modal-actions {
    margin: 15px 0;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.enhancement-result {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.completion-message {
    margin-top: 15px;
    text-align: center;
    color: #28a745;
}

.error-message {
    margin-top: 15px;
    text-align: center;
    color: #dc3545;
}

/* Page Overlay */
.page-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    z-index: 1000;
}

/* Results Section */
.results-section {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
}

/* Custom Prompt Section */
.prompt-section {
    margin: 20px 0;
}

.prompt-section label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.prompt-section textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
}

/* AI Badge */
.ai-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    background: #e9ecef;
    border-radius: 4px;
    font-size: 0.875rem;
    color: #495057;
    margin-left: 8px;
}

.ai-badge::before {
    content: '🤖';
    margin-right: 4px;
}

/* ====================================================================== */
/* DASHBOARD-SPECIFIC STYLES - MOVED TO END FOR BETTER ORGANIZATION     */
/* ====================================================================== */

/* Dashboard Container */
.dashboard-container {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.dashboard-title {
    font-size: 2rem;
    color: #252961;
    margin-bottom: 2rem;
    font-weight: 600;
}

/* Statistics Cards Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stats-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-5px);
}

.stats-icon {
    background: #252961;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
}

.stats-icon i {
    font-size: 1.5rem;
}

.stats-content {
    flex: 1;
}

.stats-content h3 {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
    margin-bottom: 0.5rem;
}

.stats-number {
    font-size: 1.8rem;
    font-weight: 600;
    color: #252961;
    margin: 0;
}

/* Stores Overview Section */
.stores-overview {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    color: #252961;
    margin: 0;
}

.refresh-btn {
    background: #252961;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.3s ease;
}

.refresh-btn:hover {
    background: #1a1d4f;
}

.stores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.store-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s ease;
}

.store-card:hover {
    transform: translateY(-3px);
}

.store-icon {
    background: #252961;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.store-details {
    flex: 1;
}

.store-details h3 {
    margin: 0;
    color: #252961;
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.store-details p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.store-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-view, .btn-sync {
    padding: 0.4rem 0.8rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.btn-view {
    background: #252961;
    color: white;
}

.btn-sync {
    background: #117a8b;
    color: white;
}

.btn-view:hover {
    background: #1a1d4f;
}

.btn-sync:hover {
    background: #0c5460;
}

/* Compact Dashboard Layout Styles - Scoped to dashboard only */
.dashboard-container .stats-row {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
}

.dashboard-container .stats-column {
    flex: 1;
}

.dashboard-container .stats-column:first-child {
    flex: 1.5; /* Give "By Status" column more space (60%) */
}

.dashboard-container .stats-column:last-child {
    flex: 1; /* Give "By Source" column less space (40%) */
}

.dashboard-container .stats-column h4 {
    font-size: 0.9rem;
    color: #252961;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.dashboard-container .compact-stats {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.dashboard-container .compact-stats span {
    font-size: 0.85rem;
    color: #666;
}

.dashboard-container .compact-stats strong {
    color: #252961;
    font-weight: 600;
}

.dashboard-container .suppliers-section {
    margin-top: 1rem;
}

.dashboard-container .suppliers-section h4 {
    font-size: 0.9rem;
    color: #252961;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.dashboard-container .suppliers-table-container {
    margin-top: 0.5rem;
}

.dashboard-container .suppliers-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.dashboard-container .suppliers-table th {
    background-color: #f8f9fa;
    color: #252961;
    font-weight: 600;
    padding: 0.5rem;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    font-size: 0.8rem;
}

.dashboard-container .suppliers-table td {
    padding: 0.4rem 0.5rem;
    border-bottom: 1px solid #dee2e6;
    color: #666;
}

.dashboard-container .suppliers-table tr:hover {
    background-color: #f8f9fa;
}

.dashboard-container .suppliers-table .total-row {
    background-color: #f8f9fa;
    font-weight: 600;
}

.dashboard-container .suppliers-table .total-row td {
    border-top: 2px solid #dee2e6;
    color: #252961;
}

/* Missing Source styling - red text */
.dashboard-container .suppliers-table .missing-source {
    color: #dc3545 !important; /* Bootstrap red color */
    font-weight: 600;
}

/* Align PRODUCTS column to the left */
.dashboard-container .suppliers-table th:last-child,
.dashboard-container .suppliers-table td:last-child {
    text-align: left;
}

/* Store card improvements - scoped to dashboard */
.dashboard-container .store-cards-section {
    display: grid;
    gap: 1.5rem;
}

.dashboard-container .store-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.dashboard-container .store-card-header {
    display: flex;
    flex-direction: column;
    padding: 15px 20px 10px 20px; /* Reduced bottom padding */
    border-bottom: 1px solid #e5e7eb;
}

.dashboard-container .store-card-header-top {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
}

.dashboard-container .store-card-actions-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-self: flex-start;
}

.dashboard-container .store-card-icon {
    background: #252961;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
}

.dashboard-container .store-card-title h3 {
    margin: 0 0 5px 0;
    font-size: 1.2em;
    color: #1f2937;
}

.dashboard-container .store-card-title p {
    color: #6b7280;
    margin: 0.25rem 0 0 0;
    font-size: 0.9rem;
}

.dashboard-container .store-card-stats {
    padding: 15px 20px 20px 20px; /* Reduced top padding */
    width: 80%;
    margin: 0 auto; /* Center the content horizontally */
}

.stats-row {
    margin-bottom: 15px; /* Reduced margin */
}

.suppliers-section h4 {
    margin: 10px 0 8px 0; /* Reduced margins */
    font-size: 1em;
}

/* Remove the old bottom actions since we moved them to header */
.store-card-actions {
    display: none;
}

/* Responsive adjustments for dashboard */
@media (max-width: 768px) {
    .dashboard-container .stats-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .dashboard-container .suppliers-table {
        font-size: 0.8rem;
    }
    
    .dashboard-container .suppliers-table th,
    .dashboard-container .suppliers-table td {
        padding: 0.3rem;
    }
    
    .store-card-header-top {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    
    .store-card-actions-header {
        margin-top: 5px;
        flex-direction: row;
        justify-content: flex-start;
        gap: 10px;
    }
    
    .btn-compact {
        min-width: auto;
        flex: 0 0 auto;
    }
}

@media (max-width: 480px) {
    .dashboard-container {
        padding: 1rem;
    }
    
    .store-card {
        padding: 1rem;
        margin: 0;
    }
    
    .store-card-header {
        padding: 10px 15px;
    }
    
    .store-card-header-top {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .store-card-icon {
        margin-right: 0;
        margin-bottom: 0.5rem;
        align-self: center;
    }
}

/* ====================================================================== */
/* PERFORMANCE OPTIMIZATIONS FOR LISTINGS TABLE                          */
/* ====================================================================== */

/* Table container performance optimizations */
.table-container {
    contain: layout style;
    will-change: scroll-position;
    position: relative;
}

/* Table rendering optimizations */
.styled-table {
    table-layout: fixed; /* Faster rendering for large tables */
    contain: layout;
}

/* Row performance optimizations */
.listing-row {
    contain: layout style;
}

/* Image container GPU acceleration */
.image-container {
    contain: layout;
    transform: translateZ(0); /* Force GPU acceleration */
}

/* Optimize hover effects for better performance */
.styled-table tbody tr:hover {
    background-color: #f3f3f3;
    contain: layout style;
}

/* Lazy loading image transitions */
.lazy-image {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.lazy-image:not([src*="data:image"]) {
    opacity: 1;
}

/* Reduce reflows during filtering */
.filters-class {
    contain: layout;
}

/* Optimize modal performance */
.modal {
    contain: layout;
}

/* GPU acceleration for spinners */
.spinner {
    transform: translateZ(0);
}

/* Localized datetime helper - mark elements that will be formatted in the browser locale */
.localized-datetime {
    white-space: nowrap; /* keep date/time on a single line */
    font-variant-numeric: tabular-nums; /* align numbers for easier scanning */
}
