:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --success: #27ae60;
    --warning: #f39c12;
    --danger: #e74c3c;
    --light: #f8f9fa;
    --dark: #343a40;
}

.tailor-portal-dashboard, .tailor-portal-login {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.portal-header {
    background: linear-gradient(135deg, var(--primary), #1a2530);
    color: white;
    padding: 15px 0;
    border-radius: 8px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.portal-logo {
    font-weight: 700;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
}

.portal-logo i {
    margin-right: 10px;
    color: var(--secondary);
}

.user-info .badge {
    font-weight: normal;
    background-color: rgba(255,255,255,0.15);
}

.nav-tabs .nav-link {
    color: var(--dark);
    font-weight: 500;
    border: none;
    padding: 12px 20px;
    transition: all 0.3s;
}

.nav-tabs .nav-link.active {
    color: var(--secondary);
    border-bottom: 3px solid var(--secondary);
    background-color: transparent;
}

.nav-tabs .nav-link:hover {
    color: var(--secondary);
    background-color: rgba(52, 152, 219, 0.05);
}

.tab-content {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-top: 20px;
    min-height: 500px;
}

.widget-card {
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s;
    height: 100%;
}

.widget-card:hover {
    transform: translateY(-5px);
}

.widget-header {
    background-color: rgba(52, 152, 219, 0.1);
    padding: 15px;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    font-weight: 600;
    color: var(--primary);
}

.widget-body {
    padding: 20px;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-processing {
    background-color: rgba(243, 156, 18, 0.15);
    color: #c87f0a;
}

.status-production {
    background-color: rgba(52, 152, 219, 0.15);
    color: #1d6fa5;
}

.status-shipped {
    background-color: rgba(39, 174, 96, 0.15);
    color: #1e8449;
}

.status-outstanding {
    background-color: rgba(231, 76, 60, 0.15);
    color: #c0392b;
}

.status-paid {
    background-color: rgba(39, 174, 96, 0.15);
    color: #1e8449;
}

.tshirt-option {
    text-align: center;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s;
    cursor: pointer;
}

.tshirt-option:hover, .tshirt-option.active {
    border-color: var(--secondary);
    background-color: rgba(52, 152, 219, 0.05);
}

.tshirt-color {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin: 0 auto 10px;
}

.color-black { background-color: #000; }
.color-white { background-color: #fff; border: 1px solid #ddd; }
.color-grey { background-color: #95a5a6; }
.color-navy { background-color: #34495e; }

.search-container {
    position: relative;
}

.search-container i {
    position: absolute;
    left: 15px;
    top: 12px;
    color: #95a5a6;
}

.search-container input {
    padding-left: 40px;
}

.consumer-list-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.consumer-list-item:hover {
    background-color: rgba(52, 152, 219, 0.05);
}

.action-btn {
    min-width: 120px;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.page-title {
    color: var(--primary);
    font-weight: 600;
    padding-bottom: 15px;
    margin-bottom: 25px;
    border-bottom: 2px solid rgba(52, 152, 219, 0.2);
}

.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 15px;
}

.breadcrumb-item a {
    color: var(--secondary);
    text-decoration: none;
}

.invoice-table th {
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--primary);
    font-weight: 600;
}

.history-table th {
    background-color: #f8f9fa;
    color: var(--primary);
    font-weight: 600;
}

.table-hover tbody tr:hover {
    background-color: rgba(52, 152, 219, 0.03);
}

/* Login Page Styles */
.tailor-portal-login {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f5f7fa;
}

.login-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    padding: 30px;
    width: 100%;
    max-width: 400px;
}

.login-container h2 {
    font-weight: 600;
    color: var(--primary);
}

/* Form Styles */
.measurement-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.measurement-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s;
}

.measurement-card:hover {
    border-color: var(--secondary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.measurement-card h4 {
    color: var(--primary);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* Order Form Styles */
.order-form-section {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.order-form-section h3 {
    color: var(--primary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}


.woocommerce-checkout .she-header-yes {
    display: none;
}

.woocommerce-checkout footer {
    display: none;
}

.woocommerce-checkout .entry-header h1.entry-title {
    text-align: center;
}

ul.wc-item-meta {
    display: none;
}

.woocommerce-page.woocommerce-checkout table.shop_table td, .woocommerce.woocommerce-checkout table.shop_table td {
    padding: 10px 10px 10px 10px;
    border-color: var(--ast-border-color);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .portal-header .row {
        flex-direction: column;
        text-align: center;
    }
    
    .user-info {
        margin-top: 15px;
        justify-content: center !important;
    }
    
    .measurement-grid {
        grid-template-columns: 1fr;
    }
}


/* Base Styles */
.tailor-portal-form {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.card {
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.card-body {
    padding: 25px;
}

.page-title {
    color: #333;
    margin-bottom: 25px;
    font-weight: 600;
}

/* Form Elements */
.form-label {
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
}

.form-select, .form-control {
    border-radius: 4px;
    padding: 10px 15px;
    border: 1px solid #ddd;
    transition: all 0.3s;
}

.form-select:focus, .form-control:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 0.2rem rgba(74, 144, 226, 0.25);
}

.is-invalid {
    border-color: #dc3545 !important;
}

/* Supplier-Location Pair */
.supplier-location-pair {
    background: #f8f9fa;
    border-radius: 6px;
    transition: all 0.3s;
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
}

.supplier-location-pair:hover {
    background: #f1f3f5;
}

input.select2-search__field {
    border: none !important;
}

.supplier-details, .location-details {
    background: white;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    margin-top: 10px;
    font-size: 14px;
}

.supplier-details div, .location-details div {
    margin-bottom: 6px;
}

/* Product Cards */
.product-item {
    transition: all 0.3s;
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
}

.product-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.product-item .img-thumbnail {
    max-width: 80px;
    height: auto;
    border-radius: 4px;
}

/* Quantity Controls */
.input-group {
    max-width: 300px;
}

.input-group .btn-outline-secondary {
    width: 40px;
    padding: 5px;
}

.input-group .form-control {
    max-width: 200px;
    padding: 5px;
}

/* Buttons */
.btn {
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-primary {
    background-color: #4a90e2;
    border-color: #4a90e2;
}

.btn-primary:hover {
    background-color: #3a7bc8;
    border-color: #3a7bc8;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .supplier-location-pair .row > div,
    .product-item .row > div {
        margin-bottom: 15px;
    }
    
    #product_attributes_container {
        margin-top: 15px;
    }
    
    .card-body {
        padding: 15px;
    }
}

/* Select2 Customization */
.select2-container--default .select2-selection--multiple {
    min-height: 42px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #4a90e2;
    border-color: #4a90e2;
    color: white;
    padding: 2px 8px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: white;
    margin-right: 5px;
}


.color-option {
    cursor: pointer;
    text-align: center;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s;
}

.color-option.selected {
    background-color: #e9f7ff;
    border: 1px solid #3498db;
}

.color-swatch {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #ddd;
    display: inline-block;
}

.color-name {
    font-size: 0.8rem;
    margin-top: 4px;
}

.size-option {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.size-option.selected {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

/* Modern Product Selector Styles */
.add-products-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 32px;
    margin: 24px 0;
    border: 1px solid #e5e7eb;
}

.add-products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f3f4f6;
}

.add-products-title {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.add-supplier-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.add-supplier-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

/* Product Selection Section */
.product-selection-section {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: start;
    margin-bottom: 32px;
}

.product-selector-wrapper {
    position: relative;
}

.product-selector {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 16px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 16px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 50px;
}

.product-selector:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.product-selector:hover {
    border-color: #9ca3af;
}

.no-product-selected {
    background: #f9fafb;
    border: 2px dashed #d1d5db;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    margin-top: 16px;
}

.add-main-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(16, 185, 129, 0.3);
    min-width: 120px;
}

.add-main-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
}

/* Product List Styles */
.product-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.product-item:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-color: #667eea;
}

.product-content {
    display: grid;
    grid-template-columns: 80px 1fr auto auto;
    gap: 20px;
    align-items: center;
}

.product-image {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid #f3f4f6;
    background: #f9fafb;
}

.product-details {
    flex: 1;
}

.product-name {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 8px 0;
}

.product-attributes {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}

.attribute-tag {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

/* Variation Selection */
.variation-selectors {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.variation-selector-group {
    position: relative;
}

.variation-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.variation-selector {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 12px;
    padding-right: 36px;
}

.variation-selector:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

/* Quantity Controls */
.quantity-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.quantity-btn {
    width: 36px;
    height: 36px;
    border: 2px solid #e5e7eb;
    background: #ffffff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: #6b7280;
}

.quantity-btn:hover {
    border-color: #667eea;
    color: #667eea;
    background: #f8faff;
}

.quantity-input {
    width: 60px;
    height: 36px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    background: #ffffff;
}

.quantity-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

/* Delete Button */
.delete-btn {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.delete-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .add-products-container {
        padding: 20px;
        margin: 16px;
    }
    
    .add-products-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .product-selection-section {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .product-content {
        grid-template-columns: 1fr;
        gap: 16px;
        text-align: center;
    }
    
    .variation-selectors {
        grid-template-columns: 1fr;
    }
    
    .quantity-controls {
        justify-content: center;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Success States */
.success-message {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    margin: 16px 0;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Error States */
.error-message {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    margin: 16px 0;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Animation for new items */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-item.new-item {
    animation: slideIn 0.5s ease-out;
}

/* Focus visible for accessibility */
.add-supplier-btn:focus-visible,
.add-main-btn:focus-visible,
.product-selector:focus-visible,
.variation-selector:focus-visible,
.quantity-btn:focus-visible,
.delete-btn:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.woocommerce-js input[type=number] {
    max-width: 300px !important;
}


.role-employee button#add-supplier-btn, .role-employee .supplier-location-pair .col-md-2.d-flex.align-items-end {
    display: none !important;
}


div#customer_details {
    display: none;
    width: 0% !important;
}

.woocommerce.woocommerce-checkout form #order_review, .woocommerce.woocommerce-checkout form #order_review_heading, .woocommerce-page.woocommerce-checkout form #order_review, .woocommerce-page.woocommerce-checkout form #order_review_heading {
    width: 100% !important;
    float: right;
    margin-right: 0;
    clear: right;
}

.modal-content {
    color: #000 !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    color: #000;
}

#primary {
    margin: 0 !important;
}

.woocommerce-terms-and-conditions-wrapper {
    display: none;
}

.woocommerce-form-coupon-toggle {
    display: none;
}

h3#order_review_heading {
    text-align: center;
}