/* Custom Styles for Employee Scheduling System */

:root {
  --primary-color: #007bff;
  --bg-color: #f8f9fa;
  --text-color: #333;
  --premium-card-bg: #ffffff;
  --premium-card-text: #1a1c1e;
  --premium-card-text-muted: #64748b;
  --premium-grid-bg: #f8fafc;
  --bs-indigo: #6366f1;
  --bs-indigo-rgb: 99, 102, 241;
  --bs-purple: #8b5cf6;
  --bs-purple-rgb: 139, 92, 246;
  --bs-teal: #0d9488;
  --bs-teal-rgb: 13, 148, 136;
  --bs-pink: #ec4899;
  --bs-pink-rgb: 236, 72, 153;
}

[data-bs-theme="dark"] {
  --premium-card-bg: #1e1e1e;
  --premium-card-text: #ffffff;
  --premium-card-text-muted: #94a3b8;
  --premium-grid-bg: #2d2d2d;
  --bs-indigo: #818cf8;
  --bs-indigo-rgb: 129, 140, 248;
  --bs-purple: #a78bfa;
  --bs-purple-rgb: 167, 139, 250;
  --bs-teal: #2dd4bf;
  --bs-teal-rgb: 45, 212, 191;
  --bs-pink: #f472b6;
  --bs-pink-rgb: 244, 114, 182;
}

html,
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #ebecf0;
  min-height: 100vh;
  position: relative;
}

@media (max-width: 767.98px) {
  html {
    font-size: 14px;
  }
}

[data-bs-theme="dark"] html,
[data-bs-theme="dark"] body {
  background-color: #1a1d20;
  /* slightly darker dark mode bg */
}

/* Glassmorphism nav */
.navbar.pwa-nav {
  background: rgba(255, 255, 255, 0.4) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  z-index: 1050;
  position: sticky;
  top: 0;
}

[data-bs-theme="dark"] .navbar.pwa-nav {
  background: rgba(15, 15, 15, 0.4) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

/* Card Styling */
.card {
  border-radius: 1rem;
}

/* Buttons */
.btn {
  transition: all 0.3s ease;
}

/* Modal styling */
.modal-content {
  border-radius: 1rem;
}

.modal-header {
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
}

/* Table refinements */
.table>tbody>tr {
  transition: background-color 0.2s;
}

/* Responsive container */
.main-container {
  padding-bottom: 2rem;
}

/* Forms */
.form-control:focus,
.form-select:focus {
  border-color: #80bdff;
  box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.25);
}

/* Request Cards */
.request-card {
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}



.request-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1) !important;
}

[data-bs-theme="dark"] .request-card:hover {
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3) !important;
}

/* Team Cards */
.team-card {
  transition: all 0.2s ease-in-out;
}



.team-card:hover {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05) !important;
}

[data-bs-theme="dark"] .team-card:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
}

/* Status Indicators */
.status-indicator {
  border: 2px solid #fff;
  border-radius: 50%;
  z-index: 2;
}

.status-online {
  background-color: #198754;
}

.status-recent {
  background-color: #ffc107;
}

.status-idle {
  background-color: #dc3545;
}

.status-pulse {
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(25, 135, 84, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(25, 135, 84, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(25, 135, 84, 0);
  }
}

[data-bs-theme="dark"] .status-indicator {
  border-color: #212529;
}

/* Schedule Navigation */
.schedule-nav-container {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  margin-bottom: 1rem;
  width: 100%;
  overflow: hidden;
}

[data-bs-theme="dark"] .schedule-nav-container {
  border-bottom-color: rgba(255, 255, 255, 0.05);
}

.schedule-tab-nav {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  -ms-overflow-style: none;
  scrollbar-width: none;
  gap: 1.5rem !important;
  width: 100%;
}


.schedule-tab-nav::-webkit-scrollbar {
  display: none;
}

.schedule-tab {
  text-align: left;
  padding: 0.75rem 0.25rem !important;
  background: transparent !important;
  border: none !important;
  border-bottom: 3px solid transparent !important;
  border-radius: 0 !important;
  transition: all 0.2s ease;
  flex: 0 0 auto;
  color: var(--bs-secondary-color) !important;
  white-space: nowrap !important;
}

.schedule-tab.active {
  opacity: 1;
  color: var(--primary-color) !important;
  border-bottom-color: var(--primary-color) !important;
  font-weight: 700;
}

.schedule-tab:not(.active):hover {
  opacity: 1;
  color: var(--bs-emphasis-color) !important;
}

.tile-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1px;
}

.tile-dates {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap !important;
}

/* Mobile Bar Styles */
.mobile-top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: calc(60px + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  background: rgba(255, 255, 255, 0.4) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  z-index: 2000;
}

[data-bs-theme="dark"] .mobile-top-bar {
  background: rgba(15, 15, 15, 0.4) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-top-bar-right {
  padding-right: max(0px, env(safe-area-inset-right, 0px));
}

.mobile-bottom-bar {
  position: fixed;
  bottom: 1.5rem;
  left: calc(env(safe-area-inset-left, 0px) + (100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)) / 2);
  transform: translateX(-50%);
  width: fit-content;
  max-width: 90vw;
  height: 56px;
  background: rgba(255, 255, 255, 0.4) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
  padding: 0 0.25rem;
}

[data-bs-theme="dark"] .mobile-bottom-bar {
  background: rgba(15, 15, 15, 0.4) !important;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.mobile-nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--bs-secondary-color);
  transition: all 0.2s ease;
  flex: 1;
  width: 75px;
  height: 48px;
  justify-content: center;
  border-radius: 24px;
  margin: 0 2px;
}

/* Wide unfolded display enhancements for bottom bar */
@media (min-width: 576px) and (max-width: 991.98px) {
  .mobile-bottom-bar {
    max-width: 80vw;
    padding: 0 0.5rem;
  }
  .mobile-nav-tab {
    width: 92px;
  }
  .mobile-nav-tab span {
    font-size: 0.65rem;
  }
}

.mobile-nav-tab i {
  font-size: 1.4rem;
  margin-bottom: 2px;
  line-height: 1;
}

.mobile-nav-tab span {
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: capitalize;
  line-height: 1;
}

.tiny-text {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
}

.mobile-nav-tab.active {
  background: var(--primary-color);
}

.mobile-nav-tab.active,
.mobile-nav-tab.active i,
.mobile-nav-tab.active span {
  color: #ffffff !important;
}

.nav-link-desktop {
  transition: all 0.2s ease;
}

.nav-link-desktop:hover {
  background: rgba(var(--bs-primary-rgb), 0.1);
  color: var(--primary-color) !important;
}

[data-bs-theme="dark"] .nav-link-desktop:hover {
  background: rgba(var(--bs-primary-rgb), 0.2);
}

.nav-link-desktop.active {
  color: var(--primary-color) !important;
}

@keyframes notification-ping {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.8;
  }

  100% {
    transform: translate(-50%, -50%) scale(2.5);
    opacity: 0;
  }
}

.ping-danger {
  position: relative;
}

.ping-danger::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  background-color: #dc3545;
  border-radius: 50%;
  z-index: -1;
  animation: notification-ping 1.5s ease-out infinite;
}

/* Schedule Page Enhancements */
.schedule-card {
  transition: all 0.3s ease !important;
}

.schedule-card:hover {
  background-color: var(--bs-secondary-bg);
}

.schedule-card:hover .chevron-icon {
  background-color: var(--bs-primary) !important;
  color: white !important;
}

.schedule-card:hover .chevron-icon i {
  color: white !important;
}

/* Page buffer for fixed navigation bars */
body {
  padding-top: calc(75px + env(safe-area-inset-top));
}

@media (max-width: 991.98px) {
  body {
    padding-bottom: calc(75px + env(safe-area-inset-bottom));
  }

  .modal {
    padding-top: calc(65px + env(safe-area-inset-top)) !important;
    padding-bottom: calc(85px + env(safe-area-inset-bottom)) !important;
  }
}

.modal-header .btn-close {
  margin-right: max(0.25rem, env(safe-area-inset-right, 0px));
}

.main-container {
  padding-top: 0.5rem;
}

/* Utilitiy Classes */
.bg-card-icon {
  background-color: var(--bs-body-bg);
}

/* Global Print Settings */
@media print {
  @page {
    margin: 0;
  }

  .pwa-nav,
  .mobile-top-bar,
  .mobile-bottom-bar,
  .btn,
  .alert,
  .alert-dismissible,
  footer {
    display: none !important;
  }

  body {
    background-color: white !important;
    padding: 0 !important;
    margin: 0 !important;
    color: black !important;
  }

  .main-container {
    margin-top: 0 !important;
    padding-top: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}

/* Offline Page Styles */
.offline-card {
  max-width: 500px;
  width: 90%;
  padding: 3.5rem 2rem;
  border-radius: 2.5rem;
  text-align: center;
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  box-shadow: 0 2rem 5rem rgba(0, 0, 0, 0.1);
}

[data-bs-theme="dark"] .offline-card {
  box-shadow: 0 2rem 5rem rgba(0, 0, 0, 0.4);
  background: rgba(var(--bs-body-bg-rgb), 0.8);
  backdrop-filter: blur(10px);
}

.status-icon-wrapper {
  width: 110px;
  height: 110px;
  background: rgba(var(--bs-secondary-rgb), 0.08);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2.5rem;
  position: relative;
}

.status-icon-wrapper::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px dashed rgba(var(--bs-secondary-rgb), 0.2);
  animation: rotate-status 20s linear infinite;
}

@keyframes rotate-status {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.offline-card h1 {
  font-weight: 800;
  letter-spacing: -1px;
}

/* Prevent iOS Safari auto-zoom on inputs */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
textarea,
select {
  font-size: 16px !important;
}

/* Global News & Rich Text Styles */
.news-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
}

/* Quill Dark Mode Overrides */
[data-bs-theme="dark"] .ql-toolbar {
  background-color: var(--bs-body-tertiary-bg);
  border-color: var(--bs-border-color) !important;
}

[data-bs-theme="dark"] .ql-container {
  border-color: var(--bs-border-color) !important;
  background-color: var(--bs-body-bg);
}

[data-bs-theme="dark"] .ql-toolbar .ql-stroke {
  stroke: var(--bs-emphasis-color);
}

[data-bs-theme="dark"] .ql-toolbar .ql-fill {
  fill: var(--bs-emphasis-color);
}

[data-bs-theme="dark"] .ql-toolbar .ql-picker {
  color: var(--bs-emphasis-color);
}

[data-bs-theme="dark"] .ql-snow .ql-picker-options {
  background-color: var(--bs-body-bg);
  border-color: var(--bs-border-color);
}

[data-bs-theme="dark"] .ql-editor.ql-blank::before {
  color: var(--bs-secondary-color) !important;
  opacity: 0.6;
}

[data-bs-theme="dark"] ::placeholder {
  color: var(--bs-secondary-color) !important;
  opacity: 0.5;
}

/* Management Sidebar Styles */
.management-sidebar {
  border-left: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  z-index: 2010 !important;
  width: 300px !important;
  max-width: 85vw !important;
  background: #ffffff !important;
}

[data-bs-theme="dark"] .management-sidebar {
  border-left: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(15, 15, 15, 0.4) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.sidebar-header-style {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding-right: max(1rem, calc(0.75rem + env(safe-area-inset-right, 0px))) !important;
}

[data-bs-theme="dark"] .sidebar-header-style {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.management-sidebar .sidebar-close-btn {
  margin-right: max(0.25rem, env(safe-area-inset-right, 0px)) !important;
}

.management-sidebar .offcanvas-body {
  padding-right: max(1rem, calc(1rem + env(safe-area-inset-right, 0px))) !important;
}

.management-sidebar .list-group-item {
  background: transparent;
}

/* Large Viewport Fixed Sidebar Behavior */
@media (min-width: 1200px) {
  body {
    overflow-y: auto !important;
    padding-right: 300px !important;
  }

  .management-sidebar,
  .management-sidebar.show {
    width: 300px !important;
    position: fixed !important;
    top: 0;
    right: 0;
    height: 100vh;
    transform: none !important;
    visibility: visible !important;
    z-index: 2010 !important;
    box-shadow: -4px 0 15px rgba(0, 0, 0, 0.03) !important;
    transition: none !important;
  }

  [data-bs-theme="dark"] .management-sidebar {
    box-shadow: -4px 0 15px rgba(0, 0, 0, 0.2);
  }

  .mobile-top-bar {
    right: 300px !important;
  }

  .offcanvas-backdrop {
    display: none !important;
  }
}

/* Live Tab Custom Pulsing Signal Icon */
.live-signal-icon {
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  display: inline-block;
  overflow: visible;
}

.live-signal-icon .live-dot {
  fill: #198754;
  /* Beautiful green dot representing active clock-ins / live status */
  transition: fill 0.3s ease;
  transform-origin: 12px 12px;
  animation: live-signal-dot-pulse 2s infinite ease-in-out;
}

[data-bs-theme="dark"] .live-signal-icon .live-dot {
  fill: #198754;
}

/* If the link is primary active, make the dot match the primary theme */
.text-primary .live-signal-icon .live-dot {
  fill: var(--bs-primary);
}

.live-signal-icon .live-wave {
  fill: none;
  stroke: currentColor;
  stroke-width: 2px;
  stroke-linecap: round;
  opacity: 0.3;
}

/* Sequential ripple/pulse animations for both sides simultaneously */
.live-signal-icon .live-wave.wave-inner {
  animation: live-signal-broadcast-inner 2s infinite ease-in-out;
}

.live-signal-icon .live-wave.wave-outer {
  animation: live-signal-broadcast-outer 2s infinite ease-in-out;
}

@keyframes live-signal-dot-pulse {
  0% {
    opacity: 0.35;
    transform: scale(0.75);
  }

  20% {
    opacity: 1;
    transform: scale(1);
  }

  75% {
    opacity: 1;
    transform: scale(1);
  }

  90%,
  100% {
    opacity: 0.35;
    transform: scale(0.75);
  }
}

@keyframes live-signal-broadcast-inner {

  0%,
  20% {
    opacity: 0.3;
    stroke-width: 2px;
  }

  45% {
    opacity: 0.95;
    stroke-width: 2.3px;
  }

  75% {
    opacity: 0.95;
    stroke-width: 2.3px;
  }

  90%,
  100% {
    opacity: 0.3;
    stroke-width: 2px;
  }
}

@keyframes live-signal-broadcast-outer {

  0%,
  45% {
    opacity: 0.3;
    stroke-width: 2px;
  }

  70% {
    opacity: 0.95;
    stroke-width: 2.3px;
  }

  85% {
    opacity: 0.95;
    stroke-width: 2.3px;
  }

  95%,
  100% {
    opacity: 0.3;
    stroke-width: 2px;
  }
}

/* Modern Week Navigator Styles */
:root {
  --modern-nav-bg: var(--bs-body-bg);
  --modern-nav-border: var(--bs-border-color);
  --modern-accent: var(--bs-primary);
  --modern-text: var(--bs-body-color);
  --modern-text-muted: var(--bs-secondary-color);
  --week-card-radius: 1.5rem;
}

[data-bs-theme="dark"] {
  --modern-nav-bg: #212529;
  --modern-nav-border: rgba(255, 255, 255, 0.08);
}

.week-nav-modern {
  background: var(--modern-nav-bg);
  padding: 1rem;
  border-radius: var(--week-card-radius);
  border: 1px solid var(--modern-nav-border);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.modern-nav-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bs-tertiary-bg);
  color: var(--modern-text);
  border: 1px solid var(--modern-nav-border);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.modern-nav-btn:hover:not(.disabled) {
  background: var(--modern-accent);
  color: white;
  border-color: var(--modern-accent);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(var(--bs-primary-rgb), 0.3);
}

.modern-nav-btn.disabled {
  opacity: 0.2;
  pointer-events: none;
}

.nav-label {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--modern-accent);
  display: block;
  margin-bottom: 4px;
}

.nav-title {
  font-weight: 900;
  font-size: 1.25rem;
  color: var(--modern-text);
  line-height: 1.2;
}

.nav-title .separator {
  opacity: 0.2;
  margin: 0 8px;
}

/* Relative Week Colors */
.week-lbl-past {
  color: #ef4444 !important;
  /* red */
}

.week-lbl-current {
  color: #10b981 !important;
  /* green */
}

.week-lbl-future {
  color: #ec4899 !important;
  /* hot pink */
}

/* Modernized Danger Buttons (e.g. Log Absence) */
.btn-modern-danger {
  background: rgba(239, 68, 68, 0.06) !important;
  color: #ef4444 !important;
  border: 1px solid rgba(239, 68, 68, 0.25) !important;
  transition: all 0.25s ease-in-out !important;
}

.btn-modern-danger:hover {
  background: #ef4444 !important;
  color: #ffffff !important;
  border-color: #ef4444 !important;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3) !important;
  transform: translateY(-1px);
}

[data-bs-theme="dark"] .btn-modern-danger {
  background: rgba(239, 68, 68, 0.12) !important;
  color: #f87171 !important;
  border: 1px solid rgba(239, 68, 68, 0.35) !important;
}

[data-bs-theme="dark"] .btn-modern-danger:hover {
  background: #ef4444 !important;
  color: #ffffff !important;
  border-color: #ef4444 !important;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.5) !important;
}

/* ==========================================================================
   Persistent Floating Live Status Capsule & Shift Details Bottom Sheet
   ========================================================================== */

/* Z-Index Hierarchy:
   Capsule: 1990 (below fixed bars 2000 & sidebar 2010)
   Backdrop: 2090 (above fixed bars & sidebar)
   Modal Sheet: 2100 (above backdrop)
*/

.floating-live-status-capsule {
  position: fixed;
  bottom: calc(1.5rem + 56px + 0.65rem);
  left: calc(env(safe-area-inset-left, 0px) + (100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)) / 2);
  transform: translateX(-50%);
  z-index: 1990;
  max-width: calc(100vw - 2rem);
  width: fit-content;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.85) !important;
  border-radius: 9999px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04), inset 0 1px 1px rgba(255, 255, 255, 0.9) !important;
  color: var(--bs-body-color);
  padding: 0.6rem 1.35rem;
  transition: transform 0.25s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.25s ease, background 0.25s ease;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  display: inline-flex;
  align-items: center;
}

[data-bs-theme="dark"] .floating-live-status-capsule {
  background: rgba(24, 28, 36, 0.88) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.15) !important;
}

.floating-live-status-capsule:hover {
  transform: translateX(-50%) translateY(-2px) scale(1.02);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
}

[data-bs-theme="dark"] .floating-live-status-capsule:hover {
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6);
}

.floating-live-status-capsule:active {
  transform: translateX(-50%) scale(0.97);
}

/* Hide capsule smoothly when management sidebar opens */
.floating-live-status-capsule.capsule-hidden-by-sidebar {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateX(-50%) translateY(12px) !important;
}

@media (min-width: 992px) {
  .floating-live-status-capsule {
    bottom: 2rem;
    right: 2rem;
    left: auto;
    transform: none;
  }
  .floating-live-status-capsule:hover {
    transform: translateY(-2px);
  }
  .floating-live-status-capsule:active {
    transform: scale(0.98);
  }
  .floating-live-status-capsule.capsule-hidden-by-sidebar {
    transform: translateY(12px) !important;
  }
}

@media (min-width: 1200px) {
  /* On large screens with 300px fixed sidebar, offset capsule to the left */
  .floating-live-status-capsule {
    right: calc(300px + 1.5rem) !important;
  }
}

/* Capsule Solid Status Dots (Clean, steady, non-pulsing with glowing halo) */
.capsule-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  vertical-align: middle;
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

.status-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  vertical-align: middle;
  background-color: currentColor;
}

/* State 1: Active Scheduled Shift */
.floating-live-status-capsule.status-active_scheduled,
.floating-live-status-capsule.status-active_unscheduled {
  border-color: rgba(16, 185, 129, 0.4) !important;
}
.floating-live-status-capsule.status-active_scheduled .capsule-status-dot,
.floating-live-status-capsule.status-active_unscheduled .capsule-status-dot {
  background-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

/* State 3: On Break */
.floating-live-status-capsule.status-on_break {
  border-color: rgba(245, 158, 11, 0.55) !important;
}

/* State 4a: Shift Ended (Recent 0-15m) */
.floating-live-status-capsule.status-shift_ended_recent {
  border-color: #f59e0b !important;
}

/* State 4b: Still Clocked In (15m+ Overdue / Long Shift) - Crisp Red Border, No Glow */
.floating-live-status-capsule.status-shift_ended_late,
.floating-live-status-capsule.status-extreme_duration {
  border-color: #ef4444 !important;
}
.floating-live-status-capsule.status-shift_ended_late .capsule-status-dot,
.floating-live-status-capsule.status-extreme_duration .capsule-status-dot {
  background-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25);
}

.floating-live-status-capsule.status-shift_ended_recent .capsule-status-dot,
.floating-live-status-capsule.status-on_break .capsule-status-dot {
  background-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
}

/* Capsule Caret (indicates slide up / expansion) */
.capsule-caret {
  font-size: 0.72rem;
  opacity: 0.55;
  transition: transform 0.25s ease, opacity 0.2s ease;
  line-height: 1;
  display: inline-block;
}
.floating-live-status-capsule:hover .capsule-caret {
  opacity: 0.9;
  transform: translateY(-1px);
}
.floating-live-status-capsule[aria-expanded="true"] .capsule-caret {
  transform: rotate(180deg);
}

/* Sheet Header Status Indicator (Prepended Colored Dot + Clean Typography) */
.sheet-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}
.sheet-status-dot.dot-working {
  background-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}
.sheet-status-dot.dot-break {
  background-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
}
.sheet-status-dot.dot-recent {
  background-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
}
.sheet-status-dot.dot-overdue {
  background-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.35);
}

.sheet-status-text {
  color: var(--bs-body-color);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.sheet-status-text.text-overdue {
  color: #ef4444;
}

/* ==========================================================================
   Shift Details: Universal Slide-Up Bottom Sheet (Mobile & Desktop)
   ========================================================================== */

/* Fix mobile side menu: keep offcanvas backdrop behind the sidebar (2010) */
.offcanvas-backdrop {
  z-index: 2005 !important;
}

/* Independent Sheet Backdrop */
.live-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2040;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s cubic-bezier(0.32, 0.72, 0, 1);
}
.live-sheet-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* Sheet Wrapper */
.live-sheet {
  position: fixed;
  inset: 0;
  z-index: 2050;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  visibility: hidden;
  transition: visibility 0.32s;
}
.live-sheet.active {
  visibility: visible;
}

/* Sliding Panel (Anchored to Bottom Edge Universally) */
.live-sheet-panel {
  pointer-events: auto;
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  background: var(--bs-body-bg);
  border-top-left-radius: 1.75rem;
  border-top-right-radius: 1.75rem;
  border: 1px solid var(--bs-border-color-translucent);
  border-bottom: none;
  box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.28);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
  will-change: transform;
}
.live-sheet.active .live-sheet-panel {
  transform: translateY(0);
}
.live-sheet.is-dragging .live-sheet-panel {
  transition: none !important;
}

/* Sheet Grab Handle (Universal) */
.sheet-grab-bar {
  cursor: grab;
  padding: 12px 0 6px 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.sheet-grab-bar:active {
  cursor: grabbing;
}
.sheet-grab-handle {
  width: 48px;
  height: 5px;
  border-radius: 9999px;
  background: var(--bs-secondary-color);
  opacity: 0.3;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.sheet-grab-bar:hover .sheet-grab-handle,
.sheet-grab-bar:active .sheet-grab-handle {
  opacity: 0.75;
  transform: scaleX(1.15);
}

/* Sheet Header & Body */
.sheet-header {
  user-select: none;
}
.sheet-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom)) !important;
}

/* Subtle Icon Button for Close */
.btn-icon-subtle {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--bs-secondary-color);
  background: transparent;
  border: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.btn-icon-subtle:hover {
  background: rgba(var(--bs-secondary-color-rgb), 0.12);
  color: var(--bs-body-color);
}



/* Soft Rounded Cards & Inner Elements (No boxy or squared edges) */
.modal-hero-box {
  background: linear-gradient(135deg, rgba(var(--bs-primary-rgb), 0.08) 0%, rgba(var(--bs-primary-rgb), 0.02) 100%) !important;
  border: 1px solid rgba(var(--bs-primary-rgb), 0.16) !important;
  border-radius: 1.25rem !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
[data-bs-theme="dark"] .modal-hero-box {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.02) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.live-sheet .rounded-4,
.live-sheet .alert {
  border-radius: 1.25rem !important;
}

/* ==========================================================================
   High-Contrast Themed Status Badges (Light & Dark Mode Safe)
   ========================================================================== */

.badge-status-working {
  background-color: #d1fae5 !important;
  color: #065f46 !important;
  border: 1px solid #a7f3d0 !important;
}
[data-bs-theme="dark"] .badge-status-working {
  background-color: rgba(16, 185, 129, 0.22) !important;
  color: #6ee7b7 !important;
  border: 1px solid rgba(110, 231, 183, 0.35) !important;
}

.badge-status-break {
  background-color: #fef3c7 !important;
  color: #92400e !important;
  border: 1px solid #fde68a !important;
}
[data-bs-theme="dark"] .badge-status-break {
  background-color: rgba(245, 158, 11, 0.22) !important;
  color: #fcd34d !important;
  border: 1px solid rgba(252, 211, 77, 0.35) !important;
}

.badge-status-ended-recent {
  background-color: #ffedd5 !important;
  color: #9a3412 !important;
  border: 1px solid #fed7aa !important;
}
[data-bs-theme="dark"] .badge-status-ended-recent {
  background-color: rgba(249, 115, 22, 0.22) !important;
  color: #fdba74 !important;
  border: 1px solid rgba(253, 186, 116, 0.35) !important;
}

.badge-status-ended-late {
  background-color: #fee2e2 !important;
  color: #991b1b !important;
  border: 1px solid #fecaca !important;
}
[data-bs-theme="dark"] .badge-status-ended-late {
  background-color: rgba(239, 68, 68, 0.22) !important;
  color: #fca5a5 !important;
  border: 1px solid rgba(252, 165, 165, 0.35) !important;
}

.badge-status-extreme {
  background-color: #fee2e2 !important;
  color: #b91c1c !important;
  border: 1px solid #f87171 !important;
}
[data-bs-theme="dark"] .badge-status-extreme {
  background-color: rgba(220, 38, 38, 0.25) !important;
  color: #fca5a5 !important;
  border: 1px solid rgba(252, 165, 165, 0.45) !important;
}

.badge-status-unscheduled {
  background-color: #e0f2fe !important;
  color: #0369a1 !important;
  border: 1px solid #bae6fd !important;
}
[data-bs-theme="dark"] .badge-status-unscheduled {
  background-color: rgba(6, 182, 212, 0.22) !important;
  color: #7dd3fc !important;
  border: 1px solid rgba(125, 211, 252, 0.35) !important;
}

/* High-Contrast Notice Boxes */
.alert-notice-normal {
  background: var(--bs-tertiary-bg) !important;
  border: 1px solid var(--bs-border-color-translucent) !important;
  color: var(--bs-body-color) !important;
}

.alert-notice-break {
  background: #fffbeb !important;
  border: 1px solid #fde68a !important;
  color: #92400e !important;
}
[data-bs-theme="dark"] .alert-notice-break {
  background: rgba(245, 158, 11, 0.12) !important;
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
  color: #fde68a !important;
}

.alert-notice-warning {
  background: #fff7ed !important;
  border: 1px solid #fed7aa !important;
  color: #9a3412 !important;
}
[data-bs-theme="dark"] .alert-notice-warning {
  background: rgba(249, 115, 22, 0.12) !important;
  border: 1px solid rgba(249, 115, 22, 0.3) !important;
  color: #fed7aa !important;
}

.alert-notice-danger {
  background: #fef2f2 !important;
  border: 1px solid #fecaca !important;
  color: #991b1b !important;
}
[data-bs-theme="dark"] .alert-notice-danger {
  background: rgba(239, 68, 68, 0.12) !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
  color: #fecaca !important;
}

.alert-notice-info {
  background: #f0f9ff !important;
  border: 1px solid #bae6fd !important;
  color: #0369a1 !important;
}
[data-bs-theme="dark"] .alert-notice-info {
  background: rgba(6, 182, 212, 0.12) !important;
  border: 1px solid rgba(6, 182, 212, 0.3) !important;
  color: #bae6fd !important;
}