/* General */
body {
    margin: 0;
    background-image: url('/static/img/loginbg.jpg');
    background-repeat: no-repeat;
    background-attachment: fixed;
}
body.viewer [data-target="templates"],
body.viewer #templates {
display: none !important;
}
body.viewer [data-target="admin"],
body.inspector [data-target="admin"],
body.viewer #admin,
body.inspector #admin {
display: none !important;
}
::selection {
  background-color: rgba(81, 177, 199, 0.1);
  color: #51B1C7;
}
::-moz-selection {
  background-color: rgba(81, 177, 199, 0.1);
  color: #51B1C7;
}

.uploadWrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.browseButton {
  display: inline-block;
  padding: 10px 20px;
  font-family: 'Roboto', sans-serif;
  font-size: 18px;
  background-color: #F6FDFF;
  color: #40899A;
  border: 1px solid #E4E4E4;
  cursor: pointer;
  border-radius: 0px;
  transition: all 150ms ease-out;
}

.browseButton:hover {
  border-color: #40899A;
  color: #2c6b7d;
}

.hiddenUploadInput {
  display: none;
}

.issue-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.issue-thumb {
  width: 100px;
  height: 100px;
  border: 1px solid #ccc;
  border-radius: 6px;
  overflow: hidden;
}

.issue-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.indexBg {
    width: 100vw;
    height: 100vh;
    background-color: rgba(204, 236, 242, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    position: fixed;
    z-index: -1;
}

/* Login */
.loginForm {
    background-color: #ffffff;
    width: 345px;
    text-align: center;
    padding: 30px 0px;
    position: absolute;
    left: 331px;
    top: 200px;
}

.loginLogo {
    width: 211px;
    margin-bottom: 23px;
}

.loginInput {
    width: 268px;
    height: 38px;
    border: 1px solid #E4E4E4;
    background-color: #F6FDFF;
    font-size: 20px;
    font-family: 'Roboto', sans-serif;
    padding-left: 13px;
}

/* Buttons */
.button1 {
    border: 2px solid #51B1C7;
    /*width: 169px;*/
    /*height: 39px;*/
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    font-size: 20px;
    padding: 0px;
    color: #6FAFBE;
    cursor: pointer;
    border-radius: 1px;
    background: linear-gradient(to bottom, #FFFFFF 0%, #F6FDFF 100%);
    transition: all 150ms ease-out;
}

.button2 {
  border: 1px solid #C3F1FB;
  outline: 2px solid #51B1C7;
  font-family: 'Roboto', sans-serif;
  font-weight: bold;
  font-size: 20px;
  padding: 10px;
  color: #6FAFBE;
  cursor: pointer;
  background: linear-gradient(to bottom, #FFFFFF 0%, #F6FDFF 100%);
  transition: all 150ms ease-out;
}

.button2:hover {
  border: 1px solid rgb(144, 208, 223);
  outline: 2px solid #6F9FAA;
  color: #40899A;
}

.button2Red {
  border: 1px solid #C3F1FB;
  outline: 2px solid #c75151;
  font-family: 'Roboto', sans-serif;
  font-weight: bold;
  font-size: 20px;
  padding: 10px;
  color: #be6f6f;
  cursor: pointer;
  background: linear-gradient(to bottom, #FFFFFF 0%, #F6FDFF 100%);
  transition: all 150ms ease-out;
}

.button2Red:hover {
  border: 1px solid rgb(223, 144, 144);
  outline: 2px solid #aa6f6f;
  color: #9a4040;
}

.button3 {
  border: 1px solid #ffffff;
  outline: 2px solid #51B1C7;
  font-family: 'Roboto', sans-serif;
  font-weight: bold;
  font-size: 20px;
  padding: 10px;
  color: #ffffff;
  cursor: pointer;
  background-color: #51B1C7;
  transition: all 150ms ease-out;
}

.button3:hover {
  outline: 2px solid #40899A;
  background-color: #40899A;
}
/* Fields */

.fieldLabel {
  padding: 10px !important;
  outline: none;
  box-sizing: border-box;
  color: #7B7B7B;
  font-family: 'Roboto', sans-serif;
  font-size: 20px;
}



.fieldText {
  background-color: #F6FDFF;
  border: 1px solid #E4E4E4 !important;
  width: 50%;
  padding: 10px !important;
  outline: none;
  box-sizing: border-box;
  transition: all 150ms ease-out;
  color: #7B7B7B;
  font-family: 'Roboto', sans-serif;
  font-size: 20px;
}

.fieldText::placeholder {
  font-size: 20px;
  color: #98BAC2;
  font-family: 'Roboto', sans-serif;
}
.fieldText:focus {
  border: 1px solid #40899A !important; 
}
.fieldTextArea {
  background-color: #F6FDFF;
  border: 1px solid #E4E4E4;
  height: 119px;
  padding: 10px !important;
  outline: none;
  box-sizing: border-box;
  transition: all 150ms ease-out;
  color: #7B7B7B;
  font-family: 'Roboto', sans-serif;
  font-size: 20px;
}
.fieldTextArea::placeholder {
  font-size: 20px;
  color: #98BAC2;
  font-family: 'Roboto', sans-serif;
}
.fieldTextArea:focus {
  border: 1px solid #40899A; 
}

.fieldSelectCon {
  width: 25%;
  position: relative;
  display: block;
  border: 1px solid #E4E4E4 !important;
}

.fieldSelect {
  display: block;
  width: 100%;
  padding: 10px !important;
  appearance: none;
  font-size: 20px;
  background-color: #F6FDFF;
  color: #98BAC2;
  font-family: 'Roboto', sans-serif;
}


.fieldSelect::placeholder {
  font-size: 20px;
  color: #98BAC2;
  font-family: 'Roboto', sans-serif;
}

.fieldSelect:focus {
  border: 1px solid #40899A !important;
}

.fieldSelectIcon {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  width: 1rem;
  height: 1rem;
  pointer-events: none;
  transform: translateY(-50%);
  transition: transform 0.3s ease, stroke 0.3s ease, fill 0.3s ease;
  stroke: #98BAC2;
  fill: #98BAC2;
}

/* 🎯 Animate icon on hover */
.fieldSelectCon:hover .fieldSelectIcon {
  stroke: #3b82f6;
  fill: #3b82f6;
  transform: translateY(-50%) rotate(-90deg);
}

.fieldDate {
  background-color: #F6FDFF;
  border: 1px solid #E4E4E4 !important;
  width: 100%;
  padding: 10px !important;
  outline: none;
  box-sizing: border-box;
  transition: all 150ms ease-out;
  color: #98BAC2;
  font-family: 'Roboto', sans-serif;
  font-size: 20px;
  border-radius: 0px; /* Match rest of inputs */
  appearance: none;
}

/* Hides default icon */
.fieldDate::-webkit-calendar-picker-indicator {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: url('/static/img/icondate.svg') no-repeat center;
  background-size: 20px 20px;
  width: 20px;
  height: 20px;
  border: none;
  opacity: 1;
  cursor: pointer;
  transition: all 150ms ease-out;
}

.fieldDate:focus {
  border-color: #40899A !important;
}

.fieldDate::-moz-focus-inner {
  border: 0;
}

.fieldDateIcon {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  width: 1.2rem;
  height: 1.2rem;
  transform: translateY(-50%);
  transition: transform 0.3s ease, fill 0.3s ease;
  fill: #98BAC2;
  z-index: 1; /* ✅ Lower than input */
  pointer-events: none; /* ✅ Let clicks go through */
}

.svg-icon {
  display: inline-block;
  cursor: pointer;
  margin-right: 0.5rem;
  vertical-align: middle;
}

.svg-icon svg path {
  transition: fill 0.25s ease;
}

.edit-icon:hover svg path {
  fill: #5d8aff;
}

/* Notifications row */
.notif-item{
  display:flex; align-items:center; gap:10px;
  padding:10px 0; border-bottom:1px solid #eee;
}

/* Red dot for unread (pseudo-element) */
.notif-item::before{
  content:"";
  width:10px; height:10px; border-radius:50%;
  background-color:#E53E3E;           /* red */
  flex:0 0 10px;
  opacity:0; transform:scale(.6);
  transition:opacity .15s ease, transform .15s ease;
}
.notif-item.is-unread::before{
  opacity:1; transform:scale(1);
}
body[data-role="viewer"] #new-audit-btn,
body[data-role="viewer"] #report-issue-btn { display: none !important; }

.loginButtons {
  right: 15px;
  bottom: 15px;
  position: fixed;
}

.whatsNewBtn{
  z-index: 10000;
  border: 1px solid #C3F1FB;
  outline: 2px solid #51B1C7;
  background: linear-gradient(to bottom, #FFFFFF 0%, #F6FDFF 100%);
  font-family: 'Roboto', sans-serif;
  font-weight: 600;
  font-size: 14px;
  padding: 8px 12px;
  color: #6FAFBE;
  cursor: pointer;
  transition: all 150ms ease-out;
  margin-right: 8px;
}
.whatsNewBtn:hover{
  border-color: #90D0DF;
  outline-color: #6F9FAA;
  color: #40899A;
}

.loginCookieButton {
  z-index: 10000;
  border: 1px solid #C3F1FB;
  outline: 2px solid #51B1C7;
  background: linear-gradient(to bottom, #FFFFFF 0%, #F6FDFF 100%);
  cursor: pointer;
  transition: all 150ms ease-out;
  height: 35px;
  width: 35px;
  position: relative;
  transform: translate(0px, 5px);
}
.loginCookieButton:hover{
  border-color: #90D0DF;
  outline-color: #6F9FAA;
  color: #40899A;
}

.loginCookieButton:hover svg {
  transition: all 100ms ease-out;
}

.loginCookieButton:hover svg circle {
  fill: #5d8aff;
}

.loginCookieButton:hover svg path {
  fill: #5d8aff;
}

/* Patch Notes */
.note-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  font-family: 'Roboto', sans-serif;
  color: #7B7B7B;
  font-weight: 600;
}

.ver-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #C3F1FB;
  outline: 2px solid #51B1C7;
  background: linear-gradient(to bottom, #FFFFFF 0%, #F6FDFF 100%);
  font-size: 12px;
  color: #40899A;
}

.note-title { font-weight: 700; }
.note-date  { font-weight: 400; color: #9A9A9A; }

/* optional polish */
#na-name-row { display: flex; align-items: center; flex-wrap: wrap; }
#na-name-preset { min-width: 240px; }
#na-name { min-width: 260px; }
@media (max-width: 720px) { #na-name-row > * { margin-bottom: 8px; } }


.notif-dot{
  display:inline-block; width:10px; height:10px; border-radius:50%;
  background-color:#E53E3E; flex:0 0 10px;
  opacity:0; visibility:visible !important; /* ensure it can show */
}
.notif-item.is-unread .notif-dot{ opacity:1; }


.bell-icon:hover svg path {
  fill: #5d8aff;
}

.version-icon:hover svg rect {
  fill: #5d8aff;
}

.version-icon:hover svg circle {
  fill: #5d8aff;
}

.version-icon:hover svg path {
  stroke: #5d8aff;
}

.cookie-icon:hover svg circle {
  fill: #5d8aff;
}

.cookie-icon:hover svg path {
  fill: #5d8aff;
}

.activity-icon:hover svg path {
  fill: #5d8aff;
}

.geo-icon:hover svg path {
  fill: #5d8aff;
}

.activity-icon:hover svg circle {
  fill: #5d8aff;
}

.builder-panel {
  margin-left: 2rem;
  padding: 6px 0;
}
.option-row {
  display: flex;
  gap: .5rem;
  margin-top: 4px;
}
.option-row input {
  flex: 1;
}

.view-icon:hover svg path {
  fill: #5d8aff;
}

.view-icon:hover svg circle {
  fill: #5d8aff;
}

.delete-icon:hover svg path {
  fill: #e84d4d;
}

#audit-section-pages { position: relative; }
.auditSecPage { display: none; }
.auditSecPage.active { display: block; }
#secDots .secDot {
  width: 8px; height: 8px; border-radius: 50%;
  border: 1px solid #999; background: transparent;
  margin: 0 5px; cursor: pointer;
}
#secDots .secDot.active { background: #999; }
.pagerControls .button2 { min-width: 90px; }

.svg-icon.geo-icon { margin-left: 6px; }


.template-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
}



.lineBreak {
  background: linear-gradient(to right, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0));
  width: 100%;
  height: 2px
}

.lineBreak2 {
  width: 100%;
  height: 1px;
  background-color: #F3F3F3;
}

.template-actions .left-icons {
  display: flex;
  gap: 0.5rem;
}

.template-actions .svg-icon {
  cursor: pointer;
  display: flex;
  align-items: center;
}



.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.template-grid > div {
  background-color: #f9f9f9;
  padding: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  transition: box-shadow 0.3s ease;
}

.template-grid > div:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}



.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.card-block {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: white;
  padding: 1rem;
  border: 1px solid #E6EEF2;
  cursor: default;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transition: box-shadow 0.2s ease;
  border-radius: 8px;
}
.card-block:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.card-body {
  flex-grow: 1; /* ⬅️ Pushes footer down */
  display: flex;
  flex-direction: column;
}

.template-card-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  margin-top: auto;
  gap: 10px;
}

.button1:hover {
    border: 2px solid #6F9FAA;
    color: #d65b5b;
}

.badge-open { background: #FFECEC; color: #C44; padding: 4px 8px; border-radius: 6px; }
.badge-resolved { background: #E9F9ED; color: #2E7D32; padding: 4px 8px; border-radius: 6px; }

tr.row-resolved { opacity: 0.7; }

.button1Inner {
    border: 1px solid #C3F1FB;
    position: relative;
    margin: 2px;
    padding: 0px 10px;
    left: 0px;
    top: 0px;
    line-height: 31px;
    vertical-align: middle;
    transition: border 250ms ease-out;
}

.button1:hover .button1Inner {
    border: 1px solid #f0d0d0;
}

.button1Icon {
  width: 100px;
  height: 100px;
  transition: all 150ms ease-out;
}

.button1:hover .button1Icon {
  width: 110px;
  height: 110px;
}



.button1InnerTiny {
    width: 3px;
    height: 3px;
    position: absolute;
}

.button1InnerTiny.tiny1 {
    left: 0px;
    top: 0px;
    border-right: 1px solid #51B1C7;
    border-bottom: 1px solid #51B1C7;
    border-left: 0px solid transparent;
    border-top: 0px solid transparent;
    transition: all 150ms ease-out;
}

/* prevent background scroll while modal is open */
body.modal-open { overflow: hidden; }


.button1:hover .button1InnerTiny.tiny1 {
    border: 1px solid #c75151;
    left: -10px;
    top: -10px;
}

.button1InnerTiny.tiny2 {
    right: 0px;
    top: 0px;
    border-left: 1px solid #51B1C7;
    border-bottom: 1px solid #51B1C7;
    border-top: 0px solid transparent;
    border-right: 0px solid transparent;
    transition: all 150ms ease-out 240ms;
}

.button1:hover .button1InnerTiny.tiny2 {
    border: 1px solid #c75151;
    right: -10px;
    top: -10px;
}

.button1InnerTiny.tiny3 {
    bottom: 0px;
    right: 0px;
    border-top: 1px solid #51B1C7;
    border-left: 1px solid #51B1C7;
    border-right: 0px solid transparent;
    border-bottom: 0px solid transparent;
    transition: all 150ms ease-out 80ms;
}

.button1:hover .button1InnerTiny.tiny3 {
    border: 1px solid #c75151;
    bottom: -10px;
    right: -10px;
}

.button1InnerTiny.tiny4 {
    left: 0px;
    bottom: 0px;
    border-top: 1px solid #51B1C7;
    border-right: 1px solid #51B1C7;
    border-bottom: 0px solid transparent;
    border-left: 0px solid transparent;
    transition: all 150ms ease-out 160ms;
}

.button1:hover .button1InnerTiny.tiny4 {
    border: 1px solid #c75151;
    left: -10px;
    bottom: -10px;
}

.loginLine {
    width: 117px;
    height: 1px;
    border: none;
    background-color: #F3F3F3;
    margin: 0px auto;
}

.loginTrouble {
    color: #98BAC2;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    margin-top: 20px;
}

.new-template-btn {
background-color: var(--colorPrimary);
color: var(--textOnPrimary);
}

.company-col {
display: none;
}

/* Master users see company columns */
body.master .company-col {
display: table-cell !important;
}

.cap-status-badge {
display: inline-block;
padding: 2px 6px;
border-radius: 6px;
font-size: 0.8rem;
color: white;
}


.cap-status-pending { background: #e74c3c; }
.cap-status-inprogress { background: #f39c12; } 
.cap-status-completed { background: #2ecc71; } 

.sidebar {
font-size: 20px;
height: 100vh;
overflow-y: hidden;
background-color: transparent !important;
}

.navIcon {
  position: relative;
  left: 50%;
  max-width: 35px;
  max-height: 35px;
}

.sidebar .nav-item {
color: var(--sidebar-text, #aaa);
cursor: pointer;
transition: color 0.2s ease;
background-color: white;
border-radius: 10px;

position: relative;
margin: 15px 0px 15px 15px;
}

.sidebar .nav-item.active {
color: white;
font-weight: bold;
}

.sidebar .nav .nav-item {
  padding: 5px !important;
}

.buttonNorm {
border: none;
font-size: 20px;
padding: 10px 20px;
background-color: var(--colorPrimary);
color: var(--textOnPrimary);
transition: background-color 150ms ease-out;
cursor: pointer;
}

.buttonBlockRed {
border: none;
font-size: 20px;
width: 22px;
height: 26px;
color: var(--colorWhite);
transition: background-color 150ms ease-out;
cursor: pointer;
background-image: url('/static/img/delete.png');
background-size: 100% 100%;
background-repeat: no-repeat;
margin-top: 12px;
background-color: white;
}

#templates-list > div {
box-shadow: 2px 7px 15px rgba(0, 0, 0, 0.1);
transition: box-shadow 150ms ease-out;
}

#templates-list > div:hover {
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.3);
}

.buttonClose {
-webkit-clip-path: polygon(6px 0%, calc(100% - 6px) 0%, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px);
clip-path: polygon(6px 0%, calc(100% - 6px) 0%, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px);
border: none;
font-size: 25px;
width: 35px;
height: 35px;
background-color: #EFC8C8;
color: var(--colorWhite);
transition: background-color 150ms ease-out;
cursor: pointer;
line-height: 35px;
vertical-align: middle;
text-align: center;
cursor:pointer;
display: flex;
justify-content: center;
align-items: center;
position: absolute;
right: 20px;
top: 20px;
}

.numbered-list {
  margin: 20px 0;
  font-size: 20px;
  color: #7B7B7B;
  font-family: 'Roboto', sans-serif;
}
.numbered-list li {
  margin-bottom: 20px;
}

.numbered-list li::marker {
  font-weight: bold;
  color: #9A9A9A;
  font-size: 16px;
}

.modalHeader {
  font-family: 'Orbitron', sans-serif;
  font-weight: bold;
  font-size: 24px;
  color: #7B7B7B;
  margin: 15px 0px;
}

.modalDesc {
  font-family: 'Roboto', sans-serif;
  font-size: 20px;
  color: #9A9A9A;
  margin: 15px 0px;
}

.buttonClose:hover {
background-color: rgb(255, 79, 79);
}

.buttonMed {
-webkit-clip-path: polygon(6px 0%, calc(100% - 6px) 0%, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px);
clip-path: polygon(6px 0%, calc(100% - 6px) 0%, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px);
border: none;
font-size: 22px;
width: auto;
height: 45px;
padding: 0px 10px;
transition: background-color 150ms ease-out;
cursor: pointer;
line-height: 35px;
vertical-align: middle;
text-align: center;
cursor:pointer;
background-color: var(--colorPrimary);
color: var(--textOnPrimary);
}


/* Table styling */
#issues-table {
width: 100%;
border-collapse: collapse;
margin-top: 1rem;
background-color: white;
}
#issues-table th,
#issues-table td {
padding: .75rem;
border: 1px solid #ccc;
text-align: left;
}
#issues-table thead {
background: #f5f5f5;
}
#issues-table tbody tr:hover {
background: #fafafa;
}

.empty-state {
  text-align: center;
  padding: 40px;
  font-size: 1.1rem;
  color: var(--text-muted, #777);
}
.empty-state .muted {
  font-size: 0.9rem;
  color: #aaa;
}

/* Shared modal backdrop */
.modal {
 position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  display: flex; /* Make it always layout correctly */
  justify-content: center;
  align-items: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.modal.active {
  opacity: 1;
  pointer-events: auto;
}

/* Shared modal content */
.modal-content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 30px;
  max-width: 1000px;
  width: calc(100% - 40px);
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  opacity: 1;
  transition: transform 0.2s ease, opacity 0.2s ease;
  scrollbar-width: none;
}


.glitch-animate {
  animation: modalSoftGlitchIn 0.45s ease-out forwards;
}

.modal-content.closing {
  transform: translate(-50%, -40%);
  opacity: 0;
}

.modal-content::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    to bottom,
    transparent,
    rgba(255,255,255,0.015) 2px,
    transparent 4px
  );
  z-index: 10;
  pointer-events: none;
  animation: softOverlayFade 0.45s ease-out forwards;
}

@keyframes softOverlayFade {
  0% { opacity: 0.15; }
  100% { opacity: 0; }
}

@keyframes modalSoftGlitchIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -52%) scale(0.95);
    filter: none;
  }
  20% {
    opacity: 0.3;
    transform: translate(-50.3%, -49.5%) scale(1.01);
    filter: drop-shadow(0 0 1px rgba(0,255,255,0.4));
  }
  40% {
    opacity: 0.6;
    transform: translate(-49.9%, -50.1%) scale(0.99);
    filter: drop-shadow(0 0 1px rgba(255,0,255,0.3));
  }
  60% {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(1);
    filter: none;
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    filter: none;
  }
}


/* On close, add .closing to animate out */
.modal.closing {
  opacity: 0;
  pointer-events: none;
}

/* Sticky, opaque close button */
.modal-close {
position: sticky;
top: 10px;
right: 10px;
float: right;
cursor: pointer;
}

.loaderCon {
  background-color: white;
  width: 100vw;
  height: 100vh;
  position: fixed;
  left: 0px;
  top: 0px;
   opacity: 1;
  z-index: 9999999999999999;
  transition: opacity 0.5s ease;
}


.loaderCon.fade-out {
  opacity: 0;
  pointer-events: none;
}

#hook-arm {
  transform-box: fill-box;
  transform-origin: top left;
  animation: fold-scale-delay 1.5s ease-in-out infinite;
}

@keyframes fold-scale-delay {
  0%     { transform: scale(1); opacity: 1; }
  33%    { transform: scale(1); opacity: 1; }
  45.5%  { transform: scale(0.05); opacity: 0; }
  83.25% { transform: scale(0.05); opacity: 0; }
  95%    { transform: scale(1); opacity: 1; }
  100%   { transform: scale(1); opacity: 1; }
}

#outer-ring {
  transform-origin: center;
  animation: spin-outer 1.5s ease-in-out infinite;
}

@keyframes spin-outer {
  0%, 45.5%   { transform: rotate(0deg); }
  83.25%      { transform: rotate(-360deg); }
  100%        { transform: rotate(-360deg); }
}

#middle-ring {
  transform-origin: center;
  animation: spin-middle 1.5s ease-in-out infinite;
}

@keyframes spin-middle {
  0%, 45.5%   { transform: rotate(0deg); }
  83.25%      { transform: rotate(720deg); }
  100%        { transform: rotate(720deg); }
}

#core {
  transform-box: fill-box;
  transform-origin: center;
  fill: rgb(129, 230, 252);
  animation: core-pulse-sync 1.5s ease-in-out infinite;
}

@keyframes core-pulse-sync {
  0%       { transform: scale(1); fill: rgb(129, 230, 252); }
  33%      { transform: scale(1); fill: rgb(129, 230, 252); }
  45.5%    { transform: scale(1.45); fill: rgb(230, 59, 59); }
  83.25%   { transform: scale(1.45); fill: rgb(230, 59, 59); }
  95%      { transform: scale(1); fill: rgb(129, 230, 252); }
  100%     { transform: scale(1); fill: rgb(129, 230, 252); }
}

.loaderFrameInnerRight1 { transform-box: fill-box;
  transform-origin: center;
  animation: loaderFrameInnerRight1 1.5s ease-in-out infinite; }

@keyframes loaderFrameInnerRight1 {
  0%       { transform: translate(0px, 0px); }
  38%      { transform: translate(0px, 0px); }
  45.5%    { transform: translate(20px, 0px); }
  88.25%   { transform: translate(20px, 0px); }
  95%      { transform: translate(0px, 0px); }
  100%     { transform: translate(0px, 0px); }
}

.loaderFrameInnerLeft1 { transform-box: fill-box;
  transform-origin: center;
  animation: loaderFrameInnerLeft1 1.5s ease-in-out infinite; }

@keyframes loaderFrameInnerLeft1 {
  0%       { transform: translate(0px, 0px); }
  38%      { transform: translate(0px, 0px); }
  45.5%    { transform: translate(-20px, 0px); }
  88.25%   { transform: translate(-20px, 0px); }
  95%      { transform: translate(0px, 0px); }
  100%     { transform: translate(0px, 0px); }
}



.loaderFrameInnerLeft2 {
  transform-origin: center;
  animation: loaderFrameInnerLeft2 3s ease-in-out infinite;
}

@keyframes loaderFrameInnerLeft2 {
  0%     { transform: rotate(0deg); }
  19% { transform: rotate(0deg); }
  42.75% { transform: rotate(15deg); }
  44.125% { transform: rotate(15deg); }
  47.5% { transform: rotate(0deg); }
  50%    { transform: rotate(0deg); }
  50%     { transform: rotate(0deg); }
  69% { transform: rotate(0deg); }
  92.75% { transform: rotate(-15deg); }
  94.125% { transform: rotate(-15deg); }
  97.5% { transform: rotate(0deg); }
  100%    { transform: rotate(0deg); }
}

.loaderFrameInnerRight2 {
  transform-origin: center;
  animation: loaderFrameInnerRight2 3s ease-in-out infinite;
}

@keyframes loaderFrameInnerRight2 {
  0%     { transform: rotate(0deg); }
  19% { transform: rotate(0deg); }
  42.75% { transform: rotate(15deg); }
  44.125% { transform: rotate(15deg); }
  47.5% { transform: rotate(0deg); }
  50%    { transform: rotate(0deg); }
  50%     { transform: rotate(0deg); }
  69% { transform: rotate(0deg); }
  92.75% { transform: rotate(-15deg); }
  94.125% { transform: rotate(-15deg); }
  97.5% { transform: rotate(0deg); }
  100%    { transform: rotate(0deg); }
}

.asimoSpin {
    height: 70px;
    width: auto;
    position: absolute;
    left: 15px;
    bottom: 15px;
}

/* Report form styling */
#report-modal .modal-content form > div {
display: flex;
flex-direction: column;
margin-bottom: 1rem;
}
#report-modal .modal-content input,
#report-modal .modal-content textarea,
#report-modal .modal-content select {
padding: .5rem;
font-size: 1rem;
border: 1px solid #ccc;
border-radius: 6px;
width: 100%;
box-sizing: border-box;
margin-top: .25rem;
}
.report-actions {
text-align: right;
}
.report-actions button + button {
margin-left: 20px;
}

/* Filter & bulk-delete */

#bulk-delete {
margin-top: 1rem;
display: none;
}

/* Delete modal styling */
#delete-modal .modal-content p {
margin-bottom: 1rem;
}
#delete-modal .modal-content .button-group {
text-align: right;
}
#delete-modal .buttonNorm {
margin-left: .5rem;
}

/* Attachments styling */
#attachments-container {
margin-top: 1rem;
}
#detail-files {
list-style: none;
padding-left: 0;
}
#detail-files li {
margin-bottom: .75rem;
}

/* Image thumbnails */
#detail-files img {
border: 2px solid #212d65;
border-radius: 6px;
max-width: 100%;
max-height: 200px;
display: block;
cursor: pointer;
}
#detail-files img:hover {
border-color: #485cb4;
}

/* Video thumbnail wrapper */
.video-thumb {
position: relative;
border: 2px solid #212d65;
border-radius: 6px;
max-width: 100%;
max-height: 200px;
cursor: pointer;
overflow: hidden;
}
.video-thumb:hover {
border-color: #485cb4;
}
.video-thumb video {
width: 100%;
height: auto;
display: block;
pointer-events: none;
}
.video-thumb .video-overlay {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 96px;
z-index: 9000;
color: rgba(255,255,255,0.8);
pointer-events: none;
text-shadow: 0px 0px 60px var(--colorPrimary);
}
/* Media modal content */
#media-content img,
#media-content video {
max-width: 100%;
max-height: 80vh;
display: block;
margin: 0 auto;
}
#auditPieChart,
#issuePieChart {
max-width: 400px;
max-height: 400px;
width: 100%;
margin: auto;
display: block;
}
.status-open {
color: red;
font-weight: bold;
}
.status-resolved {
color: green;
font-weight: bold;
}
#profile-menu {
display: none;
position: absolute;
top: -115px; /* ⬅️ shift UP */
right: -90px;
background: white;
border: 1px solid #ccc;
border-radius: 6px;
box-shadow: 0 2px 8px rgba(0,0,0,0.15);
z-index: 9999;
padding: 0.5rem;
text-align: left;
}
#profile-pic {
width: 40px;
height: 40px;
border-radius: 50%;
cursor: pointer;
border: 2px solid #ffe7b3;
transition: border 150ms ease-out;
}
#profile-pic:hover {
border: 2px solid #edab1e;
}
.read-only-banner {
background-color: #f0ad4e;
color: #fff;
padding: 10px;
text-align: center;
font-weight: bold;
}
.audit-action:disabled {
display: none !important;
opacity: 0.3;
cursor: not-allowed;
}

.audit-meta {
font-size: 0.9rem;
color: #666;
margin-bottom: 0.5rem;
}
.audit-meta span {
display: block;
}
.insp-tab-btn.active {
background: #51B1C7 !important;  /* Gold-ish highlight */
color: white;
}

.auditCardText {
  font-size: 18px;
  font-weight: 500;
  color: #7B7B7B;
  min-width:0;
  overflow-wrap:anywhere;
}

.auditCardTextHeader {
  font-size: 20px;
  font-weight: 500;
  color: #7B7B7B;
}

/* Validation hints + errors */
.fieldHint { font-size:12px; color:#7B7B7B; margin-top:6px; }
.fieldError { font-size:12px; color:#C0392B; margin-top:6px; display:none; }
.hasError .fieldError { display:block; }

/* red outline for invalid inputs */
.hasError .fieldText,
.hasError .fieldTextArea,
.hasError .fieldSelect,
.hasError .fieldDate { outline: 2px solid #C0392B; }

.auditCardSection {
  display:grid;
  grid-template-columns:auto 1fr;
  align-items:start;
  column-gap:8px;
}

.fieldSelectCon .fieldDate { padding-right: 2.2rem !important; }

.auditCardIcon {
  grid-row:1;
}

.auditCardCompanyImg {
  width: 40px;
  height: 40px;
}

.sortable-ghost {
    opacity: 0.5;
    background: #ccc;
}

/* New */
/* ========== GLOBAL TABLE STRUCTURE ========== */
.tableBase {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #E4E4E4;
}

.fields-list li {
  margin-bottom: 15px;
}

.tableHeader {
  background-color: #F5F5F5;
  text-transform: uppercase;
  font-family: 'Roboto', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #7B7B7B;
}

.tableRow,
.tableHeaderRow {
  border-bottom: 1px solid #E4E4E4;
}

.tableCell,
.tableHeaderCell {
  padding: 10px;
  border-right: 1px solid #E4E4E4;
  text-align: left;
  font-family: 'Roboto', sans-serif;
}

.tableHeaderCell {
  font-weight: 500;
  font-size: 16px;
}

.tableCell {
  font-weight: 500;
  font-size: 14px;
  color: #7B7B7B;
}

/* Last cell in each row should not have right border */
.tableRow td:last-child,
.tableHeaderRow th:last-child {
  border-right: none;
}

/* ========== CUSTOM CHECKBOX ========== */
.customCheckbox {
  width: 21px;
  height: 21px;
  appearance: none;
  background-color: #FFFFFF;
  border: 1px solid #C3F1FB;
  outline: 2px solid #51B1C7;
  cursor: pointer;
  transition: all 150ms ease-out;
}

.customCheckbox:checked {
  background-color: #51B1C7;
  background-image: url('/static/img/check.svg'); /* Optional */
  background-repeat: no-repeat;
  background-position: center;
}

/* ========== WIDTH HELPERS (devkit) ========== */
.w50 { width: 50px; }
.w75 { width: 75px; }
.w100 { width: 100px; }
.w150 { width: 150px; }
.w200 { width: 200px; }

/* ========== ICON ACTIONS ========== */
.tableActions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* Template editor row layout */
.fieldRow{
  display: grid;
  grid-template-columns: 40% 20% 20% 1fr auto; /* matches header widths */
  gap: .5rem;
  align-items: start;
}
.fieldRow .options-rules-col { display: block; min-width: 0; }
.fieldRow-actions { display:flex; align-items:center; }

@media (max-width: 980px) {
  .fieldRow{
    grid-template-columns: 1fr;  /* stack nicely on mobile */
  }
  .fieldRow-actions{ justify-content:flex-end; }
}

/* Template editor row layout */
.fieldRow{
  display: grid;
  grid-template-columns: 40% 20% 20% 1fr auto; /* Question | Type | Section | Options/Rules | Remove */
  gap: .5rem;
  align-items: start;
}
.fieldRow .options-rules-col { display:block; min-width:0; }
.fieldRow-actions { display:flex; align-items:center; }

/* Compact “close-style” Remove button */
.removeBtn {
  line-height: 1;
  border: 1px solid #C3F1FB;
  outline: 2px solid #51B1C7;
  background: linear-gradient(to bottom, #FFFFFF 0%, #F6FDFF 100%);
  color: #6FAFBE;
  font-family: 'Roboto', sans-serif;
  font-weight: bold;
  font-size: 16px;
  padding: 6px 10px;
  cursor: pointer;
  transition: all 150ms ease-out;
}
.removeBtn:hover {
  outline-color: #40899A;
  color: #40899A;
}

/* Number badge for options */
.optIndex {
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border: 1px solid #C3F1FB;
  outline: 2px solid #51B1C7;
  background: #F6FDFF;
  color: #6FAFBE;
  font: 700 14px/26px 'Roboto', sans-serif;
  text-align: center;
  border-radius: 3px;
}

/* Make all inputs in the modal use your global look */
.fieldRow input[type="text"],
.fieldRow input[type="number"],
.fieldRow .fieldText { width: 100%; }

@media (max-width: 980px) {
  .fieldRow{ grid-template-columns: 1fr; }
  .fieldRow-actions{ justify-content:flex-end; }
}

/* Template editor grid */
.fieldRow{
  display:grid;
  grid-template-columns: 40% 20% 20% 1fr auto; /* Question | Type | Section | (spacer) | Remove */
  gap:.5rem;
  align-items:start;
}

/* First line cells */
.fieldRow .cell-question,
.fieldRow .cell-type,
.fieldRow .cell-section{ min-width:0; }
.fieldRow .cell-type .fieldSelectCon,
.fieldRow .cell-type .fieldSelect{ width:100%; }  /* <-- full-width type dropdown */

/* Second line (options & rules) spanning full width */
.fieldRow .rowExtras{ grid-column:1 / -1; margin-top:.5rem; }

/* Red close-style remove buttons */
.removeBtnRed{
  line-height:1;
  border:1px solid #FAD3D3;
  outline:2px solid #E37171;
  background:linear-gradient(to bottom,#FFF,#FFF5F5);
  color:#C44545;
  font:700 16px/1 'Roboto', sans-serif;
  padding:6px 10px;
  cursor:pointer;
  transition:all .15s ease-out;
}
.removeBtnRed:hover{ outline-color:#B33A3A; color:#B33A3A; }

/* Number badge for option rows */
.optIndex{
  min-width:28px;height:28px;padding:0 6px;
  border:1px solid #C3F1FB; outline:2px solid #51B1C7;
  background:#F6FDFF; color:#6FAFBE;
  font:700 14px/26px 'Roboto',sans-serif; text-align:center; border-radius:3px;
}

/* Keep inputs consistent */
.fieldRow input[type="text"],
.fieldRow input[type="number"],
.fieldRow .fieldText{ width:100%; }

@media (max-width:980px){
  .fieldRow{ grid-template-columns:1fr auto; }
  .cell-type,.cell-section{ grid-column:1 / -1; }
}

/* turn off default numbers and set up a counter */
#template-items{
  list-style:none;
  counter-reset: q;
  padding-left:0;
}

/* spacing to make room for the badge */
#template-items > li.field-item{
  position:relative;
  padding-left:40px;         /* room for badge */
  margin-bottom:10px;
}

/* the badge itself */
#template-items > li.field-item::before{
  content: counter(q) ".";
  counter-increment: q;
  position:absolute;
  left:0; top:6px;
  width:28px; height:28px;
  border-radius:6px;
  display:inline-flex; align-items:center; justify-content:center;
  font: 700 14px/1 Inter, sans-serif;
  box-sizing:border-box;
}

/* odd = light purple */
#template-items > li.field-item:nth-child(odd)::before{
  background:#F3E8FF;        /* violet-100 */
  color:#7C3AED;              /* violet-600 */
  border:1px solid #E9D5FF;   /* violet-200 */
}

/* even = light blue (your current look) */
#template-items > li.field-item:nth-child(even)::before{
  background:#ECF6FF;         /* blue-50-ish */
  color:#2563EB;              /* blue-600 */
  border:1px solid #CFE9FF;   /* blue-200-ish */
}

#template-items > li.field-item:nth-child(odd){ background:rgba(124,58,237,0.03); }
#template-items > li.field-item:nth-child(even){ background:rgba(37,99,235,0.03); }
#template-items > li.field-item{ border-radius:8px; padding-top:8px; padding-bottom:8px; }

/* ---------- Right Utility Rail ---------- */
#utility-rail{
  position: fixed;
  top: 90px;                 /* below top header line */
  right: 18px;               /* off the card gutter */
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 300;              /* below universal modal, above content */
  pointer-events: none;      /* rail doesn't eat clicks except its children */
}
#utility-rail > *{ pointer-events: auto; }

/* Bell button look (matches Insight buttons) */
.rail-btn{
  display:inline-flex; align-items:center; justify-content:center;
  width:38px; height:38px; border-radius:9px;
  border:1px solid #C3F1FB; outline:2px solid #51B1C7;
  background:linear-gradient(#fff,#F6FDFF);
  cursor:pointer; transition:transform .12s ease, outline-color .12s ease;
}
.rail-btn:hover{ transform:translateY(-1px); outline-color:#40899A; }

/* Unread badge */
.rail-btn .badge{
  position:absolute; top:-6px; right:-6px;
  min-width:18px; height:18px; padding:0 5px;
  background:#E64646; color:#fff; border-radius:9px;
  font:700 11px/18px Inter, sans-serif; text-align:center;
  box-shadow:0 1px 2px rgba(0,0,0,.12);
}

/* Keep the universal modal on top of the rail */
.universalModal{ z-index: 9999; }

/* Right Utility Rail — TOP RIGHT */
#utility-rail{
  position: fixed;
  top: 0;              /* pinned to the very top */
  right: 0;            /* tuck into the corner */
  display: flex;
  flex-direction: column; /* stack buttons downward */
  gap: 10px;
  z-index: 300;           /* below universal modal */
  pointer-events: none;   /* rail won't block clicks; children will */
}
#utility-rail > *{ pointer-events: auto; }

/* Rail button: square on top, rounded on bottom */
.rail-btn{
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border: 1px solid #C3F1FB; outline: 2px solid #51B1C7;
  background: linear-gradient(#fff,#F6FDFF);
  border-radius: 0 0 9px 9px;     /* <-- no radius on TOP corners */
  cursor: pointer; transition: transform .12s ease, outline-color .12s ease;
}
.rail-btn:hover{ transform: translateY(-1px); outline-color: #40899A; }

/* Optional: if you ever add multiple buttons and want only the very first to be square on top */
#utility-rail > :not(:first-child).rail-btn{ border-radius: 9px; } /* normal rounded for non-first */

/* Nudge the icon for optical centering (ignoring the red badge) */
.rail-btn svg{ display:block; transform: translateX(1px); }

/* Unread badge stays tight to the outer edge */
.rail-btn .badge{
  position: absolute; top: -6px; right: -6px;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: #E64646; color: #fff; border-radius: 9px;
  font: 700 11px/18px Inter, sans-serif; text-align: center;
  box-shadow: 0 1px 2px rgba(0,0,0,.12);
}

/* Keep universal modal above the rail */
.universalModal{ z-index: 9999; }

@media (max-width: 980px){
  #utility-rail{ top: 8px; right: 8px; gap: 8px; }
}

/* Start New Audit modal layout */
#universal-modal-content #new-audit-modal form > .formRow {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 1rem;
}

#universal-modal-content #new-audit-modal .formRow > label {
  width: 200px;           /* aligns like your Issue/Template modals */
  color: #7B7B7B;         /* same muted label tone */
}

#universal-modal-content #new-audit-modal .formRow > .formField {
  flex: 1;
}

/* Reuse your existing report action styling */
#universal-modal-content #new-audit-modal .report-actions {
  text-align: right;
}
#universal-modal-content #new-audit-modal .report-actions button + button {
  margin-left: 20px;
}
#utility-rail{
  position: fixed;
  top: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 300;
  pointer-events: none;
}
#utility-rail > *{ pointer-events: auto; }
#utility-rail .svg-icon{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid #C3F1FB;
  outline: 2px solid #51B1C7;
  background: linear-gradient(#fff,#F6FDFF);
  border-radius: 0 0 9px 9px;
  cursor: pointer;
  transition: transform .12s ease, outline-color .12s ease;
}
#utility-rail .svg-icon svg{ display:block; transform: translateX(1px); }
#utility-rail .svg-icon:not(:first-child){ border-radius: 9px; }
#utility-rail #notif-badge{
  position:absolute; top:-6px; right:-6px;
  background:#E53E3E; color:#fff; border-radius:10px;
  padding:0 6px; font-size:11px; line-height:18px; min-width:18px; text-align:center;
}
#utility-rail{
  position: fixed;
  top: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 300;
}
#utility-rail .svg-icon{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid #C3F1FB;
  outline: 2px solid #51B1C7;
  background: linear-gradient(#fff,#F6FDFF);
  border-radius: 0 0 9px 9px;        /* square top corners */
  cursor: pointer;
  transition: transform .12s ease, outline-color .12s ease;
}
#utility-rail .svg-icon:hover{ outline-color:#40899A; }

/* Remove the default “bevel/button” look from the INNER svg-icon wrappers */
#utility-rail .svg-icon .svg-icon{
  border: none;
  outline: none;
  background: transparent;
  width: auto;
  height: auto;
  padding: 0;
  box-shadow: none;
}

.cookie-icon {
  position: relative;
  top: 50%;
  transform: translate(0%, -50%);
}

/* Nudge the SVG for optical centering */
#utility-rail .svg-icon svg{ display:block; transform: translateX(1px); }

/* Only the FIRST item in the stack keeps square top corners */
#utility-rail .svg-icon:not(:first-child){ border-radius: 9px; }

/* Keep your badge positioned nicely (you already set inline styles; this is a backup) */
#utility-rail #notif-badge{
  position:absolute; top:-6px; right:-6px;
}

/* Top-right rail that expands from RIGHT to LEFT */
#utility-rail{
  position: fixed;
  top: 12px;
  right: 12px;
  display: flex;
  flex-direction: row-reverse;  /* add new icons to the left */
  align-items: flex-start;       /* stick to the top edge */
  gap: 8px;
  z-index: 300;
  pointer-events: none;
}
#utility-rail > *{ pointer-events: auto; }

/* Rail buttons */
#utility-rail .svg-icon{
  position: relative;            /* for the badge */
  display: grid;                 /* perfect centering */
  place-items: center;           /* center SVG horizontally + vertically */
  width: 38px;
  height: 38px;
  border: 1px solid #C3F1FB;
  outline: 2px solid #51B1C7;
  background: linear-gradient(#fff,#F6FDFF);
  border-radius: 9px;    /* sharp top corners, rounded bottom */
  cursor: pointer;
  transition: transform .12s ease, outline-color .12s ease;
}

/* Neutralize the INNER svg-icon wrapper so it doesn't add a second bevel */
#utility-rail .svg-icon .svg-icon{
  border: none; outline: none; background: transparent;
  width: auto; height: auto; padding: 0; box-shadow: none;
}

/* Center the glyph perfectly (remove previous 1px nudge if you added it) */
#utility-rail .svg-icon svg{ display:block; transform:none; }

/* Badge stays pinned to the outer corner */
#utility-rail #notif-badge{ position:absolute; top:-6px; right:-6px; }

.rail-icon {
  margin: auto;
}

/* Activity list: highlight moderation notes */
.numbered-list .activity-note {
  position: relative;
  background: #0B2A55;          /* dark navy */
  color: #E7F0FF;               /* soft off-white */
  border: 1px solid #1C3D78;
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: 0 0 0 transparent, 0 0 0 transparent;
  transition: box-shadow .2s ease;
}
.numbered-list .activity-note:hover {
  box-shadow: 0 0 0 2px rgba(28, 61, 120, .25), 0 6px 18px rgba(16, 43, 92, .35);
}

.numbered-list .activity-note .muted {
  color: #BFD2FF;               /* lighten timestamp line on dark bg */
}

.numbered-list .activity-note .row1 {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Small pill label + icon */
.note-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 600 12px/1.1 Inter, system-ui, sans-serif;
  color: #CFE3FF;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  padding: 4px 8px;
}
.note-pill svg { display:block; }

/* Per-question compliance state */
.insp-question.non-compliant label { color: #B3261E; }
.insp-question.non-compliant .fieldSelect,
.insp-question.non-compliant .fieldText,
.insp-question.non-compliant .fieldTextArea {
  outline: 2px solid #ECA8A4; border-color: #ECA8A4;
}

/* inline photo pick for required “No” */
.insp-photo-required { display:none; margin-top:.5rem; }
.insp-photo-required .button2,
.insp-photo-required .buttonBlockRed { min-width: 120px; }

/* Keep the red strictly scoped to the row with hasError */
.insp-question.hasError .fieldLabel { color: #B3261E; }
.insp-question.hasError .audit-field,
.insp-question.hasError .fieldSelect,
.insp-question.hasError .fieldText,
.insp-question.hasError .fieldTextArea {
  outline: 2px solid #ECA8A4;
  border-color: #ECA8A4;
}

/* Aux photo uploader layout */
.aux-photo .uploadWrapper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  vertical-align: middle;
}
.hiddenUploadInput { display: none; }

.aux-photo .pick-photo { /* uses your existing button classes */
  line-height: 1;    /* keeps height tidy */
  white-space: nowrap;
}

.aux-photo .audit-photo-name {
  display: inline-block;
  min-width: 120px;
}
.aux-photo .photo-preview img {
  display: block;
  max-width: 120px;
  max-height: 120px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.aux-photo .uploadWrapper{display:inline-flex;align-items:center;gap:8px}
.hiddenUploadInput{display:none}
.aux-photo .pick-photo{display:inline-flex;align-items:center;white-space:nowrap;line-height:1}
.aux-photo .audit-photo-name{min-width:120px;display:inline-block}
.aux-photo .photo-preview img{display:block;max-width:120px;max-height:120px;border:1px solid #ccc;border-radius:4px}


/* Compliance: Documents table */
#compliance .tableLike{
  border:1px solid #E4E4E4;
  border-radius:8px;
  overflow:hidden;
  background:#FFFFFF;            /* no transparency */
}

/* 4-column grid: Title | Kind | Created | Actions */
#compliance .tableHeader,
#compliance .tableRow{
  display:grid;
  grid-template-columns: 30% 20% 20% 30%;
  align-items:center;
}

#compliance .tableHeader{
  background:#F5F5F5;
  padding:12px 14px;
  text-transform:uppercase;
  font-family:'Roboto', sans-serif;
  font-weight:500;
  color:#7B7B7B;
  border-bottom:1px solid #E4E4E4;
}

#compliance .tableRow{
  background:#FFFFFF;            /* no transparency */
  padding:12px 14px;
  border-top:1px solid #E4E4E4;
}

#compliance .hoverRow:hover{
  background:#FAFDFF;
  cursor:pointer;
}

/* Make the whole compliance panel solid too */
#compliance.content-panel{
  background:#FFFFFF;
  border-radius:8px;
  padding:16px;
}

#compliance .tableCell{
  color:#4A4A4A;
  font-weight:500;
  font-size:14px;
}
#compliance .tableRow .tableCell strong{ color:#2B2B2B; }

/* --- Section header layout (fix awkward stacking) --- */
.sectionHeader{
  display:flex;
  align-items:baseline;
  gap:12px;
  margin: 8px 0 14px;
}
.sectionHeader .sectionTitle{
  font-size: 22px;
  font-weight: 700;
  color:#222;
  letter-spacing:.2px;
}
.sectionHeader .sectionSubTitle{
  font-size: 14px;
  color:#7B7B7B;
}
/* --- TableLike: keep rows on desktop, switch to cards on mobile --- */
#compliance .tableLike{
  border:1px solid #E4E4E4;
  border-radius:8px;
  overflow:hidden;
  background:#FFFFFF;
}
/* desktop grid */
#compliance .tableHeader,
#compliance .tableRow{
  display:grid;
  grid-template-columns: 30% 20% 20% 30%;
  align-items:center;
}
#compliance .tableHeader{ background:#F5F5F5; font-weight:600; }
#compliance .tableCell{ padding:12px 14px; }

/* card mode on narrow screens */
@media (max-width: 900px){
  #compliance .tableHeader{ display:none; }
  #compliance .tableRow{
    display:block;
    border-top:1px solid #EEE;
    padding:10px 12px;
  }
  #compliance .tableRow:first-child{ border-top:none; }
  #compliance .tableRow .tableCell{
    display:flex;
    justify-content:space-between;
    gap:12px;
    padding:6px 2px;
  }
  #compliance .tableRow .tableCell::before{
    content: attr(data-label);
    font-weight:600;
    color:#777;
    margin-right:12px;
  }
  #compliance .tableRow .tableCell.w30p,
  #compliance .tableRow .tableCell.w20p{ width:auto; }
}

/* Compliance sub-tabs */
#compliance .subtabs {
  display:flex; gap:6px; margin: 8px 0 16px;
}
#compliance .subtab {
  border:1px solid #E4E4E4; background:#FFF; color:#4A4A4A;
  padding:8px 12px; font: 500 14px/1 'Roboto', sans-serif; cursor:pointer;
  border-radius:6px;
}
#compliance .subtab.is-active {
  outline:2px solid #51B1C7; color:#2B2B2B;
}

/* Comp tab visibility helper */
#compliance .comp-tab { display:block; }
#compliance .comp-tab[hidden] { display:none !important; }
#compliance .comp-tab.is-visible { display:block; }

/* Pills */
.pill { display:inline-flex; align-items:center; gap:6px; padding:4px 8px; border-radius:999px; font:600 12px/1 Inter, system-ui, sans-serif; }
.pill-info { background:#EEF6FF; color:#1E3A8A; border:1px solid #C7DBFF; }
.pill-green { background:#E9F9ED; color:#166534; border:1px solid #A7E1BE;}
.pill-orange{ background:#FFF7E6; color:#92400E; border:1px solid #F6D7A8;}
.pill-red   { background:#FEE2E2; color:#7F1D1D; border:1px solid #F5B5B5;}

/* Responsive card mode matches documents table */
@media (max-width: 900px){
  #comp-tab-training .tableHeader{ display:none; }
  #comp-tab-training .tableRow{ display:block; border-top:1px solid #EEE; padding:10px 12px; }
  #comp-tab-training .tableRow:first-child{ border-top:none; }
  #comp-tab-training .tableCell{ display:flex; justify-content:space-between; gap:12px; padding:6px 2px; }
  #comp-tab-training .tableCell::before{ content: attr(data-label); font-weight:600; color:#777; margin-right:12px; }
}

/* Segmented tabs for Compliance */
.segTabs {
  display:flex; gap:8px; flex-wrap:wrap;
  background:#F7F7F7; padding:6px; border-radius:12px; border:1px solid #E4E4E4;
}
.segTab {
  position:relative;
  appearance:none; border:1px solid transparent; background:#FFF; color:#4A4A4A;
  padding:10px 14px; border-radius:10px; cursor:pointer;
  font:600 14px/1.1 Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji","Segoe UI Emoji";
  transition: all .15s ease;
}
.segTab:hover { box-shadow:0 1px 0 rgba(0,0,0,.05); }
.segTab.is-active {
  color:#0F172A; background:#EAF7FB; border-color:#51B1C7;
  box-shadow: inset 0 0 0 1px #51B1C7, 0 1px 0 rgba(0,0,0,.05);
}
.segTab:focus-visible {
  outline: 2px solid #51B1C7; outline-offset: 2px; border-radius:12px;
}

/* Tiny count/due badges on tabs */
.segBadge {
  margin-left:8px; padding:2px 8px; border-radius:999px; font:700 11px/1 Inter, system-ui;
  background:#EDF2F7; color:#2D3748; border:1px solid #CBD5E0;
}
.segBadge-warn { background:#FFF7E6; color:#92400E; border-color:#F6D7A8; }

/* Panel visibility helpers (if not already present) */
#compliance .comp-tab[hidden] { display:none !important; }
#compliance .comp-tab.is-visible { display:block; }

/* Segmented tabs for Compliance */
#compliance .segTabs {
  display:flex; gap:8px; flex-wrap:wrap;
  background:#F7F7F7; padding:6px; border-radius:12px; border:1px solid #E4E4E4;
}
#compliance .segTab {
  position:relative;
  appearance:none; border:1px solid transparent; background:#FFF; color:#4A4A4A;
  padding:10px 14px; border-radius:10px; cursor:pointer;
  font:600 14px/1.1 Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  transition: all .15s ease;
}
#compliance .segTab:hover { box-shadow:0 1px 0 rgba(0,0,0,.05); }
#compliance .segTab.is-active {
  color:#0F172A; background:#EAF7FB; border-color:#51B1C7;
  box-shadow: inset 0 0 0 1px #51B1C7, 0 1px 0 rgba(0,0,0,.05);
}

/* Tiny count/due badges on the tab itself */
#compliance .segBadge {
  margin-left:8px; padding:2px 8px; border-radius:999px; font:700 11px/1 Inter, system-ui;
  background:#EDF2F7; color:#2D3748; border:1px solid #CBD5E0;
}
#compliance .segBadge-warn { background:#FFF7E6; color:#92400E; border-color:#F6D7A8; }

/* Panel visibility helpers */
#compliance .comp-tab[hidden] { display:none !important; }
#compliance .comp-tab.is-visible { display:block; }

.segTabs { margin-bottom: 20px; }

.clickrow { cursor: pointer; }

/* Sidebar icon tooltips */
#sidebar .navItem[data-tip] { position: relative; }
#sidebar .navItem[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translate(8px, -50%);
  white-space: nowrap;
  background: #111827;
  color: #FFF;
  font: 500 12px/1.2 Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  padding: 6px 8px;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease;
  z-index: 50;
}
#sidebar .navItem[data-tip]:hover::after { opacity: 1; }

/* optional little arrow */
#sidebar .navItem[data-tip]::before {
  content: "";
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translate(0, -50%);
  border: 6px solid transparent;
  border-left-color: #111827;
  opacity: 0;
  transition: opacity .12s ease;
  z-index: 49;
}
#sidebar .navItem[data-tip]:hover::before { opacity: 1; }

.grid4 { display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap:12px; }
.grid2 { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:12px; }
@media (max-width: 960px){ .grid4 { grid-template-columns: repeat(2,1fr); } .grid2 { grid-template-columns: 1fr; } }

.kpiCard { background:#FFF; border:1px solid #E5E7EB; border-radius:14px; padding:14px; box-shadow:0 1px 0 rgba(0,0,0,.04); }
.kpiTitle { font:600 12px/1 Inter,system-ui; color:#6B7280; margin-bottom:6px; }
.kpiValue { font:800 28px/1 Inter,system-ui; color:#0F172A; }
.kpiSub { font:500 12px/1.3 Inter,system-ui; color:#6B7280; margin-top:4px; }

.panel { background:#FFF; border:1px solid #E5E7EB; border-radius:14px; padding:12px; }
.panelTitle { font:700 14px/1.2 Inter,system-ui; color:#111827; margin-bottom:10px; }

/* ===== No-stack tables for Compliance + Analytics ===== */

/* Generic: allow horizontal scroll instead of stacking on narrow screens */
#compliance .tableLike,
#analytics  .tableLike {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Force rows/headers to use CSS grid (columns stay side-by-side) */
#compliance .tableHeader, #compliance .tableRow,
#analytics  .tableHeader, #analytics  .tableRow {
  display: grid;
  align-items: center;
  column-gap: 8px;
}

/* ---- Per-table column maps (percentages + a min-width safety) ---- */

/* Documents list: title, kind, created_at, actions/open */
#docs-list .tableHeader, #docs-list .tableRow {
  grid-template-columns: 40% 20% 20% 20%;
  min-width: 720px;
}

/* Training list: Employee, Training, Completed, Expires, Certificate, Notes */
#training-list .tableHeader, #training-list .tableRow {
  grid-template-columns: 20% 25% 15% 15% 10% 15%;
  min-width: 980px;
}

/* Expiries list: Kind, Title, Due On, Entity Ref, Notes */
#exp-list .tableHeader, #exp-list .tableRow {
  grid-template-columns: 10% 30% 15% 20% 25%;
  min-width: 900px;
}

/* Analytics lists */
#anl-tr-overdue .tableHeader, #anl-tr-overdue .tableRow {
  grid-template-columns: 40% 35% 25%;
  min-width: 720px;
}
#anl-ex-soon .tableHeader, #anl-ex-soon .tableRow {
  grid-template-columns: 20% 40% 20% 20%;
  min-width: 760px;
}

/* Prevent any legacy mobile-stacking overrides from kicking in */
@media (max-width: 9999px) {
  #compliance .tableLike .tableCell,
  #analytics  .tableLike .tableCell {
    display: block;          /* block inside the grid cell is fine */
  }
  /* If you previously used data-label pseudo-cells for stacking, hide them here */
  #compliance .tableLike .tableCell::before,
  #analytics  .tableLike .tableCell::before {
    display: none !important;
    content: none !important;
  }
}

/* Toolbars in these panels shouldn’t wrap awkwardly; allow scroll instead */
#compliance .marB15,
#analytics  .marB15 {
  flex-wrap: nowrap !important;
  overflow-x: auto;
  gap: 10px;
}

/* Chart cards use the same panel style; just ensure canvases don’t squish */
#anl-charts .panel canvas { width: 100% !important; height: 220px !important; }
@media (max-width: 960px){ #anl-charts .panel canvas { height: 180px !important; } }

/* Analytics charts: make them narrower on wide screens */
#anl-charts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)); /* 3 columns on desktop */
  gap: 12px;
}

/* fall back to 2 columns on medium, 1 on mobile */
@media (max-width: 1280px) { #anl-charts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px)  { #anl-charts { grid-template-columns: 1fr; } }

/* slightly shorter canvases so they feel tighter */
#anl-charts .panel canvas { width: 100% !important; height: 180px !important; }
@media (max-width: 960px){ #anl-charts .panel canvas { height: 160px !important; } }

.analyticsTitle {
  color: #0f5363 !important;
}

/* Sidebar icon tooltips (hover + keyboard focus) */
.sidebar .nav-item[data-tip] { position: relative; }

.sidebar .nav-item[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  left: 100%;               /* sits to the right of the icon */
  top: 50%;
  transform: translate(8px, -50%);
  white-space: nowrap;
  background: #111827;
  color: #FFF;
  font: 500 12px/1.2 Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  padding: 6px 8px;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease;
  z-index: 50;
}

.sidebar .nav-item[data-tip]::before {
  content: "";
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translate(0, -50%);
  border: 6px solid transparent;
  border-left-color: #111827;   /* little arrow */
  opacity: 0;
  transition: opacity .12s ease;
  z-index: 49;
}

/* show on hover and keyboard focus */
.sidebar .nav-item[data-tip]:hover::after,
.sidebar .nav-item[data-tip]:hover::before,
.sidebar .nav-item[data-tip]:focus::after,
.sidebar .nav-item[data-tip]:focus::before,
.sidebar .nav-item[data-tip]:focus-visible::after,
.sidebar .nav-item[data-tip]:focus-visible::before {
  opacity: 1;
}

/* Optional: tighten for very small screens */
@media (max-width: 760px){
  .sidebar .nav-item[data-tip]::after,
  .sidebar .nav-item[data-tip]::before { display:none; }
}

/* Place tooltip inside the sidebar, to the LEFT of the arrow origin */
.sidebar .nav-item[data-tip]::after {
  left: auto;
  right: calc(100% + 8px);   /* move bubble inside the sidebar */
  transform: translate(0, -50%);
}

.sidebar .nav-item[data-tip]::before {
  left: auto;
  right: 100%;
  border-left-color: transparent;
  border-right-color: #111827; /* flip the little arrow */
}

/* Default: show to the RIGHT of the nav item */
.sidebar .nav-item[data-tip]::after {
  left: 100% !important;
  right: auto !important;
  transform: translate(8px, -50%) !important;
  max-width: 40vw;
  overflow-wrap: anywhere;
}
.sidebar .nav-item[data-tip]::before {
  left: 100% !important;
  right: auto !important;
  transform: translate(0, -50%) !important;
  border-left-color: #111827 !important;  /* arrow points right */
  border-right-color: transparent !important;
}

/* Safety: hide on very small screens */
@media (max-width: 720px){
  .sidebar .nav-item[data-tip]::before,
  .sidebar .nav-item[data-tip]::after { display: none; }
}
.sidebar, .sidebar .nav, .sidebar .nav-item { overflow: visible; }

/* App tooltips (body-level, no clipping) */
.ui-tip {
  position: fixed;               /* relative to viewport */
  max-width: 40vw;
  padding: 6px 8px;
  background: #111827;
  color: #fff;
  font: 500 12px/1.2 Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
  pointer-events: none;
  z-index: 99999;
  opacity: 0;
  transform: translateY(0);      /* keep simple for GPU */
  transition: opacity .12s ease;
  white-space: nowrap;
}

.ui-tip.show { opacity: 1; }

.ui-tip::after {                 /* arrow */
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
}

.ui-tip.right::after {           /* arrow when tooltip is on right of target */
  left: -12px;
  border-right-color: #111827;
}

.ui-tip.left::after {            /* arrow when tooltip is on left of target */
  right: -12px;
  border-left-color: #111827;
}

@media (max-width: 720px){
  .ui-tip { display: none; }     /* optional: hide on very small screens */
}

/* Kill legacy pseudo-element tooltips on nav items */
.sidebar .nav-item[data-tip]::before,
.sidebar .nav-item[data-tip]::after {
  content: none !important;
}