/* Dashboard 3 Premium Widgets Styling */
:root {
    --hosp-primary: #4e73df;
    --hosp-success: #1cc88a;
    --hosp-info: #36b9cc;
    --hosp-warning: #f6c23e;
    --hosp-danger: #e74a3b;
    --hosp-bg-soft: #f8f9fc;
    --card-radius: 20px;
    --card-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
}

/* Card Enhancements */
.card-premium {
    border: none;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 24px;
    overflow: hidden;
    background: #fff;
}

.card-premium:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 2rem 0 rgba(58, 59, 69, 0.15);
}

.card-premium .card-header {
    background: transparent;
    border-bottom: 1px solid #f1f5f9;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-premium .card-header h5 {
    margin: 0;
    font-weight: 700;
    color: #334155;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Doctor Cards */
.doctor-card {
    text-align: center;
    padding: 20px;
    border-radius: 15px;
    background: var(--hosp-bg-soft);
    border: 1px solid #edf2f7;
    height: 100%;
}

.doctor-img-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
}

.doctor-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.status-indicator {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 2px solid #fff;
}

.status-free { background-color: var(--hosp-success); }
.status-busy { background-color: var(--hosp-danger); }
.status-unavailable { background-color: #94a3b8; }

/* Soft Badges */
.bg-success-soft { background-color: rgba(28, 200, 138, 0.15); }
.bg-warning-soft { background-color: rgba(246, 194, 62, 0.15); }
.bg-danger-soft { background-color: rgba(231, 74, 59, 0.15); }
.bg-info-soft { background-color: rgba(54, 185, 204, 0.15); }
.bg-primary-soft { background-color: rgba(78, 115, 223, 0.15); }
.bg-purple-soft { background-color: rgba(111, 66, 193, 0.15); }
.bg-secondary-soft { background-color: rgba(108, 117, 125, 0.15); }

.text-purple { color: #6f42c1; }

/* Emergency Alert Card */
.emergency-alert-card {
    background: linear-gradient(135deg, #ff5f6d 0%, #ffc371 100%);
    color: #fff;
    border: none;
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(231, 74, 59, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(231, 74, 59, 0); }
    100% { box-shadow: 0 0 0 0 rgba(231, 74, 59, 0); }
}

/* Heatmap Styling */
.bed-heatmap {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(30px, 1fr));
    gap: 8px;
    padding: 10px;
}

.bed-cell {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s;
}

.bed-cell:hover {
    transform: scale(1.2);
}

.bed-occupied { background-color: #4e73df; }
.bed-available { background-color: #e2e8f0; }

/* Lab Results Widget */
.lab-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s ease;
}

.lab-result-item:hover {
    padding-left: 5px;
    background-color: rgba(0,0,0,0.02);
}

.lab-result-item:last-child {
    border-bottom: none;
}

.dark-theme .lab-result-item:hover {
    background-color: rgba(255,255,255,0.05);
}

.lab-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

/* Task Center */
.task-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    border-radius: 12px;
    background: var(--hosp-bg-soft);
    margin-bottom: 12px;
}

.task-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

/* Modern Card Enhancements */
.card-modern {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}

.card-modern .card-header {
    border-bottom: none;
    padding: 20px;
}

.card-modern .card-body {
    padding: 15px 24px 24px;
}

.diagnosis-item {
    padding: 12px 16px;
    border-radius: 16px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
}

.diagnosis-item:hover {
    background: #fff;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.performance-metric {
    background: #fff;
    padding: 16px;
    border-radius: 18px;
    margin-bottom: 12px;
    border: 1px solid #f1f5f9;
}

.summary-stat-box {
    padding: 20px;
    border-radius: 20px;
    background: linear-gradient(145deg, #ffffff, #f0f4f8);
    box-shadow: 5px 5px 15px #e1e5e9, -5px -5px 15px #ffffff;
    margin-bottom: 15px;
}

.summary-stat-box h2 {
    font-size: 28px;
    margin-bottom: 4px;
}

/* Appointment Table Scroll */
.appointment-table-scroll {
    height: 400px;
    position: relative;
    overflow-y: auto;
}

.lab-results-scroll {
    height: 350px;
    position: relative;
    overflow-y: auto;
}

.new-patient-scroll {
    height: 350px;
    position: relative;
    overflow-y: auto;
}

.task-center-scroll {
    height: 350px;
    position: relative;
    overflow-y: auto;
}

.sticky-top {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #f8f9fa !important;
}

.dark-theme .sticky-top {
    background-color: #1a202c !important;
}

/* Dark Theme Support */
.dark-theme .card,
.dark-theme .card-box,
.dark-theme .card-premium {
    background: #1f2937 !important;
    border: 1px solid #374151 !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2) !important;
}

.dark-theme .card-premium .card-header,
.dark-theme .card-head {
    border-bottom: 1px solid #374151 !important;
}

.dark-theme .card-premium .card-header h5,
.dark-theme .card-head header {
    color: #edf2f7 !important;
}

.dark-theme .card-premium .card-body h4 {
    color: #e2e8f0;
}

.dark-theme .card-premium .card-body .text-muted {
    color: #a0aec0 !important;
}

.dark-theme .col-green {
    color: #4ade80 !important;
}

.dark-theme .doctor-card {
    background: #111827;
    border-color: #374151;
}

.dark-theme .doctor-card .fw-bold {
    color: #e2e8f0;
}

.dark-theme .doctor-img {
    border-color: #374151;
}

.dark-theme .bed-available {
    background-color: #374151;
}

.dark-theme .lab-result-item {
    border-bottom-color: #374151;
}

.dark-theme .lab-result-item .fw-bold {
    color: #e2e8f0;
}

.dark-theme .task-item {
    background: #111827;
    border-color: #374151;
}

.dark-theme .task-item .fw-bold {
    color: #e2e8f0;
}

/* Modern Card Dark Theme */
.dark-theme .card-modern {
    background: rgba(31, 41, 55, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.dark-theme .diagnosis-item {
    background: #111827;
    border-color: #374151;
    color: #cbd5e0;
}

.dark-theme .diagnosis-item:hover {
    background: #1f2937;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.dark-theme .performance-metric {
    background: #111827;
    border-color: #374151;
    color: #cbd5e0;
}

.dark-theme .summary-stat-box {
    background: linear-gradient(145deg, #1f2937, #111827);
    box-shadow: 5px 5px 15px #0d1117, -5px -5px 15px #263142;
}

.dark-theme .summary-stat-box h2 {
    color: #fff;
}

.dark-theme .summary-stat-box .text-muted {
    color: #a0aec0 !important;
}

.dark-theme .progress {
    background-color: #374151;
}

.dark-theme .table thead.bg-light {
    background-color: #111827 !important;
}

.dark-theme .table thead th {
    color: #a0aec0;
    border-bottom-color: #374151;
}

.dark-theme .table td {
    color: #cbd5e0;
    border-bottom-color: #374151;
}

.dark-theme .btn-light {
    background-color: #374151;
    border-color: #374151;
    color: #e2e8f0;
}

.dark-theme .btn-light:hover {
    background-color: #1f2937;
    border-color: #1f2937;
}

.dark-theme .form-control {
    background-color: #111827;
    border-color: #374151;
    color: #e2e8f0;
}

.dark-theme .input-group-text {
    background-color: #1f2937;
    border-color: #374151;
    color: #e2e8f0;
}
