/* General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #f5f5f5;
}

/* Login Screen Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f5f5f5;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.login-box h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.login-box button[type="submit"] {
    width: 100%;
    padding: 12px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.login-box button[type="submit"]:hover {
    background-color: #0056b3;
}

.error-message {
    color: #dc3545;
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Header Styles */
header {
    background-color: #fff;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
}

.header-left {
    display: flex;
    align-items: center;
}

.logo {
    height: 30px;
    margin-right: 20px;
}

.logged-in {
    font-size: 12px;
    color: #666;
}

.user {
    font-weight: bold;
}

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

.search-container {
    display: flex;
    align-items: center;
    margin-right: 20px;
}

.search-container label {
    font-size: 12px;
    margin-right: 5px;
}

#search-type {
    padding: 5px;
    margin-right: 5px;
    border: 1px solid #ccc;
}

#search-input {
    padding: 5px;
    border: 1px solid #ccc;
    width: 150px;
}

.search-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
}

.nav-buttons button {
    background-color: transparent;
    border: none;
    color: #007bff;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    margin-left: 10px;
}

/* Dropdown Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-btn {
    background-color: transparent;
    border: none;
    color: #007bff;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.dropdown-btn:hover {
    text-decoration: underline;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1000;
    border: 1px solid #ddd;
    right: 0;
    top: 100%;
}

.dropdown-content a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 14px;
    font-weight: normal;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
}

.dropdown-content a.active {
    background-color: #007bff;
    color: white;
}

.dropdown.show .dropdown-content {
    display: block;
}

/* Patient Banner Styles */
.patient-banner {
    background-color: #0a6e9d;
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.banner-back {
    cursor: pointer;
    font-size: 18px;
}

.banner-info {
    flex-grow: 1;
    margin-left: 20px;
}

.patient-name {
    font-size: 18px;
    font-weight: bold;
}

.patient-details {
    font-size: 14px;
    margin-top: 5px;
}

.patient-details span {
    margin-right: 20px;
}

.banner-controls {
    font-size: 18px;
}

.banner-controls i {
    margin-left: 10px;
    cursor: pointer;
}

/* Main Content Styles */
.main-content {
    display: flex;
    flex-grow: 1;
    overflow: hidden;
}

/* Sidebar Styles */
.sidebar {
    width: 120px;
    background-color: #333;
    color: white;
    overflow-y: auto;
}

.sidebar ul {
    list-style: none;
}

.sidebar li {
    padding: 15px 10px;
    text-align: center;
    cursor: pointer;
    border-bottom: 1px solid #444;
    font-size: 12px;
    transition: background-color 0.3s;
}

.sidebar li:hover {
    background-color: #444;
}

.sidebar li.active {
    background-color: #0a6e9d;
}

.sidebar li i {
    font-size: 18px;
    margin-bottom: 5px;
    display: block;
}

.sidebar li span {
    display: block;
    font-weight: bold;
}

/* Content Area Styles */
.content-area {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #fff;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

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

.section-header h2 {
    font-size: 18px;
    color: #333;
}

.section-controls button {
    background-color: transparent;
    border: 1px solid #ccc;
    padding: 5px 10px;
    margin-left: 10px;
    cursor: pointer;
}

.section-header.collapsible {
    cursor: pointer;
    background-color: #f0f0f0;
    padding: 10px;
    border-radius: 4px;
}

.section-header.collapsible h3 {
    font-size: 14px;
    color: #0a6e9d;
}

.section-content {
    margin-bottom: 20px;
}

/* Alerts List Styles */
.alerts-list {
    list-style: none;
    padding-left: 20px;
}

.alerts-list li {
    margin-bottom: 5px;
    position: relative;
}

.alerts-list li:before {
    content: "•";
    position: absolute;
    left: -15px;
}

/* Tables Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

table th, table td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    font-size: 14px;
}

table th {
    background-color: #f0f0f0;
    font-weight: bold;
}

/* Imaging Tab Specific Styles */
.filter-section {
    margin-bottom: 15px;
}

.filter-section label {
    margin-right: 10px;
}

.disclaimer {
    background-color: #f8f8f8;
    padding: 10px;
    border: 1px solid #ddd;
    margin-bottom: 15px;
    font-size: 12px;
    line-height: 1.4;
}

.results-info {
    font-weight: bold;
    margin-bottom: 10px;
}

.imaging-table-container {
    overflow-x: auto;
}

.imaging-table th {
    white-space: nowrap;
}

.imaging-table td {
    white-space: nowrap;
}

.imaging-table .report-btn, .imaging-table .image-btn {
    background-color: transparent;
    color: #007bff;
    border: none;
    cursor: pointer;
    text-decoration: underline;
}

/* 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: #fff;
    margin: 5% auto;
    padding: 20px;
    border-radius: 5px;
    width: 70%;
    max-height: 80vh;
    overflow-y: auto;
}

.image-viewer-content {
    width: 90%;
    height: 90vh;
    padding: 10px;
}

.pdf-content {
    width: 90%;
    height: 90vh;
    padding: 10px;
}

#pdf-iframe {
    width: 100%;
    height: calc(100% - 40px);
    border: none;
}

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

.close:hover {
    color: #000;
}

#image-viewer-iframe {
    width: 100%;
    height: calc(100% - 40px);
    border: none;
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .patient-details span {
        display: block;
        margin-bottom: 5px;
    }
}

@media (max-width: 768px) {
    .header-right {
        flex-direction: column;
        align-items: flex-end;
    }
    
    .search-container {
        margin-bottom: 10px;
    }
    
    .main-content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        display: flex;
        overflow-x: auto;
    }
    
    .sidebar ul {
        display: flex;
    }
    
    .sidebar li {
        padding: 10px;
        border-right: 1px solid #444;
        border-bottom: none;
    }
    
    .sidebar li i {
        margin-bottom: 2px;
    }
    
    .modal-content {
        width: 95%;
    }
}
