/* Dashboard Styles */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto 6rem;
    padding: 0;
    overflow-x: hidden; /* Added from general overflow rules */
}

/* Refined Header */
.dashboard-header {
    margin-bottom: 6rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3rem;
}

.user-profile {
    display: flex;
    align-items: flex-start;
    gap: 2.5rem;
}

.user-avatar {
    width: 120px;
    height: 120px;
    background: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 500;
    color: #000;
    border-radius: 50%;
    flex-shrink: 0;
    text-decoration: none;
}

.user-avatar > span {
    text-decoration: none;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.user-details {
    padding-top: 0.5rem;
}

.user-details h1 {
    font-size: 2.5rem;
    font-weight: 500;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    color: #000;
}

.user-details p {
    font-size: 1rem;
    color: #666;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.user-details p span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Section Headers */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1.5rem;
    /* border-bottom: 1px solid #eee; */
}

.section-header h3 { /* From original line 603 */
    margin: 0;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-title h2 {
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: #000;
}

/* Enhanced Action Cards */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
    /* background: #eee; */
    margin-bottom: 6rem;
}

.action-card {
    background: #fff;
    padding: 2.5rem;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-height: 280px;
    border: 1px solid #eee;
}

body.is-client .action-card.client-only,
body.is-both .action-card.client-only {
    display: flex;
}

body.is-vendor .action-card.vendor-only,
body.is-both .action-card.vendor-only {
    display: flex;
}

.action-icon {
    width: 56px;
    height: 56px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-icon i {
    font-size: 1.5rem;
    color: #000;
}

.action-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.action-card h3 {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: #000;
    letter-spacing: -0.01em;
}

.action-card p {
    font-size: 0.9375rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.action-card .btn {
    margin-top: auto;
    align-self: flex-start;
    padding: 0.875rem 1.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    background: #000;
    color: #fff;
    border: none;
    transition: transform 0.2s;
}

.action-card .btn:hover {
    transform: translateY(-1px);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1px;
    background: #eee;
    margin-bottom: 6rem;
}

.stat-card {
    background: #fff;
    padding: 2rem;
    transition: background-color 0.2s;
}

.stat-card:hover {
    background: #f8f8f8;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #666;
    margin-bottom: 1rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 500;
    letter-spacing: -0.03em;
    color: #000;
    margin-bottom: 0.5rem;
}

.stat-description {
    font-size: 0.875rem;
    color: #666;
}

/* Recent Activity */
.activity-list {
    display: grid;
    gap: 1px;
    background: #eee;
}

.activity-item {
    background: #fff;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    transition: background-color 0.2s;
}

.activity-item:hover {
    background: #f8f8f8;
}

.activity-icon {
    width: 48px;
    height: 48px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-icon i {
    font-size: 1.25rem;
    color: #000;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-size: 1rem;
    font-weight: 500;
    color: #000;
    margin-bottom: 0.5rem;
}

.activity-meta {
    font-size: 0.875rem;
    color: #666;
    display: flex;
    gap: 1rem;
}

.activity-time {
    color: #999;
}

/* Empty States */
.empty-state {
    padding: 4rem 2rem;
    text-align: center;
    background: #fff;
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
}

.empty-state-icon i {
    font-size: 1.5rem;
    color: #999;
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 500;
    color: #000;
    margin-bottom: 1rem;
}

.empty-state p {
    font-size: 0.9375rem;
    color: #666;
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.6;
}

.dashboard-summary {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.summary-card {
    background-color: #fff;
    border-radius: 0;
    padding: 1.5rem;
    /* box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); */
    text-align: center;
}

.summary-count {
    font-size: 3rem;
    font-weight: bold;
    color: #000;
    margin: 1rem 0;
}

.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
}

/* General Card Styling for Dashboard Lists */
.card {
    border-radius: 0;
    overflow: hidden;
    /* box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); 
    transition: transform 0.2s, box-shadow 0.2s; */
    height: 100%; /* from line 1082 */
    display: flex; /* from line 1083 */
    flex-direction: column; /* from line 1084 */
}

.card:hover {
    /* transform: translateY(-5px); 
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15); */
}

.card-header {
    background-color: white;
    padding: 2rem;
    padding-bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h4 {
    margin: 0;
    font-size: 1.1rem;
}

.card-body { /* from line 1101 & 1086 */
    padding: 2rem;
    background-color: white;
    flex: 1; 
}

.card-footer {
    background-color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
}

/* Status Badges */
.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0; /* from original .status-badge */
    font-size: 0.8rem; /* from original .status-badge */
    font-weight: bold;
    text-transform: uppercase;
}

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

.status-warning {
    background-color: #fff3cd;
    color: #856404;
}

.status-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.status-primary {
    background-color: #cce5ff;
    color: #004085;
}

.status-secondary {
    background-color: #e2e3e5;
    color: #383d41;
}

.tender-meta, .bid-meta { /* tender-meta from line 679, bid-meta from 679 */
    display: flex;
    justify-content: space-between;
    color: #6c757d;
    font-size: 0.9rem;
}

.description {
    height: 3em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.bid-amount {
    font-size: 2rem;
    font-weight: bold;
    color: #28a745;
    text-align: center;
    margin: 1rem 0;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    grid-column: 1 / -1;
    margin-bottom: 1rem; /* from original .loading-spinner */
}

.loading-spinner i { /* from .loading-spinner i at 2006 */
    font-size: 3rem;
    color: #000;
    animation: spin 1s linear infinite;
}

.spinner { /* from original .spinner */
    border: 4px solid rgb(0 0 0 / 10%);
    border-radius: 50%;
    border-top: 4px solid #000;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    /* margin-bottom: 1rem; combined with .loading-spinner */
}

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

/* User type visibility classes */
.client-only {
    display: none;
}

.vendor-only {
    display: none;
}

.logged-in-only {
    display: none;
}

.logged-out-only {
    display: none;
}

/* When these classes are applied to the body based on user state */
body.is-client .client-only,
body.is-both .client-only,
body.is-vendor .vendor-only,
body.is-both .vendor-only,
body.is-logged-in .logged-in-only,
body.is-logged-out .logged-out-only {
    display: block;
}

/* For inline elements */
span.client-only,
span.vendor-only,
span.logged-in-only,
span.logged-out-only,
a.client-only,
a.vendor-only,
a.logged-in-only,
a.logged-out-only,
button.client-only,
button.vendor-only,
button.logged-in-only,
button.logged-out-only {
    display: inline;
}

/* For flex items */
.flex-container .client-only,
.flex-container .vendor-only,
.flex-container .logged-in-only,
.flex-container .logged-out-only {
    display: flex;
}

/* Dashboard main content */
.dashboard-main-content {
    margin-bottom: 2rem;
}

/* Dashboard sections */
.dashboard-section {
    /* background-color: #fff; */
    border-radius: 0;
    /* padding: 1.5rem; */
    margin-bottom: 2rem;
    /* box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); */
}


/* Dashboard Tender Card */
.dashboard-tender-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: #fff;
    border: 1px solid #e9ecef;
    margin-bottom: 1rem;
}

.tender-main {
    flex: 1;
    min-width: 0; /* Prevents flex item from overflowing */
    width: 100%;
}

.tender-header .tender-title { /* This is .tender-title within a .tender-header context */
    font-size: 1.125rem;
    font-weight: 500;
    margin: 0 0 0.5rem;
    color: #000;
}

.tender-meta span { /* This is a more specific version of .tender-meta > span */
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tender-details {
    display: flex;
    align-items: center;
    gap: 2rem;
    color: #666;
    font-size: 0.875rem;
}

.tender-status {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    display: inline-block;
}

/* Dashboard Main Boxes */
.dashboard-main-boxes {
    margin-top: 3rem;
}

.main-boxes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.main-box {
    background: #fff;
    padding: 2.5rem;
    border: 1px solid #eee;
    border-radius: 0;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 280px;
}

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

.box-icon {
    width: 64px;
    height: 64px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 1.5rem;
}

.box-icon i {
    font-size: 1.75rem;
    color: #000;
}

.main-box h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #000;
    letter-spacing: -0.01em;
}

.main-box p {
    font-size: 1rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 2rem;
    flex: 1;
}

.main-box .btn {
    margin-top: auto;
    align-self: center;
    padding: 0.875rem 1.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    background: #000;
    color: #fff;
    border: none;
    transition: transform 0.2s;
}

.main-box .btn:hover {
    transform: translateY(-1px);
    background: #333;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .user-info { /* Assuming .user-info was part of .dashboard-header or similar structure */
        flex-direction: column;
        text-align: center;
    }

    .user-info button {
        margin-top: 1rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .section-header .btn {
        margin-top: 1rem;
    }

    /* .filter-controls is already in forms.css, but if one is specific to dashboard: */
    /* .dashboard-container .filter-controls { flex-direction: column; } */

    .main-boxes-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .main-box {
        padding: 2rem;
        min-height: 240px;
    }
    
    .box-icon {
        width: 56px;
        height: 56px;
    }
    
    .box-icon i {
        font-size: 1.5rem;
    }
    
    .main-box h3 {
        font-size: 1.25rem;
    }
}

/* Tablet responsive */
@media (min-width: 769px) and (max-width: 1024px) {
    .main-boxes-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* Dashboard Styles - Large Screen Optimization */
@media (min-width: 1400px) {
 /* layout for summary cards on large screens */
    .dashboard-summary {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Use a 3-column layout for action cards on large screens */
    .actions-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Make the admin stats grid show all items in one row */
    .admin-stats-grid { /* Assuming this class exists or will be added */
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Extra large screens */
@media (min-width: 1800px) {
    /* Show more items per row on very large screens */

    /* Use a 4-column layout for action cards on very large screens */
    .actions-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.dashboard-container,
.actions-grid,
.stats-grid,
.activity-list,
.dashboard-summary
{
    overflow-x: hidden; /* From general overflow rules */
} 