* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
}

/* Login Modal */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1a1a2e;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.login-modal.hidden {
    display: none;
}

.login-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 450px;
    width: 90%;
}

.login-content h2 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

.login-subtitle {
    color: #7f8c8d;
    margin-bottom: 30px;
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #28a745;
}

.login-error {
    color: #e74c3c;
    background: #fadbd8;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
}

.login-error.show {
    display: block;
}

.login-button {
    width: 100%;
    padding: 14px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.login-button:hover {
    background: #218838;
}

.login-button:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

.login-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    font-size: 0.85rem;
    color: #7f8c8d;
}

.login-footer p {
    margin-bottom: 5px;
}

.login-footer strong {
    color: #2c3e50;
}

.dashboard-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left h1 {
    font-size: 2rem;
    color: white;
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.assessment-count {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
}

.refresh-button {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.3s;
}

.refresh-button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.auto-refresh-indicator {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.auto-refresh-indicator::before {
    content: '●';
    color: #4ade80;
    font-size: 1.2rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    color: white;
    font-size: 0.9rem;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
}

.refresh-button,
.auto-refresh-toggle,
.logout-button {
    padding: 12px 20px;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
}

.refresh-button {
    background: rgba(255, 255, 255, 0.25);
}

.auto-refresh-toggle {
    background: rgba(255, 255, 255, 0.2);
    font-size: 0.85rem;
}

.logout-button {
    background: rgba(255, 255, 255, 0.15);
}

.refresh-button:hover,
.auto-refresh-toggle:hover,
.logout-button:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* Stats Container */
.stats-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-left: 5px solid;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.stat-card.stat-total {
    border-left-color: #3498db;
}

.stat-card.stat-critical {
    border-left-color: #e74c3c;
}

.stat-card.stat-urgent {
    border-left-color: #f39c12;
}

.stat-card.stat-low {
    border-left-color: #27ae60;
}

.stat-card.stat-wait {
    border-left-color: #9b59b6;
}

.stat-label {
    font-size: 0.85rem;
    color: #7f8c8d;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
}

.stat-card.stat-total .stat-value {
    color: #3498db;
}

.stat-card.stat-critical .stat-value {
    color: #e74c3c;
}

.stat-card.stat-urgent .stat-value {
    color: #f39c12;
}

.stat-card.stat-low .stat-value {
    color: #27ae60;
}

.stat-card.stat-wait .stat-value {
    color: #9b59b6;
}

/* Search Container */
.search-container {
    position: relative;
    margin-bottom: 15px;
}

.search-input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: #7f8c8d;
}

/* View Controls */
.view-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.view-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #7f8c8d;
    text-transform: uppercase;
}

.view-select {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: border-color 0.3s;
}

.view-select:focus {
    outline: none;
    border-color: #667eea;
}

.assessments-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 20px;
    height: calc(100vh - 120px);
    width: 100%;
    overflow: hidden;
}

.assessments-list {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-button {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #7f8c8d;
    transition: all 0.3s;
}

.tab-button:hover {
    color: #28a745;
}

.tab-button.active {
    color: #28a745;
    border-bottom-color: #28a745;
}

/* Filters */
.filters {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.filter-select {
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
    flex: 1;
    min-width: 150px;
}

.filter-select:focus {
    outline: none;
    border-color: #28a745;
}

.checkbox-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
}

.checkbox-filter:hover {
    border-color: #28a745;
}

.checkbox-filter input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-filter span {
    font-size: 0.9rem;
    color: #333;
}

.assessments-container {
    max-height: calc(100vh - 300px);
    overflow-y: auto;
}

.assessment-card {
    background: #f8f9fa;
    border-left: 5px solid;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.assessment-card:hover {
    transform: translateX(5px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.assessment-card.selected {
    background: #e3f2fd;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

/* Risk-Based Color Coding */
/* Pending (ESI 0 or null) = Gray */
.assessment-card.esi-0 { border-left-color: #6c757d; }
/* High Risk (ESI 1-2) = Red */
.assessment-card.esi-1 { border-left-color: #dc3545; }
.assessment-card.esi-2 { border-left-color: #dc3545; }
/* Medium Risk (ESI 3) = Orange */
.assessment-card.esi-3 { border-left-color: #fd7e14; }
/* Low Risk (ESI 4-5) = Green */
.assessment-card.esi-4 { border-left-color: #28a745; }
.assessment-card.esi-5 { border-left-color: #28a745; }

.esi-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    margin-bottom: 8px;
}

.esi-level-small {
    display: block;
    font-size: 0.7rem;
    font-weight: 400;
    margin-top: 2px;
    opacity: 0.9;
}

/* Pending (ESI 0 or null) = Gray */
.esi-badge.esi-0 { background: #6c757d; }
/* High Risk (ESI 1-2) = Red */
.esi-badge.esi-1 { background: #dc3545; }
.esi-badge.esi-2 { background: #dc3545; }
/* Medium Risk (ESI 3) = Orange */
.esi-badge.esi-3 { background: #fd7e14; }
/* Low Risk (ESI 4-5) = Green */
.esi-badge.esi-4 { background: #28a745; }
.esi-badge.esi-5 { background: #28a745; }

.reviewed-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    background: #28a745;
    color: white;
    margin-left: 8px;
}

.card-header {
    margin-bottom: 8px;
}

.patient-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: #2c3e50;
}

.patient-age {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.chief-complaint {
    color: #34495e;
    margin-top: 8px;
    font-size: 0.95rem;
}

.card-time {
    color: #95a5a6;
    font-size: 0.85rem;
    margin-top: 8px;
}

.assessment-detail {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    overflow-x: hidden;
    height: 100%;
    width: 100%;
    word-wrap: break-word;
}

.detail-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #95a5a6;
    font-size: 1.2rem;
}

.detail-header {
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.detail-header h2 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.detail-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.detail-section h3 {
    color: #34495e;
    margin: -20px -20px 15px -20px;
    padding: 12px 20px;
    font-size: 1.2rem;
    border-left: 4px solid #28a745;
    background: white;
    border-radius: 8px 8px 0 0;
    border-bottom: 2px solid #e9ecef;
}

.detail-row {
    margin-bottom: 12px;
}

.detail-label {
    font-weight: 600;
    color: #7f8c8d;
    margin-bottom: 4px;
}

.detail-value {
    color: #2c3e50;
    line-height: 1.6;
}

.detail-meta {
    color: #7f8c8d;
    font-size: 0.85rem;
    font-style: italic;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #ecf0f1;
}

.esi-assessment-container {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    background: #fdfdfd;
}

.esi-comparison {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

.esi-prediction, .esi-correction {
    text-align: center;
}

.esi-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.esi-arrow {
    font-size: 1.5rem;
    color: #6c757d;
    font-weight: bold;
}

.esi-reasoning-section, .nurse-correction-section {
    margin-top: 20px;
}

.esi-reasoning-section h4, .nurse-correction-section h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.esi-reasoning {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.nurse-correction {
    background: #fff3cd;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
    color: #856404;
}

.key-concerns {
    background: #fff3cd;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #f39c12;
}

.nurse-notes-section {
    background: #e8f5e9;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #4caf50;
    margin-bottom: 15px;
}

.notes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #c8e6c9;
}

.notes-time {
    font-size: 0.85rem;
    color: #66bb6a;
}

.notes-content {
    white-space: pre-wrap;
    line-height: 1.6;
    color: #2c3e50;
}

.review-history-section {
    margin-top: 20px;
}

.review-entry {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #28a745;
}

.review-entry.esi-change {
    border-left-color: #e67e22;
}

.review-entry.notes {
    border-left-color: #2ecc71;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.review-nurse-name {
    font-weight: 600;
    color: #2c3e50;
}

.review-action-type {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #28a745;
    color: white;
}

.review-action-type.esi-change {
    background: #e67e22;
}

.review-action-type.notes {
    background: #2ecc71;
}

.review-time {
    font-size: 0.85rem;
    color: #7f8c8d;
}

.review-content {
    color: #2c3e50;
    line-height: 1.6;
}

.esi-change-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    margin: 0 4px;
}

.conversation-history {
    max-height: 400px;
    overflow-y: auto;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

.conversation-container {
    max-height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    word-wrap: break-word;
    width: 100%;
}

.conversation-message {
    margin-bottom: 15px;
    padding: 12px;
    border-radius: 8px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.conversation-message.user {
    background: #e3f2fd;
    margin-left: 20px;
}

.conversation-message.assistant {
    background: white;
    margin-right: 20px;
}

.message-role {
    font-weight: 600;
    color: #28a745;
    margin-bottom: 5px;
    font-size: 0.85rem;
}

.message-text {
    color: #2c3e50;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    max-width: 100%;
}

.message-text p {
    margin: 0 0 10px 0;
}

.message-text p:last-child {
    margin-bottom: 0;
}

.action-buttons {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.detail-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #ecf0f1;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.action-button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.action-button.primary {
    background: #3498db;
    color: white;
}

.action-button.primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.action-button.secondary {
    background: #16a085;
    color: white;
}

.action-button.secondary:hover {
    background: #138d75;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(22, 160, 133, 0.3);
}

.action-button.danger {
    background: #95a5a6;
    color: white;
}

.action-button.danger:hover {
    background: #7f8c8d;
}

.action-button.success {
    background: #2ecc71;
    color: white;
}

.action-button.success:hover {
    background: #27ae60;
}

.tool-result {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.tool-result h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 1rem;
}

.feedback-button {
    padding: 12px 24px;
    background: #9b59b6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.feedback-button:hover {
    background: #8e44ad;
}

.archive-button {
    padding: 12px 24px;
    background: #95a5a6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.archive-button:hover {
    background: #7f8c8d;
}

.unarchive-button {
    padding: 12px 24px;
    background: #2ecc71;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.unarchive-button:hover {
    background: #27ae60;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.cancel-button {
    padding: 12px 24px;
    background: #95a5a6;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.cancel-button:hover {
    background: #7f8c8d;
}

.submit-button {
    padding: 12px 24px;
    background: #9b59b6;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.submit-button:hover {
    background: #8e44ad;
}

.loading {
    text-align: center;
    color: #95a5a6;
    padding: 20px;
}

/* Scrollbar styling */
.assessments-container::-webkit-scrollbar,
.assessment-detail::-webkit-scrollbar,
.conversation-history::-webkit-scrollbar {
    width: 8px;
}

.assessments-container::-webkit-scrollbar-track,
.assessment-detail::-webkit-scrollbar-track,
.conversation-history::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.assessments-container::-webkit-scrollbar-thumb,
.assessment-detail::-webkit-scrollbar-thumb,
.conversation-history::-webkit-scrollbar-thumb {
    background: #28a745;
    border-radius: 10px;
}

/* Maps Link Styling */
.maps-link {
    color: #1a73e8;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
}

.maps-link:hover {
    color: #1557b0;
    text-decoration: underline;
}

.maps-link::after {
    content: "";
    margin-left: 4px;
}

/* Emergency Room Map Styles */
.er-info-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 15px;
}

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

.er-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.map-link-btn, .emergency-call-btn {
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    transition: all 0.2s ease;
}

.map-link-btn {
    background: #007bff;
    color: white;
    border: 1px solid #007bff;
}

.map-link-btn:hover {
    background: #0056b3;
    border-color: #0056b3;
}

.emergency-call-btn {
    background: #dc3545;
    color: white;
    border: 1px solid #dc3545;
}

.emergency-call-btn:hover {
    background: #c82333;
    border-color: #bd2130;
}

.er-map-container {
    display: flex;
    flex-direction: column;
}

.er-map {
    width: 100%;
    min-height: 300px;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
}

.map-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.map-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.7;
}

.map-text {
    color: #495057;
    margin-bottom: 20px;
    line-height: 1.5;
}

.show-map-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.show-map-btn:hover {
    background: #218838;
}

/* ER List Display Styles */
.er-list-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 15px;
}

.er-item {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    background: white;
    transition: all 0.3s ease;
}

.er-item.primary {
    border-color: #28a745;
    background: linear-gradient(135deg, #f8fff9 0%, #e8f5e8 100%);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.1);
}

.er-item.alternative {
    border-color: #17a2b8;
    background: linear-gradient(135deg, #f8fdff 0%, #e6f7ff 100%);
}

.er-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.er-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.er-name {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
}

.er-priority-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.er-priority-badge.primary {
    background: #28a745;
    color: white;
}

.er-priority-badge.alternative {
    background: #17a2b8;
    color: white;
}

.er-info {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: start;
}

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

.services-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.service-tag {
    background: #667eea;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.phone-link {
    color: #28a745;
    text-decoration: none;
    font-weight: 600;
}

.phone-link:hover {
    text-decoration: underline;
}

.er-emergency-notice {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    margin-top: 20px;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.2);
}

/* Responsive design for ER list */
@media (max-width: 992px) {
    .er-info {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .er-actions {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .er-item {
        padding: 15px;
    }
    
    .er-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .er-name {
        font-size: 1.1rem;
    }
    
    .services-list {
        flex-direction: column;
        gap: 4px;
    }
    
    .service-tag {
        display: inline-block;
        margin-right: 6px;
    }
}

/* Legacy ER info styles (for backward compatibility) */
@media (max-width: 768px) {
    .er-info-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .er-actions {
        flex-direction: column;
    }
    
    .map-link-btn, .emergency-call-btn {
        text-align: center;
    }
}

/* Responsive design */
@media (max-width: 1200px) {
    .assessments-grid {
        grid-template-columns: 1fr;
    }

    .assessments-list {
        max-height: 400px;
    }
    
    .assessment-detail {
        max-height: 600px;
    }
}

@media (max-width: 992px) {
    .dashboard-container {
        padding: 15px;
    }
    
    header {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }
    
    header h1 {
        font-size: 1.5em;
    }
    
    .header-actions {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .filters {
        flex-direction: column;
        gap: 10px;
    }
    
    .filter-select {
        width: 100%;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.3em;
    }
    
    .subtitle {
        font-size: 0.9em;
    }
    
    .assessment-card {
        padding: 12px;
    }
    
    .card-header h3 {
        font-size: 14px;
    }
    
    .esi-badge {
        font-size: 11px;
        padding: 3px 10px;
    }
    
    .detail-panel {
        padding: 15px;
    }
    
    .section-title {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .dashboard-container {
        padding: 10px;
    }
    
    header {
        padding: 15px;
    }
    
    header h1 {
        font-size: 1.1em;
    }
    
    .refresh-button,
    .logout-button {
        padding: 8px 15px;
        font-size: 12px;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .tab-button {
        width: 100%;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .action-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Translation Buttons */
.translate-btn {
    padding: 6px 12px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.translate-btn:hover {
    background: #f5f5f5;
    border-color: #2196F3;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.translate-btn:active {
    transform: translateY(0);
}

.translate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#translation-result {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
