/* === COMPACT WIDGET GRID SYSTEM === */
.dashboard-widgets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
    grid-auto-rows: minmax(180px, auto);
}

/* Widget Card Base */
.widget-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    padding: 1.25rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

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

/* Widget Sizes */
.widget-1x1 { grid-column: span 1; grid-row: span 1; }
.widget-2x1 { grid-column: span 2; grid-row: span 1; }
.widget-1x2 { grid-column: span 1; grid-row: span 2; }
.widget-2x2 { grid-column: span 2; grid-row: span 2; }
.widget-3x1 { grid-column: span 3; grid-row: span 1; }

/* Widget Header */
.widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(0,0,0,0.05);
}

.widget-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.widget-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

/* Widget Body */
.widget-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

/* Stat Widget Styles */
.widget-stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.widget-stat-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.widget-stat-change {
    font-size: 0.75rem;
    color: var(--success);
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Business Profile Widget (2x2) */
.widget-business-profile {
    cursor: pointer;
}

.widget-profile-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.widget-profile-logo {
    width: 60px;
    height: 60px;
    background: #f3f4f6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    overflow: hidden;
}

.widget-profile-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.widget-profile-info h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #1f2937;
    font-weight: 700;
}

.widget-profile-info p {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    color: #6b7280;
}

.widget-profile-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    font-size: 0.75rem;
}

.widget-profile-item {
    padding: 0.5rem;
    background: #f9fafb;
    border-radius: 6px;
}

.widget-profile-item strong {
    display: block;
    color: #374151;
    margin-bottom: 0.25rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.widget-profile-item span {
    color: #6b7280;
    font-size: 0.8rem;
}

/* Payment Widget */
.widget-payment {
    background: linear-gradient(135deg, #fee2e2 0%, #fef3c7 100%);
    border-left: 4px solid #ef4444;
}

.widget-payment .widget-body {
    text-align: center;
}

.widget-payment-days {
    font-size: 2.5rem;
    font-weight: 700;
    color: #dc2626;
    margin-bottom: 0.25rem;
}

.widget-payment-label {
    font-size: 0.875rem;
    color: #991b1b;
    font-weight: 600;
}

.widget-payment-btn {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.widget-payment-btn:hover {
    background: #b91c1c;
    transform: translateY(-1px);
}

/* Recent Jobs Widget */
.widget-jobs-list {
    max-height: 100%;
    overflow-y: auto;
}

.widget-job-item {
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.widget-job-item:hover {
    background: #f3f4f6;
    transform: translateX(2px);
}

.widget-job-item:last-child {
    margin-bottom: 0;
}

.widget-job-address {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.widget-job-date {
    font-size: 0.75rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.widget-job-price {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--success);
    margin-top: 0.25rem;
}

/* Mini Calendar Widget */
.widget-calendar {
    font-size: 0.75rem;
}

.widget-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: #1f2937;
}

.widget-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    text-align: center;
}

.widget-calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #6b7280;
}

.widget-calendar-day.header {
    font-weight: 600;
    color: #374151;
    font-size: 0.7rem;
}

.widget-calendar-day.today {
    background: var(--primary);
    color: white;
    font-weight: 600;
}

.widget-calendar-day.has-event {
    background: #dbeafe;
    color: var(--primary);
    font-weight: 600;
}

/* Quick Actions Widget */
.widget-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.widget-action-btn {
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.widget-action-btn i {
    font-size: 1.5rem;
}

.widget-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Responsive Widget Grid */
@media (max-width: 1024px) {
    .dashboard-widgets {
        grid-template-columns: repeat(2, 1fr);
    }
    .widget-2x2 { grid-column: span 2; }
    .widget-3x1 { grid-column: span 2; }
}

@media (max-width: 768px) {
    .dashboard-widgets {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }
    .widget-1x1, .widget-2x1, .widget-1x2, .widget-2x2, .widget-3x1 {
        grid-column: span 1;
        grid-row: span 1;
    }
    .widget-profile-grid {
        grid-template-columns: 1fr;
    }
    .widget-actions {
        grid-template-columns: 1fr;
    }
}
