/* Utility Classes */
.mb-0 { margin-bottom: 0; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.d-flex { display: flex; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-primary { color: var(--primary); }
.text-sm { font-size: 0.875rem; }

.bg-primary-light { background-color: rgba(37, 135, 232, 0.1); }
.bg-success-light { background-color: rgba(45, 190, 140, 0.1); }
.bg-warning-light { background-color: rgba(244, 183, 64, 0.1); }
.bg-danger-light { background-color: rgba(239, 83, 80, 0.1); }

/* Dashboard Grids */
.dashboard-grid {
    display: grid;
    gap: 1.5rem;
}

.stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.main-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
    align-items: start;
}

@media (max-width: 1100px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
}

/* Stat Card */
.stat-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
}

.stat-title {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.stat-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Quick Actions */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background-color: var(--background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    transition: all 0.2s ease;
}

.action-btn i {
    font-size: 1.5rem;
    color: var(--primary);
}

.action-btn span {
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
}

.action-btn:hover {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.action-btn:hover i {
    color: white;
}

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

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

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

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.activity-details {
    flex: 1;
}

.activity-text {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.activity-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* ==========================================================================
   Dashboard Center Booking Calendar (Read Only)
   ========================================================================== */
.badge-readonly {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    white-space: nowrap;
}

.dash-calendar-card {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.dash-cal-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.dash-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(36px, 1fr));
    border-top: 1px solid var(--border-color);
    border-left: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    min-width: 320px;
}

.dash-calendar-cell {
    min-height: 68px;
    padding: 0.3rem 0.25rem;
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    background: var(--card-bg);
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
    min-width: 0;
    transition: background-color 0.15s ease;
}

.dash-calendar-cell:hover {
    background-color: #f8fafc;
}

.dash-calendar-cell.other-month {
    background-color: #fafbfc;
    color: #94a3b8;
}

.dash-calendar-cell.selected {
    background-color: #eff6ff !important;
    outline: 2px solid var(--primary);
    outline-offset: -2px;
    z-index: 2;
}

.dash-calendar-cell.today .cell-date-num {
    background: var(--primary);
    color: #ffffff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.dash-cal-legend {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.6rem;
    font-size: 0.72rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.legend-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    margin-right: 4px;
}

.dot-confirmed { background: #10b981; }
.dot-tentative { background: #f59e0b; }
.dot-completed { background: #3b82f6; }

.dash-day-inspector-section {
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 0.85rem;
}

.dash-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.65rem;
    margin-top: 0.65rem;
}

.dash-slot-item {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.65rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: border-color 0.15s ease;
}

.dash-slot-item:hover {
    border-color: #cbd5e1;
}

.dash-slot-title {
    font-size: 0.775rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.2rem;
}

.dash-slot-time {
    font-size: 0.68rem;
    color: var(--text-secondary);
}

.dash-slot-booking {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 0.35rem 0.5rem;
    margin-top: 0.4rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.dash-slot-booking:hover {
    border-color: var(--primary);
    background: #eff6ff;
}

.dash-slot-empty {
    font-size: 0.72rem;
    color: var(--text-secondary);
    background: rgba(241, 245, 249, 0.7);
    border: 1px dashed #cbd5e1;
    border-radius: 4px;
    padding: 0.45rem;
    text-align: center;
    margin-top: 0.4rem;
}
