/* VintageCashCow Brand Design System - Business Portal */
:root {
    --primary-color: #36B44A;
    --primary-hover: #2d9a3d;
    --primary-light: #4dc45f;
    --primary-dark: #248032;
    --secondary-color: #ffe07d;
    --secondary-hover: #ffda5e;
    --secondary-dark: #e6c760;
    --success-color: #8b5cf6;
    --success-hover: #7c3aed;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --background: #f8fafc;
    --card-background: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px 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);
    /* VintageCashCow Brand Colors */
}

/* Base Overrides */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    background-color: var(--background);
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.6;
    display: flex;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
}

/* Sidebar Navigation - Override Bootstrap and other interference */
.sidebar,
div.sidebar,
.sidebar.bg-light,
.sidebar.bg-primary,
.sidebar.bg-secondary {
    width: 250px;
    height: 100vh;
    background: #d8d8d8 !important;
    background-color: #d8d8d8 !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
    filter: none !important;
    opacity: 1 !important;
    flex-shrink: 0;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.sidebar-brand {
    padding: 0.5rem 1.25rem 0.18rem 1.25rem;
    /*border-bottom: 1px solid rgba(255, 255, 255, 0.1);*/
    margin-bottom: 1em;
}

.sidebar-brand h4 {
    color: #ffffff;
    font-weight: 600;
    margin: 0;
    font-size: 1.25rem;
}

.sidebar-brand small {
    display: block;
    text-align: left;
    width: 100%;
}

.sidebar-logo-container {
    text-align: left;
    padding: 0.2rem 0;
}

.sidebar-logo {
    height: 60px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-item {
    margin-bottom: 0.25rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    color: #333;
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 500;
    border-radius: 0;
}

.nav-link:hover {
    color: #000;
    background-color: rgba(0, 0, 0, 0.05);
}

.nav-link.active {
    color: #000;
    background-color: rgba(0, 0, 0, 0.1);
    border-right: 3px solid var(--secondary-color);
}

.nav-link i {
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--background);
    overflow-y: auto;
}

.top-bar {
    background-color: #d8d8d8;
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    color: #333;
}

.content-area {
    flex: 1;
    padding: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* Wide content area for pages with large tables */
.content-area-wide {
    max-width: 1800px;
}

/* Card System */
.auction-card {
    background: var(--card-background);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: none;
}

.auction-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-image {
    height: 250px;
    object-fit: cover;
    width: 100%;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.card-text {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* Dashboard Stats Cards */
.stat-card {
    background: var(--card-background);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: none;
    text-align: center;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-card.primary { border-top: 4px solid var(--primary-color); }
.stat-card.success { border-top: 4px solid var(--success-color); }
.stat-card.warning { border-top: 4px solid var(--warning-color); }
.stat-card.info { border-top: 4px solid #3b82f6; }

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0.025em;
}

/* Button System */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

.btn:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    color: white;
    box-shadow: var(--shadow-lg);
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: var(--success-hover);
    color: white;
    box-shadow: var(--shadow-lg);
}

.bg-success {
    background-color: var(--success-color) !important;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--secondary-hover);
    color: white;
}

.btn-large {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
}

.btn-outline-primary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Form Controls */
.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background-color: var(--card-background);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background-color: var(--card-background);
}

.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Grid Layouts */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    border: none;
}

.alert-success {
    background-color: rgb(16, 185, 129, 0.1);
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.alert-danger {
    background-color: rgb(239, 68, 68, 0.1);
    color: var(--error-color);
    border-left: 4px solid var(--error-color);
}

.alert-info {
    background-color: rgb(37, 99, 235, 0.1);
    color: var(--primary-color);
    border-left: 4px solid var(--primary-color);
}

.alert-warning {
    background-color: rgb(245, 158, 11, 0.1);
    color: var(--warning-color);
    border-left: 4px solid var(--warning-color);
}

/* Tables */
.table {
    background-color: var(--card-background);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 0;
}

.table th {
    background-color: var(--background);
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
    padding: 1rem;
    vertical-align: top;
}

.table td {
    padding: 0.875rem 1rem;
    vertical-align: middle;
}

/* Enhanced Listings Table Styles */
.listings-table {
    min-width: 1000px;
}

.listings-table th {
    position: relative;
    min-width: 150px;
}

.listings-table th:last-child {
    min-width: 180px; /* Actions column */
}

.listings-table td:last-child {
    min-width: 180px; /* Actions column */
}

.listings-table th .d-flex {
    gap: 0.5rem;
}

.listings-table .form-control-sm,
.listings-table .form-select-sm {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    background-color: white;
}

.listings-table .form-control-sm:focus,
.listings-table .form-select-sm:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

/* Filter Reset Buttons */
.listings-table .btn-sm {
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    line-height: 1.2;
    border-radius: 0.25rem;
    min-width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.listings-table .btn-outline-secondary {
    border-color: var(--border-color);
    color: var(--text-secondary);
}

.listings-table .btn-outline-secondary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
}

.listings-table .text-truncate {
    position: relative;
}

.listings-table .text-truncate:hover::after {
    content: attr(title);
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    background: var(--text-primary);
    color: white;
    padding: 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    white-space: normal;
    max-width: 300px;
    box-shadow: var(--shadow-lg);
}

.listings-table tbody tr:hover {
    background-color: rgba(37, 99, 235, 0.05);
    transition: background-color 0.2s ease;
}

.listings-table .fw-bold {
    font-weight: 600;
}

.listings-table small {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Action button improvements */
.listings-table .btn-group-sm .btn {
    padding: 0.05rem 0.05rem;
    font-size: 0.8rem;
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.listings-table .btn-group-sm {
    gap: 2px;
}

/* Duplicate button styling */
.btn-outline-info {
    border-color: #17a2b8;
    color: #17a2b8;
    background-color: white;
}

.btn-outline-info:hover {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: white;
}

.btn-outline-info:focus {
    box-shadow: 0 0 0 0.2rem rgba(23, 162, 184, 0.25);
}

/* Status Badges */
.badge {
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.025em;
}

.badge-success {
    background-color: rgb(16, 185, 129, 0.1);
    color: var(--success-color);
}

.badge-warning {
    background-color: rgb(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.badge-info {
    background-color: rgb(37, 99, 235, 0.1);
    color: var(--primary-color);
}

.badge-secondary {
    background-color: rgb(100, 116, 139, 0.1);
    color: var(--secondary-color);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #4dc45f 100%);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
    margin: 0 -2rem 2rem -2rem;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* Loading States */
.spinner-border {
    width: 2rem;
    height: 2rem;
    border-width: 0.25rem;
    border-color: var(--primary-color);
    border-right-color: transparent;
}

/* Modal Styles */
.modal {
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-dialog {
    max-width: 500px;
}

.modal-content {
    border-radius: 0.75rem;
    border: none;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    background-color: var(--background);
    border-bottom: 1px solid var(--border-color);
    border-radius: 0.75rem 0.75rem 0 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        order: 2;
    }
    
    .main-content {
        order: 1;
    }
    
    .items-grid, .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .content-area {
        padding: 1rem;
    }
    
    .hero-section {
        margin: 0 -1rem 1rem -1rem;
        padding: 2rem 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

/* Animations */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

/* Focus states for accessibility */
.btn:focus,
.form-control:focus,
.nav-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Page titles */
.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    margin-top: 0;
}

/* Content cards */
.content-card {
    background: var(--card-background);
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

/* Manage Account Navigation - Override for nav-pills */
.nav-pills .nav-link {
    color: var(--text-primary);
    background-color: transparent;
    border: none;
    border-radius: 0.375rem;
    padding: 0.5rem 1rem;
    margin-bottom: 0.25rem;
    transition: all 0.2s;
}

.nav-pills .nav-link:hover {
    color: var(--primary-color);
    background-color: var(--background);
}

.nav-pills .nav-link.active {
    color: #ffffff;
    background-color: var(--primary-color);
    border: none;
    font-weight: 600;
}

/* Dropdown Styles - Ensure proper z-index and functionality */
.dropdown-menu {
    z-index: 1050 !important;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    box-shadow: var(--shadow-lg);
    min-width: 200px;
}

.dropdown-item {
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border: 0;
    background: transparent;
    width: 100%;
    text-align: left;
    text-decoration: none;
    transition: all 0.2s;
}

.dropdown-item:hover,
.dropdown-item:focus {
    color: var(--primary-color);
    background-color: var(--background);
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-toggle::after {
    margin-left: 0.5rem;
}