/* limas.Hub - Static CSS Styles */

/* CSS Variables */
:root {
  /* LIMAS palette (matches LIMAS_Hersteller_Uebersicht_und_Akte.html) */
  --primary-cyan: #ee312d;
  --primary-cyan-dark: #cf2622;
  --primary-fuchsia: #cf2622;
  --bg-light: #f7f7f7;
  --bg-dark: #111827;
  --sidebar-light: #ffffff;
  --sidebar-dark: #1f2937;
  --text-light: #24262a;
  --text-dark: #d1d5db;
  --border-light: #e3e3e3;
  --border-dark: #374151;
}
.pointer {
  cursor: pointer;
}
/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-light);
  color: var(--text-light);
  min-height: 100vh;
  overflow-x: hidden;
}

body.dark {
  background-color: var(--bg-dark);
  color: var(--text-dark);
}

/* Layout */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 256px;
  background-color: var(--sidebar-light);
  border-right: 1px solid var(--border-light);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, width 0.3s ease;
  z-index: 30;
  overflow-y: auto;
}

body.dark .sidebar {
  background-color: var(--sidebar-dark);
  border-right-color: var(--border-dark);
}

/* Toggled off = hidden off-screen (not a shrunken rail), on every screen size.
   The header ☰ button brings it back. */
.sidebar:not(.open) {
  transform: translateX(-100%);
}

.sidebar-header {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: inherit;
  z-index: 10;
}

.limas-brand-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.limas-brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.limas-logo-img {
  height: 42px;
  width: auto;
  max-width: 100%;
  flex: none;
  display: block;
}

.limas-brand-sub {
  font-size: 11px;
  line-height: 1.35;
  color: #6f747a;
}

body.dark .limas-brand-sub {
  color: #9ca3af;
}

.sidebar.collapsed .limas-brand-sub {
  display: none;
}

.user-chip {
  cursor: pointer;
  position: relative;
}

.sidebar-title {
  font-weight: bold;
  font-size: 14px;
  color: #1f2937;
}

body.dark .sidebar-title {
  color: #ffffff;
}

.sidebar-toggle {
  padding: 8px;
  border-radius: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #6b7280;
}

.sidebar-toggle:hover {
  background-color: #f3f4f6;
}

body.dark .sidebar-toggle:hover {
  background-color: #374151;
}

/* Navigation */
.nav-main {
  flex: 1;
  margin-top: 32px;
}

.nav-bottom {
  border-top: 1px solid var(--border-light);
  padding: 16px 0;
}

body.dark .nav-bottom {
  border-top-color: var(--border-dark);
}

.nav-sec {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: #5a5f65;
  padding: 15px 18px 7px;
  font-weight: 700;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border: none;
  border-left: 3px solid transparent;
  background: transparent;
  cursor: pointer;
  color: #6b7280;
  text-decoration: none;
  transition: all 0.2s;
}

.nav-item.disabled {
  cursor: not-allowed;
  opacity: .45;
}

.nav-item.disabled:hover {
  background-color: transparent;
}

.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 12px;
}


.nav-item:hover {
  background-color: #f3f4f6;
}

body.dark .nav-item {
  color: #d1d5db;
}

body.dark .nav-item:hover {
  background-color: #374151;
}

.nav-item.active {
  color: var(--primary-cyan);
  background-color: #fff3f2;
  border-left-color: var(--primary-cyan);
  font-weight: 700;
}

body.dark .nav-item.active {
  color: #ff6b66;
  background-color: rgba(238, 49, 45, 0.12);
  border-left-color: var(--primary-cyan);
}

.nav-item-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-text {
  font-size: 14px;
}

.submenu-arrow {
  width: 16px;
  height: 16px;
  color: #9ca3af;
  transition: transform 0.2s;
}

.submenu-arrow.open {
  transform: rotate(90deg);
}

/* Submenu */
.submenu {
  padding-left: 40px;
  background-color: #f9fafb;
  display: none;
}

body.dark .submenu {
  background-color: rgba(55, 65, 81, 0.5);
}

.submenu.open {
  display: block;
}

.submenu .nav-item {
  padding: 8px 16px;
}

.submenu .nav-icon {
  width: 16px;
  height: 16px;
}

/* Main Content */
.main-wrapper {
  flex: 1;
  margin-left: 256px;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.3s ease;
}

/* Sidebar hidden (toggled off) -> slide it off-screen and let the content
   reflow to full width, on every screen size. */
.sidebar:not(.open) ~ .main-wrapper {
  margin-left: 0;
}

/* Gradient Bar */
.gradient-bar {
  height: 8px;
  background: linear-gradient(to right, var(--primary-cyan), var(--primary-fuchsia));
}

/* Header */
.header {
  height: 64px;
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  position: sticky;
  top: 0;
  z-index: 20;
}

body.dark .header {
  background-color: var(--sidebar-dark);
  border-bottom-color: var(--border-dark);
}

.header-title {
  font-size: 20px;
  font-weight: 600;
  color: #1f2937;
  margin-left: 16px;
}

body.dark .header-title {
  color: #ffffff;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background-color: #f3f4f6;
  border: none;
  cursor: pointer;
  color: #6b7280;
  font-size: 14px;
  transition: background-color 0.2s;
}

.header-btn:hover {
  background-color: #e5e7eb;
}

body.dark .header-btn {
  background-color: #374151;
  color: #d1d5db;
}

body.dark .header-btn:hover {
  background-color: #4b5563;
}

.lang-toggle {
  display: flex;
  gap: 2px;
  padding: 2px;
  border-radius: 8px;
  background-color: #f3f4f6;
}

body.dark .lang-toggle {
  background-color: #374151;
}

.lang-btn {
  padding: 6px 10px;
  font-weight: 700;
  font-size: 12px;
  background-color: transparent;
}

.lang-btn.active {
  background-color: #ee312d;
  color: #fff;
}

body.dark .lang-btn.active {
  background-color: #ee312d;
  color: #fff;
}

/* Always visible now (not just on mobile): it's the only way to reopen the
   sidebar once its ✕ has hidden it. */
.mobile-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Profile dropdown panel (avatar/user-chip click), matching the prototype's .profile */
.profile-scrim {
  position: fixed;
  inset: 0;
  z-index: 39;
}

.profile-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 288px;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .14);
  z-index: 40;
  overflow: hidden;
}

body.dark .profile-panel {
  background: #1f2937;
  border-color: var(--border-dark);
}

.profile-head {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--border-light);
}

body.dark .profile-head {
  border-bottom-color: var(--border-dark);
}

.profile-head .av {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--primary-cyan);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex: none;
}

.profile-name {
  font-weight: 800;
  font-size: 14.5px;
  color: #1f2937;
}

body.dark .profile-name {
  color: #fff;
}

.profile-role {
  font-size: 12px;
  color: #5a5f65;
  margin-top: 2px;
}

body.dark .profile-role {
  color: #9ca3af;
}

.profile-mail {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: #5a5f65;
  padding: 11px 16px;
  background: #fafafa;
  border-bottom: 1px solid var(--border-light);
}

body.dark .profile-mail {
  background: #263041;
  color: #9ca3af;
  border-bottom-color: var(--border-dark);
}

.profile-actions {
  padding: 7px;
}

.pa-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 10px 11px;
  border-radius: 9px;
  cursor: pointer;
  font: inherit;
  color: #33383d;
  font-weight: 600;
  font-size: 13.5px;
}

.pa-item:hover {
  background: #f5f5f5;
}

body.dark .pa-item {
  color: #d1d5db;
}

body.dark .pa-item:hover {
  background: #263041;
}

.pa-item.danger {
  color: var(--primary-cyan-dark);
}

/* Notification bell (header) - NL-Info inbox preview, same dropdown language as .profile-panel above */
.bell-chip {
  cursor: pointer;
  position: relative;
}

.bell-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--primary-cyan-dark);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
}

.bell-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 340px;
  max-height: 420px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .14);
  z-index: 40;
}

body.dark .bell-panel {
  background: #1f2937;
  border-color: var(--border-dark);
}

.bell-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  font-weight: 800;
  font-size: 13.5px;
  color: #1f2937;
}

body.dark .bell-panel-head {
  border-bottom-color: var(--border-dark);
  color: #fff;
}

.bell-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 11px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-light);
}

.bell-item:last-child {
  border-bottom: none;
}

.bell-item:hover {
  background: #f5f5f5;
}

body.dark .bell-item {
  border-bottom-color: var(--border-dark);
}

body.dark .bell-item:hover {
  background: #263041;
}

.bell-item.unread {
  background: #fef3f2;
}

body.dark .bell-item.unread {
  background: rgba(239, 68, 68, .12);
}

.bell-item-title {
  font-weight: 700;
  font-size: 13px;
  color: #33383d;
  display: flex;
  align-items: center;
  gap: 6px;
}

body.dark .bell-item-title {
  color: #d1d5db;
}

.bell-item-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary-cyan-dark);
  flex: none;
}

.bell-item-message {
  font-size: 12px;
  color: #5a5f65;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

body.dark .bell-item-message {
  color: #9ca3af;
}

.bell-item-meta {
  font-size: 11px;
  color: #5a5f65;
  margin-top: 4px;
}

.bell-panel-footer {
  padding: 9px 16px;
  text-align: center;
  border-top: 1px solid var(--border-light);
}

.bell-panel-footer a {
  color: var(--primary-cyan-dark);
  font-weight: 700;
  font-size: 12.5px;
  cursor: pointer;
  text-decoration: none;
}

body.dark .bell-panel-footer {
  border-top-color: var(--border-dark);
}

.bell-empty {
  padding: 24px 16px;
  text-align: center;
  font-size: 12.5px;
  color: #5a5f65;
}

/* Change Password modal (global - not scoped to the manufacturer module) */
.modal-back {
  position: fixed;
  inset: 0;
  background: rgba(20, 22, 25, .45);
  z-index: 80;
  display: none;
}

.modal-back.open {
  display: block;
}

.modal-box {
  position: fixed;
  z-index: 81;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, 94vw);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
  padding: 22px;
  display: none;
}

.modal-box.open {
  display: block;
}

body.dark .modal-box {
  background: #1f2937;
  color: #d1d5db;
}

.modal-box h3 {
  margin: 0 0 14px;
  font-size: 16px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.modal-x {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  font-size: 20px;
  line-height: 1;
  color: #5a5f65;
  cursor: pointer;
  padding: 2px 6px;
}

.modal-x:hover {
  color: #333;
}

.modal-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
}

.modal-field label {
  font-size: 11px;
  letter-spacing: .03em;
  color: #5a5f65;
  font-weight: 800;
}

.modal-field input {
  height: 38px;
  border: 1px solid var(--border-light);
  border-radius: 9px;
  padding: 0 11px;
  font: inherit;
}

body.dark .modal-field input {
  background: #263041;
  color: #e5e7eb;
  border-color: var(--border-dark);
}

.modal-field input:focus {
  outline: none;
  border-color: var(--primary-cyan);
  box-shadow: 0 0 0 3px rgba(238, 49, 45, .15);
}

/* Main Content Area */
.main-content {
  flex: 1;
  padding: 24px;
  background-color: var(--bg-light);
}

body.dark .main-content {
  background-color: var(--bg-dark);
}

/* Cards */
.card {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 24px;
  margin-bottom: 24px;
  overflow: hidden;
}

body.dark .card {
  background-color: var(--sidebar-dark);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
}

body.dark .card-title {
  color: #ffffff;
}

/* Grid */
.grid {
  display: grid;
  gap: 24px;
}

.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Stats Cards */
.stat-card {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

body.dark .stat-card {
  background-color: var(--sidebar-dark);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.stat-icon.cyan {
  background-color: #ecfeff;
  color: var(--primary-cyan);
}

.stat-icon.green {
  background-color: #ecfdf5;
  color: #10b981;
}

.stat-icon.amber {
  background-color: #fffbeb;
  color: #f59e0b;
}

.stat-icon.red {
  background-color: #fef2f2;
  color: #ef4444;
}

/* SweetAlert theming to match limas.Hub */
.swal-theme-limas.sweet-alert,
.sweet-alert.swal-theme-limas {
    background-color: var(--sidebar-light);
    color: var(--text-light);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(16,24,40,0.2);
}

.sweet-alert.swal-theme-limas h2 {
    color: var(--primary-cyan-dark);
    font-size: 18px;
    margin-bottom: 8px;
}

.sweet-alert.swal-theme-limas p {
    color: var(--text-d);
    margin-bottom: 12px;
}

.sweet-alert.swal-theme-limas input[type="text"],
.sweet-alert.swal-theme-limas input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    background-color: #ffffff;
    color: var(--text-light);
    box-sizing: border-box;
    margin-top: 8px;
}

.sweet-alert.swal-theme-limas .sa-input-error,
.sweet-alert.swal-theme-limas .sa-error-container {
    color: #b91c1c;
}

.sweet-alert.swal-theme-limas .confirm {
    background-color: var(--primary-cyan);
    color: #ffffff;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
}

.sweet-alert.swal-theme-limas .cancel {
    background-color: transparent;
    color: var(--text-light);
    border: 1px solid var(--border-light);
    padding: 8px 12px;
    border-radius: 8px;
}

.sweet-overlay {
    background-color: rgba(2,6,23,0.6);
}

/* Dark mode overrides for SweetAlert theme */
body.dark .sweet-alert.swal-theme-limas,
body.dark .swal-theme-limas.sweet-alert {
    background-color: var(--sidebar-dark);
    color: var(--text-dark);
    box-shadow: 0 10px 30px rgba(2,6,23,0.6);
}

body.dark .sweet-alert.swal-theme-limas h2,
body.dark .swal-theme-limas.sweet-alert h2 {
    color: var(--primary-cyan);
}

body.dark .sweet-alert.swal-theme-limas p,
body.dark .swal-theme-limas.sweet-alert p {
    color: var(--text-dark);
}

body.dark .sweet-alert.swal-theme-limas input[type="text"],
body.dark .sweet-alert.swal-theme-limas input[type="password"],
body.dark .swal-theme-limas.sweet-alert input[type="text"],
body.dark .swal-theme-limas.sweet-alert input[type="password"] {
    background-color: #0f1724;
    border: 1px solid rgba(255,255,255,0.06);
    color: var(--text-dark);
}

body.dark .sweet-alert.swal-theme-limas .confirm,
body.dark .swal-theme-limas.sweet-alert .confirm {
    background-color: var(--primary-cyan-dark);
    color: #ffffff;
}

body.dark .sweet-alert.swal-theme-limas .cancel,
body.dark .swal-theme-limas.sweet-alert .cancel {
    background-color: transparent;
    color: var(--text-dark);
    border: 1px solid rgba(255,255,255,0.06);
}

.stat-icon.purple {
  background-color: #faf5ff;
  color: #a855f7;
}

body.dark .stat-icon.cyan {
  background-color: rgba(6, 182, 212, 0.1);
}

body.dark .stat-icon.green {
  background-color: rgba(16, 185, 129, 0.1);
}

body.dark .stat-icon.amber {
  background-color: rgba(245, 158, 11, 0.1);
}

body.dark .stat-icon.red {
  background-color: rgba(239, 68, 68, 0.1);
}

body.dark .stat-icon.purple {
  background-color: rgba(168, 85, 247, 0.1);
}   

body.dark .stat-value {
  color: #ffffff;
}

.stat-label {
  font-size: 14px;
  color: #6b7280;
}

body.dark .stat-label {
  color: #9ca3af;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

.btn-primary {
  background-color: var(--primary-cyan);
  color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--primary-cyan-dark);
}

.btn-primary:disabled {
  background-color: #9ca3af;
  color: #f3f4f6;
}

.btn-secondary {
  background-color: rgb(22 163 74)!important;
  color: #ffffff;
}

body.dark .btn-secondary {
  background-color: rgb(22 163 74);
  color: #ffffff;
}

.btn-secondary:hover {
  background-color: #e5e7eb;
}

body.dark .btn-secondary:hover {
  background-color: rgb(21 128 61);
}

/* Tables */
.table-container {
  overflow-x: auto;
  width: 100%;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

body.dark th,
body.dark td {
  border-bottom-color: var(--border-dark);
}

th {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: #6b7280;
  background-color: #f9fafb;
}

body.dark th {
  background-color: #374151;
  color: #9ca3af;
}

td {
  font-size: 14px;
  color: #374151;
}

body.dark td {
  color: #d1d5db;
}

tr:hover {
  background-color: #f9fafb;
}

body.dark tr:hover {
  background-color: #374151;
}

/* Log Detail View */
.detail-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}

.detail-item {
  display: flex;
  gap: 8px;
}

.detail-key {
  font-weight: 600;
  color: #6b7280; /* Using a secondary text color */
  flex-shrink: 0;
}

body.dark .detail-key {
  color: #9ca3af; /* Lighter secondary color for dark mode */
}

.detail-value {
  font-family: monospace;
  word-break: break-all;
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
}

.badge-success {
  background-color: #d1fae5;
  color: #065f46;
}

body.dark .badge-success {
  background-color: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.badge-warning {
  background-color: #fef3c7;
  color: #92400e;
}

body.dark .badge-warning {
  background-color: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.badge-danger {
  background-color: #fee2e2;
  color: #991b1b;
}

body.dark .badge-danger {
  background-color: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.badge-info {
  background-color: #e0f2fe;
  color: #075985;
}

body.dark .badge-info {
  background-color: rgba(14, 165, 233, 0.2);
  color: #38bdf8;
}

/* Form Elements */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
}

body.dark .form-label {
  color: #d1d5db;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  font-size: 14px;
  background-color: #ffffff;
  color: #374151;
  transition: border-color 0.2s, box-shadow 0.2s;
}

body.dark .form-input {
  background-color: #374151;
  border-color: #4b5563;
  color: #d1d5db;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-cyan);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

/* Progress Bar */
.progress-bar {
  height: 8px;
  background-color: #e5e7eb;
  border-radius: 9999px;
  overflow: hidden;
}

body.dark .progress-bar {
  background-color: #374151;
}

.progress-fill {
  height: 100%;
  background-color: var(--primary-cyan);
  border-radius: 9999px;
  transition: width 0.3s ease;
}

/* Tabs */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 24px;
}

body.dark .tabs {
  border-bottom-color: var(--border-dark);
}

.tab {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
  background: transparent;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.2s;
}

.tab:hover {
  color: #374151;
}

body.dark .tab:hover {
  color: #d1d5db;
}

.tab.active {
  color: var(--primary-cyan);
  border-bottom-color: var(--primary-cyan);
}

/* Avatar */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  background-color: var(--primary-cyan);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
}

.avatar-lg {
  width: 80px;
  height: 80px;
  font-size: 28px;
}

/* Icons (using inline SVG or font) */
.icon {
  width: 20px;
  height: 20px;
  display: inline-block;
}

/* Overlay */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(17, 24, 39, 0.5);
  z-index: 20;
}

.overlay.active {
  display: block;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.3s ease;
}

/* Login Page */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  padding: 20px;
}

.login-card {
  background-color: #ffffff;
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

body.dark .login-card {
  background-color: var(--sidebar-dark);
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo h1 {
  font-size: 24px;
  font-weight: bold;
  color: #1f2937;
  margin-bottom: 8px;
}

body.dark .login-logo h1 {
  color: #ffffff;
}

.login-logo p {
  color: #6b7280;
  font-size: 14px;
}

/* Mission Cards */
.mission-card {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border-left: 4px solid var(--primary-cyan);
  transition: transform 0.2s, box-shadow 0.2s;
}

body.dark .mission-card {
  background-color: var(--sidebar-dark);
}

.mission-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mission-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.mission-id {
  font-weight: 600;
  color: #1f2937;
}

body.dark .mission-id {
  color: #ffffff;
}

.mission-status-indicators {
  display: flex;
  gap: 8px;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.status-dot.green {
  background-color: #10b981;
}

.status-dot.red {
  background-color: #ef4444;
}

.status-dot.amber {
  background-color: #f59e0b;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right !important; }
.flex-1 { flex: 1 !important; }
.ml-4 { margin-left: 1rem !important; }
.mr-4 { margin-right: 1rem !important; }
.w-8 { width: 2rem !important; }
.h-8 { height: 2rem !important; }
.w-10 { width: 2.5rem !important; }
.h-10 { height: 2.5rem !important; }
.gap-4 { gap: 1rem !important; }
.justify-end { justify-content: flex-end !important; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.p-4 { padding: 16px; }
.p-6 { padding: 24px; }
.hidden { display: none; }
.w-full { width: 100%; }

/* ========================================
   Login Page - Matching React Design
   ======================================== */
.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: row;
    background-color: #f3f4f6;
    color: #1f2937;
    position: relative;
    overflow: hidden;
    transition: background-color 0.3s, color 0.3s;
}

body.dark .login-page {
    background-color: #111827;
    color: white;
}

.login-theme-toggle {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 20;
}

/* Background Elements */
.login-background {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.grid-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.05;
    background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjAiIGhlaWdodD0iNjAiIHZpZXdCb3g9IjAgMCA2MCA2MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxnIGZpbGw9IiNmZmZmZmYiIGZpbGwtb3BhY2l0eT0iMC40Ij48cGF0aCBkPSJNMjkgNTlhMSAxIDAgMSAxIDIgMCAxIDEgMCAwIDEtMiAwem0wLTRhMSAxIDAgMSAxIDIgMCAxIDEgMCAwIDEtMiAwem0wLTRhMSAxIDAgMSAxIDIgMCAxIDEgMCAwIDEtMiAwem0wLTRhMSAxIDAgMSAxIDIgMCAxIDEgMCAwIDEtMiAwem0wLTRhMSAxIDAgMSAxIDIgMCAxIDEgMCAwIDEtMiAwem0wLTRhMSAxIDAgMSAxIDIgMCAxIDEgMCAwIDEtMiAwem0wLTRhMSAxIDAgMSAxIDIgMCAxIDEgMCAwIDEtMiAwem0wLTRhMSAxIDAgMSAxIDIgMCAxIDEgMCAwIDEtMiAwem0wLTRhMSAxIDAgMSAxIDIgMCAxIDEgMCAwIDEtMiAwem0wLTRhMSAxIDAgMSAxIDIgMCAxIDEgMCAwIDEtMiAwem0wLTRhMSAxIDAgMSAxIDIgMCAxIDEgMCAwIDEtMiAwem0wLTRhMSAxIDAgMSAxIDIgMCAxIDEgMCAwIDEtMiAwem0wLTRhMSAxIDAgMSAxIDIgMCAxIDEgMCAwIDEtMiAwem0wLTRhMSAxIDAgMSAxIDIgMCAxIDEgMCAwIDEtMiAwem0wLTRhMSAxIDAgMSAxIDIgMCAxIDEgMCAwIDEtMiAwem0yLTRhMSAxIDAgMSAwIDAgMiAxIDEgMCAwIDAgMC0yem00IDBhMSAxIDAgMSAwIDAgMiAxIDEgMCAwIDAgMC0yem00IDBhMSAxIDAgMSAwIDAgMiAxIDEgMCAwIDAgMC0yem00IDBhMSAxIDAgMSAwIDAgMiAxIDEgMCAwIDAgMC0yem00IDBhMSAxIDAgMSAwIDAgMiAxIDEgMCAwIDAgMC0yem00IDBhMSAxIDAgMSAwIDAgMiAxIDEgMCAwIDAgMC0yem00IDBhMSAxIDAgMSAwIDAgMiAxIDEgMCAwIDAgMC0yem00IDBhMSAxIDAgMSAwIDAgMiAxIDEgMCAwIDAgMC0yeiIvPjwvZz48L2c+PC9zdmc+");
    transition: opacity 0.3s;
}

body.dark .grid-pattern {
    opacity: 0.1;
}

.gradient-circle {
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    filter: blur(64px);
    opacity: 0.1;
    transition: opacity 0.3s;
}

body.dark .gradient-circle {
    opacity: 0.2;
}

.gradient-cyan {
    top: -160px;
    right: -160px;
    background-color: #ee312d;
}

.gradient-fuchsia {
    bottom: -160px;
    left: -160px;
    background-color: #b8b8b8;
}

.circuit-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    transition: opacity 0.3s;
}

body.dark .circuit-lines {
    opacity: 0.2;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: background-color 0.3s;
}

body.dark .loading-overlay {
    background: rgba(0, 0, 0, 0.5);
}

.loading-spinner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.loading-spinner {
    width: 56px;
    height: 56px;
    position: relative;
}

.loading-spinner::before,
.loading-spinner::after {
    content: '';
    position: absolute;
    border-radius: 50%;
}

.loading-spinner::before {
    inset: 0;
    border: 4px solid rgba(0, 0, 0, 0.1);
}

body.dark .loading-spinner::before {
    border: 4px solid rgba(255, 255, 255, 0.1);
}

.loading-spinner::after {
    inset: 0;
    border: 4px solid transparent;
    border-top-color: #06b6d4;
    border-right-color: #d946ef;
    animation: spin 0.8s linear infinite;
}

.loading-text {
    color: #1f2937;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: color 0.3s;
}

body.dark .loading-text {
    color: #ffffff;
}

.loading-dots::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* Left Side - Branding */
.login-branding {
    display: none;
    width: 50%;
    padding: 48px;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
}

.branding-content {
    max-width: 448px;
}

.brand-logo {
    display: flex;
    align-items: center;
    margin-bottom: 32px;
}

/* Login branding shows the PHARMA PRIVAT logo image (2026-09-03), reusing the
   sidebar's .limas-logo-img; only the size differs from the 42px sidebar. */
.login-logo-img {
    height: 64px;
}

.login-logo-img.mobile {
    height: 48px;
}

.brand-title {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 24px;
    color: #111827;
    line-height: 1.2;
    transition: color 0.3s;
}

body.dark .brand-title {
    color: white;
}

.brand-description {
    color: #4b5563;
    font-size: 18px;
    margin-bottom: 32px;
    line-height: 1.6;
    transition: color 0.3s;
}

body.dark .brand-description {
    color: #d1d5db;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature-item {
    display: flex;
    align-items: center;
}

.feature-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff3f2;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    color: #cf2622;
    transition: all 0.3s;
}

body.dark .feature-icon {
    background: rgba(238, 49, 45, 0.2);
    color: #ff6b66;
}

.feature-item p {
    color: #4b5563;
    margin: 0;
    transition: color 0.3s;
}

body.dark .feature-item p {
    color: #d1d5db;
}

/* Right Side - Form */
.login-form-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px;
    position: relative;
    z-index: 10;
}

.mobile-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
}


/* Login Card - Override for login page */
.login-page .login-card {
    width: 100%;
    max-width: 448px;
    background: #ffffff;
    backdrop-filter: none;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid #e5e7eb;
    transition: all 0.3s;
}

body.dark .login-page .login-card {
    background: rgba(31, 41, 55, 0.5);
    backdrop-filter: blur(8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid #374151;
}

.login-page .login-card h2 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #111827;
    transition: color 0.3s;
}

body.dark .login-page .login-card h2 {
    color: white;
}

.login-subtitle {
    color: #6b7280;
    margin-bottom: 24px;
    transition: color 0.3s;
}

body.dark .login-subtitle {
    color: #9ca3af;
}

/* Alert - Login page specific */
.login-page .alert {
    display: flex;
    align-items: flex-start;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 14px;
    transition: all 0.3s;
}

.login-page .alert svg {
    flex-shrink: 0;
    margin-right: 8px;
    margin-top: 2px;
}

.login-page .alert-danger {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

body.dark .login-page .alert-danger {
    background: rgba(127, 29, 29, 0.2);
    color: #f87171;
    border: 1px solid #7f1d1d;
}

/* Form - Login page specific */
.login-page .form-group {
    margin-bottom: 16px;
}

.login-page .form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 4px;
    transition: color 0.3s;
}

body.dark .login-page .form-group label {
    color: #d1d5db;
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.test-credentials-link {
    font-size: 14px;
    font-weight: 500;
    color: #cf2622;
    text-decoration: none;
    transition: color 0.3s;
}

body.dark .test-credentials-link {
    color: #ff6b66;
}

.test-credentials-link:hover {
    color: #ee312d;
}

.input-with-icon {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
    transition: color 0.3s;
}

body.dark .input-icon {
    color: #6b7280;
}

.input-with-icon input {
    width: 100%;
    padding: 12px 12px 12px 44px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    color: #111827;
    font-size: 14px;
    transition: all 0.2s;
}

body.dark .input-with-icon input {
    background: rgba(55, 65, 81, 0.5);
    border: 1px solid #4b5563;
    color: white;
}

.input-with-icon input::placeholder {
    color: #9ca3af;
}

.input-with-icon input:focus {
    outline: none;
    border-color: #ee312d;
    box-shadow: 0 0 0 2px rgba(238, 49, 45, 0.15);
}

body.dark .input-with-icon input:focus {
    box-shadow: 0 0 0 2px rgba(238, 49, 45, 0.25);
}

/* Test Credentials Box */
.test-credentials-box {
    display: flex;
    align-items: flex-start;
    padding: 16px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    margin-bottom: 16px;
    color: #1e40af;
    font-size: 14px;
    transition: all 0.3s;
}

body.dark .test-credentials-box {
    background: rgba(30, 58, 138, 0.2);
    border: 1px solid #1e3a8a;
    color: #93c5fd;
}

.test-credentials-box svg {
    flex-shrink: 0;
    margin-right: 8px;
    margin-top: 2px;
}

.test-credentials-content {
    flex: 1;
}

.test-title {
    font-weight: 500;
    margin-bottom: 4px;
}

.test-credentials-content p {
    margin: 0;
}

.test-buttons {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.test-buttons button {
    font-size: 12px;
    background: #3b82f6;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
}

body.dark .test-buttons button {
    background: #1e40af;
}

.test-buttons button:hover {
    background: #2563eb;
}

body.dark .test-buttons button:hover {
    background: #1d4ed8;
}

/* Remember Me */
.remember-me {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}

.remember-me input {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    accent-color: #ee312d;
}

.remember-me label {
    font-size: 14px;
    color: #4b5563;
    cursor: pointer;
    transition: color 0.3s;
}

body.dark .remember-me label {
    color: #d1d5db;
}

/* Sign In Button */
.btn-signin {
    width: 100%;
    padding: 12px 16px;
    background: #ee312d;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-signin:hover:not(:disabled) {
    background: #cf2622;
}

.btn-signin:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-loading {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-loading .spinner {
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

/* ========================================
   Mission Control - MVP Demo
   ======================================== */

.mission-control-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
}

/* Status Panel */
.status-panel {
    display: flex;
    gap: 24px;
    padding: 16px 24px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

body.dark .status-panel {
    background: #1f2937;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-label {
    font-size: 14px;
    color: #6b7280;
}

.status-value {
    font-weight: 600;
    color: #111827;
}

body.dark .status-value {
    color: #f9fafb;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success {
    background: #dcfce7;
    color: #16a34a;
}

.badge-danger {
    background: #fee2e2;
    color: #dc2626;
}

.badge-warning {
    background: #fef3c7;
    color: #d97706;
}

.badge-info {
    background: #e0f2fe;
    color: #0284c7;
}

body.dark .badge-success { background: #166534; color: #86efac; }
body.dark .badge-danger { background: #991b1b; color: #fca5a5; }
body.dark .badge-warning { background: #92400e; color: #fcd34d; }
body.dark .badge-info { background: #075985; color: #7dd3fc; }

/* Battery Indicator */
.battery-indicator {
    width: 50px;
    height: 20px;
    border: 2px solid #6b7280;
    border-radius: 4px;
    padding: 2px;
    position: relative;
}

.battery-indicator::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 10px;
    background: #6b7280;
    border-radius: 0 2px 2px 0;
}

.battery-level {
    height: 100%;
    background: #22c55e;
    border-radius: 2px;
    transition: width 0.3s;
}

.battery-level.low {
    background: #ef4444;
}

.battery-level.medium {
    background: #f59e0b;
}

.battery-text {
    font-weight: 600;
    font-size: 14px;
    color: #111827;
}

body.dark .battery-text {
    color: #f9fafb;
}

/* Mission Grid */
.mission-grid {
    display: grid;
    grid-template-columns: 280px 1fr 280px;
    gap: 20px;
    flex: 1;
}

/* Panel Styles */
.positions-panel,
.center-panel,
.control-panel {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

body.dark .positions-panel,
body.dark .center-panel,
body.dark .control-panel {
    background: #1f2937;
}

.panel-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #111827;
}

body.dark .panel-title {
    color: #f9fafb;
}

/* Positions List */
.positions-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.position-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #f3f4f6;
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

body.dark .position-btn {
    background: #374151;
}

.position-btn:hover:not(:disabled) {
    border-color: #06b6d4;
    background: #ecfeff;
}

body.dark .position-btn:hover:not(:disabled) {
    background: #164e63;
}

.position-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.position-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #06b6d4, #8b5cf6);
    color: white;
    font-weight: 700;
    border-radius: 8px;
}

.position-name {
    flex: 1;
    font-weight: 500;
    color: #111827;
}

body.dark .position-name {
    color: #f9fafb;
}

.position-status {
    color: #06b6d4;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Center Panel States */
.progress-panel,
.idle-panel,
.arrived-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
}

.target-info {
    font-size: 18px;
    margin-bottom: 20px;
    color: #6b7280;
}

.target-info strong {
    color: #06b6d4;
    margin-left: 8px;
}

.progress-bar-large {
    width: 100%;
    max-width: 400px;
    height: 24px;
    background: #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
}

body.dark .progress-bar-large {
    background: #374151;
}

.progress-bar-large .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #06b6d4, #8b5cf6);
    border-radius: 12px;
    transition: width 0.3s;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 400px;
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 20px;
}

.idle-panel,
.arrived-panel {
    color: #6b7280;
}

.idle-icon,
.arrived-icon {
    margin-bottom: 16px;
    opacity: 0.5;
}

.arrived-icon {
    opacity: 1;
}

.idle-panel p,
.arrived-panel p {
    font-size: 16px;
}

/* Control Panel */
.joystick-area {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.joystick-placeholder {
    width: 150px;
    height: 150px;
    border: 2px dashed #9ca3af;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
}

.joystick-placeholder p {
    margin-top: 8px;
    font-weight: 500;
}

.joystick-placeholder small {
    font-size: 11px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 12px;
}

.btn-action {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-pick {
    background: #dcfce7;
    color: #16a34a;
}

.btn-pick:hover:not(:disabled) {
    background: #16a34a;
    color: white;
}

.btn-drop {
    background: #fee2e2;
    color: #dc2626;
}

.btn-drop:hover:not(:disabled) {
    background: #dc2626;
    color: white;
}

.btn-action:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

body.dark .btn-pick {
    background: #166534;
    color: #86efac;
}

body.dark .btn-drop {
    background: #991b1b;
    color: #fca5a5;
}

/* Robot Selector */
.robot-selector {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.robot-card {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: white;
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

body.dark .robot-card {
    background: #1f2937;
}

.robot-card:hover {
    border-color: #06b6d4;
}

.robot-card.selected {
    border-color: #06b6d4;
    background: #ecfeff;
}

body.dark .robot-card.selected {
    background: #164e63;
}

.robot-card.offline {
    opacity: 0.6;
}

.robot-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #06b6d4, #8b5cf6);
    border-radius: 10px;
    color: white;
}

.robot-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.robot-name {
    font-weight: 600;
    color: #111827;
}

body.dark .robot-name {
    color: #f9fafb;
}

.robot-id {
    font-size: 12px;
    color: #6b7280;
}

.robot-status-icon {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.robot-status-icon.online {
    background: #22c55e;
    box-shadow: 0 0 8px #22c55e;
}

.robot-status-icon.offline {
    background: #ef4444;
}

/* Disconnected Panel */
.disconnected-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: #6b7280;
}

.disconnected-icon {
    margin-bottom: 16px;
    opacity: 0.8;
}

.disconnected-panel p {
    font-size: 18px;
}

/* Custom styles for WebRTC Joystick and Input Mode Selector */
.joystick-body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 250px; /* Adjust height to match typical D-pad area */
    /* margin-bottom: 24px; */
    position: relative; /* For nipplejs absolute positioning */
}

.joystick-zone-container {
    width: 200px; /* Desired size for the joystick area */
    height: 200px;
    position: relative; /* Important for nipplejs to render correctly */
    border: 1px solid var(--border-light); /* Subtle border for visibility */
    border-radius: 50%; /* Make it round */
    background: rgba(0,0,0,0.1);
    box-shadow: inset 0 0 10px rgba(0,0,0,0.3);
}

body.dark .joystick-zone-container {
  border-color: var(--border-dark);
}

/* Adjust nipplejs internal elements */
.nipple.static {
    background: rgba(6, 182, 212, 0.5) !important; /* Example color */
}
.nipple.static > .front {
    background: var(--primary-cyan) !important;
}

/* For the webRTCStatusBadge */
.webrtc-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    margin-left: 10px;
    text-transform: uppercase;
}

.webrtc-status-badge.connected {
    background-color: #d1fae5; /* green-100 */
    color: #16a34a; /* green-700 */
}

body.dark .webrtc-status-badge.connected {
    background-color: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.webrtc-status-badge.connecting {
    background-color: #fffbeb; /* amber-100 */
    color: #d97706; /* amber-700 */
}

body.dark .webrtc-status-badge.connecting {
    background-color: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.webrtc-status-badge.disconnected {
    background-color: #fee2e2; /* red-100 */
    color: #dc2626; /* red-700 */
}

body.dark .webrtc-status-badge.disconnected {
    background-color: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.webrtc-status-badge svg {
    margin-right: 4px;
}

/* For input mode buttons */
.btn-group {
  display: inline-flex;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-light);
}

.dark .btn-group {
  border-color: var(--border-dark);
}

.btn-group .btn {
  border-radius: 0;
  padding: 8px 12px;
  background-color: transparent;
}

.btn-group .btn.btn-primary {
  background-color: var(--primary-cyan);
  color: #ffffff;
}

.btn-group .btn.btn-primary:hover {
  background-color: var(--primary-cyan-dark);
}

body.dark .btn-group .btn.btn-primary {
  background-color: var(--primary-cyan-dark);
  color: #ffffff;
}
body.dark .btn-group .btn.btn-primary:hover {
  background-color: var(--primary-cyan);
}

.btn-group .btn:not(:last-child) {
  border-right: 1px solid var(--border-light);
}
body.dark .btn-group .btn:not(:last-child) {
  border-right-color: var(--border-dark);
}

.mode-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light);
  margin-right: 8px;
}
body.dark .mode-label {
  color: var(--text-dark);
}

/* Joystick Info */
body.dark .joystick-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    font-size: 12px;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}
.joystick-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(151, 151, 151, 0.1);
    border-radius: 8px;
    font-size: 12px;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.disconnected-panel small {
    font-size: 14px;
}

.joystick-placeholder.disabled {
    opacity: 0.4;
}

/* ========================================
   Toast Notifications
   ======================================== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 320px;
    max-width: 420px;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2), 0 4px 12px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(8px);
    pointer-events: auto;
    animation: toastSlideIn 0.4s cubic-bezier(0.21, 1.02, 0.73, 1) forwards;
    transform: translateX(120%);
    opacity: 0;
}

.toast.hiding {
    animation: toastSlideOut 0.3s cubic-bezier(0.21, 1.02, 0.73, 1) forwards;
}

@keyframes toastSlideIn {
    0% {
        transform: translateX(120%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(120%);
        opacity: 0;
    }
}

.toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.toast-message {
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}

.toast-close {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.2s;
    margin: -4px -8px -4px 0;
}

.toast-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    border-radius: 0 0 12px 12px;
    animation: toastProgress linear forwards;
}

@keyframes toastProgress {
    from { width: 100%; }
    to { width: 0%; }
}

/* Toast Success */
.toast-success {
    background: linear-gradient(135deg, #059669, #10b981);
    color: white;
}

.toast-success .toast-icon {
    background: rgba(255, 255, 255, 0.2);
}

.toast-success .toast-progress {
    background: rgba(255, 255, 255, 0.4);
}

.toast-success .toast-close {
    color: white;
}

/* Toast Error */
.toast-error {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: white;
}

.toast-error .toast-icon {
    background: rgba(255, 255, 255, 0.2);
}

.toast-error .toast-progress {
    background: rgba(255, 255, 255, 0.4);
}

.toast-error .toast-close {
    color: white;
}

/* Toast Warning */
.toast-warning {
    background: linear-gradient(135deg, #d97706, #f59e0b);
    color: white;
}

.toast-warning .toast-icon {
    background: rgba(255, 255, 255, 0.2);
}

.toast-warning .toast-progress {
    background: rgba(255, 255, 255, 0.4);
}

.toast-warning .toast-close {
    color: white;
}

/* Toast Info */
.toast-info {
    background: linear-gradient(135deg, #0891b2, #06b6d4);
    color: white;
}

.toast-info .toast-icon {
    background: rgba(255, 255, 255, 0.2);
}

.toast-info .toast-progress {
    background: rgba(255, 255, 255, 0.4);
}

.toast-info .toast-close {
    color: white;
}

/* Dark mode adjustments */
body.dark .toast {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ========================================
   Mission Control - Enhanced Styles
   ======================================== */

/* Component Status Grid */
.component-status-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.component-card {
    background: white;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

body.dark .component-card {
    background: #1f2937;
}

.component-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.component-name {
    font-weight: 600;
    font-size: 14px;
    color: #111827;
}

body.dark .component-name {
    color: #f9fafb;
}

.component-body {
    color: #6b7280;
    font-size: 13px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.status-dot.online {
    background: #22c55e;
    box-shadow: 0 0 8px #22c55e;
}

.status-dot.offline {
    background: #ef4444;
}

/* Panel Tabs */
.panel-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    background: #f3f4f6;
    border-radius: 8px;
    padding: 4px;
}

body.dark .panel-tabs {
    background: #374151;
}

.panel-tab {
    flex: 1;
    padding: 8px 12px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
}

.panel-tab:hover {
    color: #111827;
}

body.dark .panel-tab:hover {
    color: #f9fafb;
}

.panel-tab.active {
    background: white;
    color: #06b6d4;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

body.dark .panel-tab.active {
    background: #1f2937;
}

/* Section Title */
.section-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #6b7280;
    margin-bottom: 12px;
    margin-top: 16px;
}

.section-title:first-child {
    margin-top: 0;
}

/* Lift Control */
.lift-control {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lift-position {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #06b6d4;
    padding: 12px;
    background: rgba(6, 182, 212, 0.1);
    border-radius: 8px;
}

.lift-buttons {
    display: flex;
    gap: 8px;
}

.lift-buttons .btn {
    flex: 1;
    font-size: 12px;
    padding: 8px;
}

.lift-custom {
    display: flex;
    gap: 8px;
}

.lift-custom .form-input {
    flex: 1;
}

/* Joystick Container */
.joystick-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.joystick-area {
    width: 120px;
    height: 120px;
    background: #f3f4f6;
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    touch-action: none;
    user-select: none;
}

body.dark .joystick-area {
    background: #374151;
}

.joystick-area.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.joystick-track {
    position: absolute;
    inset: 10px;
    border: 2px dashed #9ca3af;
    border-radius: 50%;
}

.joystick-knob {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    background: linear-gradient(135deg, #06b6d4, #8b5cf6);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.4);
    transition: transform 0.05s;
}

.joystick-values {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #6b7280;
    font-family: monospace;
}

/* Camera Feed */
.camera-feed {
    margin-top: 20px;
}

.camera-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: #f3f4f6;
    border-radius: 12px;
    color: #6b7280;
}

body.dark .camera-placeholder {
    background: #374151;
}

.camera-placeholder p {
    margin-top: 12px;
    font-weight: 500;
}

.camera-placeholder small {
    font-size: 12px;
}

/* Task Info */
.task-info {
    margin-top: 20px;
}

.task-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f3f4f6;
    border-radius: 8px;
}

body.dark .task-card {
    background: #374151;
}

.task-id {
    font-family: monospace;
    font-size: 12px;
    color: #6b7280;
}

/* Spin animation */
.spin {
    animation: spin 1s linear infinite;
}

/* Button sizes */
.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}
.btn-sm:disabled {
    cursor: not-allowed;
}
.btn-xs {
    padding: 4px 8px;
    font-size: 11px;
}

/* ========================================
   Mission Control - Enhanced 4-Column Layout
   ======================================== */

/* 4-Column Grid */
.mission-grid-4col {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

/* Control Card */
.control-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

body.dark .control-card {
    background: #1f2937;
}

/* Stop Button */
.stop-btn {
    background: #dc2626 !important;
    color: white !important;
    font-weight: 700;
    padding: 8px 16px;
}

.stop-btn:hover {
    background: #b91c1c !important;
}

/* D-Pad Container */
.dpad-container {
    display: grid;
    grid-template-columns: 60px 60px 60px;
    grid-template-rows: 60px 60px 60px;
    gap: 4px;
    justify-content: center;
    margin-bottom: 16px;
}

.dpad-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    color: #374151;
}

body.dark .dpad-btn {
    background: #374151;
    color: #d1d5db;
}

.dpad-btn:hover:not(:disabled) {
    background: #06b6d4;
    color: white;
}

.dpad-btn:active:not(:disabled) {
    transform: scale(0.95);
    background: #0891b2;
}

.dpad-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.dpad-up { grid-column: 2; grid-row: 1; }
.dpad-left { grid-column: 1; grid-row: 2; }
.dpad-right { grid-column: 3; grid-row: 2; }
.dpad-down { grid-column: 2; grid-row: 3; }

body.dark .dpad-center {
    background: #4b5563;
}

/* Turn Controls */
.turn-controls {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.turn-controls .btn {
    flex: 1;
    font-size: 12px;
    padding: 10px 8px;
}

/* Speed Control */
.speed-control {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.speed-control label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

body.dark .speed-control label {
    color: #d1d5db;
}

/* Control Group */
.control-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
}

body.dark .control-group {
    border-bottom-color: #374151;
}

.control-group:last-child {
    border-bottom: none;
}

.control-label {
    font-weight: 500;
    font-size: 14px;
    color: #374151;
}

body.dark .control-label {
    color: #d1d5db;
}

.control-buttons {
    display: flex;
    gap: 8px;
}

.control-buttons .btn {
    min-width: 50px;
    padding: 8px 12px;
    font-size: 13px;
}

/* Section Buttons */
.section-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.section-buttons .btn {
    padding: 6px 10px;
    font-size: 11px;
}

/* Job Buttons */
.job-buttons {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.job-buttons .btn {
    flex: 1;
    font-size: 12px;
    padding: 10px 8px;
}

/* Lift Quick Control */
.lift-quick-control {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

body.dark .lift-quick-control {
    border-top-color: #374151;
}

.lift-inline {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-bottom: 8px;
}
.lift-status {
    display: flex;
    justify-content: space-between;
}

/* Position Management Section Styles */
.position-management-container {
    width: 100%;
    overflow: visible;
}

.pos-count {
    font-size: 10px;
    font-weight: 400;
    color: #64748b;
    margin-left: 4px;
}

.btn-add-pos {
    float: right;
    font-size: 10px !important;
    padding: 2px 8px !important;
    height: 22px;
    background-color: var(--primary-cyan) !important;
    color: white !important;
}

.pos-action-bar {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.pos-dropdown-select {
    flex: 1;
    height: 32px;
    background: #ffffff;
    border: 1px solid var(--border-light);
    color: var(--text-light);
    border-radius: 4px;
    padding: 0 8px;
    font-size: 12px;
}

body.dark .pos-dropdown-select {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

.btn-nav-go { padding: 5px 12px !important; font-size: 11px !important; height: 32px; }
.btn-nav-edit, .btn-nav-del, .btn-nav-cancel { padding: 5px 8px !important; font-size: 9px !important; height: 32px; }

.pos-form-popup {
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

body.dark .pos-form-popup {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.form-group-sm { margin-bottom: 8px; }
.form-group-sm label { display: block; font-size: 10px; font-weight: 600; color: #64748b; margin-bottom: 4px; }
.form-group-sm input, .form-group-sm textarea {
    width: 100%;
    background: #ffffff;
    border: 1px solid var(--border-light);
    color: var(--text-light);
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 6px;
}

body.dark .form-group-sm input, body.dark .form-group-sm textarea {
    background: #0f172a;
    border-color: #334155;
    color: #fff;
}

.pos-form-actions { display: flex; gap: 6px; margin-top: 10px; }

.charging-section-mini {
    border-top: 1px solid var(--border-light);
    padding-top: 15px;
    margin-top: 15px;
}

body.dark .charging-section-mini {
    border-top-color: #334155;
}

.mini-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

body.dark .mini-title {
    color: #94a3b8;
}

.btn-refresh-mini { font-size: 9px !important; padding: 2px 8px !important; height: 22px; }

.charging-scroll-area {
    max-height: 150px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.charging-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: #f3f4f6;
    border-radius: 6px;
    font-size: 12px;
}

body.dark .charging-item-row {
    background: rgba(15, 23, 42, 0.6);
}

.station-name {
    font-weight: 500;
    color: var(--text-light);
}

body.dark .station-name {
    color: #e2e8f0;
}

.empty-text { text-align: center; color: #94a3b8; padding: 15px; font-size: 12px; font-style: italic; }

.text-success {
    color: #16a34a;
}

/* Quick Actions Grid */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.btn-action-lg {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px 8px;
    background: #f3f4f6;
    border: none;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
}

body.dark .btn-action-lg {
    background: #374151;
    color: #d1d5db;
}

.btn-action-lg:hover:not(:disabled) {
    background: #06b6d4;
    color: white;
}

.btn-action-lg:hover:not(:disabled) svg {
    color: white;
}

.btn-action-lg:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-action-lg svg {
    color: #06b6d4;
    transition: color 0.2s;
}

/* Camera Section */
.camera-section {
    margin-top: 20px;
}

.camera-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.camera-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

body.dark .camera-card {
    background: #1f2937;
}

.camera-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 600;
    font-size: 14px;
}

body.dark .camera-header {
    background: #111827;
    border-bottom-color: #374151;
}

.camera-view {
    height: 200px;
    background: #1f2937;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.camera-view img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera-placeholder-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #6b7280;
}

.camera-info {
    padding: 12px 16px;
    font-size: 13px;
    color: #6b7280;
    font-family: monospace;
    background: #f9fafb;
}

body.dark .camera-info {
    background: #111827;
}

/* Navigation Overlay */
.navigation-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.navigation-modal {
    background: white;
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    max-width: 400px;
    width: 90%;
}

body.dark .navigation-modal {
    background: #1f2937;
}

.navigation-modal h3 {
    font-size: 20px;
    margin-bottom: 16px;
    color: #111827;
}

body.dark .navigation-modal h3 {
    color: #f9fafb;
}

.navigation-modal p {
    color: #6b7280;
    margin-bottom: 20px;
}

.progress-text {
    font-size: 24px;
    font-weight: 700;
    color: #06b6d4;
    margin-bottom: 20px;
}
.btn-success {
    background: #16a34a;
    color: white;
}
.center-text {
    justify-content: center;
}
.btn-success:hover {
    background: #16a34a;
}
/* Button Danger */
.btn-danger {
    background: #dc2626;
    color: white;
}

.btn-danger:hover {
    background: #b91c1c;
}

/* ========================================
   Modal Dialog
   ======================================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease;
}

.modal-container {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalSlideIn 0.3s ease;
}

body.dark .modal-container {
    background: #1f2937;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

body.dark .modal-header {
    border-bottom-color: #374151;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

body.dark .modal-title {
    color: #f9fafb;
}

.modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #111827;
}

body.dark .modal-close:hover {
    background: #374151;
    color: #f9fafb;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(90vh - 160px);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

body.dark .modal-footer {
    border-top-color: #374151;
    background: #111827;
}

/* Form Rows */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Required field indicator */
.required {
    color: #dc2626;
    font-weight: 500;
}

/* Textarea styling */
textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

/* Disabled input */
.form-input:disabled {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

body.dark .form-input:disabled {
    background: #1f2937;
    color: #6b7280;
}

/* ========================================
   Action Buttons
   ======================================== */

.action-buttons-inline {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 6px;
}

.btn-warning {
    background: #f59e0b;
    color: white;
}

.btn-warning:hover {
    background: #d97706;
}

body.dark .btn-warning {
    background: #b45309;
}

body.dark .btn-warning:hover {
    background: #92400e;
}
.btn-warning:disabled {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
}
/* ========================================
   Role Radio Buttons
   ======================================== */

.role-radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.role-radio {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

body.dark .role-radio {
    background: #374151;
    border-color: #4b5563;
}

.role-radio:hover {
    border-color: #06b6d4;
    background: #ecfeff;
}

body.dark .role-radio:hover {
    border-color: #06b6d4;
    background: rgba(6, 182, 212, 0.1);
}

.role-radio input[type="radio"] {
    display: none;
}

.role-radio-mark {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s;
}

body.dark .role-radio-mark {
    border-color: #6b7280;
}

.role-radio input[type="radio"]:checked + .role-radio-mark {
    border-color: #06b6d4;
    background: #06b6d4;
}

.role-radio input[type="radio"]:checked + .role-radio-mark::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.role-radio input[type="radio"]:checked ~ .role-radio-label {
    color: #06b6d4;
    font-weight: 600;
}

.role-radio-label {
    font-size: 14px;
    color: #374151;
}

body.dark .role-radio-label {
    color: #d1d5db;
}

/* Disabled role */
.role-radio.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Error text */
.error-text {
    color: #dc2626;
    font-size: 12px;
    margin-top: 6px;
    display: block;
}

/* ========================================
   Live Camera Section
   ======================================== */

.camera-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.camera-section-header .panel-title {
    margin: 0;
}

.camera-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.camera-controls .btn {
    display: flex;
    align-items: center;
    gap: 4px;
}

.camera-live-container {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16/9;
    min-height: 320px;
}

.camera-live-container:fullscreen {
    border-radius: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.camera-live-container:-webkit-full-screen {
    border-radius: 0;
    width: 100vw;
    height: 100vh;
}

.camera-live-container:fullscreen .camera-grid-layout,
.camera-live-container:-webkit-full-screen .camera-grid-layout {
    width: 100%;
    height: 100%;
    padding: 10px;
}

.camera-live-iframe {
    width: 100%;
    height: 100%;
    min-height: 320px;
    border: none;
    background: #1a1a2e;
}

.camera-switcher {
    display: flex;
    gap: 6px;
    margin-right: 8px;
    align-items: center;
}
.camera-switcher .btn-sm {
    padding: 6px 8px;
    font-size: 12px;
}

.camera-live-status {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.7);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

.live-indicator {
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    animation: live-pulse 1.5s infinite;
}

@keyframes live-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.camera-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.camera-placeholder-inner span {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #6b7280;
}

/* Refresh Status Button */
.refresh-status-btn {
    padding: 6px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.refresh-status-btn:active svg {
    animation: spin-once 0.5s ease;
}

@keyframes spin-once {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Quick Actions Section - Simplified */
.quick-actions-section {
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.quick-actions-section .panel-title {
    margin-bottom: 16px;
}

.quick-actions-grid-simple {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

/* Speed slider inline */
.speed-slider-inline {
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: #374151;
    border-radius: 3px;
    cursor: pointer;
}

.speed-slider-inline::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: #06b6d4;
    border-radius: 50%;
    cursor: pointer;
}

.speed-value {
    font-size: 12px;
    font-weight: 600;
    color: #06b6d4;
    min-width: 36px;
    text-align: right;
}

/* ========================================
   Mission Control Grid Layout
   ======================================== */

.mission-control-grid {
    display: grid;
    grid-template-columns: 4.5fr 5.5fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* Two-column screen + controls layout for mission detail */
.mission-screen-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 20px;
}
.mission-screen-layout .screen-column {
    flex: 0 0 70%;
    max-width: 70%;
}
.mission-screen-layout .controls-column {
    flex: 0 0 30%;
    max-width: 30%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.control-top-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.control-top-buttons .btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    font-weight: 600;
    justify-content: center;
}
.info-cards-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 8px;
}
.info-card {
    padding: 12px;
}

/* Container for the three info cards placed full width below the layout */
.fullwidth-info-container {
    width: 100%;
    margin-top: 12px;
}

/* Progress bar styles used in bottom info cards */
.progress {
    width: 100%;
    height: 12px;
    background: #e6eef0;
    border-radius: 999px;
    overflow: hidden;
    box-shadow: inset 0 -1px 0 rgba(0,0,0,0.05);
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #06b6d4, #0891b2);
    width: 0%;
    transition: width 260ms ease;
}
.progress-fill.green {
    background: linear-gradient(90deg, #10b981, #059669);
}
.stat-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
}
.stat-label {
    font-size: 13px;
    color: #374151;
}
.stat-value {
    color: #065f46;
    min-width: 44px;
    text-align: right;
}
.speed-control .speed-value {
    font-weight: 700;
    color: #06b6d4;
    min-width: 44px;
    text-align: right;
}

/* ========================================
   Joystick Controls
   ======================================== */

.joystick-section {
    border-radius: 12px;
    padding: 20px;
}

.joystick-section .panel-title {
    margin-bottom: 20px;
    text-align: center;
}

/* D-Pad Container */
.dpad-container {
    display: grid;
    grid-template-columns: 60px 60px 60px;
    grid-template-rows: 60px 60px 60px;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
}

.dpad-btn {
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(145deg, #2d3748, #1a202c);
    color: #e2e8f0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.dpad-btn:hover:not(:disabled) {
    background: linear-gradient(145deg, #3d4758, #2a303c);
    transform: translateY(-1px);
}

.dpad-btn:active:not(:disabled) {
    background: linear-gradient(145deg, #06b6d4, #0891b2);
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.dpad-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.dpad-btn svg {
    width: 24px;
    height: 24px;
}

/* D-Pad positions */
.dpad-up { grid-column: 2; grid-row: 1; }
.dpad-left { grid-column: 1; grid-row: 2; }
.dpad-center { grid-column: 2; grid-row: 2; }
.dpad-right { grid-column: 3; grid-row: 2; }
.dpad-down { grid-column: 2; grid-row: 3; }

/* D-Pad center */
.dpad-center {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(145deg, #1a202c, #2d3748);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.dpad-label {
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Rotation Controls */
.rotation-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 16px;
}

.rotation-btn {
    flex: 1;
    max-width: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
}

.rotation-btn:active:not(:disabled) {
    background: #06b6d4 !important;
    color: white !important;
}



.info-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #94a3b8;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot.online {
    background: #22c55e;
    box-shadow: 0 0 6px #22c55e;
}

.status-dot.offline {
    background: #ef4444;
}

/* Quick Actions in grid */
.quick-actions-section {
    border-radius: 12px;
    padding: 20px;
}

.quick-actions-section .panel-title {
    margin-bottom: 16px;
}

.quick-actions-grid-simple {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

/* Keyboard-style Arrow Keys */
.arrow-keys-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-bottom: 20px;
}

.arrow-row {
    display: flex;
    gap: 6px;
}

.arrow-row-top {
    justify-content: center;
}

.arrow-row-bottom {
    justify-content: center;
}
body.dark .arrow-key {
    width: 56px;
    height: 48px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(180deg, #3a3a3a 0%, #2a2a2a 100%);
    color: #ffffff;
    /* cursor: pointer; */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.1s ease;
    box-shadow: 
        0 4px 0 #1a1a1a,
        0 6px 8px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
}

.arrow-key {
    width: 56px;
    height: 48px;
    border: none;
    border-radius: 8px;
    background: #eff3f8;
    color: #6f7d92;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.1s ease;
    box-shadow: 0 4px 0 #bababa, 0 6px 8px rgb(0 0 0 / 40%), inset 0 1px 0 rgb(255 255 255 / 10%);
    position: relative;
}

.arrow-key:hover:not(:disabled) {
    background: #bebebe;
}

.arrow-key:active:not(:disabled) {
    background: linear-gradient(180deg, #06b6d4 0%, #0891b2 100%);
    box-shadow: 
        0 2px 0 #065f73,
        0 3px 4px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(2px);
}

.arrow-key:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.arrow-key svg {
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.3));
}
.padding-top-10 {
    padding-top: 10px;
}
.padding-top-5 {
    padding-top: 5px;
}
.padding-bottom-10 {
    padding-bottom: 10px;
}
.width-100 {
    width: 100%;
}

/* --- Appended for Keyboard Joystick Control --- */
.arrow-key.pressed {
    transform: translateY(2px) scale(0.95);
    background: linear-gradient(180deg, #06b6d4 0%, #0891b2 100%);
    box-shadow: 
        0 2px 0 #065f73,
        0 3px 4px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.position-selector-form-group {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.position-selector-label {
  white-space: nowrap;
}

.position-selector-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.position-selector-select {
  flex: 1;
  min-width: 0;
}

/* Lift Controls in Joystick Panel */
.lift-controls {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

body.dark .lift-controls {
    border-top-color: var(--border-dark);
}

.lift-title {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
}

body.dark .lift-title {
    color: #d1d5db;
}

.lift-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.lift-buttons .btn {
    justify-content: center;
}

.lift-position-input {
    display: flex;
    gap: 10px;
}

.lift-position-input .form-input {
    flex: 1;
    min-width: 80px;
}

.lift-position-input .btn {
    flex-shrink: 0;
}
.padding-left-5 {
    padding-left: 5px;
}


.grid-cols-5 {
  grid-template-columns: repeat(5, 1fr);
}

/* Mission Control Specific Components */
.speed-slider-inline {
  height: 6px;
  border-radius: 3px;
  background: #e5e7eb;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.speed-slider-inline::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary-cyan);
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.speed-value {
  font-weight: 600;
  font-size: 14px;
  color: #111827;
  min-width: 35px;
  text-align: right;
}

body.dark .speed-value {
  color: #f9fafb;
}

.status-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px 24px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  align-items: center;
}

body.dark .status-panel {
  background: #1f2937;
}

/* --- Robot Dashboard Blocks --- */
.robot-stat-card {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

.robot-stat-card:hover {
  background-color: #ffffff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  border-color: #cbd5e1;
  transform: translateY(-2px);
}

.robot-stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.robot-stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.robot-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1;
}

.robot-stat-label {
  font-size: 13px;
  color: #64748b;
  margin-top: 4px;
  font-weight: 500;
}

/* Custom Range Slider */
.custom-range {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 4px;
  outline: none;
}

.custom-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary-cyan);
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  cursor: pointer;
  transition: transform 0.1s;
}

.custom-range::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}
.activity-chart-area {
  display: grid; 
  grid-template-columns: 6fr 4fr;
}

.system-status-area {
  display: grid; 
  grid-template-columns: 6fr 4fr;
}

.activity-char {
  height: 300px; 
  position: relative;
}

/* Utility Classes for Pagination */
.bg-gray-50 { background-color: #f9fafb; }
.p-3 { padding: 12px; }
.p-2 { padding: 8px; }
.px-3 { padding-left: 12px; padding-right: 12px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.text-gray-600 { color: #4b5563; }
.text-gray-500 { color: #6b7280; }
.text-sm { font-size: 0.875rem; }
.font-bold { font-weight: 700; }
.space-x-1 > * + * { margin-left: 0.25rem; }
.leading-none { line-height: 1; }
.disabled\:opacity-50:disabled { opacity: 0.5; }

body.dark .bg-gray-50 { background-color: #374151; }
body.dark .text-gray-600 { color: #d1d5db; }
body.dark .text-gray-500 { color: #9ca3af; }


/* Welcome Banner */
.welcome-banner {
  background: linear-gradient(to right, var(--primary-cyan), var(--primary-fuchsia));
  border-radius: 16px;
  padding: 24px;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
}

.welcome-banner-overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.1);
}

.welcome-banner-content {
  position: relative;
  z-index: 1;
}

.welcome-banner-title {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #ffffff;
}

.welcome-banner-text {
  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
}

/* Enhanced System Status Styles */
.status-card-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    border-radius: 0.75rem;
    border: 1.5px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 1rem;
}

.status-card-item:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.status-card-success {
    background-color: #f0fdf4;
    border-color: #86efac;
    color: #14532d;
}

body.dark .status-card-success {
    background-color: rgba(20, 83, 45, 0.2);
    border-color: rgba(34, 197, 94, 0.4);
    color: #4ade80;
}

.status-card-info {
    background-color: #eff6ff;
    border-color: #93c5fd;
    color: #1e3a8a;
}

body.dark .status-card-info {
    background-color: rgba(30, 58, 138, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
    color: #60a5fa;
}

/* AE Unit List Styles */
.ae-unit-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ae-unit-item {
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--border-light);
  transition: all 0.2s ease;
  background-color: transparent;
}

body.dark .ae-unit-item {
  border-color: var(--border-dark);
}

.ae-unit-item:hover {
  background-color: #f3f4f6;
  border-color: var(--primary-cyan);
  transform: translateY(-2px);
}

.recent-actions-card {
  display: flex; 
  flex-direction: column; 
  height: 100%; 
  min-height: 400px;
}

body.dark .ae-unit-item:hover {
  background-color: rgba(55, 65, 81, 0.5);
}

.unit-name {
  font-weight: 500;
  color: #111827;
}

body.dark .unit-name {
  color: #ffffff;
}

.unit-status-badge {
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 500;
  text-transform: lowercase;
}

.status-online {
  background-color: #d1fae5;
  color: #065f46;
}

body.dark .status-online {
  background-color: rgba(16, 185, 129, 0.1);
  color: #34d399;
}

.status-warning {
  background-color: #fef3c7;
  color: #92400e;
}

body.dark .status-warning {
  background-color: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
}

.status-offline {
  background-color: #fee2e2;
  color: #991b1b;
}

body.dark .status-offline {
  background-color: rgba(239, 68, 68, 0.1);
  color: #f87171;
}

.status-card-success .status-icon-box {
    color: #16a34a;
}

.status-card-info .status-icon-box {
    color: #2563eb;
}

.status-item-title {
    font-size: 0.95rem;
    font-weight: 800;
    margin-bottom: 0.125rem;
}

.status-item-desc {
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0.9;
}

.status-time-tag {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background-color: rgba(255, 255, 255, 0.6);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

body.dark .status-time-tag {
    background-color: rgba(0, 0, 0, 0.3);
}

/* Extra Utility Classes for Data Center */
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.font-bold { font-weight: 700; }
.text-gray-500 { color: #6b7280; }
body.dark .text-gray-400 { color: #9ca3af; }
.text-gray-400 { color: #6b7280}
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.font-medium { font-weight: 500; }
.bg-green-100 { background-color: #dcfce7; }
.text-green-800 { color: #166534; }
body.dark .bg-green-900 { background-color: rgba(22, 101, 52, 0.2); }
.bg-green-900 { background-color: rgba(22, 101, 52, 0.2)}
body.dark .text-green-400 { color: #4ade80; }
body.dark .bg-yellow-100 {background-color: rgba(113, 63, 18, 0.2)}
.bg-yellow-100 {background-color: rgba(254, 249, 195, 1)}
body.dark .text-yellow-800 {color: rgba(250, 204, 21, 1)}
.text-yellow-800 {color: rgba(133, 77, 14, 1)}
body.dark .text-red-800 {color: #f87171} 
.text-red-800 {color: #991b1b}
body.dark .bg-red-100 {background-color: rgba(127, 29, 29, 0.2)}
.bg-red-100 {background-color: rgba(254, 226, 226, 1)}
.bg-gray-100 { background-color: #f3f4f6; }
.text-gray-800 { color: #1f2937; }
body.dark .bg-gray-700 { background-color: #374151; }
body.dark .text-gray-300 { color: #d1d5db; }
.rounded-full { border-radius: 9999px; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.space-x-2 > :not([hidden]) ~ :not([hidden]) { margin-left: 0.5rem; }
.bg-cyan-600 { background-color: #0891b2 !important; }
.bg-amber-500 { background-color: #f59e0b !important; }
.bg-fuchsia-500 { background-color: #d946ef !important; }
.text-white { color: #ffffff; }
.h-64 { height: 16rem; }
.bg-blue-50 { background-color: #eff6ff; }
.text-blue-800 { color: #1e40af; }
.bg-amber-50 { background-color: #fffbe6; }
.text-amber-800 { color: #92400e; }
.ml-3 { margin-left: 0.75rem; }
.mt-1 { margin-top: 0.25rem; }
.flex-shrink-0 { flex-shrink: 0; }
.w-5 { width: 1.25rem; }
.h-5 { height: 1.25rem; }
/*.max-w-7xl { max-width: 80rem; }*/
.gap-6 { gap: 1.5rem !important; }
.gap-8 { gap: 2rem !important; }
.mt-8 { margin-top: 2rem !important; }
.mb-8 { margin-bottom: 2rem !important; }

/* Data Center Insight Colors */
body.dark .bg-blue-900\/20 { background-color: rgba(30, 58, 138, 0.2); }
body.dark .text-blue-400 { color: #60a5fa; }
body.dark .text-blue-300 { color: #93c5fd; }
body.dark .bg-amber-900\/20 { background-color: rgba(120, 53, 15, 0.2); }
body.dark .text-amber-400 { color: #fbbf24; }
body.dark .text-amber-300 { color: #fcd34d; }
.text-cyan-600 {color: var(--primary-cyan);}

/* Dashboard Chart Styles */
#activityChart {
    width: 100% !important;
    height: 100% !important;
}

.card canvas {
    image-rendering: -webkit-optimize-contrast;
}
.rounded-lg {
  border-radius: 10px;
}

/* Camera Grid View */
.camera-grid-layout {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 8px;
    width: 100%;
    height: 100%;
    background-color: #000;
    padding: 8px;
    border-radius: 8px;
}

.camera-grid-cell {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #111;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.camera-grid-cell iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.camera-label {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    z-index: 10;
    pointer-events: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Academy View Styles */
.academy-hero {
    position: relative;
    background: linear-gradient(135deg, #06b6d4, #d946ef);
    border-radius: 16px;
    overflow: hidden;
    padding: 48px 48px 0 48px; /* Bottom padding removed to allow stats grid flush with edges if needed */
    color: white;
    margin-bottom: 32px;
    box-shadow: 0 10px 25px -5px rgba(6, 182, 212, 0.3);
}

.academy-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom right, rgba(0,0,0,0.1), rgba(0,0,0,0.3));
}

.academy-hero-content {
    position: relative;
    z-index: 10;
    max-width: 100%;
    width: 100%;
}

.academy-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 48px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    padding: 32px 48px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    width: calc(100% + 96px); /* Offset parent padding */
    margin-left: -48px;
}

.academy-stat-value {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 4px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.academy-stat-label {
    font-size: 13px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.training-path-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

body.dark .training-path-card {
    background: var(--sidebar-dark);
    border-color: var(--border-dark);
}

.training-path-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px -3px rgba(0, 0, 0, 0.1);
}

.icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.course-card-item {
    background-color: #f9fafb;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s;
    border: 1px solid transparent;
}

body.dark .course-card-item {
    background-color: rgba(255,255,255,0.03);
}

.course-card-item:hover {
    background-color: white;
    border-color: var(--primary-cyan);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

body.dark .course-card-item:hover {
    background-color: var(--sidebar-dark);
}

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: 10px;
    background-color: #f9fafb;
    margin-bottom: 8px;
}

body.dark .leaderboard-item {
    background-color: rgba(255,255,255,0.03);
}

/* Missing Utilities for Academy Progress Bars */
.h-2 { height: 0.5rem !important; }
.h-full { height: 100% !important; }
.w-full { width: 100% !important; }
.bg-gray-200 { background-color: #e5e7eb !important; }
.bg-gray-700 { background-color: #374151 !important; }
.overflow-hidden { overflow: hidden !important; }
.rounded-full { border-radius: 9999px !important; }

.rank-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-right: 16px;
}

/* Training Card Color Variants */
.training-path-card.cyan-variant { background-color: #ecfeff; border-color: #cffafe; }
.training-path-card.fuchsia-variant { background-color: #fdf4ff; border-color: #fae8ff; }
.training-path-card.amber-variant { background-color: #fffbeb; border-color: #fef3c7; }

/* Reset to dark mode background if body has dark class */
body.dark .training-path-card.cyan-variant,
body.dark .training-path-card.fuchsia-variant,
body.dark .training-path-card.amber-variant {
    background-color: var(--sidebar-dark);
    border-color: var(--border-dark);
}

/* Segmented Control for Date Filters */
.segmented-control {
  display: flex;
  background-color: #f3f4f6;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border-light);
}

body.dark .segmented-control {
  background-color: #1f2937;
  border-color: var(--border-dark);
}

.segmented-item {
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s ease;
}

body.dark .segmented-item {
  color: #9ca3af;
}

.segmented-item:hover {
  color: #111827;
}

body.dark .segmented-item:hover {
  color: #ffffff;
}

.segmented-item.active {
  background-color: #ffffff;
  color: var(--primary-cyan);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

body.dark .segmented-item.active {
  background-color: #374151;
  color: #22d3ee;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

.text-link {
    background: none;
    border: none;
    padding: 0;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    transition: opacity 0.2s;
}

.text-link:hover {
    opacity: 0.7;
    text-decoration: underline;
}
body.dark .transition-colors {
  background-color: var(--sidebar-dark);
  margin: 10px;
}
.transition-colors {
  background-color: #ffffff;
  border-radius: 12px;    
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin: 10px;
}
.status-badge-pill {
  padding: 5px;
  border-radius: 10px;
}
.rounded-xl {
  border-radius: 15px;
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chart-entrance-animate {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Spacing & Layout Utilities */
.p-8 { padding: 2rem !important; }
.mb-10 { margin-bottom: 2.5rem !important; }
.mb-12 { margin-bottom: 3rem !important; }
.gap-10 { gap: 2.5rem !important; }
.gap-12 { gap: 3rem !important; }
.justify-between { justify-content: space-between !important; }
.text-left { text-align: left !important; }
.w-full { width: 100% !important; }
.flex-1 { flex: 1 !important; }
.shrink-0 { flex-shrink: 0 !important; }

/* Course Item Hover Effect */
.course-card-item {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease !important;
}
.course-card-item:hover {
    transform: translateY(-4px);
    border-color: var(--primary-cyan) !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
}
/* =========================================
   ESSENTIAL FIXES (Video, Toast, etc.)
   ========================================= */
/* Video Container Fix (16:9 Aspect Ratio) */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    border-radius: 8px;
    margin-bottom: 1rem;
}
.video-container iframe,
.video-container object,
.video-container embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.padding-right-10 {
  padding-right: 10px;
}
.margin-bottom-5 {
  margin-bottom: 5px;
}

/* Academy Star Clickable */
.lucide-star {
  transition: transform 0.2s ease, filter 0.2s ease;
  cursor: pointer;
}

.lucide-star:hover {
  transform: scale(1.2);
  filter: brightness(1.2);
}

.lucide-star:active {
  transform: scale(0.9);
}

/* Utility Classes for Star Highlighting */
.star-highlighted {
  color: #f59e0b !important;
  fill: #f59e0b !important;
  stroke: #f59e0b !important;
}

.text-gray-300 {
  color: #d1d5db !important;
}

body.dark .dark\:text-gray-600 {
  color: #4b5563 !important;
}

/* Subscription Plan Highlighting */
.active-plan-ring {
  border: 2px solid var(--primary-cyan) !important;
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.1) !important;
}
.dpad-btn {
    touch-action: none;        
    -webkit-user-select: none;  
    user-select: none;
    -webkit-touch-callout: none; 
}

/* Lift & D-Pad Pressed Effects */
.jog-btn-circle { transition: all 0.1s ease; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.jog-btn-circle.pressed { transform: scale(0.9) !important; background-color: #15803d !important; box-shadow: inset 0 4px 8px rgba(0,0,0,0.3) !important; border: 2px solid #fff !important; }
.dpad-btn { transition: all 0.1s ease; }
.dpad-btn.pressed { transform: scale(0.92) !important; background-color: #0891b2 !important; box-shadow: inset 0 4px 8px rgba(0,0,0,0.3) !important; color: white !important; }
.shortcut-label { position: absolute; bottom: -5px; right: -5px; background: #333; color: white; border-radius: 4px; padding: 2px 5px; font-size: 10px; font-weight: bold; border: 1px solid white; pointer-events: none; z-index: 5; }

/* Mission Control Action Buttons */
.control-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    background-color: #f3f4f6;
    color: #374151;
}

body.dark .control-action-btn {
    background-color: #374151;
    color: #d1d5db;
}

.control-action-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.control-action-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.control-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Specialized Colors */
.control-action-btn.btn-fwd {
    background-color: #ecfdf5;
    color: #059669;
    border-color: #10b981;
}
body.dark .control-action-btn.btn-fwd {
    background-color: rgba(16, 185, 129, 0.1);
    color: #34d399;
}
.control-action-btn.btn-fwd:hover:not(:disabled) {
    background-color: #10b981;
    color: white;
}

.control-action-btn.btn-bwd {
    background-color: #fef2f2;
    color: #dc2626;
    border-color: #ef4444;
}
body.dark .control-action-btn.btn-bwd {
    background-color: rgba(239, 68, 68, 0.1);
    color: #f87171;
}
.control-action-btn.btn-bwd:hover:not(:disabled) {
    background-color: #ef4444;
    color: white;
}

.control-action-btn.btn-up {
    background-color: #ecfeff;
    color: #0891b2;
    border-color: #06b6d4;
}
body.dark .control-action-btn.btn-up {
    background-color: rgba(6, 182, 212, 0.1);
    color: #22d3ee;
}
.control-action-btn.btn-up:hover:not(:disabled) {
    background-color: #06b6d4;
    color: white;
}

.control-action-btn.btn-down {
    background-color: #fdf4ff;
    color: #c026d3;
    border-color: #d946ef;
}
body.dark .control-action-btn.btn-down {
    background-color: rgba(217, 70, 239, 0.1);
    color: #f5d0fe;
}
.control-action-btn.btn-down:hover:not(:disabled) {
    background-color: #d946ef;
    color: white;
}

