@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');/* ============================================
   APP LAYOUT
   ============================================ */

.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: #f5f5f5;
}

/* Prevent horizontal page scroll and hide scrollbars visually */
html, body, #root {
  overflow-x: hidden;
}

/* Hide scrollbars (visual only) while keeping scroll behavior if needed */
* {
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}

*::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

/* Header */
.app-header {
  background: #f8fafd; /* light gray background */
  color: #2c3e50; /* dark text for icons/labels */
  padding: 0.5rem 1.25rem;
  border-bottom: 1px solid rgba(16,24,32,0.06);
  position: fixed;
  top: 0;
  left: 80px;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  height: 60px;
}

/* Breadcrumb bar */
.breadcrumb-bar {
  position: fixed;
  top: 60px;
  left: 80px;
  right: 0;
  background: #f8fafd;
  border-bottom: 2px solid #e5e7eb;
  z-index: 99;
  width: auto;
  height: auto;
  display: flex;
  align-items: center;
  padding: 0;
  border-radius: 0;
  margin-top: 0px;
}

.breadcrumb {
  padding: 8px 14px;
  font-size: 0.9rem;
  color: #374151;
  font-weight: 500;
  margin: 0;
}

/* Settings card */
.settings-card {
  position: absolute;
  top: 56px;
  right: 16px;
  width: 320px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid rgba(16,24,32,0.06);
  box-shadow: 0 10px 30px rgba(16,24,32,0.08);
  z-index: 300;
  overflow: hidden;
}
.settings-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(16,24,32,0.04);
}
.settings-close{ background: transparent; border: none; cursor: pointer; font-size: 1rem }
.settings-body{ padding: 12px 14px }
.settings-row{ margin-bottom: 12px; display:flex; flex-direction:column; gap:8px }
.settings-options{ display:flex; flex-direction:column; gap:12px }
.settings-options label{ display:flex; gap:8px; align-items:center; cursor:pointer; padding:4px 0; font-weight:500; width:100%; }
.settings-options label input[type="radio"]{ margin:0; cursor:pointer; flex-shrink:0; width:18px; height:18px; }
.settings-actions{ display:flex; justify-content:flex-end }
.btn{ padding:6px 12px; border-radius:8px; border:1px solid rgba(16,24,32,0.06); background:#fff; cursor:pointer }
.btn-primary{ background: var(--color-btn-primary); color: var(--color-btn-primary-text); border-color: transparent }

/* Profile card */
.profile-card {
  position: absolute;
  top: 54px;
  right: 12px;
  width: 300px;
  background: var(--surface);
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
  z-index: 300;
  overflow: hidden;
  animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--surface-2);
  position: relative;
  border-bottom: 1px solid var(--border-subtle);
}

.profile-header-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-name-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.profile-avatar-large {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-weight: 700;
  font-size: 1rem;
  background: var(--color-accent-lighter);
  border: 1px solid var(--color-accent-light);
}

.profile-email-text {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.profile-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-menu {
  padding: 8px 8px 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-start;
  width: 100%;
  border: none;
  background: transparent;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
  text-align: left;
}

.profile-menu-item-static {
  cursor: default;
}

.profile-menu-item-static:hover {
  background: transparent;
}

.profile-menu-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 110px;
}

.profile-theme-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--theme-switcher-border);
  background: var(--theme-switcher-bg);
  margin-left: auto;
}

.profile-theme-control .theme-switch-btn {
  height: 26px;
  width: 30px;
  min-width: 30px;
  padding: 0;
  font-size: 0.7rem;
}

.profile-menu-item:hover {
  background: var(--surface-3);
}

.profile-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 6px 0;
}

.profile-menu-item.logout {
  color: var(--text);
  padding: 10px 12px;
  margin: 0 8px 8px;
}

/* Profile page */
.profile-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 8px 6px 24px;
}

.profile-breadcrumb {
  color: #6b7280;
  font-size: 0.85rem;
}

.profile-hero {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.profile-hero-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-hero-avatar {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--color-accent-lighter);
  color: var(--color-accent-primary);
  font-weight: 700;
  display: grid;
  place-items: center;
  font-size: 1rem;
}

.profile-hero-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
}

.profile-hero-email {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 2px;
}

.profile-hero-meta {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
  display: flex;
  gap: 8px;
  align-items: center;
}

.profile-hero-stats {
  display: flex;
  gap: 24px;
}

.profile-stat {
  text-align: center;
}

.profile-stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
}

.profile-stat-label {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-top: 4px;
}

.profile-tabs {
  display: inline-flex;
  gap: 6px;
  background: var(--surface-3);
  border-radius: 12px;
  padding: 4px;
  width: -moz-fit-content;
  width: fit-content;
}

.profile-tab {
  border: none;
  background: transparent;
  padding: 8px 14px;
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
}

.profile-tab.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.profile-panel {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 16px;
}

.profile-panel-title {
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.profile-panel-body {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.profile-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 4px;
  border-top: 1px solid var(--border-subtle);
}

.profile-row:first-child {
  border-top: none;
}

.profile-row-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--surface-3);
  display: grid;
  place-items: center;
  font-size: 0.95rem;
}

.profile-row-label {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.profile-row-value {
  color: var(--text);
  font-size: 0.95rem;
  margin-top: 2px;
}

.profile-badge {
  background: var(--color-accent-light);
  color: var(--color-accent-primary);
  font-size: 0.65rem;
  border-radius: 6px;
  padding: 2px 6px;
  margin-left: 8px;
  font-weight: 600;
}

.profile-panel-note {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

@media (max-width: 900px) {
  .profile-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }
}

.header-left {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  min-width: unset;
}


.logo {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: 0.2px;
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  color: #000000;
  white-space: nowrap;
}

.header-search {
  flex: 1 1 auto;
  max-width: none;
  position: relative;
  display: flex;
  justify-content: center;
}

.search-input {
  width: min(720px, 100%);
  padding: 10px 16px 10px 40px;
  border: 1px solid rgba(16,24,32,0.06);
  border-radius: 28px;
  background: #ffffff;
  color: #2c3e50;
  font-size: 0.95rem;
  transition: all 0.15s ease-in-out;
}

.search-input::-moz-placeholder {
  color: rgba(16,24,32,0.45);
}

.search-input::placeholder {
  color: rgba(16,24,32,0.45);
}

.search-input:focus {
  outline: none;
  background: #ffffff;
  border-color: rgba(16,24,32,0.12);
  box-shadow: 0 6px 18px rgba(16,24,32,0.06);
}

.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.7;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex: 0 0 auto;
  min-width: unset;
  justify-content: flex-end;
}

.header-icons {
  display: flex;
  gap: 0.5rem;
}

.icon-btn {
  background: transparent;
  border: none;
  color: #55616a;
  font-size: 1.15rem;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 0.12s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover {
  background: rgba(16,24,32,0.04);
  transform: translateY(-1px);
}

.header-time {
  font-size: 0.85rem;
  color: #1f2937;
  font-weight: 600;
  min-width: 120px;
  text-align: center;
  background: #ffffff;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid rgba(16,24,32,0.06);
  box-shadow: 0 2px 6px rgba(16,24,32,0.04);
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 6px 12px;
  background: #ffffff;
  border-radius: 28px;
  border: 1px solid rgba(16,24,32,0.06);
  box-shadow: 0 2px 6px rgba(16,24,32,0.04);
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.header-user:hover {
  background: #f9fafb;
  border-color: rgba(16,24,32,0.12);
  box-shadow: 0 4px 12px rgba(16,24,32,0.08);
}

.user-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #0b1220; /* dark/near-black profile text to align with header */
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff; /* white initial */
  font-weight: 700;
  font-size: 0.8rem;
  background: linear-gradient(135deg, #ff6b6b 0%, #ff8e72 100%);
  box-shadow: 0 4px 10px rgba(255, 107, 107, 0.16);
  border: 2px solid rgba(255,255,255,0.12);
}

/* Main Layout */
.app-body {
  flex: 1;
  gap: 0;
  padding: 0;
  margin-left: 80px;
  margin-top: 105px;
  width: calc(100% - 80px);
  min-height: calc(100vh - 115px);
}

/* Main Content */
.main-content {
  background-color: #f8fafd;
}

/* Sidebar */
.sidebar {
  width: 80px;
  background: #e9eef6;
  border-radius: 0;
  padding: 0;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.08);
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 101;
  overflow: hidden;
}

.sidebar-header {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  border-bottom: 1px solid rgba(16,24,32,0.06);
  height: 60px;
  background: #e9eef6;
  flex-shrink: 0;
  position: relative;
  top: 0;
  left: 0;
}

.hamburger-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #2c3e50;
  padding: 0;
  transition: transform 0.2s;
  height: 48px;
  width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hamburger-btn:hover {
  transform: scale(1.1);
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.3rem;
  align-items: center;
}

.nav-item {
  background: none;
  border: none;
  padding: 0;
  text-align: center;
  border-radius: 8px;
  cursor: pointer;
  color: #2c3e50;
  font-size: 0.65rem;
  font-weight: 500;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  width: 60px;
  height: 60px;
  text-decoration: none;
  border: 1px solid transparent;
}

.nav-icon {
  font-size: 1.5rem;
  transition: transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
}

.nav-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60px;
  font-size: 0.6rem;
}

.nav-item:hover {
  background-color: rgba(0, 102, 204, 0.08);
  border-color: rgba(0, 102, 204, 0.2);
}

.nav-item:hover .nav-icon {
  transform: scale(1.15);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(0, 102, 204, 0.15) 0%, rgba(0, 102, 204, 0.08) 100%);
  color: #0066cc;
  border-color: #0066cc;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 102, 204, 0.15);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
  .app-body {
    gap: 0.75rem;
    padding: 0.75rem;
    margin-left: 80px;
  }

  .sidebar {
    width: 80px;
  }

  .nav-item {
    padding: 10px 6px;
  }

  .nav-icon {
    font-size: 1.5rem;
  }

  .nav-label {
    font-size: 0.6rem;
  }
}

@media (max-width: 768px) {
  .app-body {
    flex-direction: column;
    margin-left: 0;
    margin-top: 120px;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    flex-direction: row;
    gap: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
    border-radius: 10px;
    margin-top: 1rem;
  }

  .sidebar-header {
    border: none;
    order: -1;
  }

  .nav-menu {
    flex-direction: row;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .nav-item {
    min-width: 100px;
  }

  .header-content {
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
  }

  .logo {
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .app-header {
    padding: 0.75rem 1rem;
    flex-direction: column;
    gap: 0.75rem;
  }

  .header-left {
    min-width: auto;
  }

  .header-search {
    max-width: 100%;
  }

  .header-right {
    min-width: auto;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: space-between;
    width: 100%;
  }

  .header-time {
    min-width: auto;
    font-size: 0.75rem;
  }

  .logo {
    font-size: 1rem;
  }

  .sidebar {
    padding: 0.75rem;
  }

  .nav-item {
    padding: 8px 10px;
    font-size: 0.7rem;
    min-width: 80px;
  }

  .nav-icon {
    font-size: 1.25rem;
  }

  .main-content {
    min-height: auto;
  }
}

/* ============================================
   TECHDESK UI OVERRIDES
   ============================================ */

html, body, #root {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'SF Pro Text', 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;
}

.app {
  --sidebar-width: 220px;
  --sidebar-collapsed-width: 78px;
  --right-rail-width: 0px;
  --right-panel-width: 0px;
  /* Pilot-style tokens */
  --brand-blue: var(--color-accent-primary);
  --brand-blue-light: rgba(124, 58, 237, 0.10);
  --brand-blue-border: rgba(124, 58, 237, 0.22);
  --surface: var(--color-bg-primary);
  --surface-2: var(--color-bg-secondary);
  --surface-3: var(--color-bg-tertiary);
  --border-subtle: var(--color-border-default);
  --text: var(--color-text-primary);
  --text-muted: var(--color-text-secondary);
  --theme-switcher-bg: #ffffff;
  --theme-switcher-border: rgba(15, 23, 42, 0.1);
  --theme-switcher-icon: #111827;
  --theme-switcher-icon-muted: #6b7280;
  background: var(--surface-2);
}

.app.sidebar-collapsed {
  --sidebar-width: var(--sidebar-collapsed-width);
}

.app-header {
  left: 0;
  right: 0;
  height: 72px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
  gap: 1rem;
}

.breadcrumb-bar {
  left: var(--sidebar-width);
  right: 0;
  top: 72px;
  height: 36px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
}

.breadcrumb {
  padding: 8px 18px;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  text-transform: none;
}

.app-body {
  display: block;
  margin-left: 0;
  margin-top: 108px;
  width: 100%;
  min-height: calc(100vh - 108px);
  background: transparent;
}

.header-left {
  gap: 0.75rem;
  min-width: unset;
  flex: 0 0 auto;
}

.header-menu-btn {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 6px;
  color: var(--brand-blue);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
}

.brand-card {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  display: grid;
  place-items: center;
}

.brand-logo-img {
  width: 36px;
  height: 36px;
  padding: 6px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  -o-object-fit: contain;
     object-fit: contain;
  display: block;
}

.brand-icon-img {
  width: 20px;
  height: 20px;
  -o-object-fit: contain;
     object-fit: contain;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-subtitle {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.logo {
  font-size: 1.2rem;
  letter-spacing: 0.02em;
  font-weight: 900;
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  color: var(--text);
}

.header-search {
  max-width: none;
  flex: 1 1 auto;
  width: 100%;
  margin: 0 1rem;
  display: flex;
  justify-content: center;
}

.search-input {
  width: min(720px, 100%);
  border-radius: 14px;
  padding: 10px 60px 10px 52px;
  background: var(--surface-3);
  border: 1px solid var(--border-subtle);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
  height: 42px;
  font-size: 0.95rem;
  transition: all 0.15s ease;
}

.search-input::-moz-placeholder {
  color: var(--text-muted);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-input:focus {
  outline: none;
  background: #ffffff;
  border-color: rgba(11, 94, 215, 0.4);
  box-shadow: 0 6px 16px rgba(11, 94, 215, 0.15);
}

.search-icon {
  font-weight: 700;
  font-size: 0.75rem;
  background: #ffffff;
  color: #94a3b8;
  border-radius: 10px;
  padding: 6px;
  display: grid;
  place-items: center;
  border: 1px solid #e5e7eb;
  left: 16px;
}

.search-hint {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem;
  color: #6b7280;
  background: #f8fafc;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #d7dbe2;
}

.header-right {
  min-width: unset;
  flex: 0 0 auto;
  gap: 1rem;
  flex-wrap: nowrap;
}

.theme-switcher {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--theme-switcher-border);
  background: var(--theme-switcher-bg);
}

.theme-switch-btn {
  height: 28px;
  min-width: 58px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--theme-switcher-icon-muted);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.theme-switch-icon {
  width: 14px;
  height: 14px;
}

.theme-switch-btn.is-active {
  background: rgba(124, 58, 237, 0.14);
  border-color: rgba(124, 58, 237, 0.35);
  color: var(--theme-switcher-icon);
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand-blue);
  display: grid;
  place-items: center;
}

.icon-btn.active {
  background: var(--brand-blue);
  color: #ffffff;
  border-color: transparent;
}

.header-badge {
  height: 36px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #ffffff;
  color: var(--brand-blue);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.08em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.header-time {
  min-height: 36px;
  font-size: 0.75rem;
  background: var(--surface);
}

.header-user {
  min-height: 36px;
  background: var(--surface);
  border-radius: 999px;
}

.app-body .main-content {
  background: transparent;
  padding: 1.75rem 2rem 2rem 2rem;
  min-width: 0;
  margin-left: var(--sidebar-width);
  margin-right: 0;
}

.sidebar {
  width: var(--sidebar-width);
  align-items: stretch;
  padding: 0;
  background: var(--surface);
  border-right: 1px solid var(--border-subtle);
  box-shadow: none;
  position: fixed;
  top: 72px;
  left: 0;
  height: calc(100vh - 72px);
  overflow-y: auto;
  z-index: 90;
}

.sidebar-header {
  display: none;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.sidebar-brand-text {
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: var(--brand-blue);
}

.hamburger-btn {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 10px;
  padding: 6px;
  color: var(--brand-blue);
  display: grid;
  place-items: center;
}

.sidebar-search {
  padding: 0 1.25rem 0.75rem 1.25rem;
}

.sidebar-search input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  padding: 10px 12px;
  background: var(--surface-3);
  color: var(--text);
}

.sidebar-search input::-moz-placeholder {
  color: var(--text-muted);
}

.sidebar-search input::placeholder {
  color: var(--text-muted);
}

.nav-menu {
  align-items: stretch;
  padding: 0 1.25rem;
  gap: 0.5rem;
}

.nav-section {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.nav-section-title {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0.25rem 0 0.15rem;
  font-weight: 700;
}

.nav-section-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-item {
  height: 38px;
  flex-direction: row;
  justify-content: flex-start;
  gap: 0.75rem;
  width: 100%;
  padding: 6px 12px;
  border-radius: 12px;
  text-align: left;
  border: 1px solid transparent;
}

.nav-icon {
  min-height: auto;
  width: 20px;
  height: 20px;
  border-radius: 0;
  background: transparent;
  color: var(--brand-blue);
  display: block;
  padding: 0;
}

.nav-label {
  font-size: 0.85rem;
  max-width: none;
}

.nav-chevron {
  margin-left: auto;
  font-size: 0.75rem;
  color: #94a3b8;
}

.nav-item:hover {
  background: var(--brand-blue-light);
  color: var(--text);
}

.nav-item:hover .nav-icon {
  color: var(--brand-blue);
}

.nav-item.active {
  background: var(--brand-blue);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(124, 58, 237, 0.18);
}

.nav-item.active .nav-icon {
  color: #ffffff;
}

.nav-item.active .nav-chevron {
  color: rgba(255, 255, 255, 0.7);
}

.sidebar-footer {
  margin-top: auto;
  padding: 1rem 1.25rem 1.5rem 1.25rem;
  font-size: 0.7rem;
  color: #94a3b8;
}

.sidebar-collapsed .sidebar {
  width: var(--sidebar-collapsed-width);
}

.sidebar-collapsed .sidebar-search,
.sidebar-collapsed .sidebar-brand-text,
.sidebar-collapsed .nav-label,
.sidebar-collapsed .nav-chevron,
.sidebar-collapsed .sidebar-footer {
  display: none;
}

.sidebar-collapsed .nav-menu {
  padding: 0.75rem 0.5rem;
  gap: 0.4rem;
}

.sidebar-collapsed .nav-item {
  justify-content: center;
  padding: 0;
  width: 52px;
  height: 52px;
  margin: 0 auto;
}

.sidebar-collapsed .nav-section-title {
  display: none;
}

.sidebar-collapsed .nav-section {
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.sidebar-collapsed .nav-section:last-child {
  border-bottom: none;
}

.sidebar-collapsed .nav-section-items {
  gap: 0.55rem;
}

.sidebar-collapsed .nav-item {
  background: #eef3ff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.sidebar-collapsed .nav-item.active {
  background: #dbe8ff;
  border-color: rgba(11, 94, 215, 0.45);
  box-shadow: 0 6px 14px rgba(11, 94, 215, 0.15);
}

.sidebar-collapsed .nav-item:hover {
  background: #e4ecff;
  border-color: rgba(11, 94, 215, 0.2);
}

.sidebar-collapsed .nav-icon {
  width: 22px;
  height: 22px;
  border-radius: 0;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0 auto;
  transition: color 0.15s ease;
}

.sidebar-collapsed .nav-item.active .nav-icon {
  background: transparent;
  color: #0b5ed7;
}

.sidebar-collapsed .nav-item:hover .nav-icon {
  background: transparent;
}


.icon-sm {
  width: 18px;
  height: 18px;
  color: currentColor;
}

.brand-icon {
  width: 20px;
  height: 20px;
  color: var(--brand-blue);
}

/* ============================================
   GLOBAL UI POLISH (ALL PAGES)
   ============================================ */

:root {
  --ui-surface: #ffffff;
  --ui-muted: #f3f4f6;
  --ui-border: #e5e7eb;
  --ui-text: #0f172a;
  --ui-subtext: #64748b;
  --ui-radius: 14px;
}

.main-content {
  color: var(--ui-text);
}

/* Generic cards/panels */
.card,
.panel,
[class*="card"],
[class*="panel"],
[class*="box"],
[class*="section"] {
  border-radius: var(--ui-radius);
  border: 1px solid var(--ui-border);
}

/* Tables */
table {
  border-collapse: collapse;
}

thead th {
  font-weight: 600;
  color: var(--ui-subtext);
}

tbody td {
  color: var(--ui-text);
}

/* Inputs */
input[type="text"],
input[type="search"],
input[type="email"],
input[type="password"],
select,
textarea {
  border-radius: 12px;
  border: 1px solid var(--ui-border);
  background: #f8fafc;
  color: var(--ui-text);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(124, 58, 237, 0.45);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

/* Buttons */
button,
.btn {
  border-radius: 12px;
  border: 1px solid var(--ui-border);
}

/* BADGES */
.badge,
.pill,
[class*="badge"],
[class*="pill"] {
  border-radius: 999px;
}

/* ============================================
   DARK THEME
   ============================================ */

.app[data-theme='dark'] {
  --brand-blue: var(--color-accent-primary);
  --brand-blue-light: rgba(124, 58, 237, 0.18);
  --brand-blue-border: rgba(124, 58, 237, 0.35);
  --surface: var(--color-bg-secondary);
  --surface-2: var(--color-bg-primary);
  --surface-3: var(--color-bg-tertiary);
  --border-subtle: var(--color-border-default);
  --text: var(--color-text-primary);
  --text-muted: var(--color-text-secondary);
  --ui-surface: var(--color-bg-secondary);
  --ui-muted: var(--color-bg-tertiary);
  --ui-border: var(--color-border-default);
  --ui-text: var(--color-text-primary);
  --ui-subtext: var(--color-text-secondary);
  /* Match sample: bright pill for theme controls inside dark menu */
  --theme-switcher-bg: #ffffff;
  --theme-switcher-border: rgba(148, 163, 184, 0.35);
  --theme-switcher-icon: #111827;
  --theme-switcher-icon-muted: #6b7280;
  background: var(--surface-2);
}

.app[data-theme='dark'] .app-header,
.app[data-theme='dark'] .breadcrumb-bar {
  background: #171a20;
  border-color: #2b313c;
}

.app[data-theme='dark'] .logo,
.app[data-theme='dark'] .breadcrumb,
.app[data-theme='dark'] .user-name,
.app[data-theme='dark'] .header-badge {
  color: #e8f0ff;
}

.app[data-theme='dark'] .header-menu-btn,
.app[data-theme='dark'] .brand-mark,
.app[data-theme='dark'] .search-input,
.app[data-theme='dark'] .header-badge,
.app[data-theme='dark'] .header-user,
.app[data-theme='dark'] .theme-switcher {
  background: #1b2029;
  border-color: #323a47;
  color: #d5dbe6;
}

.app[data-theme='dark'] .theme-switch-btn {
  color: #97a0ad;
}

.app[data-theme='dark'] .theme-switch-btn.is-active {
  background: rgba(124, 58, 237, 0.22);
  border-color: rgba(124, 58, 237, 0.55);
  color: #ffffff;
}

.app[data-theme='dark'] .search-input::-moz-placeholder {
  color: #97a0ad;
}

.app[data-theme='dark'] .search-input::placeholder,
.app[data-theme='dark'] .user-email,
.app[data-theme='dark'] .nav-section-title,
.app[data-theme='dark'] .sidebar-footer,
.app[data-theme='dark'] .nav-chevron {
  color: #97a0ad;
}

.app[data-theme='dark'] .sidebar {
  background: var(--color-bg-primary);
  border-right-color: var(--color-border-subtle);
}

.app[data-theme='dark'] .sidebar-search input,
.app[data-theme='dark'] .nav-item,
.app[data-theme='dark'] .main-content .card,
.app[data-theme='dark'] .main-content .panel,
.app[data-theme='dark'] .main-content [class*="card"],
.app[data-theme='dark'] .main-content [class*="panel"],
.app[data-theme='dark'] .main-content [class*="box"],
.app[data-theme='dark'] .main-content [class*="section"] {
  background: #171b22;
  border-color: #2f3643;
  color: #d5dbe6;
}

.app[data-theme='dark'] .sidebar-search input {
  background: var(--color-input-bg);
  border-color: var(--color-border-default);
  color: var(--color-text-primary);
}

.app[data-theme='dark'] .sidebar-search input::-moz-placeholder {
  color: #94a3b8;
}

.app[data-theme='dark'] .sidebar-search input::placeholder {
  color: #94a3b8;
}

.app[data-theme='dark'] .sidebar .nav-item {
  border-color: transparent !important;
  color: #e5e7eb;
}

.app[data-theme='dark'] .sidebar .nav-icon {
  color: #9aa4b2;
}

.app[data-theme='dark'] .sidebar .nav-item:hover {
  background: var(--color-nav-hover) !important;
}

.app[data-theme='dark'] .sidebar .nav-item.active {
  background: var(--color-nav-active) !important;
  color: #ffffff !important;
  box-shadow: none !important;
  position: relative;
}

.app[data-theme='dark'] .sidebar .nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 999px;
  background: var(--color-accent-primary);
}

.app[data-theme='dark'] .sidebar .nav-item.active .nav-icon {
  color: #ffffff;
}

.app[data-theme='dark'] .sidebar .nav-item:focus,
.app[data-theme='dark'] .sidebar .nav-item:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.app[data-theme='dark'] .main-content table thead th {
  color: #97a0ad;
}

.app[data-theme='dark'] .main-content table tbody td {
  color: #d5dbe6;
}

.app[data-theme='dark'] input[type="text"],
.app[data-theme='dark'] input[type="search"],
.app[data-theme='dark'] input[type="email"],
.app[data-theme='dark'] input[type="password"],
.app[data-theme='dark'] select,
.app[data-theme='dark'] textarea {
  background: #1b2029;
  border-color: #323a47;
  color: #d5dbe6;
}

.app[data-theme='dark'] .profile-card,
.app[data-theme='dark'] .profile-panel,
.app[data-theme='dark'] .profile-hero,
.app[data-theme='dark'] .profile-header {
  background: #171b22;
  border-color: #2f3643;
  color: #d5dbe6;
}

@media (max-width: 1200px) {
  .app-header {
    right: 0;
  }
  .breadcrumb-bar {
    right: 0;
  }
  .app-body {
    grid-template-columns: var(--sidebar-width) 1fr;
  }
  .right-panel {
    display: none;
  }
}

@media (max-width: 900px) {
  .app-header {
    flex-wrap: wrap;
    height: auto;
    padding: 0.75rem 1rem;
  }
  .header-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .header-search {
    order: 3;
    width: 100%;
    max-width: none;
  }
}


/* ===== Borderless sidebar/header (match sample) ===== */
.sidebar,
.breadcrumb-bar,
.app-header,
.sidebar-search input,
.nav-item,
.nav-section,
.sidebar-collapsed .nav-item,
.sidebar-collapsed .nav-section {
  border: none !important;
  box-shadow: none !important;
}

.nav-section { border-bottom: none !important; }

.sidebar-collapsed .nav-item,
.sidebar-collapsed .nav-item.active,
.sidebar-collapsed .nav-item:hover {
  border: none !important;
  box-shadow: none !important;
}

.nav-item.active {
  border: none !important;
}

/* ===== Sidebar tiles (borderless cards) ===== */
.nav-item {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

.nav-item:hover { background: var(--brand-blue-light) !important; }

.nav-item.active {
  background: rgba(124, 58, 237, 0.12) !important;
  color: var(--text);
}

.nav-section-title { background: transparent; }

/* ===== Sidebar list style (no pills/borders) ===== */
.nav-section-items { background: transparent !important; }

.nav-item {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.nav-item:hover { background: rgba(124, 58, 237, 0.06) !important; }

.nav-item.active {
  background: rgba(124, 58, 237, 0.12) !important;
}

/* ===== Sidebar flat list (no pills) ===== */
.nav-section-title {
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
}

.nav-item {
  background: transparent !important;
  border: none !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

.nav-item:hover {
  background: rgba(124, 58, 237, 0.06) !important;
}

.nav-item.active {
  background: rgba(124, 58, 237, 0.12) !important;
  box-shadow: inset 3px 0 0 var(--color-accent-primary) !important;
}

.icon-btn-badge-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--color-accent-primary);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  border: 2px solid var(--surface);
}

.header-popover {
  position: absolute;
  top: 52px;
  right: 12px;
  width: 380px;
  max-width: calc(100vw - 24px);
  background: #ffffff;
  border: 1px solid rgba(16,24,32,0.10);
  border-radius: 14px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
  z-index: 320;
  overflow: hidden;
}

.header-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(16,24,32,0.06);
}

.header-popover-title {
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.header-popover-close {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  color: #64748b;
}

.header-popover-body {
  padding: 10px 12px 12px;
}

.mini-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  margin-bottom: 10px;
}

.mini-form input {
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(16,24,32,0.10);
  padding: 0 10px;
  font-size: 0.85rem;
}

.mini-form button {
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(16,24,32,0.10);
  background: #f3f4f6;
  font-weight: 800;
  cursor: pointer;
  padding: 0 12px;
}

.header-list {
  max-height: 320px;
  overflow: auto;
}

.header-empty {
  padding: 14px 12px;
  color: var(--text-muted);
  font-weight: 700;
  text-align: center;
}

.header-item {
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 8px 6px;
  border-radius: 12px;
}

.header-item.unread {
  background: var(--color-accent-lighter);
  border: 1px solid var(--color-accent-light);
}

.header-item-main {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  flex: 1;
  border: 0;
  background: transparent;
  padding: 6px;
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
}

.header-item-main:hover {
  background: rgba(15, 23, 42, 0.04);
}

.header-item-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.header-item-title {
  font-weight: 900;
  color: var(--text);
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-item-sub {
  color: #64748b;
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-item-action {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid rgba(16,24,32,0.10);
  background: #ffffff;
  cursor: pointer;
  color: #64748b;
  flex: none;
}

.sev-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-top: 4px;
  flex: none;
}

.sev-info { background: #3b82f6; }
.sev-success { background: #22c55e; }
.sev-warning { background: #f59e0b; }
.sev-error { background: #ef4444; }

.todo-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  flex: 1;
  padding: 6px;
}

.todo-row input[type="checkbox"] {
  margin-top: 4px;
  width: 16px;
  height: 16px;
}

.todo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: #475569;
}

.header-icons .icon-btn {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

.icon-btn:hover {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.icon-btn.active,
.icon-btn:active {
  background: #e7f0ff;
  border-color: #c7dcff;
}

.header-badge {
  height: 36px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--datra-border);
  background: var(--datra-panel);
  color: var(--datra-text);
  font-weight: 800;
  letter-spacing: 0.12em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-user {
  min-height: 36px;
  border-radius: 999px;
  border: 1px solid var(--datra-border);
  background: var(--datra-panel);
  padding: 4px 10px;
  gap: 10px;
  align-items: center;
  display: flex;
}

.user-name {
  color: #0f172a;
  font-weight: 600;
  font-size: 0.85rem;
}

.user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.user-email {
  font-size: 0.7rem;
  color: #6b7280;
}

.user-avatar {
  width: 28px;
  height: 28px;
  font-size: 0.7rem;
  box-shadow: none;
  border: 2px solid #e2e8f0;
}

.user-chevron {
  color: #94a3b8;
  font-size: 0.9rem;
}

/* Breadcrumb bar */
.breadcrumb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px;
  min-height: 52px;
  background: #f8fafd;
  border-bottom: 1px solid #e5e7eb;
}

.breadcrumb-left {
  display: flex;
  align-items: center;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: #6b7280;
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.breadcrumb-sep {
  color: #cbd5f5;
}

.breadcrumb-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.breadcrumb-refresh-btn {
  border: 1px solid rgba(17, 24, 39, 0.10);
  background: #f3f4f6;
  border-radius: 10px;
  height: 34px;
  padding: 0 12px;
  color: #111827;
  font-size: 0.78rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.breadcrumb-refresh-btn:hover {
  background: #e5e7eb;
}

.app-body {
  margin-top: 104px;
  min-height: calc(100vh - 104px);
}

.app-body .main-content {
  padding: 12px 20px 24px;
  margin-left: var(--sidebar-width);
  background: transparent;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  top: 60px;
  height: calc(100vh - 60px);
  background: #f8fafc;
  border-right: none;
  padding: 14px 12px;
  box-shadow: none;
  overflow-x: hidden;
}

.sidebar-search {
  display: block;
  margin-bottom: 12px;
}

.sidebar-search input {
  width: 100%;
  height: 40px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  font-size: 0.8rem;
  padding: 0 12px;
  color: #111827;
}

.nav-menu {
  padding: 0;
  gap: 10px;
}

.nav-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 4px 6px;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9ca3af;
  font-weight: 700;
  width: 100%;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
}

.nav-section-title::after {
  content: "⌄";
  font-size: 0.85rem;
  line-height: 1;
  color: #cbd5e1;
  transition: transform 0.15s ease, color 0.15s ease;
}

.nav-section-title[aria-expanded='false']::after {
  transform: rotate(-90deg);
  color: #d1d5db;
}

.nav-section-title:focus,
.nav-section-title:focus-visible {
  outline: none;
}

.nav-section-title:hover::after {
  color: #94a3b8;
}

.nav-section[data-collapsed='true'] .nav-section-items {
  display: none;
}

.nav-section-items {
  gap: 2px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.nav-item {
  height: 44px;
  width: 100%;
  border-radius: 12px !important;
  padding: 0 12px;
  gap: 10px;
  color: #111827;
  background: transparent !important;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin: 0;
  font-weight: 500;
  position: relative;
  cursor: pointer;
  text-decoration: none;
}

.nav-item:visited {
  color: #111827;
}

/* Override global link styles inside the sidebar (prevents purple/underline) */
.sidebar .nav-item,
.sidebar .nav-item:visited,
.sidebar .nav-item:hover,
.sidebar .nav-item:active,
.sidebar .nav-item:focus,
.sidebar .nav-item:focus-visible {
  color: #111827 !important;
  text-decoration: none !important;
  outline: none !important;
}

.nav-icon {
  width: 18px;
  height: 18px;
  color: #6b7280;
}

.nav-label {
  display: block;
  font-size: 0.92rem;
}

.nav-chevron {
  display: none;
}

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

.sidebar .nav-item:focus,
.sidebar .nav-item:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.nav-item.active {
  background: #f3f4f6 !important;
  color: #111827 !important;
  box-shadow: none !important;
  font-weight: 600;
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 26px;
  border-radius: 999px;
  background: #4f46e5;
}

.nav-item.active .nav-icon {
  color: #111827;
}

.sidebar-footer {
  display: block;
  color: #94a3b8;
}

.app.sidebar-collapsed {
  --sidebar-width: var(--sidebar-collapsed-width);
}

.app.sidebar-collapsed .sidebar {
  padding: 12px 6px;
}

.app.sidebar-collapsed .sidebar-search,
.app.sidebar-collapsed .sidebar-brand-text,
.app.sidebar-collapsed .nav-label,
.app.sidebar-collapsed .nav-chevron,
.app.sidebar-collapsed .nav-section-title,
.app.sidebar-collapsed .sidebar-footer {
  display: none;
}

.app.sidebar-collapsed .nav-menu {
  padding: 0;
  gap: 0.85rem;
}

.app.sidebar-collapsed .nav-section-items {
  gap: 0.85rem;
  align-items: center;
}

.app.sidebar-collapsed .nav-item {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 12px !important;
  display: grid;
  place-items: center;
  margin: 0 auto;
}

.app.sidebar-collapsed .nav-item.active::before {
  display: none;
}

/* ============================================
   RESPONSIVE POLISH (TABLET + MOBILE)
   ============================================ */

.sidebar-backdrop {
  position: fixed;
  left: 0;
  right: 0;
  top: 60px;
  height: calc(100vh - 60px);
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  z-index: 80;
}

@media (max-width: 1024px) {
  .app {
    --sidebar-width: 200px;
    --sidebar-collapsed-width: 56px;
  }

  .app-header {
    height: 56px;
    padding: 0 12px;
    gap: 0.6rem;
  }

  .header-left {
    min-width: 160px;
  }

  .logo {
    font-size: 0.98rem;
  }

  .header-search {
    max-width: 520px;
    min-width: 220px;
    margin: 0 0.5rem;
  }

  .search-input {
    height: 36px;
    font-size: 0.85rem;
    padding: 0 84px 0 42px;
  }

  .header-right {
    min-width: auto;
    gap: 0.5rem;
  }

  .header-badge {
    height: 32px;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    padding: 0 10px;
  }

  .header-user {
    padding: 4px 8px;
    gap: 8px;
  }

  .user-name {
    font-size: 0.8rem;
  }

  .user-email {
    display: none;
  }

  .breadcrumb-bar {
    top: 56px;
    min-height: 44px;
    padding: 10px 12px;
  }

  .breadcrumb {
    font-size: 0.8rem;
  }

  .breadcrumb-refresh-btn {
    padding: 6px 10px;
    font-size: 0.75rem;
  }

  .app-body {
    margin-top: 100px;
    min-height: calc(100vh - 100px);
  }

  .app-body .main-content {
    margin-left: var(--sidebar-width);
    padding: 10px 14px 20px;
  }

  .sidebar {
    top: 56px;
    height: calc(100vh - 56px);
    padding: 12px 10px;
  }

  .nav-item {
    height: 38px;
  }
}

@media (max-width: 900px) {
  .app {
    --sidebar-width: 240px;
    --sidebar-collapsed-width: 240px;
  }

  .header-left {
    min-width: 0;
  }

  .brand-card .logo { display: none; }

  .header-search {
    max-width: 420px;
    min-width: 180px;
  }

  .header-right { gap: 0.35rem; }

  .header-badge {
    display: none;
  }

  .header-user {
    padding: 2px 6px;
  }

  .user-meta,
  .user-chevron {
    display: none;
  }

  .breadcrumb-bar {
    padding: 8px 10px;
    left: 0;
  }

  .breadcrumb-refresh-btn {
    padding: 6px 8px;
    gap: 6px;
  }

  .app-body .main-content {
    margin-left: 0;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 60px;
    height: calc(100vh - 60px);
    width: var(--sidebar-width);
    padding: 12px 12px 16px;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    z-index: 90;
  }

  .sidebar-backdrop {
    top: 56px;
    height: calc(100vh - 56px);
  }

  .app.mobile-sidebar-open .sidebar {
    transform: translateX(0);
  }

  .app.mobile-sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 640px) {
  .header-search {
    display: none;
  }

  .breadcrumb-item:first-child {
    display: none;
  }

  .breadcrumb-refresh-btn {
    font-size: 0;
    padding: 6px;
  }

  .breadcrumb-refresh-btn .icon-sm {
    width: 16px;
    height: 16px;
  }

  .app-body {
    margin-top: 96px;
    min-height: calc(100vh - 96px);
  }

  .app-body .main-content {
    padding: 10px 12px 18px;
  }
}


/**
 * Global Styles & Base Components
 * Using CSS variables for theme consistency
 * WCAG AA accessible color contrasts
 */
/* ============================================
   IMPORTS
   ============================================ */
/**
 * Light Theme CSS Variables
 * Professional, clean, corporate-friendly design
 * WCAG AA compliant contrast ratios
 */
:root,
[data-theme="light"] {
  /* ============================================
     COLORS - BACKGROUNDS
     ============================================ */
  --color-bg-primary: #FFFFFF;
  --color-bg-secondary: #F8FAFC;
  --color-bg-tertiary: #F1F5F9;
  --color-bg-overlay: rgba(0, 0, 0, 0.5);

  /* ============================================
     COLORS - TEXT
     ============================================ */
  --color-text-primary: #000000;
  --color-text-secondary: #555555;
  --color-text-tertiary: #888888;
  --color-text-disabled: #CCCCCC;
  --color-text-inverse: #FFFFFF;

  /* ============================================
     COLORS - ACCENT & BRAND
     ============================================ */
  /* Violet brand across the app */
  --color-accent-primary: #7C3AED;
  --color-accent-hover: #6D28D9;
  --color-accent-active: #5B21B6;
  --color-accent-light: #F3E8FF;
  --color-accent-lighter: #FAF5FF;

  /* ============================================
     COLORS - STATUS
     ============================================ */
  --color-status-success: #10B981;
  --color-status-warning: #F59E0B;
  --color-status-error: #EF4444;
  /* Keep "info" consistent with the violet brand (avoid cyan accents) */
  --color-status-info: #7C3AED;
  --color-status-success-light: #D1FAE5;
  --color-status-warning-light: #FEF3C7;
  --color-status-error-light: #FEE2E2;
  --color-status-info-light: #F3E8FF;

  /* ============================================
     COLORS - BORDERS & DIVIDERS
     ============================================ */
  --color-border-default: #E5E7EB;
  --color-border-subtle: #F3F4F6;
  --color-border-strong: #D1D5DB;

  /* ============================================
     COLORS - BUTTONS
     ============================================ */
  --color-btn-primary: #7C3AED;
  --color-btn-primary-text: #FFFFFF;
  --color-btn-primary-hover: #6D28D9;
  --color-btn-secondary: #F3F4F6;
  --color-btn-secondary-text: #1F2937;
  --color-btn-ghost: transparent;
  --color-btn-ghost-text: #7C3AED;
  --color-btn-disabled: #E5E7EB;
  --color-btn-disabled-text: #CCCCCC;

  /* ============================================
     COLORS - CARDS & CONTAINERS
     ============================================ */
  --color-card-bg: #FFFFFF;
  --color-card-border: #E5E7EB;
  --color-card-shadow: rgba(0, 0, 0, 0.08);
  --color-card-hover: rgba(37, 99, 235, 0.04);

  /* ============================================
     COLORS - INPUTS & FORMS
     ============================================ */
  --color-input-bg: #FFFFFF;
  --color-input-border: #D1D5DB;
  --color-input-border-focus: #7C3AED;
  --color-input-focus-ring: rgba(124, 58, 237, 0.12);
  --color-input-placeholder: #9CA3AF;
  --color-input-disabled: #F9FAFB;

  /* ============================================
     COLORS - NAVIGATION
     ============================================ */
  --color-nav-bg: #F8FAFC;
  --color-nav-active: #F3E8FF;
  --color-nav-active-text: #7C3AED;
  --color-nav-hover: #FAF5FF;
  --color-nav-border: #E5E7EB;
  /* Avoid green accents for selection; use brand violet */
  --color-nav-active-border: #7C3AED;

  /* ============================================
     COLORS - SEMANTIC
     ============================================ */
  --color-link: #7C3AED;
  --color-link-visited: #5B21B6;
  --color-link-hover: #6D28D9;

  /* ============================================
     TYPOGRAPHY
     ============================================ */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Manrope', sans-serif;
  --font-mono: 'Courier New', monospace;

  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;

  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.625;
  --line-height-loose: 2;

  /* ============================================
     SPACING
     ============================================ */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 2.5rem;
  --spacing-3xl: 3rem;
  --spacing-4xl: 4rem;

  /* ============================================
     BORDER RADIUS
     ============================================ */
  --radius-none: 0;
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* ============================================
     SHADOWS
     ============================================ */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.12);
  --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.15);
  --shadow-focus: 0 0 0 3px rgba(37, 99, 235, 0.1);

  /* ============================================
     TRANSITIONS
     ============================================ */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slowest: 500ms cubic-bezier(0.4, 0, 0.2, 1);

  /* ============================================
     Z-INDEX SCALE
     ============================================ */
  --z-index-hide: -1;
  --z-index-base: 0;
  --z-index-dropdown: 1000;
  --z-index-sticky: 1020;
  --z-index-fixed: 1030;
  --z-index-backdrop: 1040;
  --z-index-modal: 1050;
  --z-index-popover: 1060;
  --z-index-tooltip: 1070;

  color-scheme: light;
}
/**
 * Dark Theme CSS Variables
 * Modern, sleek, low eye strain, premium look
 * WCAG AA compliant contrast ratios for dark mode
 */
[data-theme="dark"] {
  /* ============================================
     COLORS - BACKGROUNDS
     ============================================ */
  /* Fresh dark theme (near-black, subtle depth) */
  --color-bg-primary: #07090C;
  --color-bg-secondary: #0D1117;
  --color-bg-tertiary: #141A22;
  --color-bg-overlay: rgba(0, 0, 0, 0.7);

  /* ============================================
     COLORS - TEXT
     ============================================ */
  --color-text-primary: #FFFFFF;
  --color-text-secondary: #B0B0B0;
  --color-text-tertiary: #808080;
  --color-text-disabled: #4A4A4A;
  --color-text-inverse: #000000;

  /* ============================================
     COLORS - ACCENT & BRAND
     ============================================ */
  --color-accent-primary: #7C3AED;
  --color-accent-hover: #6D28D9;
  --color-accent-active: #5B21B6;
  --color-accent-light: #A78BFA;
  --color-accent-lighter: #DDD6FE;

  /* ============================================
     COLORS - STATUS
     ============================================ */
  --color-status-success: #10B981;
  --color-status-warning: #F59E0B;
  --color-status-error: #EF4444;
  /* Keep "info" consistent with the violet brand (avoid cyan accents) */
  --color-status-info: #A78BFA;
  --color-status-success-light: #065F46;
  --color-status-warning-light: #78350F;
  --color-status-error-light: #7F1D1D;
  --color-status-info-light: #2A1F44;

  /* ============================================
     COLORS - BORDERS & DIVIDERS
     ============================================ */
  --color-border-default: #232A36;
  --color-border-subtle: #171D27;
  --color-border-strong: #2E3747;

  /* ============================================
     COLORS - BUTTONS
     ============================================ */
  --color-btn-primary: #7C3AED;
  --color-btn-primary-text: #FFFFFF;
  --color-btn-primary-hover: #6D28D9;
  --color-btn-secondary: #141A22;
  --color-btn-secondary-text: #FFFFFF;
  --color-btn-ghost: transparent;
  --color-btn-ghost-text: #7C3AED;
  --color-btn-disabled: #2A3140;
  --color-btn-disabled-text: #4A4A4A;

  /* ============================================
     COLORS - CARDS & CONTAINERS
     ============================================ */
  --color-card-bg: #0D1117;
  --color-card-border: #232A36;
  --color-card-shadow: rgba(0, 0, 0, 0.4);
  --color-card-hover: rgba(255, 255, 255, 0.06);

  /* ============================================
     COLORS - INPUTS & FORMS
     ============================================ */
  --color-input-bg: #0B0E14;
  --color-input-border: #2E3747;
  --color-input-border-focus: #7C3AED;
  --color-input-focus-ring: rgba(124, 58, 237, 0.15);
  --color-input-placeholder: #6B7280;
  --color-input-disabled: #0D1117;

  /* ============================================
     COLORS - NAVIGATION
     ============================================ */
  --color-nav-bg: #07090C;
  --color-nav-active: rgba(124, 58, 237, 0.16);
  --color-nav-active-text: #7C3AED;
  --color-nav-hover: rgba(148, 163, 184, 0.10);
  --color-nav-border: #171D27;

  /* ============================================
     COLORS - SEMANTIC
     ============================================ */
  --color-link: #7C3AED;
  --color-link-visited: #A78BFA;
  --color-link-hover: #6D28D9;

  /* ============================================
     TYPOGRAPHY
     ============================================ */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Manrope', sans-serif;
  --font-mono: 'Courier New', monospace;

  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;

  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.625;
  --line-height-loose: 2;

  /* ============================================
     SPACING
     ============================================ */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 2.5rem;
  --spacing-3xl: 3rem;
  --spacing-4xl: 4rem;

  /* ============================================
     BORDER RADIUS
     ============================================ */
  --radius-none: 0;
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* ============================================
     SHADOWS
     ============================================ */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.6);
  --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.7);
  --shadow-focus: 0 0 0 3px rgba(124, 58, 237, 0.15);

  /* ============================================
     TRANSITIONS
     ============================================ */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slowest: 500ms cubic-bezier(0.4, 0, 0.2, 1);

  /* ============================================
     Z-INDEX SCALE
     ============================================ */
  --z-index-hide: -1;
  --z-index-base: 0;
  --z-index-dropdown: 1000;
  --z-index-sticky: 1020;
  --z-index-fixed: 1030;
  --z-index-backdrop: 1040;
  --z-index-modal: 1050;
  --z-index-popover: 1060;
  --z-index-tooltip: 1070;

  color-scheme: dark;
}
/* ============================================
   GLOBAL RESET & BASE STYLES
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html,
body,
#root {
  height: 100%;
  width: 100%;
  overflow-x: hidden;
}
html {
  font-size: 16px;
  scroll-behavior: smooth;
}
body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  transition: background-color var(--transition-normal),
              color var(--transition-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* Hide scrollbars visually while preserving functionality */
* {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
*::-webkit-scrollbar {
  display: none;
}
/* ============================================
   ICONS (LUCIDE) - OUTLINE ONLY
   ============================================ */
.lucide {
  fill: none !important;
  stroke: currentColor;
}
.lucide * {
  fill: none !important;
}
/* ============================================
   TYPOGRAPHY - HEADINGS
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  margin: var(--spacing-md) 0;
  color: var(--color-text-primary);
  transition: color var(--transition-normal);
}
h1 {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-extrabold);
  margin-bottom: var(--spacing-lg);
}
h2 {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--spacing-lg);
}
h3 {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--spacing-md);
}
h4 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--spacing-md);
}
h5 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--spacing-sm);
}
h6 {
  font-size: var(--font-size-base);
  margin-bottom: var(--spacing-sm);
}
/* ============================================
   TYPOGRAPHY - PARAGRAPHS & TEXT
   ============================================ */
p {
  margin: 0 0 var(--spacing-md) 0;
  color: var(--color-text-primary);
  line-height: var(--line-height-normal);
}
small {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}
code {
  font-family: var(--font-mono);
  background-color: var(--color-bg-tertiary);
  color: var(--color-text-primary);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
}
pre {
  background-color: var(--color-bg-tertiary);
  color: var(--color-text-primary);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  margin-bottom: var(--spacing-md);
}
pre code {
  background-color: transparent;
  padding: 0;
  border-radius: 0;
}
/* ============================================
   LINKS & ANCHORS
   ============================================ */
a {
  color: var(--color-link);
  text-decoration: none;
  transition: color var(--transition-fast);
  cursor: pointer;

  &:hover {
    color: var(--color-link-hover);
    text-decoration: underline;
  }

  &:visited {
    color: var(--color-link-visited);
  }

  &:focus {
    outline: 2px solid var(--color-accent-primary);
    outline-offset: 2px;
  }

  &:active {
    color: var(--color-accent-active);
  }
}
/* ============================================
   BUTTON COMPONENT - BASE STYLES
   ============================================ */
button,
.btn {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  padding: var(--spacing-sm) var(--spacing-lg);
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  white-space: nowrap;
  -moz-user-select: none;
       user-select: none;
  -webkit-user-select: none;

  &:focus {
    outline: 2px solid var(--color-accent-primary);
    outline-offset: 2px;
  }

  &:disabled,
  &.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: var(--color-btn-disabled);
    color: var(--color-btn-disabled-text);
  }
}
/* Button - Primary */
.btn-primary {
  background-color: var(--color-btn-primary);
  color: var(--color-btn-primary-text);
  box-shadow: var(--shadow-md);

  &:hover:not(:disabled):not(.disabled) {
    background-color: var(--color-accent-hover);
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
  }

  &:active:not(:disabled):not(.disabled) {
    background-color: var(--color-accent-active);
    transform: translateY(0);
  }

  &:focus {
    box-shadow: var(--shadow-focus);
  }
}
/* Button - Secondary */
.btn-secondary {
  background-color: var(--color-btn-secondary);
  color: var(--color-btn-secondary-text);
  border: 1px solid var(--color-border-default);

  &:hover:not(:disabled):not(.disabled) {
    background-color: var(--color-bg-tertiary);
    border-color: var(--color-border-strong);
  }

  &:active:not(:disabled):not(.disabled) {
    background-color: var(--color-accent-light);
    color: var(--color-accent-primary);
  }
}
/* Button - Ghost (Outline) */
.btn-ghost {
  background-color: var(--color-btn-ghost);
  color: var(--color-btn-ghost-text);
  border: 2px solid currentColor;

  &:hover:not(:disabled):not(.disabled) {
    background-color: var(--color-accent-light);
    opacity: 0.8;
  }

  &:active:not(:disabled):not(.disabled) {
    background-color: var(--color-accent-light);
    opacity: 1;
  }
}
/* Button - Danger */
.btn-danger {
  background-color: var(--color-status-error);
  color: #FFFFFF;
  box-shadow: var(--shadow-md);

  &:hover:not(:disabled):not(.disabled) {
    filter: brightness(0.9);
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
  }

  &:active:not(:disabled):not(.disabled) {
    filter: brightness(0.85);
    transform: translateY(0);
  }
}
/* Button - Success */
.btn-success {
  background-color: var(--color-status-success);
  color: #FFFFFF;
  box-shadow: var(--shadow-md);

  &:hover:not(:disabled):not(.disabled) {
    filter: brightness(0.9);
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
  }

  &:active:not(:disabled):not(.disabled) {
    filter: brightness(0.85);
    transform: translateY(0);
  }
}
/* Button - Warning */
.btn-warning {
  background-color: var(--color-status-warning);
  color: #FFFFFF;
  box-shadow: var(--shadow-md);

  &:hover:not(:disabled):not(.disabled) {
    filter: brightness(0.9);
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
  }

  &:active:not(:disabled):not(.disabled) {
    filter: brightness(0.85);
    transform: translateY(0);
  }
}
/* ============================================
   INPUT COMPONENT - BASE STYLES
   ============================================ */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"],
input[type="week"],
textarea,
select {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--color-input-border);
  border-radius: var(--radius-lg);
  background-color: var(--color-input-bg);
  color: var(--color-text-primary);
  transition: all var(--transition-fast);
  width: 100%;
  max-width: 100%;

  &::-moz-placeholder {
    color: var(--color-input-placeholder);
    opacity: 1;
  }

  &::placeholder {
    color: var(--color-input-placeholder);
    opacity: 1;
  }

  &:focus {
    outline: none;
    border-color: var(--color-input-border-focus);
    box-shadow: var(--shadow-focus);
  }

  &:disabled {
    background-color: var(--color-input-disabled);
    color: var(--color-text-disabled);
    cursor: not-allowed;
    opacity: 0.6;
  }

  &::-moz-selection {
    background-color: var(--color-accent-primary);
    color: var(--color-text-inverse);
  }

  &::selection {
    background-color: var(--color-accent-primary);
    color: var(--color-text-inverse);
  }
}
textarea {
  resize: vertical;
  min-height: 6rem;
  line-height: var(--line-height-normal);
}
select {
  cursor: pointer;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='currentColor' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--spacing-md) center;
  padding-right: var(--spacing-2xl);
}
/* ============================================
   FORM GROUP COMPONENT
   ============================================ */
.form-group {
  margin-bottom: var(--spacing-lg);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}
label {
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-sm);
  color: var(--color-text-primary);
  transition: color var(--transition-fast);

  .required {
    color: var(--color-status-error);
    margin-left: var(--spacing-xs);
  }
}
.form-error {
  font-size: var(--font-size-sm);
  color: var(--color-status-error);
  margin-top: var(--spacing-xs);
}
.form-help {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-top: var(--spacing-xs);
}
/* ============================================
   CARD COMPONENT
   ============================================ */
.card {
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-xl);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);

  &:hover {
    box-shadow: var(--shadow-lg);
    background-color: var(--color-card-hover);
  }

  &.card-elevated {
    box-shadow: var(--shadow-lg);
  }

  &.card-flat {
    box-shadow: none;
    border: 1px solid var(--color-border-default);
  }
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--color-border-default);
}
.card-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  margin: 0;
}
.card-content {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}
.card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--color-border-default);
}
/* ============================================
   NAVBAR COMPONENT
   ============================================ */
nav,
.navbar {
  background-color: var(--color-nav-bg);
  border-bottom: 1px solid var(--color-nav-border);
  padding: var(--spacing-md) var(--spacing-lg);
  display: flex;
  align-items: center;
  gap: var(--spacing-xl);
}
.nav-item {
  color: var(--color-text-primary);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
  cursor: pointer;

  &:hover {
    background-color: var(--color-nav-hover);
    color: var(--color-accent-primary);
  }

  &.active,
  &.nav-active {
    background-color: var(--color-nav-active);
    color: var(--color-nav-active-text);
    font-weight: var(--font-weight-semibold);
  }
}
/* ============================================
   BADGE COMPONENT
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-xs) var(--spacing-md);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  white-space: nowrap;
  transition: all var(--transition-fast);

  &.badge-primary {
    background-color: var(--color-accent-light);
    color: var(--color-accent-primary);
  }

  &.badge-success {
    background-color: var(--color-status-success-light);
    color: var(--color-status-success);
  }

  &.badge-warning {
    background-color: var(--color-status-warning-light);
    color: var(--color-status-warning);
  }

  &.badge-error {
    background-color: var(--color-status-error-light);
    color: var(--color-status-error);
  }

  &.badge-info {
    background-color: var(--color-status-info-light);
    color: var(--color-status-info);
  }
}
/* ============================================
   ALERT COMPONENT
   ============================================ */
.alert {
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: var(--radius-lg);
  margin-bottom: var(--spacing-md);
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-md);
  border-left: 4px solid;

  &.alert-success {
    background-color: var(--color-status-success-light);
    border-color: var(--color-status-success);
    color: var(--color-status-success);
  }

  &.alert-warning {
    background-color: var(--color-status-warning-light);
    border-color: var(--color-status-warning);
    color: var(--color-status-warning);
  }

  &.alert-error {
    background-color: var(--color-status-error-light);
    border-color: var(--color-status-error);
    color: var(--color-status-error);
  }

  &.alert-info {
    background-color: var(--color-status-info-light);
    border-color: var(--color-status-info);
    color: var(--color-status-info);
  }
}
.alert-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: var(--font-size-lg);
  padding: 0;
  color: inherit;
  transition: opacity var(--transition-fast);

  &:hover {
    opacity: 0.7;
  }
}
/* ============================================
   TABLE COMPONENT
   ============================================ */
table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--color-bg-primary);
}
thead {
  background-color: var(--color-bg-tertiary);
  border-bottom: 2px solid var(--color-border-default);
}
th {
  padding: var(--spacing-md);
  text-align: left;
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-sm);
  color: var(--color-text-primary);
}
td {
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--color-border-default);
  color: var(--color-text-primary);
}
tbody tr {
  transition: background-color var(--transition-fast);

  &:hover {
    background-color: var(--color-card-hover);
  }
}
/* ============================================
   UTILITIES - VISIBILITY & DISPLAY
   ============================================ */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
.hidden {
  display: none !important;
}
.visible {
  display: block !important;
}
/* ============================================
   UTILITIES - TEXT ALIGNMENT
   ============================================ */
.text-left {
  text-align: left;
}
.text-center {
  text-align: center;
}
.text-right {
  text-align: right;
}
/* ============================================
   UTILITIES - MARGINS & PADDING
   ============================================ */
.m-0 { margin: 0; }
.m-xs { margin: var(--spacing-xs); }
.m-sm { margin: var(--spacing-sm); }
.m-md { margin: var(--spacing-md); }
.m-lg { margin: var(--spacing-lg); }
.m-xl { margin: var(--spacing-xl); }
.p-0 { padding: 0; }
.p-xs { padding: var(--spacing-xs); }
.p-sm { padding: var(--spacing-sm); }
.p-md { padding: var(--spacing-md); }
.p-lg { padding: var(--spacing-lg); }
.p-xl { padding: var(--spacing-xl); }
/* ============================================
   UTILITIES - TEXT COLORS
   ============================================ */
.text-primary {
  color: var(--color-text-primary);
}
.text-secondary {
  color: var(--color-text-secondary);
}
.text-tertiary {
  color: var(--color-text-tertiary);
}
.text-success {
  color: var(--color-status-success);
}
.text-warning {
  color: var(--color-status-warning);
}
.text-error {
  color: var(--color-status-error);
}
.text-info {
  color: var(--color-status-info);
}
/* ============================================
   RESPONSIVE DESIGN - MEDIA QUERIES
   ============================================ */
@media (max-width: 768px) {
  h1 {
    font-size: var(--font-size-3xl);
  }

  h2 {
    font-size: var(--font-size-2xl);
  }

  h3 {
    font-size: var(--font-size-xl);
  }

  .card {
    padding: var(--spacing-md);
  }

  nav,
  .navbar {
    flex-wrap: wrap;
    gap: var(--spacing-md);
  }

  .card-footer {
    flex-direction: column;
    align-items: stretch;

    button {
      width: 100%;
    }
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
/* Remove focus "highlighter" rings globally (light + dark). */
*:focus,
*:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}
.dashboard-page {
  margin: 0;
  padding: 16px;
  width: 100%;
  background: transparent;
}

/* ==========================================
   Dashboard (Screenshot Template)
   ========================================== */

.dashboard-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.dashboard-topbar h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #111827;
}

.dashboard-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dash-refresh-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(17, 24, 39, 0.10);
  background: #ffffff;
  border-radius: 12px;
  padding: 6px;
}

.dash-refresh-btn {
  border: 1px solid rgba(17, 24, 39, 0.10);
  background: #f3f4f6;
  border-radius: 10px;
  height: 34px;
  padding: 0 12px;
  font-size: 0.78rem;
  font-weight: 800;
  color: #111827;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dash-refresh-btn:disabled {
  opacity: 0.65;
  cursor: default;
}

.dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 12px;
}

.dash-kpi-card {
  background: #ffffff;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  align-items: center;
  flex-direction: row-reverse;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.dash-kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #111827;
  flex: none;
}

.dash-kpi-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dash-kpi-icon.wifi { background: #fde7ea; color: #ef4444; }
.dash-kpi-icon.online { background: #e0f2fe; color: #0284c7; }
.dash-kpi-icon.offline { background: #ffedd5; color: #f59e0b; }
.dash-kpi-icon.total { background: #ede9fe; color: #6366f1; }

.dash-kpi-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: #111827;
  line-height: 1.05;
}

.dash-kpi-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #6b7280;
  margin-top: 2px;
}

.dash-section {
  background: #ffffff;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.04);
  margin-bottom: 14px;
}

.dash-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(17, 24, 39, 0.06);
  margin-bottom: 12px;
}

.dash-section-title {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.dash-section-title h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: #111827;
}

.dash-sub {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 2px;
}

.dash-section-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #f3f4f6;
  color: #6b7280;
  display: grid;
  place-items: center;
  flex: none;
}

.dash-section-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.health-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.3px;
  border: 1px solid rgba(17, 24, 39, 0.10);
  background: #f3f4f6;
  color: #6b7280;
}

.health-pill.critical {
  background: #fee2e2;
  color: #b91c1c;
  border-color: rgba(185, 28, 28, 0.18);
}

.health-pill.ok {
  background: #dcfce7;
  color: #166534;
  border-color: rgba(22, 101, 52, 0.18);
}

.dash-table-wrap {
  overflow-x: auto;
}

.dash-table thead th {
  background: #f9fafb;
  border-bottom: 1px solid rgba(17, 24, 39, 0.06);
  padding-top: 10px;
  padding-bottom: 10px;
}

.dash-table td {
  padding-top: 14px;
  padding-bottom: 14px;
}

.dash-section-activity .dash-section-head {
  margin-bottom: 10px;
}

@media (max-width: 1100px) {
  .dash-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .dash-kpi-grid {
    grid-template-columns: 1fr;
  }

  .dash-refresh-controls {
    width: 100%;
    justify-content: space-between;
  }
}

/* Hide legacy KPI card grid (per Dashboard screenshot request) */
.dashboard-page .data-cards-grid {
  display: none !important;
}

.dashboard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.ops-kpis.ops-kpis-dashboard {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.ops-kpis.ops-kpis-dashboard .ops-kpi {
  padding: 10px 12px;
  border-radius: 12px;
}

.ops-kpis.ops-kpis-dashboard .ops-kpi span {
  font-size: 0.7rem;
}

.ops-kpis.ops-kpis-dashboard .ops-kpi strong {
  font-size: 1.05rem;
}

.dashboard-head h2 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
  color: #0f172a;
}

.dashboard-tabs {
  display: flex;
  gap: 0.5rem;
}

.tab-btn {
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #ffffff;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
}

.tab-btn.active {
  background: #e6f6f8;
  color: #0f172a;
  border-color: #7C3AED;
}

.secondary-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.card-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: #e2e8f0;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #0f172a;
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: #0f172a;
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
}

.stat-sublabel {
  font-size: 0.75rem;
  color: #94a3b8;
}

.dashboard-content {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 1rem;
}

.overview-section,
.info-card {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.04);
}

.overview-header,
.info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.overview-header h3,
.info-card h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}

.subtext {
  display: block;
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 4px;
}

.collapse-btn {
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #f8fafc;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #0f172a;
}

.overview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.overview-table th {
  text-align: left;
  padding: 0.75rem 0;
  font-weight: 600;
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
}

.overview-table td {
  padding: 0.75rem 0;
  border-bottom: 1px solid #e2e8f0;
  color: #0f172a;
}

.overview-table .overview-empty {
  text-align: center;
  color: #6b7280;
  font-size: 0.9rem;
  padding: 1rem 0;
}

.link {
  color: #0ea5e9;
  text-decoration: none;
  font-weight: 600;
}

.card-empty {
  padding: 1.5rem 0;
  text-align: center;
  color: #94a3b8;
  font-size: 0.9rem;
}

@media (max-width: 1100px) {
  .main-card {
    grid-column: span 2;
  }
  .dashboard-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .main-card {
    grid-column: span 1;
  }
}

/* ============================================
   DATRA PLATFORM MATCH OVERRIDES
   ============================================ */

.dashboard-page {
  padding: 16px;
}

.dashboard-head {
  margin-bottom: 0.6rem;
}

.dashboard-head h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #111827;
}

.dashboard-tabs .tab-btn {
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.74rem;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #6b7280;
}

.dashboard-tabs .tab-btn.active {
  border-color: #10b981;
  color: #10b981;
  background: #f0fdf9;
}

.main-card {
  grid-column: span 1;
  min-height: 120px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 0.5rem;
  align-items: center;
}

.main-card h3 {
  font-size: 0.78rem;
  font-weight: 600;
  color: #1f2937;
  grid-column: 1;
  margin: 0;
}



.secondary-card {
  display: grid;
  grid-template-columns: 36px 1fr;
  -moz-column-gap: 0.75rem;
       column-gap: 0.75rem;
  align-items: start;
}

.card-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: #f1f5f9;
  font-size: 0.65rem;
  color: #0f172a;
  grid-row: 1 / span 3;
}

.stat-number {
  font-size: 1.1rem;
  font-weight: 700;
  grid-column: 2;
}

.stat-label {
  font-size: 0.75rem;
  color: #6b7280;
  grid-column: 2;
}

.stat-sublabel {
  font-size: 0.7rem;
  color: #94a3b8;
  grid-column: 2;
}

.dashboard-content {
  grid-template-columns: 3fr 2fr;
  gap: 1rem;
}

.overview-section,
.info-card {
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(16,24,40,0.06);
  padding: 1rem 1.1rem;
  background: #ffffff;
}

.overview-header h3,
.info-card h4 {
  font-size: 0.86rem;
  font-weight: 600;
  color: #111827;
}

.subtext {
  font-size: 0.72rem;
  color: #98a2b3;
}

.collapse-btn {
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.65rem;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  color: #475569;
}

.overview-table {
  font-size: 0.8rem;
}

.overview-table thead {
  background: #f8fafc;
}

.overview-table th,
.overview-table td {
  padding: 0.7rem 0.6rem;
  border-bottom: 1px solid #eef2f7;
}

.overview-table th {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.65rem;
  color: #94a3b8;
}

.overview-table td {
  color: #111827;
}

.link {
  color: #7C3AED;
}

/* ===== Recent Activity panel ===== */
.activity-card {
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  padding: 20px !important;
}

.activity-section {
  margin-top: 0.5rem;
}

.activity-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.activity-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.activity-title h4 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #111827;
}

.activity-title p {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: #6b7280;
}

.activity-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid #e5e7eb;
  padding-top: 16px;
}

.activity-tabs {
  display: flex;
  background: transparent;
  padding: 0;
  border-radius: 0;
  gap: 8px;
  width: -moz-fit-content;
  width: fit-content;
}

.tab-chip {
  border: none;
  background: transparent;
  color: #6b7280;
  padding: 6px 12px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.tab-chip span {
  background: #e5e7eb;
  color: #374151;
  border-radius: 8px;
  padding: 1px 6px;
  font-size: 0.75rem;
  font-weight: 700;
}

.tab-chip.active {
  background: #f3f4f6;
  box-shadow: none;
  color: #111827;
}

.tab-chip.active span {
  background: #e5e7eb;
  color: #374151;
}

.activity-search {
  position: relative;
}

.activity-search input {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 0.88rem;
  width: 240px;
  height: 38px;
  outline: none;
  background: #ffffff;
  color: #0f172a;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.activity-search input:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.activity-tools {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 0 auto;
  justify-content: center;
}

.activity-filters select {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 0.88rem;
  height: 38px;
  background: #ffffff;
  color: #0f172a;
  width: 180px;
}

.activity-list {
  margin-top: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
}

.activity-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
  transition: background 0.15s ease;
}

.activity-row:last-child {
  border-bottom: none;
}

.activity-row:hover {
  background: #f8fafc;
}

.activity-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.activity-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: #111827;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.4px;
}

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

.status-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--pill-dot, currentColor);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pill-dot, currentColor) 18%, transparent);
}

.activity-sub {
  font-size: 0.82rem;
  color: #6b7280;
}

.activity-time {
  font-size: 0.82rem;
  color: #6b7280;
}

.activity-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px 16px;
  text-align: center;
  color: #6b7280;
}

.activity-empty small {
  font-size: 0.82rem;
  color: #6b7280;
}

.card-empty {
  font-size: 0.78rem;
  color: #98a2b3;
}

/* ==== Recent Activity: match Network Status card styling ==== */
/* Recent Activity inherits Network Status card styles via .overview-section */
.activity-card {
  padding: 0;
}

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

.activity-card .activity-filters {
  gap: 16px;
  margin-top: 0;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
}

.activity-card .activity-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  white-space: nowrap;
  flex-direction: row;
  margin-left: auto;
  flex: 0 0 auto;
}

.activity-card .activity-header-left {
  flex: 1 1 auto;
  min-width: 0;
}

.activity-card .activity-header-right .activity-tools {
  display: flex !important;
  align-items: center;
  gap: 12px;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
}

.activity-card .activity-header-right .activity-search {
  max-width: 200px;
  flex: 0 0 200px;
}

.activity-card .activity-header-right select {
  max-width: 200px;
  flex: 0 0 200px;
}

.activity-card .activity-header-right .collapse-btn {
  flex: 0 0 200px;
  height: 38px;
  border-radius: 999px;
  font-size: 0.88rem;
  padding: 0 12px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  color: #111827;
}

.activity-card .activity-tabs {
  background: #f3f4f6;
  padding: 4px;
  border-radius: 12px;
  gap: 8px;
  width: 100%;
  justify-content: space-between;
}

.activity-card .tab-chip {
  font-size: 0.85rem;
  padding: 6px 12px;
  border-radius: 8px;
  color: #6b7280;
  gap: 6px;
}

.activity-card .tab-chip.active {
  background: #ffffff;
  color: #111827;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.activity-card .tab-chip span {
  font-size: 0.75rem;
}

.activity-card .activity-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 auto;
  justify-content: center;
}

.activity-card .activity-search {
  max-width: 240px;
}

.activity-card .activity-search input,
.activity-card .activity-filters select {
  height: 38px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  font-size: 0.88rem;
  padding: 0 12px;
  background: #ffffff;
  color: #111827;
}

.activity-card .activity-search input {
  width: 240px;
}

.activity-card .activity-filters select {
  max-width: 220px;
  width: 220px;
}

.activity-card .tab-chip:hover {
  background: #e5e7eb;
  color: #111827;
}

.activity-card .activity-list {
  margin-top: 16px;
  border-radius: 12px;
  padding: 20px !important;
}

.activity-card .activity-row {
  padding: 12px 16px;
}

.activity-card .activity-time,
.activity-card .activity-sub {
  color: #6b7280;
}

.activity-card .activity-empty {
  padding: 20px 16px;
  align-items: flex-start;
  text-align: left;
}

.dashboard-content,
.dashboard-content .left-section,
.dashboard-content .right-section {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.merged-ops-block {
  margin-top: 12px;
}

.merged-ops-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.merged-ops-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.merged-ops-title h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}

/* ===============================
   Mobile/Tablet Refinements
   =============================== */
@media (max-width: 900px) {
  .dashboard-page {
    padding: 12px;
  }

  .dashboard-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .ops-kpis.ops-kpis-dashboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-tabs {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .dashboard-content {
    grid-template-columns: 1fr;
  }

  .activity-card .activity-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .activity-card .activity-header-right {
    width: 100%;
    flex-wrap: wrap;
    gap: 10px;
  }

  .activity-card .activity-header-right .activity-search,
  .activity-card .activity-header-right select,
  .activity-card .activity-header-right .collapse-btn {
    flex: 1 1 180px;
    max-width: none;
  }

  .activity-card .activity-search input {
    width: 100%;
  }

  .activity-row {
    grid-template-columns: 1fr;
    gap: 6px;
    align-items: start;
  }

  .activity-time {
    text-align: left;
  }

  .merged-ops-actions {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .main-card {
    grid-template-columns: 1fr;
  }

  .overview-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

/* ==========================================
   Remote Ops Center Professional View
   ========================================== */

.ops-dashboard {
  padding: 16px;
}

.ops-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.ops-header h2 {
  margin: 0;
  font-size: 1.28rem;
  color: #111827;
}

.ops-sub {
  margin: 4px 0 0;
  color: #6b7280;
  font-size: 0.84rem;
}

.ops-actions {
  display: flex;
  gap: 8px;
}

.ops-btn {
  border: 1px solid #d1d5db;
  background: #7C3AED;
  color: #ffffff;
  border-radius: 9px;
  height: 36px;
  padding: 0 14px;
  font-weight: 700;
  font-size: 0.8rem;
}

.ops-btn.ghost {
  background: #ffffff;
  color: #111827;
}

.ops-btn.active {
  background: #115e59;
}

.ops-btn.small {
  height: 30px;
  padding: 0 10px;
  font-size: 0.72rem;
  border-radius: 8px;
}

.ops-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.ops-kpi {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ops-kpi span {
  color: #6b7280;
  font-size: 0.72rem;
}

.ops-kpi strong {
  font-size: 1.2rem;
  color: #111827;
}

.ops-kpi.online strong { color: #15803d; }
.ops-kpi.offline strong { color: #b91c1c; }
.ops-kpi.warn strong { color: #b45309; }
.ops-kpi.session strong { color: #6D28D9; }
.ops-kpi.danger strong { color: #be123c; }

.ops-error {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 12px;
}

.ops-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

/* Hide legacy Ops side panel (per Ops screenshot request) */
.ops-grid .ops-side {
  display: none !important;
}

.ops-panel {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.panel-head h3 {
  margin: 0;
  color: #111827;
  font-size: 0.92rem;
}

.panel-filters {
  display: flex;
  gap: 8px;
  align-items: center;
}

.panel-filters input,
.panel-filters select {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  height: 34px;
  padding: 0 10px;
  font-size: 0.78rem;
  color: #111827;
  background: #ffffff;
}

.fleet-table-wrap {
  overflow: auto;
}

.fleet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.fleet-table th {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.64rem;
  color: #6b7280;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
  padding: 10px 8px;
}

.fleet-table td {
  border-bottom: 1px solid #f1f5f9;
  padding: 10px 8px;
  vertical-align: top;
}

.fleet-table .empty {
  text-align: center;
  color: #6b7280;
  padding: 24px 8px;
}

.unit-cell {
  display: flex;
  gap: 8px;
  align-items: center;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.dot.online { background: #16a34a; }
.dot.offline { background: #ef4444; }

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

.unit-meta {
  color: #6b7280;
  font-size: 0.7rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  gap: 6px;
  padding: 2px 10px;
  font-size: 0.65rem;
  font-weight: 700;
}

.status-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--pill-dot, currentColor);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pill-dot, currentColor) 18%, transparent);
}

.status-pill.online { background: #dcfce7; color: #166534; --pill-dot: #22c55e; }
.status-pill.offline { background: #fee2e2; color: #991b1b; --pill-dot: #ef4444; }

.tiny {
  font-size: 0.68rem;
  color: #6b7280;
  margin-top: 3px;
}

.tiny.warn { color: #b45309; }
.tiny.danger { color: #b91c1c; }

.health-row {
  font-size: 0.7rem;
  color: #1f2937;
  line-height: 1.35;
}

.session-count {
  font-size: 1rem;
  font-weight: 800;
  color: #6D28D9;
}

.session-list,
.feed-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.session-item,
.feed-item {
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  border-radius: 10px;
  padding: 9px 10px;
}

.session-main,
.feed-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

@media (max-width: 1280px) {
  .ops-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .ops-grid {
    grid-template-columns: 1fr;
  }
  .ops-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .ops-actions {
    width: 100%;
    flex-wrap: wrap;
  }
  .ops-btn {
    width: 100%;
  }
  .ops-kpis {
    grid-template-columns: 1fr;
  }
  .panel-filters {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
}

/* Dashboard dark theme fixes */
html[data-theme='dark'] .dashboard-page,
body[data-theme='dark'] .dashboard-page,
.app[data-theme='dark'] .dashboard-page {
  background: #0d0f13;
}

html[data-theme='dark'] .dashboard-head h2,
html[data-theme='dark'] .overview-header h3,
html[data-theme='dark'] .info-card h4,
html[data-theme='dark'] .activity-title h4,
body[data-theme='dark'] .dashboard-head h2,
body[data-theme='dark'] .overview-header h3,
body[data-theme='dark'] .info-card h4,
body[data-theme='dark'] .activity-title h4,
.app[data-theme='dark'] .dashboard-head h2,
.app[data-theme='dark'] .overview-header h3,
.app[data-theme='dark'] .info-card h4,
.app[data-theme='dark'] .activity-title h4 {
  color: #eaf0f8;
}

html[data-theme='dark'] .stat-label,
html[data-theme='dark'] .stat-sublabel,
html[data-theme='dark'] .subtext,
html[data-theme='dark'] .activity-title p,
body[data-theme='dark'] .stat-label,
body[data-theme='dark'] .stat-sublabel,
body[data-theme='dark'] .subtext,
body[data-theme='dark'] .activity-title p,
.app[data-theme='dark'] .stat-label,
.app[data-theme='dark'] .stat-sublabel,
.app[data-theme='dark'] .subtext,
.app[data-theme='dark'] .activity-title p {
  color: #97a0ad;
}

html[data-theme='dark'] .overview-section,
html[data-theme='dark'] .info-card,
html[data-theme='dark'] .activity-card,
body[data-theme='dark'] .overview-section,
body[data-theme='dark'] .info-card,
body[data-theme='dark'] .activity-card,
.app[data-theme='dark'] .overview-section,
.app[data-theme='dark'] .info-card,
.app[data-theme='dark'] .activity-card {
  background: #171b22 !important;
  border-color: #2f3643 !important;
  color: #d5dbe6;
}

html[data-theme='dark'] .card-icon,
body[data-theme='dark'] .card-icon,
.app[data-theme='dark'] .card-icon {
  background: #1b2029;
  color: #d5dbe6;
}

html[data-theme='dark'] .collapse-btn,
body[data-theme='dark'] .collapse-btn,
.app[data-theme='dark'] .collapse-btn {
  background: #1b2029;
  border-color: #323a47;
  color: #d5dbe6;
}

html[data-theme='dark'] .overview-table thead,
body[data-theme='dark'] .overview-table thead,
.app[data-theme='dark'] .overview-table thead {
  background: #1b2029;
}

html[data-theme='dark'] .overview-table th,
body[data-theme='dark'] .overview-table th,
.app[data-theme='dark'] .overview-table th {
  color: #97a0ad;
  border-bottom-color: #323a47;
}

html[data-theme='dark'] .overview-table td,
html[data-theme='dark'] .overview-table .overview-empty,
body[data-theme='dark'] .overview-table td,
body[data-theme='dark'] .overview-table .overview-empty,
.app[data-theme='dark'] .overview-table td,
.app[data-theme='dark'] .overview-table .overview-empty {
  color: #d5dbe6;
  border-bottom-color: #2d3442;
}

html[data-theme='dark'] .activity-filters,
body[data-theme='dark'] .activity-filters,
.app[data-theme='dark'] .activity-filters {
  border-top-color: #2f3643;
}

html[data-theme='dark'] .activity-card .activity-tabs,
html[data-theme='dark'] .tab-chip.active,
body[data-theme='dark'] .activity-card .activity-tabs,
body[data-theme='dark'] .tab-chip.active,
.app[data-theme='dark'] .activity-card .activity-tabs,
.app[data-theme='dark'] .tab-chip.active {
  background: #1b2029 !important;
}

html[data-theme='dark'] .tab-chip,
body[data-theme='dark'] .tab-chip,
.app[data-theme='dark'] .tab-chip {
  color: #b0b9c7;
}

html[data-theme='dark'] .tab-chip span,
body[data-theme='dark'] .tab-chip span,
.app[data-theme='dark'] .tab-chip span {
  background: #2a313d;
  color: #d5dbe6;
}

html[data-theme='dark'] .activity-search input,
html[data-theme='dark'] .activity-filters select,
body[data-theme='dark'] .activity-search input,
body[data-theme='dark'] .activity-filters select,
.app[data-theme='dark'] .activity-search input,
.app[data-theme='dark'] .activity-filters select {
  background: #1b2029 !important;
  border-color: #323a47 !important;
  color: #d5dbe6 !important;
}

html[data-theme='dark'] .activity-list,
body[data-theme='dark'] .activity-list,
.app[data-theme='dark'] .activity-list {
  background: #171b22 !important;
  border-color: #2f3643 !important;
}

html[data-theme='dark'] .activity-row,
body[data-theme='dark'] .activity-row,
.app[data-theme='dark'] .activity-row {
  border-bottom-color: #2d3442 !important;
}

html[data-theme='dark'] .activity-row:hover,
body[data-theme='dark'] .activity-row:hover,
.app[data-theme='dark'] .activity-row:hover {
  background: rgba(22, 196, 173, 0.08);
}

html[data-theme='dark'] .activity-empty,
html[data-theme='dark'] .activity-empty small,
body[data-theme='dark'] .activity-empty,
body[data-theme='dark'] .activity-empty small,
.app[data-theme='dark'] .activity-empty,
.app[data-theme='dark'] .activity-empty small {
  color: #a0a9b7;
}

html[data-theme='dark'] .ro-card,
html[data-theme='dark'] .ro-metric,
html[data-theme='dark'] .ro-error,
body[data-theme='dark'] .ro-card,
body[data-theme='dark'] .ro-metric,
body[data-theme='dark'] .ro-error,
.app[data-theme='dark'] .ro-card,
.app[data-theme='dark'] .ro-metric,
.app[data-theme='dark'] .ro-error {
  background: #171b22 !important;
  border-color: #2f3643 !important;
  color: #d5dbe6;
}

.devices-container {
  width: 100%;
  height: 100%;
  background-color: #f5f5f5;
  /* reduced wrapper padding to bring layout closer to viewport edges */
  padding: 8px;
  display: flex;
  flex-direction: column;
}

/* Skeleton loader */
.devices-skeleton {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.devices-skeleton .skeleton-card,
.devices-skeleton .skeleton-bar {
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 37%, #f3f4f6 63%);
  background-size: 400% 100%;
  animation: skeleton-loading 1.4s ease infinite;
  border-radius: 12px;
}

.devices-skeleton .skeleton-unit-card {
  height: 80px;
}

.devices-skeleton .skeleton-body {
  display: grid;
  grid-template-columns: 480px minmax(0, 1fr);
  gap: 12px;
  width: 100%;
}

.devices-skeleton .skeleton-left,
.devices-skeleton .skeleton-right {
  padding: 16px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.devices-skeleton .skeleton-pill {
  height: 40px;
  border-radius: 12px;
}

.devices-skeleton .skeleton-media {
  height: 200px;
}

.devices-skeleton .skeleton-info {
  height: 140px;
}

.devices-skeleton .skeleton-tabs {
  height: 44px;
  border-radius: 12px;
}

.devices-skeleton .skeleton-main {
  height: 420px;
}

@keyframes skeleton-loading {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}

.devices-layout {
  display: grid;
  /* left: info, right: main content */
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 30px;
  height: auto;
  width: 100%;
  align-items: stretch;
  justify-items: stretch;
}

/* Units > Details banner messages (theme-aware) */
.unit-details-banner {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.25;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--surface-muted);
}

.unit-details-banner--warn {
  color: var(--text-muted);
}

.unit-details-banner--error {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 45%, var(--border-color));
  background: color-mix(in srgb, var(--danger) 8%, var(--surface-muted));
}

/* ensure grid children can shrink/overflow correctly when internal scrolling is used */
.devices-layout > * {
  min-height: 0;
}

/* Unified panel header style - apply same look to all panel headers */
.devices-panel-header,
.control-header,
.control-section-header,
.control-header-card,
.device-section-header,
.system-info-header {
  padding: 0 16px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  border-radius: 12px 12px 0 0;
}

/* Ensure `device-section-header` and `control-section-header` explicitly
   use the same background style as `system-info-header` (visual sync) */
.device-section-header,
.control-section-header {
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  color: #1f2937;
}

/* Panel outline - subtle 1px border and matching radius to mirror header divider */
.panel-outline,
.device-section,
.devices-center-panel,
.control-panel,
.control-section,
.control-header-card,
.devices-right-panel,
.system-players-content,
.device-info-card {
  /* unified subtle border for all card elements */
  border: 1px solid #e5e7eb;
  background: #ffffff;
  border-radius: 12px;
}

/* Ensure the three main columns share the same outer panel style
   so left, control and right panels look identical */
.devices-left-panel,
.devices-center-panel,
.control-panel,
.devices-right-panel {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  /* unified outer panel shadow */
  box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important;
}



/* Left Panel - Device Info */
.devices-left-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  /* remove right-side padding so the left panel's edge touches the control panel */
  padding-right: 0;
  /* round the outer left panel container so it matches other panels */
  border-radius: 12px;
  overflow: hidden;
}

/* Remove right-edge radii on left-panel cards so panels visually butt together */
.devices-left-panel .device-section,
.devices-left-panel .device-info-card,
.devices-left-panel .device-section-header {
  /* remove radii on left-panel blocks so the card appears square */
  border-radius: 0;
}

/* remove the outer border on the left panel's inner info card so the
   outer left-panel container provides the border instead */
.devices-left-panel .device-info-card {
  border: none;
}

/* also remove the border on the inner device-section inside the left panel
   so the left panel appears as a single bordered container */
.devices-left-panel .device-section {
  border: none;
}

/* Remove left-panel shadows and ensure card backgrounds match the control panel
   so the two panels visually join without a visible gap. */
.devices-left-panel .device-section,
.devices-left-panel .device-info-card,
.devices-left-panel .device-section-header {
  box-shadow: none;
  background: #ffffff;
}

/* Apply the same spacing/padding/gap from the left panel to center and right panels */
.devices-left-panel,
.devices-center-panel,
.devices-right-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Consistent inner card padding so contents align across columns */
.device-info-card,
.control-panel,
.devices-right-panel {
  padding: 16px;
  box-sizing: border-box;
}

/* Left `device-section` should have no inner padding so the header
   sits flush with the card top (matches right-panel header style). */
.devices-left-panel .device-section {
  padding: 0;
}

/* Constrain left panel to match fixed column width */
.devices-left-panel {
  max-width: 420px;
}

/* Match old TechDesk left panel width */
.devices-left-panel {
  max-width: 420px;
}

/* Top tabs above device detail card (sample style) */
.device-primary-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: #f3f4f6;
  border-radius: 12px;
  padding: 6px;
}

.device-mobile-media-actions {
  display: none;
  flex-basis: 100%;
  width: 100%;
  gap: 6px;
  padding-top: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  flex-wrap: nowrap;
}

.device-mobile-media-actions .device-media-btn {
  white-space: nowrap;
  flex: 0 0 auto;
}

.device-mobile-media-actions .device-media-btn.active {
  background: #ffffff;
  color: #0f172a;
  border-color: #cbd5e1;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1);
}

.device-mobile-media-actions::-webkit-scrollbar {
  display: none;
}


.device-tab {
  border: none;
  background: transparent;
  color: #4b5563;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.device-tab.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1);
}

.device-tab-active-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1);
  font-size: 0.82rem;
  font-weight: 600;
}

.device-tab-close {
  border: none;
  background: #f3f4f6;
  color: #6b7280;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  line-height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.device-tab-close:hover {
  background: #e5e7eb;
  color: #111827;
}

/* Make the left Info card taller and sticky so details remain visible */
.devices-left-panel .device-section,
.devices-left-panel .device-info-card {
  /* flow naturally within the left panel so the full content is visible
     and the page can scroll to reveal elements (like the Edit button) */
  position: static;
  /* stretch to fill the full width of the left panel */
  align-self: stretch;
  width: 100%;
  height: auto; /* size according to content */
  max-height: none;
  overflow: visible;
  box-sizing: border-box;
}

.devices-left-panel .device-info-card { padding: 16px; }

.device-quick-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  align-items: center;
  flex-wrap: wrap;
  background: #f3f4f6;
  border-radius: 12px;
  padding: 6px;
}

.device-quick-btn {
  background: transparent;
  border: none;
  color: #4b5563;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.device-quick-btn:hover {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1);
}

.device-quick-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.16);
  border: 1px solid #e5e7eb;
}

.device-info-section {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.device-info-section + .device-info-section {
  margin-top: 12px;
}

/* Ensure the left Info header matches the right panel header styling */
.devices-left-panel .device-section-header {
  /* match right panel header appearance */
  padding: 0 16px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  border-radius: 12px 12px 0 0;
}

.devices-left-panel .device-section-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #1f2937;
}

/* Refresh button inside the left header - match open-archive-top: square, subtle border, centered icon */
.devices-left-panel .device-section-header .refresh-btn {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #F3E8FF; /* match full-screen/open-archive button border */
  color: #0b59d6; /* icon color for light theme */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(2,6,23,0.04);
}

.devices-left-panel .device-section-header .refresh-btn .refresh-icon {
  width: 20px;
  height: 20px;
}

/* Ensure the control sidebar inside the main devices container
   is sticky but sizes to its content (grows/shrinks) instead of
   using a fixed height. This rule is purposely scoped to the
   devices container to avoid affecting other pages. */
.devices-container .devices-center-panel {
  position: sticky;
  top: 100px; /* match header offset */
  height: auto;
  max-height: none;
  overflow: visible;
  align-self: flex-start;
  box-sizing: border-box;
}


/* Make middle (Control) and right (Player) panels sticky/capped so
   they remain visible while their inner content can scroll. Placed
   after other rules to ensure these values override defaults. */
.devices-center-panel,
.devices-right-panel {
  position: sticky;
  top: 100px; /* leaves space for header/breadcrumbs */
  align-self: flex-start;
  /* grow/shrink with content instead of using a fixed cap */
  height: auto;
  max-height: none;
  overflow: visible;
  box-sizing: border-box;
}

/* Slightly reduce inner padding so content fits better inside capped height */
.control-panel, .devices-right-panel .system-info-content {
  padding: 12px;
  border-radius: 0;
}

/* Control Sidebar */
.devices-center-panel {
  background: white;
  border-radius: 12px;
  /* ensure left-side radii match other panels */
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
  /* reduce shadow slightly for a subtle depth */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  /* let the center panel size to its content so it grows/shrinks naturally */
  height: auto;
  max-height: none;
  overflow-y: visible;
  /* keep a fixed, non-shrinking width so zoom changes don't collapse it */
  width: 280px;
  min-width: 280px;
  max-width: 280px;
  flex: 0 0 280px;
  /* avoid automatic text-size adjustments on some platforms */
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
       text-size-adjust: 100%;
  min-height: 0;
  box-sizing: border-box;
  z-index: 1;
}

.control-header {
  padding: 0 16px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
  display: flex;
  align-items: center;
  min-height: 56px;
  /* ensure header radii match panel */
  border-top-left-radius: 12px;
}

.control-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
}

.device-name-small {
  display: block;
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
  font-weight: 500;
}

.control-menu {
  display: flex;
  flex-direction: column;
  padding: 8px 0;
}

.control-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #6b7280;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  border-left: 3px solid transparent;
}

.control-menu-item:hover {
  background: #f3f4f6;
  color: #374151;
}

/* Remove ugly focus outline on menu items while keeping accessibility via :focus-visible if needed */
.control-menu-item:focus {
  outline: none;
  box-shadow: none;
}

.control-menu-item:focus-visible {
  outline: 2px solid rgba(11,89,214,0.18);
  outline-offset: 2px;
}

.control-menu-item.active {
  background: #eff6ff;
  color: #0b59d6;
  border-left-color: #0b59d6;
  font-weight: 600;
}

.menu-icon {
  font-size: 16px;
  min-width: 16px;
}

.menu-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Control Panel */
.control-panel {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  /* ensure left-side radii match other panels */
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  /* allow the panel to grow to fill the sidebar and let its inner content scroll */
  flex: 1 1 auto;
  overflow: hidden;
}

.control-panel-content h3 {
  margin: 0 0 16px 0;
  font-size: 20px;
  font-weight: 700;
  color: #1f2937;
}

.no-panel-selected {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 300px;
  color: #9ca3af;
  font-size: 16px;
}

.panel-info {
  color: #6b7280;
  font-size: 14px;
  margin: 16px 0;
}

/* Player List */
.player-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.player-card {
  width: 100px;
  background: #ffffff;
  border-radius: 14px;
  /* reduced padding to better fit a narrower card */
  padding: 12px 12px 10px 20px;
  box-shadow: 0 2px 6px rgba(16,24,40,0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  cursor: pointer;
  border: none;
  position: relative;
  overflow: visible;
  height: auto; /* let cards size to content */
}

.player-card.selected {
  box-shadow: 0 6px 20px rgba(16,185,129,0.08);
  border-color: rgba(16,185,129,0.18);
}

.player-card-icon {
  font-size: 28px;
  margin-bottom: 10px;
  color: #111827;
}

.player-card-id {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  padding: 6px 0 0 0;
}

.player-card-status {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin-top: 10px;
  position: relative;
  z-index: 2;
}
.player-card-status::before {
  content: '';
  position: absolute;
  left: -8px;
  top: -8px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(16,185,129,0.08);
  z-index: 1;
}
.player-card-status.online { background: #10b981; }
.player-card-status.offline { background: #ef4444; }
.player-card-status.offline::before { background: rgba(239,68,68,0.06); }
.player-card-status.online::before { background: rgba(16,185,129,0.08); }

.player-system-info { 
  margin-top: 12px;
  border-top: 1px solid #e5e7eb;
  padding-top: 12px;
}

/* Decorative left stripe indicating status -- disabled to remove inner stripe */
.player-card::before,
.player-card::after {
  content: none;
  display: none;
}
.player-card.online::before { background: transparent; }
.player-card.offline::before { background: transparent; }
.player-card.online::after { background: transparent; }
.player-card.offline::after { background: transparent; }

.player-card-body {
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
  width:100%;
}

.player-card-footer {
  position: static; /* flow with content for responsive height */
  width: calc(100% - 24px);
  height: 56px;
  background: #f1f5f9; /* very light band */
  display:flex;
  align-items:center;
  justify-content:center;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  margin-top: 12px;
  margin-bottom: 0;
}

.player-copy-btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #ffffff;
  border: none;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow: 0 6px 18px rgba(2,6,23,0.06);
  font-size: 16px;
  cursor: pointer;
}
.player-copy-btn.online { background:#10b981; color:#fff }
.player-copy-btn.offline { background:#ef4444; color:#fff }
.player-copy-btn:active { transform: translateY(1px); }

.player-system-info {
  margin-top: 12px;
  border-top: 1px solid #e5e7eb;
  padding-top: 12px;
  padding-bottom: 0;
}

.player-system-info h4 {
  margin: 0 0 12px 0;
  font-size: 13px;
  color: #374151;
  letter-spacing: 0.02em;
}

.player-mac-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.mac-card-header {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  text-align: center;
}

.mac-card-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mac-code {
  flex: 1;
  background: rgba(255, 255, 255, 0.95);
  color: #1f2937;
  padding: 8px 12px;
  border-radius: 6px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mac-copy-button {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.mac-copy-button:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.mac-copy-button:active {
  transform: translateY(0);
}


.info-grid { display: flex; flex-direction: column; gap: 4px; }
/* Use a fixed label column and flexible value column for consistent alignment */
.info-grid .row { display: grid; grid-template-columns: 240px 1fr; -moz-column-gap: 28px !important; column-gap: 28px !important; align-items: center; padding: 6px 0; border-bottom: 1px solid #f3f4f6; }
.info-grid .label { color: #6b7280; font-size: 13px; font-weight: 700; text-align: left; padding-left: 12px; }
.info-grid .value { color: #111827; font-size: 13px; text-align: left; white-space: nowrap; padding-left: 12px; }
.info-grid .info-section-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7280;
  padding: 14px 12px 6px 12px;
  border-bottom: 1px solid #e5e7eb;
}

.player-actions {
  width: 100%;
  display:flex;
  justify-content:flex-start;
  gap:12px;
  padding:12px 0 0 0;
  border-top: 1px solid #eaeaea;
  margin-top: 12px;
  box-sizing: border-box;
}
.player-actions button { padding:10px 16px; border-radius:8px; border:none; cursor:pointer; font-weight:700; font-size:13px }
.player-actions .add-player { background: var(--accent); color: var(--accent-contrast) }
.player-actions .add-player:hover { background: var(--accent-light); }
.player-actions .retire-player { background: var(--danger); color: var(--accent-contrast) }
.player-actions .retire-player:hover { background: var(--danger-light); }
.player-actions .restore-player { background: var(--success); color: var(--accent-contrast) }
.player-actions .restore-player:hover { background: var(--success-light); }
.player-actions .move-player { background: var(--success); color: var(--accent-contrast) }
.player-actions .move-player:hover { background: var(--success-light); }
.player-actions .report-fault-inline { background: var(--danger); color: var(--accent-contrast) }

.player-actions { margin-top: 14px; display:flex; gap:12px; }
.player-actions button { padding:8px 12px; border-radius:6px; border:none; cursor:pointer; font-weight:600 }

.report-fault-top {
  background: var(--danger);
  color: var(--accent-contrast);
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}
.report-fault-top:hover { background: var(--danger-light); }

.open-archive-top {
  background: #ffffff;
  color: #0b59d6;
  border: 1px solid #F3E8FF;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
}
.open-archive-top:hover { background: #eff6ff; }

/* Camshots modal specific adjustments */
.modal-content.camshots-modal {
  /* widened to comfortably fit six larger thumbnails */
  max-width: 1720px !important;
  width: 98% !important;
  padding: 8px 12px 12px 12px;
  position: relative;
}
.modal-content.camshots-modal .modal-title {
  padding: 14px 48px 14px 18px;
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: none;
  background: rgba(0,0,0,0.06);
  color: #111827;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover { background: rgba(0,0,0,0.12); }

.camshot-archive-wrap {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.camshot-dates { width: 92px; display:flex; flex-direction:column; gap:10px; padding-left:2px; padding-right:6px; max-height: none; height: auto; overflow: visible; flex: 0 0 auto; }
.camshot-thumbs { flex: 1; padding-left: 8px; max-height: calc(80vh - 140px); overflow: auto; }
/* Force exactly 6 thumbnails per row but use flexible columns so the
   grid never requires horizontal scrolling. */
.thumbs-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
  justify-content: start;
}
.thumb-item {
  display:flex;
  flex-direction:column;
  width: 220px;
}
.thumb-img-wrapper { width: 100%; height: calc(220px * 9 / 16); overflow:hidden; border-radius:8px; background:#000 }
.thumb-img { width:100%; height:100%; -o-object-fit:cover; object-fit:cover; display:block }
.thumb-caption { padding: 8px 6px; font-size: 13px; color: #6b7280; background: #fff; border-radius:0 0 6px 6px; margin-top:8px; text-align:left }


/* Override: enforce six responsive columns and remove horizontal scrolling
   for both modal and right-panel camshots views. These rules are scoped
   to be later in the stylesheet so they take precedence over earlier
   fixed-width column definitions. */
.camshot-archive-wrap .thumbs-grid,
.camshots-archive .thumbs-grid {
  display: grid;
  /* right-panel: 4 responsive columns */
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
  justify-content: start;
}
.modal-content.camshots-modal .thumbs-grid {
  display: grid;
  /* modal: 6 responsive columns */
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
  justify-content: start;
}
.camshot-archive-wrap .thumb-item,
.modal-content.camshots-modal .thumb-item,
.camshots-archive .thumb-item {
  display: flex;
  flex-direction: column;
  width: auto; /* let grid control column width */
  border-radius: 0; /* remove rounded card corners so image edges are square */
  overflow: visible;
}
.camshot-archive-wrap .thumb-img-wrapper,
.modal-content.camshots-modal .thumb-img-wrapper,
.camshots-archive .thumb-img-wrapper {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 0; /* square image corners */
  background: #000;
}
.camshot-archive-wrap .thumb-img,
.modal-content.camshots-modal .thumb-img,
.camshots-archive .thumb-img { width:100%; height:100%; -o-object-fit:cover; object-fit:cover; display:block }
.thumb-caption { padding: 6px 8px; font-size: 12px; color: #6b7280; background: #fff; border-radius:0; margin-top:6px; text-align:left; line-height:1.1 }

.archive-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.archive-days {
  width: 100%;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  background: #fff;
  font-size: 12px;
}

.btn.btn-capture {
  background: #0b59d6;
  color: #fff;
  border: none;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}
.btn.btn-capture:disabled {
  opacity: 0.6;
  cursor: default;
}

.btn-spinner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: #0b1220;
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.2);
  font-size: 13px;
  z-index: 9999;
}

.toast-success {
  background: #16a34a;
}

.thumb-fallback {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.thumb-empty {
  background: #f3f4f6;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

/* Reference-style archive layouts */
.screenshots-archive {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.screenshots-topbar {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}

.screenshots-dates-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.screenshots-dates-row .date-btn {
  min-width: 78px;
  padding: 6px 8px;
  border: 1px solid #d1d5db;
  border-radius: 2px;
  background: #fff;
  font-size: 12px;
  color: #1f2937;
}

.screenshots-thumbs {
  max-height: calc(100vh - 270px);
  overflow: auto;
}

.archive-actions.archive-actions-inline {
  flex-direction: row;
  margin-top: 0;
  align-items: center;
}

.archive-actions.archive-actions-inline .archive-days {
  width: 126px;
}

.archive-range-label {
  font-size: 12px;
  color: #6b7280;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 6px 10px;
  white-space: nowrap;
}

.thumb-overlay-time {
  position: absolute;
  left: 6px;
  bottom: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: rgba(0, 0, 0, 0.68);
  padding: 2px 5px;
  border-radius: 3px;
  line-height: 1.1;
}

.camshots-archive .thumb-img-wrapper,
.screenshots-archive .thumb-img-wrapper {
  position: relative;
}

/* Modal-specific sizing: increase popup height and inner scroll areas */
.modal-content.camshots-modal {
  max-height: 92vh !important;
  overflow: auto;
}
.modal-content.camshots-modal .camshot-thumbs,
.modal-content.camshots-modal .camshot-dates {
  max-height: calc(88vh - 160px);
  overflow-y: auto;
  overflow-x: hidden;
}

/* Right-panel: allow system info to grow so all dates are visible
   and keep thumbnails as the scrolling area. */
.devices-right-panel .system-info-content {
  max-height: calc(100vh - 120px);
  overflow: visible;
}
.devices-right-panel .system-info-content .camshot-archive-wrap {
  align-items: flex-start;
}
.camshot-thumbs {
  /* limit thumbs area so thumbnails scroll independently while dates remain visible */
  max-height: calc(100vh - 220px);
  overflow: auto;
}

/* Remove 1px border lines on the three main device panels (left, center, right) */
.devices-left-panel,
.devices-center-panel,
.devices-right-panel {
  border: none !important;
}



.player-item {
  padding: 10px 12px;
  background: #f3f4f6;
  border-radius: 6px;
  font-size: 13px;
  color: #374151;
}

/* Activity Log */
.activity-log {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.activity-item {
  padding: 12px;
  background: #f9fafb;
  border-left: 3px solid #0b59d6;
  border-radius: 4px;
  font-size: 13px;
  color: #374151;
  line-height: 1.5;
}

/* New activity list styles (sample-like) */
.activity-panel .activity-list { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.activity-entry { display: flex; gap: 12px; padding: 12px 8px; border-bottom: 1px solid #eef2f6; align-items:flex-start; position:relative; }
.activity-avatar { width: 48px; height: 48px; border-radius: 50%; background: #e6e9ee; flex: 0 0 48px; }
.activity-content { flex: 1; padding-right: 120px; }
.activity-row { display:flex; gap:12px; align-items:center; }
.activity-tag { background: #10b981; color: #fff; padding: 4px 8px; border-radius: 4px; font-size: 12px; font-weight:700; }
.activity-title { font-weight: 600; color: #1f2937; }
.activity-meta { color: #6b7280; font-size: 13px; margin-top: 6px; }
.activity-actions { display:flex; flex-direction:column; align-items:flex-end; gap:8px; margin:0; position:absolute; right:12px; top:50%; transform:translateY(-50%); }
.scope-select { width:92px; height:28px; padding:4px 8px; border:1px solid #e5e7eb; border-radius:6px; background:#fff; font-size:13px; }
.delete-activity { width:92px; height:28px; background:#f3f4f6; border:1px solid #e5e7eb; color:#374151; padding:4px 8px; border-radius:6px; cursor:pointer; font-size:13px; }
.delete-activity:hover { background:#ef4444; color:#fff; border-color:transparent; }
.empty-activity { color:#9ca3af; padding:12px; }
.activity-meta .meta-date { margin-left: 12px; color: #9ca3af; font-weight: 500; }

.activity-comment { margin-top: 14px; }
.activity-textarea { width: 100%; min-height: 100px; border: 1px solid #e5e7eb; border-radius: 4px; padding: 12px; resize: vertical; }
.activity-controls { display:flex; align-items:center; gap:12px; margin-top:8px; }
.activity-checkbox { color:#374151; font-weight:600; display:flex; align-items:center; gap:8px; }
.btn-post { background: #2b9cf0; color: #fff; border: none; padding: 8px 14px; border-radius:6px; cursor:pointer; }

/* Live Cam / Live Screen placeholders */
.livecam-placeholder,
.liveview-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #f5f7fa;
  border: 2px dashed #e8eef3;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  color: #9ca3af;
  margin: 12px 0;
}
.livecam-icon,
.liveview-icon { font-size: 36px; }
.livecam-text,
.liveview-text { font-size: 14px; font-weight: 700; color: #374151; }
.livecam-controls,
.liveview-controls { display:flex; gap:8px; margin-top:8px; }
.control-panel-content .btn { padding: 8px 12px; border-radius:6px; border: 1px solid #e5e7eb; background: #ffffff; cursor: pointer; }
.control-panel-content .btn:hover { background: #f3f4f6; }

/* More specific selectors so these override the generic .control-panel-content .btn white background */
.control-panel-content .btn.btn-start {
  background: var(--success);
  color: var(--accent-contrast);
  border: 1px solid rgba(16,185,129,0.12);
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 700;
  box-shadow: none;
}
.control-panel-content .btn.btn-start:hover { background: var(--success-light); }
.control-panel-content .btn.btn-start:focus { outline: none; box-shadow: none; }
.control-panel-content .btn.btn-disable {
  background: var(--danger);
  color: var(--accent-contrast);
  border: 1px solid rgba(239,68,68,0.12);
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 700;
  box-shadow: none;
}
.control-panel-content .btn.btn-disable:hover { background: var(--danger-light); }
.control-panel-content .btn.btn-disable:focus { outline: none; box-shadow: none; }

/* Live feed styles for right-panel */
.info-alert {
  background: #fff7e6;
  border: 1px solid #f0e6c8;
  color: #6b4f1a;
  padding: 12px;
  border-radius: 6px;
}
.btn-start {
  background: var(--success);
  color: var(--accent-contrast);
  border: 1px solid rgba(16,185,129,0.12);
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 700;
  transition: transform 120ms ease, filter 120ms ease;
}
.btn-start:hover { background: var(--success-light); transform: translateY(-1px); }
.btn-start:focus { outline: none; box-shadow: none; }
.btn-disable {
  background: var(--danger);
  color: var(--accent-contrast);
  border: 1px solid rgba(239,68,68,0.12);
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 700;
  transition: transform 120ms ease, filter 120ms ease;
}
.btn-disable:hover { background: var(--danger-light); transform: translateY(-1px); }
.btn-disable:focus { outline: none; box-shadow: none; }
.live-feed-container {
  width: 100%;
  display: block;
  position: relative;
  overflow: hidden;
}
.live-feed-container.landscape {
  aspect-ratio: 16 / 9;
}
.live-feed-container.portrait {
  aspect-ratio: 9 / 16;
}
.live-feed-container {
  border-radius: 6px;
  overflow: hidden;
}
.live-feed-img { width: 100%; height: 100%; display:block; background: #000; -o-object-fit: cover; object-fit: cover; }
.live-feed-img img { width: 100%; height: 100%; -o-object-fit: cover; object-fit: cover; display: block; }

/* Fullscreen overlay for live screen */
.fullscreen-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fullscreen-media {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fullscreen-media img { width: 100%; height: 100%; -o-object-fit: contain; object-fit: contain; }
.fullscreen-close {
  position: fixed;
  top: 18px;
  right: 18px;
  background: rgba(255,255,255,0.9);
  color: #111827;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-weight: 700;
  z-index: 10000;
  cursor: pointer;
}
.live-feed-meta { font-size: 12px; color: #9ca3af; padding: 8px 12px; background: #fff; }

/* Replace inline-style boxes with class-based controls: inline-info (yellow notices) and inline-wrap (light panels)
   These classes are added to Devices.tsx to avoid relying on brittle attribute selectors. */
.inline-info {
  margin-top: 12px;
  padding: 12px;
  border-radius: 4px;
  background: #fff8d6;
  color: #6b4b00;
}

.inline-wrap {
  background: #f8fafc;
  color: #0f172a;
  padding: 12px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.empty-history { text-align: center; color: #6b7280; }



/* Browser Fullscreen API styling: make the live-feed container fill the viewport */
.live-feed-container:fullscreen .live-feed-img,
.live-feed-container:-webkit-full-screen .live-feed-img,
.live-feed-container:-ms-fullscreen .live-feed-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Uptime chart styles */
.uptime-chart { background: #ffffff; border: 1px solid #eef2ff; border-radius: 8px; padding: 8px; }
.uptime-panel h4 { margin: 0 0 8px 0; }

/* Commands Grid */
.commands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin: 12px 0;
}

.command-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 128px;
  padding: 16px 12px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  text-align: center;
}

.command-btn:hover {
  background: #f8fafc;
  border-color: #F3E8FF;
  color: #0b59d6;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(2, 6, 23, 0.06);
}

.command-btn:focus-visible {
  outline: 2px solid #7C3AED;
  outline-offset: 2px;
}

/* PC Commands panel layout (sample-like) */
.pc-commands-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}


.pc-commands-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.pc-commands-chips {
  display: flex;
  gap: 8px;
  background: #f3f4f6;
  padding: 6px;
  border-radius: 12px;
}

.pc-chip {
  border: none;
  background: transparent;
  color: #374151;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 6px 10px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pc-chip span {
  background: #e5e7eb;
  color: #6b7280;
  border-radius: 999px;
  padding: 2px 6px;
  font-size: 0.7rem;
  font-weight: 700;
}

.pc-chip.active {
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.pc-commands-categories {
  display: flex;
  gap: 8px;
  background: #f3f4f6;
  padding: 6px;
  border-radius: 12px;
}

.pc-cat {
  border: none;
  background: transparent;
  color: #4b5563;
  font-size: 0.85rem;
  padding: 6px 10px;
  border-radius: 10px;
}

.pc-cat.active {
  background: #ffffff;
  color: #111827;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.cmd-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #f3f4f6;
  display: grid;
  place-items: center;
}

.cmd-tag {
  margin-top: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #10b981;
  background: #e8f7f1;
  border-radius: 999px;
  padding: 2px 8px;
}
.pc-pending-pill {
  width: -moz-fit-content;
  width: fit-content;
  background: #f59e0b;
  color: #111827;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.pc-commands-footer {
  margin-top: 6px;
}

.pc-offline-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 14px;
}

.pc-offline-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pc-offline-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #e0f2fe;
  color: #0ea5e9;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.pc-offline-title {
  font-weight: 700;
  color: #111827;
}

.pc-offline-sub {
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 2px;
}

.pc-schedule-btn {
  border-radius: 999px;
  padding: 8px 16px;
  background: #e0f2f1;
  color: #7C3AED;
  border: 1px solid #b9e6d5;
  font-weight: 700;
}

.pc-schedule-btn:disabled {
  background: #e5e7eb;
  color: #9ca3af;
  border-color: #e5e7eb;
  cursor: not-allowed;
}
.command-btn.selected {
  background: #eff6ff;
  color: #0b59d6;
  border-color: #60a5fa;
  box-shadow: inset 0 0 0 1px #93c5fd;
  font-weight: 700;
}
.cmd-svg { width: 24px; height: 24px; display:block; filter: none; }
.command-btn img.cmd-svg { width: 24px; height: 24px; -o-object-fit: contain; object-fit: contain; }
.command-btn .cmd-label { font-size: 13px; color: #374151; }

/* Content tab (sample-style) */
.content-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 12px 12px 12px;
}

.content-tabs {
  display: flex;
  gap: 8px;
  background: #f3f4f6;
  padding: 6px;
  border-radius: 12px;
  width: -moz-fit-content;
  width: fit-content;
  margin: 12px;
}

.content-tab {
  border: none;
  background: transparent;
  color: #4b5563;
  font-size: 0.85rem;
  padding: 6px 12px;
  border-radius: 10px;
}

.content-tab.active {
  background: #ffffff;
  color: #111827;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.content-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  overflow: hidden;
}

.content-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #eef2f7;
}

.content-card-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.content-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f3f4f6;
  color: #111827;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.7rem;
}

.content-title-text {
  font-weight: 700;
  color: #111827;
}

.content-range {
  display: flex;
  gap: 6px;
  background: #f3f4f6;
  padding: 4px;
  border-radius: 10px;
}

.content-range button {
  border: none;
  background: transparent;
  color: #4b5563;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
}

.content-range button.active {
  background: #ffffff;
  color: #111827;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.content-card-body {
  padding: 16px;
}

.content-empty {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px 16px;
  text-align: center;
  color: #6b7280;
  background: #ffffff;
}

.content-empty.danger {
  background: #fdecec;
  border-color: #fca5a5;
}

.content-empty-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #f3f4f6;
  color: #111827;
  display: grid;
  place-items: center;
  font-weight: 700;
  margin: 0 auto 10px;
}

.content-empty-title {
  font-weight: 700;
  color: #ef4444;
  margin-bottom: 6px;
}

.content-empty-text {
  font-size: 0.85rem;
  color: #6b7280;
  line-height: 1.5;
}

.content-footnote {
  display: flex;
  gap: 16px;
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 12px;
}

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

.content-center {
  padding: 32px 16px;
}

.content-ghost-btn {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 0.8rem;
  color: #4b5563;
}

.content-note {
  font-size: 0.8rem;
  color: #6b7280;
  margin-bottom: 12px;
}

@media (max-width: 980px) {
  .content-split {
    grid-template-columns: 1fr;
  }
}

/* Diagnostics tab */
.diagnostics-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.diagnostics-tabs {
  display: flex;
  gap: 8px;
  background: #f3f4f6;
  padding: 6px;
  border-radius: 12px;
  width: -moz-fit-content;
  width: fit-content;
  flex-wrap: wrap;
  margin: 12px;
}

.diag-tab {
  border: none;
  background: transparent;
  color: #4b5563;
  font-size: 0.85rem;
  padding: 6px 12px;
  border-radius: 10px;
}

.diag-tab.active {
  background: #ffffff;
  color: #111827;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.diag-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 12px 12px 12px;
}

.diag-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.diag-alert-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.diag-alert-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #fee2e2;
  color: #ef4444;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.diag-alert-title {
  font-weight: 700;
  color: #111827;
}

.diag-alert-sub {
  font-size: 0.85rem;
  color: #6b7280;
}

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

.diag-health {
  background: #fef3c7;
  color: #b45309;
  font-weight: 700;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.75rem;
}

.diag-ghost-btn {
  background: #e0f2f1;
  color: #7C3AED;
  border: 1px solid #b9e6d5;
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 700;
  font-size: 0.8rem;
}

.diag-section-title {
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.diag-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 16px;
}

.diag-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.diag-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f3f4f6;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.diag-card-main {
  flex: 1;
}

.diag-card-title {
  font-weight: 700;
  color: #111827;
}

.diag-card-sub {
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 2px;
}

.diag-pill {
  background: #fde68a;
  color: #b45309;
  font-weight: 700;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.75rem;
}

.diag-card-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 12px;
  border-top: 1px solid #eef2f7;
  padding-top: 12px;
}

.diag-subtitle {
  font-size: 0.75rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.diag-list {
  margin: 0;
  padding-left: 16px;
  color: #4b5563;
  font-size: 0.85rem;
}

.diag-suggestion {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
}

.diag-tag {
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.diag-tag.critical {
  background: #fee2e2;
  color: #ef4444;
}

.diag-tag.high {
  background: #ffedd5;
  color: #f97316;
}

.diag-suggestion-main {
  flex: 1;
}

.diag-suggestion-title {
  font-weight: 700;
  color: #111827;
}

.diag-suggestion-sub {
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 2px;
}

.diag-chevron {
  color: #9ca3af;
  font-size: 1.2rem;
}

.diag-toggle {
  display: flex;
  gap: 6px;
  background: #f3f4f6;
  padding: 4px;
  border-radius: 10px;
}

.diag-toggle button {
  border: none;
  background: transparent;
  color: #4b5563;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
}

.diag-toggle button.active {
  background: #ffffff;
  color: #111827;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.diag-empty {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 32px 16px;
  text-align: center;
  color: #6b7280;
  background: #ffffff;
}

.diag-empty-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #f3f4f6;
  color: #111827;
  display: grid;
  place-items: center;
  font-weight: 700;
  margin: 0 auto 10px;
}

.diag-empty-title {
  font-weight: 700;
  color: #111827;
}

.diag-empty-sub {
  margin-top: 6px;
  font-size: 0.85rem;
  color: #6b7280;
}

.diag-card-body {
  margin-top: 10px;
  color: #6b7280;
  font-size: 0.85rem;
}

.diag-embed {
  margin-top: 12px;
}

@media (max-width: 980px) {
  .diag-card-split {
    grid-template-columns: 1fr;
  }
}


/* Unit name card */
.unit-name-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
}

.unit-name-card-top {
  margin: 12px 0 16px 0;
}

.unit-name-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.unit-status-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #dc2626;
  border: 2px solid #b91c1c;
  color: #ffffff;
  position: relative;
}

.unit-status-icon.online {
  background: #16a34a;
  border-color: #15803d;
}

.unit-status-icon.unassigned {
  background: #f59e0b;
  border-color: #d97706;
}

.unit-status-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
}

.unit-name-title {
  font-weight: 800;
  color: #111827;
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.unit-name-title .unit-status-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  flex: none;
}

.unit-name-meta {
  display: flex;
  gap: 12px;
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 4px;
}

.unit-name-tags {
  display: flex;
  gap: 8px;
  align-items: center;
}

.unit-health-widgets {
  display: flex;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.unit-health-widget {
  min-width: 120px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
}

.unit-health-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7280;
}

.unit-health-value {
  font-weight: 700;
  color: #111827;
  margin-top: 4px;
  font-size: 0.9rem;
}

.unit-health-bar {
  height: 6px;
  background: #e5e7eb;
  border-radius: 999px;
  margin-top: 6px;
  overflow: hidden;
}

.unit-health-bar span {
  display: block;
  height: 100%;
  background: #22c55e;
  border-radius: 999px;
}

.unit-report-btn {
  background: #ef4444;
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 6px 18px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.unit-report-btn:hover {
  background: #dc2626;
}


.unit-name-stats .stat-item {
  margin: 0;
}

.unit-tag {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  background: #e5e7eb;
  color: #374151;
  text-transform: uppercase;
  height: 36px;
  min-width: 96px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.unit-tag.primary {
  background: #F3E8FF;
  color: #6D28D9;
}

.unit-tag.online {
  background: #dcfce7;
  color: #15803d;
}

.unit-tag.offline {
  background: #fee2e2;
  color: #ef4444;
}

.unit-tag.unassigned {
  background: #e5e7eb;
  color: #374151;
}

.cmd-icon {
  font-size: 24px;
}

/* Command Section */
.command-section {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  align-items: flex-end;
}

.command-section label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 4px;
  display: block;
}

.command-select {
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 13px;
  color: #374151;
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.command-select:hover {
  border-color: #0b59d6;
}

.command-select:focus {
  outline: none;
  border-color: #0b59d6;
  box-shadow: 0 0 0 3px rgba(11, 89, 214, 0.1);
}

.send-btn {
  padding: 8px 24px;
  background: #10b981;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 13px;
}

.send-btn:hover {
  background: #059669;
}

@media (max-width: 1200px) {
  .pc-commands-panel .pc-commands-grid-wrapper {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .commands-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .commands-grid {
    grid-template-columns: 1fr;
  }
}


/* Terminal */
.terminal-window {
  background: #1e1e1e;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  overflow: hidden;
  margin: 16px 0;
  font-family: 'Courier New', monospace;
}

.terminal-header {
  background: #dc2626;
  color: white;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
}

.terminal-body {
  padding: 16px;
  color: #a3a3a3;
  font-size: 12px;
  line-height: 1.6;
  max-height: 200px;
  overflow-y: auto;
}

.terminal-btn {
  padding: 8px 16px;
  background: #0b59d6;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  font-size: 13px;
  margin-top: 12px;
}

.terminal-btn:hover {
  background: #0947aa;
}

/* Chart and Gallery Placeholders */
.chart-placeholder,
.gallery-placeholder {
  height: 200px;
  background: #f9fafb;
  border: 2px dashed #e5e7eb;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 14px;
  margin-top: 16px;
}

/* Right Panel */
.devices-right-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  flex: 1 1 auto;
  height: auto; /* let content determine height */
  min-width: 0; /* allow the panel to shrink inside grid */
  align-items: stretch;
  justify-self: stretch;
}

.device-section {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.device-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
  min-height: 56px;
}

.device-section-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #222;
  letter-spacing: -0.3px;
}

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

.device-info-card {
  background: transparent;
  border-radius: 0;
  padding: 12px;
  box-shadow: none;
}

.device-header {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 0;
  border-bottom: none;
}

.device-status {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 3px;
}

.status-indicator.online {
  background-color: #4caf50;
  box-shadow: 0 0 8px rgba(76, 175, 80, 0.6);
}

.status-indicator.offline {
  background-color: #f44336;
  box-shadow: 0 0 8px rgba(244, 67, 54, 0.6);
}

/* grey indicator when unit has no active players */
.status-indicator.no-active {
  background-color: #9ca3af;
  box-shadow: none;
}

.device-title {
  flex: 1;
}

.device-name {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #222;
  line-height: 1.3;
}

.device-subtitle {
  margin: 3px 0 0 0;
  font-size: 11px;
  color: #888;
  line-height: 1.4;
}

.device-screenshot {
  margin-bottom: 12px;
}


/* Left panel media blocks */
.device-media-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.device-media-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.device-media-title {
  font-weight: 700;
  color: #111827;
  font-size: 0.85rem;
}

.device-media-actions {
  display: flex;
  gap: 6px;
}

.device-media-btn {
  border: 1px solid #e5e7eb;
  background: #f3f4f6;
  color: #374151;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 0.75rem;
}

.device-media-btn:disabled {
  color: #9ca3af;
}

html[data-theme='dark'] .device-media-title,
body[data-theme='dark'] .device-media-title,
.app[data-theme='dark'] .device-media-title {
  color: #cfd9e8;
}

html[data-theme='dark'] .device-media-btn,
body[data-theme='dark'] .device-media-btn,
.app[data-theme='dark'] .device-media-btn {
  background: transparent;
  border-color: #3a4a61;
  color: #d6e3f5;
}

html[data-theme='dark'] .device-media-btn:disabled,
body[data-theme='dark'] .device-media-btn:disabled,
.app[data-theme='dark'] .device-media-btn:disabled {
  color: #7f8ea3;
  border-color: #2f3b4f;
}

/* ===== TechDesk old style overrides ===== */
.techdesk-old {
  background: #f3f4f6;
}

.techdesk-old .devices-left-panel,
.techdesk-old .devices-center-panel,
.techdesk-old .devices-right-panel,
.techdesk-old .device-section,
.techdesk-old .control-section,
.techdesk-old .devices-right-panel {
  border-radius: 6px;
  box-shadow: none;
  border: 1px solid #e5e7eb;
}

.techdesk-old .device-section-header,
.techdesk-old .control-section-header,
.techdesk-old .system-info-header {
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  min-height: 48px;
  padding: 0 12px;
  border-radius: 6px 6px 0 0;
}

.techdesk-old .devices-layout {
  gap: 16px;
  grid-template-columns: 400px 1fr;
}

.techdesk-old .devices-left-panel {
  max-width: 400px;
}

.techdesk-old .devices-center-panel {
  width: auto;
  min-width: 0;
  max-width: none;
}

.techdesk-old .control-menu {
  padding: 6px 0;
}

.techdesk-old .control-menu-item {
  font-size: 12px;
  padding: 8px 12px;
  border-left: 3px solid transparent;
}

.techdesk-old .control-menu-item.active {
  background: #eef5ff;
  color: #6D28D9;
  border-left-color: #6D28D9;
}

.techdesk-old .control-menu-item:hover {
  background: #f3f4f6;
}

.techdesk-old .screenshot-placeholder {
  border-radius: 4px;
}

.techdesk-old .device-stats .progress-bar,
.techdesk-old .device-stats .progress-fill {
  border-radius: 4px !important;
  height: 10px !important;
}

.techdesk-old .edit-device-btn {
  border-radius: 4px;
  box-shadow: none;
}

.techdesk-old .players-panel.techdesk-players {
  display: block;
  grid-template-columns: none;
  gap: 0;
}

.techdesk-old .players-panel.techdesk-players h4 {
  margin: 0 0 8px 0;
  font-size: 13px;
  font-weight: 700;
  color: #111827;
}

.techdesk-old .players-panel.techdesk-players .players-grid {
  grid-template-columns: repeat(9, 120px);
  gap: 12px;
  padding: 8px 0 8px;
  overflow-x: visible;
}

.techdesk-old .players-panel.techdesk-players .player-card {
  width: 120px;
  max-width: 120px;
  min-height: 140px;
  border-radius: 14px;
  padding: 12px 10px 6px;
  border: 1px solid #e5e7eb;
  box-shadow: none;
}

.techdesk-old .players-panel.techdesk-players .player-card-footer {
  height: 34px !important;
}

.techdesk-old .players-panel.techdesk-players .player-copy-btn {
  border-radius: 4px;
  font-size: 11px;
}

.techdesk-old .players-panel.techdesk-players .info-grid .row {
  grid-template-columns: 140px 1fr;
}

.techdesk-old .player-actions {
  border-top: 1px solid #e5e7eb;
  padding-top: 10px;
  margin-top: 10px;
}

.screenshot-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 0;
  background: #f5f5f5;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #ccc;
  position: relative;
}

.screenshot-placeholder img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}

.screenshot-placeholder img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}

.screenshot-controls {
  display: none;
}

.device-stats {
  display: flex;
  flex-direction: row;
  gap: 12px;
  margin-bottom: 12px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.stat-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;
}

.stat-item label {
  font-size: 11px;
  font-weight: 700;
  color: #222;
}

.device-stats .stat-value {
    margin: 0;
    font-size: 12px !important;
    line-height: 1.2;
    color: #6b7280;
    font-weight: 600;
    text-align: left;
  }

  .device-stats .stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .device-stats .stat-percent {
    font-size: 12px;
    font-weight: 700;
    color: #111827;
    flex-shrink: 0;
  }


/* Ensure the device-stats progress bar sits close to the value */
.device-stats .progress-bar {
  margin-top: 0 !important;
  width: 100%;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  display: block;
  min-height: 8px;
}

.progress-fill {
  height: 100%;
  background: #7C3AED;
  transition: width 0.3s ease;
  border-radius: 4px;
  display: block;
  min-height: 8px;
}

/* Make device-stats progress bars specific and higher priority to avoid overrides */
.device-stats .progress-bar {
  height: 8px !important;
  min-height: 8px !important;
  border-radius: 4px !important;
  overflow: hidden !important;
  background: #e5e7eb !important;
  display: block !important;
  margin-top: 6px !important;
  width: 100% !important;
}

.device-stats .progress-fill {
  height: 8px !important;
  min-height: 8px !important;
  border-radius: 4px !important;
  background: #7C3AED !important;
  display: block !important;
}

.camshots-archive .camshot-archive-wrap {
  display: flex;
  gap: 8px;
  padding-left: 2px;
  align-items: stretch;
}
.camshot-dates {
  width: 100px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 2px;
  padding-right: 6px;
  border-right: 1px solid #eef2f6;
  /* show all dates in right-panel (no internal scroll) */
  max-height: none;
  height: auto;
  overflow: visible;
  flex: 0 0 auto;
}
.camshot-dates .date-btn {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  padding: 6px 8px;
  border-radius: 6px;
  text-align: center;
  font-size: 12px;
  color: #374151;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
}
.camshot-dates .date-btn.active {
  background: #eff6ff;
  border-color: #0b59d6;
  color: #0b59d6;
  font-weight: 700;
}
.camshot-thumbs {
  flex: 1;
  padding-left: 12px;
  overflow: auto;
  max-height: 520px;
}
/* Ensure consistent 6-column layout: keep this rule later in the stylesheet so it wins */
.thumbs-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
  justify-content: start;
}
.thumb-item {
  background: #fff;
  border: 1px solid #eef2f6;
  border-radius: 0; /* keep square corners */
  overflow: hidden;
  display: flex;
  flex-direction: column;
  width: auto;
}
.thumb-img-wrapper { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #000; border-radius: 0 }
.thumb-img { width: 100%; height: 100%; -o-object-fit: cover; object-fit: cover; display:block }
.thumb-caption { padding: 4px 8px; font-size: 11px; font-weight: 700; color: #1f2937; background: #fff; line-height:1 }
.empty-choose { color: #9ca3af; padding: 18px; }


.device-details {
  background: transparent;
  padding: 0;
  border-radius: 0;
  margin-bottom: 0;
}

.device-details h4 {
  margin: 0 0 8px 0;
  font-size: 13px;
  font-weight: 700;
  color: #222;
}

.device-details h4 + p,
.detail-text {
  margin: 0 0 6px 0;
  font-size: 13px;
  font-weight: 400;
  color: #222;
  line-height: 1.5;
}

.detail-text strong {
  font-weight: 700;
}

.detail-link {
  margin: 0 0 6px 0;
  font-size: 13px;
  font-weight: 700;
  color: #222;
  text-decoration: none;
  cursor: pointer;
  word-break: break-word;
}

.edit-device-btn {
  width: 100%;
  padding: 10px 12px;
  background: var(--accent);
  color: var(--accent-contrast);
  border: none;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.15s;
  margin-top: 8px;
}

.edit-device-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(21,95,168,0.12);
}

/* Right Panel - Control & Players */
.devices-right-panel {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
  max-width: none;
  flex: 0 0 auto; /* size to content */
  height: auto; /* let content determine height */
  min-width: 0;
  align-items: stretch;
  border-radius: 12px;
  overflow: hidden;
}

.control-system-wrapper {
  display: flex;
  flex-direction: row;
  gap: 15px;
  width: 100%;
  flex: 1;
  align-items: stretch;
  height: 100%;
  min-height: 0;
}

.control-header-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  width: 100%;
}

.control-header-card h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #222;
  letter-spacing: -0.3px;
}

.control-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
  min-height: 56px;
}

.control-section-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #222;
  letter-spacing: -0.3px;
}

.control-left-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
  width: 280px;
  box-sizing: border-box;
  overflow-y: auto;
}

.control-section {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.control-menu-card {
  background: white;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  padding: 8px;
}

.devices-right-panel {
  flex: 1 1 auto;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  overflow: visible;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: auto;
  padding: 16px;
  gap: 12px;
}

.system-info-header {
  padding: 0 16px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  border-radius: 12px 12px 0 0;
}

.system-info-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #1f2937;
}

/* small subheader under the main title for certain right-panel views */
.system-info-subheader {
  font-size: 12px;
  color: #374151;
  background: rgba(16,185,129,0.06);
  padding: 6px 10px;
  border-radius: 8px;
  display: inline-block;
}

.system-info-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 0 0 auto;
  padding: 16px;
  overflow: visible;
  width: 100%;
  height: auto;
}

/* Strong override block to ensure device headers visually match the system info header
   Applied late in the stylesheet for highest precedence. */
.device-section-header,
.devices-left-panel .device-section-header,
.control-section-header {
  padding: 0 16px !important;
  border-bottom: 1px solid #e5e7eb !important;
  background: #f9fafb !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  min-height: 56px !important;
  border-radius: 12px 12px 0 0 !important;
  color: #1f2937 !important;
}
.device-section-header h3,
.devices-left-panel .device-section-header h3,
.control-section-header h3 {
  margin: 0 !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #1f2937 !important;
}

/* Unified header border rules (light + dark) to ensure identical appearance */
.device-section-header,
.devices-left-panel .device-section-header,
.control-section-header,
.system-info-header,
.devices-panel-header,
.control-header {
  border-bottom: 1px solid #e5e7eb !important;
  box-shadow: none !important;
  border-radius: 12px 12px 0 0 !important;
}

/* Unified panel body style - consistent content padding and spacing */
.control-panel,
.control-panel-content,
.system-info-content,
.device-info-card,
.system-players-content {
  padding: 16px;
  background: transparent;
  box-sizing: border-box;
}

.control-panel-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  /* make content area scroll if necessary */
  flex: 1 1 auto;
  overflow: auto;
}

.control-panel-content h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
}

.panel-info {
  color: #6b7280;
  font-size: 14px;
  line-height: 1.5;
}

.activity-log {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.activity-item {
  padding: 12px;
  background: #f9fafb;
  border-left: 3px solid #0b59d6;
  color: #374151;
  font-size: 13px;
  border-radius: 4px;
}

.player-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.player-item {
  padding: 10px 12px;
  background: #f3f4f6;
  border-radius: 6px;
  font-size: 14px;
  color: #374151;
}

.terminal-window {
  background: #1f2937;
  color: #00ff00;
  padding: 12px;
  border-radius: 6px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  height: 200px;
  overflow-y: auto;
  margin-bottom: 12px;
}

.terminal-header {
  color: #ef4444;
  margin-bottom: 8px;
  font-weight: 600;
}

.terminal-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.terminal-btn {
  padding: 8px 12px;
  background: #0b59d6;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s;
}

.terminal-btn:hover {
  background: #0a4cb0;
}

.chart-placeholder,
.gallery-placeholder {
  padding: 40px 20px;
  text-align: center;
  background: #f9fafb;
  border-radius: 6px;
  color: #6b7280;
  font-size: 14px;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.history-table-wrapper {
  overflow-x: auto;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.history-table thead {
  background: #f3f4f6;
  border-bottom: 1px solid #e5e7eb;
}

.history-table th {
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: #374151;
}

.history-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
  color: #374151;
}

.history-table tbody tr:hover {
  background: #f9fafb;
}

.plus-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e3f2fd;
  color: #1976d2;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
}

.system-players-content {
  display: flex;
  flex-direction: column;
  padding: 16px;
  background: transparent;
  flex: 1 1 auto; /* allow players area to grow and scroll */
  overflow: auto;
}

.players-grid-inline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
  width: 100%;
  max-width: 100%;
  justify-content: start;
}

.system-divider {
  height: 1px;
  background: #e5e7eb;
  margin: 0 -16px;
}

.system-specs-content {
  padding: 16px 0;
  background: transparent;
}
.system-specs-content h4 {
  margin: 0 0 8px 0;
  font-size: 13px;
  font-weight: 700;
  color: #222;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.refresh-btn {
  background: transparent;
  border: 1px solid #d1d5db;
  font-size: 12px;
  cursor: pointer;
  padding: 4px 6px;
  transition: all 0.2s ease;
  color: #6b7280;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.refresh-btn:hover {
  background: #f3f4f6;
  color: #1f2937;
  border-color: #9ca3af;
}

.refresh-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  -o-object-fit: contain;
     object-fit: contain;
  transition: transform 0.3s ease;
}

.refresh-btn:hover .refresh-icon {
  transform: rotate(180deg);
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-left: 4px solid transparent;
  text-align: left;
  cursor: pointer;
  font-size: 13px;
  color: #666;
  font-weight: 400;
  transition: all 0.2s;
  position: relative;
  border-radius: 4px;
}

.menu-item:hover {
  background: #f5f5f5;
  color: #222;
}

.menu-item.active {
  background: #e3f2fd;
  color: #1976d2;
  font-weight: 500;
  border-left-color: #1976d2;
}

.menu-item span {
  font-size: 16px;
}

.warning-badge {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  background: #ffebee;
  color: #c62828;
  padding: 2px 6px;
  border-radius: 3px;
}

.menu-item.sub-menu {
  padding-left: 12px;
  font-size: 13px;
  color: #666;
  background: transparent;
}

.menu-item.sub-menu:hover {
  color: #222;
  background: #f5f5f5;
}

.menu-item.sub-menu.active {
  color: #1976d2;
  background: #e3f2fd;
  border-left-color: #1976d2;
  font-weight: 500;
}

/* Players Section */
.players-section {
  background: white;
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.players-section h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #222;
  background: linear-gradient(135deg, #f5f7fa 0%, #f9fafb 100%);
  padding: 14px 16px;
  border-bottom: 1px solid #e5e7eb;
  letter-spacing: -0.3px;
}

/* Large player card variant used in system-info area (matches attachment) */
.system-info-content .player-card.large {
  position: relative;
  width: 100%;
  max-width: 340px;
  margin: 0 12px 0 0;
  background: #ffffff;
  border-radius: 24px; /* rounded corners */
  padding: 0;
  box-shadow: 0 2px 8px rgba(2,6,23,0.05);
  border: 1px solid #e8ecf1;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  overflow: hidden;
}

.system-info-content .player-card.large::before {
  content: none;
  display: none;
}
.system-info-content .player-card.large.online::before { background: transparent; }
.system-info-content .player-card.large.offline::before { background: transparent; }

.system-info-content .player-card.large .player-avatar {
  width: 44px;
  height: 44px;
  margin: 20px 0 16px 60px;
  background-size: contain;
}

.system-info-content .player-card.large .player-id {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding-left: 60px;
}

.system-info-content .player-card.large .status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.system-info-content .player-card.large.online .status-dot { background: #10b981; }
.system-info-content .player-card.large.offline .status-dot { background: #ef4444; }

.system-info-content .player-card.large .player-card-footer {
  position: relative;
  width: 100%;
  height: 64px;
  background: #f0f4f8;
  border-bottom-left-radius: 24px;
  border-bottom-right-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
}

.system-info-content .player-card.large .player-copy-btn {
  width: 100%;
  height: 100%;
  border-radius: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.system-info-content .player-card.large .player-copy-btn:hover {
  background: rgba(0,0,0,0.05);
}


.players-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 14px;
}

/* Compact player card variant used inside Players grid (matches attachment) */
.system-players-content .player-card,
.players-grid .player-card {
  max-width: 140px;
  min-height: 100px;
  padding: 10px 10px 6px 22px; /* leave space for left stripe */
  border-radius: 12px;
  border-left-width: 6px;
  border-left-style: solid;
  border-left-color: transparent;
  box-shadow: none;
}

.system-players-content .player-card .player-avatar,
.players-grid .player-card .player-avatar {
  width: 28px;
  height: 28px;
  margin: 4px 0 8px 0;
}

.system-players-content .player-card .player-id,
.players-grid .player-card .player-id {
  font-size: 14px;
  font-weight: 800;
}

.system-players-content .player-card .player-card-footer,
.players-grid .player-card .player-card-footer {
  height: 40px;
  background: #1673c8;
  border-radius: 8px;
  margin-top: 8px;
}

.players-grid .player-card.online { border-left-color: #10b981; }
.players-grid .player-card.offline { border-left-color: #ef4444; }


.player-card {
  background: #ffffff;
  border: 1px solid #e6eaed;
  border-left: 6px solid transparent;
  border-radius: 14px;
  text-align: center;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 110px;
  position: relative;
  overflow: hidden;
}

.player-card:hover {
  border-color: #d1e7ff;
  box-shadow: 0 6px 18px rgba(16,83,204,0.06);
}

/* Online (active MAC) hover/selected should show green accent */
.player-card.online:hover,
.player-card.selected.online {
  border-color: rgba(16,185,129,0.22);
  box-shadow: 0 6px 18px rgba(16,185,129,0.06);
}

.player-card.online {
  border-left-color: #10b981;
}

.player-card.offline {
  border-left-color: #ef4444;
  opacity: 0.98;
}

.player-avatar {
  width: 40px;
  height: 40px;
  background: transparent;
  border-radius: 0;
  margin: 4px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  position: relative;
}

/* Lucide icon is rendered in markup */
.player-avatar::before {
  content: none;
  display: none;
}

.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 0;
  vertical-align: middle;
  border: 2px solid #ffffff;
}

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

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

/* Remove global halo applied by other modules (e.g. Units.css) for player grid dots */
.player-card .status-dot {
  box-shadow: none !important;
}

.player-id {
  margin: 8px 0 6px 0;
  padding: 0 12px;
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px; /* gap between status dot and id */
  justify-content: center;
}

/* square status indicator used in compact player cards */
.player-id-dot {
  width: 12px;
  height: 12px;
  display: inline-block;
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: middle;
  box-shadow: none;
}
.player-id-dot.online { background: #10b981; }
.player-id-dot.offline { background: #ef4444; }

/* thin divider below avatar (matches attachment) */
.player-avatar::after {
  content: '';
  display: block;
  width: 56%;
  height: 1px;
  background: #e6eef6;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 44px;
}

/* footer lock button centered, white icon */
.player-card-footer { display: flex; align-items: center; justify-content: center; }
.player-lock { background: transparent; border: none; color: #ffffff; font-size: 18px; cursor: pointer; }

.player-mac {
  font-size: 12px;
  color: #6b7280;
  margin-top: 6px;
  text-transform: uppercase;
}

/* Selected player mini card inside details */
.players-selected-row {
  display: flex;
  gap: 12px;
  padding: 8px 0 6px 0;
  align-items: flex-start;
}

.player-card.mini,
.system-players-content .player-card.mini {
  width: 128px;
  max-width: 128px;
  min-height: 96px;
  padding: 0;
  border-radius: 10px;
  background: #ffffff;
  text-align: center;
  position: relative;
}

.player-card.mini .player-avatar { width: 28px; height: 28px; margin-top: 4px; }
.player-card.mini .player-id { font-size: 13px; margin: 6px 0 6px 0; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-card.mini .player-id strong { font-size: 13px; font-weight: 700; letter-spacing: 0.6px; }
.player-card.mini .player-card-footer { height: 28px; position: absolute; left: 0; right: 0; bottom: 0; width: auto; box-sizing: border-box; padding: 0; margin: 0; display: flex; justify-content: center; align-items: center; }
.player-card.mini .player-mac { font-size: 11px; color: #6b7280; margin-top: 4px; }

.player-card.mini .player-lock { font-size: 14px; }
/* Make the lock/copy button fill the mini footer area for easy tap */
.player-card.mini .player-lock {
  width: 100%;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0 0 8px 8px; /* square top corners, rounded bottom corners */
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(2,6,23,0.05);
  border: none;
}

/* ensure mini card stripe proportions match small card */
.player-card.mini::before { left: 8px; top: 8px; bottom: 8px; width: 6px; border-radius: 6px; }

/* Remove duplicated background icon and divider for mini variant */
.player-card.mini .player-avatar::before,
.player-card.mini .player-avatar::after {
  display: none !important;
}

/* Use the left stripe as the lone status indicator; hide inline square for mini */
.player-card.mini .player-id-dot { display: none !important; }

/* Ensure only a single left stripe appears on mini cards */
.player-card.mini::after { display: none !important; }
.player-card.mini::before { left: 12px !important; top: 10px !important; bottom: 18px !important; width: 8px !important; }

.copy-btn {
  background: #e9eef6;
  border: none;
  cursor: pointer;
  font-size: 12px;
  padding: 6px;
  height: 26px;
  display: block;
  margin-top: auto;
  margin-bottom: 0;
  width: calc(100% + 16px);
  margin-left: -8px;
  margin-right: -8px;
  border-radius: 0 0 6px 6px;
  transition: opacity 0.2s, background 0.2s;
  opacity: 0.95;
  font-weight: 600;
  text-align: center;
}

.copy-btn:hover {
  opacity: 1;
  background: #dce5f0;
}

/* Decorative left stripe (disabled) */
.player-card::before {
  content: none;
  display: none;
}
.player-card.online::before { background: transparent; }
.player-card.offline::before { background: transparent; }

/* Footer area inside the card for the small clipboard icon */
.player-card-footer {
  width: 100%;
  height: 44px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  bottom: 0;
  left: 0;
}

.player-card .player-avatar { margin-top: 18px; }
.player-card .player-id { margin-bottom: 36px; }

.player-status {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  letter-spacing: 0;
}

.player-actions {
  display: flex;
  gap: 10px;
  padding: 12px;
  background: transparent;
  border-top: none;
  justify-content: flex-start;
}

.player-actions-inline {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  justify-content: flex-start;
}

.action-btn {
  flex: 1;
  max-width: 140px;
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
  text-transform: capitalize;
  letter-spacing: 0.3px;
}

.system-info-header .action-btn.fault {
  flex: none;
  max-width: none;
  padding: 6px 12px;
  font-size: 12px;
}

/* Tighter widths for action buttons in players and inline actions */
.player-actions .action-btn,
.player-actions-inline .action-btn {
  flex: none !important;
  width: auto !important;
  max-width: 120px !important;
  padding: 6px 10px !important;
}

.action-btn.retire {
  background: #ef4444;
  color: white;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

.action-btn.retire:hover {
  background: #dc2626;
  box-shadow: 0 4px 8px rgba(220, 38, 38, 0.3);
}

.action-btn.add {
  background: #3b82f6;
  color: white;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.action-btn.add:hover {
  background: #7C3AED;
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.action-btn.move {
  background: #10b981;
  color: white;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.action-btn.move:hover {
  background: #059669;
  box-shadow: 0 4px 8px rgba(5, 150, 105, 0.3);
}

.action-btn.fault {
  background: #ef4444;
  color: white;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

.action-btn.fault:hover {
  background: #dc2626;
  box-shadow: 0 4px 8px rgba(220, 38, 38, 0.3);
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
  background: transparent;
  font-size: 13px;
  padding: 16px 0;
}

.specs-table tbody tr {
  border-bottom: 1px solid #e5e7eb;
}

.specs-table tbody tr:last-child {
  border-bottom: none;
}

.specs-table td {
  padding: 10px 0;
  font-size: 13px;
}

.specs-table td:first-child {
  color: #6b7280;
  font-weight: 700;
  width: 40%;
  letter-spacing: -0.2px;
}

.specs-table td:last-child {
  color: #1f2937;
  text-align: left;
  font-weight: 500;
  padding-left: 12px;
}

/* Responsive Design */
@media (max-width: 900px) {
  .devices-layout {
    grid-template-columns: 1fr;
  }

  .devices-right-panel {
    order: -1;
  }

  .device-mobile-media-actions {
    display: flex;
  }
}

/* Modal Overlay Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 0;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-title {
  margin: 0;
  padding: 20px;
  font-size: 20px;
  font-weight: 700;
  color: #1f2937;
  border-bottom: 1px solid #e5e7eb;
}

.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}

.fault-select {
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  background-color: white;
  color: #1f2937;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.fault-select:hover {
  border-color: #9ca3af;
}

.fault-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.fault-textarea {
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  color: #1f2937;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.fault-textarea::-moz-placeholder {
  color: #9ca3af;
}

.fault-textarea::placeholder {
  color: #9ca3af;
}

.fault-textarea:hover {
  border-color: #9ca3af;
}

.fault-textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

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

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-cancel {
  background-color: #f3f4f6;
  color: #374151;
}

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

.btn-report {
  background-color: #ef4444;
  color: white;
}

.btn-report:hover {
  background-color: #dc2626;
}

/* Edit Unit Modal Styles */
.edit-select {
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  background-color: white;
  color: #1f2937;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.edit-select:hover {
  border-color: #9ca3af;
}

.edit-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.edit-textarea {
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  color: #1f2937;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.edit-textarea::-moz-placeholder {
  color: #9ca3af;
}

.edit-textarea::placeholder {
  color: #9ca3af;
}

.edit-textarea:hover {
  border-color: #9ca3af;
}

.edit-textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn-update {
  background-color: #0b59d6;
  color: white;
}

.btn-update:hover {
  background-color: #0a4cb0;
}

.btn-close {
  background-color: #f3f4f6;
  color: #374151;
}

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

.btn-report:hover {
  background-color: #dc2626;
}

.btn-report:active {
  transform: scale(0.98);
}

@media (max-width: 768px) {
  .devices-container {
    padding: 10px;
  }

  .modal-content {
    width: 90vw;
  }

  .player-actions {
    flex-direction: column;
  }

  .specs-table td:last-child {
    text-align: left;
  }
}

/* ======= players-grid large-card overrides (reference image) ======= */
/* apply only to the grid-style cards so other variants are unaffected */
.players-grid .player-card {
  width: 100%;
  max-width: 220px;
  min-height: 200px;
  border-radius: 14px;
  padding: 16px 16px 0 48px; /* room for left stripes */
  display: block;
  text-align: center;
  box-shadow: 0 6px 14px rgba(2,6,23,0.04);
  border: 1px solid rgba(15,23,42,0.04);
  background: #ffffff;
  cursor: pointer;
  transition: box-shadow 180ms ease, transform 120ms ease;
}

.players-grid .player-card::before,
.players-grid .player-card::after {
  content: none;
  display: none;
}

.players-grid .player-card .player-avatar { margin-top: 12px; }
.players-grid .player-card .player-id { font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial; font-size: 24px; font-weight: 700; margin: 10px 0 6px; color: #24323a; letter-spacing: 0.6px; }
.players-grid .player-card .player-mac { display: none; }
.players-grid .player-card .player-id-dot { display: none; }

/* Full-width footer button at bottom of grid player cards */
.players-grid .player-card .player-card-footer {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  height: 56px;
  display: block;
  padding: 0;
}

/* Make the copy button fill the footer area */
.players-grid .player-card .player-copy-btn {
  width: 100%;
  height: 100%;
  background: #ffffff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(2,6,23,0.06);
  border: none;
  font-size: 16px;
}

/* ensure only the grid-card shows these overrides */
.players-grid .player-card.online::after { background: #10b981; }
.players-grid .player-card.offline::after { background: #ef4444; }

/* Hover state: increase elevation slightly */
.players-grid .player-card:hover {
  box-shadow: 0 14px 30px rgba(2,6,23,0.08);
  transform: translateY(-3px);
}

/* Green hover for online cards in grid */
.players-grid .player-card.online:hover {
  box-shadow: 0 14px 30px rgba(16,185,129,0.08);
  transform: translateY(-3px);
}

/* Responsiveness: grid cards scale down nicely */
@media (max-width: 560px) {
  .players-grid { grid-template-columns: 1fr; }
  .players-grid .player-card { max-width: 100%; padding-left: 40px; }
}

/* Overrides to ensure grid player cards show no duplicate MAC and full-width copy button */
.players-grid .player-card { position: relative; padding-bottom: 80px; }
.players-grid .player-card .player-mac { display: none !important; }
.players-grid .player-card .player-card-footer { position: absolute !important; left: 12px !important; right: 12px !important; bottom: 12px !important; height: 56px !important; padding: 0 !important; display: block !important; }
.players-grid .player-card .player-copy-btn { width: 100% !important; height: 100% !important; border-radius: 8px !important; display: flex !important; align-items: center !important; justify-content: center !important; }

/* ===== Players/MAC UX overrides ===== */
.players-panel .players-empty-state {
  border: 1px dashed #d1d5db;
  border-radius: 10px;
  padding: 14px;
  color: #6b7280;
  font-size: 14px;
  background: #f8fafc;
}

.players-panel > h4 {
  margin: 0 0 10px 0;
}

.add-player-card {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  color: #6b7280;
  cursor: pointer;
  justify-content: center;
  gap: 6px;
  width: 120px;
  max-width: 120px;
  min-height: 140px;
  padding: 12px 10px 6px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.add-player-card:hover {
  background: #eef2f7;
}

.add-player-icon-bg {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #e5e7eb;
  color: #111827;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 0;
}

.add-player-id {
  margin-top: 10px;
  margin-bottom: 8px;
  text-align: center;
  transform: translateY(-6px);
}

.add-player-id-label {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
  letter-spacing: 0.1px;
}

.add-player-id-value {
  font-size: 12px;
  color: #9ca3af;
  font-weight: 600;
}

.add-player-footer {
  height: 32px !important;
  margin-top: auto;
}

.add-player-btn {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  background: #e5e7eb;
  border: 1px solid #d1d5db;
  color: #374151;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.players-panel .players-grid {
  grid-template-columns: repeat(9, 120px);
  grid-auto-flow: row;
  justify-content: flex-start;
  gap: 12px;
  padding: 8px 0 8px;
  overflow-x: visible;
}

.players-panel .players-grid .player-card {
  width: 120px;
  max-width: 120px;
  min-height: 140px;
  padding: 12px 10px 6px;
  border-left-width: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
}

.players-panel .players-grid .player-card .player-avatar {
  width: 100%;
  margin-top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Keep a single centered SVG icon on player cards */
.players-panel .players-grid .player-card .player-avatar::before {
  display: none !important;
}
.players-panel .players-grid .player-card .player-avatar::after {
  display: none !important;
  content: none !important;
}
.players-panel .players-grid .player-card .player-avatar-svg {
  width: 30px;
  height: 22px;
  -o-object-fit: contain;
     object-fit: contain;
  display: block;
}

.players-panel .players-grid .player-card .player-avatar {
  margin-top: 8px;
}

.players-panel .players-grid .player-card .player-icon-bg {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.players-panel .players-grid .player-card.online .player-icon-bg {
  background: #bbf7d0;
}

.players-panel .players-grid .player-card.offline .player-icon-bg {
  background: #fecaca;
}

.players-panel .players-grid .player-card .player-id {
  font-size: 12px;
  margin: 10px 0 8px;
  padding: 0;
  line-height: 1.2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  text-align: center;
  white-space: nowrap;
  flex-wrap: nowrap;
}

.players-panel .players-grid .player-card .player-id strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.players-panel .players-grid .player-card .player-id strong {
  background: transparent;
  padding: 0;
  border-radius: 0;
  color: #0f172a;
}

.players-panel .players-grid .player-card.online {
  background: #ecfdf5;
  border-color: #86efac;
}

.players-panel .players-grid .player-card.offline {
  background: #fef2f2;
  border-color: #fecaca;
}


.players-panel .players-grid .player-card .player-mac {
  display: block !important;
  font-size: 11px;
  color: #64748b;
  margin: 0;
}

.players-panel .players-grid .player-card .player-card-footer {
  position: static !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  width: 100% !important;
  height: 32px !important;
  margin-top: auto !important;
  border-radius: 8px !important;
  background: transparent !important;
  padding: 0 !important;
}

.players-panel .players-grid .player-card .player-copy-btn {
  font-size: 12px;
  font-weight: 700;
  width: 100%;
  height: 100%;
  border: 1px solid #F3E8FF;
  background: #eff6ff;
  color: #6D28D9;
  box-shadow: none;
  border-radius: 8px;
}

.players-panel .players-grid .player-card.selected {
  border-color: #e5e7eb;
  box-shadow: none;
}

.players-panel .players-grid .player-card.selected.online {
  border-color: #22c55e;
  box-shadow: none;
}

.players-panel .players-grid .player-card.selected.offline {
  border-color: #ef4444;
  box-shadow: none;
}


.players-panel .players-selected-row {
  padding: 4px 0 2px;
}

.players-panel .player-selected-summary {
  width: 100%;
  max-width: 180px;
  min-height: 176px;
  border: 1px solid #F3E8FF;
  border-radius: 10px;
  padding: 12px 10px 42px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.players-panel .player-selected-summary-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2px 0 6px;
}

.players-panel .player-selected-summary-icon svg {
  display: block;
}

.players-panel .player-selected-summary .player-card-footer {
  left: 8px;
  right: 8px;
  bottom: 8px;
  height: 30px;
}

.players-panel .player-selected-summary .player-lock {
  height: 100%;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  background: #eff6ff;
  color: #6D28D9;
}

.players-panel .player-selected-summary-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  width: 100%;
  text-align: center;
}

.players-panel .player-selected-summary-sub {
  margin-top: 6px;
  color: #475569;
  font-size: 12px;
  font-family: 'Courier New', monospace;
}

.players-panel .player-mac-card {
  background: #f8fbff;
  border: 1px solid #F3E8FF;
  box-shadow: none;
}

.players-panel .mac-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #0f172a;
  text-transform: none;
  font-size: 13px;
  margin-bottom: 10px;
}

.players-panel .mac-card-status {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}

.players-panel .mac-card-status.online {
  background: #dcfce7;
  color: #166534;
}

.players-panel .mac-card-status.offline {
  background: #fee2e2;
  color: #991b1b;
}

.players-panel .mac-card-hint {
  margin-top: 8px;
  font-size: 12px;
  color: #64748b;
}

.players-panel .player-actions button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.telemetry-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.telemetry-card {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;
  background: #ffffff;
}

.telemetry-title {
  font-weight: 700;
  font-size: 0.8rem;
  color: #111827;
  margin-bottom: 6px;
}

.telemetry-row {
  font-size: 0.78rem;
  color: #4b5563;
  margin-bottom: 4px;
}

.telemetry-history {
  display: grid;
  gap: 14px;
  padding: 12px 0 4px 0;
}

.telemetry-metric {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;
  background: #ffffff;
}

.telemetry-metric-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 8px;
}

.telemetry-chart {
  height: 70px;
  display: flex;
  align-items: flex-end;
  gap: 4px;
}

.telemetry-bar {
  flex: 1;
  background: #0b59d6;
  border-radius: 4px 4px 0 0;
  min-height: 8px;
  opacity: 0.85;
}

.telemetry-chart-empty {
  font-size: 0.8rem;
  color: #9ca3af;
}

.telemetry-line {
  width: 100%;
  height: 110px;
}

.telemetry-chart-wrap {
  position: relative;
}

.telemetry-recharts .recharts-cartesian-grid-horizontal line {
  stroke: #e5e7eb;
  stroke-width: 1;
}

.telemetry-recharts .recharts-yAxis .recharts-cartesian-axis-tick-value,
.telemetry-recharts .recharts-xAxis .recharts-cartesian-axis-tick-value {
  fill: #9ca3af;
  font-size: 10px;
  font-weight: 600;
}

.telemetry-recharts .recharts-cartesian-axis-line,
.telemetry-recharts .recharts-cartesian-axis-tick-line {
  stroke: transparent;
}

html[data-theme='dark'] .screenshot-placeholder,
body[data-theme='dark'] .screenshot-placeholder,
.app[data-theme='dark'] .screenshot-placeholder {
  background: transparent;
  border: 1px solid #34445b;
  color: #7e8fa8;
}

/* Global dark canvas/panel enforcement for Units > Details view */
html[data-theme='dark'] .devices-container,
body[data-theme='dark'] .devices-container,
.app[data-theme='dark'] .devices-container {
  background: #0d0f13 !important;
}

html[data-theme='dark'] .devices-layout,
body[data-theme='dark'] .devices-layout,
.app[data-theme='dark'] .devices-layout {
  background: transparent !important;
}

html[data-theme='dark'] .devices-left-panel,
html[data-theme='dark'] .devices-center-panel,
html[data-theme='dark'] .devices-right-panel,
html[data-theme='dark'] .device-section,
html[data-theme='dark'] .device-info-card,
html[data-theme='dark'] .control-panel,
html[data-theme='dark'] .control-section,
html[data-theme='dark'] .control-header-card,
html[data-theme='dark'] .system-info-content,
body[data-theme='dark'] .devices-left-panel,
body[data-theme='dark'] .devices-center-panel,
body[data-theme='dark'] .devices-right-panel,
body[data-theme='dark'] .device-section,
body[data-theme='dark'] .device-info-card,
body[data-theme='dark'] .control-panel,
body[data-theme='dark'] .control-section,
body[data-theme='dark'] .control-header-card,
body[data-theme='dark'] .system-info-content,
.app[data-theme='dark'] .devices-left-panel,
.app[data-theme='dark'] .devices-center-panel,
.app[data-theme='dark'] .devices-right-panel,
.app[data-theme='dark'] .device-section,
.app[data-theme='dark'] .device-info-card,
.app[data-theme='dark'] .control-panel,
.app[data-theme='dark'] .control-section,
.app[data-theme='dark'] .control-header-card,
.app[data-theme='dark'] .system-info-content {
  background: #171b22 !important;
  border-color: #2f3643 !important;
  color: #d5dbe6 !important;
}

html[data-theme='dark'] .devices-panel-header,
html[data-theme='dark'] .control-header,
html[data-theme='dark'] .control-section-header,
html[data-theme='dark'] .device-section-header,
html[data-theme='dark'] .system-info-header,
body[data-theme='dark'] .devices-panel-header,
body[data-theme='dark'] .control-header,
body[data-theme='dark'] .control-section-header,
body[data-theme='dark'] .device-section-header,
body[data-theme='dark'] .system-info-header,
.app[data-theme='dark'] .devices-panel-header,
.app[data-theme='dark'] .control-header,
.app[data-theme='dark'] .control-section-header,
.app[data-theme='dark'] .device-section-header,
.app[data-theme='dark'] .system-info-header {
  background: #1b2029 !important;
  border-bottom-color: #323a47 !important;
  color: #eaf0f8 !important;
}

html[data-theme='dark'] .device-primary-tabs,
html[data-theme='dark'] .unit-primary-tabs,
html[data-theme='dark'] .unit-subtabs,
body[data-theme='dark'] .device-primary-tabs,
body[data-theme='dark'] .unit-primary-tabs,
body[data-theme='dark'] .unit-subtabs,
.app[data-theme='dark'] .device-primary-tabs,
.app[data-theme='dark'] .unit-primary-tabs,
.app[data-theme='dark'] .unit-subtabs {
  background: #1b2029 !important;
  border-color: #323a47 !important;
}

html[data-theme='dark'] .device-tab,
html[data-theme='dark'] .unit-primary-tabs button,
html[data-theme='dark'] .unit-subtabs button,
body[data-theme='dark'] .device-tab,
body[data-theme='dark'] .unit-primary-tabs button,
body[data-theme='dark'] .unit-subtabs button,
.app[data-theme='dark'] .device-tab,
.app[data-theme='dark'] .unit-primary-tabs button,
.app[data-theme='dark'] .unit-subtabs button {
  background: transparent !important;
  color: #c8d0dc !important;
  border-color: transparent !important;
}

html[data-theme='dark'] .device-tab.active,
html[data-theme='dark'] .unit-primary-tabs button.active,
html[data-theme='dark'] .unit-subtabs button.active,
body[data-theme='dark'] .device-tab.active,
body[data-theme='dark'] .unit-primary-tabs button.active,
body[data-theme='dark'] .unit-subtabs button.active,
.app[data-theme='dark'] .device-tab.active,
.app[data-theme='dark'] .unit-primary-tabs button.active,
.app[data-theme='dark'] .unit-subtabs button.active {
  background: rgba(22, 196, 173, 0.22) !important;
  color: #c8fff7 !important;
  border-color: #16c4ad !important;
}

.telemetry-grid line {
  stroke: #e5e7eb;
  stroke-width: 1;
}

.telemetry-axis text {
  fill: #9ca3af;
  font-size: 10px;
  font-weight: 600;
}

.telemetry-crosshair {
  stroke: #cbd5e1;
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

.telemetry-tooltip {
  position: absolute;
  top: 6px;
  transform: translateX(-50%);
  background: #111827;
  color: #ffffff;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 0.7rem;
  line-height: 1.2;
  pointer-events: none;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.2);
  min-width: 70px;
  text-align: center;
}

.telemetry-tooltip-value {
  font-weight: 700;
}

.telemetry-tooltip-time {
  opacity: 0.85;
}

.telemetry-area {
  fill: rgba(37, 99, 235, 0.12);
}

.telemetry-path {
  fill: none;
  stroke: #7C3AED;
  stroke-width: 3;
}

.telemetry-dot {
  fill: #7C3AED;
  stroke: #ffffff;
  stroke-width: 2;
}

.telemetry-alert-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 4px 0;
}

.alert-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  font-size: 0.75rem;
  font-weight: 600;
  color: #374151;
}

.alert-chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: #e5e7eb;
  color: #111827;
  font-size: 0.7rem;
}

.alert-chip.active {
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
  border-color: #93c5fd;
  background: #eff6ff;
}

.alert-chip.critical.active {
  border-color: #fecaca;
  background: #fee2e2;
}

.alert-chip.high.active {
  border-color: #fed7aa;
  background: #ffedd5;
}

.alert-chip.medium.active {
  border-color: #fde68a;
  background: #fef3c7;
}

.alert-chip.low.active {
  border-color: #DDD6FE;
  background: #F3E8FF;
}

.alert-chip.critical {
  color: #b91c1c;
}

.alert-chip.high {
  color: #b45309;
}

.alert-chip.medium {
  color: #92400e;
}

.alert-chip.low {
  color: #6D28D9;
}

.alert-chip.info {
  color: #374151;
}

.telemetry-alerts {
  padding: 12px 0;
  display: grid;
  gap: 10px;
}

.telemetry-alert-item {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;
  background: #ffffff;
}

.telemetry-alert-title {
  font-weight: 700;
  font-size: 0.85rem;
  color: #111827;
}

.telemetry-alert-meta {
  display: flex;
  gap: 10px;
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 4px;
}

.telemetry-alert-msg {
  font-size: 0.8rem;
  color: #374151;
  margin-top: 6px;
}

@media (max-width: 980px) {
  .players-panel .players-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 180px));
  }
}

@media (max-width: 640px) {
  .players-panel .players-grid {
    grid-template-columns: 1fr;
  }
  .players-panel .players-grid .player-card {
    width: 100%;
    max-width: 100%;
  }
}

/* ===== Players panel layout (sample alignment) ===== */
.system-info-content .players-panel.techdesk-players {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  align-items: start;
}

.system-info-content .players-panel.techdesk-players .players-column h4,
.system-info-content .players-panel.techdesk-players .players-details h4 {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 700;
  color: #111827;
}

.system-info-content .players-panel.techdesk-players .players-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 0;
}

.system-info-content .players-panel.techdesk-players .player-card {
  width: 100%;
  min-height: 96px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  box-shadow: none;
  padding: 10px 8px 8px;
  align-items: center;
  justify-content: center;
}

.system-info-content .players-panel.techdesk-players .player-card .player-avatar {
  margin-top: 0;
}

.system-info-content .players-panel.techdesk-players .player-card .player-avatar-svg {
  width: 36px;
  height: 26px;
}

.system-info-content .players-panel.techdesk-players .player-card .player-id {
  font-size: 12px;
  margin: 6px 0 0;
  color: #111827;
}

.system-info-content .players-panel.techdesk-players .player-card .player-id-dot {
  width: 8px;
  height: 8px;
}

.system-info-content .players-panel.techdesk-players .player-card .player-card-footer {
  margin-top: 8px !important;
  height: 28px !important;
}

.system-info-content .players-panel.techdesk-players .player-card .player-copy-btn {
  border-radius: 0 !important;
  border: none !important;
  background: #1f7db7 !important;
  color: #ffffff !important;
  font-size: 0;
  position: relative;
}

.system-info-content .players-panel.techdesk-players .player-card .player-copy-btn::before {
  content: 'â§‰';
  font-size: 14px;
  line-height: 1;
}

.system-info-content .players-panel.techdesk-players .player-system-info {
  border-top: 1px solid #d1d5db;
  padding-top: 12px;
}

.system-info-content .players-panel.techdesk-players .info-grid .row {
  grid-template-columns: 200px 1fr;
  padding: 10px 0;
  border-bottom: 1px solid #e5e7eb;
}

.system-info-content .players-panel.techdesk-players .info-grid .label {
  color: #111827;
  font-size: 13px;
  font-weight: 700;
}

.system-info-content .players-panel.techdesk-players .info-grid .value {
  text-align: left;
  color: #111827;
}

.system-info-content .players-panel.techdesk-players .player-actions {
  margin-top: 16px;
}



/* Unit Details Layout (Exact Sample Match) */
.unit-details-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.unit-details-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f8fafc;
}

.unit-action-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.unit-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
  color: #1f2937;
  font-size: 13px;
  font-weight: 600;
}

.unit-action-btn:hover {
  background: #f3f4f6;
}

.unit-toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.unit-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
}

.unit-select select {
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: #1f2937;
}

.unit-select-icon {
  color: #6b7280;
}

.unit-primary-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  background: #eef2f7;
  border-radius: 10px;
}

.unit-primary-tabs button {
  border: none;
  background: transparent;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: #6b7280;
  font-weight: 600;
}

.unit-primary-tabs button.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.unit-details-body {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
  width: 100%;
}

.unit-details-left,
.unit-details-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.unit-panel {
  border: 1px solid #e5e7eb;
  background: #ffffff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
}

.unit-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #eef2f7;
  background: #f9fafb;
}

.unit-panel-title {
  font-weight: 700;
  font-size: 13px;
  color: #1f2937;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

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

.pill-btn {
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #1f2937;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.unit-panel-body {
  padding: 14px 16px;
}

.unit-media-card {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
}

.unit-media-card img {
  width: 100%;
  height: auto;
  display: block;
}

.unit-media-card.empty {
  min-height: 180px;
  flex-direction: column;
  gap: 8px;
  color: #94a3b8;
  font-weight: 600;
}

.unit-media-meta {
  margin-top: 10px;
  font-size: 12px;
  color: #94a3b8;
  text-align: center;
}

.unit-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}

.unit-detail-label {
  font-size: 11px;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.unit-detail-value {
  font-size: 13px;
  color: #1f2937;
  font-weight: 600;
}

.unit-panel-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.unit-icon-chip {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: #e6f6f1;
  color: #7C3AED;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.unit-panel-heading {
  font-size: 16px;
  font-weight: 700;
  color: #1f2937;
}

.unit-panel-subtitle {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 2px;
}

.unit-subtabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid #eef2f7;
  background: #ffffff;
}

.unit-subtabs button {
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}

.unit-subtabs button.active {
  background: #e6f6f1;
  border-color: #99f6e4;
  color: #7C3AED;
}

.unit-process-card {
  border: 1px solid #eef2f7;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
}

.unit-process-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #eef2f7;
}

.unit-status-pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

.unit-process-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #eef2f7;
}

.primary-btn {
  background: #7C3AED;
  color: #ffffff;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
}

.unit-process-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #94a3b8;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
}

.unit-process-body {
  padding: 24px 16px 30px;
}

.unit-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #94a3b8;
  font-weight: 600;
  text-align: center;
}

.unit-empty-subtext {
  font-size: 12px;
  color: #cbd5e1;
  font-weight: 500;
}

/* Toggle switch */
.switch {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 18px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #e2e8f0;
  transition: 0.2s;
  border-radius: 999px;
}

.switch .slider:before {
  position: absolute;
  content: '';
  height: 14px;
  width: 14px;
  left: 2px;
  top: 2px;
  background-color: white;
  transition: 0.2s;
  border-radius: 50%;
}

.switch input:checked + .slider {
  background-color: #7C3AED;
}

.switch input:checked + .slider:before {
  transform: translateX(16px);
}

@media (max-width: 1200px) {
  .unit-details-body {
    grid-template-columns: 1fr;
  }
}






.live-status {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
}

/* =========================================================
   Ports (Diagnostics tab) - light theme cards
   ========================================================= */

.ports-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.ports-last-sync {
  font-size: 12px;
  color: var(--color-text-secondary);
}

.ports-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.port-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.port-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-card-border);
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 4px 12px rgba(2, 6, 23, 0.06);
}

.port-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.port-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--color-text-primary);
  min-width: 0;
}

.port-card-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.port-card-type {
  font-size: 11px;
  color: var(--color-text-tertiary);
  white-space: nowrap;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--color-border-default);
  background: rgba(148, 163, 184, 0.14);
}

.port-card-metrics {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  font-size: 12px;
  flex-wrap: wrap;
}

.port-card-metric {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--color-border-default);
  background: rgba(148, 163, 184, 0.12);
}

.port-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  border: 1px solid var(--color-border-default);
}

.port-metric-label {
  display: none;
}

.port-metric-value {
  color: var(--color-text-primary);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.port-card-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.port-card-actions .btn-sm {
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 10px;
}

.port-card-foot {
  margin-top: 8px;
  color: var(--color-text-tertiary);
  font-size: 11px;
}

.port-card.is-connected .port-dot-status {
  background: var(--color-status-success);
  border-color: var(--color-status-success);
}

.port-card.is-disconnected .port-dot-status {
  background: #9CA3AF;
  border-color: #9CA3AF;
}

.port-card.is-active .port-dot-state {
  background: #3B82F6;
  border-color: #3B82F6;
}

.port-card.is-inactive .port-dot-state {
  background: var(--color-status-error);
  border-color: var(--color-status-error);
}

.port-card.is-locked .port-dot-state {
  background: var(--color-status-warning);
  border-color: var(--color-status-warning);
}

.app[data-theme='dark'] .port-card-type,
.app[data-theme='dark'] .port-card-metric {
  background: rgba(148, 163, 184, 0.10);
  border-color: #2f3b4f;
}

.units-page {
  padding: 0;
  background: var(--bg-color, #f5f5f5);
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
}

.units-container {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 0.75rem 0.75rem 0.75rem;
  margin-left: 0;
  margin-right: 0;
  flex: 1;
  width: 100%;
}

/* ===== LEFT SIDEBAR ===== */
.units-sidebar {
  width: 240px;
  background: transparent;
  border-radius: 6px;
  padding: 0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--panel-bg, #ffffff);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 2px 6px rgba(16, 24, 40, 0.08);
  flex-shrink: 0;
  border: 1px solid var(--border-color, #f0f0f0);
}

.sidebar-section h3 {
  font-size: 0.75rem;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin: 0;
}

/* Group Select */
.group-select {
  width: 100%;
  padding: 8px 12px; /* reduced vertical padding for a shorter control */
  border: 1.5px solid #e5e7eb;
  border-radius: 6px;
  background: var(--panel-bg, #ffffff);
  font-size: 0.80rem;
  font-weight: 500;
  color: #1f2937;
  cursor: pointer;
  transition: all 0.25s ease;
  max-height: 200px; /* reduced dropdown list max height */
  overflow-y: auto;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 16px;
  padding-right: 36px;
}

.group-select:hover {
  border-color: var(--color-accent-primary);
  background-color: rgba(124, 58, 237, 0.03);
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.12);
}

.group-select:focus {
  outline: none;
  border-color: var(--color-accent-primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.18);
  background-color: var(--panel-bg, #ffffff);
}

/* Scrollbar styling for select dropdowns */
.group-select::-webkit-scrollbar {
  width: 6px;
}

.group-select::-webkit-scrollbar-track {
  background: #f3f4f6;
}

.group-select::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.group-select::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.selected-group-tag {
  display: none;
}

/* Locations List */
.locations-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 220px; /* reduced list height to match compact dropdown */
  overflow-y: auto;
  padding-right: 4px;
}

.locations-list::-webkit-scrollbar {
  width: 6px;
}

.locations-list::-webkit-scrollbar-track {
  background: transparent;
}

.locations-list::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

.locations-list::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

.location-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 0.5rem; /* tighter vertical spacing for compact list */
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.12s ease;
  border-left: 6px solid transparent;
  color: #374151;
  font-size: 0.85rem;
}

.location-item:hover {
  background: rgba(15, 23, 42, 0.02);
}

.location-item.active {
  background: rgba(124, 58, 237, 0.08);
  border-left-color: var(--color-accent-primary);
  color: var(--color-accent-primary);
  font-weight: 700;
}

.location-name {
  font-size: 0.85rem;
  font-weight: 500;
}

.location-count {
  font-size: 0.7rem;
  background: #fee2e2;
  color: #991b1b;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 700;
}

.location-item.active .location-count {
  background: #DDD6FE;
  color: #0c4a6e;
}

/* Filter Section */
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-label {
  font-size: 0.7rem;
  font-weight: 800;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.radio-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.radio-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: #374151;
}

.radio-item input[type="radio"] {
  cursor: pointer;
  width: 16px;
  height: 16px;
  accent-color: var(--color-accent-primary);
}

/* ===== MAIN CONTENT ===== */
.main-card{
  background:var(--panel-bg, #ffffff);
  border-radius:8px;
  padding:0.75rem;
  margin-right: 0;
  margin-left: 0;
  box-shadow:0 1px 3px rgba(16,24,40,0.06);
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
}

.main-card h2 {
  font-size: 1.5rem;
  color: #374151;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
}

.main-card > p:first-of-type {
  text-align: left;
  color: #6b7280;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
}

.location-count-text {
  font-size: 0.9rem;
  color: #6b7280;
  margin: 0;
}

.status-table-wrapper {
  overflow-x: auto;
}

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

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

.status-table thead {
  background: transparent;
  border-bottom: 1px solid var(--border-color, #e5e7eb);
  display: flex;
}

.status-table thead tr {
  width: 100%;
  display: flex;
  gap: 16px;
  align-items: center;
}

.status-table th {
  padding: 12px 0;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-table th:nth-child(1) {
  width: 120px;
  flex-shrink: 0;
}

.status-table th:nth-child(2) {
  width: 180px;
  flex-shrink: 0;
}

.status-table th:nth-child(3) {
  flex: 1;
  min-width: 300px;
}

.status-table tbody {
  display: block;
}

.status-table tbody tr {
  border-bottom: 1px solid var(--border-color, #e5e7eb);
  transition: all 0.2s ease;
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 16px 0;
  width: 100%;
}

.status-table tbody tr:hover {
  background: rgba(255,255,255,0.02);
}

.status-table td {
  padding: 0;
  font-size: 0.9rem;
  color: #1f2937;
  display: flex;
  align-items: center;
}

.status-table td.location-col {
  width: 120px;
  flex-shrink: 0;
  font-weight: 600;
  white-space: nowrap;
}

.status-table td.units-col {
  width: 180px;
  flex-shrink: 0;
  font-weight: 600;
  font-size: 1rem;
  color: #1f2937;
}

.status-table td.progress-col {
  flex: 1;
  min-width: 140px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.location-col {
  font-weight: 600;
}

.units-col {
  color: #1f2937;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.3rem;
  width: auto;
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.connected-count {
  color: #6b7280;
  font-weight: 500;
}

.units-separator {
  color: #6b7280;
}

.total-count {
  color: #6b7280;
  font-weight: 500;
}

.units-percentage {
  color: #6b7280;
}

.progress-col {
  width: 220px;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

/* tighten spacing specifically between Units and Progress */
.progress-bar {
  flex: 1;
  height: 8px;
  background: transparent;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  gap: 0;
  min-width: 100px;
}

.progress-fill {
  height: 100%;
  transition: width 0.3s ease;
}

.progress-fill.connected {
  background: #10b981;
}

.progress-fill.disconnected {
  background: #ef4444;
}

/* ===== UNIT STATUS CARDS ===== */
.unit-status-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 24px;
  margin-top: 24px;
}

.unit-status-card {
  background: var(--panel-bg, #ffffff);
  border-radius: 14px;
  padding: 16px;
  width: min(420px, 100%);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  border: 1px solid #e5e7eb;
  transition: all 0.2s ease;
}

.unit-status-card:hover {
  box-shadow: 0 4px 16px rgba(16, 24, 40, 0.12);
  transform: translateY(-2px);
}

.unit-status-card .card-header {
  margin-bottom: 14px;
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f8fafc;
}

.unit-status-card .location-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
}

.unit-status-card .card-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
}

.unit-status-card .status-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.unit-status-card .status-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.unit-status-card .status-value {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.95rem;
  color: #1f2937;
  font-weight: 500;
}

.unit-status-card .connected-count {
  color: #10b981;
  font-weight: 700;
}

.unit-status-card .total-count {
  color: #6b7280;
}

.unit-status-card .separator {
  color: #d1d5db;
}

.unit-status-card .percentage {
  color: #6b7280;
  font-size: 0.85rem;
}

.unit-status-card .progress-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.unit-status-card .progress-bar-container {
  width: 100%;
  height: 12px;
  background: #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  gap: 0;
}

.unit-status-card .progress-bar-fill {
  height: 100%;
  transition: width 0.3s ease;
}

.unit-status-card .progress-bar-fill.connected {
  background: #10b981;
}

.unit-status-card .progress-bar-fill.disconnected {
  background: #ef4444;
}

.units-header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin: 0 0 0.5rem 0;
  padding: 0.25rem 0 0.5rem 0;
  background: transparent;
  border-bottom: 1px solid #eef2f6;
  gap: 1rem;
  width: 100%;
}

.units-header-left {
  display: flex;
  align-items: center;
}

.units-header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
}

.units-header h2 {
  font-size: 1.4rem;
  color: #1f2937;
  font-weight: 700;
  margin: 0;
  min-width: -moz-max-content;
  min-width: max-content;
  text-align: left;
  margin-right: auto;
}

.overview-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0.6rem;
  background: rgba(124, 58, 237, 0.10);
  border: 1px solid var(--color-accent-primary);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.12s ease;
  color: var(--color-accent-primary);
  font-weight: 600;
  font-size: 0.85rem;
  width: 100%;
  margin-bottom: 0.5rem;
}

.overview-item:hover {
  background: rgba(124, 58, 237, 0.16);
  border-color: var(--color-btn-primary-hover);
  color: var(--color-btn-primary-hover);
}

.locations-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}



.locations-header h3 {
  font-size: 0.7rem;
  font-weight: 800;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}

.overview-btn {
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(124, 58, 237, 0.10);
  border: 1px solid var(--color-accent-primary);
  border-radius: 4px;
  color: var(--color-accent-primary);
  cursor: pointer;
  transition: all 0.12s ease;
}

.overview-btn:hover:not(:disabled) {
  background: rgba(124, 58, 237, 0.16);
  border-color: var(--color-btn-primary-hover);
  color: var(--color-btn-primary-hover);
}

.overview-btn:disabled {
  background: #e5e7eb;
  border-color: #d1d5db;
  color: #9ca3af;
  cursor: not-allowed;
  opacity: 0.6;
}

.units-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-left: auto;
}

.control-label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #6b7280;
}

.control-btn.add-unit-btn {
  background: var(--color-btn-primary);
  border-color: var(--color-btn-primary);
  color: #ffffff;
  font-weight: 700;
}

.control-btn.add-unit-btn:hover {
  background: var(--color-btn-primary-hover);
  border-color: var(--color-btn-primary-hover);
}

.control-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.control-group label {
  color: #6b7280;
  font-weight: 500;
  white-space: nowrap;
}

.sort-dropdown,
.view-dropdown {
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  background: var(--panel-bg, #ffffff);
  border-radius: 4px;
  font-size: 0.85rem;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sort-dropdown:hover,
.view-dropdown:hover {
  border-color: #9ca3af;
}

.sort-dropdown:focus,
.view-dropdown:focus {
  outline: none;
  border-color: var(--color-accent-primary);
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.12);
}

.control-btn {
  padding: 6px 12px;
  border: 1px solid #d1d5db;
  background: var(--panel-bg, #ffffff);
  border-radius: 4px;
  font-size: 0.85rem;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
  white-space: nowrap;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.control-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}

.control-btn:hover {
  background: rgba(255,255,255,0.03);
  border-color: #9ca3af;
}

.control-btn.sort-btn {
  background: var(--color-btn-primary);
  color: #ffffff;
  border-color: var(--color-btn-primary);
  font-weight: 600;
}

.control-btn.sort-btn:hover {
  background: var(--color-btn-primary-hover);
  border-color: var(--color-btn-primary-hover);
}

.control-btn.sort-btn:not(.active) {
  background: var(--panel-bg, #ffffff);
  color: #374151;
  border-color: #d1d5db;
}

.control-btn.sort-btn:not(.active):hover {
  background: rgba(255,255,255,0.03);
  border-color: #9ca3af;
}

.control-btn.sort-btn.active {
  background: var(--color-btn-primary);
  color: #ffffff;
  border-color: var(--color-btn-primary);
}

.control-btn.status-btn {
  background: var(--panel-bg, #ffffff);
  color: var(--color-accent-primary);
  border-color: #d1d5db;
  font-weight: 600;
}

.control-btn.icon-btn {
  padding: 6px 8px;
  min-width: auto;
  width: 32px;
}

.control-btn.icon-btn.active {
  background: var(--color-btn-primary);
  color: #ffffff;
  border-color: var(--color-btn-primary);
}

.control-btn.grid-btn,
.control-btn.list-btn {
  padding: 6px 8px;
  min-width: auto;
  width: 32px;
  background: var(--panel-bg, #ffffff);
  color: #374151;
  border-color: #d1d5db;
}

.control-btn.grid-btn:hover,
.control-btn.list-btn:hover {
  background: rgba(255,255,255,0.03);
  border-color: #9ca3af;
}

.control-btn.grid-btn.active,
.control-btn.list-btn.active {
  background: var(--color-btn-primary);
  color: #ffffff;
  border-color: var(--color-btn-primary);
}

.control-btn.menu-btn {
  padding: 6px 8px;
  min-width: auto;
  width: 32px;
}

.units-grid {
  display: grid;
  /* Always show 4 cards per row; allow horizontal scroll on narrow viewports */
  grid-template-columns: repeat(4, minmax(260px, 1fr));
  gap: 1rem;
  align-items: start;
  flex: 1;
  overflow-y: auto;
  overflow-x: auto;
  padding-right: 1rem;
  padding-bottom: 1rem;
  margin-top: 0;
  width: 100%;
}

.unit-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid #dbe3ef;
  background: #f7faff;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.11);
  border-radius: 16px;
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.unit-card:hover {
  box-shadow: 0 16px 36px rgba(17, 24, 39, 0.14);
  transform: translateY(-2px);
  border-color: #cdd9ea;
}

.unit-action-ghost {
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.unit-action-ghost:hover {
  border-color: #cbd5f5;
  color: var(--color-accent-primary);
}

.unit-action-ghost.danger {
  border-color: #fecaca;
  color: #b91c1c;
  background: #fff5f5;
}

.unit-action-ghost.danger:hover {
  border-color: #fca5a5;
  background: #fee2e2;
}

.unit-card-top {
  position: relative;
  padding: 10px;
  border: 0 !important;
  box-shadow: none !important;
  border-bottom: 1px solid #e5eaf2 !important;
  background: #f7faff;
  border-radius: 16px 16px 0 0 !important;
}

.unit-card-top-merged {
  min-width: 0;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  border-radius: 0 !important;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e5eaf2 !important;
}

.unit-title {
  margin: 0;
  color: #1f2b3d;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Override global `.main-card h3` typography rules from shared stylesheets */
.main-card .unit-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.15;
}

/* Legacy: `.unit-info-toggle` (moved into footer as a normal footer button) */
.unit-info-toggle { display: none; }


.unit-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 28px;
  border-radius: 999px;
  padding: 0 12px;
  border: 1px solid #dde5f1;
  background: #ffffff;
  color: #4b5563;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.unit-chip.status.offline {
  border-color: #f3d5d1;
  background: #fef1ee;
  color: #d94836;
}

.unit-chip.status.online {
  border-color: #cfeadf;
  background: #eaf7f1;
  color: #0f8a63;
}

.unit-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
}

.unit-chip.compact {
  min-width: 34px;
  padding: 0 10px;
  background: #f7efe8;
  border-color: #eedecd;
  color: #9a6c3c;
}


.unit-status-line {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  row-gap: 2px;
  color: #2b3f59;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.2;
  margin: 0;
}

.unit-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50% !important;
  display: inline-block;
  flex: none;
}

.unit-live-dot.connected {
  background: #22c55e !important;
}

.unit-live-dot.disconnected {
  background: #ef4444 !important;
}

.unit-sep {
  color: #7b8595;
  font-weight: 700;
}

.unit-card-meta-line {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #45556d;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.2;
  flex-wrap: wrap;
  margin: 0;
}

.unit-media {
  position: relative;
  width: 100%;
  height: 160px;
  border-bottom: 1px solid #e8edf5;
  background: #101827;
  border-radius: 0 !important;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.unit-media-info {
  width: 100%;
  height: 100%;
  background: #e9f1fb;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 8px 10px;
}

.unit-media-info-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 6px;
}

.unit-media-info-key {
  height: 22px;
  border-radius: 7px;
  background: #93a8c0;
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.12px;
  white-space: nowrap;
  padding: 0 4px;
}

.unit-media-info-value {
  color: #4b5f7a;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.unit-media-copy-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #b9c8da;
  border-radius: 6px;
  background: #f3f7fc;
  color: #4f6480;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.unit-media-copy-btn:hover {
  background: #e8f0fa;
  border-color: #99aec8;
}

.unit-media-copy-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}

.unit-image {
  width: 100%;
  height: 100%;
  -o-object-fit: contain;
     object-fit: contain;
  display: block;
  background: transparent;
}

.unit-image-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  background: #101827;
  overflow: hidden;
}

.unit-image-wrap::before {
  content: '';
  position: absolute;
  inset: -14px;
  background-image: var(--unit-preview-url);
  background-size: cover;
  background-position: center;
  filter: blur(16px);
  transform: scale(1.08);
  opacity: 0.55;
}

.unit-image-wrap .unit-image {
  position: relative;
  z-index: 1;
}

/* Removed: `.unit-media-cam-btn` (use footer capture button instead) */

.image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #8b97aa;
  background: #f8fafc;
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  padding: 0 14px;
}

.image-placeholder-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #7f8da3;
}

.image-placeholder-samples {
  display: grid;
  grid-template-columns: repeat(2, 62px);
  gap: 8px;
  margin-top: 6px;
  opacity: 0.92;
}

.image-placeholder-samples img {
  width: 62px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: #0b1220;
  -o-object-fit: cover;
     object-fit: cover;
}

.unit-media-overlay {
  position: absolute;
  inset: auto 10px 10px auto;
  padding: 0;
  display: flex;
  align-items: flex-end;
  background: transparent;
  pointer-events: none;
}

.unit-media-capture-label {
  color: #ffd769;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.15px;
  text-shadow: none;
}

.unit-card-footer {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  padding: 10px;
  background: #f7faff;
  border-radius: 0 !important;
  border-top: none;
}

.unit-footer-btn {
  width: 100%;
  height: 32px;
  border: 1px solid #cfd8e6;
  background: #f3f7fc;
  color: #2f4866;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  cursor: pointer;
  transition: all 0.16s ease;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 0;
  white-space: nowrap;
  overflow: hidden;
}

.unit-footer-btn span {
  display: inline-block;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.unit-footer-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  flex: none;
}

.unit-footer-btn:hover:not(:disabled) {
  border-color: #9fb2cc;
  background: #e9f0fb;
  color: #1f3650;
}

.unit-footer-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.unit-footer-btn.is-active {
  border-color: rgba(124, 58, 237, 0.45);
  background: rgba(124, 58, 237, 0.12);
  color: var(--color-accent-primary);
}

.unit-action-primary {
  border: 1px solid rgba(124, 58, 237, 0.45);
  background: var(--color-accent-primary);
  color: #ffffff;
  font-weight: 800;
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
}

.unit-action-primary:hover {
  background: var(--color-accent-hover);
}

.units-toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  background: rgba(20, 35, 53, 0.92);
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.85rem;
  z-index: 1200;
  max-width: calc(100vw - 24px);
  text-align: center;
}

.units-action-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 1200;
}

.units-action-modal {
  width: 460px;
  max-width: 100%;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
  padding: 14px 14px 12px;
}

.units-action-modal-title {
  font-weight: 900;
  color: #0f172a;
  font-size: 1rem;
  margin-bottom: 8px;
}

.units-action-modal-body {
  color: #334155;
  font-weight: 600;
  font-size: 0.9rem;
}

.units-action-modal-sub {
  margin: 6px 0;
}

.units-action-modal-hint {
  color: #64748b;
  font-weight: 700;
  font-size: 0.82rem;
}

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

.units-ticket-list {
  margin: 10px 0 0;
  padding-left: 18px;
}

.units-ticket-meta {
  color: #64748b;
  font-weight: 700;
}

.units-empty {
  margin-top: 10px;
  color: #64748b;
  font-weight: 800;
}

.unit-footer-action {
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d3dce9;
  background: #ffffff;
  color: #364f6f;
  border-radius: 999px;
  padding: 0 16px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.unit-footer-action:hover {
  background: #f8fbff;
  border-color: #becde3;
}

.unit-footer-action-start {
  margin-left: auto;
}

.unit-footer-action.danger {
  border-color: #f4c0c0;
  color: #c53030;
  background: #fff7f7;
}

.unit-footer-action.danger:hover {
  border-color: #eea2a2;
  background: #ffeaea;
}
.no-units {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2rem;
  color: #9ca3af;
  font-size: 0.95rem;
}

/* List View Table */
.units-list-view {
  background: var(--panel-bg, #ffffff);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(16,24,40,0.06);
}

.units-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.units-table thead {
  background: var(--panel-bg, #f3f4f6);
  border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.units-table thead th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  color: #374151;
  text-transform: none;
  letter-spacing: normal;
}

.units-table tbody tr {
  border-bottom: 1px solid #e5e7eb;
  transition: background 0.12s ease;
}

.units-table tbody tr:hover {
  background: rgba(255,255,255,0.02);
}

.units-table tbody td {
  padding: 0.4rem 1rem;
  color: #374151;
  vertical-align: middle;
}

.unit-row-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.unit-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 24px;
}

.unit-modal {
  width: min(720px, 96vw);
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.2);
  border: 1px solid #e5e7eb;
  overflow: hidden;
}

.unit-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}

.unit-modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #111827;
}

.unit-modal-close {
  border: none;
  background: transparent;
  font-size: 1.4rem;
  color: #64748b;
  cursor: pointer;
  padding: 0;
}

.unit-modal-body {
  padding: 20px 22px 22px 22px;
}

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

.unit-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  color: #374151;
  font-weight: 600;
}

.unit-field span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #6b7280;
}

.unit-field input,
.unit-field select,
.unit-field textarea {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.9rem;
  color: #111827;
  background: #ffffff;
}

.unit-field textarea {
  resize: vertical;
}

.unit-field-full {
  grid-column: 1 / -1;
}

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

.unit-modal-primary,
.unit-modal-secondary {
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 0.85rem;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
}

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

.unit-modal-secondary {
  background: #ffffff;
  border-color: #d1d5db;
  color: #475569;
}

.unit-link {
  color: var(--color-accent-primary);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.12s ease;
}

.unit-link:hover {
  color: var(--color-btn-primary-hover);
}

.status-badge {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.status-badge.disconnected {
  background: #fee2e2;
  color: #7f1d1d;
}

/* Dark Theme - Units page */
html[data-theme='dark'] .units-page,
body[data-theme='dark'] .units-page,
.app[data-theme='dark'] .units-page {
  background: #0d0f13;
}

html[data-theme='dark'] .units-sidebar,
body[data-theme='dark'] .units-sidebar,
.app[data-theme='dark'] .units-sidebar {
  background: transparent;
}

html[data-theme='dark'] .sidebar-section,
body[data-theme='dark'] .sidebar-section,
.app[data-theme='dark'] .sidebar-section {
  background: #171a20;
  border-color: #2a2f38;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

html[data-theme='dark'] .sidebar-section h3,
html[data-theme='dark'] .filter-label,
html[data-theme='dark'] .locations-header h3,
html[data-theme='dark'] .control-label,
body[data-theme='dark'] .sidebar-section h3,
body[data-theme='dark'] .filter-label,
body[data-theme='dark'] .locations-header h3,
body[data-theme='dark'] .control-label,
.app[data-theme='dark'] .sidebar-section h3,
.app[data-theme='dark'] .filter-label,
.app[data-theme='dark'] .locations-header h3,
.app[data-theme='dark'] .control-label {
  color: #97a0ad;
}

html[data-theme='dark'] .group-select,
body[data-theme='dark'] .group-select,
.app[data-theme='dark'] .group-select {
  background-color: #14181f;
  border-color: #313844;
  color: #d6dbe5;
}

html[data-theme='dark'] .group-select:hover,
body[data-theme='dark'] .group-select:hover,
.app[data-theme='dark'] .group-select:hover {
  border-color: #1bc3ad;
  background-color: #171c24;
  box-shadow: 0 6px 14px rgba(27, 195, 173, 0.16);
}

html[data-theme='dark'] .group-select:focus,
body[data-theme='dark'] .group-select:focus,
.app[data-theme='dark'] .group-select:focus {
  border-color: #20c9b4;
  box-shadow: 0 0 0 3px rgba(32, 201, 180, 0.2);
}

html[data-theme='dark'] .location-item,
body[data-theme='dark'] .location-item,
.app[data-theme='dark'] .location-item {
  color: #c4cbd8;
}

html[data-theme='dark'] .location-item:hover,
body[data-theme='dark'] .location-item:hover,
.app[data-theme='dark'] .location-item:hover {
  background: rgba(148, 163, 184, 0.12);
}

html[data-theme='dark'] .location-item.active,
body[data-theme='dark'] .location-item.active,
.app[data-theme='dark'] .location-item.active {
  background: rgba(124, 58, 237, 0.22);
  border-left-color: rgba(124, 58, 237, 0.65);
  color: #ede9fe;
}

html[data-theme='dark'] .location-count,
body[data-theme='dark'] .location-count,
.app[data-theme='dark'] .location-count {
  background: rgba(255, 105, 105, 0.18);
  color: #ffaea8;
}

html[data-theme='dark'] .location-item.active .location-count,
body[data-theme='dark'] .location-item.active .location-count,
.app[data-theme='dark'] .location-item.active .location-count {
  background: rgba(26, 184, 163, 0.26);
  color: #abf5ea;
}

html[data-theme='dark'] .overview-btn,
body[data-theme='dark'] .overview-btn,
.app[data-theme='dark'] .overview-btn {
  background: rgba(124, 58, 237, 0.14);
  border-color: rgba(124, 58, 237, 0.4);
  color: #c4b5fd;
}

html[data-theme='dark'] .overview-btn:hover:not(:disabled),
body[data-theme='dark'] .overview-btn:hover:not(:disabled),
.app[data-theme='dark'] .overview-btn:hover:not(:disabled) {
  background: rgba(124, 58, 237, 0.2);
  border-color: rgba(124, 58, 237, 0.55);
  color: #ddd6fe;
}

html[data-theme='dark'] .overview-btn:disabled,
body[data-theme='dark'] .overview-btn:disabled,
.app[data-theme='dark'] .overview-btn:disabled {
  background: #1b2331;
  border-color: #313f55;
  color: #708198;
}

html[data-theme='dark'] .radio-item,
body[data-theme='dark'] .radio-item,
.app[data-theme='dark'] .radio-item {
  color: #d3deea;
}

html[data-theme='dark'] .main-card,
body[data-theme='dark'] .main-card,
.app[data-theme='dark'] .main-card {
  background: #101319;
  border: 1px solid #262c36;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

html[data-theme='dark'] .main-card h2,
html[data-theme='dark'] .main-card > p:first-of-type,
html[data-theme='dark'] .location-count-text,
body[data-theme='dark'] .main-card h2,
body[data-theme='dark'] .main-card > p:first-of-type,
body[data-theme='dark'] .location-count-text,
.app[data-theme='dark'] .main-card h2,
.app[data-theme='dark'] .main-card > p:first-of-type,
.app[data-theme='dark'] .location-count-text {
  color: #d5dbe6;
}

html[data-theme='dark'] .units-header,
body[data-theme='dark'] .units-header,
.app[data-theme='dark'] .units-header {
  border-bottom-color: #2a303b;
}

html[data-theme='dark'] .control-btn,
body[data-theme='dark'] .control-btn,
.app[data-theme='dark'] .control-btn {
  background: #1a1f28;
  border-color: #323949;
  color: #d4dbe6;
}

html[data-theme='dark'] .control-btn:hover,
body[data-theme='dark'] .control-btn:hover,
.app[data-theme='dark'] .control-btn:hover {
  background: #212735;
  border-color: #3f475a;
}

html[data-theme='dark'] .control-btn.sort-btn.active,
html[data-theme='dark'] .control-btn.grid-btn.active,
html[data-theme='dark'] .control-btn.list-btn.active,
body[data-theme='dark'] .control-btn.sort-btn.active,
body[data-theme='dark'] .control-btn.grid-btn.active,
body[data-theme='dark'] .control-btn.list-btn.active,
.app[data-theme='dark'] .control-btn.sort-btn.active,
.app[data-theme='dark'] .control-btn.grid-btn.active,
.app[data-theme='dark'] .control-btn.list-btn.active {
  background: rgba(124, 58, 237, 0.24);
  border-color: rgba(124, 58, 237, 0.55);
  color: #ede9fe;
}

html[data-theme='dark'] .control-btn.sort-btn:not(.active),
body[data-theme='dark'] .control-btn.sort-btn:not(.active),
.app[data-theme='dark'] .control-btn.sort-btn:not(.active) {
  background: #1a1f28;
  color: #d4dbe6;
  border-color: #323949;
}

html[data-theme='dark'] .unit-status-card,
body[data-theme='dark'] .unit-status-card,
.app[data-theme='dark'] .unit-status-card {
  background: #101722;
  border-color: #2a3546;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.34);
}

html[data-theme='dark'] .unit-status-card .card-header,
body[data-theme='dark'] .unit-status-card .card-header,
.app[data-theme='dark'] .unit-status-card .card-header {
  border-color: #2c394b;
  background: #141e2b;
}

html[data-theme='dark'] .unit-status-card .card-content,
body[data-theme='dark'] .unit-status-card .card-content,
.app[data-theme='dark'] .unit-status-card .card-content {
  border-color: #2c394b;
  background: #0d141e;
}

html[data-theme='dark'] .unit-status-card .location-name,
html[data-theme='dark'] .unit-status-card .status-value,
body[data-theme='dark'] .unit-status-card .location-name,
body[data-theme='dark'] .unit-status-card .status-value,
.app[data-theme='dark'] .unit-status-card .location-name,
.app[data-theme='dark'] .unit-status-card .status-value {
  color: #e3edf9;
}

html[data-theme='dark'] .unit-status-card .status-label,
html[data-theme='dark'] .unit-status-card .total-count,
html[data-theme='dark'] .unit-status-card .percentage,
body[data-theme='dark'] .unit-status-card .status-label,
body[data-theme='dark'] .unit-status-card .total-count,
body[data-theme='dark'] .unit-status-card .percentage,
.app[data-theme='dark'] .unit-status-card .status-label,
.app[data-theme='dark'] .unit-status-card .total-count,
.app[data-theme='dark'] .unit-status-card .percentage {
  color: #95a6be;
}

html[data-theme='dark'] .unit-card,
body[data-theme='dark'] .unit-card,
.app[data-theme='dark'] .unit-card {
  background: #171b22;
  border-color: #2c323d;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

html[data-theme='dark'] .unit-card:hover,
body[data-theme='dark'] .unit-card:hover,
.app[data-theme='dark'] .unit-card:hover {
  border-color: #3c4554;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.42);
}

html[data-theme='dark'] .unit-card-top,
body[data-theme='dark'] .unit-card-top,
.app[data-theme='dark'] .unit-card-top {
  background: #20242c;
  border-bottom-color: #323946;
}

html[data-theme='dark'] .unit-card-top-merged,
body[data-theme='dark'] .unit-card-top-merged,
.app[data-theme='dark'] .unit-card-top-merged {
  border-top-color: #313c4d !important;
}

html[data-theme='dark'] .unit-chip,
body[data-theme='dark'] .unit-chip,
.app[data-theme='dark'] .unit-chip {
  background: #1b212a;
  border-color: #343c4a;
  color: #c3ccd9;
}

html[data-theme='dark'] .unit-chip.status.offline,
body[data-theme='dark'] .unit-chip.status.offline,
.app[data-theme='dark'] .unit-chip.status.offline {
  background: rgba(211, 82, 82, 0.24);
  border-color: rgba(213, 97, 97, 0.34);
  color: #ff9696;
}

html[data-theme='dark'] .unit-chip.status.online,
body[data-theme='dark'] .unit-chip.status.online,
.app[data-theme='dark'] .unit-chip.status.online {
  background: rgba(22, 196, 173, 0.2);
  border-color: rgba(22, 196, 173, 0.42);
  color: #9ff9ea;
}

html[data-theme='dark'] .unit-chip.compact,
body[data-theme='dark'] .unit-chip.compact,
.app[data-theme='dark'] .unit-chip.compact {
  background: #2c2923;
  border-color: #4f493c;
  color: #e0c38d;
}


html[data-theme='dark'] .unit-media,
body[data-theme='dark'] .unit-media,
.app[data-theme='dark'] .unit-media {
  background: #131821;
  border-bottom-color: #333b49;
}

html[data-theme='dark'] .unit-media-copy-btn,
body[data-theme='dark'] .unit-media-copy-btn,
.app[data-theme='dark'] .unit-media-copy-btn {
  background: #1a2432;
  border-color: #384962;
  color: #9eb3cb;
}

html[data-theme='dark'] .unit-media-copy-btn:hover,
body[data-theme='dark'] .unit-media-copy-btn:hover,
.app[data-theme='dark'] .unit-media-copy-btn:hover {
  background: #223044;
  border-color: #486280;
  color: #d7e7fb;
}

html[data-theme='dark'] .unit-title,
body[data-theme='dark'] .unit-title,
.app[data-theme='dark'] .unit-title {
  color: #e5ebf4;
}

html[data-theme='dark'] .unit-card-footer,
body[data-theme='dark'] .unit-card-footer,
.app[data-theme='dark'] .unit-card-footer {
  background: #191e27;
  border-top-color: #313947;
}

html[data-theme='dark'] .footer-icon,
body[data-theme='dark'] .footer-icon,
.app[data-theme='dark'] .footer-icon {
  color: #7d92ad;
}

html[data-theme='dark'] .footer-icon:hover,
body[data-theme='dark'] .footer-icon:hover,
.app[data-theme='dark'] .footer-icon:hover {
  background: #253140;
  color: #e5effd;
}

html[data-theme='dark'] .footer-icon.is-active,
body[data-theme='dark'] .footer-icon.is-active,
.app[data-theme='dark'] .footer-icon.is-active {
  background: rgba(24, 174, 151, 0.23);
  color: #8df0e2;
}

html[data-theme='dark'] .image-placeholder,
body[data-theme='dark'] .image-placeholder,
.app[data-theme='dark'] .image-placeholder {
  background: #0f151e;
  color: #90a1b8;
}

html[data-theme='dark'] .image-placeholder-title,
body[data-theme='dark'] .image-placeholder-title,
.app[data-theme='dark'] .image-placeholder-title {
  color: #b4c2d5;
}

html[data-theme='dark'] .unit-footer-action,
body[data-theme='dark'] .unit-footer-action,
.app[data-theme='dark'] .unit-footer-action {
  background: #101722;
  border-color: #304157;
  color: #d1deef;
}

html[data-theme='dark'] .unit-footer-action:hover,
body[data-theme='dark'] .unit-footer-action:hover,
.app[data-theme='dark'] .unit-footer-action:hover {
  background: #172131;
  border-color: #3d5470;
}

html[data-theme='dark'] .unit-footer-action.danger,
body[data-theme='dark'] .unit-footer-action.danger,
.app[data-theme='dark'] .unit-footer-action.danger {
  background: rgba(207, 94, 94, 0.18);
  border-color: rgba(207, 94, 94, 0.44);
  color: #ffb8b5;
}

html[data-theme='dark'] .unit-footer-action.danger:hover,
body[data-theme='dark'] .unit-footer-action.danger:hover,
.app[data-theme='dark'] .unit-footer-action.danger:hover {
  background: rgba(207, 94, 94, 0.26);
}


html[data-theme='dark'] .units-list-view,
body[data-theme='dark'] .units-list-view,
.app[data-theme='dark'] .units-list-view {
  background: #141820;
  border: 1px solid #2c3340;
}

html[data-theme='dark'] .units-table thead,
body[data-theme='dark'] .units-table thead,
.app[data-theme='dark'] .units-table thead {
  background: #1c222c;
  border-bottom-color: #333b49;
}

html[data-theme='dark'] .units-table thead th,
html[data-theme='dark'] .units-table tbody td,
body[data-theme='dark'] .units-table thead th,
body[data-theme='dark'] .units-table tbody td,
.app[data-theme='dark'] .units-table thead th,
.app[data-theme='dark'] .units-table tbody td {
  color: #d2ddeb;
}

html[data-theme='dark'] .units-table tbody tr,
body[data-theme='dark'] .units-table tbody tr,
.app[data-theme='dark'] .units-table tbody tr {
  border-bottom-color: #293548;
}

html[data-theme='dark'] .units-table tbody tr:hover,
body[data-theme='dark'] .units-table tbody tr:hover,
.app[data-theme='dark'] .units-table tbody tr:hover {
  background: rgba(148, 163, 184, 0.12);
}

html[data-theme='dark'] .unit-link,
body[data-theme='dark'] .unit-link,
.app[data-theme='dark'] .unit-link {
  color: #78d6c9;
}

html[data-theme='dark'] .unit-link:hover,
body[data-theme='dark'] .unit-link:hover,
.app[data-theme='dark'] .unit-link:hover {
  color: #9ceddf;
}

html[data-theme='dark'] .status-badge.connected,
body[data-theme='dark'] .status-badge.connected,
.app[data-theme='dark'] .status-badge.connected {
  background: rgba(30, 173, 150, 0.24);
  color: #8defdf;
}

html[data-theme='dark'] .status-badge.disconnected,
body[data-theme='dark'] .status-badge.disconnected,
.app[data-theme='dark'] .status-badge.disconnected {
  background: rgba(207, 94, 94, 0.24);
  color: #ffaaa7;
}

html[data-theme='dark'] .no-units,
body[data-theme='dark'] .no-units,
.app[data-theme='dark'] .no-units {
  color: #9eb0c6;
}

html[data-theme='dark'] .unit-modal,
body[data-theme='dark'] .unit-modal,
.app[data-theme='dark'] .unit-modal {
  background: #121922;
  border-color: #2b3647;
}

html[data-theme='dark'] .unit-modal-header,
body[data-theme='dark'] .unit-modal-header,
.app[data-theme='dark'] .unit-modal-header {
  background: #171f2b;
  border-bottom-color: #2b3647;
}

html[data-theme='dark'] .unit-modal-header h3,
body[data-theme='dark'] .unit-modal-header h3,
.app[data-theme='dark'] .unit-modal-header h3 {
  color: #ebf3ff;
}

html[data-theme='dark'] .unit-field,
html[data-theme='dark'] .unit-field span,
body[data-theme='dark'] .unit-field,
body[data-theme='dark'] .unit-field span,
.app[data-theme='dark'] .unit-field,
.app[data-theme='dark'] .unit-field span {
  color: #9eb0c5;
}

html[data-theme='dark'] .unit-field input,
html[data-theme='dark'] .unit-field select,
html[data-theme='dark'] .unit-field textarea,
body[data-theme='dark'] .unit-field input,
body[data-theme='dark'] .unit-field select,
body[data-theme='dark'] .unit-field textarea,
.app[data-theme='dark'] .unit-field input,
.app[data-theme='dark'] .unit-field select,
.app[data-theme='dark'] .unit-field textarea {
  background: #0f151f;
  border-color: #2c374a;
  color: #dce7f5;
}

html[data-theme='dark'] .unit-modal-secondary,
body[data-theme='dark'] .unit-modal-secondary,
.app[data-theme='dark'] .unit-modal-secondary {
  background: #101722;
  border-color: #304157;
  color: #d1deef;
}

/* Scrollbar */

.units-sidebar::-webkit-scrollbar,
.units-grid::-webkit-scrollbar {
  width: 6px;
}

.units-sidebar::-webkit-scrollbar-track,
.units-grid::-webkit-scrollbar-track {
  background: transparent;
}

.units-sidebar::-webkit-scrollbar-thumb,
.units-grid::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

.units-sidebar::-webkit-scrollbar-thumb:hover,
.units-grid::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* Responsive */
@media (max-width: 1400px) {
  .units-grid {
    grid-template-columns: repeat(4, minmax(260px, 1fr));
  }
}

@media (max-width: 1024px) {
  .units-grid {
    grid-template-columns: repeat(4, minmax(260px, 1fr));
  }
}

@media (max-width: 768px) {
  .units-container {
    flex-direction: column;
    gap: 1rem;
  }

  .units-sidebar {
    width: 100%;
  }

  .units-grid {
    grid-template-columns: repeat(4, minmax(260px, 1fr));
  }

  .units-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}

@media (max-width: 900px) {
  .units-container {
    padding: 0.5rem;
  }

  .units-sidebar {
    max-height: none;
  }

  .units-controls {
    width: 100%;
    justify-content: flex-start;
  }

  .units-grid {
    gap: 0.8rem;
    padding-right: 0;
  }
}

@media (max-width: 640px) {
  .units-grid {
    grid-template-columns: repeat(4, minmax(260px, 1fr));
  }

  .unit-media {
    height: 160px;
  }
}

.jobs-page {
  margin-left: 0;
  margin-right: 0;
  padding: 2rem 2rem 2rem 2rem;
  width: 100%;
}

.jobs-page h1 {
  color: #2c3e50;
  margin-bottom: 1.5rem;
}

.jobs-page .btn {
  margin-bottom: 1.5rem;
}

.jobs-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.job-card {
  background: var(--panel-bg, #ffffff);
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.job-card h3 {
  margin-top: 0;
  color: #2c3e50;
}

.job-card .status {
  font-weight: 600;
  margin: 0.5rem 0;
}

.status.pending { color: #ff9800; }
.status.running { color: #4caf50; }

/* New layout for grouped job statuses */
.jobs-header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom: 1rem;
}

.jobs-column h2 {
  margin: 0 0 0.75rem 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #111827;
}

.jobs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.jobs-column {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(16,24,40,0.06);
}

.job-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  box-shadow: 0 1px 2px rgba(16,24,40,0.05);
  margin-bottom: 0.75rem;
}

.job-card-header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
}

.job-card h4, .job-card-header h4 { margin: 0; font-size: 1rem; }
.job-card .meta { font-size: 0.85rem; color: #6b7280; margin-top: 6px }
.job-card .notes { margin-top:8px; font-size:0.9rem; color:#374151 }

.status { font-weight:700; padding:4px 8px; border-radius:6px; font-size:0.75rem }
.status.running { background: rgba(72,187,120,0.12); color: #2e7d32 }
.status.done { background: rgba(16,185,129,0.06); color:#0b8450 }
.status.pending { background: rgba(255,152,0,0.08); color:#a04a00 }
.status.upcoming { background: rgba(11,89,214,0.06); color:#0b59d6 }

.empty { color: #9aa3b2; padding: 0.5rem 0 }
.jobs-grid .empty { grid-column: 1 / -1; }

.jobs-history {
  margin-top: 1.25rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(16,24,40,0.06);
}
.history-list { display:flex; flex-direction:column; gap:8px }
.history-item { padding:10px; background: #ffffff; border-radius:10px; border:1px solid #e5e7eb }
.history-title { font-weight:600 }
.history-notes { margin-top:6px; color:#6b7280 }

@media (max-width: 1000px) {
  .jobs-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .jobs-grid { grid-template-columns: 1fr; }
}

/* Jobs page dark theme */
html[data-theme='dark'] .jobs-page h1,
body[data-theme='dark'] .jobs-page h1,
.app[data-theme='dark'] .jobs-page h1 {
  color: #eaf0f8;
}

html[data-theme='dark'] .jobs-column h2,
body[data-theme='dark'] .jobs-column h2,
.app[data-theme='dark'] .jobs-column h2 {
  color: #d5dbe6;
}

html[data-theme='dark'] .jobs-column,
html[data-theme='dark'] .job-card,
html[data-theme='dark'] .jobs-history,
html[data-theme='dark'] .history-item,
body[data-theme='dark'] .jobs-column,
body[data-theme='dark'] .job-card,
body[data-theme='dark'] .jobs-history,
body[data-theme='dark'] .history-item,
.app[data-theme='dark'] .jobs-column,
.app[data-theme='dark'] .job-card,
.app[data-theme='dark'] .jobs-history,
.app[data-theme='dark'] .history-item {
  background: #171b22;
  border-color: #2f3643;
  color: #d5dbe6;
}

html[data-theme='dark'] .job-card .meta,
html[data-theme='dark'] .job-card .notes,
html[data-theme='dark'] .history-notes,
html[data-theme='dark'] .empty,
body[data-theme='dark'] .job-card .meta,
body[data-theme='dark'] .job-card .notes,
body[data-theme='dark'] .history-notes,
body[data-theme='dark'] .empty,
.app[data-theme='dark'] .job-card .meta,
.app[data-theme='dark'] .job-card .notes,
.app[data-theme='dark'] .history-notes,
.app[data-theme='dark'] .empty {
  color: #97a0ad;
}
.inventory-page {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  padding: 1.5rem;
}

.inventory-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.inventory-header h1 {
  margin: 0 0 0.4rem 0;
  font-size: 1.55rem;
  color: #1f2937;
}

.inventory-header p {
  margin: 0;
  color: #64748b;
  font-size: 0.95rem;
}

.inventory-header-actions {
  display: inline-flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.inventory-page .btn {
  border: 1px solid #d7dbe4;
  border-radius: 10px;
  background: #ffffff;
  color: #1f2937;
  font-weight: 600;
  height: 34px;
  padding: 0 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.inventory-page .btn:hover {
  transform: translateY(-1px);
}

.inventory-page .btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.inventory-page .btn-primary {
  background: #6D28D9;
  border-color: #6D28D9;
  color: #ffffff;
}

.inventory-page .btn-primary:hover {
  background: #1e40af;
  border-color: #1e40af;
}

.inventory-page .btn-danger {
  border-color: #fecaca;
  color: #dc2626;
  background: #fff1f2;
}

.inventory-page .btn-danger:hover {
  border-color: #fda4af;
  background: #ffe4e6;
}

.inventory-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.75rem;
}

.inventory-stat-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.inventory-stat-card span {
  color: #64748b;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.inventory-stat-card strong {
  color: #0f172a;
  font-size: 1.15rem;
}

.inventory-filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.65rem;
  align-items: end;
}

.inventory-input-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.inventory-input-wrap.span-2 {
  grid-column: span 2;
}

.inventory-input-wrap label {
  margin: 0;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 600;
}

.inventory-input-wrap input,
.inventory-input-wrap select,
.inventory-input-wrap textarea {
  border: 1px solid #d8dee9;
  border-radius: 10px;
  padding: 0.52rem 0.65rem;
  font-size: 0.92rem;
  color: #0f172a;
  background: #ffffff;
}

.inventory-input-wrap textarea {
  min-height: 78px;
  resize: vertical;
}

.inventory-input-wrap input:focus,
.inventory-input-wrap select:focus,
.inventory-input-wrap textarea:focus {
  outline: none;
  border-color: #7C3AED;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.inventory-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 34px;
  font-size: 0.9rem;
  color: #334155;
}

.inventory-checkbox input {
  width: 16px;
  height: 16px;
}

.inventory-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  font-size: 0.9rem;
}

.inventory-insights-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.inventory-insight-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 170px;
}

.inventory-insight-card h3 {
  margin: 0;
  font-size: 0.98rem;
  color: #0f172a;
}

.inventory-chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.5rem;
}

.inventory-chip {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.inventory-chip strong {
  font-size: 0.82rem;
  color: #0f172a;
}

.inventory-chip span,
.inventory-chip small {
  color: #64748b;
  font-size: 0.76rem;
}

.inventory-mini-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.mini-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.45rem 0.55rem;
}

.mini-row strong {
  display: block;
  font-size: 0.82rem;
}

.mini-row span {
  color: #64748b;
  font-size: 0.76rem;
}

.mini-metrics {
  text-align: right;
}

.mini-metrics span {
  display: block;
  color: #0f172a;
  font-weight: 600;
}

.mini-metrics small {
  color: #64748b;
  font-size: 0.75rem;
}

.mini-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  background: #e5e7eb;
  color: #374151;
  white-space: nowrap;
}

.mini-badge.success {
  background: #dcfce7;
  color: #166534;
}

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

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

.mini-badge.neutral {
  background: #e2e8f0;
  color: #475569;
}

.inventory-muted {
  color: #64748b;
  font-size: 0.85rem;
}

.inventory-table-wrap {
  overflow: auto;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #ffffff;
}

.inventory-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1080px;
}

.inventory-table thead th {
  text-align: left;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  background: #f8fafc;
  padding: 0.8rem;
  border-bottom: 1px solid #e5e7eb;
}

.inventory-table tbody td {
  padding: 0.82rem 0.8rem;
  border-bottom: 1px solid #eef2f7;
  vertical-align: middle;
  color: #0f172a;
  font-size: 0.88rem;
}

.inventory-table tbody tr:hover {
  background: #f9fbff;
}

.inventory-empty {
  text-align: center;
  color: #6b7280;
  padding: 2rem 0.8rem !important;
}

.asset-main {
  font-weight: 600;
}

.asset-sub {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 0.18rem;
}

.stock-value {
  font-weight: 700;
}

.stock-hint {
  font-size: 0.76rem;
  color: #7C3AED;
}

.stock-hint.warning {
  color: #b45309;
}

.row-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: nowrap;
}

.icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid #dbe1ec;
  background: #ffffff;
  color: #334155;
  font-weight: 700;
  cursor: pointer;
}

.icon-btn:hover {
  background: #f8fafc;
}

.inventory-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 240;
  padding: 1rem;
}

.inventory-modal {
  width: min(880px, 96vw);
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
}

.inventory-modal.wide-modal {
  width: min(1080px, 98vw);
}

.inventory-modal.detail-modal {
  width: min(820px, 95vw);
}

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

.inventory-modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.inventory-modal-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 72vh;
  overflow: auto;
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.inventory-modal-footer {
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  padding: 0.9rem 1rem;
}

.inventory-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.inventory-detail-grid > div {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.inventory-detail-grid > div.span-2 {
  grid-column: span 2;
}

.inventory-detail-grid span {
  color: #64748b;
  font-size: 0.75rem;
}

.inventory-detail-grid strong {
  color: #0f172a;
  font-size: 0.92rem;
}

@media (max-width: 1200px) {
  .inventory-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .inventory-input-wrap.span-2 {
    grid-column: span 3;
  }

  .inventory-insights-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 780px) {
  .inventory-page {
    padding: 1rem;
  }

  .inventory-filters {
    grid-template-columns: 1fr;
  }

  .inventory-input-wrap.span-2 {
    grid-column: span 1;
  }

  .inventory-header-actions {
    width: 100%;
  }

  .inventory-header-actions .btn {
    flex: 1;
  }

  .inventory-table {
    min-width: 980px;
  }

  .inventory-grid {
    grid-template-columns: 1fr;
  }

  .inventory-detail-grid {
    grid-template-columns: 1fr;
  }

  .inventory-detail-grid > div.span-2 {
    grid-column: span 1;
  }
}

/* Inventory page dark theme */
html[data-theme='dark'] .inventory-header h1,
body[data-theme='dark'] .inventory-header h1,
.app[data-theme='dark'] .inventory-header h1 {
  color: #eaf0f8;
}

html[data-theme='dark'] .inventory-header p,
html[data-theme='dark'] .inventory-input-wrap label,
html[data-theme='dark'] .inventory-muted,
body[data-theme='dark'] .inventory-header p,
body[data-theme='dark'] .inventory-input-wrap label,
body[data-theme='dark'] .inventory-muted,
.app[data-theme='dark'] .inventory-header p,
.app[data-theme='dark'] .inventory-input-wrap label,
.app[data-theme='dark'] .inventory-muted {
  color: #97a0ad;
}

html[data-theme='dark'] .inventory-stat-card,
html[data-theme='dark'] .inventory-insight-card,
html[data-theme='dark'] .inventory-table-wrap,
html[data-theme='dark'] .inventory-modal,
html[data-theme='dark'] .inventory-detail-grid > div,
body[data-theme='dark'] .inventory-stat-card,
body[data-theme='dark'] .inventory-insight-card,
body[data-theme='dark'] .inventory-table-wrap,
body[data-theme='dark'] .inventory-modal,
body[data-theme='dark'] .inventory-detail-grid > div,
.app[data-theme='dark'] .inventory-stat-card,
.app[data-theme='dark'] .inventory-insight-card,
.app[data-theme='dark'] .inventory-table-wrap,
.app[data-theme='dark'] .inventory-modal,
.app[data-theme='dark'] .inventory-detail-grid > div {
  background: #171b22;
  border-color: #2f3643;
  color: #d5dbe6;
}

html[data-theme='dark'] .inventory-input-wrap input,
html[data-theme='dark'] .inventory-input-wrap select,
html[data-theme='dark'] .inventory-input-wrap textarea,
body[data-theme='dark'] .inventory-input-wrap input,
body[data-theme='dark'] .inventory-input-wrap select,
body[data-theme='dark'] .inventory-input-wrap textarea,
.app[data-theme='dark'] .inventory-input-wrap input,
.app[data-theme='dark'] .inventory-input-wrap select,
.app[data-theme='dark'] .inventory-input-wrap textarea {
  background: #1b2029;
  border-color: #323a47;
  color: #d5dbe6;
}

html[data-theme='dark'] .inventory-table thead th,
body[data-theme='dark'] .inventory-table thead th,
.app[data-theme='dark'] .inventory-table thead th {
  background: #1b2029;
  border-bottom-color: #323a47;
  color: #97a0ad;
}

html[data-theme='dark'] .inventory-table tbody td,
body[data-theme='dark'] .inventory-table tbody td,
.app[data-theme='dark'] .inventory-table tbody td {
  border-bottom-color: #2d3442;
  color: #d5dbe6;
}

html[data-theme='dark'] .inventory-table tbody tr:hover,
body[data-theme='dark'] .inventory-table tbody tr:hover,
.app[data-theme='dark'] .inventory-table tbody tr:hover {
  background: rgba(22, 196, 173, 0.08);
}

html[data-theme='dark'] .inventory-empty,
html[data-theme='dark'] .asset-sub,
html[data-theme='dark'] .inventory-chip span,
html[data-theme='dark'] .inventory-chip small,
html[data-theme='dark'] .mini-row span,
html[data-theme='dark'] .mini-metrics small,
body[data-theme='dark'] .inventory-empty,
body[data-theme='dark'] .asset-sub,
body[data-theme='dark'] .inventory-chip span,
body[data-theme='dark'] .inventory-chip small,
body[data-theme='dark'] .mini-row span,
body[data-theme='dark'] .mini-metrics small,
.app[data-theme='dark'] .inventory-empty,
.app[data-theme='dark'] .asset-sub,
.app[data-theme='dark'] .inventory-chip span,
.app[data-theme='dark'] .inventory-chip small,
.app[data-theme='dark'] .mini-row span,
.app[data-theme='dark'] .mini-metrics small {
  color: #a0a9b7;
}

html[data-theme='dark'] .inventory-chip,
html[data-theme='dark'] .mini-row,
html[data-theme='dark'] .icon-btn,
body[data-theme='dark'] .inventory-chip,
body[data-theme='dark'] .mini-row,
body[data-theme='dark'] .icon-btn,
.app[data-theme='dark'] .inventory-chip,
.app[data-theme='dark'] .mini-row,
.app[data-theme='dark'] .icon-btn {
  background: #1b2029;
  border-color: #323a47;
  color: #d5dbe6;
}

html[data-theme='dark'] .icon-btn:hover,
body[data-theme='dark'] .icon-btn:hover,
.app[data-theme='dark'] .icon-btn:hover {
  background: #242b36;
}

.admin-page {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.admin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.admin-header h2 {
  margin: 0 0 0.25rem 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.admin-header p {
  margin: 0;
  color: #64748b;
}

.admin-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 1rem 1.25rem;
}

.admin-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.admin-card-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.admin-actions input,
.admin-actions select {
  height: 36px;
}

.permissions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.6rem;
  padding-top: 0.5rem;
}

.permission-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f8fafc;
}

.matrix-wrap {
  overflow-x: auto;
}

.matrix-table th,
.matrix-table td {
  text-align: center;
}

.matrix-table th:first-child,
.matrix-table td:first-child {
  text-align: left;
  min-width: 220px;
}

.admin-empty {
  padding: 1rem 0;
  color: #6b7280;
}

.admin-error {
  padding: 1rem 0;
  color: #ef4444;
  font-weight: 600;
}

.admin-table {
  width: 100%;
}

.admin-table th,
.admin-table td {
  padding: 0.75rem 0.4rem;
  border-bottom: 1px solid #e5e7eb;
}

.link-btn {
  background: transparent;
  border: none;
  color: var(--color-accent-primary);
  cursor: pointer;
  font-weight: 600;
}

.row-actions {
  display: inline-flex;
  gap: 0.5rem;
}

.link-btn.danger {
  color: #ef4444;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: flex;
  justify-content: flex-end;
  z-index: 200;
}

.drawer {
  width: 420px;
  height: 100%;
  background: var(--color-card-bg);
  border-left: 1px solid var(--color-border-default);
  display: flex;
  flex-direction: column;
}

.drawer-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--color-border-default);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-header h3 {
  margin: 0 0 0.25rem 0;
}

.drawer-header p {
  margin: 0;
  color: var(--color-text-secondary);
}

.role-usage-badges {
  display: inline-flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.drawer-close {
  border: 1px solid var(--color-border-default);
  border-radius: 8px;
  background: var(--color-bg-tertiary);
  padding: 4px 8px;
}

.drawer-body {
  padding: 1rem 1.25rem;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.drawer-form {
  display: grid;
  gap: 0.5rem;
}

.drawer-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--color-accent-lighter);
  color: var(--color-accent-primary);
}

.status-chip.active {
  background: rgba(124, 58, 237, 0.14);
  color: var(--color-accent-primary);
}

.status-chip.disabled {
  background: #f3f4f6;
  color: #6b7280;
}

.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  color: #64748b;
}

.admin-pagination-actions {
  display: inline-flex;
  gap: 0.5rem;
}

.audit-details {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.audit-details code {
  display: inline-block;
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.diff-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 220;
}

.diff-modal {
  width: min(900px, 90vw);
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}

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

.diff-modal-body {
  padding: 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.diff-modal-body pre {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.75rem;
  max-height: 360px;
  overflow: auto;
}

.diff-title {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

/* ===== Admin Screens - Layout + Cards ===== */
.admin-hero {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  flex: 1 1 420px;
}

.hero-card h2 {
  margin: 0 0 0.25rem 0;
  font-size: 1.4rem;
}

.hero-card p {
  margin: 0;
  color: #64748b;
}

.hero-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--color-text-primary);
  background: var(--color-accent-lighter);
}

.hero-icon.blue { background: var(--color-accent-light); color: var(--color-accent-primary); }
.hero-icon.orange { background: #ffedd5; color: #c2410c; }
.hero-icon.purple { background: #ede9fe; color: #6d28d9; }
.hero-icon.red { background: #fee2e2; color: #b91c1c; }
.hero-icon.indigo { background: #e0e7ff; color: #3730a3; }
.hero-icon.yellow { background: #fef9c3; color: #a16207; }

.hero-stats {
  display: grid;
  grid-auto-flow: column;
  gap: 0.75rem;
  align-items: stretch;
}

.hero-stats .stat {
  min-width: 120px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 0.75rem 1rem;
  text-align: right;
}

.hero-stats .stat strong {
  display: block;
  font-size: 1.1rem;
}

.hero-stats .stat span {
  color: #64748b;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-tabs {
  display: inline-flex;
  gap: 6px;
  background: #f3f4f6;
  padding: 4px;
  border-radius: 999px;
}

.filter-tabs .tab {
  border: none;
  background: transparent;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.filter-tabs .tab span {
  background: #e2e8f0;
  border-radius: 999px;
  padding: 2px 6px;
  font-size: 11px;
  color: #475569;
}

.filter-tabs .tab.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.filter-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Audit Log: keep filters on a single row (scroll if needed) */
.auditlog-page .filter-actions {
  flex-wrap: nowrap;
  overflow-x: auto;
  max-width: 100%;
}

.auditlog-page .filter-actions > * {
  flex: 0 0 auto;
}

.filter-actions input,
.filter-actions select {
  height: 36px;
  padding: 0 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
}

.card-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.list-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 1rem;
}

.list-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.list-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #f1f5f9;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.list-card-body {
  margin-top: 0.75rem;
  border-top: 1px solid #f1f5f9;
  padding-top: 0.75rem;
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  color: #475569;
  font-size: 0.85rem;
}

.list-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: #e2e8f0;
  color: #475569;
}

.status-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--pill-dot, currentColor);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pill-dot, currentColor) 18%, transparent);
}

.status-pill.success { background: #dcfce7; color: #166534; --pill-dot: #22c55e; }
.status-pill.danger { background: #fee2e2; color: #b91c1c; --pill-dot: #ef4444; }
.status-pill.warning { background: #fef3c7; color: #92400e; --pill-dot: #f59e0b; }

.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 0.7rem;
  font-weight: 700;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
  min-width: 160px;
  z-index: 10;
  overflow: hidden;
}

.menu button {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 10px 12px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
}

.menu button:hover { background: #f8fafc; }
.menu button.danger { color: #b91c1c; }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.modal {
  width: min(560px, 92vw);
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
  border: 1px solid #e5e7eb;
}

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

.modal-footer {
  border-top: 1px solid #e5e7eb;
  border-bottom: none;
}

.modal-body {
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.modal-tabs {
  display: inline-flex;
  gap: 0.5rem;
  background: var(--color-bg-tertiary);
  border-radius: 12px;
  padding: 4px;
}

.modal-tabs .tab {
  padding: 6px 12px;
  border-radius: 10px;
  background: transparent;
  border: none;
  font-weight: 600;
  color: var(--color-text-secondary);
}

.modal-tabs .tab.active {
  background: var(--color-card-bg);
  color: var(--color-text-primary);
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-card-bg);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border-default);
}

.info-callout {
  background: var(--color-accent-light);
  color: var(--color-text-primary);
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-weight: 600;
}

.field-label {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  font-weight: 600;
}

.event-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.event-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #e2e8f0;
}

.event-dot.success { background: #22c55e; }
.event-dot.danger { background: #ef4444; }
.event-dot.warning { background: #f59e0b; }

.event-title {
  font-weight: 700;
}

@media (max-width: 960px) {
  .hero-stats { grid-auto-flow: row; }
  .filter-actions { width: 100%; }
}

.muted { color: #64748b; font-size: 0.85rem; }


.tab-icon {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  background: #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.tab.active .tab-icon {
  background: var(--color-accent-light);
  color: var(--color-accent-primary);
}

.count-badge {
  background: #e2e8f0;
  color: #475569;
  border-radius: 999px;
  padding: 2px 6px;
  font-size: 11px;
}

.input-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0 10px;
  height: 36px;
}

.input-icon .icon { font-size: 12px; color: #64748b; }

.input-icon input { border: none; outline: none; height: 32px; }

.meta-item { display: inline-flex; align-items: center; gap: 6px; }

.hero-icon svg { width: 26px; height: 26px; }

.modal .field-label { margin-bottom: 6px; display: block; }

/* ===== Admin UI polish for sample match ===== */
.btn {
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--color-border-default);
  border-radius: 10px;
  background: var(--color-card-bg);
  color: var(--color-text-primary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.btn svg { width: 14px; height: 14px; }

.btn-primary {
  background: var(--color-btn-primary);
  border-color: var(--color-btn-primary);
  color: var(--color-btn-primary-text);
}

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

.btn-outline {
  background: var(--color-accent-lighter);
  border-color: var(--color-accent-light);
  color: var(--color-accent-primary);
}

.btn-plus { font-weight: 900; margin-right: 4px; }

.page-menu { position: relative; }

.tab-icon {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  background: #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tab-icon svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
}

.tab.active .tab-icon {
  background: var(--color-accent-light);
  color: var(--color-accent-primary);
}

.count-badge {
  background: #e2e8f0;
  color: #475569;
  border-radius: 999px;
  padding: 1px 6px;
  font-size: 11px;
}

.input-icon {
  gap: 8px;
  padding: 0 12px;
}

.input-icon .icon svg { width: 14px; height: 14px; stroke: currentColor; fill: none; }

.list-card {
  border-radius: 14px;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.04);
}

.list-card-body { background: #f8fafc; }

.status-pill {
  letter-spacing: 0.05em;
  font-size: 0.68rem;
}

.sso-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.meta-item svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
}

.meta-item svg path,
.meta-item svg rect,
.meta-item svg circle,
.meta-item svg ellipse {
  stroke: currentColor;
}

.bulk-select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #475569;
}

.hero-stats .stat { min-width: 110px; }

.avatar.icon-blue { background: var(--color-accent-light); color: var(--color-accent-primary); }
.avatar.icon-orange { background: #ffedd5; color: #c2410c; }
.avatar.icon-purple { background: #ede9fe; color: #6d28d9; }
.avatar.icon-yellow { background: #fef9c3; color: #a16207; }
.avatar.icon-indigo { background: #e0e7ff; color: #3730a3; }
.icon-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; }
.filter-tabs .tab span { background: none; padding: 0; }
.filter-tabs .tab .count-badge { background: #e2e8f0; padding: 1px 6px; }
.filter-tabs .tab .tab-icon { background: #e2e8f0; }
.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  color: #334155;
}

.section-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
}

.section-icon svg { width: 16px; height: 16px; stroke: currentColor; fill: none; }

.section-title { font-weight: 700; }

.section-subtitle { font-size: 12px; color: #94a3b8; }
.modal input,
.modal select {
  height: 38px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0 12px;
  background: #ffffff;
}

.admin-table thead th {
  color: #64748b;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.admin-table tbody tr:hover { background: #f8fafc; }

/* ===== Pixel-accurate tweaks (spacing, fonts, colors) ===== */
.admin-page {
  gap: 16px;
}

.admin-hero { gap: 14px; }

.hero-card {
  padding: 14px 16px;
  border-radius: 14px;
  border-color: #e6e8ef;
  background: #ffffff;
}

.hero-card h2 {
  font-size: 20px;
  line-height: 24px;
  letter-spacing: -0.01em;
}

.hero-card p {
  font-size: 13px;
  color: #6b7280;
}

.hero-icon { width: 48px; height: 48px; border-radius: 12px; }

.hero-stats .stat {
  min-width: 96px;
  padding: 10px 12px;
  border-radius: 12px;
  border-color: #e6e8ef;
}

.hero-stats .stat strong { font-size: 16px; }
.hero-stats .stat span { font-size: 10px; letter-spacing: 0.08em; }

.filter-row { gap: 12px; }

.filter-tabs {
  background: #eef0f4;
  padding: 4px;
  border-radius: 999px;
  gap: 4px;
}

.filter-tabs .tab {
  padding: 6px 10px;
  font-size: 12.5px;
  color: #6b7280;
}

.filter-tabs .tab.active {
  background: #ffffff;
  color: #111827;
}

.filter-tabs .tab .tab-icon {
  width: 20px;
  height: 20px;
  border-radius: 7px;
  background: #e8ecf3;
}

.filter-actions input,
.filter-actions select,
.input-icon {
  height: 34px;
  border-radius: 9px;
  border-color: #e6e8ef;
}

.btn {
  height: 34px;
  padding: 0 10px;
  border-radius: 9px;
  font-size: 12.5px;
}

.btn-primary { background: var(--color-btn-primary); border-color: var(--color-btn-primary); }
.btn-primary:hover { background: var(--color-btn-primary-hover); }

.btn-outline {
  background: var(--color-accent-lighter);
  border-color: var(--color-accent-light);
  color: var(--color-accent-primary);
}

.card-list { gap: 12px; }

.list-card {
  border-radius: 14px;
  border-color: #e6e8ef;
  padding: 14px 16px;
}

.list-card-body {
  padding-top: 10px;
  margin-top: 10px;
  background: #f7f8fb;
}

.list-title strong { font-size: 14px; }

.muted { color: #7b8794; font-size: 12.5px; }

.meta-row { font-size: 12.5px; color: #5f6b7a; gap: 12px; }

.status-pill {
  font-size: 10.5px;
  padding: 4px 8px;
}

.admin-table th {
  font-size: 10px;
  color: #8a94a6;
}

.admin-table td { font-size: 12.5px; color: #1f2937; }

.modal {
  border-radius: 14px;
}

.modal-header h3 { font-size: 16px; }

.modal-body { gap: 10px; }

.modal input,
.modal select {
  height: 36px;
  border-radius: 9px;
}

.info-callout { font-size: 12.5px; }

/* ===== Final alignment pass ===== */
.filter-actions select { min-width: 140px; }
.filter-actions .input-icon { min-width: 200px; }
.filter-actions .btn-primary { padding: 0 14px; }

.admin-hero { align-items: center; }
.hero-card { min-height: 72px; }

.list-card-header { padding-bottom: 2px; }
.list-card-body { border-top-color: #edf0f5; }

.status-pill.success { background: #dcfce7; color: #16a34a; }
.status-pill.danger { background: #fee2e2; color: #dc2626; }
.status-pill.warning { background: #fef3c7; color: #d97706; }

.page-menu .menu { min-width: 180px; }

.modal { max-width: 600px; }

.admin-table th { padding-top: 10px; padding-bottom: 10px; }
.admin-table td { padding-top: 12px; padding-bottom: 12px; }

/* ===== Pixel alignment (sample match v2) ===== */
.hero-card,
.hero-stats .stat,
.list-card,
.admin-card {
  border-radius: 12px;
}

.hero-card { padding: 12px 14px; }

.hero-icon { width: 44px; height: 44px; border-radius: 12px; }

.list-card { padding: 12px 14px; }

.list-card-body { margin-top: 8px; padding-top: 8px; }

.avatar { width: 36px; height: 36px; border-radius: 10px; font-size: 12px; }

.filter-tabs { padding: 3px; }

.filter-tabs .tab { padding: 5px 10px; font-size: 12px; }

.filter-actions input,
.filter-actions select,
.input-icon,
.btn { height: 32px; }

.btn { font-size: 12px; }

.modal { border-radius: 12px; }

.modal-header,
.modal-footer { padding: 12px 14px; }

.modal-body { padding: 12px 14px; }

/* ===== Borderless UI (match sample) ===== */
.hero-card,
.hero-stats .stat,
.list-card,
.admin-card,
.modal,
.filter-tabs,
.input-icon,
.btn,
.status-pill,
.pill,
.admin-table th,
.admin-table td {
  border: none !important;
}

.list-card-body { border-top: none !important; }

.filter-actions input,
.filter-actions select,
.modal input,
.modal select { border: none !important; }

.admin-table tbody tr { border-bottom: 1px solid #eef1f5; }

/* Invite preview */
.invite-preview {
  margin-top: 10px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 0.85rem;
  color: #1f2937;
}

.invite-preview-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.invite-preview-url {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
  font-size: 0.78rem;
  color: #0f172a;
  word-break: break-all;
}

/* ===== User Management detailed panel ===== */
.user-filter-panel {
  margin-top: -4px;
}

.view-toggle {
  display: inline-flex;
  gap: 6px;
}

.bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}

.bulk-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.user-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.modal-large {
  width: min(940px, 96vw);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.detail-card {
  padding: 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}

.detail-card h4 {
  margin: 4px 0 2px 0;
  font-size: 1.05rem;
}

.detail-card p {
  margin: 2px 0;
}

.tag-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.tenant-chip-list {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.event-table-wrap {
  width: 100%;
  overflow-x: auto;
}

@media (max-width: 900px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== User Management (layout match) ===== */
.admin-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
  font-size: 0.85rem;
}

.admin-breadcrumb .sep {
  color: #cbd5e1;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.user-management-page .user-toolbar-row {
  align-items: center;
}

.user-management-page .user-toolbar {
  justify-content: flex-end;
}

.user-management-page .user-search {
  min-width: 240px;
}

.user-management-page .user-advanced-filters {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 10px 12px;
}

.admin-title-btn {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.admin-title-btn:focus-visible {
  outline: 2px solid rgba(15, 118, 110, 0.35);
  outline-offset: 3px;
  border-radius: 12px;
}

.admin-title-btn .admin-title-text strong {
  display: inline-block;
}

.admin-title-btn:hover .admin-title-text strong {
  text-decoration: underline;
}

.user-management-page .user-title-btn {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  text-align: left;
}

.user-management-page .user-title-btn:focus-visible {
  outline: 2px solid rgba(15, 118, 110, 0.35);
  outline-offset: 3px;
  border-radius: 12px;
}

.user-management-page .user-title-btn .user-title-text strong {
  display: inline-block;
}

.user-management-page .user-title-btn:hover .user-title-text strong {
  text-decoration: underline;
}

.user-management-page .list-card-body {
  background: transparent;
}

.user-management-page .user-card-meta {
  gap: 1.25rem;
}

.role-management-page .role-toolbar {
  justify-content: flex-end;
}

.role-management-page .role-search {
  min-width: 240px;
}
.login-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: radial-gradient(1200px 600px at 10% 10%, #eef2ff 0%, transparent 60%),
              radial-gradient(900px 500px at 90% 0%, #e0f2fe 0%, transparent 55%),
              #f6f7fb;
  position: relative;
  overflow: hidden;
  font-family: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

.login-page::before,
.login-page::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.12), transparent 70%);
  z-index: 0;
}

.login-page::before {
  width: 520px;
  height: 520px;
  top: -200px;
  left: -160px;
}

.login-page::after {
  width: 420px;
  height: 420px;
  bottom: -200px;
  right: -140px;
}

.login-card {
  width: min(380px, 90vw);
  aspect-ratio: 3 / 4;
  background: #ffffff;
  border: 1px solid #e6e9ef;
  border-radius: 20px;
  padding: 26px 28px 24px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.login-card-compact {
  aspect-ratio: auto;
  padding: 20px 24px 22px;
  justify-content: flex-start;
}

.login-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  text-align: center;
}

.login-logo-wrap {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.login-logo {
  width: 26px;
  height: 26px;
  -o-object-fit: contain;
     object-fit: contain;
}

.login-welcome {
  font-size: 1.02rem;
  font-weight: 700;
  color: #0f172a;
}

.login-welcome-sub {
  font-size: 0.82rem;
  color: #6b7280;
}

.login-title {
  font-size: 1.7rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 18px;
}

.login-alert {
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.86rem;
  margin-bottom: 12px;
}

.login-alert-success {
  background: #ecfdf3;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.login-alert-error {
  background: #fff1f2;
  color: #9f1239;
  border: 1px solid #fecdd3;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.login-input {
  height: 46px;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  padding: 0 14px;
  font-size: 0.92rem;
  background: #f9fafb;
}

.login-input:focus {
  outline: none;
  border-color: #93c5fd;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.input-icon-wrap {
  position: relative;
  width: 100%;
}
.login-page .input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #1f2937;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: transparent;
  pointer-events: none;
}
.login-page .input-icon svg {
  width: 28px;
  height: 28px;
  display: block;
  stroke: #1f2937;
  fill: none;
}
.login-page .input-icon svg path,
.login-page .input-icon svg rect,
.login-page .input-icon svg circle {
  stroke: #1f2937;
}
.login-page .input-icon svg circle[fill='currentColor'] {
  fill: #1f2937;
  stroke: none;
}
.login-page .input-field {
  padding-left: 50px;
}
.login-remember-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.86rem;
  color: #4b5563;
  margin-top: 2px;
}

.login-remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
  padding-left: 2px;
}

.login-remember input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #7C3AED;
}

.login-link-btn {
  background: transparent;
  border: none;
  color: #7C3AED;
  cursor: pointer;
  padding: 0;
  font-size: 0.85rem;
}

.login-submit-btn {
  height: 46px;
  border-radius: 14px;
  border: none;
  background: #7C3AED;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}

.login-submit-btn:hover:not(:disabled) {
  background: #6D28D9;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.25);
  transform: translateY(-1px);
}

.login-submit-outline:hover:not(:disabled) {
  background: #7C3AED;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}

.login-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.login-submit-outline {
  background: #ffffff;
  color: #7C3AED;
  border: 1px solid #c7d2fe;
}

.forgot-form,
.reset-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.forgot-title {
  font-size: 1.4rem;
  font-weight: 700;
}

.forgot-close-btn {
  border: none;
  background: transparent;
  cursor: pointer;
}

.forgot-help {
  font-size: 0.9rem;
  color: #374151;
}

.forgot-divider {
  height: 1px;
  background: #e5e7eb;
}

.forgot-input {
  height: 46px;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  padding: 0 14px;
  font-size: 0.9rem;
  background: #f9fafb;
  outline: none;
}

.forgot-input.input-field {
  padding-left: 46px;
}

.forgot-input:focus {
  border-color: #93c5fd;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.forgot-submit-btn {
  height: 46px;
  border-radius: 14px;
  border: none;
  background: #7C3AED;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

.forgot-success {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  background: #ffffff;
}

/* ============================================
   AUTH DARK THEME
   ============================================ */

[data-theme='dark'] .login-page {
  background: radial-gradient(1200px 600px at 10% 10%, rgba(30, 58, 95, 0.45) 0%, transparent 60%),
              radial-gradient(900px 500px at 90% 0%, rgba(38, 64, 104, 0.35) 0%, transparent 55%),
              #0f1724;
}

[data-theme='dark'] .login-page::before,
[data-theme='dark'] .login-page::after {
  background: radial-gradient(circle, rgba(127, 180, 255, 0.18), transparent 70%);
}

[data-theme='dark'] .login-card {
  background: #182233;
  border-color: #33435c;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

[data-theme='dark'] .login-logo-wrap {
  background: #1f2a3d;
  border-color: #33435c;
}

[data-theme='dark'] .login-welcome,
[data-theme='dark'] .login-title,
[data-theme='dark'] .forgot-title {
  color: #f3f8ff;
}

[data-theme='dark'] .login-welcome-sub,
[data-theme='dark'] .login-remember-row,
[data-theme='dark'] .forgot-help {
  color: #9fb4cf;
}

[data-theme='dark'] .login-input,
[data-theme='dark'] .forgot-input {
  background: #1f2a3d;
  border-color: #33435c;
  color: #e5ecf7;
}

[data-theme='dark'] .login-input:focus,
[data-theme='dark'] .forgot-input:focus {
  background: #22324a;
  border-color: #5b84b9;
}

[data-theme='dark'] .login-page .input-icon,
[data-theme='dark'] .login-page .input-icon svg,
[data-theme='dark'] .login-page .input-icon svg path,
[data-theme='dark'] .login-page .input-icon svg rect,
[data-theme='dark'] .login-page .input-icon svg circle {
  color: #b6c9e3;
  stroke: #b6c9e3;
}

[data-theme='dark'] .forgot-divider {
  background: #33435c;
}

[data-theme='dark'] .forgot-success {
  border-color: #33435c;
  background: #1f2a3d;
  color: #d4e4f8;
}

.reset-title,
.reset-success-title {
  font-size: 1.6rem;
  font-weight: 700;
}

.reset-help {
  font-size: 0.9rem;
  color: #374151;
}

.reset-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  color: #4b5563;
}

.reset-input {
  height: 46px;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  padding: 0 14px;
  background: #f9fafb;
}

.invite-activation-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.invite-activation-help {
  color: #4b5563;
  margin-bottom: 6px;
}

.invite-activation-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  color: #4b5563;
}

.invite-activation-input {
  height: 46px;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  padding: 0 14px;
  background: #f9fafb;
}

.invite-activation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.invite-activation-submit {
  height: 44px;
  border-radius: 12px;
  border: none;
  background: #7C3AED;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 600px) {
  .login-logo-wrap {
    width: 56px;
    height: 56px;
    border-radius: 16px;
  }

  .login-logo {
    width: 34px;
    height: 34px;
  }

  .invite-activation-grid {
    grid-template-columns: 1fr;
  }

      /* Ensure input text is never hidden by icons on mobile */
  .login-page .input-icon {
    left: 10px;
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }
  .login-page .input-icon svg {
    width: 25px;
    height: 25px;
  }
  .login-page .input-field {
    padding-left: 46px;
  }
  .login-input {
    height: 44px;
    font-size: 0.9rem;
  }
}


.player-page {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  padding: 1.5rem;
}

.player-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.player-header h1 {
  margin: 0 0 0.35rem 0;
  font-size: 1.55rem;
  color: #1f2937;
}

.player-header p {
  margin: 0;
  color: #64748b;
  font-size: 0.95rem;
}

.player-header-actions {
  display: inline-flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn {
  border: 1px solid #d7dbe4;
  border-radius: 10px;
  background: #ffffff;
  color: #1f2937;
  font-weight: 600;
  height: 34px;
  padding: 0 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: #6D28D9;
  border-color: #6D28D9;
  color: #ffffff;
}

.btn-primary:hover {
  background: #1e40af;
  border-color: #1e40af;
}

.btn-danger {
  border-color: #fecaca;
  color: #dc2626;
  background: #fff1f2;
}

.btn-danger:hover {
  border-color: #fda4af;
  background: #ffe4e6;
}

.player-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
}

.player-stat {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.player-stat span {
  color: #64748b;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.player-stat strong {
  color: #0f172a;
  font-size: 1.2rem;
}

.player-stat strong.online {
  color: #7C3AED;
}

.player-stat strong.offline {
  color: #dc2626;
}

.player-stat strong.maintenance {
  color: #b45309;
}

.player-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  align-items: end;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field.span-2 {
  grid-column: span 2;
}

.field label {
  margin: 0;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  border: 1px solid #d8dee9;
  border-radius: 10px;
  padding: 0.52rem 0.65rem;
  font-size: 0.92rem;
  color: #0f172a;
  background: #ffffff;
}

.field textarea {
  min-height: 82px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: #7C3AED;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.player-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  font-size: 0.9rem;
}

.player-table-wrap {
  overflow: auto;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #ffffff;
}

.player-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1120px;
}

.player-table thead th {
  text-align: left;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  background: #f8fafc;
  padding: 0.8rem;
  border-bottom: 1px solid #e5e7eb;
}

.player-table tbody td {
  padding: 0.82rem 0.8rem;
  border-bottom: 1px solid #eef2f7;
  vertical-align: middle;
  color: #0f172a;
  font-size: 0.88rem;
}

.player-table tbody tr:hover {
  background: #f9fbff;
}

.player-empty {
  text-align: center;
  color: #6b7280;
  padding: 2rem 0.8rem !important;
}

.player-name {
  font-weight: 600;
}

.player-id {
  margin-top: 0.2rem;
  font-size: 0.77rem;
  color: #64748b;
}

.mac-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.mac-cell code {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.3rem 0.45rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  background: #e2e8f0;
  color: #334155;
  white-space: nowrap;
}

.status-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--pill-dot, currentColor);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pill-dot, currentColor) 18%, transparent);
}

.status-pill.online { background: #dcfce7; color: #166534; --pill-dot: #22c55e; }
.status-pill.offline { background: #fee2e2; color: #b91c1c; --pill-dot: #ef4444; }
.status-pill.maintenance { background: #fef3c7; color: #92400e; --pill-dot: #f59e0b; }

.actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: nowrap;
}

.icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid #dbe1ec;
  background: #ffffff;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.icon-btn:hover {
  background: #f8fafc;
}

.player-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 240;
  padding: 1rem;
}

.player-modal {
  width: min(980px, 97vw);
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
}

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

.player-modal-header h3 {
  margin: 0;
  font-size: 1.05rem;
}

.player-modal-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 72vh;
  overflow: auto;
}

.player-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.player-modal-footer {
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  padding: 0.9rem 1rem;
}

@media (max-width: 920px) {
  .player-page {
    padding: 1rem;
  }

  .player-filters {
    grid-template-columns: 1fr;
  }

  .field.span-2 {
    grid-column: span 1;
  }

  .player-header-actions {
    width: 100%;
  }

  .player-header-actions .btn {
    flex: 1;
  }

  .player-grid {
    grid-template-columns: 1fr;
  }
}

/* Player page dark theme */
html[data-theme='dark'] .player-header h1,
body[data-theme='dark'] .player-header h1,
.app[data-theme='dark'] .player-header h1 {
  color: #eaf0f8;
}

html[data-theme='dark'] .player-header p,
html[data-theme='dark'] .field label,
body[data-theme='dark'] .player-header p,
body[data-theme='dark'] .field label,
.app[data-theme='dark'] .player-header p,
.app[data-theme='dark'] .field label {
  color: #97a0ad;
}

html[data-theme='dark'] .player-stat,
html[data-theme='dark'] .player-table-wrap,
html[data-theme='dark'] .player-modal,
body[data-theme='dark'] .player-stat,
body[data-theme='dark'] .player-table-wrap,
body[data-theme='dark'] .player-modal,
.app[data-theme='dark'] .player-stat,
.app[data-theme='dark'] .player-table-wrap,
.app[data-theme='dark'] .player-modal {
  background: #171b22;
  border-color: #2f3643;
}

html[data-theme='dark'] .field input,
html[data-theme='dark'] .field select,
html[data-theme='dark'] .field textarea,
body[data-theme='dark'] .field input,
body[data-theme='dark'] .field select,
body[data-theme='dark'] .field textarea,
.app[data-theme='dark'] .field input,
.app[data-theme='dark'] .field select,
.app[data-theme='dark'] .field textarea {
  background: #1b2029;
  border-color: #323a47;
  color: #d5dbe6;
}

html[data-theme='dark'] .player-table thead th,
body[data-theme='dark'] .player-table thead th,
.app[data-theme='dark'] .player-table thead th {
  background: #1b2029;
  border-bottom-color: #323a47;
  color: #97a0ad;
}

html[data-theme='dark'] .player-table tbody td,
body[data-theme='dark'] .player-table tbody td,
.app[data-theme='dark'] .player-table tbody td {
  border-bottom-color: #2d3442;
  color: #d5dbe6;
}

html[data-theme='dark'] .player-table tbody tr:hover,
body[data-theme='dark'] .player-table tbody tr:hover,
.app[data-theme='dark'] .player-table tbody tr:hover {
  background: rgba(22, 196, 173, 0.08);
}

html[data-theme='dark'] .player-empty,
html[data-theme='dark'] .player-id,
body[data-theme='dark'] .player-empty,
body[data-theme='dark'] .player-id,
.app[data-theme='dark'] .player-empty,
.app[data-theme='dark'] .player-id {
  color: #a0a9b7;
}

html[data-theme='dark'] .mac-cell code,
body[data-theme='dark'] .mac-cell code,
.app[data-theme='dark'] .mac-cell code {
  background: #1b2029;
  border-color: #323a47;
  color: #d5dbe6;
}

html[data-theme='dark'] .player-modal-header,
html[data-theme='dark'] .player-modal-footer,
body[data-theme='dark'] .player-modal-header,
body[data-theme='dark'] .player-modal-footer,
.app[data-theme='dark'] .player-modal-header,
.app[data-theme='dark'] .player-modal-footer {
  border-color: #2f3643;
}

/* required styles */

.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
	position: absolute;
	left: 0;
	top: 0;
	}
.leaflet-container {
	overflow: hidden;
	}
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow {
	-webkit-user-select: none;
	   -moz-user-select: none;
	        user-select: none;
	  -webkit-user-drag: none;
	}
/* Prevents IE11 from highlighting tiles in blue */
.leaflet-tile::-moz-selection {
	background: transparent;
}
.leaflet-tile::selection {
	background: transparent;
}
/* Safari renders non-retina tile on retina better with this, but Chrome is worse */
.leaflet-safari .leaflet-tile {
	image-rendering: -webkit-optimize-contrast;
	}
/* hack that prevents hw layers "stretching" when loading new tiles */
.leaflet-safari .leaflet-tile-container {
	width: 1600px;
	height: 1600px;
	-webkit-transform-origin: 0 0;
	}
.leaflet-marker-icon,
.leaflet-marker-shadow {
	display: block;
	}
/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */
/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */
.leaflet-container .leaflet-overlay-pane svg {
	max-width: none !important;
	max-height: none !important;
	}
.leaflet-container .leaflet-marker-pane img,
.leaflet-container .leaflet-shadow-pane img,
.leaflet-container .leaflet-tile-pane img,
.leaflet-container img.leaflet-image-layer,
.leaflet-container .leaflet-tile {
	max-width: none !important;
	max-height: none !important;
	width: auto;
	padding: 0;
	}

.leaflet-container img.leaflet-tile {
	/* See: https://bugs.chromium.org/p/chromium/issues/detail?id=600120 */
	mix-blend-mode: plus-lighter;
}

.leaflet-container.leaflet-touch-zoom {
	touch-action: pan-x pan-y;
	}
.leaflet-container.leaflet-touch-drag {
	/* Fallback for FF which doesn't support pinch-zoom */
	touch-action: none;
	touch-action: pinch-zoom;
}
.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {
	touch-action: none;
}
.leaflet-container {
	-webkit-tap-highlight-color: transparent;
}
.leaflet-container a {
	-webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);
}
.leaflet-tile {
	filter: inherit;
	visibility: hidden;
	}
.leaflet-tile-loaded {
	visibility: inherit;
	}
.leaflet-zoom-box {
	width: 0;
	height: 0;
	box-sizing: border-box;
	z-index: 800;
	}
/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */
.leaflet-overlay-pane svg {
	-moz-user-select: none;
	}

.leaflet-pane         { z-index: 400; }

.leaflet-tile-pane    { z-index: 200; }
.leaflet-overlay-pane { z-index: 400; }
.leaflet-shadow-pane  { z-index: 500; }
.leaflet-marker-pane  { z-index: 600; }
.leaflet-tooltip-pane   { z-index: 650; }
.leaflet-popup-pane   { z-index: 700; }

.leaflet-map-pane canvas { z-index: 100; }
.leaflet-map-pane svg    { z-index: 200; }

.leaflet-vml-shape {
	width: 1px;
	height: 1px;
	}
.lvml {
	behavior: url(#default#VML);
	display: inline-block;
	position: absolute;
	}


/* control positioning */

.leaflet-control {
	position: relative;
	z-index: 800;
	pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
	pointer-events: auto;
	}
.leaflet-top,
.leaflet-bottom {
	position: absolute;
	z-index: 1000;
	pointer-events: none;
	}
.leaflet-top {
	top: 0;
	}
.leaflet-right {
	right: 0;
	}
.leaflet-bottom {
	bottom: 0;
	}
.leaflet-left {
	left: 0;
	}
.leaflet-control {
	float: left;
	clear: both;
	}
.leaflet-right .leaflet-control {
	float: right;
	}
.leaflet-top .leaflet-control {
	margin-top: 10px;
	}
.leaflet-bottom .leaflet-control {
	margin-bottom: 10px;
	}
.leaflet-left .leaflet-control {
	margin-left: 10px;
	}
.leaflet-right .leaflet-control {
	margin-right: 10px;
	}


/* zoom and fade animations */

.leaflet-fade-anim .leaflet-popup {
	opacity: 0;
	transition: opacity 0.2s linear;
	}
.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
	opacity: 1;
	}
.leaflet-zoom-animated {
	transform-origin: 0 0;
	}
svg.leaflet-zoom-animated {
	will-change: transform;
}

.leaflet-zoom-anim .leaflet-zoom-animated {
	transition:         transform 0.25s cubic-bezier(0,0,0.25,1);
	}
.leaflet-zoom-anim .leaflet-tile,
.leaflet-pan-anim .leaflet-tile {
	transition: none;
	}

.leaflet-zoom-anim .leaflet-zoom-hide {
	visibility: hidden;
	}


/* cursors */

.leaflet-interactive {
	cursor: pointer;
	}
.leaflet-grab {
	cursor:         grab;
	}
.leaflet-crosshair,
.leaflet-crosshair .leaflet-interactive {
	cursor: crosshair;
	}
.leaflet-popup-pane,
.leaflet-control {
	cursor: auto;
	}
.leaflet-dragging .leaflet-grab,
.leaflet-dragging .leaflet-grab .leaflet-interactive,
.leaflet-dragging .leaflet-marker-draggable {
	cursor: move;
	cursor:         grabbing;
	}

/* marker & overlays interactivity */
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-image-layer,
.leaflet-pane > svg path,
.leaflet-tile-container {
	pointer-events: none;
	}

.leaflet-marker-icon.leaflet-interactive,
.leaflet-image-layer.leaflet-interactive,
.leaflet-pane > svg path.leaflet-interactive,
svg.leaflet-image-layer.leaflet-interactive path {
	pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
	pointer-events: auto;
	}

/* visual tweaks */

.leaflet-container {
	background: #ddd;
	outline-offset: 1px;
	}
.leaflet-container a {
	color: #0078A8;
	}
.leaflet-zoom-box {
	border: 2px dotted #38f;
	background: rgba(255,255,255,0.5);
	}


/* general typography */
.leaflet-container {
	font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
	font-size: 12px;
	font-size: 0.75rem;
	line-height: 1.5;
	}


/* general toolbar styles */

.leaflet-bar {
	box-shadow: 0 1px 5px rgba(0,0,0,0.65);
	border-radius: 4px;
	}
.leaflet-bar a {
	background-color: #fff;
	border-bottom: 1px solid #ccc;
	width: 26px;
	height: 26px;
	line-height: 26px;
	display: block;
	text-align: center;
	text-decoration: none;
	color: black;
	}
.leaflet-bar a,
.leaflet-control-layers-toggle {
	background-position: 50% 50%;
	background-repeat: no-repeat;
	display: block;
	}
.leaflet-bar a:hover,
.leaflet-bar a:focus {
	background-color: #f4f4f4;
	}
.leaflet-bar a:first-child {
	border-top-left-radius: 4px;
	border-top-right-radius: 4px;
	}
.leaflet-bar a:last-child {
	border-bottom-left-radius: 4px;
	border-bottom-right-radius: 4px;
	border-bottom: none;
	}
.leaflet-bar a.leaflet-disabled {
	cursor: default;
	background-color: #f4f4f4;
	color: #bbb;
	}

.leaflet-touch .leaflet-bar a {
	width: 30px;
	height: 30px;
	line-height: 30px;
	}
.leaflet-touch .leaflet-bar a:first-child {
	border-top-left-radius: 2px;
	border-top-right-radius: 2px;
	}
.leaflet-touch .leaflet-bar a:last-child {
	border-bottom-left-radius: 2px;
	border-bottom-right-radius: 2px;
	}

/* zoom control */

.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
	font: bold 18px 'Lucida Console', Monaco, monospace;
	text-indent: 1px;
	}

.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out  {
	font-size: 22px;
	}


/* layers control */

.leaflet-control-layers {
	box-shadow: 0 1px 5px rgba(0,0,0,0.4);
	background: #fff;
	border-radius: 5px;
	}
.leaflet-control-layers-toggle {
	background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAACf0lEQVR4AY1UM3gkARTePdvdoTxXKc+qTl3aU5U6b2Kbkz3Gtq3Zw6ziLGNPzrYx7946Tr6/ee/XeCQ4D3ykPtL5tHno4n0d/h3+xfuWHGLX81cn7r0iTNzjr7LrlxCqPtkbTQEHeqOrTy4Yyt3VCi/IOB0v7rVC7q45Q3Gr5K6jt+3Gl5nCoDD4MtO+j96Wu8atmhGqcNGHObuf8OM/x3AMx38+4Z2sPqzCxRFK2aF2e5Jol56XTLyggAMTL56XOMoS1W4pOyjUcGGQdZxU6qRh7B9Zp+PfpOFlqt0zyDZckPi1ttmIp03jX8gyJ8a/PG2yutpS/Vol7peZIbZcKBAEEheEIAgFbDkz5H6Zrkm2hVWGiXKiF4Ycw0RWKdtC16Q7qe3X4iOMxruonzegJzWaXFrU9utOSsLUmrc0YjeWYjCW4PDMADElpJSSQ0vQvA1Tm6/JlKnqFs1EGyZiFCqnRZTEJJJiKRYzVYzJck2Rm6P4iH+cmSY0YzimYa8l0EtTODFWhcMIMVqdsI2uiTvKmTisIDHJ3od5GILVhBCarCfVRmo4uTjkhrhzkiBV7SsaqS+TzrzM1qpGGUFt28pIySQHR6h7F6KSwGWm97ay+Z+ZqMcEjEWebE7wxCSQwpkhJqoZA5ivCdZDjJepuJ9IQjGGUmuXJdBFUygxVqVsxFsLMbDe8ZbDYVCGKxs+W080max1hFCarCfV+C1KATwcnvE9gRRuMP2prdbWGowm1KB1y+zwMMENkM755cJ2yPDtqhTI6ED1M/82yIDtC/4j4BijjeObflpO9I9MwXTCsSX8jWAFeHr05WoLTJ5G8IQVS/7vwR6ohirYM7f6HzYpogfS3R2OAAAAAElFTkSuQmCC);
	width: 36px;
	height: 36px;
	}
.leaflet-retina .leaflet-control-layers-toggle {
	background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAQAAABvcdNgAAAEsklEQVR4AWL4TydIhpZK1kpWOlg0w3ZXP6D2soBtG42jeI6ZmQTHzAxiTbSJsYLjO9HhP+WOmcuhciVnmHVQcJnp7DFvScowZorad/+V/fVzMdMT2g9Cv9guXGv/7pYOrXh2U+RRR3dSd9JRx6bIFc/ekqHI29JC6pJ5ZEh1yWkhkbcFeSjxgx3L2m1cb1C7bceyxA+CNjT/Ifff+/kDk2u/w/33/IeCMOSaWZ4glosqT3DNnNZQ7Cs58/3Ce5HL78iZH/vKVIaYlqzfdLu8Vi7dnvUbEza5Idt36tquZFldl6N5Z/POLof0XLK61mZCmJSWjVF9tEjUluu74IUXvgttuVIHE7YxSkaYhJZam7yiM9Pv82JYfl9nptxZaxMJE4YSPty+vF0+Y2up9d3wwijfjZbabqm/3bZ9ecKHsiGmRflnn1MW4pjHf9oLufyn2z3y1D6n8g8TZhxyzipLNPnAUpsOiuWimg52psrTZYnOWYNDTMuWBWa0tJb4rgq1UvmutpaYEbZlwU3CLJm/ayYjHW5/h7xWLn9Hh1vepDkyf7dE7MtT5LR4e7yYpHrkhOUpEfssBLq2pPhAqoSWKUkk7EDqkmK6RrCEzqDjhNDWNE+XSMvkJRDWlZTmCW0l0PHQGRZY5t1L83kT0Y3l2SItk5JAWHl2dCOBm+fPu3fo5/3v61RMCO9Jx2EEYYhb0rmNQMX/vm7gqOEJLcXTGw3CAuRNeyaPWwjR8PRqKQ1PDA/dpv+on9Shox52WFnx0KY8onHayrJzm87i5h9xGw/tfkev0jGsQizqezUKjk12hBMKJ4kbCqGPVNXudyyrShovGw5CgxsRICxF6aRmSjlBnHRzg7Gx8fKqEubI2rahQYdR1YgDIRQO7JvQyD52hoIQx0mxa0ODtW2Iozn1le2iIRdzwWewedyZzewidueOGqlsn1MvcnQpuVwLGG3/IR1hIKxCjelIDZ8ldqWz25jWAsnldEnK0Zxro19TGVb2ffIZEsIO89EIEDvKMPrzmBOQcKQ+rroye6NgRRxqR4U8EAkz0CL6uSGOm6KQCdWjvjRiSP1BPalCRS5iQYiEIvxuBMJEWgzSoHADcVMuN7IuqqTeyUPq22qFimFtxDyBBJEwNyt6TM88blFHao/6tWWhuuOM4SAK4EI4QmFHA+SEyWlp4EQoJ13cYGzMu7yszEIBOm2rVmHUNqwAIQabISNMRstmdhNWcFLsSm+0tjJH1MdRxO5Nx0WDMhCtgD6OKgZeljJqJKc9po8juskR9XN0Y1lZ3mWjLR9JCO1jRDMd0fpYC2VnvjBSEFg7wBENc0R9HFlb0xvF1+TBEpF68d+DHR6IOWVv2BECtxo46hOFUBd/APU57WIoEwJhIi2CdpyZX0m93BZicktMj1AS9dClteUFAUNUIEygRZCtik5zSxI9MubTBH1GOiHsiLJ3OCoSZkILa9PxiN0EbvhsAo8tdAf9Seepd36lGWHmtNANTv5Jd0z4QYyeo/UEJqxKRpg5LZx6btLPsOaEmdMyxYdlc8LMaJnikDlhclqmPiQnTEpLUIZEwkRagjYkEibQErwhkTAKCLQEbUgkzJQWc/0PstHHcfEdQ+UAAAAASUVORK5CYII=);
	background-size: 26px 26px;
	}
.leaflet-touch .leaflet-control-layers-toggle {
	width: 44px;
	height: 44px;
	}
.leaflet-control-layers .leaflet-control-layers-list,
.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
	display: none;
	}
.leaflet-control-layers-expanded .leaflet-control-layers-list {
	display: block;
	position: relative;
	}
.leaflet-control-layers-expanded {
	padding: 6px 10px 6px 6px;
	color: #333;
	background: #fff;
	}
.leaflet-control-layers-scrollbar {
	overflow-y: scroll;
	overflow-x: hidden;
	padding-right: 5px;
	}
.leaflet-control-layers-selector {
	margin-top: 2px;
	position: relative;
	top: 1px;
	}
.leaflet-control-layers label {
	display: block;
	font-size: 13px;
	font-size: 1.08333em;
	}
.leaflet-control-layers-separator {
	height: 0;
	border-top: 1px solid #ddd;
	margin: 5px -10px 5px -6px;
	}

/* Default icon URLs */
.leaflet-default-icon-path { /* used only in path-guessing heuristic, see L.Icon.Default */
	background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=);
	}


/* attribution and scale controls */

.leaflet-container .leaflet-control-attribution {
	background: #fff;
	background: rgba(255, 255, 255, 0.8);
	margin: 0;
	}
.leaflet-control-attribution,
.leaflet-control-scale-line {
	padding: 0 5px;
	color: #333;
	line-height: 1.4;
	}
.leaflet-control-attribution a {
	text-decoration: none;
	}
.leaflet-control-attribution a:hover,
.leaflet-control-attribution a:focus {
	text-decoration: underline;
	}
.leaflet-attribution-flag {
	display: inline !important;
	vertical-align: baseline !important;
	width: 1em;
	height: 0.6669em;
	}
.leaflet-left .leaflet-control-scale {
	margin-left: 5px;
	}
.leaflet-bottom .leaflet-control-scale {
	margin-bottom: 5px;
	}
.leaflet-control-scale-line {
	border: 2px solid #777;
	border-top: none;
	line-height: 1.1;
	padding: 2px 5px 1px;
	white-space: nowrap;
	box-sizing: border-box;
	background: rgba(255, 255, 255, 0.8);
	text-shadow: 1px 1px #fff;
	}
.leaflet-control-scale-line:not(:first-child) {
	border-top: 2px solid #777;
	border-bottom: none;
	margin-top: -2px;
	}
.leaflet-control-scale-line:not(:first-child):not(:last-child) {
	border-bottom: 2px solid #777;
	}

.leaflet-touch .leaflet-control-attribution,
.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
	box-shadow: none;
	}
.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
	border: 2px solid rgba(0,0,0,0.2);
	background-clip: padding-box;
	}


/* popup */

.leaflet-popup {
	position: absolute;
	text-align: center;
	margin-bottom: 20px;
	}
.leaflet-popup-content-wrapper {
	padding: 1px;
	text-align: left;
	border-radius: 12px;
	}
.leaflet-popup-content {
	margin: 13px 24px 13px 20px;
	line-height: 1.3;
	font-size: 13px;
	font-size: 1.08333em;
	min-height: 1px;
	}
.leaflet-popup-content p {
	margin: 17px 0;
	margin: 1.3em 0;
	}
.leaflet-popup-tip-container {
	width: 40px;
	height: 20px;
	position: absolute;
	left: 50%;
	margin-top: -1px;
	margin-left: -20px;
	overflow: hidden;
	pointer-events: none;
	}
.leaflet-popup-tip {
	width: 17px;
	height: 17px;
	padding: 1px;

	margin: -10px auto 0;
	pointer-events: auto;
	transform: rotate(45deg);
	}
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
	background: white;
	color: #333;
	box-shadow: 0 3px 14px rgba(0,0,0,0.4);
	}
.leaflet-container a.leaflet-popup-close-button {
	position: absolute;
	top: 0;
	right: 0;
	border: none;
	text-align: center;
	width: 24px;
	height: 24px;
	font: 16px/24px Tahoma, Verdana, sans-serif;
	color: #757575;
	text-decoration: none;
	background: transparent;
	}
.leaflet-container a.leaflet-popup-close-button:hover,
.leaflet-container a.leaflet-popup-close-button:focus {
	color: #585858;
	}
.leaflet-popup-scrolled {
	overflow: auto;
	}

.leaflet-oldie .leaflet-popup-content-wrapper {
	-ms-zoom: 1;
	}
.leaflet-oldie .leaflet-popup-tip {
	width: 24px;
	margin: 0 auto;

	-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
	filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
	}

.leaflet-oldie .leaflet-control-zoom,
.leaflet-oldie .leaflet-control-layers,
.leaflet-oldie .leaflet-popup-content-wrapper,
.leaflet-oldie .leaflet-popup-tip {
	border: 1px solid #999;
	}


/* div icon */

.leaflet-div-icon {
	background: #fff;
	border: 1px solid #666;
	}


/* Tooltip */
/* Base styles for the element that has a tooltip */
.leaflet-tooltip {
	position: absolute;
	padding: 6px;
	background-color: #fff;
	border: 1px solid #fff;
	border-radius: 3px;
	color: #222;
	white-space: nowrap;
	-webkit-user-select: none;
	-moz-user-select: none;
	user-select: none;
	pointer-events: none;
	box-shadow: 0 1px 3px rgba(0,0,0,0.4);
	}
.leaflet-tooltip.leaflet-interactive {
	cursor: pointer;
	pointer-events: auto;
	}
.leaflet-tooltip-top:before,
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
	position: absolute;
	pointer-events: none;
	border: 6px solid transparent;
	background: transparent;
	content: "";
	}

/* Directions */

.leaflet-tooltip-bottom {
	margin-top: 6px;
}
.leaflet-tooltip-top {
	margin-top: -6px;
}
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-top:before {
	left: 50%;
	margin-left: -6px;
	}
.leaflet-tooltip-top:before {
	bottom: 0;
	margin-bottom: -12px;
	border-top-color: #fff;
	}
.leaflet-tooltip-bottom:before {
	top: 0;
	margin-top: -12px;
	margin-left: -6px;
	border-bottom-color: #fff;
	}
.leaflet-tooltip-left {
	margin-left: -6px;
}
.leaflet-tooltip-right {
	margin-left: 6px;
}
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
	top: 50%;
	margin-top: -6px;
	}
.leaflet-tooltip-left:before {
	right: 0;
	margin-right: -12px;
	border-left-color: #fff;
	}
.leaflet-tooltip-right:before {
	left: 0;
	margin-left: -12px;
	border-right-color: #fff;
	}

/* Printing */

@media print {
	/* Prevent printers from removing background-images of controls. */
	.leaflet-control {
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
		}
	}
:root {
	--fullscreen-icon-enter: url('data:image/svg+xml,<svg viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg"><path d="M5 10.3V5.9c0-.5.4-.9.9-.9h4.4c.2 0 .4.2.4.4V7c0 .2-.2.4-.4.4h-3v3c0 .2-.2.4-.4.4H5.4a.4.4 0 0 1-.4-.4zm10.3-4.9V7c0 .2.2.4.4.4h3v3c0 .2.2.4.4.4h1.5c.2 0 .4-.2.4-.4V5.9c0-.5-.4-.9-.9-.9h-4.4c-.2 0-.4.2-.4.4zm5.3 9.9H19c-.2 0-.4.2-.4.4v3h-3c-.2 0-.4.2-.4.4v1.5c0 .2.2.4.4.4h4.4c.5 0 .9-.4.9-.9v-4.4c0-.2-.2-.4-.4-.4zm-9.9 5.3V19c0-.2-.2-.4-.4-.4h-3v-3c0-.2-.2-.4-.4-.4H5.4c-.2 0-.4.2-.4.4v4.4c0 .5.4.9.9.9h4.4c.2 0 .4-.2.4-.4z" fill="%23333"/></svg>');
	--fullscreen-icon-exit: url('data:image/svg+xml,<svg viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg"><path d="M20.6 10.7H16a.9.9 0 0 1-.8-.8v-4.5c0-.2.2-.4.4-.4h1.4c.3 0 .5.2.5.4v3h3c.2 0 .4.2.4.5v1.4c0 .2-.2.4-.4.4zm-9.9-.8V5.4c0-.2-.2-.4-.4-.4H8.9c-.3 0-.5.2-.5.4v3h-3c-.2 0-.4.2-.4.5v1.4c0 .2.2.4.4.4H9.9c.4 0 .8-.4.8-.8zm0 10.7V16c0-.4-.4-.8-.8-.8H5.4c-.2 0-.4.2-.4.4v1.4c0 .3.2.5.4.5h3v3c0 .2.2.4.5.4h1.4c.2 0 .4-.2.4-.4zm6.9 0v-3h3c.2 0 .4-.2.4-.5v-1.4c0-.2-.2-.4-.4-.4H16c-.4 0-.8.4-.8.8v4.5c0 .2.2.4.4.4h1.5c.3 0 .5-.2.5-.4z" fill="%23333"/></svg>');
}

.leaflet-fullscreen-icon {
	background-image: var(--fullscreen-icon-enter);
	background-size: 26px 26px;
}

.leaflet-fullscreen-icon.leaflet-fullscreen-on {
	background-image: var(--fullscreen-icon-exit);
}

/* Safari still needs this vendor-prefix: https://caniuse.com/mdn-css_selectors_fullscreen */
.leaflet-container:-webkit-full-screen,
.leaflet-container:fullscreen {
	width: 100% !important;
	height: 100% !important;
	z-index: 99999;
}

.leaflet-pseudo-fullscreen {
	position: fixed !important;
	width: 100% !important;
	height: 100% !important;
	top: 0 !important;
	left: 0 !important;
	z-index: 99999;
}
.sites-page {
  padding: 12px 16px 22px;
}

.sites-map-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid #d2dee9;
  background: #d9e6f1;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14);
}

.sites-map-frame {
  width: 100%;
  height: min(78vh, 820px);
  min-height: 520px;
}

.sites-map-shell .leaflet-top.leaflet-left {
  margin-top: 150px;
  margin-left: 10px;
}

.sites-map-shell .leaflet-control-layers {
  display: none;
}

.sites-map-shell .leaflet-control-zoom a {
  border-radius: 9px;
}

.sites-search-bar {
  position: absolute;
  top: 16px;
  left: 16px;
  width: min(680px, calc(100% - 32px));
  height: 56px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.2);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px 0 4px;
  z-index: 650;
}

.sites-search-icon-btn,
.sites-search-go {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: #475569;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.sites-search-icon-btn svg,
.sites-search-go svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sites-search-icon-btn:hover {
  background: #eef2f7;
}

.sites-search-go {
  background: #008f9f;
  color: #ffffff;
  box-shadow: 0 7px 16px rgba(0, 143, 159, 0.32);
}

.sites-search-go:hover {
  background: #017f8d;
}

.sites-search-bar input {
  flex: 1;
  min-width: 120px;
  border: 0;
  background: transparent;
  font-size: 17px;
  color: #27344a;
  outline: none;
}

.sites-search-bar input::-moz-placeholder {
  color: #6b7280;
}

.sites-search-bar input::placeholder {
  color: #6b7280;
}

.sites-map-status-strip {
  position: absolute;
  top: 82px;
  left: 16px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  max-width: calc(100% - 32px);
  z-index: 640;
}

.sites-map-status-strip span {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #ffffff;
  font-size: 12px;
  letter-spacing: 0.01em;
}

.sites-map-status-strip .is-error {
  background: rgba(185, 28, 28, 0.94);
}

.sites-map-utils {
  position: absolute;
  top: 82px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 640;
}

.sites-map-util-btn {
  height: 32px;
  border: 1px solid rgba(15, 23, 42, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.93);
  color: #1f2937;
  font-size: 12px;
  font-weight: 600;
  padding: 0 11px;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.sites-map-util-btn.is-active {
  background: #0a7f8d;
  border-color: #0a7f8d;
  color: #ffffff;
}

.sites-map-util-btn:hover:not(:disabled) {
  border-color: rgba(15, 23, 42, 0.34);
}

.sites-map-util-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.sites-layer-dock {
  position: absolute;
  left: 16px;
  bottom: 16px;
  max-width: calc(100% - 32px);
  display: flex;
  align-items: flex-end;
  gap: 10px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 18px;
  padding: 10px;
  overflow-x: auto;
  z-index: 640;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.2);
  backdrop-filter: blur(8px);
}

.sites-layer-pill {
  width: 118px;
  min-width: 118px;
  border-radius: 13px;
  color: #ffffff;
  font-size: 25px;
  font-weight: 700;
  padding: 12px 12px;
  display: flex;
  align-items: flex-end;
  background:
    linear-gradient(180deg, rgba(13, 23, 30, 0.12) 0%, rgba(15, 23, 42, 0.55) 100%),
    linear-gradient(135deg, #7db58f 0%, #366f82 45%, #1f2f4c 100%);
}

.sites-layer-option {
  width: 92px;
  min-width: 92px;
  border: 2px solid transparent;
  border-radius: 13px;
  background: rgba(248, 250, 252, 0.88);
  color: #334155;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 6px;
  font-size: 12px;
  cursor: pointer;
}

.sites-layer-option.is-active {
  border-color: #008f9f;
  color: #005e68;
  background: #e8f6f8;
}

.sites-layer-thumb {
  width: 78px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background-size: cover;
  background-position: center;
}

.sites-layer-thumb.tone-standard {
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(12, 18, 28, 0.2) 100%),
    radial-gradient(circle at 28% 34%, #75b88b 0 30%, transparent 31%),
    radial-gradient(circle at 70% 58%, #69a3c4 0 22%, transparent 23%),
    linear-gradient(135deg, #d4e7c6 0%, #89c697 44%, #7eb4d7 100%);
}

.sites-layer-thumb.tone-light {
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(15, 23, 42, 0.12) 100%),
    linear-gradient(130deg, #f4f6f8 0%, #d8e0e7 45%, #c6d0da 100%);
}

.sites-layer-thumb.tone-satellite {
  background-image:
    linear-gradient(180deg, rgba(8, 20, 30, 0.12) 0%, rgba(8, 20, 30, 0.72) 100%),
    radial-gradient(circle at 25% 30%, #4e7f60 0 28%, transparent 29%),
    radial-gradient(circle at 63% 64%, #384f40 0 36%, transparent 37%),
    linear-gradient(140deg, #8eb68a 0%, #4f7f5c 40%, #354862 100%);
}

.sites-layer-thumb.tone-topo {
  background-image:
    linear-gradient(180deg, rgba(7, 18, 30, 0.04) 0%, rgba(7, 18, 30, 0.28) 100%),
    repeating-linear-gradient(140deg, rgba(58, 100, 76, 0.3) 0 5px, rgba(208, 226, 189, 0.45) 5px 10px),
    linear-gradient(140deg, #dce9cb 0%, #accf9f 38%, #7ea8b4 100%);
}

.sites-map-empty {
  position: absolute;
  left: 50%;
  top: 53%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 14px;
  padding: 15px 16px;
  text-align: center;
  width: min(340px, calc(100% - 40px));
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18);
  z-index: 620;
}

.sites-map-empty-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.sites-map-empty-subtitle {
  margin-top: 6px;
  font-size: 12px;
  color: #64748b;
}

.sites-marker-icon-wrapper {
  background: transparent;
  border: 0;
}

.sites-marker-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  display: block;
  box-shadow: 0 1px 5px rgba(15, 23, 42, 0.45);
}

.sites-marker-dot.is-online {
  background: #16a34a;
}

.sites-marker-dot.is-offline {
  background: #ef4444;
}

.sites-popup {
  font-size: 12px;
  line-height: 1.45;
}

.sites-popup-title {
  font-weight: 700;
  margin-bottom: 5px;
  color: #111827;
}

@media (max-width: 1080px) {
  .sites-map-frame {
    min-height: 460px;
  }

  .sites-map-utils {
    top: 116px;
    right: 16px;
    max-width: calc(100% - 32px);
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .sites-map-status-strip {
    max-width: 70%;
  }
}

@media (max-width: 760px) {
  .sites-page {
    padding: 8px;
  }

  .sites-map-shell {
    border-radius: 16px;
  }

  .sites-map-frame {
    min-height: 420px;
    height: 75vh;
  }

  .sites-search-bar {
    top: 12px;
    left: 12px;
    width: calc(100% - 24px);
    height: 52px;
  }

  .sites-search-icon-btn,
  .sites-search-go {
    width: 36px;
    height: 36px;
  }

  .sites-search-icon-btn svg,
  .sites-search-go svg {
    width: 20px;
    height: 20px;
  }

  .sites-search-bar input {
    font-size: 16px;
  }

  .sites-map-shell .leaflet-top.leaflet-left {
    margin-top: 196px;
    margin-left: 8px;
  }

  .sites-map-status-strip {
    top: 70px;
    left: 12px;
    max-width: calc(100% - 24px);
  }

  .sites-map-utils {
    top: 112px;
    left: 12px;
    right: auto;
    max-width: calc(100% - 24px);
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .sites-layer-dock {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: none;
    width: auto;
  }
}
.downloads-page {
  width: 100%;
  padding: 1rem 0;
}

.downloads-card {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.downloads-card h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  color: #0f172a;
}

.downloads-card p {
  margin: 0;
  color: #64748b;
  font-size: 0.9rem;
}
/*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */
@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-ease:initial}}}@layer theme{:root,:host{--color-black:#000;--spacing:.25rem;--container-lg:32rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--tracking-tight:-.025em;--tracking-widest:.1em;--radius-xl:.75rem;--radius-2xl:1rem;--shadow-sm:0 1px 3px 0 #0000001a, 0 1px 2px -1px #0000001a;--shadow-md:0 4px 6px -1px #0000001a, 0 2px 4px -2px #0000001a;--shadow-lg:0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;--shadow-xl:0 20px 25px -5px #0000001a, 0 8px 10px -6px #0000001a;--shadow-2xl:0 25px 50px -12px #00000040;--ease-out:cubic-bezier(0, 0, .2, 1);--blur-sm:8px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent;font-family:Inter,ui-sans-serif,system-ui,sans-serif;line-height:1.5}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-feature-settings:normal;font-variation-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentColor}::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::-moz-placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.top-4{top:calc(var(--spacing) * 4)}.top-\[50\%\]{top:50%}.right-4{right:calc(var(--spacing) * 4)}.left-2{left:calc(var(--spacing) * 2)}.left-\[50\%\]{left:50%}.z-50{z-index:50}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.container{margin-inline:auto;padding-inline:2rem}@media (min-width:40rem){.container{max-width:none}}@media (min-width:1400px){.container{max-width:1400px}}.-mx-1{margin-inline:calc(var(--spacing) * -1)}.my-1{margin-block:calc(var(--spacing) * 1)}.ml-auto{margin-left:auto}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-flex{display:inline-flex}.table{display:table}.h-2{height:calc(var(--spacing) * 2)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-11{height:calc(var(--spacing) * 11)}.h-full{height:100%}.h-px{height:1px}.w-2{width:calc(var(--spacing) * 2)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-10{width:calc(var(--spacing) * 10)}.w-30{width:calc(var(--spacing) * 30)}.w-40{width:calc(var(--spacing) * 40)}.w-60{width:calc(var(--spacing) * 60)}.w-70{width:calc(var(--spacing) * 70)}.w-80{width:calc(var(--spacing) * 80)}.w-100{width:calc(var(--spacing) * 100)}.w-full{width:100%}.w-px{width:1px}.max-w-lg{max-width:var(--container-lg)}.min-w-\[8rem\]{min-width:8rem}.min-w-\[12rem\]{min-width:12rem}.shrink-0{flex-shrink:0}.translate-x-\[-50\%\]{--tw-translate-x:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\[-50\%\]{--tw-translate-y:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.cursor-default{cursor:default}.resize{resize:both}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.content-center{align-content:center}.items-center{align-items:center}.justify-center{justify-content:center}.gap-2{gap:calc(var(--spacing) * 2)}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-border{border-color:hsl(var(--border))}.border-destructive\/20{border-color:hsl(var(--destructive))}@supports (color:color-mix(in lab, red, red)){.border-destructive\/20{border-color:color-mix(in oklab, hsl(var(--destructive)) 20%, transparent)}}.border-input{border-color:hsl(var(--input))}.border-primary\/20{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab, red, red)){.border-primary\/20{border-color:color-mix(in oklab, hsl(var(--primary)) 20%, transparent)}}.border-success\/20{border-color:hsl(var(--success))}@supports (color:color-mix(in lab, red, red)){.border-success\/20{border-color:color-mix(in oklab, hsl(var(--success)) 20%, transparent)}}.border-warning\/20{border-color:hsl(var(--warning))}@supports (color:color-mix(in lab, red, red)){.border-warning\/20{border-color:color-mix(in oklab, hsl(var(--warning)) 20%, transparent)}}.bg-black\/60{background-color:#0009}@supports (color:color-mix(in lab, red, red)){.bg-black\/60{background-color:color-mix(in oklab, var(--color-black) 60%, transparent)}}.bg-border{background-color:hsl(var(--border))}.bg-card{background-color:hsl(var(--card))}.bg-destructive,.bg-destructive\/10{background-color:hsl(var(--destructive))}@supports (color:color-mix(in lab, red, red)){.bg-destructive\/10{background-color:color-mix(in oklab, hsl(var(--destructive)) 10%, transparent)}}.bg-muted\/30{background-color:hsl(var(--muted))}@supports (color:color-mix(in lab, red, red)){.bg-muted\/30{background-color:color-mix(in oklab, hsl(var(--muted)) 30%, transparent)}}.bg-popover{background-color:hsl(var(--popover))}.bg-primary,.bg-primary\/10{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab, red, red)){.bg-primary\/10{background-color:color-mix(in oklab, hsl(var(--primary)) 10%, transparent)}}.bg-secondary{background-color:hsl(var(--secondary))}.bg-success\/10{background-color:hsl(var(--success))}@supports (color:color-mix(in lab, red, red)){.bg-success\/10{background-color:color-mix(in oklab, hsl(var(--success)) 10%, transparent)}}.bg-transparent{background-color:#0000}.bg-warning\/10{background-color:hsl(var(--warning))}@supports (color:color-mix(in lab, red, red)){.bg-warning\/10{background-color:color-mix(in oklab, hsl(var(--warning)) 10%, transparent)}}.fill-current{fill:currentColor}.p-1{padding:calc(var(--spacing) * 1)}.p-6{padding:calc(var(--spacing) * 6)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.pt-0{padding-top:calc(var(--spacing) * 0)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pl-8{padding-left:calc(var(--spacing) * 8)}.text-center{text-align:center}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-none{--tw-leading:1;line-height:1}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.whitespace-nowrap{white-space:nowrap}.text-card-foreground{color:hsl(var(--card-foreground))}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-foreground{color:hsl(var(--foreground))}.text-input{color:hsl(var(--input))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-secondary{color:hsl(var(--secondary))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-success{color:hsl(var(--success))}.text-warning{color:hsl(var(--warning))}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-primary-glow{--tw-shadow:0 0 0 1px var(--tw-shadow-color,hsl(var(--primary) / .18)), 0 10px 30px var(--tw-shadow-color,hsl(var(--primary) / .12));box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.ease-out{animation-timing-function:cubic-bezier(0,0,.2,1)}.running{animation-play-state:running}.file\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\:bg-transparent::file-selector-button{background-color:#0000}.file\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}@media (hover:hover){.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive))}@supports (color:color-mix(in lab, red, red)){.hover\:bg-destructive\/90:hover{background-color:color-mix(in oklab, hsl(var(--destructive)) 90%, transparent)}}.hover\:bg-muted\/30:hover{background-color:hsl(var(--muted))}@supports (color:color-mix(in lab, red, red)){.hover\:bg-muted\/30:hover{background-color:color-mix(in oklab, hsl(var(--muted)) 30%, transparent)}}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab, red, red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab, hsl(var(--primary)) 90%, transparent)}}.hover\:bg-secondary\/90:hover{background-color:hsl(var(--secondary))}@supports (color:color-mix(in lab, red, red)){.hover\:bg-secondary\/90:hover{background-color:color-mix(in oklab, hsl(var(--secondary)) 90%, transparent)}}.hover\:text-foreground:hover{color:hsl(var(--foreground))}}.focus\:bg-muted\/30:focus{background-color:hsl(var(--muted))}@supports (color:color-mix(in lab, red, red)){.focus\:bg-muted\/30:focus{background-color:color-mix(in oklab, hsl(var(--muted)) 30%, transparent)}}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color:hsl(var(--ring))}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=closed\]\:animate-out[data-state=closed]{--tw-exit-opacity:initial;--tw-exit-scale:initial;--tw-exit-rotate:initial;--tw-exit-translate-x:initial;--tw-exit-translate-y:initial;animation-name:exit;animation-duration:.15s}.data-\[state\=open\]\:bg-muted\/30[data-state=open]{background-color:hsl(var(--muted))}@supports (color:color-mix(in lab, red, red)){.data-\[state\=open\]\:bg-muted\/30[data-state=open]{background-color:color-mix(in oklab, hsl(var(--muted)) 30%, transparent)}}.data-\[state\=open\]\:animate-in[data-state=open]{--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial;animation-name:enter;animation-duration:.15s}@media (min-width:40rem){.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}.sm\:text-left{text-align:left}}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}}:root{--radius:1rem;--background:210 40% 98%;--foreground:222 47% 11%;--card:0 0% 100%;--card-foreground:222 47% 11%;--popover:0 0% 100%;--popover-foreground:222 47% 11%;--primary:262 83% 58%;--primary-foreground:210 40% 98%;--secondary:262 83% 58%;--secondary-foreground:210 40% 98%;--muted:210 40% 96%;--muted-foreground:215 16% 47%;--accent:210 40% 96%;--accent-foreground:222 47% 11%;--destructive:0 74% 42%;--destructive-foreground:210 40% 98%;--success:142 71% 45%;--success-foreground:210 40% 98%;--warning:38 92% 50%;--warning-foreground:222 47% 11%;--border:214 32% 91%;--input:214 32% 91%;--ring:262 83% 58%;--chart-1:262 83% 58%;--chart-2:142 71% 45%;--chart-3:38 92% 50%;--chart-4:262 83% 58%;--chart-5:0 74% 42%}[data-theme=dark]{--background:222 47% 6%;--foreground:210 20% 98%;--card:222 47% 9%;--card-foreground:210 20% 98%;--popover:222 47% 9%;--popover-foreground:210 20% 98%;--primary:262 83% 58%;--primary-foreground:210 20% 98%;--secondary:262 83% 58%;--secondary-foreground:210 20% 98%;--muted:222 30% 12%;--muted-foreground:215 20% 65%;--accent:222 30% 12%;--accent-foreground:210 20% 98%;--destructive:0 84% 60%;--destructive-foreground:210 20% 98%;--success:160 84% 39%;--success-foreground:210 20% 98%;--warning:38 92% 50%;--warning-foreground:222 47% 6%;--border:222 30% 18%;--input:222 30% 18%;--ring:262 83% 58%}*{border-color:hsl(var(--border))}html{color-scheme:light}[data-theme=dark]{color-scheme:dark}body{background-color:hsl(var(--background));color:hsl(var(--foreground));-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%;margin:0;font-family:Inter,ui-sans-serif,system-ui,sans-serif}html,body,#root{height:100%}*{-webkit-tap-highlight-color:transparent}.text-title{letter-spacing:-.025em;font-size:1.5rem;font-weight:700;line-height:2rem}.text-table-header{letter-spacing:.08em;text-transform:uppercase;color:hsl(var(--muted-foreground));font-size:.75rem;font-weight:600;line-height:1rem}.text-muted-label{color:hsl(var(--muted-foreground));font-size:.875rem;line-height:1.25rem}.text-mono-value{color:hsl(var(--muted-foreground));font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.75rem;line-height:1rem}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0), var(--tw-enter-translate-y,0), 0) scale3d(var(--tw-enter-scale,1), var(--tw-enter-scale,1), var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0), var(--tw-exit-translate-y,0), 0) scale3d(var(--tw-exit-scale,1), var(--tw-exit-scale,1), var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}
.forgot-password-container {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  padding: 20px;
}

.forgot-password-content {
  display: flex;
  background: var(--panel-bg, white);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
  max-width: 900px;
  width: 100%;
  overflow: hidden;
}

.forgot-left {
  flex: 1;
  background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  min-height: 500px;
}

.forgot-illustration {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 300px;
  max-height: 300px;
}

.circle-bg-forgot {
  width: 260px;
  height: 260px;
  background: var(--panel-bg, #f0f3f7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 0 auto;
}

.key-icon {
  width: 120px;
  height: 100px;
  background: #ff9800;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
  color: white;
  box-shadow: 0 4px 16px rgba(255, 152, 0, 0.3);
}

.decorative-shape-forgot {
  position: absolute;
  opacity: 0.6;
}

.shape-1-forgot {
  width: 12px;
  height: 12px;
  background: #ffb74d;
  border-radius: 50%;
  top: 20px;
  left: -10px;
}

.shape-2-forgot {
  width: 10px;
  height: 10px;
  background: #ffe082;
  clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
  bottom: 40px;
  left: 10px;
}

.shape-3-forgot {
  width: 12px;
  height: 12px;
  background: #ffb74d;
  border-radius: 2px;
  top: 50%;
  right: -15px;
  transform: rotate(45deg);
}

.forgot-right {
  flex: 1;
  padding: 80px 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 500px;
}

.forgot-form-wrapper {
  width: 100%;
  max-width: 320px;
}

.forgot-title {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 12px 0;
  text-align: left;
}

.forgot-subtitle {
  font-size: 14px;
  color: #666;
  margin: 0 0 30px 0;
  line-height: 1.5;
}

.forgot-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group-forgot {
  position: relative;
}

.form-input-forgot {
  width: 100%;
  padding: 12px 16px 12px 42px;
  border: none;
  border-radius: 28px;
  background: var(--panel-bg, #f0f2f5);
  font-size: 14px;
  font-family: inherit;
  transition: all 0.3s ease;
  color: #333;
}

.form-input-forgot::-moz-placeholder {
  color: #999;
}

.form-input-forgot::placeholder {
  color: #999;
}

.form-input-forgot:focus {
  outline: none;
  background: #e8eaed;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.form-input-forgot:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.input-icon-forgot {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  pointer-events: none;
}

.error-message-forgot {
  background: var(--panel-bg, #fff3cd);
  border: 1px solid var(--border-color, #ffc107);
  color: var(--text-color, #856404);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.error-message-forgot::before {
  content: '⚠️';
  font-size: 16px;
}

.reset-button {
  width: 100%;
  padding: 14px 20px;
  background: #ff9800;
  color: white;
  border: none;
  border-radius: 28px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
}

.reset-button:hover:not(:disabled) {
  background: #f57c00;
  box-shadow: 0 6px 20px rgba(255, 152, 0, 0.3);
  transform: translateY(-2px);
}

.reset-button:active:not(:disabled) {
  transform: translateY(0);
}

.reset-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.success-message-forgot {
  background: var(--panel-bg, #d4edda);
  border: 1px solid var(--border-color, #28a745);
  color: var(--text-color, #155724);
  padding: 30px 20px;
  border-radius: 12px;
  text-align: center;
  font-size: 14px;
}

.success-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 16px;
}

.success-message-forgot p {
  margin: 8px 0;
  line-height: 1.5;
}

.success-redirect {
  font-size: 12px;
  color: #5a7c6e;
  margin-top: 12px;
  font-style: italic;
}

.forgot-footer {
  text-align: center;
  margin-top: 24px;
}

.back-to-login {
  color: #666;
  text-decoration: none;
  font-size: 13px;
  transition: color 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.back-to-login:hover {
  color: #ff9800;
}

/* Responsive Design */
@media (max-width: 768px) {
  .forgot-password-content {
    flex-direction: column;
  }

  .forgot-left {
    min-height: 300px;
    padding: 40px 20px;
  }

  .forgot-right {
    min-height: auto;
    padding: 40px 20px;
  }

  .forgot-title {
    font-size: 24px;
    margin-bottom: 16px;
  }

  .forgot-form-wrapper {
    max-width: 100%;
  }

  .forgot-subtitle {
    font-size: 13px;
  }
}

/* ============================================
   FORGOT PASSWORD DARK THEME
   ============================================ */

[data-theme='dark'] .forgot-password-container {
  background: linear-gradient(135deg, #0f1724 0%, #1a2639 100%);
}

[data-theme='dark'] .forgot-password-content {
  background: #182233;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

[data-theme='dark'] .forgot-left {
  background: linear-gradient(135deg, #1b2a40 0%, #24324a 100%);
}

[data-theme='dark'] .circle-bg-forgot {
  background: #22324a;
}

[data-theme='dark'] .forgot-title {
  color: #f3f8ff;
}

[data-theme='dark'] .forgot-subtitle,
[data-theme='dark'] .back-to-login {
  color: #9fb4cf;
}

[data-theme='dark'] .form-input-forgot {
  background: #1f2a3d;
  color: #e5ecf7;
}

[data-theme='dark'] .form-input-forgot::-moz-placeholder {
  color: #8ea3bf;
}

[data-theme='dark'] .form-input-forgot::placeholder {
  color: #8ea3bf;
}

[data-theme='dark'] .form-input-forgot:focus {
  background: #22324a;
}
