/* Agent Dashboard CSS */

/* Main Dashboard Container */
.agent-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

.dashboard-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    gap: 16px;
}

/* Dashboard Header */
.dashboard-header {
    background: linear-gradient(135deg, #2e4d8e 0%, #2a4580 100%);
    color: white;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.header-content h1 {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.welcome-message {
    font-size: 18px;
    opacity: 0.9;
    margin: 0;
}

.header-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.stat-card {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 16px 20px;
    text-align: center;
    min-width: 100px;
    backdrop-filter: blur(10px);
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Dashboard Navigation */
.dashboard-navigation {
    display: flex;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 32px;
    overflow-x: auto;
}

.nav-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
}

.nav-tab:hover {
    color: #e99a37;
    background-color: rgba(233, 154, 55, 0.05);
}

.nav-tab.active {
    color: #2e4d8e;
    border-bottom-color: #2e4d8e;
    background-color: rgba(46, 77, 142, 0.1);
}

.nav-tab i {
    font-size: 16px;
}

/* Dashboard Content */
.dashboard-content {
    min-height: 500px;
}

/* Overview Tab */
.overview-tab {
    display: grid;
    gap: 24px;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.dashboard-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

.card-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #32325d;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-content {
    padding: 24px;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.quick-action-btn.primary {
    background: linear-gradient(135deg, #2e4d8e 0%, #2a4580 100%);
    color: white;
}

.quick-action-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(46, 77, 142, 0.3);
}

.quick-action-btn.secondary {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #e9ecef;
}

.quick-action-btn.secondary:hover {
    background: #e9ecef;
    color: #32325d;
}

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f1f3f4;
}

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

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    flex-shrink: 0;
}

.activity-content p {
    margin: 0 0 4px 0;
    font-size: 14px;
    color: #32325d;
}

.activity-content small {
    font-size: 12px;
    color: #6c757d;
}

/* Billing Status */
.billing-status {
    text-align: center;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

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

.status-badge i {
    font-size: 8px;
}

.status-description {
    color: #6c757d;
    margin-bottom: 16px;
}

/* Listings Tab */
.listings-tab .tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.tab-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #32325d;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

.empty-icon i {
    font-size: 32px;
}

.empty-state h3 {
    margin: 0 0 8px 0;
    color: #32325d;
    font-size: 20px;
}

.empty-state p {
    color: #6c757d;
    margin: 0 0 24px 0;
}

.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.listing-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.listing-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.listing-image {
    height: 200px;
    background: #f8f9fa;
    position: relative;
    overflow: hidden;
}

.listing-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 32px;
}

.listing-content {
    padding: 20px;
}

.listing-content h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #32325d;
}

.listing-location {
    color: #6c757d;
    font-size: 14px;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.listing-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 12px;
    color: #6c757d;
}

.listing-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.listing-actions {
    display: flex;
    gap: 8px;
}

/* Analytics Tab */
.analytics-tab .tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.date-filter select {
    padding: 8px 12px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    background: white;
}

.analytics-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.analytics-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 24px;
}

.analytics-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 0;
    border: none;
    background: none;
}

.analytics-card .card-header h3 {
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.analytics-card .card-header i {
    color: #2e4d8e;
    font-size: 20px;
}

.metric-value {
    font-size: 32px;
    font-weight: 700;
    color: #32325d;
    margin-bottom: 8px;
}

.metric-change {
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.metric-change.positive {
    color: #28a745;
}

.metric-change.negative {
    color: #dc3545;
}

.chart-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 24px;
}

.chart-container h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #32325d;
}

.chart-placeholder {
    height: 300px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

/* Profile Tab */
.profile-form {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 32px;
}

.form-sections {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.form-section h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #32325d;
    padding-bottom: 12px;
    border-bottom: 1px solid #e9ecef;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-weight: 500;
    color: #32325d;
    font-size: 14px;
}

.form-control {
    padding: 12px 16px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.15s ease;
}

.form-control:focus {
    outline: none;
    border-color: #2e4d8e;
    box-shadow: 0 0 0 2px rgba(46, 77, 142, 0.1);
}

.form-actions {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e9ecef;
}

/* Billing Tab */
.billing-tab {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 8px;
}

/* Utility Classes */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #2e4d8e 0%, #2a4580 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #2a4580 0%, #253d72 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(46, 77, 142, 0.3);
}

.btn-outline-primary {
    border-color: #e99a37;
    color: #e99a37;
    background-color: transparent;
}

.btn-outline-primary:hover:not(:disabled) {
    background-color: #e99a37;
    color: white;
}

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

.btn-outline-secondary:hover:not(:disabled) {
    background-color: #6c757d;
    color: white;
}

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

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.text-blue { color: #2e4d8e; }
.text-orange { color: #e99a37; }
.text-green { color: #28a745; }
.text-muted { color: #6c757d; }

/* Responsive Design */
@media (max-width: 768px) {
    .agent-dashboard {
        padding: 16px;
    }

    .dashboard-header {
        padding: 24px;
        flex-direction: column;
        text-align: center;
    }

    .header-stats {
        justify-content: center;
    }

    .dashboard-navigation {
        margin-bottom: 24px;
    }

    .nav-tab {
        padding: 12px 16px;
        font-size: 13px;
    }

    .dashboard-cards {
        grid-template-columns: 1fr;
    }

    .listings-grid {
        grid-template-columns: 1fr;
    }

    .analytics-cards {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .tab-header {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 480px) {
    .dashboard-navigation {
        flex-direction: column;
    }

    .nav-tab {
        border-bottom: 1px solid #e9ecef;
        border-radius: 0;
        justify-content: flex-start;
    }

    .nav-tab.active {
        border-left: 3px solid #2e4d8e;
        border-bottom-color: #e9ecef;
    }

    .header-stats {
        flex-direction: column;
        width: 100%;
    }

    .stat-card {
        width: 100%;
    }
}