/* Dashboard Specific Styles */
:root {
    --dark-blue: #0A1A2F;
    --gold: #FFD700;
    --light-gold: #FFF8E1;
    --card-bg: rgba(255, 255, 255, 0.98);
}

/* SMS Panel Stat Cards */
.stat-card {
    text-align: center;
    padding: 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--gold);
    transform: translateY(-2px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-blue);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Bootstrap-aligned Sidebar Styles */
/* Let Bootstrap handle offcanvas transitions */

.sidebar-wrapper {
    position: sticky;
    top: 100px;
    height: calc(100vh - 120px);
    overflow-y: auto;
}

@media (max-width: 991.98px) {
    .sidebar-wrapper {
        position: relative;
        top: 0;
        height: 100%;
    }
}

.sidebar-container {
    background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(10, 26, 47, 0.05);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    height: 100%;
}

@media (max-width: 991.98px) {
    .sidebar-container {
        border-radius: 0;
        box-shadow: none;
        border: none;
    }
}

.sidebar-container::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.08) 0%, rgba(255, 215, 0, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
    min-height: 400px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    padding: 0.9rem 1rem;
    color: var(--dark-blue);
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 0.35rem;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    user-select: none;
}

.sidebar-item:last-child {
    margin-bottom: 0;
}

.sidebar-item:hover {
    background-color: rgba(10, 26, 47, 0.03);
    transform: translateY(-1px);
}

.sidebar-item.active {
    background: linear-gradient(90deg, var(--dark-blue) 0%, #152942 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(10, 26, 47, 0.15);
}

.sidebar-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(0deg, var(--gold) 0%, #FFD700 100%);
}

.sidebar-icon {
    margin-right: 0.8rem;
    font-size: 1.1rem;
    width: 1.4rem;
    text-align: center;
    opacity: 0.9;
}

.sidebar-item.active .sidebar-icon {
    color: var(--gold);
}

/* Main Content Transitions */
.main-content {
    transition: all 0.3s ease;
}

/* Status Container */
.status-container {
    padding: 0;
    max-width: 1400px;
    margin: 0 auto;
}

.status-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
    border-radius: 16px;
    padding: 1rem;
    margin-bottom: 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(10, 26, 47, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.status-section:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.status-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.08) 0%, rgba(255, 215, 0, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
    position: relative;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--gold) 0%, rgba(255, 215, 0, 0.3) 100%);
    border-radius: 3px;
}

.section-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #FFD700 0%, #FFC107 100%);
    border-radius: 12px;
    margin-right: 1rem;
    color: var(--dark-blue);
    box-shadow: 0 2px 6px rgba(255, 215, 0, 0.3);
}

.section-title {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--dark-blue);
    margin: 0;
}

.last-updated-indicator {
    display: flex;
    align-items: center;
    margin-left: auto;
    font-size: 0.85rem;
    color: #6b7280;
}

.update-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFD700 0%, #FFC107 100%);
    margin-right: 6px;
    box-shadow: 0 0 4px rgba(255, 215, 0, 0.5);
}

.update-text {
    font-weight: 500;
}

/* Search Controls */
.search-container {
    flex-grow: 1;
    max-width: 400px;
    margin-right: 1rem;
}

.search-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 12px;
    color: #6c757d;
    font-size: 0.9rem;
    z-index: 1;
}

.search-input {
    width: 100%;
    height: 40px;
    padding: 0.5rem 2.5rem 0.5rem 2.25rem;
    border: 1px solid rgba(10, 26, 47, 0.1);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 400;
    font-family: inherit;
    transition: all 0.2s ease;
    background-color: white;
    line-height: 1.5;
}

.search-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.15);
}

.btn-clear-search {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: #6c757d;
    padding: 0.25rem;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-clear-search:hover {
    color: #343a40;
    background-color: rgba(10, 26, 47, 0.05);
    transform: scale(1.1);
}

/* Table Styles */
.status-table-container {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(10, 26, 47, 0.05);
    transition: all 0.3s ease;
}

.status-table-container:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.dashboard-table {
    width: 100%;
    min-width: auto;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.875rem;
}

.dashboard-table th,
.dashboard-table td {
    padding: 0.75rem;
    white-space: nowrap;
    vertical-align: middle;
    border-bottom: 1px solid #e9ecef;
}

.dashboard-table th {
    font-weight: 600;
    color: #495057;
    background: #f8f9fa;
    padding: 0.75rem 1rem;
    white-space: nowrap;
}

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

.dashboard-table tbody tr {
    transition: background-color 0.2s ease;
}

.dashboard-table tbody tr:hover {
    background-color: rgba(248, 249, 250, 0.7);
}

.sortable {
    cursor: pointer;
    user-select: none;
}

.sortable:hover {
    background-color: rgba(10, 26, 47, 0.04);
}

.sortable .bi {
    font-size: 0.75rem;
    margin-left: 0.25rem;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.sortable:hover .bi {
    opacity: 1;
}

.sortable.asc i {
    transform: rotate(180deg);
}

/* Product Elements */
.product-thumbnail {
    width: 45px;
    height: 45px;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 10px;
}

.text-wrap {
    white-space: normal;
    max-width: 300px;
}

.costco-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: #6b7280;
    background: rgba(10, 26, 47, 0.05);
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.costco-link:hover {
    color: var(--dark-blue);
    background: rgba(10, 26, 47, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.costco-link i {
    font-size: 1.2rem;
}

.collectpure-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: #6b7280;
    background: rgba(10, 26, 47, 0.05);
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.collectpure-link:hover {
    color: var(--dark-blue);
    background: rgba(10, 26, 47, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.collectpure-link i {
    font-size: 1.2rem;
}

/* Badge Styles */
.badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.35em 0.8em;
    border-radius: 20px;
    letter-spacing: 0.02em;
}

.badge.bg-success {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #047857;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge.bg-danger {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #b91c1c;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Mobile Cards */
.mobile-status-cards {
    margin-bottom: 1.5rem;
}

.status-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(10, 26, 47, 0.05);
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
    display: block;
    color: inherit;
    text-decoration: none;
}

.status-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: inherit;
}

.status-card-pricing {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 0.5rem;
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

/* Mobile dashboard product cards */
.mobile-status-cards .product-card {
    border: 1px solid rgba(0,0,0,.125);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.mobile-status-cards .product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mobile-status-cards .text-gold {
    color: var(--gold);
    font-weight: bold;
}

.status-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.status-card-sku {
    font-weight: 600;
    color: var(--dark-blue);
    font-size: 0.95rem;
}

.status-card-price {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--dark-blue);
    text-align: right;
}

.status-card-description {
    color: #6c757d;
    font-size: 0.8rem;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

.status-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

.status-info {
    display: flex;
    align-items: center;
}

.vs-spot {
    font-size: 0.75rem;
    font-weight: 600;
}

.vs-spot.positive {
    color: #047857;
}

.vs-spot.negative {
    color: #b91c1c;
}

.status-card-date {
    font-size: 0.75rem;
    color: #6c757d;
    margin-left: 0.5rem;
}

.status-badge {
    display: inline-block;
    padding: 0.25em 0.6em;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.badge-in-stock {
    background: rgba(16, 185, 129, 0.15);
    color: #047857;
    box-shadow: 0 1px 2px rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-out-of-stock {
    background: rgba(239, 68, 68, 0.15);
    color: #b91c1c;
    box-shadow: 0 1px 2px rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Table Footer */
.table-footer {
    background-color: transparent;
    padding: 1.5rem;
    border-top: 1px solid #e9ecef;
    margin-top: 1rem;
}

.page-info {
    color: #6b7280;
    font-size: 0.875rem;
}

/* Pagination */
.pagination {
    margin-bottom: 0;
}

.pagination .page-link {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    color: var(--dark-blue);
    border-color: #e9ecef;
    background-color: white;
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    background-color: var(--light-gold);
    border-color: var(--gold);
    color: var(--dark-blue);
    z-index: 2;
}

.pagination .page-item.active .page-link {
    background-color: var(--gold);
    border-color: var(--gold);
    color: var(--dark-blue);
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.2);
}

.pagination .page-item.disabled .page-link {
    color: #9ca3af;
    pointer-events: none;
    background-color: #f8f9fa;
    border-color: #e9ecef;
}

/* Dropdown */
.btn-outline {
    color: var(--dark-blue);
    background-color: white;
    border: 1px solid rgba(10, 26, 47, 0.1);
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-weight: 400;
    transition: all 0.2s ease;
}

.btn-outline:hover {
    color: var(--dark-blue);
    background-color: rgba(10, 26, 47, 0.03);
    border-color: rgba(10, 26, 47, 0.2);
}

.dropdown-menu {
    border-radius: 12px;
    border: 1px solid rgba(10, 26, 47, 0.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    color: var(--dark-blue);
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.dropdown-item.active,
.dropdown-item:active {
    background-color: var(--light-gold);
    color: var(--dark-blue);
}

.dropdown-item:hover {
    background-color: rgba(10, 26, 47, 0.03);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar-wrapper {
        position: relative;
        height: auto;
        top: 0;
    }
    
    .status-section {
        padding: 0.75rem;
    }
    
    .section-header {
        flex-wrap: wrap;
    }
    
    .last-updated-indicator {
        margin-left: 0;
        margin-top: 0.5rem;
        padding-left: 3.25rem;
    }
    
    .sort-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .search-container {
        width: 100%;
        max-width: none;
        margin-right: 0;
    }
    
    .dropdown {
        align-self: flex-end;
    }
}

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

.status-section {
    animation: fadeIn 0.3s ease forwards;
}

.status-card {
    animation: fadeIn 0.3s ease forwards;
}