/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
    color: #1a1a1a;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* RFQ Container */
.rfq-container {
    display: flex;
    height: 100vh;
}

/* Sidebar - Reusing from dashboard */
.sidebar {
    width: 240px;
    background: #f5f4f0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e5e5e5;
}

.sidebar-header {
    padding: 24px;
}

.logo {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.logo-text {
    font-size: 22px;
    font-weight: 500;
    color: #1a1a1a;
    letter-spacing: -0.02em;
}

.logo-arabic {
    font-size: 16px;
    color: #716d52;
    font-weight: 400;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    padding: 0 16px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: #666;
    font-size: 14px;
    margin-bottom: 4px;
    transition: all 0.2s ease;
}

.nav-item:hover {
    background: #e8e7e3;
    color: #1a1a1a;
}

.nav-item.active {
    background: #e8e7e3;
    color: #1a1a1a;
    font-weight: 500;
}

.nav-item svg {
    width: 20px;
    height: 20px;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid #e5e5e5;
}

.nav-item.support {
    margin-bottom: 16px;
}

.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-bottom: 16px;
    color: #666;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #e8e7e3;
    border-radius: 8px;
    cursor: pointer;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: #1a1a1a;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
}

.user-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
}

.user-role {
    font-size: 12px;
    color: #666;
}

.dropdown-icon {
    color: #666;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background: #f8f8f8;
}

.content-header {
    padding: 40px 48px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.content-header h1 {
    font-size: 32px;
    font-weight: 400;
    letter-spacing: -0.02em;
}

.notification-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #e5e5e5;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.notification-btn:hover {
    border-color: #d0d0d0;
    background: #f8f8f8;
}

.notification-container {
    position: relative;
}

/* Filters Section */
.filters-section {
    padding: 0 48px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-container {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 16px;
    color: #999;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 12px 48px 12px 48px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: #d0d0d0;
}

.filter-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    color: #666;
}

.filter-chips {
    display: flex;
    gap: 12px;
}

.filter-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 20px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-chip:hover {
    background: #f8f8f8;
    border-color: #d0d0d0;
}

.filter-chip.active {
    background: #1a1a1a;
    color: white;
    border-color: #1a1a1a;
}

.filter-chip.active svg {
    color: white;
}

.filter-chip svg {
    width: 16px;
    height: 16px;
}

.view-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 14px;
    color: #1a1a1a;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-toggle:hover {
    background: #f8f8f8;
    border-color: #d0d0d0;
}

/* RFQ Table */
.rfq-table-container {
    flex: 1;
    padding: 0 48px 48px;
    overflow-x: auto;
}

.rfq-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.rfq-table thead {
    border-bottom: 2px solid #f0f0f0;
}

.rfq-table th {
    text-align: left;
    padding: 16px 20px;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.rfq-table tbody tr {
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.15s ease;
}

.rfq-table tbody tr:hover {
    background: #fafafa;
}

.rfq-table td {
    padding: 24px 20px;
    font-size: 14px;
    vertical-align: middle;
    text-align: center;
}

.rfq-table td:first-child {
    text-align: left;
}

.rfq-table td:nth-child(2) {
    text-align: left;
}

/* Buyer Info */
.buyer-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.buyer-icon {
    width: 40px;
    height: 40px;
    background: #f5f4f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.buyer-icon svg {
    width: 20px;
    height: 20px;
    color: #666;
}

.buyer-info span {
    font-size: 14px;
    color: #1a1a1a;
    font-weight: 500;
}

/* Inquiry Info */
.inquiry-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    min-width: 120px;
}

/* Status variations */
.status-badge.status-new {
    background: #FEF3C7;
    color: #92400E;
}

.status-badge.status-pending {
    background: #FEF3C7;
    color: #92400E;
}

.status-badge.status-viewed {
    background: #E0E7FF;
    color: #3730A3;
}

.status-badge.status-submitted {
    background: #DBEAFE;
    color: #1E3A8A;
}

.status-badge.status-accepted {
    background: #D1FAE5;
    color: #065F46;
}

.status-badge.status-declined {
    background: #FEE2E2;
    color: #991B1B;
}

.status-badge.status-rejected {
    background: #FEE2E2;
    color: #991B1B;
}

.status-badge.status-quoted {
    background: #FEF3C7;
    color: #92400E;
}

/* Action Buttons */
.btn-primary,
.btn-secondary,
.btn-success,
.submit-btn,
.view-btn {
    padding: 10px 24px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
    text-align: center;
    border: none;
}

.btn-primary,
.submit-btn {
    background: #1a1a1a;
    color: white;
}

.btn-primary:hover,
.submit-btn:hover {
    background: #000000;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-secondary,
.view-btn {
    background: white;
    color: #1a1a1a;
    border: 1px solid #e5e5e5;
}

.btn-secondary:hover,
.view-btn:hover {
    background: #f8f8f8;
    border-color: #d0d0d0;
}

.btn-success {
    background: #10b981;
    color: white;
    border: 1px solid #10b981;
}

.btn-success:hover {
    background: #059669;
    border-color: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

/* RFQ specific elements */
.rfq-code {
    font-size: 13px;
    color: #666;
    font-family: 'Monaco', 'Courier New', monospace;
}

.rfq-title {
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.rfq-subtitle {
    font-size: 13px;
    color: #666;
}

.deadline {
    font-size: 14px;
    color: #1a1a1a;
    white-space: nowrap;
    display: inline-block;
}

.days-left {
    font-size: 12px;
    color: #666;
    margin-left: 4px;
}

.overdue {
    color: #dc2626;
}

.overdue-text {
    font-size: 12px;
    color: #dc2626;
    margin-left: 4px;
}

.action-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    white-space: nowrap;
}

.action-buttons button {
    min-width: 140px;
    text-align: center;
    white-space: nowrap;
    padding: 8px 20px;
}

.text-muted {
    color: #999;
    font-size: 13px;
}

/* Pagination */
.pagination-container {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 24px 48px;
}

.pagination-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #e5e5e5;
    background: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    background: #f8f8f8;
    border-color: #d0d0d0;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn svg {
    width: 16px;
    height: 16px;
    color: #666;
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 4px;
}

.page-num {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: none;
    background: none;
    border-radius: 6px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-num:hover {
    background: #f0f0f0;
    color: #1a1a1a;
}

.page-num.active {
    background: #1a1a1a;
    color: white;
}

.page-dots {
    padding: 0 8px;
    color: #999;
}

/* Updated pagination styles */
.page-number {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: none;
    background: none;
    border-radius: 6px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.page-number:hover {
    background: #f0f0f0;
    color: #1a1a1a;
}

.page-number.active {
    background: #1a1a1a;
    color: white;
}

.ellipsis {
    padding: 0 8px;
    color: #999;
    font-size: 14px;
}

/* Filter Dropdown Styles */
.filter-dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 180px;
    padding: 8px;
    z-index: 100;
}

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

.dropdown-content label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.dropdown-content label:hover {
    background-color: #f5f5f5;
}

.dropdown-content input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* View Toggle States */
.view-toggle.active {
    background-color: #95b70f;
    color: white;
}

/* RFQ Cards Grid */
.rfq-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    padding: 20px;
}

.rfq-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.rfq-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.rfq-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.rfq-card .card-body {
    padding: 16px;
}

.rfq-card .rfq-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 8px 0;
}

.rfq-card .rfq-code {
    font-size: 13px;
    color: #666;
    margin: 0 0 16px 0;
}

.rfq-card .card-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rfq-card .detail-item {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.rfq-card .detail-label {
    color: #666;
}

.rfq-card .detail-value {
    color: #1a1a1a;
    font-weight: 500;
}

.rfq-card .card-footer {
    padding: 16px;
    border-top: 1px solid #f0f0f0;
}

.rfq-card .card-footer button {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rfq-card .btn-primary {
    background-color: #95b70f;
    color: white;
}

.rfq-card .btn-primary:hover {
    background-color: #7a9a0a;
}

.rfq-card .btn-secondary {
    background-color: #f0f0f0;
    color: #333;
}

.rfq-card .btn-secondary:hover {
    background-color: #e0e0e0;
}

.rfq-card .btn-success {
    background-color: #4caf50;
    color: white;
}

.rfq-card .btn-success:hover {
    background-color: #45a049;
}

/* Responsive */
@media (max-width: 1200px) {
    .rfq-table-container {
        overflow-x: auto;
    }
    
    .rfq-table {
        min-width: 900px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 80px;
    }
    
    .nav-item span,
    .user-info,
    .dropdown-icon,
    .logo-arabic {
        display: none;
    }
    
    .content-header,
    .filters-section,
    .rfq-table-container,
    .pagination-container {
        padding-left: 24px;
        padding-right: 24px;
    }
    
    .filter-chips {
        display: none;
    }
}

/* Fix notification button clickability and alignment */
.notification-container {
    position: relative;
    display: flex;
    align-items: center;
}

.notification-btn {
    pointer-events: auto !important;
    cursor: pointer !important;
    z-index: 999 !important;
}

/* Ensure dropdown is positioned correctly */
.notification-dropdown {
    z-index: 1000 !important;
}

/* Dropdown menus */
.dropdown-menu {
    display: none;
    position: absolute;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    min-width: 200px;
    overflow: hidden;
    z-index: 1000;
}

/* User profile dropdown positioning */
#userProfileDropdown {
    position: fixed;
    bottom: 80px;
    left: 16px;
    width: 228px;
    max-width: 240px;
}

.dropdown-menu.show {
    display: block !important;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: #374151;
    text-decoration: none;
    transition: background-color 0.2s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
}

.dropdown-item:hover {
    background-color: #f3f4f6;
}

.dropdown-divider {
    height: 1px;
    background-color: #e5e7eb;
    margin: 4px 0;
}

.logout-btn {
    color: #ef4444;
}