/**
 * Sales Dashboard Styles
 */

/* Base Styles */
.sales-dashboard-container {
    min-height: 100vh;
    background: #fff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Authentication Section */
.auth-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: #ffffff;
}

.auth-container {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 2px solid #e1e5e9;
    padding: 40px;
    max-width: 500px;
    width: 100%;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #971a9c;
    margin-bottom: 10px;
}

.auth-header p {
    font-size: 1.1rem;
    color: #666;
    margin: 0;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.auth-form input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.auth-form input:focus {
    outline: none;
    border-color: #971a9c;
    box-shadow: 0 0 0 3px rgba(107, 70, 193, 0.1);
}

/* Dashboard Section */
.dashboard-section {
    padding: 40px 20px;
    background: #ffffff;
}

.dashboard-header {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 2px solid #e1e5e9;
    padding: 30px;
    margin-bottom: 30px;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #971a9c;
    margin-bottom: 10px;
}

.header-content p {
    font-size: 1.1rem;
    color: #666;
    margin: 0;
}

/* Dashboard Components */
.dashboard-components {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.component-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 2px solid #e1e5e9;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
}

.component-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.component-card.active {
    border-color: #28a745;
}

.component-card.disabled {
    opacity: 0.6;
    background: #f8f9fa;
    border-color: #e1e5e9;
}

.component-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.component-card.active .component-icon {
    color: #28a745;
}

.component-card.disabled .component-icon {
    color: #6c757d;
}

.component-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.component-card.disabled .component-content h3 {
    color: #6c757d;
}

.component-content p {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: #971a9c;
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(151, 26, 156, 0.3);
    background: #7a1580;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    cursor: not-allowed;
}

.btn-outline {
    background: transparent;
    color: #971a9c;
    border: 2px solid #971a9c;
}

.btn-outline:hover {
    background: #971a9c;
    color: white;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    margin: 5% auto;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background: #971a9c;
    color: white;
    padding: 20px 30px;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #e1e5e9;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #971a9c;
    box-shadow: 0 0 0 3px rgba(107, 70, 193, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-col {
    display: flex;
    flex-direction: column;
}

/* Search Results */
.search-container {
    position: relative;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    /* display: none; - Removed to prevent conflicts with JavaScript */
}

.search-result-item {
    padding: 12px;
    border-bottom: 1px solid #e1e5e9;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.search-result-item:hover {
    background-color: #f8f9fa;
}

.search-result-item:last-child {
    border-bottom: none;
}

/* Selected Products */
.selected-products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.channel-indicator {
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
}

.selected-products {
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    padding: 15px;
    min-height: 100px;
}

.product-item {
    background: #f8f9fa;
    border-left: 3px solid #971a9c;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
}

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

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.product-title {
    font-weight: 600;
    color: #333;
}

.product-remove {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 1.2rem;
}

.product-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-info {
    flex: 1;
}

.product-description {
    font-weight: 500;
    margin-bottom: 5px;
}

.product-meta {
    font-size: 0.9rem;
    color: #666;
}

.product-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    background: #e1e5e9;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: 600;
}

.quantity-btn:hover {
    background: #cbd5e0;
}

.quantity-display {
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

.no-products {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
}

/* Channel Indicators */
.channel-wild-bird {
    background-color: #22c55e;
}

.channel-pet-specialty {
    background-color: #3b82f6;
}

.channel-grocery-mass {
    background-color: #f97316;
}

.channel-indicator-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 6px;
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    font-weight: 500;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-components {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-footer {
        padding: 15px 20px;
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 30px 20px;
    }
    
    .dashboard-section {
        padding: 20px 10px;
    }
    
    .component-card {
        padding: 20px;
    }
} 