* {
    box-sizing: border-box;
}

/* Global UI scale: render everything as if the browser were at 90% zoom.
   --ui-zoom is the single knob; anything sized against the viewport
   (100vh / 100vw / full-screen overlays) must divide by it, because the
   browser does NOT rescale viewport units to match `zoom`. */
:root {
    --ui-zoom: 0.9;
    zoom: var(--ui-zoom);
}

html, body {
    margin: 0;
    padding: 0;
    overflow-x: clip;
}

html {
    scrollbar-gutter: stable;
}

body {
    font-family: 'Poppins', sans-serif;
    min-height: calc(100vh / var(--ui-zoom));
    display: flex;
    flex-direction: column;
}

.super-account-topbar {
    background-color: #00165e;
    color: #ffffff;
    padding: 1rem 2rem;
    display: flex;
    justify-content: flex-end;
    position: relative;
    z-index: 50;
    flex-shrink: 0;
    position: sticky;
    top: 0;
}

.account-topbar {
    background-color: #0077B6;
    color: #ffffff;
    padding: 1rem 2rem;
    display: flex;
    justify-content: flex-end;
    position: relative;
    z-index: 50;
    flex-shrink: 0;
    position: sticky;
    top: 0;
}

.account-dropdown {
    position: relative;
}

.account-toggle {
    background: none;
    border: none;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
}

.account-icon {
    width: 20px;
    height: 20px;
    fill: #ffffff;
}

.caret-icon {
    width: 16px;
    height: 16px;
    fill: #ffffff;
    transition: transform 0.2s ease;
}

.account-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 160px;
    overflow: hidden;
}

.account-menu.show {
    display: block;
}

.account-menu a,
.account-menu button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.6rem 1rem;
    background: none;
    border: none;
    color: #111827;
    font-size: 0.85rem;
    font-family: 'Poppins', sans-serif;
    text-decoration: none;
    cursor: pointer;
}

.account-menu a:hover,
.account-menu button:hover {
    background-color: #00336e;
    color: #ffffff;
}

/* START This is for setup_create_admin.html */
.setup-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.setup-title-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.back-arrow {
    font-size: 1.7rem;
    line-height: 1;
    color: #00165e;
    text-decoration: none;
    margin-top: 0.15rem;
}

.back-arrow:hover {
    color: #0077B6;
}

/*END This is for setup_create_admin.html */


/* ---------- Sidebar + topbar shell (shared across all sidebar pages) ---------- */
.layout-shell {
    min-height: calc(100vh / var(--ui-zoom));
}

.shell-right {
    margin-left: 250px;
}

.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 250px;
    background-color: #eef2ff;
    border-right: 1px solid #dde3f5;
    padding: 1.25rem 0;
    box-shadow: 4px 0px 20px 0px rgba(0, 0, 0, 0.25);
    z-index: 100;
    overflow-y: auto; /* in case nav items overflow the viewport height */
}

.sidebar-brand {
    display: flex;
    align-items: left;
    justify-content: left;
    padding: 0 1.25rem 1.25rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #dde3f5;
}

.sidebar-brand img {
    width: 100%;
    max-width: 170px;
    height: auto;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.5rem 0.75rem;
}

.sidebar-nav a,
.sidebar-nav .nav-toggle {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 0.85rem;
    border-radius: 8px;
    color: #334155;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
}

.sidebar-nav a:hover,
.sidebar-nav .nav-toggle:hover {
    background-color: #e0e7ff;
}

.sidebar-nav a.active {
    background-color: #00165e;
    color: #ffffff;
}

.sidebar-nav .nav-icon {
    width: 18px;
    text-align: center;
}

.nav-icon {
    width: 20px;
    height: 20px;
    margin-right: 0.5rem;
    vertical-align: middle;
    object-fit: contain;
}

.sidebar-nav a .icon-active {
    display: none;
}

.sidebar-nav a .icon-default {
    display: inline-block;
}

.sidebar-nav a.active .icon-default {
    display: none;
}

.sidebar-nav a.active .icon-active {
    display: inline-block;
}

/*ADMIN SPECIFIC SIDEBAR */

.admin-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 250px;
    background-color: #eef2ff;
    border-right: 1px solid #dde3f5;
    padding: 1.25rem 0;
    box-shadow: 4px 0px 20px 0px rgba(0, 0, 0, 0.25);
    z-index: 100;
    overflow-y: auto; /* in case nav items overflow the viewport height */
}

.admin-sidebar-brand {
    display: flex;
    align-items: left;
    justify-content: left;
    padding: 0 1.25rem 1.25rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #dde3f5;
}

.admin-sidebar-brand img {
    width: 100%;
    max-width: 170px;
    height: auto;
}

.admin-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.5rem 0.75rem;
}

.admin-sidebar-nav a,
.admin-sidebar-nav .admin-nav-toggle {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 0.85rem;
    border-radius: 8px;
    color: #334155;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
}

.admin-sidebar-nav a:hover,
.admin-sidebar-nav .admin-nav-toggle:hover {
    background-color: #e0e7ff;
}

.admin-sidebar-nav a.active {
    background-color: #0077B6;
    color: #ffffff;
}

.admin-sidebar-nav .admin-nav-icon {
    width: 18px;
    text-align: center;
}

.admin-nav-icon {
    width: 20px;
    height: 20px;
    margin-right: 0.5rem;
    vertical-align: middle;
    object-fit: contain;
}

.admin-sidebar-nav a .admin-icon-active {
    display: none;
}

.admin-sidebar-nav a .admin-icon-default {
    display: inline-block;
}

.admin-sidebar-nav a.active .admin-icon-default {
    display: none;
}

.admin-sidebar-nav a.active .admin-icon-active {
    display: inline-block;
}



.admin-content {
    padding: 24px 32px;
}

.content-wrapper {
    padding: 2rem 2.5rem;
    flex: 1;
} 

.account-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    align-items: center;
    justify-content: center;
    z-index: 150;
}

.account-modal-overlay.active {
    display: flex;
}

.account-modal {
    background: #EAEDFB;
    border-radius: 12px;
    width: 760px;
    max-width: 92%;
    max-height: calc(85vh / var(--ui-zoom));
    overflow-y: auto;
    position: relative;
    padding: 32px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
}

.account-modal-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #333;
}

.account-modal-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.account-modal-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
} 

.account-modal {
    background: #FFFFFF;
    border-radius: 12px;
    width: 1140px;
    max-width: 94%;
    max-height: calc(85vh / var(--ui-zoom));
    overflow-y: auto;
    position: relative;
    padding: 32px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
} 

.password-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    align-items: center;
    justify-content: center;
    z-index: 1000;
    display: none;
}

.password-modal-overlay.active {
    display: flex;
}

/* ---------- Wide tables inside cards: scroll horizontally instead of clipping ----------
   Wrap a <table> in <div class="table-scroll"> so a card that can't fit the full table
   at the current zoom / viewport width shows a horizontal scrollbar instead of the card
   clipping (overflow: hidden) or the table spilling past the card border. */
.table-scroll {
    overflow-x: auto;
    overflow-y: hidden; /* overflow-x:auto otherwise also arms a phantom vertical
                           scrollbar on sub-pixel (zoom) overflow */
    -webkit-overflow-scrolling: touch;
    /* let the wrapper shrink below its content inside flex/grid parents so the
       scrollbar can actually appear rather than pushing the layout wider */
    min-width: 0;
    max-width: 100%;
}

/* Native <input type="date"> ignores its `placeholder` attribute and always
   renders the browser/OS locale format (lowercase mm/dd/yyyy) itself — the only
   way to make that in-box text match the app's MM/DD/YYYY convention is to
   uppercase the rendered characters via CSS, not the placeholder attribute. */
input[type="date"] {
    text-transform: uppercase;
}



