* {
    box-sizing: border-box;
}

.bright-cms-container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.bright-tabs {
    display: flex;
    background: #2c3e50;
    border-bottom: 3px solid #e74c3c;
}

.bright-tab {
    flex: 1;
    padding: 20px;
    text-align: center;
    color: white;
    cursor: pointer;
    transition: background 0.3s;
    font-weight: 600;
    border: none;
    font-size: 16px;
    background: transparent;
}

.bright-tab:hover {
    background: #34495e;
}

.bright-tab.active {
    background: #e74c3c;
}

.bright-tab-content {
    display: none;
    padding: 30px;
}

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

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

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

.bright-form-group input[type="text"],
.bright-form-group input[type="number"],
.bright-form-group select,
.bright-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
    font-family: inherit;
}

.bright-form-group select {
    height: auto;
    min-height: 44px;
    background: white;
}

.bright-form-group input:focus,
.bright-form-group select:focus,
.bright-form-group textarea:focus {
    outline: none;
    border-color: #e74c3c;
}

.bright-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.bright-btn {
    padding: 12px 30px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.3s;
    margin-right: 10px;
    font-family: inherit;
}

.bright-btn:hover {
    background: #c0392b;
}

.bright-btn-secondary {
    background: #95a5a6;
}

.bright-btn-secondary:hover {
    background: #7f8c8d;
}

.bright-btn-danger {
    background: #e74c3c;
}

.bright-btn-small {
    padding: 8px 15px;
    font-size: 14px;
}

.bright-table-wrapper {
    overflow-x: auto;
    margin-top: 20px;
}

.bright-table {
    width: 100%;
    border-collapse: collapse;
}

.bright-table th,
.bright-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.bright-table th {
    background: #2c3e50;
    color: white;
    font-weight: 600;
    position: sticky;
    top: 0;
}

.bright-table tr:hover {
    background: #f8f9fa;
}

.bright-table .actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.bright-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.bright-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
}

.bright-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.bright-modal-large {
    max-width: 900px;
}

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

.bright-modal-header h2 {
    margin: 0;
    color: #2c3e50;
}

.bright-close {
    font-size: 30px;
    cursor: pointer;
    color: #e74c3c;
    line-height: 1;
}

.bright-close:hover {
    color: #c0392b;
}

.product-item {
    display: grid;
    grid-template-columns: 2fr 1fr 100px;
    gap: 15px;
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
}

.product-item .bright-form-group {
    margin: 0;
}

.quote-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #e74c3c;
}

.quote-logo {
    font-size: 32px;
    font-weight: 700;
    color: #e74c3c;
}

.quote-number {
    font-size: 18px;
    color: #2c3e50;
    font-weight: 600;
}

.quote-total {
    text-align: right;
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 5px;
}

.quote-approval {
    margin: 30px 0;
    padding: 20px;
    background: #ecf0f1;
    border-radius: 5px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    transform: scale(1.5);
    cursor: pointer;
}

.link-button {
    color: #e74c3c;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    margin-right: 5px;
}

.link-button:hover {
    text-decoration: underline;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #95a5a6;
}

.empty-state h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

/* Arabic language support */
.rtl-mode {
    direction: rtl;
    text-align: right;
}

.rtl-mode .bright-table th,
.rtl-mode .bright-table td {
    text-align: right;
}

.rtl-mode .quote-total {
    text-align: left;
}

.rtl-mode .quote-header {
    flex-direction: row-reverse;
}

/* Print styles */
@media print {
    body * {
        visibility: hidden;
    }
    #quotePrintArea,
    #quotePrintArea * {
        visibility: visible;
    }
    #quotePrintArea {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
    .no-print {
        display: none !important;
    }
    .bright-table {
        page-break-inside: auto;
    }
    .bright-table tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .bright-tabs {
        flex-direction: column;
    }
    
    .bright-form-row {
        grid-template-columns: 1fr;
    }
    
    .product-item {
        grid-template-columns: 1fr;
    }
    
    .bright-table {
        font-size: 14px;
    }
    
    .bright-table th,
    .bright-table td {
        padding: 10px;
    }
}
