* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

:root {
    --text: #333;
    --blue: #39A9FF;
    --blue-hover: #0056b3;
    --dark-blue: #005785;
    --orange: #FF6633;
    --dark-orange: #d23400;
    --yellow: #FFC107;
    --light-gray: #f5f5f5;
    --medium-gray: #ddd;
    --white: #FFFFFF;
    --dark-gray: #555;
    --success-color: #4CAF50;
    --green: #28A745;
    --table-border: #E2E3E5;

    --font-xs: 12px;
    --font-sm: 14px;
    --font-md: 16px;
    --font-lg: 18px;
    --font-xl: 20px;
    --font-xxl: 22px;

    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 12px;
    --space-lg: 16px;
    --space-xl: 20px;
    --space-xxl: 24px;

    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
}

html {
   scrollbar-gutter: stable;
}


body {
    min-height: 100vh;
    line-height: 1.5;
    color: var(--text);
    background-color: var(--light-gray);
}

a, a:active {
    color: #43acff;
}

h1, h2, h3 {
    line-height: 1.3;
}

h1 {
    margin-bottom: var(--space-xl);
    font-size: var(--font-xxl);
    font-weight: bold;
}

h2 {
    font-size: var(--font-xl);
    margin-bottom: var(--space-lg);
}

input {
    width: 100%;
    padding: 10px 12px 10px 36px;
    border: 1px solid var(--table-border);
    border-radius: 4px;
    font-size: 0.95rem;
    outline: none;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 0px 5px 0px, rgba(0, 0, 0, 0.1) 0px 0px 1px 0px;
}

input[type="radio"], input[type="checkbox"] {
    box-shadow: none;
    inline-size: 1.1rem; 
    block-size: 1.1rem;
}

textarea {
	padding: 1rem;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
	font-size: 0.9rem;
	line-height: 1.5;
	resize: vertical;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 0px 5px 0px, rgba(0, 0, 0, 0.1) 0px 0px 1px 0px;
}

textarea:focus, input:focus, input[type="date"]:focus {
	outline: none;
	border-color: var(--blue)!important;
}

button {
    background-color: var(--blue);
    color: var(--white);
    font-size: 0.95rem;
    padding: 10px 20px;
    border-radius: 4px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

button:hover {
    background-color: var(--blue-hover);
}

button:disabled {
    background-color: var(--medium-gray);
    color: #777;
    cursor: not-allowed;
    opacity: 0.6;
    pointer-events: none;
}

.tooltip-content {
    position: absolute;
    display: none;
    background: rgb(255, 255, 255);
    color: #000000;
    box-shadow: 0 0 1.25rem 0 rgba(0, 0, 0, 0.2);
    max-width: 600px;
    max-height: 800px;
    padding: 22px;
    border-radius: 0.5rem;
    font-size: var(--font-md);
    pointer-events: none;
    z-index: 9999;
    overflow-y: auto;
    overflow-x: hidden;
    pointer-events: auto;
}

.tooltip-trigger { 
    cursor: help; 
    display: inline-flex; 
    align-items: center; 
}

.tooltip-trigger:hover{
    filter: brightness(0.8);
}

.icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  background-repeat: no-repeat;
  background-size: contain;
  vertical-align: middle;
  margin-right: 0.4em;
  filter: invert(1);
}

.title {
    font-size: var(--font-sm);
    color: white;
    line-height: 1.3;
    font-weight: bold;
}

.dropdown {
    position: relative;
}

.dropdown-toggle {
    position: relative;
    z-index: 1;
}

.dropdown-menu a, .user-menu a {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: white;
    text-decoration: none;
    font-size: var(--font-sm);
    padding: var(--space-sm);
    border-radius: var(--radius-md);
}

.dropdown-item {
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
    padding: var(--space-sm);
    font-size: var(--font-sm);
    border-radius: var(--radius-md);
}

.nav-button:hover,
.dropdown-menu a:hover,
.user-menu a:hover {
      background-color: rgba(255, 255, 255, 0.15);
}

.dropdown-item.underline {
    text-decoration: underline;
}

.main-content {
    margin-top: 70px;
    flex-grow: 1;
    padding: var(--space-xxl) var(--space-xxl);
    background-color: var(--light-gray);
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-xl);
    border-bottom: 1px solid var(--medium-gray);
}

/* FOR THE NEWS, FAQ and REPORT accordions */
.accordion-item {
    display: inline-block;
    overflow: hidden;
    width: 90%;
    margin-left: 5%;
    margin-bottom: 10px;
}

.accordion-header {
    background: var(--light-gray);
    padding: 10px 30px;
    font-size: var(--font-lg);
    font-weight: bold;
    cursor: pointer;
    position: relative;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    transition: background-color 0.3s ease-out;
    max-height: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.accordion-header:hover, .accordion-item.active .accordion-header {
    background: var(--orange);
    color: white;
}

.accordion-item.active .accordion-header:hover {
    background-color: var(--dark-orange)!important;
}

.accordion-header::after {
    content: "";
    width: 20px;
    height: 20px;
    background-size: cover;
    background-repeat: no-repeat;
    transition: filter 0.2s ease;
    margin-left: auto;
    background-image: url('data:image/svg+xml;utf8,<svg stroke="black" viewBox="0 0 27 24" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="11" stroke-width="2" fill="none"/><line x1="12" y1="7" x2="12" y2="17" stroke-width="2"/><line x1="7" y1="12" x2="17" y2="12" stroke-width="2"/></svg>');
}

/* change icon to minus when active */
.accordion-item.active .accordion-header::after {
    background-image: url('data:image/svg+xml;utf8,<svg stroke="black" viewBox="0 0 27 24" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="11" stroke-width="2" fill="none"/><line x1="7" y1="12" x2="17" y2="12" stroke-width="2"/></svg>');
}

/* hover/active state makes icon white */
.accordion-header:hover::after, 
.accordion-item.active .accordion-header::after {
    filter: brightness(0) invert(1);
}

.accordion-content {
    display: none;
    padding: 30px;
    background: #f9f9f9;
    line-height: 1.6;
}

.accordion-item.active .accordion-content {
    display: block;
}

.accordion-content ul {
    margin-left: 25px;
}

.tab-system, .tab2-system {
	margin-bottom: 1rem;
    border-radius: 8px;
}

.tab-header, .tab2-header {
	display: flex;
	background: #f8f9fa;
	border-radius: 4px;
	padding: 0.25rem;
}

.tab-button {
	flex: 1;
	background: transparent;
	border: none;
	border-radius: 3px;
	font-weight: 600;
	cursor: pointer;
	color: #6c757d;
}

.tab-button.active {
	background: var(--blue);
	color: white;
	cursor: unset;
}
.tab-button:hover {
	background: #e9ecef;
}
.tab-button.active:hover{
	background: var(--blue);
}

.tab-content {
	padding: 1.5rem;
	border: 1px solid #ddd;
	border-radius: 4px;
	background: white;
}



/* RESPONSIVE */
@media (max-width: 768px) {
    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .toolbar .date-group {
        width: 100%;
        justify-content: space-between;
    }
    .toolbar .date-group input[type="date"] {
        width: 48%;
    }
    .table-controls, .multi-downloads {
        justify-content: center;
    }
}

pre {
    font-family: monospace;
    font-size: var(--font-xs);
    padding: 10px;
    border: 1px dotted #ff0000;
    margin: 10px;
    text-wrap: auto;
}

/* MAIN CONTAINER */
.container, .content-header, .patient-panel, #tab-system {
    max-width: 1400px;
    margin: 0 auto;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-top: 16px;
}

/* SECTION HEADERS */
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 32px;
    border-bottom: 1px solid var(--table-border);
    background-color: var(--white);
}

.content-header h1 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--dark-gray);
}

.dropdown-menu {
    display: none;
    position: absolute;
    background-color: var(--white);
    border: 1px solid var(--table-border);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-width: 140px;
    z-index: 999;
    padding: 4px;
}

.dropdown-menu .menu-item {
    display: flex;
    flex-direction: row;
    gap: 5px;
    padding: 8px 12px;
    font-size: 0.7rem;
    color: var(--dark-gray);
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.dropdown-menu .menu-item:hover {
    background-color: var(--light-gray);
}

.menu-item input {
    width: unset;
}

.hide {
    display: none;
}