/* 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: #f8f8f8;
    color: #1a1a1a;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Dashboard Container */
.dashboard-container {
    display: flex;
    height: 100vh;
}

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

.sidebar-header {
    padding: 24px;
}

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

.logo-img {
    height: 32px;
    width: auto;
    display: block;
}

.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;
    position: relative;
    z-index: 100;
    user-select: none;
}

.user-profile:hover {
    background: #ddd9d1;
}

.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;
}

.content-header {
    padding: 40px 48px 32px;
    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;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding: 0 48px 48px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.stat-header {
    margin-bottom: 16px;
}

.stat-label {
    font-size: 14px;
    color: #666;
}

.stat-content {
    margin-bottom: 8px;
}

.stat-value {
    font-size: 36px;
    font-weight: 500;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.percent {
    font-size: 24px;
    font-weight: 400;
}

.stat-change {
    font-size: 13px;
    color: #666;
}

.stat-change.positive {
    color: #95b70f;
}

.stat-chart {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 120px;
    height: 60px;
}

/* Tables Section */
.tables-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    padding: 0 48px 48px;
}

.table-container {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.table-header h3 {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 4px;
}

.table-header p {
    font-size: 14px;
    color: #666;
    margin-bottom: 24px;
}

/* Inquiry List */
.inquiry-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.inquiry-item {
    display: grid;
    grid-template-columns: 40px 1fr auto auto;
    gap: 16px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

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

.inquiry-icon svg {
    color: #666;
}

.inquiry-info h4 {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 4px;
}

.inquiry-info p {
    font-size: 13px;
    color: #666;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.pending {
    background: #FFF4E5;
    color: #F59E0B;
}

.status-badge.awarded {
    background: #D1FAE5;
    color: #10B981;
}

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

/* Quote List */
.quote-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.quote-item {
    display: grid;
    grid-template-columns: 40px 1fr auto auto;
    gap: 16px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

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

.quote-icon svg {
    color: #666;
}

.quote-info h4 {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 4px;
}

.quote-info p {
    font-size: 13px;
    color: #666;
}

.amount {
    font-size: 15px;
    font-weight: 500;
}

/* View All Link */
.view-all {
    display: inline-block;
    font-size: 14px;
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 500;
    margin-top: 8px;
}

.view-all:hover {
    text-decoration: underline;
}

/* Dashboard Footer */
.dashboard-footer {
    padding: 24px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #e5e5e5;
    background: white;
    margin-top: auto;
}

.footer-logo {
    font-size: 18px;
    font-weight: 500;
    letter-spacing: -0.02em;
}

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

/* Responsive */
@media (max-width: 1400px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 1200px) {
    .tables-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 80px;
    }
    
    .nav-item span,
    .user-info,
    .dropdown-icon,
    .logo-arabic {
        display: none;
    }
    
    .sidebar-header {
        text-align: center;
    }
    
    .user-profile {
        justify-content: center;
        padding: 8px;
    }
    
    .content-header,
    .stats-grid,
    .tables-section,
    .dashboard-footer {
        padding-left: 24px;
        padding-right: 24px;
    }
}

/* 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;
    z-index: 9999 !important;
}

.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;
}

/* Dashboard Table Styling */
.dashboard-table {
    width: 100%;
    border-collapse: collapse;
}

.dashboard-table thead {
    border-bottom: 1px solid #f0f0f0;
}

.dashboard-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.dashboard-table tbody tr:hover {
    background: #fafafa;
    cursor: pointer;
}

.dashboard-table td {
    padding: 16px;
    font-size: 14px;
}

/* Center status columns in dashboard tables */
.inquiries-table th:nth-child(2),
.inquiries-table td:nth-child(2),
.quotes-table th:last-child,
.quotes-table td:last-child {
    text-align: center !important;
}

/* Ensure TIME column header is also centered */
.inquiries-table th:nth-child(3),
.quotes-table th:nth-child(2) {
    text-align: center !important;
}

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

.inquiry-title {
    font-weight: 500;
    color: #1a1a1a;
    line-height: 1.4;
}

.inquiry-number {
    font-size: 12px;
    color: #666;
    font-family: 'Monaco', 'Courier New', monospace;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.status-badge.status-new {
    background: #e2f699;
    color: #716d52;
}

.status-badge.status-viewed {
    background: #e2f699;
    color: #716d52;
}

.status-badge.status-responded {
    background: #e3f2fd;
    color: #1976d2;
}

.status-badge.status-submitted {
    background: #e3f2fd;
    color: #1976d2;
}

.status-badge.status-accepted {
    background: #d4edda;
    color: #155724;
}

.status-badge.status-rejected {
    background: #ffebee;
    color: #c62828;
}

.status-badge.status-draft {
    background: #f0f0f0;
    color: #666;
}

/* Time info */
.time-info {
    font-size: 13px;
    color: #666;
}

/* Quote amount styling */
.quote-amount {
    font-weight: 500;
    color: #1a1a1a;
    font-size: 14px;
}

/* View all button styling */
.view-all {
    display: block;
    text-align: center;
    padding: 10px 24px;
    background: #1a1a1a;
    color: white;
    text-decoration: none;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    margin: 20px auto 0;
    width: fit-content;
}

.view-all:hover {
    background: #000;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Table list containers */
.inquiry-list,
.quote-list {
    background: white;
    border-radius: 8px;
    padding-bottom: 16px;
}

.inquiry-list table,
.quote-list table {
    margin-bottom: 0;
}

/* Additional status styles */
.status-badge.status-accepted {
    background: #d4edda;
    color: #155724;
}

.status-badge.status-rejected {
    background: #ffebee;
    color: #c62828;
}

.status-badge.status-draft {
    background: #f0f0f0;
    color: #666;
}

.status-badge.status-quoted,
.status-badge.status-responded {
    background: #e3f2fd;
    color: #1976d2;
}