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

body {
    font-family: sans-serif;
    background-color: #e0e0e0;
    color: #333;
}

/* Top Navigation Bar */
.top-nav {
    display: flex;
    align-items: center;
    background-color: #5A8BB5;
    padding: 0.5rem 3rem;
    height: 3rem;
}

.top-nav .logo img{
    vertical-align: top;
    height: 4rem;
    margin-right: 2rem;
}

.top-nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
}

.top-nav li a {
    text-decoration: none;
    color: #fff;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.top-nav li a.active,
.top-nav li a:hover {
    background-color: #44799b;
}

/* Container for dynamic page content */
#page-content {
    padding: 1rem 3rem 1rem 3rem;
}

/* Section styles */
.section {
    background-color: #f4f7fa;
    border-radius: 6px;
    padding: 1rem;
}

/* Controls row (Add, Search, Filter) */
.controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.controls input[type="text"] {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #aaa;
    border-radius: 4px;
}

.controls button {
    padding: 0.5rem 1rem;
    border: none;
    background-color: #5A8BB5;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
}

.controls button:hover {
    background-color: #44799b;
}

.filter-icon {
    margin-left: 0.5rem;
    font-size: 1.2rem;
    color: #5A8BB5; /* Matches your theme */
    vertical-align: middle;
    cursor: default;
}

/**************************************
 * Table Styles
**************************************/
.table-container {
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    height: auto;
    margin-bottom: 0.5rem;
}

.item-table {
    width: 100%;
    border: 0;
    border-spacing: 0;
    border-collapse: separate;
    background: #5A8BB5;
}

.item-table thead {
    width: calc( 100% - 1em );
    display : table;
    table-layout: fixed;
    border: 0;
}

.item-table thead th{
    position: sticky;
    top: 0;
    z-index: 2;
    border: none;
    color: #fff;
}

.item-table tbody {
    display: block;
    height: calc(100vh - 16.5rem);
    overflow-y: scroll;
    background-color: #fff;
}

.item-table tbody tr{
    display : table;
    width: 100%;
    table-layout: fixed;
}

.item-table th, .item-table td {
    text-align: left;
    padding: 0.75rem;
    border: 1px solid #ddd;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: default;
}

/**************************************
 * ScrollContainer Styles
**************************************/
.scroll-container {
    height: calc(100vh - 14rem);
    overflow-y: auto;
    border: 1px solid #ddd;
    background-color: #fff;
    border-radius: 6px;
    padding: 0.5rem;
}

/* List styling */
.item-list {
    list-style: none;
}

.item-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    margin-bottom: 0.25rem;
    border-bottom: 1px solid #eee;
    cursor:pointer;
}

.item-list li:hover {
    background-color: #ddd;
}

.item-name {
    flex: 1;
}

.clickable-span {
    cursor: pointer;
}

.non-interactable-span {
    cursor: default;
}

/**************************************
 * Action Buttons
**************************************/
.item-actions, .actions-cell {
    display: flex;
    gap: 0.5rem;
}

.item-actions button, .actions-cell button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.3rem;
    color: #5A8BB5;
    float:right;
}

.item-actions button:hover {
    color: #44799b;
}

.icon-svg {
    width: 20px;
    height: 20px;
    vertical-align: middle;
}

.actions-cell button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.actions-cell button:hover {
    opacity: 0.7;
}


/**************************************
 * Field
**************************************/
.field-row {
    margin-bottom: 1rem;
}

.field-grid {
    display: grid;
    grid-template-columns: 0.5fr 1fr; /* 2 columns */
    gap: 1rem;
}

.field-block {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.field-block label {
    width: 5rem; /* or whatever suits you */
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(100%);
    border: 0;
}

/******************************************
Detail Page
******************************************/

/* Container for the details form or fields */
.details-form {
    /* You can switch to grid or flex if you prefer */
    display: block;
    padding: 1rem;
    background-color: #f4f7fa; /* or whatever your site uses */
    border-radius: 6px;
}

/* Each row in the form (label + input) */
.field-row {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

/* The label can have a fixed width or flex: 0 0 auto
   so the input doesn't jump around too much */
.field-row label {
    width: 10rem;
    font-weight: bold;
    padding: 0.5rem;
    margin-right: 0.5rem;
}

/* The text inputs */
.field-row input[type="text"],
.field-row input[type="number"],
.field-row input[type="tel"] {
    flex: 1;
    padding: 0.3rem;
    border: 1px solid #aaa;
    border-radius: 4px;
    font-size: 1rem;
}

/* Details panel for use in detail lists*/
.details-panel {
    border: 1px solid #ddd;
    background-color: #fff;
    border-radius: 4px;
    margin: 1rem 0;
    padding: 0.5rem;
    height: 10rem;
    overflow-y: auto;
}

/* A simple style for the "Save" button */
.details-form button {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    background-color: #5A8BB5;
    color: #fff;
    cursor: pointer;
    font-size: 1rem;
}

.details-form button:hover {
    background-color: #44799b;
}


.dropdown-menu {
    position: absolute;
    background: #fff;
    border: 1px solid #aaa;
    border-radius: 4px;
    padding: 0.5rem;
    z-index: 999;
    width: 200px;
    display: none;
    list-style: none;
    margin: 0;
    max-height: 150px;
    overflow-y: auto;
}

.dropdown-menu li {
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    border-radius: 4px;
}

/* Hover highlight */
.dropdown-menu li:hover {
    background-color: #eee;
}

/* Selected state */
.dropdown-menu li.selected {
    background-color: #5A8BB5;
    color: white;
}

.employee-list {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f4f7fa;
    border-radius: 6px;
}

.employee-list h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    font-weight: bold;
}

.employee-list ul {
    list-style: none;
    padding: 0;
}

.employee-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    margin-bottom: 0.25rem;
    border-bottom: 1px solid #ddd;
}

.no-employee {
    color: #888;
    font-style: italic;
}

.view-employee-button {
    background-color: #5A8BB5;
    color: white;
    border: none;
    padding: 0.3rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.view-employee-button:hover {
    background-color: #44799b;
}