body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    margin: 0;
    padding: 0;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../icons/ppdco_logo_web.jpg') no-repeat center center fixed;
    background-size: cover;
    opacity: 0.1;
    z-index: -1;
}

.navbar {
    position: sticky;
    top: 0;
    background-color: #CC0000;
    color: #FAF9F6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    z-index: 10;
}

.navbar-center {
    display: flex;
    align-items: center;
    font-size: 20px;
}

.navbar-center {
    display: flex;
    align-items: center;
    font-size: 20px;
}

.navbar-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.2;
}

.navbar-text a {
    font-size: 14px; /* Smaller font */
    color: #FAF9F6;
    text-decoration: none;
    margin-bottom: 2px;
}

.navbar-text p {
    margin: 0;
}

.navbar-logo {
    height: 50px;
    margin-right: 10px;
}

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

.navbar-right a {
    color: #FAF9F6;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 12px;
}

.navbar-right a img {
    margin-bottom: 5px;
}

.navbar-right a:hover {
    text-decoration: underline;
}

.navbar nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.navbar nav ul li {
    margin: 0 4px;
    min-width: 72px;
}

.nav-icon {
    border-radius: 0;
    height: 20px;
}

.navbar nav ul li a {
    color: #FAF9F6;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.navbar nav ul li a img {
    height: 20px;
    margin-bottom: 5px;
}

.navbar nav ul li a:hover {
    text-decoration: underline;
}

.dashboard-container {
    display: flex;
    width: 100%;
    flex-direction: column;
}

.sidebar-toggle {
    background: transparent;
    border: none;
    width: 40px;
    height: 40px;
    cursor: pointer;
    padding: 8px;
    margin-right: 10px;
}

.sidebar-toggle img {
    width: 24px;
    height: 24px;
}

.section-header {
    position: sticky;
    top: 0;
    background-color: #b10000;
    color: #FAF9F6;
    padding: 0px 20px;
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 9;
}

.section-content {
    display: flex;
    flex-direction: row;
    flex-grow: 1;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    /* Prevent children from wrapping to the next line when sidebar is hidden */
    flex-wrap: nowrap;
    align-items: flex-start;
}

.container {
    /* Make container take remaining space in the flex row and avoid forcing line breaks */
    flex: 1 1 auto;
    min-width: 0; /* allow flex child to shrink properly */
    min-height: 40rem;
    padding: 2rem 2rem 1.1rem;
    transition: width 0.3s;
}

/* Sidebar sizing to participate in the flex layout predictably */
.sidebar {
    flex: 0 0 280px; /* default sidebar width */
    max-width: 320px;
    box-sizing: border-box;
}
.sidebar.hidden {
    display: none;
}

.filter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.current-division {
    font-size: 1.4rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #CC0000;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    position: relative;
    width: 75%;
}

.search-form {
    display: flex;
    width: 50%;
    align-items: center;
    position: relative;
}

.search {
    position: absolute;
    left: 10px;
    cursor: pointer;
}

.search img {
    width: 20px;
    height: 20px;
}

.search-form input[type="text"] {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 50px;
    padding: 8px 8px 8px 35px;
}

.action-buttons {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.tooltip img {
    width: 20px;
    height: 20px;
    border-radius: 0;
}

button img {
    width: 20px;
    height: 20px;
}

.clear-all-btn, .add-button, .filter-button {
    margin: 0;
    font-size: 0.9rem;
    border: 0;
    border-radius: 50px;
    cursor: pointer;
    color: #FAF9F6;
    padding: 0.4rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 400;
    transition: all 0.3s ease;
}

.clear-all-btn {
    background-color: #df1227;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.add-button, .filter-button {
    background-color: #CC0000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.filter_sort {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.table-container {
    max-height: 100%;
    overflow-y: auto;
    border: 1px solid #ccc;
}

table {
    width: 100%;
    max-height: 40rem;
    border-collapse: collapse;
}

thead th {
    position: sticky;
    top: 0;
    background-color: #CC0000;
    z-index: 1;
    padding: 10px;
    color: #FAF9F6;
    font-weight: 500;
    font-size: 0.9rem;
}

tbody td {
    padding: 6px;
    border: 1px solid #ccc;
    font-size: 0.8rem;
}

tbody tr:hover {
    background-color: #387eff3a;
}

th,
td {
    padding: 6px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    white-space: nowrap;
}

.icon-button {
    width: 20px;
    height: 20px;
    background: none;
    cursor: pointer;
}

.icon-button:hover {
    opacity: 0.7;
}

.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip-text {
    visibility: hidden;
    width: 96px;
    background-color: black;
    color: #FAF9F6;
    text-align: center;
    border-radius: 5px;
    padding: 4px;
    position: absolute;
    z-index: 200;
    bottom: -200%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

#divisionDropdown {
    padding: 5px;
    border-radius: 5px;
    font-size: 1.1em;
    color: #333;
}

footer {
    background-color: #CC0000;
    color: #FAF9F6;
    text-align: center;
    padding: 10px 0;
    font-size: 0.9rem;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
}

.sidebar.hidden {
    display: none;
}

.section-content.expanded {
    width: 100%;
}

.container-section {
    width: 100%;
    padding: 2rem;
    padding-top: 1.1rem;
}

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

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 4000; /* raised to be above modals/overlays when necessary */
    pointer-events: auto; /* ensure clicks are accepted */
    border-radius: 5px;
}

.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

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

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

.dropdown:hover .dropbtn {
    background-color: #0f46ac;
}

/* Email Modal Styles */
#emailModal.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
    justify-content: center;
    align-items: center;
}

.email-modal-content {
    background: #fff;
    margin: 5% auto;
    padding: 2rem 2.5rem 1.5rem 2.5rem;
    border-radius: 12px;
    max-width: 400px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.18);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    animation: fadeInModal 0.3s;
}

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

#emailModal .close-btn {
    position: absolute;
    top: 12px;
    right: 18px;
    font-size: 1.7rem;
    color: #003594;
    cursor: pointer;
    font-weight: bold;
    background: none;
    border: none;
    z-index: 10;
}

#emailModal h2 {
    margin-top: 0;
    color: #CC0000;
    text-align: center;
    margin-bottom: 1.2rem;
}


#emailModal .save-button {
    background: #CC0000;
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 0.7rem 0;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: background 0.2s;
    width: 100%;
}
#emailModal .save-button:hover {
    background: #0056b3;
}

/* Cool Input Styles for Email Modal */
.coolinput {
  display: flex;
  flex-direction: column;
  position: static;
  max-width: 100%;
  margin-bottom: 1rem;
}

.coolinput label.text {
  font-size: 0.75rem;
  color: #CC0000;
  font-weight: 700;
  position: relative;
  top: 0.5rem;
  margin: 0 0 0 7px;
  padding: 0 3px;
  background: #FAF9F6;
  width: fit-content;
}

.coolinput input[type=text].input,
.coolinput input[type=email].input,
.coolinput textarea.input {
  padding: 11px 10px;
  font-size: 0.75rem;
  border: 1.5px #CC0000 solid;
  border-radius: 5px;
  background: #FAF9F6;
}

.coolinput input[type=text].input:focus,
.coolinput input[type=email].input:focus,
.coolinput textarea.input:focus {
  outline: none;
}

