/* Local font face definition */
@font-face {
    font-family: 'DSEG7 Classic';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/static/vendor/dseg7.woff2') format('woff2');
}

.vital-display {
    font-family: 'DSEG7 Classic', sans-serif;  /* Digital font */
    font-weight: bold;
    text-align: center;
    display: inline-block;
    width: auto;
    white-space: nowrap;
    padding: 5px 10px;
    font-size: calc(2vw + 1vh); /* Dynamic font size */
}


/* Uniform font sizes for vital labels and values */

/* Static Labels (e.g., "Heart Rate", "SpO2", "HR", "%", "BPM", etc.) */
.vital-label,
.vital-unit,
.vital-subtitle {
  font-size: 1rem;
  font-weight: 500;
}

/* Numerical values (e.g., actual numbers for HR, SpO2, etc.) */
.vital-value {
  font-size: 1.5rem;
  font-weight: bold;
}
    .heart-rate {
    color: #00FF00; /* Green */
}

.spo2 {
    color: #FFFF00; /* Yellow */
}

.bp {
    color: #FFFFFF; /* White */
}

.temp {
    color: #FF4500; /* Orange/Red */
}

.resp {
    color: #00AEEF; /* Blue */
}

/* General body styling */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: #000;
    color: white;
    height: 100vh; /* Ensure it spans the full viewport height */
    display: flex;
    flex-direction: column; /* Use column layout for independent sections */
}

/* Splash screen */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: black;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.splash-screen img {
    max-width: 60%;
    max-height: 60%;
}

/* Login container */
.login-container {
    background-color: #2c3e50;
    border-radius: 8px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.5);
    padding: 30px;
    width: 350px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: auto; /* Automatically centers in both directions */
    position: relative; /* Ensures no conflict with splash screen */
}

.login-container h1 {
    color: #66fcf1;
    font-size: 24px;
    margin-bottom: 20px;
}

/* Form styles */
.login-form .form-group {
    margin-bottom: 15px;
}

.login-form input {
    width: 100%;
    padding: 12px;
    border-radius: 5px;
    border: 1px solid #444;
    font-size: 14px;
    background-color: #1e2a38;
    color: white;
    box-shadow: inset 0px 1px 2px rgba(0, 0, 0, 0.5);
}

.login-form input:focus {
    outline: none;
    border: 1px solid #66fcf1;
    box-shadow: 0px 0px 4px #66fcf1;
}

/* Login button */
.login-btn {
    padding: 12px;
    width: 100%;
    border: none;
    border-radius: 5px;
    background-color: #66fcf1;
    color: #2c3e50;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.login-btn:hover {
    background-color: #45a29e;
}

.login-btn:active {
    transform: scale(0.98);
}

/* Prevent overlap between sections */
.main-content {
    flex-grow: 1; /* Pushes content to take up available space */
    display: flex;
    align-items: center; /* Centers vertically */
    justify-content: center; /* Centers horizontally */
    height: 100%; /* Ensure it spans full height */
}

/* Top Bar Styling */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #1e293b;
    color: white;
    padding: 10px 20px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 1000; /* Ensures it stays above other elements */
}

.greeting {
    font-size: 18px;
}

.gear-icon {
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.user-management-btn {
    margin-right: 10px;
    background-color: #0284c7;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
}

.user-management-btn:hover {
    background-color: #0369a1;
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    width: 400px;
    text-align: center;
    color: #000;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #1e293b;
}

.modal-content button {
    padding: 10px 20px;
    background-color: #0284c7;
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
}

.modal-content button:hover {
    background-color: #0369a1;
}

/* Admin Section */
.ward-bed-assignment {
    background-color: #2c3e50;
    border: 1px solid #444;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.assigned-beds {
    background-color: #2c3e50;
    border: 1px solid #444;
    padding: 20px;
    border-radius: 8px;
}

.assigned-beds ul {
    list-style-type: none;
    padding: 0;
}

.assigned-beds li {
    background-color: #1e293b;
    margin: 5px 0;
    padding: 10px;
    border-radius: 5px;
    color: white;
}

.hospital {
    margin-bottom: 20px;
    padding: 10px;
    background-color: #1e293b;
    border-radius: 5px;
}

.ward {
    margin-left: 20px;
    margin-bottom: 10px;
    padding: 5px;
    background-color: #2c3e50;
    border-radius: 5px;
}

.bed {
    margin-left: 40px;
    padding: 5px;
    background-color: #374151;
    border-radius: 5px;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #0f172a;
    color: white;
}
.container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
}
.table-container {
    flex: 1;
    min-width: 300px;
    padding: 16px;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
}
th, td {
    text-align: left;
    padding: 8px;
}
th {
    background-color: #4f46e5;
    position: relative;
}
th .add-icon {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    color: green;
    cursor: pointer;
}
tr:hover {
    background-color: #374151;
}
tr.selected {
    background-color: #3d77ea; 
}

.table-container table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
}

.table-container th, .table-container td {
    text-align: left;
    padding: 8px;
}

.table-container th {
    background-color: #4f46e5;
    color: white;
    position: relative;
}

.table-container th .add-icon {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    color: green;
    cursor: pointer;
}
/* Monitor Selection Modal */
#monitorSelectionModal {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#monitorSelectionModal .modal-content {
    background-color: #1e293b;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 600px;
    color: white;
}

/* Entity Modal Styling */
.entity-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Dark transparent overlay */
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.entity-modal-content {
    background-color: #1e293b;
    color: white;
    padding: 20px;
    border-radius: 8px;
    width: 400px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: slide-down 0.3s ease-out; /* Animation for better appearance */
}

@keyframes slide-down {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

.modal-header h2 {
    margin: 0;
    font-size: 18px;
}

.modal-header .close {
    cursor: pointer;
    font-size: 24px;
    color: white;
    transition: color 0.3s;
}

.modal-header .close:hover {
    color: red;
}

.modal-body {
    margin-bottom: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-footer .btn {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.modal-footer .btn:hover {
    opacity: 0.9;
}

.modal-footer .cancel-btn {
    background-color: #dc2626;
    color: white;
}

.modal-footer .btn:first-child {
    background-color: #4f46e5;
    color: white;
}

.modal-footer .btn:focus {
    outline: 2px solid #374151;
}

.canvas {
    width: 100% !important;
    height: 100% !important;
    image-rendering: crisp-edges;
}

.debug-label {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(255, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
}

.alarm-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #393b3a;
    color: #fff;
    border-radius: 50%;
    font-size: 13px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    border: 2px solid #222;
    transition: background 0.2s, color 0.2s;
    z-index: 2;
}

.alarm-badge-active {
    background: #e53935 !important;
    color: #fff !important;
}

.alarm-icon-btn {
    position: relative;
    background: none;
    border: none;
    outline: none;
    cursor: pointer;
}

.monitor-icon-btn {
    position: relative;
    background: none;
    border: none;
    outline: none;
    cursor: pointer;
}

.monitor-tooltip {
    display: none;
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #222;
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 10001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.monitor-icon-btn:hover .monitor-tooltip,
.monitor-icon-btn:focus .monitor-tooltip {
    display: block;
    opacity: 1;
    pointer-events: auto;
}


.monitor-icon-btn i {
    color: #9ca3af; /* Default grey */
}

.monitor-icon-btn.active i {
    color: #22c55e; /* Green for assigned */
}


.bell-animate {
    animation: bell-shake 0.8s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes bell-shake {
    10%, 90% { transform: rotate(-10deg);}
    20%, 80% { transform: rotate(12deg);}
    30%, 50%, 70% { transform: rotate(-18deg);}
    40%, 60% { transform: rotate(18deg);}
    100% { transform: rotate(0);}
}

/* --- Normalize Fonts for All Vitals --- */

/* All numerical values inside vitals */
.vital-value,
.temp1-value,
.temp2-value,
.spo2-value,
.spo2-hr-value,
.hr-value,
.rr-value,
.bp-value,
.map-value,
.etco2-value,
.fico2-value,
.rrco2-value {
  font-size: 1.6rem !important;
  font-weight: bold !important;
}

/* All static labels and units */
.vital-label,
.vital-unit,
.vital-subtitle {
  font-size: 1rem !important;
  font-weight: 500 !important;
}
