/* Modern Hospital Dashboard Cards - Custom Unique Design */
.admin-card-container {
    background: #ffffff;
    border-radius: 20px;
    padding: 24px; /* Restored padding for safety */
    position: relative;
    overflow: hidden; /* Ensures content doesn't bleed out */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #edf2f7;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    height: 100%;
}

.admin-card-container:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
}

.card-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-right: 24px; /* Offset for internal padding removal if needed */
}

.card-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.bg-soft-blue { background-color: #ebf8ff; color: #3182ce; }
.bg-soft-green { background-color: #f0fff4; color: #38a169; }
.bg-soft-purple { background-color: #faf5ff; color: #805ad5; }
.bg-soft-orange { background-color: #fffaf0; color: #dd6b20; }

.card-label {
    font-size: 14px;
    font-weight: 600;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.main-metric {
    display: block;
    font-size: 36px;
    font-weight: 800;
    color: #1a202c;
    line-height: 1.2;
    margin-bottom: 8px;
}

.metric-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #4a5568;
    margin-bottom: 16px;
}

.trend-up { color: #38a169; font-weight: 600; }
.trend-down { color: #e53e3e; font-weight: 600; }

.status-pill {
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
}

.pill-active { background: #c6f6d5; color: #22543d; }
.pill-neutral { background: #edf2f7; color: #2d3748; }

.sub-metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
    margin-right: 24px; /* Keep grid inside */
}

.sub-metric-item {
    display: flex;
    flex-direction: column;
}

.sub-metric-val {
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
}

.sub-metric-name {
    font-size: 12px;
    color: #a0aec0;
}

/* Animations */
@keyframes pulse-soft {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.live-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #48bb78;
    display: inline-block;
    margin-right: 6px;
    animation: pulse-soft 2s infinite;
}

/* Unified Dark Theme for Standard Cards */
.dark-theme .card,
.dark-theme .card-box {
    background: #1f2937 !important;
    border: 1px solid #374151 !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2) !important;
}

.dark-theme .card-head {
    border-bottom: 1px solid #374151 !important;
    color: #e2e8f0 !important;
}

.dark-theme .card-head header {
    color: #edf2f7 !important;
}

.dark-theme .card-body {
    background: transparent !important;
    color: #cbd5e0 !important;
}

/* Dark Theme Support */
.dark-theme .admin-card-container {
    background: #1f2937;
    border-color: #374151;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

.dark-theme .admin-card-container:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
}

.dark-theme .card-label {
    color: #9ca3af;
}

.dark-theme .main-metric {
    color: #f3f4f6;
}

.dark-theme .metric-meta {
    color: #d1d5db;
}

.dark-theme .bg-soft-blue { background-color: rgba(59, 130, 246, 0.1); color: #60a5fa; }
.dark-theme .bg-soft-green { background-color: rgba(16, 185, 129, 0.1); color: #34d399; }
.dark-theme .bg-soft-purple { background-color: rgba(139, 92, 246, 0.1); color: #a78bfa; }
.dark-theme .bg-soft-orange { background-color: rgba(245, 158, 11, 0.1); color: #fbbf24; }

.dark-theme .pill-active { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.dark-theme .pill-neutral { background: rgba(55, 65, 81, 0.5); color: #d1d5db; }

.dark-theme .sub-metrics-grid {
    border-top-color: #374151;
}

.dark-theme .sub-metric-val {
    color: #f9fafb;
}

.dark-theme .sub-metric-name {
    color: #9ca3af;
}

/* Patient Statistic Card Styles */
.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-right: 24px; /* Adjust for chart space */
}

.stat-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a202c;
    margin: 0;
}

.view-all-link {
    font-size: 12px;
    font-weight: 600;
    color: #a0aec0;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: color 0.2s;
}

.view-all-link:hover {
    color: #4a90e2;
}

.stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.stat-row:last-child {
    margin-bottom: 0;
}

.stat-info {
    flex: 0 0 100px;
}

.stat-label {
    font-size: 14px;
    color: #a0aec0;
    margin-bottom: 4px;
    display: block;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #1a202c;
    display: block;
}

.stat-percent {
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.stat-percent.up { color: #f56565; } /* Red for In */
.stat-percent.down { color: #48bb78; } /* Green for Out */
.stat-percent.blue { color: #4a90e2; } /* Blue for Surgery */

.stat-chart-container {
    flex: 1;
    height: 60px;
    margin-left: 10px;
    overflow: hidden; /* Ensure SVG doesn't overflow */
}

/* Dark Theme for Patient Statistic */
.dark-theme .stat-card-title,
.dark-theme .stat-value {
    color: #f3f4f6;
}

.dark-theme .stat-label,
.dark-theme .view-all-link {
    color: #9ca3af;
}

/* Radial Analytics Card Styles */
.analytics-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 30px;
    margin-top: 0px;
}

.radial-chart-container {
    height: 250px;
    width: 100%;
    margin: 0 auto;
}

.analytics-legend {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #f1f5f9;
}

.legend-item {
    text-align: center;
}

.legend-label {
    font-size: 12px;
    color: #a0aec0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 4px;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
}

.dot-birth { background-color: #38b2ac; }
.dot-accident { background-color: #ed8936; }
.dot-death { background-color: #f56565; }

.legend-value {
    font-size: 16px;
    font-weight: 700;
    color: #1a202c;
}

/* Dark Theme for Radial Analytics */
.dark-theme .analytics-card-title,
.dark-theme .legend-value {
    color: #f3f4f6;
}

.dark-theme .analytics-legend {
    border-top-color: #374151;
}

/* Weekly Analytics Card Styles */
.weekly-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.weekly-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a202c;
    margin: 0;
}

.weekly-dropdown {
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.weekly-chart-container {
    height: 250px;
    width: 100%;
}

/* Dark Theme for Weekly Analytics */
.dark-theme .weekly-card-title {
    color: #f3f4f6;
}

.dark-theme .weekly-dropdown {
    color: #9ca3af;
}

/* Weekly Summary Styles */
.weekly-summary {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #f1f5f9;
}

.summary-item {
    text-align: center;
}

.summary-label {
    font-size: 12px;
    color: #a0aec0;
    display: block;
    margin-bottom: 4px;
}

.summary-value {
    font-size: 16px;
    font-weight: 700;
    color: #1a202c;
    display: block;
}

.summary-trend {
    font-size: 11px;
    font-weight: 600;
    margin-top: 2px;
}

.summary-trend.up { color: #48bb78; }
.summary-trend.down { color: #f56565; }

/* Dark Theme for Weekly Summary */
.dark-theme .weekly-summary {
    border-top-color: #374151;
}

.dark-theme .summary-value {
    color: #f3f4f6;
}


.patient-table-img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
    display: inline-block;
    vertical-align: middle;
}

.patient-name-col {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    vertical-align: middle;
    line-height: 30px;
}

.doctor-name-col {
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    vertical-align: middle;
    line-height: 30px;
}

.doctor-table-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 8px;
    vertical-align: middle;
}

.gender-badge {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.gender-male {
    background: #e6f0ff;
    color: #0066ff;
}

.gender-female {
    background: #fff0f7;
    color: #ff3399;
}

.action-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.action-icon {
    font-size: 16px;
    color: #718096;
    cursor: pointer;
    transition: color 0.2s;
}

.action-icon:hover {
    color: #4a90e2;
}

.action-icon.delete:hover {
    color: #f56565;
}

/* Dark Theme for Table */
.dark-theme .gender-male {
    background: rgba(0, 102, 255, 0.1);
    color: #66a3ff;
}

.dark-theme .gender-female {
    background: rgba(255, 51, 153, 0.1);
    color: #ff80bf;
}

.dark-theme .action-icon {
    color: #9ca3af;
}

/* Modern Doctor List Styles */

.doc-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    margin-bottom: 10px;
    background: #ffffff;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.doc-list-item:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
    transform: translateX(5px);
}

.doc-info-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.doc-avatar-img {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.doc-details-text {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.doc-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.doc-name-link {
    font-size: 15px;
    font-weight: 700;
    color: #1a202c;
    text-decoration: none;
    margin-bottom: 2px;
}

.doc-name-link:hover {
    color: #4a90e2;
}

.doc-qualification {
    font-size: 12px;
    color: #a0aec0;
    font-weight: 500;
}

.doc-status-badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.status-available {
    background: #f0fff4;
    color: #38a169;
}

.status-absent {
    background: #fff5f5;
    color: #e53e3e;
}

.status-leave {
    background: #fffaf0;
    color: #dd6b20;
}

/* Dark Theme for Doctor List */
.dark-theme .doc-list-item {
    background: #1f2937;
    border-color: #374151;
}

.dark-theme .doc-list-item:hover {
    background: #2d3748;
    border-color: #4a5568;
}

.dark-theme .doc-name-link {
    color: #f3f4f6;
}

.dark-theme .doc-qualification {
    color: #9ca3af;
}

.dark-theme .status-available {
    background: rgba(56, 161, 105, 0.1);
    color: #48bb78;
}

.dark-theme .status-absent {
    background: rgba(229, 62, 62, 0.1);
    color: #f56565;
}

.dark-theme .status-leave {
    background: rgba(221, 107, 32, 0.1);
    color: #ed8936;
}

/* ER Queue, Medication, and Alert List Styles */
.er-queue-list, .med-list, .alert-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* ER Queue Item */
.er-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

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

.er-info-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.er-avatar {
    width: 35px;
    height: 35px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.bg-soft-red { background: #fff5f5; color: #e53e3e; }

.er-details {
    display: flex;
    flex-direction: column;
}

.er-patient-name {
    font-size: 14px;
    font-weight: 700;
    color: #1a202c;
}

.er-issue {
    font-size: 11px;
    color: #a0aec0;
}

.er-status-col {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.er-priority-critical { background: #e53e3e; color: #fff; }
.er-priority-urgent { background: #ed8936; color: #fff; }
.er-priority-stable { background: #3182ce; color: #fff; }

.er-wait-time {
    font-size: 10px;
    color: #718096;
    font-weight: 600;
}

/* Medication Item */
.med-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

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

.med-icon-wrapper {
    width: 35px;
    height: 35px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.med-details {
    flex: 1;
    margin-left: 12px;
    display: flex;
    flex-direction: column;
}

.med-patient-name {
    font-size: 14px;
    font-weight: 700;
    color: #1a202c;
}

.med-name {
    font-size: 11px;
    color: #a0aec0;
}

.med-meta {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.med-time {
    font-size: 11px;
    color: #718096;
    font-weight: 600;
}

.med-status-pending { background: #fffaf0; color: #dd6b20; border: 1px solid #fbd38d; }
.med-status-done { background: #f0fff4; color: #38a169; border: 1px solid #9ae6b4; }

/* Alert Item */
.alert-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 10px;
    border: 1px solid transparent;
}

.alert-danger-soft { background: #fff5f5; border-color: #fed7d7; }
.alert-warning-soft { background: #fffaf0; border-color: #fbd38d; }
.alert-info-soft { background: #ebf8ff; border-color: #bee3f8; }

.alert-icon-wrapper {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.alert-danger-soft .alert-icon-wrapper { color: #e53e3e; }
.alert-warning-soft .alert-icon-wrapper { color: #dd6b20; }
.alert-info-soft .alert-icon-wrapper { color: #3182ce; }

.alert-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.alert-title {
    font-size: 13px;
    font-weight: 700;
    color: #2d3748;
}

.alert-desc {
    font-size: 11px;
    color: #4a5568;
    margin: 2px 0;
}

.alert-time {
    font-size: 10px;
    color: #718096;
    font-weight: 600;
}

/* Dark Theme Support for new components */
.dark-theme .er-item,
.dark-theme .med-item {
    border-bottom-color: #374151;
}

.dark-theme .er-patient-name,
.dark-theme .med-patient-name,
.dark-theme .alert-title {
    color: #f3f4f6;
}

.dark-theme .er-issue,
.dark-theme .med-name,
.dark-theme .er-wait-time,
.dark-theme .med-time,
.dark-theme .alert-time {
    color: #9ca3af;
}

.dark-theme .alert-desc {
    color: #d1d5db;
}

.dark-theme .bg-soft-red { background: rgba(229, 62, 62, 0.1); color: #f56565; }

.dark-theme .med-status-pending { background: rgba(221, 107, 32, 0.1); color: #ed8936; border-color: #7b341e; }
.dark-theme .med-status-done { background: rgba(56, 161, 105, 0.1); color: #48bb78; border-color: #22543d; }

.dark-theme .alert-danger-soft { background: rgba(229, 62, 62, 0.1); border-color: #742a2a; }
.dark-theme .alert-warning-soft { background: rgba(221, 107, 32, 0.1); border-color: #7b341e; }
.dark-theme .alert-info-soft { background: rgba(49, 130, 206, 0.1); border-color: #2a4365; }