/* Dashboard Styles */
.dashboard {
    display: none;
    background: #FFFFFF;
    padding: 30px;
    border-radius: 12px;
    margin-top: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.dashboard.active {
    display: block;
}

/* Auth Container */
.auth-container {
    max-width: 480px;
    margin: 0 auto;
    background: #FFFFFF;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* Dashboard Header (only for dashboard page) */
.dashboard .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #121426 0%, #1a1d35 100%);
    border-radius: 10px;
}

.dashboard .header h1 {
    color: #FFFFFF;
}

.user-info {
    color: #C9B37E;
    font-size: 13px;
    margin-top: 5px;
}

.logout-btn {
    background: transparent;
    border: 2px solid #C9B37E;
    color: #C9B37E;
    width: auto;
    padding: 10px 24px;
    font-size: 14px;
}

.logout-btn:hover {
    background: #C9B37E;
    color: #121426;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0;
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #C9B37E;
}

.tab {
    flex: 1;
    padding: 14px 20px;
    background: #FFFFFF;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #121426;
    transition: all 0.3s;
    font-weight: 500;
}

.tab.active {
    background: #C9B37E;
    color: #121426;
    font-weight: 700;
}

.tab:hover:not(.active) {
    background: #f5f5f5;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Customer Groups */
.customer-group {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
    border: 2px solid #e8e8e8;
    transition: all 0.3s;
}

.customer-group:hover {
    border-color: #C9B37E;
    box-shadow: 0 4px 12px rgba(201, 179, 126, 0.1);
}

.customer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.customer-name {
    font-size: 18px;
    font-weight: 700;
    color: #121426;
}

.customer-contact {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
}

/* Customer Accordion (Admin Dashboard) */
.customer-accordion {
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.customer-accordion-header {
    background: linear-gradient(135deg, #121426 0%, #1a1d35 100%);
    padding: 20px 25px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
    user-select: none;
}

.customer-accordion-header:hover {
    background: linear-gradient(135deg, #1a1d35 0%, #242745 100%);
}

.customer-accordion-header.active {
    background: #C9B37E;
}

.customer-info {
    flex: 1;
}

.customer-name {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 5px;
    color: #FFFFFF;
}

.customer-accordion-header.active .customer-name {
    color: #121426;
}

.customer-details {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.customer-accordion-header.active .customer-details {
    color: #121426;
    opacity: 0.8;
}

.accordion-arrow {
    font-size: 24px;
    transition: transform 0.3s;
    color: #C9B37E;
}

.customer-accordion-header.active .accordion-arrow {
    transform: rotate(180deg);
    color: #121426;
}

.customer-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background: #FFFFFF;
}

.customer-accordion-content.active {
    max-height: 3000px;
    transition: max-height 0.6s ease-in;
    overflow: visible;
}

.customer-accordion-body {
    padding: 25px;
}

.product-count-badge {
    background: #C9B37E;
    color: #121426;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    margin-right: 15px;
}

.customer-accordion-header.active .product-count-badge {
    background: #121426;
    color: #C9B37E;
}

/* Auth Footer */
.auth-footer {
    margin-top: 20px;
    text-align: center;
    color: #666;
    font-size: 13px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #FFFFFF;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.modal-content h2 {
    margin-bottom: 25px;
    border-bottom: 3px solid #C9B37E;
    padding-bottom: 10px;
}

.modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
}

.modal-actions button {
    width: 100%;
    padding: 14px;
    margin: 0;
    height: auto;
}

/* Card */
.card {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.card h2 {
    color: #121426;
    margin-bottom: 25px;
    font-size: 22px;
    border-bottom: 3px solid #C9B37E;
    padding-bottom: 10px;
}

/* Order History Specific Styles */
.submission-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    background: #f9f9f9;
}

.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 15px;
}

.submission-header {
    font-weight: 600;
    color: #121426;
    font-size: 16px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #C9B37E;
}

.submission-header button {
  width: auto;             
  padding: 4px 10px;        
  font-size: 12px;        
  font-weight: 500;       
  background: #C9B37E;
  color: #121426;
  border: 1px solid #C9B37E;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.error {
    background: #fee;
    color: #c33;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Responsive Dashboard */
@media (max-width: 768px) {
    .dashboard {
        padding: 20px;
    }

    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .logout-btn {
        width: 100%;
    }

    .tabs {
        flex-direction: column;
    }

    .customer-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .auth-container {
        padding: 25px;
    }

    .customer-name {
        font-size: 16px;
    }

    .customer-details {
        font-size: 11px;
    }

    .product-count-badge {
        font-size: 11px;
        padding: 4px 12px;
    }
}
