/* =========================
   Admin Dashboard Styles
========================= */

/* Dashboard Widgets */
.widget-card {
    background: linear-gradient(135deg, var(--gray) 0%, #f9f9ff 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    transition: all 0.3s ease-in-out;
}
.widget-card .icon-and-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
.widget-icon {
    background-color: var(--secondary);
    color: #fff;
    border-radius: 0.75rem;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.75rem;
    box-shadow: 0 4px 8px rgba(74, 69, 255, 0.2);
}
.widget-icon.bg-secondary-theme {
    background-color: #64748b;
    box-shadow: 0 4px 8px rgba(100, 116, 139, 0.2);
}
.widget-icon.bg-success-theme {
    background-color: #10b981;
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.2);
}
.widget-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
    margin: 0;
}
.widget-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--dark);
}

/* Chart Cards */
.chart-card {
    min-height: 300px;
}

/* Activity Feed & Top Agents */
.activity-feed,
.top-agents {
    height: 100%;
    display: flex;
    flex-direction: column;
}
.activity-list,
.agent-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
    overflow-y: auto;
}
.activity-item,
.agent-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1rem 0;
    border-bottom: 1px solid #e2e8f0;
    opacity: 0;
    animation: fadeIn 0.5s ease-in-out forwards;
}
.activity-item:last-child,
.agent-item:last-child {
    border-bottom: none;
}
.activity-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--secondary);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.activity-item-content,
.agent-item-content {
    flex-grow: 1;
}
.activity-text {
    font-size: 0.95rem;
    color: var(--text-color);
    line-height: 1.4;
}
.activity-text strong {
    color: var(--dark);
    font-weight: 600;
}
.activity-timestamp,
.agent-location {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 0.25rem;
}

/* Badges */
.badge {
    font-weight: 600;
    padding: 0.5em 1em;
    border-radius: 1rem;
    font-size: 0.8rem;
    text-transform: capitalize;
}

/* Quick Actions */
.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    text-align: center;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 1rem;
    transition: all 0.2s ease-in-out;
}
.action-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}
.action-icon {
    font-size: 2rem;
    color: var(--primary);
}

/* Keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

.hover-scale:hover {
    transform: scale(1.05);
    transition: all 0.2s ease;
}

.stat {
    font-weight: 600;
    font-size: 0.9rem;
}

.grid-two-columns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

/* =========================
   Responsive Media Queries
========================= */
@media (max-width: 1100px) {
    .widget-card,
    .activity-feed,
    .top-agents {
        flex-direction: column;
    }
}
@media (max-width: 768px) {
    .widget-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    .activity-item,
    .agent-item {
        gap: 0.75rem;
        padding: 0.75rem 0;
    }
    .activity-text {
        font-size: 0.9rem;
    }
    .activity-timestamp,
    .agent-location {
        font-size: 0.75rem;
    }
}
@media (max-width: 480px) {
    .widget-value {
        font-size: 1.75rem;
    }
    .widget-title {
        font-size: 0.9rem;
    }
}
