:root {
  --bg:           #f4f6fb;
  --text:         #0b1220;
  --muted:        #5b667a;
  --surface:      #ffffff;
  --surface-2:    #f1f3f7;
  --border:       rgba(0,0,0,.08);

  --accent:       #4f7cff;
  --success:      #2ea97d;
  --danger:       #e05151;
  --warning:      #f59f00;
}

:root {
  --topbar-icon-size: 40px;  
  --topbar-avatar-size: 40px;
  --drawer-width: 380px;     
}

body.dark {
  --bg:           #0f1115;
  --text:         #e6e9ef;
  --muted:        #a8b1c7;
  --surface:      #121622;
  --surface-2:    #151a27;
  --border:       #232838;

  --accent:       #7aa2ff;
  --success:      #37c59a;
  --danger:       #ff6b6b;
  --warning:      #ffb64d;

  color-scheme: dark;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background-color: #f6f8fa;;
}

.inline-logo {
  height: 40px;
  vertical-align: middle;
  border-radius: 50%;
}

.dashboard-container {
  display: flex;
  height: 100vh;
}

.topbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: 48px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}


.topbar-icons {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.topbar-icons .icon {
  background-color: rgba(0, 0, 0, 0.05); 
  padding: 8px;
  border-radius: 50%;
  transition: background-color 0.2s ease;
  cursor: pointer;
}

.topbar-icons .icon:hover,
.notification-wrapper:hover {
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 50%;
}

.notification-icon,
.settings-icon {
  width: 28px;
  height: 28px;
}

.no-notifications {
  text-align: center;
  color: #94a3b8;
  font-size: 0.9rem;
  padding: 0.75rem 0;
  border: none;
}

.topbar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid #4a7cb9;
}

.sidebar-avatar {
  border: 3px solid white;
  margin: 0 auto 1rem
}

.dropdown-content {
  position: absolute;
  top: 115%;
  right: 5px;
  background: #ffffff;
  border-radius: 0.75rem;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.15);
  min-width: 180px;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 999;
  padding: 0.5rem 0;
  border: 1px solid #e2e8f0;
}

.dropdown-content a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: #1e293b;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.dropdown-content.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.dropdown-content a:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}

.dropdown-content .icon-sm {
  width: 18px;
  height: 18px;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.dropdown-content a:hover .icon-sm {
  opacity: 1;
}

.dropdown-divider {
  border: none;
  height: 1px;
  background: #e2e8f0;
  margin: 0.25rem 0;
}

.notification-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.notification-badge {
  position: absolute;
  top: 0;
  right: 0;
  transform: translate(40%, -40%); 

  background: red;
  color: white;
  font-size: 0.7rem;
  font-weight: 600;

  width: 18px;
  height: 18px;
  border-radius: 50%;

  text-align: center;

  display: inline-block;
  line-height: 18px;  
  vertical-align: middle;

  box-shadow: 0 0 0 2px #fff;
  z-index: 10;
}

.notification-dropdown {
  position: absolute;
  top: 36px;
  right: 0;
  width: 260px;
  background: white;
  box-shadow: 0px 6px 16px rgba(0, 0, 0, 0.15);
  border-radius: 0.75rem;
  padding: 1rem;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  pointer-events: none;
  z-index: 20;
}

.notification-dropdown.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.notification-dropdown h4 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: #1e293b;
}

#notification-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

#notification-list li a {
  text-decoration: none;
  color: inherit;
  display: block;
  width: 100%;
}

#notification-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.9rem;
  color: #334155;
  transition: background 0.2s ease;
  cursor: pointer;
  border-radius: 0.5rem;
}

#notification-list li:hover {
  background: #f9fafb;
}

#notification-list li .notif-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #475569;
}

#notification-list li .notif-content {
  flex: 1;
}

#notification-list li .notif-content p {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: #1e293b;
  line-height: 1.4;
}

#notification-list li .notif-content span {
  font-size: 0.75rem;
  color: #94a3b8;
  display: block;
  margin-top: 0.25rem;
}

.icon {
  width: 24px;
  height: 24px;
  cursor: pointer;
  display: block;
}

.icon-sm {
  width: 20px;
  height: 20px;
  filter: none;
  opacity: 0.95;
}

.profile-dropdown {
  display: flex;
  align-items: center;
  position: relative;
}

.profile-dropdown .dropdown-content {
  right: 0;
  top: 115%;
  min-width: 120px;
  padding: 0.25rem 0;
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
  z-index: 999;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.profile-dropdown .dropdown-content a {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  color: #1e293b;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.profile-dropdown .dropdown-content a:hover {
  background-color: #f1f5f9;
}

.profile-dropdown img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
}

.sidebar {
  width: 250px;
  background: url('/images/sidebarbackground.jpg') no-repeat center center;
  background-size: cover;
  color: white;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1); 
  position: relative;
  height: 100vh;
}

.sidebar::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.4); 
  background-size: cover;
  filter: blur(10px);
  z-index: 0;
}

.sidebar > * {
  position: relative;
  z-index: 1;
}

.sidebar * {
  position: relative;
  z-index: 1;
}
.sidebar-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin-bottom: 1rem;
}

.sidebar-section {
  width: 100%;
  margin-top: 0.75rem;
}

.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-menu,
.sidebar-section {
  width: 100%;
}

.sidebar-heading {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #cbd5e1;
  margin: 1.5rem 0 0.5rem;
  padding: 0 1.25rem;
}

.menu-link {
  padding: 0;
  margin: 0;
}

.menu-link > a,
.dropdown-toggle {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 1.25rem;
  text-decoration: none;
  color: white;
  cursor: pointer;
}

.menu-link > a:hover,
.dropdown-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 0.375rem;
}

.dropdown-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.icon-sm {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
}

.arrow {
  font-size: 1.2rem;
  opacity: 0.6;
  margin-left: auto;
  margin-right: 0; 
}

.dropdown.open .arrow {
  transform: rotate(90deg);
}

.dropdown-menu {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease;
  padding-left: 0;
  margin-bottom: 0;
}

.dropdown.open .dropdown-menu {
  max-height: 500px;
  opacity: 1;
  margin-bottom: 0.5rem;
}

.dropdown-menu li a {
  font-size: 0.85rem;
  padding: 0.4rem 0;
  display: block;
  color: #d1d5db;
  text-decoration: none;
  transition: color 0.2s ease;
}

.dropdown-menu li a:hover {
  color: white;
}

.dropdown.open .arrow {
  transform: rotate(90deg);
}

.user-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}


.user-info #user-name {
  font-weight: bold;
  font-size: 1.1rem;
  margin: 0.5rem 0;
}

.user-rank {
  background-color: rgba(255, 255, 255, 0.2); 
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  color: #c4dfff;
  margin-top: 0.5rem;
  display: inline-block;
}

.box-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.box-divider {
  height: 1px;
  background-color: #e2e8f0; 
  margin: 0.5rem 0 1rem;
}

.box-icon {
  width: 25px;
  height: 25px;
  filter: grayscale(100%) brightness(0.2);
}

.dashboard-main {
  flex: 1;
  padding: 2rem;
}

.dashboard-boxes {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 1.5rem;
  margin-top: 2cap;
}

.dashboard-content {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
}

.left-boxes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  flex: 2;
}

.dashboard-box {
  background: white;
  padding: 1.25rem;
  border-radius: 1rem;
  box-shadow: 6px 8px 12px rgba(0, 0, 0, 0.2);
  border: 2px solid #4a7cb9;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-box:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.live-map-box {
  flex: 1;
  height: 90%;
  display: flex;
  flex-direction: column;
  height:727px;
}

.live-map-box iframe {
  flex-grow: 1;
  width: 100%;
  height: 130%;
  display: flex;
  flex-direction: column;
  border: none;
  border-radius: 0.5rem;
}

.map-row {
  width: 33%;
}

.controller-month-box {
  text-align: center;
  height: 568px
}

.controller-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 1rem;
}

.cotm-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid gold;
  margin-bottom: 0.5rem;
  display: block;
}

.cotm-name {
  font-weight: 600;
  font-size: 1.1rem;
  color: #1e293b;
  margin: 0;
}

.cotm-highlight {
  font-size: 0.85rem;
  color: #64748b;
  margin-top: 0.25rem;
}

.leaderboard {
  margin-top: 1.5rem;
  background-color: #f1f5f9;
  border: 1px solid #d1d5db;
  border-radius: 0.75rem;
  padding: 1rem;
  text-align: center;
}

.leaderboard h3 {
  margin-top: 0;
  font-size: 1rem;
  color: #1e293b;
}

.leaderboard ul {
  padding: 0;
  margin: 0;
  list-style: none;
  max-height: 250px;
  overflow-y: auto;
}

.leaderboard li {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
}

.leaderboard-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  margin-right: 0.75rem;
  border: 2px solid #4a7cb9;
}

.leaderboard-rank {
  font-weight: 600;
  margin-right: 0.5rem;
  color: #334155;
  min-width: 1.5rem;
}

.leaderboard-name {
  font-size: 0.9rem;
  color: #475569;
}

.events-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.event-item {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #ddd;
}

.event-date {
  background: #e3e9f0;
  border-radius: 0.5rem;
  width: 52px;
  text-align: center;
  padding: 0.3rem 0.5rem;
  margin-right: 1rem;
  flex-shrink: 0;
  border: 1px solid #d1d5db;
  border-radius: 0.75rem;
}

.event-month {
  font-size: 0.75rem;
  color: #4a4a4a;
  font-weight: bold;
  text-transform: uppercase;
}

.event-day {
  font-size: 1.2rem;
  font-weight: bold;
  color: #222;
}

.event-details {
  flex-grow: 1;
}

.event-title {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.2rem;
}

.event-meta {
  font-size: 0.85rem;
  color: #555;
}

.event-meta span {
  margin-right: 1rem;
}


.events-list li {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.tools-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.2rem;
}

.tool-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background-color: #f5f7fa;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  color: #2b2b2b;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: background-color 0.2s ease;
  border: 1px solid #d1d5db;
  border-radius: 0.75rem;
}

.tool-link:hover {
  background-color: #e4e9f0;
}

.tool-link::before {
  content: "🔗";
  margin-right: 0.7rem;
  font-size: 1.1rem;
}

#connections-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 4px; 
  font-size: 13px;
  line-height: 1.2;
}

#connections-table thead {
  background: transparent;
}

#connections-table th {
  text-align: left;
  padding: 4px 8px; 
  font-weight: 600;
  color: #333;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
}

#connections-table tbody tr {
  background-color: #f8f9fb;
  border-radius: 10px; 
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

#connections-table tbody tr:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

#connections-table td {
  padding: 4px 8px; 
  color: #222;
  border: none;
}

#connections-table tbody tr td {
  padding: 4px 8px;
  color: #222;
  border: none;
  background-clip: padding-box;
}

#connections-table tbody tr td:first-child {
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
}
#connections-table tbody tr td:last-child {
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
}

body.dark #connections-table th {
  color: #ccc;
}

body.dark #connections-table tbody tr {
  background-color: rgba(255, 255, 255, 0.05);
}

body.dark #connections-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

body.dark #connections-table td {
  color: #fff;
}

.hours-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.hours-table thead th {
  text-align: left;
  padding: 0.25rem;
  border-bottom: 1px solid #ccc;
  font-weight: 600;
  color: #333;
}

.hours-table tbody td {
  padding: 0.25rem;
  border-bottom: 1px solid #eee;
}

.training-progress-box {
  grid-column: span 2;
  height: 100px;
}

.training-status-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.status-card {
  display: flex;
  align-items: center;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  min-width: 0; 
}

.status-card.status-passed {
  background-color: #d1fae5;
  border: 2px solid #22c55e;
}

.status-card.status-failed {
  background-color: #fee2e2;
  border: 2px solid #ef4444;
}

.status-icon {
  font-size: 1.2rem;
  margin-right: 0.5rem;
}

.status-label {
  flex: 1;
  font-weight: 500;
  color: #1e293b;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-check {
  font-size: 1.3rem;
  color: #22c55e;
  margin-left: 0.5rem;
}

.dashboard-header {
  margin-bottom: 1rem;
}

.topbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1rem;
}

.side-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.suggestions-box {
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  background-color: #ffffff;
  border: 2px solid #4a7cb9;
  box-shadow: 6px 8px 12px rgba(0, 0, 0, 0.1);
  height: 100px;
  justify-content: center;
  display: flex;
  flex-direction: column;
}

.suggestions-box h2 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: #1e293b;
}

.suggestion-submit-btn {
  background-color: #2563eb; 
  color: white;
  font-weight: 600;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: background-color 0.2s ease;
  font-size: 0.95rem;
  border: 2px solid #d1d5db;
  border-radius: 0.75rem;
}

.suggestion-submit-btn:hover {
  background-color: #1e40af; 
}

.dashboard-heading {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.dashboard-content {
  display: flex;
  gap: 2rem;
  margin-top: 1rem;
}

.dashboard-box h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0;
  color: #1e293b;
}

.admin-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.admin-tool-btn {
  background-color: #0066ff;
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.admin-tool-btn:hover {
  background-color: #0053cc;
}

.admin-info-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.admin-info-list li {
  padding: 0.5rem 0;
  font-size: 1rem;
}

.status-indicator {
  padding: 0.2rem 0.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
}

.status-indicator.online {
  background-color: #d4f7dc;
  color: #237a3b;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 0.05rem;
}

.overview-list {
  list-style: none;
  padding-left: 0;
  font-size: 1rem;
  line-height: 1.8rem;
}

.overview-list li {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.admin-bottom-row {
  display: flex;
  gap: 20px;
  margin-top: 20px;
  align-items: stretch;
}

.recent-activity-box,
.report-box {
  flex: 1;
  min-height: 100px;
  display: flex;
  flex-direction: column;
}

.report-box {
  height: 270px;
}

.report-submit-btn {
  background-color: red; 
  color: white;
  font-weight: 600;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: background-color 0.2s ease;
  font-size: 0.95rem;
  border: 2px solid #d1d5db;
  border-radius: 0.75rem;
}

.report-submit-btn:hover {
  background-color: darkred;
  transition: background-color 0.2s ease;
  
}

.overview-box {
  background: #fff;
  border-radius: 10px;
  padding: 20px 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.overview-welcome {
  margin-bottom: 15px;
  font-size: 15px;
  color: #333;
}

.overview-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  row-gap: 12px;
}

.overview-list li {
  display: flex;
  align-items: center;
  font-size: 14px;
  background-color: #f5f7fa;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: background-color 0.2s ease;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
}

.overview-icon {
  font-size: 18px;
  margin-right: 10px;
}

.overview-value {
  font-weight: 600;
  margin-left: auto;
  transition: color 0.3s ease;
}

.highlightable.green {
  color: #2ecc71;
}

.highlightable.orange {
  color: #f39c12; 
}

.highlightable.red {
  color: #e74c3c; 
}

.activity-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.activity-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.activity-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f9f9f9;
  border-left: 4px solid #ccc;
  padding: 8px 12px;
  margin-bottom: 6px;
  border-radius: 6px;
  font-size: 0.85rem;
}

.activity-badge {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  text-transform: uppercase;
  margin-right: 8px;
  white-space: nowrap;
}

.activity-badge.promotion { background-color: #e0f7fa; color: #00796b; }
.activity-badge.ticket    { background-color: #fff3e0; color: #ef6c00; }
.activity-badge.training  { background-color: #e8f5e9; color: #2e7d32; }

.activity-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timestamp {
  font-size: 0.7rem;
  color: #999;
  margin-left: 12px;
  flex-shrink: 0;
}

.activity-scroll {
  max-height: 180px;
  overflow-y: auto;
  padding-right: 6px;
  padding-bottom: 10px;
}

.activity-container {
  position: relative;
  max-height: 180px;
}

.activity-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 30px;
  background: linear-gradient(to bottom, transparent, #f9fbfd); 
  pointer-events: none;
}

.activity-scroll::-webkit-scrollbar {
  width: 6px;
}
.activity-scroll::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border-radius: 3px;
}
.activity-scroll::-webkit-scrollbar-thumb:hover {
  background-color: #aaa;
}
.activity-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: #333;
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: translateY(20px);
  z-index: 9999;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.success {
  background-color: #22c55e;
}

.toast.error {
  background-color: #ef4444; 
}

.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 9999;
}

.ticket-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.95rem;
}

.ticket-table th,
.ticket-table td {
  padding: 0.75rem;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
}

.ticket-table th {
  background-color: #f3f4f6;
  font-weight: 600;
  color: #374151;
}

.ticket-status {
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-weight: 600;
  display: inline-block;
}

.ticket-status.open {
  background-color: #fef3c7;
  color: #92400e;
}

.ticket-status.closed {
  background-color: #d1fae5;
  color: #065f46;
}

.ticket-action-btn {
  padding: 0.4rem 0.75rem;
  border: none;
  border-radius: 4px;
  background-color: #3b82f6;
  color: white;
  cursor: pointer;
  font-size: 0.85rem;
}

.ticket-action-btn:hover {
  background-color: #2563eb;
}

.modal {
  display: none; 
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
}

.modal-content {
  background-color: #ffffff;
  margin: 5% auto;
  padding: 2rem;
  border-radius: 1rem;
  width: 90%;
  max-width: 700px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  animation: fadeIn 0.3s ease-in-out;
}

.close-button {
  float: right;
  font-size: 1.5rem;
  font-weight: bold;
  color: #999;
  cursor: pointer;
  transition: color 0.2s ease-in-out;
}

.close-button:hover {
  color: #333;
}

.ticket-action-btn {
  background-color: #3b82f6;
  color: white;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: background-color 0.2s ease-in-out;
}

.confirm-modal {
  display: none;
  position: fixed;
  z-index: 10001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.4);
}

.confirm-modal .modal-content {
  background-color: #fff;
  margin: 10% auto;
  padding: 1.5rem;
  border-radius: 6px;
  width: 400px;
  max-width: 90%;
  box-shadow: 0 0 15px rgba(0,0,0,0.3);
}

.ticket-action-btn:hover {
  background-color: #2563eb;
}

.ticket-action-btn.danger {
  background-color: #ef4444;
}

.ticket-action-btn.danger:hover {
  background-color: #dc2626;
}

.replies-list {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
  margin-bottom: 1rem;
  max-height: 200px;
  overflow-y: auto;
}

.replies-list li {
  background-color: #f3f4f6;
  padding: 0.8rem;
  margin-bottom: 0.5rem;
  border-radius: 0.5rem;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ticket-status.closed { background-color: #d1fae5; color: #065f46; }
.ticket-status.open   { background-color: #fef3c7; color: #92400e; }

.ticket-table-wrapper {
  max-height: 600px;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.75rem;
}

.ticket-table-wrapper::-webkit-scrollbar {
  width: 6px;
}

.ticket-table-wrapper::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 4px;
}

.ticket-table-wrapper::-webkit-scrollbar-thumb:hover {
  background-color: #94a3b8;
}

.ticket-table thead th {
  position: sticky;
  top: 0;
  background-color: #f3f4f6;
  z-index: 1;
}

.ticket-search-wrapper {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.ticket-search-input {
  padding: 0.6rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.75rem;
  font-size: 0.95rem;
  width: 100%;
  max-width: 300px;
  background-color: #f9fafb;
  color: #1e293b;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ticket-search-input::placeholder {
  color: #94a3b8;
}

.ticket-search-input:focus {
  border-color: #4a7cb9;
  outline: none;
  box-shadow: 0 0 0 2px rgba(74, 124, 185, 0.3);
}

.ticket-controls {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.ticket-filter-dropdown {
  padding: 0.6rem 1rem;
  padding-right: 1rem;
  font-size: 0.95rem;
  border: 1px solid #d1d5db;
  border-radius: 0.75rem;
  background-color: #f9fafb;
  color: #1e293b;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ticket-filter-dropdown:focus {
  border-color: #4a7cb9;
  outline: none;
  box-shadow: 0 0 0 2px rgba(74, 124, 185, 0.3);
}

.ticket-clear-btn {
  padding: 0.6rem 1.2rem;
  font-size: 0.95rem;
  background-color: #f9fafb;
  border: 1px solid #cbd5e1;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
  color: #1f2937;
}

.ticket-clear-btn:hover {
  background-color: #d1d5db;
}

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 300px;
}

.ticket-search-input {
  padding-right: 2rem;
  width: 100%;
}

.clear-search {
  position: absolute;
  right: 0.75rem;
  font-size: 1.1rem;
  color: #6b7280;
  cursor: pointer;
  display: none;
  user-select: none;
  transition: color 0.2s ease;
}

.clear-search:hover {
  color: #374151;
}

.ticket-view-btn {
  padding: 6px 12px;
  background-color: #007bff; 
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.ticket-view-btn:hover {
  background-color: #0056b3;
}

.ticket-row.closed {
  background-color: #f0fdf4;
}
.ticket-row.open {
  background-color: #fffbea;
}

.admin-ticket-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  font-family: 'Inter', sans-serif;
  background-color: #ffffff;
  table-layout: fixed; 
}

.admin-ticket-table thead {
  background-color: #f0f4f8;
}

.admin-ticket-table thead th {
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  color: #3b3b3b;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.admin-ticket-table tbody td {
  padding: 12px 14px;
  font-size: 13px;
  color: #4a4a4a;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-ticket-table tbody tr:hover {
  background-color: #f8fafc;
}

.admin-ticket-table th:last-child,
.admin-ticket-table td:last-child {
  text-align: center;
  width: 90px;
}

.ticket-action-btn {
  background-color: #3182ce;
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  white-space: nowrap;
}

.ticket-action-btn:hover {
  background-color: #2b6cb0;
}

.ticket-action-btn.danger {
  background-color: #e53e3e;
}

.ticket-action-btn.danger:hover {
  background-color: #c53030;
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #ccc;
  flex-shrink: 0;
}

.status-pill {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  text-transform: capitalize;
  color: #fff;
}

.status-pill.open {
  background-color: #38a169;
}

.status-pill.closed {
  background-color: #e53e3e;
}

.status-pill.pending {
  background-color: #d69e2e;
}

.category-pill {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 999px;
  color: white;
  text-transform: capitalize;
}

.category-pill.general {
  background-color: #4c51bf;
}

.category-pill.training {
  background-color: #2b6cb0;
}

.category-pill.operations {
  background-color: #2f855a; 
}

.category-pill.roster {
  background-color: #b83280; 
}

.category-pill.events {
  background-color: #805ad5; 
}

.category-pill.complaint {
  background-color: #e53e3e;
}

.ticket-controls-admin {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 1rem;
  padding: 8px 0;
}

search-container {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 280px;
}

#search-input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
}

.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  opacity: 0.6;
}

.clear-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  font-size: 14px;
  cursor: pointer;
  color: #888;
  transform: translateY(-50%);
}

.clear-icon:hover {
  color: #555;
}

.ticket-controls-admin input[type="text"],
.ticket-controls-admin select {
  padding: 8px 12px;
  border: 1px solid #cbd5e0;
  border-radius: 6px;
  font-size: 14px;
  background-color: #ffffff;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s ease;
  min-width: 180px;
}

.ticket-controls-admin input[type="text"]:focus,
.ticket-controls-admin select:focus {
  border-color: #3182ce;
  outline: none;
}

.ticket-controls-admin .ticket-filter-btn {
  padding: 8px 14px;
  background-color: #3182ce;
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.ticket-controls-admin .ticket-filter-btn:hover {
  background-color: #2b6cb0;
}

.admin-ticket-table thead select.inline-filter {
  margin-top: 6px;
  width: 100%;
  font-size: 12px;
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid #cbd5e0;
  background: #ffffff;
  font-family: 'Inter', sans-serif;
}

.category-header {
  position: relative;
}

.custom-dropdown {
  position: relative;
  display: inline-block;
  font-family: 'Inter', sans-serif;
  user-select: none;
  z-index: 100;
}

.custom-dropdown .dropdown-toggle {
  background-color: #f1f5f9;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
}

.custom-dropdown .arrow {
  margin-left: auto;
}

.custom-dropdown .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: max-content;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
  margin-top: 6px;
  padding: 6px 0;
}

.custom-dropdown .dropdown-menu li {
  padding: 8px 14px;
  cursor: pointer;
  font-size: 14px;
}

.custom-dropdown .dropdown-menu li:hover {
  background-color: #f0f4f8;
}

.custom-dropdown.open .dropdown-menu {
  display: block;
}

#pagination {
  margin-top: 1.5rem;
  text-align: center;
}

.pagination-btn {
  display: inline-block;
  margin: 0 4px;
  padding: 6px 12px;
  border: 1px solid #ccc;
  background-color: #f0f0f0;
  color: #333;
  font-size: 14px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
  background-color: #e0e0e0;
}

.pagination-btn.active {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
  font-weight: bold;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.calendar-header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.calendar-nav {
  background-color: #4a7cb9;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.calendar-nav:hover {
  background-color: #185db3;
}

.calendar-month-label {
  font-size: 1.2rem;
  font-weight: bold;
  color: #222;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.calendar-day {
  background-color: #f9f9fb;
  border: 1px solid #d0d7de;
  border-radius: 10px;
  padding: 6px 8px;
  min-height: 80px;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transition: background-color 0.2s;
}

.calendar-day:hover {
  background-color: #f0f4ff;
}

.calendar-day.today {
  border: 2px solid #007BFF;
  background-color: #e8f1ff;
}

.calendar-day strong {
  font-weight: 600;
  margin-bottom: 4px;
  color: #333;
}

.calendar-day[data-date]:hover {
  box-shadow: 0 0 4px rgba(0,123,255,0.3);
}

.calendar-weekdays {
  display: contents; 
}

.calendar-weekday {
  text-align: center;
  font-weight: bold;
  font-size: 14px;
  color: #555;
  padding-bottom: 6px;
  border-bottom: 1px solid #ddd;
}

.session-badge {
  font-size: 11px;
  padding: 3px 6px;
  border-radius: 4px;
  margin-top: 4px;
  line-height: 1.4;
  cursor: pointer;
  word-wrap: break-word;
  color: white;
  display: inline-block;
}

.badge-training {
  background-color: #7c3aed; 
}

.badge-station {
  background-color: #22c55e; 
}

.badge-event {
  background-color: #ef4444; 
}

.session-badge:hover {
  background-color: #0056b3;
}

.calendar-instructions {
  background-color: #eef2f7;
  border-left: 4px solid #007BFF;
  padding: 10px 15px;
  margin: 15px 0;
  border-radius: 6px;
  font-size: 14px;
  color: #333;
  line-height: 1.6;
  justify-content: center;
}

.calendar-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calendar-modal.hidden {
  display: none;
}

.modal-content {
  background: #fff;
  padding: 20px 25px;
  border-radius: 12px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  font-family: 'Inter', sans-serif;
  position: relative;
}

.modal-content h3 {
  margin-top: 0;
  font-size: 1.25rem;
  margin-bottom: 15px;
  color: #333;
}

.close-btn {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 20px;
  cursor: pointer;
  font-weight: bold;
  color: #555;
}

.close-btn:hover {
  color: #000;
}

#bookingForm {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#bookingForm label {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 2px;
}

#bookingForm select,
#bookingForm input[type="text"],
#bookingForm input[type="time"] {
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
}

.book-btn {
  margin-top: 10px;
  padding: 10px;
  background-color: #326dee;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.2s ease;
}

.book-btn:hover {
  background-color: #265acb;
}

.roster-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.roster-table thead {
  background-color: #f0f2f5;
  text-align: left;
}

.roster-table th, .roster-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e0e0e0;
  vertical-align: middle;
}

.roster-table th {
  font-weight: 600;
  color: #333;
}

.roster-table td img {
  border-radius: 50%;
  vertical-align: middle;
}

.section-header-row td {
  background-color: #eaf3ff;
  font-weight: bold;
  font-size: 14px;
  color: #444;
}

.role-badge {
  display: inline-block;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  color: white;
  text-align: center;
  white-space: nowrap;
}

.badge-manager { background-color: #80cfff; }    
.badge-deputy { background-color: #80cfff; }
.badge-ops { background-color: #5abaff; }
.badge-training { background-color: #379fff; }
.badge-instructor { background-color: #1c88ff; }
.badge-trial { background-color: #006fd6; }
.badge-controller { background-color: #005bb5; }

.roster-toggle {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 15px;
}

.roster-toggle button {
  padding: 8px 16px;
  font-weight: 500;
  font-family: inherit;
  background-color: #e2e8f0;
  border: 1px solid #cbd5e0;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.roster-toggle button:hover {
  background-color: #cbd5e0;
}

.roster-toggle button.active {
  background-color: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 15px;
  gap: 10px;
}

.pagination button {
  padding: 6px 14px;
  background-color: #e5e7eb;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s;
  font-family: inherit;
}

.pagination button:hover:not(:disabled) {
  background-color: #d1d5db;
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#pageInfo {
  font-weight: 500;
  font-size: 14px;
}

.status-badge {
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  color: white;
}

.status-badge.active {
  background-color: #2ecc71; 
}

.status-badge.inactive {
  background-color: #e74c3c; 
}

.strike-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  color: white;
}

.strike-0 {
  background-color: #aaa;
}

.strike-1 {
  background-color: #f39c12; 
}

.strike-2 {
  background-color: #e74c3c;
}

th[data-sort] {
  cursor: pointer;
  user-select: none;
}

th.sortable {
  cursor: pointer;
  align-items: center;
  gap: 6px;
}

.sort-icon svg {
  display: inline-block;
  vertical-align: middle;
}

.roster-search input:focus {
  outline: none;
  border-color: #4c9aff;
  box-shadow: 0 0 3px #4c9aff;
}

.calendar-filters label {
  display: flex;
  align-items: center;
  padding: 6px 10px;
  background-color: #f4f4f4;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  cursor: pointer;
  transition: background-color 0.2s ease;
  border: 1px solid #ddd;
}

.calendar-filters {
  display: flex;
  justify-content: center; 
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 15px;
}

.calendar-filters label {
  display: flex;
  align-items: center;
  padding: 6px 10px;
  background-color: #f9f9f9;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  cursor: pointer;
  transition: background-color 0.2s ease;
  border: 1px solid #ddd;
}

.calendar-filters input[type="checkbox"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  margin-right: 8px;
  border: 2px solid currentColor;
  background-color: transparent;
  position: relative;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}

.calendar-filters input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.calendar-filters input[type="checkbox"]:checked {
  background-color: currentColor;
}

#filter-station {
  color: #27ae60; 
}

#filter-training {
  color: #8e44ad; 
}

#filter-event {
  color: #c0392b;
}

#filter-past {
  color: #7f8c8d; 
}

.calendar-list-view {
  font-family: 'Inter', sans-serif;
  max-width: 500px;
  margin: 0 auto;
  padding: 10px;
}

.calendar-day-group {
  border-left: 2px solid #ccc;
  margin-bottom: 1.5rem;
  padding-left: 10px;
}

.calendar-day-label {
  font-weight: bold;
  margin-bottom: 6px;
}

.booking-entry {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 0.85rem;
  max-width: 90%;
}

.booking-entry {
  transition: all 0.2s ease;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}

.booking-entry.station {
  color: #2e7d32;
}

.booking-entry.training {
  color: #6a1b9a; 
}

.booking-entry.event {
  color: #c62828;
}

.booking-entry:hover {
  text-decoration: none;
}

.booking-entry.station:hover {
  text-decoration: underline;
  cursor: pointer;
}

.booking-entry.training:hover {
  text-decoration: underline;
  cursor: pointer;
}

.booking-entry.event:hover {
  text-decoration: underline;
  cursor: pointer;
}

.booking-tooltip {
  position: absolute;
  background: #f9f9f9;
  color: black;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 9999;
  pointer-events: none;
  transition: opacity 0.2s ease;
  max-width: 250px;
  line-height: 1.4;
}

.booking-tooltip.hidden {
  display: none;
}

.booking-tooltip strong {
  color: #4c9aff;
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

#conflictModal .modal-content {
  max-width: 400px;
  background-color: #fff3f3;
  border: 1px solid #e53935;
  color: #b71c1c;
  text-align: center;
  padding: 20px;
  border-radius: 12px;
}

#conflictModal .book-btn {
  background-color: #e53935;
  color: white;
  margin-top: 10px;
}

.calendar-page .sidebar {
  position: fixed;
  overflow-y: auto;
  background-color: #1a1a1a; 
}

@media (min-width: 901px) {
  .calendar-page .dashboard-main {
    margin-left: 280px;
  }
}

.time-display {
  margin-bottom: 15px;
  padding: 10px 15px;
  border-radius: 8px;
  font-size: 0.95rem;
  line-height: 1.5;
  justify-content: center;
  text-align: center;
}
.time-display p {
  margin: 4px 0;
}

.calendar-modal {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.booking-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease-in-out;
}

.booking-modal-content {
  background: #ffffff;
  padding: 2rem 2.5rem;
  border-radius: 1rem;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  font-family: 'Inter', sans-serif;
  animation: slideUp 0.3s ease-out;
}

.booking-modal-content h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #1f2937;
}

.booking-modal-content label {
  display: block;
  margin-top: 1rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: #374151;
}

.booking-modal-content input,
.booking-modal-content select {
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 1rem;
  background: #f9fafb;
  transition: border-color 0.2s ease;
}

.booking-modal-content input:focus,
.booking-modal-content select:focus {
  border-color: #3b82f6;
  outline: none;
  background: white;
}

.booking-modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.8rem;
}

.booking-modal-confirm,
.booking-modal-cancel {
  padding: 0.6rem 1.2rem;
  border-radius: 0.5rem;
  border: none;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.booking-modal-confirm {
  background-color: #3b82f6;
  color: white;
}

.booking-modal-confirm:hover {
  background-color: #2563eb;
}

.booking-modal-cancel {
  background-color: #e5e7eb;
  color: #374151;
}

.booking-modal-cancel:hover {
  background-color: #d1d5db;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

#eventNameWrapper input {
  width: 100%;
  padding: 0.5rem;
  margin-top: 0.3rem;
  border-radius: 0.4rem;
  border: 1px solid #ccc;
}

.full-width {
  display: flex;
  flex-direction: column;
  width: 97.5%;
}

.full-box {
  width: 100%;
  max-width: none;
  min-height: 710px;
}

.form-container {
  max-width: 700px;
  margin: 2rem auto;
  background: #fff;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 0 10px rgba(0,0,0,0.07);
  min-height: auto;
}

.form-container h2 {
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-group {
  margin-bottom: 0.9rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.65rem;
  font-family: 'Inter', sans-serif;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
}

.form-group textarea {
  resize: vertical;
  height: 100px;
}

.submit-btn {
  background-color: #357EDD;
  color: white;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
}

.submit-btn:hover {
  background-color: #265ECF;
}

.success-message {
  margin-top: 1.5rem;
  background-color: #e0f9e0;
  border-left: 4px solid #2ecc71;
  padding: 1rem;
  border-radius: 8px;
  color: #2d7c2d;
  font-weight: 500;
}

.drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.35);
  backdrop-filter: saturate(120%) blur(1px);
  opacity: 0; transition: opacity .25s ease;
  z-index: 999;
}

.drawer {
  position: fixed; top: 0; right: 0; height: 100vh; width: 340px;
  max-width: 90vw;
  background: #fff;
  box-shadow: -12px 0 28px rgba(0,0,0,0.15);
  transform: translateX(100%);
  transition: transform .28s ease;
  z-index: 1000;
  display: flex; flex-direction: column;
  border-left: 1px solid rgba(0,0,0,0.06);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.drawer.open      { transform: translateX(0%); }
.drawer-backdrop.show { opacity: 1; }

.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid rgba(0,0,0,0.06);
}
.drawer-header h3 { margin: 0; font-size: 18px; font-weight: 600; }
.drawer-close {
  border: 0; background: transparent; font-size: 24px; cursor: pointer; line-height: 1;
}

.drawer-content { padding: 14px 18px 22px; overflow: auto; }
.drawer-section + .drawer-section { margin-top: 18px; }
.drawer-section h4 { margin: 0 0 10px 0; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: #666; }

.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.toggle input { display: none; }
.toggle-slider {
  width: 44px; height: 24px; border-radius: 999px;
  background: #cfd4dc; position: relative; transition: background .2s ease;
}
.toggle-slider::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.2);
  transition: transform .2s ease;
}
.toggle input:checked + .toggle-slider { background: #4f7cff; }
.toggle input:checked + .toggle-slider::after { transform: translateX(20px); }
.toggle-label { font-size: 14px; }

body.dark { background: #0f1115; color: #e6e7ea; }
body.dark .dashboard-box { background: #151922; border-color: #232838; }
body.dark .box-divider { background: #232838; }
body.dark .sidebar { background: #111520; border-color: #232838; }
body.dark .sidebar .sidebar-heading { color: #96a0b5; }
body.dark .calendar-day.today { background: #1a2233; }
body.dark .icon { filter: brightness(0.9); }

body.dark .drawer { background: #121622; border-left-color: #232838; }
body.dark .drawer-header { border-bottom-color: #232838; }
body.dark .drawer-section h4 { color: #9aa6c0; }

h1, h2, h3, h4, .dashboard-heading, .box-header h2, .sidebar .label {
  color: var(--text);
}

.box-divider { background: var(--border); }

.topbar .icon { opacity: .9; }
body.dark .topbar .icon { filter: brightness(0.9) contrast(1.05); }

table thead th {
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
table tbody td {
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
#connections-table tbody tr {
  background: var(--surface-2);
}
#connections-table tbody tr + tr { border-top: 1px solid var(--border); }

input, select, textarea {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
input::placeholder, textarea::placeholder { color: var(--muted); }
.calendar-modal .modal-content,
.drawer {
  background: var(--surface);
  border: 1px solid var(--border);
}
.calendar-modal .close-btn,
.drawer-close { color: var(--text); }

.book-btn, .admin-tool-btn, .report-submit-btn, .submit-btn {
  background: var(--accent);
  color: #fff;
  border: 1px solid transparent;
}
.book-btn.danger, .danger { background: var(--danger); color: #fff; }

.highlightable, .overview-value, .calendar-month-label, .calendar-weekday {
  color: var(--muted);
}

.calendar-day { background: var(--surface); border: 1px solid var(--border); }
.calendar-day.today { background: var(--surface-2); }
.booking-entry { background: var(--surface-2); border: 1px solid var(--border); }

.toast { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.toast.success { border-left: 4px solid var(--success); }
.toast.error   { border-left: 4px solid var(--danger); }

:root {
  --sidebar-fg: #ffffff;
  --sidebar-fg-muted: rgba(255,255,255,.8);
  --sidebar-fg-dim: rgba(255,255,255,.65);
}
body.dark {
  --sidebar-fg: #f5f8ff;
  --sidebar-fg-muted: rgba(245,248,255,.85);
  --sidebar-fg-dim: rgba(245,248,255,.7);
}

.sidebar { color: #fff !important; }

.sidebar a,
.sidebar p,
.sidebar span,
.sidebar li,
.sidebar strong,
.sidebar .sidebar-heading,
.sidebar .label,
.sidebar .arrow,
.sidebar .dropdown-toggle,
.sidebar .menu-link,
.sidebar .menu-link a {
  color: #fff !important;
  opacity: 1 !important;
}

.sidebar .icon,
.sidebar .icon-sm {
  filter: brightness(0) invert(1);
  opacity: 1 !important;
}

.sidebar .menu-link:hover,
.sidebar .dropdown-toggle:hover {
  background-color: rgba(255, 255, 255, 0.12);
  border-radius: 8px;
}

.dashboard-box .box-header .box-icon {
  filter: none;
  transition: filter 0.25s ease;
}

body.dark .dashboard-box .box-header .box-icon {
  filter: brightness(0) invert(1);
}

body.dark .topbar-icons .icon {
  background-color: rgba(255, 255, 255, 0.1); 
  border-radius: 50%;
  padding: 6px;
  filter: brightness(0) invert(1); 
}

body.dark .topbar-icons .icon:hover {
  background-color: rgba(255, 255, 255, 0.2); 
}

body.dark .tool-link {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
}

body.dark .tool-link:hover {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

body.dark .leaderboard {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: #fff !important;
}

body.dark .leaderboard h3 {
  color: #ffffff;
}

body.dark .leaderboard * {
  color: #fff !important;
}

body.dark .leaderboard li {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: #f5f5f5;
  border-radius: 16px;
}

body.dark .leaderboard li:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

body.dark .controller-profile {
  color: #fff !important;
}

body.dark .controller-profile * {
  color: #fff !important;
}

body.dark .controller-profile .cotm-highlight {
  color: rgba(255, 255, 255, 0.8) !important;
}

body.dark .calendar-day:hover {
  background-color: rgba(255, 255, 255, 0.06); 
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
}

body.dark .calendar-instructions {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: #f5f5f5;
}

body.dark .calendar-filters label {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

body.dark .calendar-filters label:hover {
  background: rgba(255, 255, 255, 0.15);
}

body.dark .calendar-filters input[type="checkbox"] {
  accent-color: #4f7cff;
}

body.dark .dashboard-box .roster-table {
  background: transparent !important;
  border-collapse: separate;
  border-spacing: 0 6px;
}

body.dark .roster-table thead { 
  background: transparent !important;
  border-radius: 50%;
}
body.dark .roster-table thead tr {
  background: rgba(255, 255, 255, 0.08) !important; 
  border-radius: 50%;
}
body.dark .roster-table thead th {
  background: transparent !important;
  color: #fff !important;
  border: none !important;
}

body.dark .dashboard-box .roster-table tbody tr > td {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #fff !important;
  border: none !important;
}

body.dark .dashboard-box .roster-table tbody tr > td:first-child {
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
}
body.dark .dashboard-box .roster-table tbody tr > td:last-child {
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
}

body.dark .dashboard-box .roster-table tbody tr:hover > td {
  background: rgba(255, 255, 255, 0.10) !important;
  transition: background 0.2s ease;
}

body.dark .dashboard-box #showStaff,
body.dark .dashboard-box #showControllers,
body.dark .dashboard-box .pagination button {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}
body.dark .dashboard-box #showStaff:hover,
body.dark .dashboard-box #showControllers:hover,
body.dark .dashboard-box .pagination button:hover {
  background: rgba(255, 255, 255, 0.15) !important;
}
body.dark .dashboard-box #showControllers.active,
body.dark .dashboard-box #showStaff.active {
  background: #4f7cff !important;
  border-color: #4f7cff !important;
  color: #fff !important;
}

body.dark .ticket-controls {
  border-radius: 12px;
  padding: 10px 12px;
}

body.dark .search-wrapper {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
}
body.dark .ticket-search-input {
  background: transparent !important;
  color: #fff !important;
}
body.dark .ticket-search-input::placeholder {
  color: rgba(255,255,255,0.6);
}
body.dark .clear-search {
  color: rgba(255,255,255,0.7);
}

body.dark .ticket-filter-dropdown,
body.dark .ticket-clear-btn {
  background: rgba(255,255,255,0.08) !important;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
  border-radius: 10px;
}
body.dark .ticket-clear-btn:hover,
body.dark .ticket-filter-dropdown:hover {
  background: rgba(255,255,255,0.14) !important;
}

body.dark .ticket-table-wrapper {
  background: transparent;
}

body.dark table.ticket-table {
  background: transparent;
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

body.dark .ticket-table thead th {
  background: rgba(255,255,255,0.08) !important;
  color: #fff !important;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

body.dark .ticket-table tbody tr {
  background: rgba(255,255,255,0.05);
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
body.dark .ticket-table tbody tr:hover {
  background: rgba(255,255,255,0.09);
}

body.dark .ticket-table td {
  color: #fff;
  border-color: rgba(255,255,255,0.08);
}

body.dark .ticket-status {
  color: #fff;
}
body.dark .ticket-status.open { color: #7be495; }
body.dark .ticket-status.closed { color: #ff6b6b; }

body.dark .category-pill { color: #fff; }

body.dark .modal { background: rgba(0,0,0,0.6); }
body.dark .modal-content {
  background: #1e1f25;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}
body.dark .modal-content h2,
body.dark .modal-content h3,
body.dark .modal-content p { color: #fff; }

body.dark .replies-list li { color: #fff; }

body.dark #replyInput {
  background: rgba(255,255,255,0.06);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 10px;
}
body.dark #replyInput::placeholder { color: rgba(255,255,255,0.6); }

body.dark #submitReply,
body.dark .ticket-action-btn {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 10px;
}
body.dark #submitReply:hover,
body.dark .ticket-action-btn:hover {
  background: rgba(255,255,255,0.18);
}

body.dark .dashboard-box .box-header h2 { color: #fff; }
body.dark .dashboard-box .box-divider { background: rgba(255,255,255,0.12); }

.ticket-table,
.ticket-table th,
.ticket-table td {
  border: none !important;
  outline: none !important;
}

.ticket-table tbody tr td {
  border-bottom: 1px solid rgba(255,255,255,0.08); 
}

body.dark #ticketModal {
  background: rgba(0, 0, 0, 0.6);
}

body.dark #ticketModal .modal-content {
  background: #1e1f25;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
}

body.dark #modalReplies.replies-list {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 10px 12px;
  max-height: 260px;
  overflow-y: auto;
  margin-top: 8px;
}

body.dark #modalReplies.replies-list li {
  background: #262a33 !important;  
  color: #fff !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 8px !important;
  padding: 8px 10px !important;
  margin: 6px 0 !important;
  box-shadow: none !important;
  list-style: none;
}

body.dark #modalReplies.replies-list li:first-child { margin-top: 0; }
body.dark #modalReplies.replies-list li:last-child  { margin-bottom: 0; }

body.dark #modalReplies.replies-list li strong { color: #4f7cff; }

body.dark #modalReplies.replies-list::-webkit-scrollbar { width: 8px; }
body.dark #modalReplies.replies-list::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.18);
  border-radius: 8px;
}
body.dark #modalReplies.replies-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.28);
}

body.dark .overview-list {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 10px 14px;
  margin-top: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

body.dark .overview-list li {
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 15px;
}

body.dark .overview-list li:last-child {
  border-bottom: none;
}

body.dark .overview-icon {
  margin-right: 8px;
  opacity: 0.9;
}

body.dark .overview-value {
  font-weight: 600;
  color: #4f7cff;
}

body.dark .highlightable:hover {
  color: #7b9dff;
  text-shadow: 0 0 4px rgba(79, 124, 255, 0.6);
  transition: all 0.3s ease;
}

body.dark .overview-list strong {
  color: #fff;
}

body.dark .dashboard-box p strong {
  color: #4f7cff;
}

body.dark .overview-list {
  background: linear-gradient(145deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px 18px;
  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.5),
    inset 0 1px 1px rgba(255,255,255,0.05);
  backdrop-filter: blur(4px);
  transition: all 0.3s ease;
}

body.dark .overview-list li {
  color: #f1f1f1;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 6px;
  transition: background 0.25s ease, transform 0.2s ease;
}

body.dark .overview-list li:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

body.dark .overview-list li:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

body.dark .overview-list .overview-icon {
  margin-right: 10px;
  font-size: 18px;
  opacity: 0.9;
  flex-shrink: 0;
}

body.dark .overview-list strong {
  color: #fff;
  font-weight: 500;
}

body.dark .overview-list .overview-value {
  color: #4f7cff;
  font-weight: 600;
  font-size: 15px;
}

body.dark .overview-list .highlightable:hover {
  color: #7b9dff;
  text-shadow: 0 0 8px rgba(79, 124, 255, 0.6);
}

body.dark .overview-list,
body.dark .overview-list li,
body.dark .overview-list .overview-value {
  transition: all 0.3s ease;
}

body.dark .admin-tickets-table {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.45);
}

body.dark .admin-ticket-table {
  width: 100%;
  border-collapse: separate;          
  border-spacing: 0;
  overflow: hidden;
  border-radius: 10px;
  background: transparent;
}

body.dark .admin-ticket-table thead th {
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  padding: 10px 12px;
  white-space: nowrap;
}

body.dark .admin-ticket-table thead th .inline-dropdown,
body.dark #category-filter,
body.dark #status-filter,
body.dark #sort-select {
  background: rgba(0,0,0,0.25);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 8px;
  padding: 6px 8px;
  outline: none;
}

body.dark .admin-ticket-table thead th .inline-dropdown:focus,
body.dark #category-filter:focus,
body.dark #status-filter:focus,
body.dark #sort-select:focus {
  border-color: #4f7cff;
  box-shadow: 0 0 0 3px rgba(79,124,255,0.25);
}

body.dark .admin-ticket-table tbody tr {
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background 0.2s ease;
}

body.dark .admin-ticket-table tbody tr:hover {
  background: rgba(255,255,255,0.08);
}

body.dark .admin-ticket-table td {
  color: #f2f2f2;
  padding: 10px 12px;
}

body.dark .admin-ticket-table tbody tr:first-child td:first-child { border-top-left-radius: 10px; }
body.dark .admin-ticket-table tbody tr:first-child td:last-child  { border-top-right-radius: 10px; }
body.dark .admin-ticket-table tbody tr:last-child  td:first-child { border-bottom-left-radius: 10px; }
body.dark .admin-ticket-table tbody tr:last-child  td:last-child  { border-bottom-right-radius: 10px; }

body.dark .ticket-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

body.dark .search-wrapper {
  position: relative;
  flex: 1;
}

body.dark .ticket-search-input {
  width: 100%;
  background: rgba(255,255,255,0.06);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 10px;
  padding: 10px 40px 10px 12px;
  outline: none;
}

body.dark .ticket-search-input:focus {
  border-color: #4f7cff;
  box-shadow: 0 0 0 3px rgba(79,124,255,0.22);
}

body.dark .clear-search {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #ddd;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

body.dark .clear-search:hover {
  background: rgba(255,255,255,0.18);
  color: #fff;
}

body.dark .ticket-clear-btn,
body.dark .ticket-action-btn {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

body.dark .ticket-clear-btn:hover,
body.dark .ticket-action-btn:hover {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.22);
  transform: translateY(-1px);
}

body.dark .ticket-action-btn.danger,
body.dark #close-ticket-btn {
  background: rgba(255, 81, 81, 0.12);
  border-color: rgba(255, 81, 81, 0.35);
}

body.dark .ticket-action-btn.danger:hover,
body.dark #close-ticket-btn:hover {
  background: rgba(255, 81, 81, 0.2);
  border-color: rgba(255, 81, 81, 0.5);
}

body.dark .ticket-status.open  { color: #6fe08f; }
body.dark .ticket-status.closed{ color: #f08c8c; }

body.dark .category-pill {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  color: #fff;
}

body.dark .modal .modal-content {
  background: rgba(15,16,20, 0.95);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

body.dark .replies-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

body.dark .replies-list li {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: #f0f0f0;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 8px;
}

body.dark .replies-list li strong {
  color: #fff;
}

body.dark #reply-text {
  background: rgba(255,255,255,0.06);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
}

body.dark #reply-text:focus {
  border-color: #4f7cff;
  box-shadow: 0 0 0 3px rgba(79,124,255,0.22);
}

body.dark .confirm-modal .modal-content {
  background: rgba(15,16,20,0.95);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
}

body.dark #toast.toast {
  background: rgba(30,30,36, 0.96);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 10px 30px rgba(0,0,0,0.55);
}

body.dark #pagination button {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 10px;
  padding: 8px 10px;
}

body.dark #pagination button:hover {
  background: rgba(255,255,255,0.14);
}

@supports (scrollbar-color: auto) {
  body.dark .admin-tickets-table {
    scrollbar-color: rgba(255,255,255,0.25) transparent;
    scrollbar-width: thin;
  }
}

body.dark .admin-ticket-table thead {
  background: transparent !important;
}

body.dark .admin-ticket-table thead tr {
  background: rgba(255, 255, 255, 0.08) !important;
}

body.dark .admin-ticket-table thead th {
  background: transparent !important; 
  color: #fff !important;
  border: none !important;
}

body.dark #booking-modal.booking-modal-overlay {
  background: rgba(0, 0, 0, 0.6) !important; 
}

body.dark .booking-modal-content {
  background: #1e1f25 !important; 
  color: #e8eaed;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
}

body.dark .booking-modal-content h2 {
  color: #ffffff;
  letter-spacing: .2px;
}

body.dark .booking-modal-content label {
  color: #dfe3ea;
}

body.dark .booking-modal-content input[type="text"],
body.dark .booking-modal-content input[type="date"],
body.dark .booking-modal-content input[type="time"],
body.dark .booking-modal-content select {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
}

body.dark .booking-modal-content input::placeholder {
  color: rgba(255, 255, 255, 0.65);
}

body.dark .booking-modal-content input[type="text"]:focus,
body.dark .booking-modal-content input[type="date"]:focus,
body.dark .booking-modal-content input[type="time"]:focus,
body.dark .booking-modal-content select:focus {
  outline: none;
  border-color: #4f7cff;
  box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.22);
}

body.dark .booking-modal-content .time-display {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e8eaed;
  border-radius: 12px;
}

body.dark .booking-modal-buttons .booking-modal-confirm {
  background: #4f7cff;
  color: #fff;
  border: 1px solid #4f7cff;
  border-radius: 10px;
}
body.dark .booking-modal-buttons .booking-modal-confirm:hover {
  filter: brightness(1.05);
}

body.dark .booking-modal-buttons .booking-modal-cancel {
  background: rgba(255, 255, 255, 0.08);
  color: #e8eaed;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
}
body.dark .booking-modal-buttons .booking-modal-cancel:hover {
  background: rgba(255, 255, 255, 0.14);
}

body.dark #eventNameWrapper input {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
}

body.compact {
  --compact-gap: 10px;
  --compact-pad: 8px;
  --compact-pad-sm: 6px;
  --compact-radius: 10px;
  --compact-font: 0.95rem;
  --compact-font-sm: 0.9rem;
}

body.compact .dashboard-main,
body.compact .dashboard-container {
  gap: var(--compact-gap);
}
body.compact .dashboard-heading { margin: 6px 0 10px; }
body.compact .dashboard-box { padding: var(--compact-pad); border-radius: var(--compact-radius); }
body.compact .box-header { gap: 8px; }
body.compact .box-header h2 { font-size: 1.05rem; }
body.compact .box-icon { width: 18px; height: 18px; }

body.compact .sidebar { padding: 10px; }
body.compact .sidebar-avatar { width: 54px; height: 54px; }
body.compact .sidebar .sidebar-heading { margin: 10px 0 6px; font-size: var(--compact-font); }
body.compact .sidebar .menu-link { margin: 2px 0; }
body.compact .sidebar .dropdown-toggle { padding: 6px 8px; }
body.compact .sidebar .dropdown-menu li a { padding: 6px 10px; }
body.compact .sidebar .label { font-size: var(--compact-font); }

body.compact .tool-link {
  padding: 8px 10px;
  font-size: var(--compact-font);
  border-radius: var(--compact-radius);
}

body.compact .overview-list { gap: 8px; }
body.compact .overview-list li {
  padding: 8px 10px;
  border-radius: var(--compact-radius);
}
body.compact .overview-icon { font-size: 1rem; }
body.compact .overview-value { font-size: var(--compact-font); }

body.compact table { font-size: var(--compact-font-sm); }
body.compact table thead th {
  padding: 8px 10px;
}
body.compact table tbody td {
  padding: 6px 10px;
}
body.compact .ticket-table .category-pill,
body.compact .admin-ticket-table .category-pill {
  padding: 2px 6px;
  font-size: 0.8rem;
  border-radius: 999px;
}

body.compact .connections-table .conn-card { padding: 8px; border-radius: var(--compact-radius); }
body.compact .connections-table .conn-meta { gap: 8px; }

body.compact .pagination { margin-top: 8px; }
body.compact .pagination button,
body.compact .ticket-clear-btn,
body.compact .ticket-view-btn,
body.compact .book-btn,
body.compact .ticket-action-btn {
  padding: 6px 10px;
  font-size: var(--compact-font-sm);
  border-radius: 8px;
}

body.compact .ticket-controls { gap: 8px; }
body.compact .ticket-search-input { padding: 8px 10px; }
body.compact .calendar-filters label { margin-right: 10px; font-size: var(--compact-font-sm); }

body.compact .modal .modal-content {
  padding: 12px 14px;
  border-radius: var(--compact-radius);
}
body.compact .replies-list li { padding: 6px 8px; }

body.compact .calendar-section { margin-top: 8px; }
body.compact .calendar-month-label { font-size: 1rem; }
body.compact .calendar-nav { padding: 4px 8px; }
body.compact .calendar-grid .calendar-weekday { padding: 6px 0; font-size: var(--compact-font-sm); }
body.compact .calendar-day { padding: 6px; min-height: 78px; }
body.compact .booking-entry { padding: 4px 6px; border-radius: 6px; }

body.compact .controller-profile .cotm-name { font-size: 1rem; }
body.compact .cotm-avatar { width: 54px; height: 54px; }

body { transition: padding 120ms ease, gap 120ms ease; }
.dashboard-box,
.modal .modal-content,
.sidebar,
.table,
.ticket-controls,
.tool-link,
.calendar-day { transition: all 120ms ease; }

body.compact .dashboard-box.suggestions-box,
body.compact .dashboard-box.live-map-box {
  max-height: var(--compact-box-height);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body.compact .dashboard-box.suggestions-box > .box-divider ~ *,
body.compact .dashboard-box.live-map-box > .box-divider ~ * {
  max-height: calc(var(--compact-box-height) - 60px); 
  overflow-y: auto;
}


body.compact .dashboard-box.suggestions-box .box-header,
body.compact .dashboard-box.live-map-box .box-header {
  position: sticky;
  top: 0;
  background: inherit;
  z-index: 1;
  padding-top: 12px;
}

body.compact .dashboard-box.live-map-box iframe,
body.compact .dashboard-box.live-map-box .map-container,
body.compact .dashboard-box.live-map-box #map {
  height: calc(var(--compact-box-height) - 60px) !important;
  border-radius: 10px;
  overflow: hidden;
}

body.compact .controller-month-box {
  height: 485px
}

body.compact .live-map-box {
  height:640px;
}

.no-link-style {
  text-decoration: none;    
  display: inline-block;    
  text-align: center;  
  color: white; 
}

@media (max-width: 900px) {

  html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    font-size: 15px;
    height: auto !important;
  }

  .dashboard-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100vh;
    height: auto !important;
    overflow: visible !important;
    position: static !important;
  }

  .sidebar {
    width: 100% !important;
    max-width: 100%;
    height: auto !important;
    position: static !important;
    padding: 14px 18px;
    border-right: none;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    overflow: visible !important;
  }

  .sidebar-avatar {
    width: 56px;
    height: 56px;
    margin-bottom: 8px;
  }

  .sidebar-menu {
    padding-left: 0;
  }

  .sidebar-menu li {
    margin: 3px 0;
  }

  .sidebar-heading {
    font-size: 0.9rem;
    margin-top: 12px;
  }

  .dashboard-main {
    width: 100% !important;
    padding: 14px 12px 24px;
    overflow: visible !important;
    height: auto !important;
  }

  .dashboard-content,
  .admin-grid,
  .admin-bottom-row,
  .left-boxes,
  .side-column,
  .map-row {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 14px !important;
  }

  .dashboard-box {
    width: 100% !important;
    margin: 0 !important;
    display: block !important;
    box-sizing: border-box !important;
  }

  .topbar {
    padding: 4px 0;
  }

  .topbar-right {
    display: flex;
    gap: 10px;
  }

  .topbar-icons {
    display: flex;
    gap: 8px;
  }

  .topbar-avatar {
    width: 32px;
    height: 32px;
  }

  .dashboard-heading {
    font-size: 1.4rem;
    text-align: center;
    line-height: 1.2;
  }

  .inline-logo {
    height: 22px;
  }

  .table-wrapper,
  .roster-table-wrapper,
  .ticket-table-wrapper,
  .connections-table,
  .admin-tickets-table {
    width: 100%;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .roster-table,
  .ticket-table,
  .admin-ticket-table,
  #connections-table {
    min-width: 650px !important;
    font-size: 0.88rem;
  }

  th, td {
    padding: 8px;
  }

  .roster-toggle {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px;
  }

  .roster-toggle > div {
    width: 100% !important;
  }

  .ticket-controls {
    flex-direction: column !important;
    gap: 10px;
  }

  .ticket-controls > * {
    width: 100% !important;
  }

  .modal,
  .modal-content,
  .booking-modal-content {
    width: 95% !important;
    max-width: 95% !important;
    left: 50%;
    transform: translateX(-50%);
    top: 5% !important;
    max-height: 85vh !important;
    overflow-y: auto !important;
  }

  .live-map-box iframe {
    height: 260px !important;
  }

  .training-progress-box {
    width: 100% !important;
    display: block !important;
  }

  .training-status-columns {
    display: flex;
    flex-direction: column !important;
    gap: 10px;
  }

  .training-status-columns .status-card {
    width: 100% !important;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .status-label {
    flex: 1;
    font-size: 0.95rem;
  }

  .suggestions-box,
  .controller-month-box {
    width: 100% !important;
  }

  button,
  .ticket-action-btn,
  .admin-tool-btn {
    width: 100%;
    padding: 10px 14px;
    font-size: 1rem;
  }
}

@media (max-width: 900px) {

  .sidebar {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    position: relative !important;
    background-color: #05080c !important; 
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
  }

  .sidebar::before {
    content: '' !important;
    position: absolute;
    top: 0; 
    left: 0;
    width: 100%;
    height: 100%;                   
    background: rgba(0,0,0,0.45);   
    filter: blur(6px);               
    z-index: 0;
  }

  .sidebar > * {
    position: relative;
    z-index: 1;
  }
}

  .dashboard-container {
    height: auto !important;
    min-height: 100vh;
  }

@media (max-width: 900px) {

  .calendar-page .dashboard-main {
    margin-left: 0 !important;
    width: 100% !important;
    padding: 14px 12px 24px !important;
    box-sizing: border-box;
  }

  .calendar-page .dashboard-box {
    width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box;
  }

  .calendar-filters {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
  }

  .calendar-filters label {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
  }

  .calendar-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
  }

  .calendar-month-label {
    min-width: 140px;
    text-align: center;
  }

  .calendar-section {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .calendar-grid {
    min-width: 650px;                 
  }

  .calendar-weekdays,
  .calendar-day {
    font-size: 0.85rem;
  }
}