/* -------------------------------------------------
   Shiftz Schedule — Optimized CSS (colors/spacing preserved)
   ------------------------------------------------- */

/* Fonts */
/* @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap'); */

@font-face {
  font-family: "Teko";
  src: url("../css/Teko/static/Teko-Regular.ttf") format("truetype");
  font-display: swap;
}

/* ------------------ Design Tokens ------------------ */
:root {
  --z-base: 0;
  --z-header: 100;       /* fixed navbar */
  --z-sidebar: 90;       /* side panels */
  --z-panels: 80;        /* boards/columns/chips */
  --z-tooltip: 900;     /* tooltip lives under modals */
  --z-context: 1000;      /* context menus/modals lives on top */
  

  /* brand/base */
  --clr-bg: #0f131a;                 /* lighter-dark background (fix #6) */
  --clr-text: #ffffff;
  --clr-muted: #9aa4b2;

  /* UI blocks */
  --clr-panel: #1a212b;              /* lifted from pure black for contrast */
  --clr-header: #002a3b;
  --clr-border: #ffffff;
  --clr-border-weak: rgba(255,255,255,.18);

  /* accents */
  --clr-red: rgb(195, 65, 65);
  --clr-red-strong: #ff0000;
  --clr-red-hover: rgba(211, 47, 18, 0.76);
  --clr-blue: rgb(0, 110, 255);
  --clr-blue-deep: steelblue;
  --clr-blue-ic: #2fa0dd;
  --clr-blue-hover: #2b8494;
  --clr-yellow: rgb(255, 225, 0);
  --clr-green: rgb(65, 195, 65);
  --clr-blue2: rgb(65, 65, 195);
  --clr-gray: rgb(65, 65, 65);

  /* nav */
  --clr-nav: rgba(171, 58, 58, 1);
  --clr-nav-shadow: rgba(0, 0, 0, .15);
  --clr-nav-inset: rgba(255, 255, 255, .2);

  /* sizes/radii/spacing */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --space-1: 4px;
  --space-2: 6px;
  --space-3: 10px;
  --space-4: 14px;
  --space-5: 18px;

  /* type scale (fluid) */
  --fs-xs: clamp(12px, .8vw, 13px);
  --fs-sm: clamp(13px, .95vw, 15px);
  --fs-md: clamp(14px, 1.05vw, 17px);   /* chips ++ (fix #3) */
  --fs-lg: clamp(16px, 1.2vw, 20px);
  --fs-xl: clamp(18px, 1.6vw, 26px);

  /* z-index */
  /* --z-loader: 9999; */

  /* misc */
  --shadow-light: 0 1px 3px rgba(0, 0, 0, .2);
  --shadow-box: 0 15px 40px rgba(0,0,0,0.12);
}

/* Global Resets (gentle) */
*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; }

html:focus-within { scroll-behavior: smooth; }

body {
  background-image: url("../images/Shiftz-logo-white.png");
  background-position: bottom right;
  background-size: 100px;
  background-repeat: no-repeat;
  font-family: "Teko", system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  font-size: x-large;
  color: var(--clr-text);
  background-color: var(--clr-bg);
  margin: 0;
}

/* Respect user motion preference */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Utility */
.cursor-default { cursor: default; }
.dragging { cursor: move !important; }
.visually-hidden { position:absolute !important; clip: rect(1px,1px,1px,1px); padding:0 !important; border:0 !important; height:1px !important; width:1px !important; overflow:hidden !important; }

/* Loader */
.loader {
  position: fixed;
  inset: 0;
  z-index: var(--z-loader);
  background: url("../images/ShiftZ-logo-white-1500.png") center no-repeat var(--clr-bg);
  background-size: 100px;
}

/* Containers / Header */
.container-fluid { width: 100%; }

.header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  display: inline-flex;
  align-items: center;
  background: var(--clr-header);
  padding-inline-end: var(--space-3);
  border-bottom: 2px solid var(--clr-border);
  z-index: var(--z-header);
  flex-direction: row-reverse;
  flex-wrap: wrap;
  justify-content: flex-start;
}

/* global content offset under fixed header (tight – fix #5) */
main, .wrapper .container-fluid, .container-fluid{
  margin-top: 2.5%;     /* near-touching */
  padding-top: 54px;   /* header height space */
}
/* Wizard */
#wizard {
  position: fixed;
  top: 65px;
  left: 290px;
  display: block;
  background: var(--clr-bg);
  color: var(--clr-text);
  border: 3px solid var(--clr-border);
  border-radius: var(--radius-md);
}

#wizard.minimized { position: static; display: inline-flex; flex-direction: column; }
#wizard.minimized .form-body { display: none; }

#wizard-form { display: block; margin: var(--space-1); padding: var(--space-4); }

.form-header {
  background: var(--clr-panel);
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  width: fit-content;
}

.form-body {
  display: block;
  position: relative;
  margin-top: 1rem;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-sm);
  background: var(--clr-panel);
}

.form-div { margin: var(--space-1); padding: var(--space-5); }

.form-tab {
  display: inline-flex;
  align-items: center;
  background: var(--clr-blue-deep);
  border-radius: var(--radius-md);
  padding: var(--space-2);
  margin: var(--space-2);
  font-size: x-large;
}
.form-tab.active { background: var(--clr-blue); color: var(--clr-text); }

#wizard-buttons { position: relative; }

#wizard-progress {
  width: 100%;
  background: var(--clr-text);
  border: 2px solid blue;
  border-radius: var(--radius-md);
}
#wizard-progress-bar { height: 1.5vh; background: rgb(211, 22, 22); }

.form-warning,
fieldset#tab-content code {
  display: inline-flex;
  flex-direction: column;
  width: 100%;
  margin: var(--space-1);
  padding: var(--space-5);
  flex-wrap: wrap;
  align-content: flex-start;
  justify-content: space-between;
  align-items: flex-start;
  border-radius: var(--radius-md);
  color: var(--clr-text);
}
.form-warning { background: var(--clr-red-strong); }
fieldset#tab-content code { background: #884f4f; font-style: italic; }

fieldset#tab-content { display: none; }
fieldset#tab-content.active {
  display: inline-flex;
  position: relative;
  height: 50vh;
  width: 50vw;
  flex-direction: column;
  align-items: baseline;
  justify-content: space-evenly;
}

/* Layout / Sidebar */
.create-dash { display: inline-flex; width: 100%; }

.dash-sidebar {
  position: fixed;
  top: 61.93px;
  left: 0;
  display: inline-flex;
  flex-direction: column;
  width: 15%;
  height: 100vh;
  border-right: 3px solid var(--clr-border);
  padding: 20px 4px;
  background: var(--clr-header);
  overflow-x: hidden;
  transition: width 0.8s ease;
  z-index: var(--z-sidebar);
}

.dash-header, .dash-column { display: inline-flex; flex-direction: column; width: 100%; }

.content .dash-content { margin-top: 200px; margin-left: 300px; }

.dash-board-layout { display: contents; }

body.active .dash-sidebar { width: 5%; transition: width 500ms ease; }
body.active .dash-sidebar span.text { display: none; }
body.active .dash-sidebar #wizard { display: none; }

/* Inputs */
#color-admin, #color-officers, #color-ff, #color-proby { padding: 0; width: 25%; }

#dash-sidebar-toggle {
  display: inline-flex;
  position: relative;
  padding: 24px;
  width: 20%;
  height: 3.5%;
  border: 4px inset var(--clr-border);
  border-radius: 30px;
  background: rgb(56, 96, 112);
  color: var(--clr-text);
  align-items: center;
  justify-content: center;
}

/* Navbar (flattened: original looked nested/SCSS-like) */
.container-nav { position: relative; width: 100%; padding-bottom: var(--space-2); }
.container-nav::after { content: ""; display: block; clear: both; height: 0; }

.nav {
  position: relative; z-index: 1; float: left; width: 100%; top: 0;
  padding: 0 20px; border-radius: 3px;
  box-shadow: inset 0 1px 1px var(--clr-nav-inset), inset 0 -1px 0 var(--clr-nav-shadow), var(--shadow-light);
  background: var(--clr-nav);
}

#navMenu ul { list-style: none; margin: 0; padding: 0; position: absolute; }
#navMenu li { display: inline-block; float: left; margin-right: 1px; }
#navMenu li a {
  display: block; min-width: 140px; height: 50px; text-align: center; line-height: 50px;
  color: #000; background: var(--clr-nav); text-decoration: none;
  box-shadow: inset 0 1px 1px var(--clr-nav-inset), inset 0 -1px 0 var(--clr-nav-shadow);
}
#navMenu li:hover > a { background: var(--clr-blue-hover); color: #fff; }

#navMenu li ul { display: none; position: absolute; }
#navMenu li:hover ul { display: block; }
#navMenu li ul li { display: block; float: none; }
#navMenu li ul li a {
  background: #fff; color: #000; height: 40px; line-height: 40px; width: auto; min-width: 100px; padding: 0 20px;
}
#navMenu li ul li a:hover { background: var(--clr-blue-hover); color: #fff; }

#navMenu .show-menu {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  text-decoration: none; color: #fff; background: #000;
  text-align: center; padding: 10px 0; display: none;
}
#navMenu input[type="checkbox"] { display: none; }
#navMenu input[type="checkbox"]:checked ~ .nav { display: block; }

@media screen and (max-width: 760px) {
  #navMenu .nav { display: none; flex-wrap: nowrap; }
  #navMenu ul { position: static; display: none; }
  #navMenu li { margin-bottom: 1px; }
  #navMenu ul li, #navMenu li a { width: 100%; }
  #navMenu .show-menu { display: block; }
}

/* Shift Board */
.wrapper .container-fluid { padding: var(--space-3); font-family: "Teko"; }

.h1, .h2, .h3 { color: var(--clr-text); margin-top: 0.5rem; text-decoration: underline; }
.h4 { font-weight: 400; }

.h1-d { text-align: center; background: #fff; color: #000; border-radius: var(--radius-lg); }
.h1-a { text-align: center; background: var(--clr-red); color: #000; border-radius: var(--radius-lg); }
.h1-b { text-align: center; background: var(--clr-green); color: #000; border-radius: var(--radius-lg); }
.h1-c { text-align: center; background: rgb(102, 163, 237); color: #000; border-radius: var(--radius-lg); }

/* lists become grid with tighter gaps (fix #4) */
.d-list{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px; /* tightened */
  align-items:start;
  list-style: none;
  margin-bottom: var(--space-2);
  padding: var(--space-2);
  font-size: 95%;
  text-align: center;
  min-height: 50px;
  max-height: 60vh; /* prevent overflow */

}

/* desktop can squeeze a bit more */
@media (min-width:1200px){
  .d-list{ grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
}

.row-cols-auto {
  display: flex; flex-wrap: wrap; justify-content: space-evenly; align-items: center; align-content: center; width: 100%;
}

ul.sortable.d-list:empty,
ul.sortable.d-list.ui-sortable.ic-border-bottom:empty {
  border: 1px dashed var(--clr-red-strong);
  border-radius: var(--radius-lg);
  padding-block: 2px;
  margin-top: 0.5rem;
  min-height: 50px; min-width: 100px;
}

li.ui-sortable-handle:hover { background: var(--clr-blue); text-align: left; }

.d-list-item-white,
.d-list-item-red,
.d-list-item-green,
.d-list-item-blue,
.d-list-item-yellow,
.d-list-item-grey {
  color: #000; padding: var(--space-5); margin: 1px; border-radius: var(--radius-lg);
}
.d-list-item-white { background: #fff; }
.d-list-item-red { background: var(--clr-red); }
.d-list-item-green { background: var(--clr-green); }
.d-list-item-blue { background: var(--clr-blue2); }
.d-list-item-yellow { background: var(--clr-yellow); }
.d-list-item-grey { background: var(--clr-gray); }

/* Modal Dialog */
.modal-dialog { z-index: var(--z-context);}

/* Context menu */
.context-menu {
  position: absolute; display: none; color: var(--clr-text);
  background: rgba(85, 85, 85, 0.78);
  border: 1px solid #ccc;
  box-shadow: 2px 2px 4px rgba(255, 255, 255, 0.2);
  z-index: var(--z-context);
}
.context-menu-option { padding: 8px 16px; cursor: pointer; user-select: none; }
.context-menu-option:hover { background: var(--clr-red-strong); }

/* Date field */
input#date-span[type="text"] {
  background: var(--clr-bg);
  display: inline-block;
  padding: var(--space-4);
  font-family: "Roboto Mono", monospace;
  color: var(--clr-text);
  font-size: large;
  border: 1px solid var(--clr-border);
  outline: none;
  border-radius: var(--radius-sm);
}
.datepicker-toggle {
  display: flex; justify-content: center; align-items: center; text-align: center;
  width: 100%; height: 100%; border: 1px solid var(--clr-border);
}

/* PAS/PAT */
#ic-board { display: flex; flex-direction: column; align-items: stretch; width: 100%; }
.ic-board-row { margin: 0; padding: 2%; }
#ic-board .card-body .row .h2-d {
  width: 50%; display: flex; margin: 0; padding: 0;
  flex-wrap: wrap; align-items: center; justify-content: center;
}
.pas-title { display: flex; align-items: center; justify-content: center; color: var(--clr-text); width: 100%; }
.ic-accessory { display: flex; flex-direction: column; justify-content: center; align-items: center; width: 50%; padding: 2%; }
.ic-border { border-style: solid; }
.ic-border-bottom { border-bottom-style: solid; padding: 5px; }

#truck-list { justify-content: center; color: var(--clr-text); }
ul li.sortable.d-item.ui-sortable-handle:hover { background: var(--clr-red-hover); text-align: left; }

.ic-extras { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; width: 100%; }
.truck { padding: var(--space-3); margin: 2px; border: 1px solid red; }

/* Contacts Table */
.table-container { display: flex; flex-direction: column; width: auto; }
.table-row { display: flex; flex-direction: row; width: 100%; }
.table-column { display: flex; flex-direction: column; }

.table-cell { padding: var(--space-3); overflow-wrap: break-word; color: #000; }
.table-cell.first-name { width: 12%; }
.table-cell.last-name  { width: 13%; }
.table-cell.rank       { width: 15%; }
.table-cell.email      { width: 35%; }
.table-cell.phone      { width: 20%; }
.table-cell.phone a    { color: #000; }
.table-cell.shift      { width: 7%; }

.contact-buttons { width: 10%; text-align: right; }

.contact-board {
  display: flex; flex-direction: row; width: 100%; font-weight: bold;
  border: 2px solid var(--clr-border-weak);
}
.table-header {
  color: var(--clr-text); font-weight: bold; font-size: inherit; background: rgb(129, 124, 124);
}
.contact-board:hover { background: #f0f0f0; }
.contact-board:hover .contact-buttons {
  display: flex; position: relative; justify-content: center; align-items: center; text-align: center; cursor: pointer;
}

/* Calendar */
#calendarBody { display: flex; flex-direction: column; width: 100%; border: 1px solid #ccc; }
.calendar-row { display: flex; flex-direction: row; width: 100%; }
.calendar-column { display: flex; flex-direction: column; width: 100%; }
.calendar-cell { padding: var(--space-3); overflow-wrap: break-word; color: #000; width: 14.28%; }

.calendar-wrapper {
  width: 100%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-box);
}
.calendar-header { display: flex; align-items: center; padding: 25px 30px 10px; justify-content: space-between; }
.calendar-header .icons { display: flex; }
.calendar-header .icons span {
  height: 38px; width: 38px; margin: 0 1px; cursor: pointer; color: #878787; text-align: center; line-height: 38px;
  font-size: 1.9rem; user-select: none; border-radius: 50%;
}
.calendar-header .icons span:last-child { margin-right: -10px; }
.calendar-header .icons span:hover { background: #f2f2f2; }
.calendar-header .current-date { font-size: 1.45rem; font-weight: 500; }

.calendar { padding: var(--space-4); }
.calendar ul { display: flex; flex-wrap: wrap; list-style: none; text-align: center; }
.calendar .weeks li { font-weight: 500; cursor: default; }
.calendar li { color: var(--clr-text); width: calc(100% / 7); font-size: 1.07rem; }
.calendar .days { margin-bottom: var(--space-4); }
.calendar .days li { cursor: pointer; position: relative; margin-top: 30px; }
.calendar .days li.inactive { color: #aaa; }
.calendar .days li.active { color: #fff; }
.calendar .days li::before {
  position: absolute; content: ""; left: 50%; top: 50%; height: 40px; width: 40px; z-index: -1; border-radius: 50%; transform: translate(-50%, -50%);
}
.calendar .days li.active::before { background: var(--clr-blue-ic); }
.calendar .days li:not(.active):hover::before { background: #cd3838; }

/* HOW-TO */
.wrapper .how-to { display: inline-flex; flex-direction: column; width: 100%; margin: var(--space-5); }
.wrapper .how-to .how-to-header { width: 100%; font-weight: bold; }
.how-to .break { border: 4px solid grey; width: 80%; }
.how-to-content { display: inline-flex; flex-direction: column; width: 100%; margin: var(--space-5); }

.how-to-section h1,
.how-to-section h2,
.how-to-section h3,
.how-to-section h4 { margin-top: 1rem; padding-top: 1.5rem; }

.how-to-section p {
  margin-top: 0.5rem; text-indent: 40px; font-weight: 300; max-width: 80%;
}

.toc-outline { border: 2px solid grey; }
.toc h2 { margin: 0; padding: 0; }

.toc,
#uploadModal .modal-body ol {
  width: fit-content; padding-left: 30px; list-style: none; counter-reset: section;
}

.toc-list { text-indent: 15px; }
.toc-list, #uploadModal .modal-body li { display: table; counter-increment: section; }

.toc-list::before, #uploadModal .modal-body li::before { display: table-cell; content: counters(section, ".") ". "; }
li li.toc-list::before, #uploadModal .modal-body li li::before { content: counter(section, lower-alpha) ". "; }
li li li.toc-list::before { content: counter(section, lower-roman) ". "; }

.ct-list, .sb-list, .pl-list, .board-list, .modal-list, .example-list {
  width: fit-content; padding-left: 30px; margin-bottom: var(--space-2); list-style: none; counter-reset: section;
}
.ct-item, .sb-item, .pl-item, .bl-item, .ml-item, .ex-item, li h2, li h3 { display: table; counter-increment: section; }
.ct-item::before, .sb-item::before, .pl-item::before, .bl-item::before, .ml-item::before, .ex-item::before, li h2::before, li h3::before {
  display: table-cell; content: counters(section, ".") ". ";
}
li li.ct-item::before,
li li.bl-item::before,
li li.ml-item::before,
li li.ex-item::before,
li li h2::before,
li li h3::before { content: counter(section, lower-alpha) ". "; }
li li li.ct-item::before,
li li li.bl-item::before,
li li li.ml-item::before,
li li li.ex-item::before,
li li li h2::before,
li li li h3::before { content: counter(section, lower-roman) ". "; }

.how-to-section blockquote {
  margin-top: 0.5rem; text-orientation: sideways; text-indent: 5px; font-style: italic; color: #000;
  background: #b65c5c; background-size: contain; border: 3px solid var(--clr-muted); border-radius: var(--radius-md); width: fit-content;
}

.modal-img video { margin: 1rem; padding: 1rem; }
.modal-img {
  display: inline-flex; justify-content: flex-start; align-items: center; text-align: justify; width: 100%;
}

/* Buttons */
button#dash-sidebar-toggle:focus-visible,
a:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px dashed var(--clr-blue);
  outline-offset: 2px;
}

/* Responsive — XL+ */
/* TV spacing only (>=1921px or .tv-mode) */
@media (min-width: 1921px){
  :root { --tv-bg: #0f1418; }
  body { background: var(--tv-bg); overflow: hidden; }

  .header, .container-nav, .dash-sidebar, #admin, #info { display:none !important; }
  .container-fluid { margin-top:0 !important; padding-top:8px !important; }

  /* tighten column gaps */
  .row-cols-auto { gap: 10px !important; justify-content: space-between !important; }
  .d-list { gap: 8px !important; }

  /* tighten item padding / raise readability slightly */
  .d-list-item-white,
  .d-list-item-red,
  .d-list-item-green,
  .d-list-item-blue,
  .d-list-item-yellow,
  .d-list-item-grey {
    padding: 10px 12px !important;
    min-height: 44px;
    font-size: 1rem; /* inherits from your base, keeps it legible */
  }

  /* compact headings */
  .h1, .h2, .h3 { margin: 6px 0 4px !important; }
}

/* Allow forcing on smaller screens too */
body.tv-mode .header,
body.tv-mode .container-nav,
body.tv-mode .dash-sidebar,
body.tv-mode #admin,
body.tv-mode #info { display:none !important; }
body.tv-mode { background:#0f1418; overflow:hidden; }


/* Desktop (fixed the missing px in max-width) */
@media only screen and (min-width: 1200px) and (max-width: 1920px) {
  body { background: #000000e0; overflow-x: hidden; }

  #post-board,
  #shift-board {
    display: flex; width: 100%; height: 100%; justify-content: space-between; margin-left: auto; margin-top: 3px;
  }

  #config-board {
    display: flex; width: 85vw; height: 100vh; justify-content: space-evenly;
    margin-left: 290px; margin-top: 70px; transition: width 500ms ease, margin 500ms ease;
  }

  body.active #config-board { width: 95vw; margin-left: auto; margin-right: 0; }
}

/* Large devices */
@media only screen and (min-width: 993px) and (max-width: 1199px) {
  body { background: var(--clr-bg); font-family: "Poppins", monospace; }

  .wrapper .sideNav { width: 4%; }
  .wrapper .container-fluid { width: 95%; }

  body.active .sideNav { width: 15%; }
  body.active .container-fluid { width: 85%; }

  .h1-a, .h1-b, .h1-c, .h1-d { border-top: 10px; margin-top: 1rem; }
}

/* Medium devices */
@media only screen and (min-width: 768px) and (max-width: 992px) {
  body { background: var(--clr-bg); font-family: "Poppins", monospace; }

  .wrapper .sideNav { width: 4%; }
  .wrapper .container-fluid { width: 95%; }

  body.active .sideNav { width: 25%; }
  body.active .container-fluid { width: 75%; }

  .h1-a, .h1-b, .h1-c, .h1-d { border-top: 10px; margin-top: 1rem; }
}

/* Small devices */
@media only screen and (min-width: 600px) and (max-width: 768px) {
  body { background: var(--clr-bg); font-family: "Poppins", monospace; }

  .wrapper .sideNav { width: 6%; }
  .wrapper .container-fluid { width: 92%; }

  body.active .sideNav { width: 25%; }
  body.active .container-fluid { width: 75%; }

  .h1-a, .h1-b, .h1-c, .h1-d { border-top: 10px; margin-top: 1rem; }
}

/* Phones */
@media only screen and (max-width: 600px) {
  body { background: var(--clr-bg); font-family: "Poppins", monospace; margin: 0; padding: 0; }
  div { display: block; }

  .wrapper .sideNav {
    height: auto; width: 10%; position: fixed; z-index: 1; top: 0; left: 0;
    padding: 20px 4px; background: var(--clr-nav); overflow-x: hidden; transition: width 0.8s ease;
    border-top-right-radius: var(--radius-lg); border-bottom-right-radius: var(--radius-lg);
  }

  .sideNav a .spanBadge {
    padding: 7px; line-height: 0.7rem; text-align: center; font-size: 1rem;
    border-radius: 40px; background: var(--clr-gray); color: var(--clr-text);
  }
  .sideNav a {
    align-items: center; text-align: center; text-decoration: none; font-size: 1rem; color: #010101; display: flex;
  }
  .sideNav a .navIcon { align-self: center; text-align: center; font-size: 1.5rem; color: #010101; display: block; }
  .sideNav a .text { display: flex; border-radius: var(--radius-lg); width: fit-content; color: #000; visibility: hidden; }
  .sideNav a .text.show { display: flex; align-items: center; border-radius: var(--radius-lg); width: fit-content; color: #000; padding-left: 5px; visibility: visible; }

  .sideNav a:hover .navIcon,
  .sideNav a.active .navIcon {
    cursor: pointer; color: #fff; border-right: 2px solid rgb(5, 68, 104); width: fit-content; display: block;
  }

  .wrapper .container-fluid { transition: all 0.8s ease; width: 87%; padding: 0; }

  body.active .sideNav { width: 40%; display: flex; flex-direction: column; padding: 20px 14px; }
  body.active .sideNav a .spanBadge { width: 100%; }
  body.active .container-fluid { margin-right: 0; margin-left: auto; padding-right: 0; padding-left: 4px; width: 58%; }

  .h1-a, .h1-b, .h1-c, .h1-d { border-top: 10px; margin-top: 1rem; }

  .table-container { display: inline-flex; flex-direction: column; flex-wrap: wrap; align-content: flex-start; align-items: flex-start; }
  .table-row { display: grid; grid-auto-flow: row; width: 100%; }
  .table-column { display: grid; grid-auto-flow: column; }
  .table-cell { padding: var(--space-3); overflow-wrap: break-word; color: #000; }

  .table-cell.first-name,
  .table-cell.last-name,
  .table-cell.rank,
  .table-cell.email,
  .table-cell.phone,
  .table-cell.role,
  .table-cell.shift,
  .table-cell.edit-button { width: 100%; }

  .contact-board { flex-direction: column; }
  .table-header { display: inline-flex; flex-wrap: wrap; }
}
li.sortable[data-tooltip]{
  position: relative;
  cursor: pointer;
  touch-action: manipulation;
  z-index: var(--z-tooltip); /* ensure above header/nav */
}

/* ===== Global Tooltip (arrowed, stacked) ===== */
#tooltip{
  position: fixed;
  top: -9999px; left: -9999px;
  max-width: 360px;
  z-index: var(--z-tooltip);
  pointer-events: none;

  background: rgba(30,30,30,.97);
  color: #f5f5f5;
  font-size: 25px;
  line-height: 1.45;
  padding: 12px 14px;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.15);

  opacity: 0;
  transform: translate3d(0,6px,0) scale(.98);
  transition: opacity .12s ease, transform .12s ease;
}

/* Visible state */
#tooltip[data-show="true"]{
  opacity: 1;
  transform: translate3d(0,0,0) scale(1);
}

/* Arrow */
#tooltip::after{
  content: "";
  position: absolute;
  width: 10px; height: 10px;
  background: rgba(30,30,30,.97);
  border: 1px solid rgba(255,255,255,.15);
  transform: rotate(45deg);
}

/* Side-specific arrow placement */
#tooltip[data-side="top"]::after{
  bottom: -6px; left: var(--arrow-x, 50%);
  border-top: none; border-left: none;
}
#tooltip[data-side="bottom"]::after{
  top: -6px; left: var(--arrow-x, 50%);
  border-bottom: none; border-right: none;
}
#tooltip[data-side="left"]::after{
  right: -6px; top: var(--arrow-y, 50%);
  border-left: none; border-bottom: none;
}
#tooltip[data-side="right"]::after{
  left: -6px; top: var(--arrow-y, 50%);
  border-right: none; border-top: none;
}

/* Stacked content styling */
#tooltip .tt-list{
  margin: 0; padding: 0;
  list-style: none;
  display: grid;
  row-gap: 6px;
}
#tooltip .tt-list li{
  white-space: nowrap;        /* “stack” each line w/o wrapping */
}

/* Mobile */
@media (max-width: 768px){
  #tooltip{
    max-width: 260px;
    font-size: 17px;
  }
}

/* Any element can have a tooltip */
[data-tooltip]{ cursor: pointer; }

/* =========================================================
   TV / Very large screens (≥1921px) — keep 3 columns, widen, fit
   ========================================================= */
@media (min-width: 1921px){

  /* Subtle background + remove chrome */
  :root { --tv-bg: #0f1418; }
  body{
    background: var(--tv-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden; /* no scrollbars for TV view */
  }
  .header,
  .container-nav,
  .dash-sidebar,
  #admin,
  #info { display: none !important; }

  .container-fluid{
    margin-top: 0 !important;
    padding: 8px 8px 0 !important; /* give max width to content */
  }

  /* Keep your original 3-up layout; just reduce gaps so columns get wider */
  #post-board,
  #shift-board{
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    gap: 12px;                  /* tighter than default */
    padding-inline: 8px;        /* minimal side padding */
    width: 100%;
  }

  /* A/B/C columns — keep 3 columns but grant them as much width as possible */
  #a-shift,
  #b-shift,
  #c-shift{
    flex: 0 0 calc(33.333% - 8px) !important;
    max-width: calc(33.333% - 8px) !important;
    height: auto !important;               /* avoid forced 100vh */
  }

  /* Their card-body: compact padding so more content fits vertically */
  #a-shift .card-body,
  #b-shift .card-body,
  #c-shift .card-body{
    padding: 10px !important;
    display: flex;
    flex-direction: column;
    row-gap: 8px; /* tighten vertical rhythm */
  }

  /* Station rows: ensure two equal sub-columns (saves height, keeps side-by-side) */
  #a-shift .row-cols-auto,
  #b-shift .row-cols-auto,
  #c-shift .row-cols-auto{
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start !important;
  }
  /* Make sure station containers don’t fight widths */
  #a-shift .row-cols-auto > div,
  #b-shift .row-cols-auto > div,
  #c-shift .row-cols-auto > div{
    width: auto !important;
    max-width: none !important;
  }

  /* Lists should fill the column width */
  #a-shift .d-list,
  #b-shift .d-list,
  #c-shift .d-list{
    display: inline-flex !important;
    width: 100% !important;
    margin: 0;
  }

  /* Bigger, readable chips — but compact padding to keep overall height in check */
  .d-list-item-white,
  .d-list-item-red,
  .d-list-item-green,
  .d-list-item-blue,
  .d-list-item-yellow,
  .d-list-item-grey{
    font-size: xx-large;   /* bigger text */
    line-height: 1.2;
    padding: 10px 12px;   /* compact to save height */
    min-height: 44px;
    hyphens: auto;
  }

  /* Headings: slightly larger but with tight margins */
  .h1{ font-size: xx-large; margin: .25rem 0; text-decoration-thickness: 3px; }
  .h2{ font-size: xx-large; margin: .2rem 0; }
  .h3{ font-size: xx-large; margin: .15rem 0; }

  /* Date + badges compact */
  .datepicker-toggle{ font-size: xxx-large; padding: 6px 8px; width: auto; }
  #updated-span-a, #updated-span-b, #updated-span-c{ font-size: xx-large; }

  /* Kill stray margins that create vertical bloat */
  .row, .justify-content-center{ margin: 0 !important; }
}
