html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    position: relative;
    z-index: 1;
}

/* Remove sidebar and toggle button only on admin index */
#nav-sidebar,
#toggle-nav-sidebar {
    display: none !important;
}

.main.shifted > #nav-sidebar + .content {
    max-width: calc(100% - 10px);
}

#content {
    margin-top: 10px !important;
    padding: 15px;
}

.messagelist {
    margin-top: 5px;
    margin-bottom: 10px;
}

.messagelist .alert {
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 14px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-error,
.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

/* Hide breadcrumb navigation */
.breadcrumbs {
    display: none !important;
}

/* Reduce height of top navbar */
#header {
    height: 35px !important;
    padding: 5px 15px !important;
    display: flex;
    align-items: center;
}

/* Optional: Force stacking context */
#header, #content, body, html {
    z-index: auto !important;
    overflow: visible !important;
}

#user-tools {
    font-size: 13px;
    text-transform: uppercase;
    color: white;
}

#user-tools a {
    color: rgb(211, 31, 31);
    text-decoration: none;
}

#user-tools a:hover {
    text-decoration: underline;
}

#site-name a {
    font-weight: bold;
    font-size: 20px;
    color: #ffffff;
    text-decoration: none;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#site-name a:hover {
    text-decoration: underline;
    color: #e0e0e0;
}

.nav-links {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 10000;
}

/* Parent Dropdown Container */
.dropdown {
    position: relative;
}

/* Shared Button Style */
.nav-link,
.dropdown-toggle,
.dropdown-menu a {
    background-color: #5f8ea3;
    color: #fff;
    padding: 6px 10px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 3px;
    text-decoration: none;
    display: block;
    width: 100%;
    box-sizing: border-box;
    transition: background 0.3s;
    white-space: nowrap;
    cursor: pointer;
}

/* Hover style for all links */
.nav-link:hover,
.dropdown-toggle:hover,
.dropdown-menu a:hover {
    background-color: #4a708b;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

/* Dropdown menu */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background-color: #5f8ea3;
    border: 1px solid #417893;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 9999;
}

/* Show dropdown on hover */
.dropdown:hover .dropdown-menu {
    display: block;
}

/* Active nav link */
.nav-link.active {
    background-color: #ffc !important;
    color: #417893 !important;
    font-weight: bold;
}


/* Scrollable results area */
#changelist-form .results {
    max-height: calc(100vh - 150px);
    overflow-y: auto;
    position: relative;
}

/* Table full width */
#result_list {
    width: 100%;
    border-collapse: collapse;
}

/* Sticky headers on all th cells in the thead */
#result_list thead tr th {
    position: sticky;
    top: -1px; /* height of fixed header + action bar */
    background: white;
    z-index: 10;
    box-shadow: 0 2px 2px -1px rgba(0,0,0,0.1);
}
.button {
    background-color: #007bff;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    text-decoration: none;
}
.button:hover {
    background-color: #0056b3;
}

/* Admin index metrics */
.today-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
    width: 100%;
}

.today-metrics .metric-card {
    position: relative;
    padding: 24px 24px 18px;
    border-radius: 14px;
    background: rgba(4, 20, 45, 0.72);
    border: 2px solid rgba(255, 75, 43, 0.55);
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.45);
    color: #f3f7ff;
    min-height: 280px;
    overflow: hidden;
}

.today-metrics .metric-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 104, 58, 0.16), rgba(57, 149, 255, 0.08));
    opacity: 0.8;
    pointer-events: none;
}

.today-metrics .metric-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
}

.metric-card__header .metric-value {
    font-size: 40px;
    font-weight: 800;
    margin: 0;
    color: #ffba5d;
    text-shadow: 0 7px 14px rgba(0, 0, 0, 0.35);
}

.today-metrics .metric-label {
    font-size: 18px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #ffffff;
    margin: 0;
}

.today-metrics .metric-hint {
    margin: 6px 0 0;
    color: rgba(240, 245, 255, 0.75);
    font-size: 13px;
    letter-spacing: 0.03em;
}

.metric-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.metric-list__item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    background: rgba(0, 10, 25, 0.45);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.metric-primary {
    font-weight: 600;
    letter-spacing: 0.02em;
}

.metric-secondary {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
}

.metric-meta {
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 186, 93, 0.85);
}

.metric-list__item--empty {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    border-style: dashed;
}

.client-checkbox-scroll {
    max-height: 180px;   /* roughly 8 items */
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 6px;
    background: #fff;
}

@media (max-width: 900px) {
    .today-metrics {
        grid-template-columns: 1fr;
    }

    .today-metrics .metric-card {
        min-height: auto;
    }
}
