:root {
    --primary-color-: #172B4D;
    --blue-lowlight-color-: #104eeb;
    --blue-highlight-color-: #1a59ff;
    --accent-color-: #2668d5;
    --background-color-: #f6f7f8;
    --background-gray-: #e8e8e8;
    --button-color-: #e5e8eb;
    --button-highlight-: #d1d7db;
    --text-color-: #474747;
    --module-width-: 200px;
    --button-radius-size-: 8px;
    --section-radius-size-: 15px;
    --box-shadow-: 0 0 10px #80808047;
    --border-: 1px solid #ccc;
    --dot-yellow-: #ffd96f;
    --dot-green-: #4def5a;
    --dot-blue-: #007fff;
    --intake-: #ffd96f;
    --cad-: #ef994d;
    --cam-: var(--accent-color-);
    --quality-: #ffd96f;
    --completed-: #4def5a;
    --almost-white-: #f8f9fb;
    --in-progress-: gold;
    --darkness-: rgba(0, 0, 0, 0.75);
    --hover-blue-: #c9e1ff66;
    --hover-gray-: #e8e8e8;
    --translucent-white-: #f6f7f8fa;
    --warning-background-red-: #ff5353;
    --warning-text-red-: darkred;
    --error-: #d71010;
    --success-: #4def5a;
    --header-font-family-: system-ui;
    --header-letter-spacing-: .25px;
}

html,
body {
    margin: 0;
    padding: 0;
    top: 0px;
    font-family: "DM Sans", sans-serif;
    height: 100%;
    font-size: 14px;
    width: 100%;
    color: var(--text-color-);
    background-color: var(--background-color-);
}

a:visited {
    color: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--primary-color-);
    font-family: var(--header-font-family-);
    letter-spacing: var(--header-letter-spacing-);
}

h1 {
    margin: 10px 0 20px 0;
    font-size: 2rem;
}

h2 {
    margin: 5px 0;
    font-size: 1.5rem;
}

h3 {
    margin: 5px 0;
    font-size: 1.17rem;
}

h4 {
    margin: 10px 0 10px 0;
    font-size: 1rem;
}

h5 {
    font-size: .83rem;
}

h6 {
    font-size: .67rem;
}

p {
    font-size: 14px;
    padding: 0;
    margin: 3px 0;
    line-height: 1.4;
}

input {
    border-radius: 4px;
    border: 1px solid #ccc;
}

input:focus {
    outline: none;
    box-shadow: 0 0 5px var(--blue-highlight-color-);
}

input[type="radio"]:focus,
input[type="checkbox"]:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
    box-shadow: none;
}

label {
    pointer-events: none;
}

label input[type="radio"] {
    pointer-events: auto;
}

.medium-heading {
    font-weight: bold;
    font-size: 20px;
    margin: 0;
    color: var(--primary-color-);
}

ul {
    list-style: none;
    padding: 0;
    line-height: 2rem;
}

button {
    border: none;
    border-radius: var(--button-radius-size-);
    background-color: var(--button-color-);
    pointer-events: auto;
    color: var(--text-color-);
    text-align: center;
    mix-blend-mode: normal;
    padding: 10px;
    font-weight: 500;
    transition: background-color .25s;
    cursor: pointer;
}

button:hover {
    background-color: var(--hover-blue-);
    /* transition: background-color .25s; */
}

button:active {
    transform: scale(0.98);
}

button#returnToDashboard:hover {
    background-color: var(--blue-highlight-color-);
    color: white;
}

.fullRadius {
    border-radius: 100px;
}

.blueButton {
    color: var(--almost-white-);
    background-color: var(--blue-lowlight-color-);
}

.blueButton:hover {
    background-color: var(--blue-highlight-color-) !important;
}

.emboss {
    box-shadow: inset 0px 15px 15px #ffffff26, inset 0px -15px 15px #00000015, 0 2px 2px #0000004a !important;
}

.box-shadow {
    box-shadow: var(--box-shadow-);
}

.full-width {
    width: 100%;
}

.opacity-1 {
    opacity: 1 !important;
}

.search-container {
    position: relative;
    width: 300px;
    margin: 0;
    padding: 0;
    margin-left: auto;
    display: inline-flex;
}

.search-input {
    width: 100%;
    padding: 10px 10px 10px 12px;
    font-size: 16px;
    border: var(--border-);
    border-left: none;
    border-radius: 0 25px 25px 0;
    outline: none;
    margin: 0;
    font-size: 1em;
    color: var(--text-color-);
}

.search-input:focus {
    box-shadow: none;
}

#search-scope-option {
    border-radius: 25px 0 0 25px;
    border: var(--border-);
    padding: 5px;
    color: var(--text-color-);
    border-right: dashed 1px #dadada;
    text-align: center;
    background: var(--almost-white-);
    font-weight: 600;
}

.search-scope:focus {
    outline: none;
    box-shadow: none;
}

.search-button img {
    height: 20px;
}

.search-results {
    margin-top: 5px;
    border: 1px solid #e2e6ee;
    border-radius: 8px;
    padding: 7px;
    max-height: 420px;
    min-width: 300px;
    background: #fff;
    font-size: 14px;
    position: absolute;
    right: 0;
    top: 100%;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    overflow-y: auto;
    transition: opacity 0.15s ease;
}

.search-results .result-row {
    display: grid;
    grid-template-columns: 50px 60px auto min-content;
    gap: 10px;
    padding: 8px;
    border-bottom: 1px solid #f0f2f6;
    border-radius: 0px;
    align-items: center;
    cursor: pointer;
    white-space: nowrap;
}

.search-results .result-row>div:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-results .result-row:hover {
    background-color: var(--hover-blue-);
    border-radius: 5px;
    transition: background 300ms ease;
}

.search-results .result-row:last-child {
    border-bottom: none;
}

.search-results .muted {
    color: #6b7280;
}

.search-results .count {
    font-weight: 600;
    margin-bottom: 6px;
}

#search-results.visible {
    display: block;
    opacity: 1;
}

.thumb-wrapper {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 6px;
    overflow: hidden;
}

.thumb {
    max-width: 50px;
    max-height: 50px;
    width: auto;
    height: auto;
    object-fit: contain;
    background: white;
    padding: 5px;
    box-sizing: border-box;
}


.no-border {
    border: none !important;
}

.text-box p {
    line-height: 1.5;
    font-size: 1.1em;
}

.x-button,
.min-button {
    position: absolute;
    display: flex;
    top: 6px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    height: 30px;
    padding: 5px;
    color: var(--text-color-);
    transition: color 0.3s;
    width: 30px;
    align-items: center;
    justify-content: center;
    min-width: unset;
    z-index: 1;
}

.x-button {
    right: 6px;
}

.x-button.inverted,
.min-button.inverted {
    color: var(--almost-white-);
}

.x-button:hover {
    color: var(--error-);
    background: none;
}

.min-button:hover {
    color: var(--accent-color-);
    background: none;
}

.min-button {
    right: 38px;
}

.flex {
    display: flex;
}

.flex-row {
    display: flex;
    flex-direction: row;
}

.flex-col {
    display: flex;
    flex-direction: column;
}

.h-full {
    height: 100%;
}

.margin-top10 {
    margin-top: 10px !important;
}

.margin-top20 {
    margin-top: 20px !important;
}

.margin-top30 {
    margin-top: 30px !important;
}

.margin-bottom30 {
    margin-bottom: 30px !important;
}

.padding-top30 {
    padding-top: 40px;
}

.padding10 {
    padding: 10px !important;
}

.padding20 {
    padding: 20px !important;
}

.gap5 {
    gap: 5px !important;
}

.gap10 {
    gap: 10px !important;
}

.gap20 {
    gap: 20px !important;
}

.gap30 {
    gap: 30px !important;
}

.align-center {
    align-items: center !important;
}

.justify-center {
    justify-content: center !important;
}

.text-left {
    text-align: left !important;
}

.text-center {
    text-align: center !important;
}

.remove-line-item {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    padding: 0;
    margin: auto;
    min-width: 30px;
}

.remove-line-item:hover {
    color: var(--error-);
    background: unset;
}

.centered-text {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: auto;
    text-align: center
}

.ellipsis {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vertical-text {
    writing-mode: vertical-rl;
    /* or vertical-lr */
    text-orientation: upright;
    /* or upright for all upright glyphs */
}

/* Table Styling */
/* Modern clean table style */
table {
    border-collapse: collapse;
    border: unset;
    font-family: sans-serif;
    font-size: 14px;
    background-color: #fff;
}

thead {
    background-color: #f0f4f8;
}

th,
td {
    padding: 10px 16px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: baseline;
}

th {
    font-weight: 600;
    color: #374151;
}

td {
    color: #4b5563;
}

.table {
    display: grid;
    font-family: monospace;
    font-size: 14px;
    border-radius: 6px;
    margin-top: 10px;
}

/* Header and row use contents to share grid layout */
.table-header,
.table-row {
    display: contents;
}

/* Header cells */
.table-header-cell {
    font-weight: bold;
    padding: 10px 20px;
    border-bottom: 2px solid #ccc;
    position: sticky;
    top: 0;
    z-index: 2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: var(--almost-white-);
}

/* Body cells */
.table-cell {
    display: table-cell;
    vertical-align: middle;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    height: 1.2em;
}

/* Hover effect applied to all cells in the hovered row */
.table-row:hover .table-cell {
    transition: all 0.5s ease;
    z-index: 3;
    background: var(--hover-blue-);
    border-bottom: 1px solid transparent;
}

.centered-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.messages-cell {
    padding: 10px 40px;
}

/* Hide scrollbar for WebKit browsers (Chrome, Safari) */
.prevent-scroll {
    overflow: hidden;
}

.section-box-shadow {
    box-shadow: 5px 5px 1px #ffffff21, -5px -5px 1px #00000021;
}

.lightButton {
    border: var(--border-);
    background: var(--almost-white-);
}

.lightButton:hover {
    background-color: var(--hover-gray-);
}

.haze {
    position: absolute;
    z-index: 2;
    background: #ffffff61;
}

.scrollable {
    scrollbar-color: transparent transparent;
    scrollbar-width: thin;
    transition: scrollbar-color 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
}

/* --- WebKit browsers (Chrome, Edge, Safari) --- */
.scrollable::-webkit-scrollbar {
    width: 10px;
}

.scrollable::-webkit-scrollbar-track {
    background: transparent;
    transition: background 0.3s ease;
}

.scrollable::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 6px;
    transition: background 0.3s ease;
}

/* When hovering over the container, fade scrollbar in */
.scrollable:hover::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    /* faint track */
}

.scrollable:hover::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.25);
    /* subtle gray thumb */
}

/* Optional: hover over the scrollbar itself for a stronger color */
.scrollable:hover::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.4);
}

/* --- Firefox fallback --- */
.scrollable:hover {
    scrollbar-color: rgba(0, 0, 0, 0.25) transparent;
}

.fade-bottom {
    position: absolute;
    width: 100%;
    bottom: 0;
    right: 0;
    margin-right: 15px;
    background: linear-gradient(to bottom, transparent, var(--background-color-));
    height: 40px;
}

.no-select {
    user-select: none;
    -webkit-user-select: none;
    /* Safari */
    -ms-user-select: none;
    /* older Edge/IE */
}

.resize-handle-e {
    position: absolute;
    top: 48%;
    right: 0;
    width: 10px;
    border-left: 2px solid;
    border-right: 2px solid;
    border-color: #e9e9e9;
    height: 6%;
    padding: 0 2px;
    box-sizing: border-box;
    cursor: ew-resize;
    touch-action: none;
    transition: height 200ms ease, top 200ms ease;
}

.resize-handle-e:hover {
    height: 8%;
    top: 47%;
    border-color: #d7d7d7;
}

.vertical-line {
    background: #e9e9e9;
    display: block;
    width: 2px;
    height: 100%;
    margin: 0 auto;
}

.resize-handle-e:hover .vertical-line {
    background: #d7d7d7;
}

.resize-handle-e:hover::after,
.leftColumn.resizing .resize-handle-e::after {
    opacity: 1;
}

body.resizing {
    user-select: none;
    cursor: ew-resize;
}

/* Time keeping  */

.time-clock-container {
    position: fixed;
    bottom: 8px;
    width: 325px;
    height: 50px;
    box-shadow: var(--box-shadow-);
    padding: 10px;
    border-radius: 8px;
    background: #000a1bcc;
    box-sizing: border-box;
    left: calc(50% - 175px);
    border: var(--border-);
    z-index: 10;
    color: var(--almost-white-);
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
    user-select: none;
}

.punch-btn {
    background: var(--warning-text-red-);
    padding: 12px;
    border-radius: 50px;
    color: white;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    border: 2px solid #ffffffa8;
    cursor: pointer;
    box-sizing: border-box;
}

.punch-btn:hover {
    background: var(--warning-background-red-);
    color: white;
    transition: color 200ms ease, background 200ms ease;
    transform: scale(1.02);
}

.punch-btn:active {
    background: var(--warning-background-red-);
    color: white;
    transition: color 200ms ease, background 200ms ease;
    transform: scale(.99);
}

.live-ticker {
    background: white;
    color: var(--text-color-);
    padding: 7px;
    border-radius: 5px;
}

.drag-handle {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.time-keeper-container .drag-handle {
    cursor: grab;
    user-select: none;
    touch-action: none;
}

.time-keeper-container .drag-handle:active {
    cursor: grabbing;
}

.time-keeper-container.drag-ready {
    transform: none;
}

.expand-svg {
    box-sizing: border-box;
    padding: 3px;
    cursor: pointer;
}