/* Premium Dark-Mode Theme Stylesheet for Websocket Fingerprint System */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  --font-family: 'Outfit', sans-serif;
  --bg-gradient: radial-gradient(circle at 50% 50%, #1e1b4b 0%, #0f172a 100%);
  --sidebar-bg: rgba(15, 23, 42, 0.85);
  --card-bg: rgba(30, 41, 59, 0.6);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-hover-border: rgba(99, 102, 241, 0.4);
  
  --primary-color: #6366f1; /* Indigo */
  --primary-glow: rgba(99, 102, 241, 0.3);
  --secondary-color: #a855f7; /* Purple */
  --accent-color: #14b8a6; /* Teal */
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.3);
  --warning: #f59e0b;
  --warning-glow: rgba(245, 158, 11, 0.3);
  --danger: #f43f5e;
  --danger-glow: rgba(244, 63, 94, 0.3);
  
  --sidebar-width: 260px;
  --shadow-premium: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --blur-amount: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background: var(--bg-gradient);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
}

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

/* Sidebar Navigation */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  backdrop-filter: blur(var(--blur-amount));
  border-right: 1px solid var(--card-border);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: fixed;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px var(--primary-glow);
}

.brand-icon svg {
  fill: #fff;
  width: 22px;
  height: 22px;
}

.brand-title {
  font-size: 1.4rem;
  font-weight: 700;
  background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-grow: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
  padding-left: 1.25rem;
}

.nav-item.active {
  background: linear-gradient(90deg, var(--primary-glow) 0%, rgba(99, 102, 241, 0.05) 100%);
  border-left: 3px solid var(--primary-color);
  color: var(--text-main);
  box-shadow: var(--shadow-premium);
}

.nav-item svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  transition: stroke 0.3s ease;
}

.nav-item.active svg {
  stroke: var(--primary-color);
}

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid var(--card-border);
  padding-top: 1.5rem;
}

.server-status-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.server-status-text {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Main Content Area */
.main-content {
  flex-grow: 1;
  margin-left: var(--sidebar-width);
  padding: 2.5rem;
  min-height: 100vh;
  width: calc(100% - var(--sidebar-width));
}

/* View Sections */
.view-section {
  display: none;
  animation: fadeIn 0.15s ease-in-out forwards;
}

.view-section.active {
  display: block;
}

.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.view-title {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.view-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* KPI / Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.metric-card {
  background: var(--card-bg);
  backdrop-filter: blur(var(--blur-amount));
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-premium);
}

.metric-card:hover {
  transform: translateY(-4px);
  border-color: var(--card-hover-border);
}

.metric-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metric-value {
  font-size: 2.2rem;
  font-weight: 700;
  margin-top: 0.5rem;
}

.metric-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
}

.metric-icon-wrapper svg {
  width: 26px;
  height: 26px;
  stroke: var(--primary-color);
  fill: none;
  stroke-width: 2;
}

/* Dashboard Columns: Live Feed & Analytics */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.panel-card {
  background: var(--card-bg);
  backdrop-filter: blur(var(--blur-amount));
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 1.75rem;
  box-shadow: var(--shadow-premium);
  display: flex;
  flex-direction: column;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.panel-title {
  font-size: 1.2rem;
  font-weight: 600;
}

/* Real-time Logs Feed Widget */
.log-feed-container {
  height: 480px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

.empty-log-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  gap: 1rem;
}

.empty-log-state svg {
  width: 48px;
  height: 48px;
  stroke: var(--text-muted);
  fill: none;
  stroke-width: 1.5;
}

/* Real-time Log Card */
.log-item-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: slideInLog 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

.log-item-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(99, 102, 241, 0.25);
  transform: translateX(4px);
}

.log-item-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.log-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(168, 85, 247, 0.15) 100%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--text-main);
}

.log-info-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.log-emp-name {
  font-weight: 600;
  font-size: 1.05rem;
}

.log-emp-details {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.log-device-tag {
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
}

.log-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
}

.log-badge-state {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-in {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-out {
  background: rgba(244, 63, 94, 0.1);
  color: var(--danger);
  border: 1px solid rgba(244, 63, 94, 0.2);
}

.log-time {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Status dots */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.online {
  background-color: var(--success);
  box-shadow: 0 0 8px var(--success-glow);
  animation: pulseGreen 1.5s infinite;
}

.status-dot.offline {
  background-color: var(--danger);
  box-shadow: 0 0 8px var(--danger-glow);
}

.status-dot.connecting {
  background-color: var(--warning);
  box-shadow: 0 0 8px var(--warning-glow);
  animation: pulseYellow 1.5s infinite;
}

/* Buttons */
.btn {
  font-family: var(--font-family);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  padding: 0.65rem 1.25rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  border: none;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
  opacity: 0.95;
  box-shadow: 0 6px 18px var(--primary-glow);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.45rem 0.95rem;
  font-size: 0.8rem;
  border-radius: 8px;
  min-width: 75px;
  justify-content: center;
}

/* Device Management Tab Styles */
.devices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.device-card {
  background: var(--card-bg);
  backdrop-filter: blur(var(--blur-amount));
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 1.5rem;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: var(--shadow-premium);
  transition: all 0.3s ease;
}

.device-card:hover {
  transform: translateY(-4px);
  border-color: var(--card-hover-border);
  box-shadow: 0 12px 24px rgba(99, 102, 241, 0.15);
}

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

.device-title-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.device-name {
  font-weight: 600;
  font-size: 1.15rem;
}

.device-ip {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.virtual-tag {
  background: rgba(20, 184, 166, 0.1);
  color: var(--accent-color);
  border: 1px solid rgba(20, 184, 166, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}

.device-status-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.device-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1rem;
}

/* Modals & Dialogs */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: #1e293b;
  border: 1px solid var(--card-border);
  border-radius: 20px;
  width: 100%;
  max-width: 480px;
  padding: 2rem;
  box-shadow: var(--shadow-premium);
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-box {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-title {
  font-size: 1.3rem;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: var(--text-main);
}

/* Form Styles */
.form-group {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}

.form-input {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 8px var(--primary-glow);
}

.form-checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  cursor: pointer;
  user-select: none;
}

.form-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-color);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* Data Tables */
.table-panel {
  background: var(--card-bg);
  backdrop-filter: blur(var(--blur-amount));
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: var(--shadow-premium);
  margin-top: 1rem;
}

.table-controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.table-filters {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.filter-input {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 0.6rem 1rem;
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 0.85rem;
  outline: none;
  transition: all 0.3s ease;
}

.filter-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 8px var(--primary-glow);
  background: rgba(15, 23, 42, 0.6);
}

select.filter-input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='%2394a3b8' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.25rem;
  padding-right: 2.25rem;
  cursor: pointer;
}

.table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--card-border);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  background: rgba(15, 23, 42, 0.5);
  color: var(--text-muted);
  font-weight: 500;
  padding: 1rem 1.25rem;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--card-border);
}

.data-table td {
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.data-table tbody tr {
  transition: all 0.2s ease;
}

.data-table tbody tr:hover {
  background: rgba(99, 102, 241, 0.025);
}

.row-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: nowrap;
  align-items: center;
}

.data-table td:last-child {
  width: 1%;
  white-space: nowrap;
}

/* Floating Simulator Controller */
.simulator-widget {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 320px;
  background: rgba(30, 41, 59, 0.95);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(20, 184, 166, 0.3);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  z-index: 50;
  display: none;
  flex-direction: column;
  animation: slideUpWidget 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

.simulator-widget.active {
  display: flex;
}

.simulator-header {
  background: rgba(20, 184, 166, 0.15);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(20, 184, 166, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
}

.simulator-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent-color);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.simulator-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: #1e293b;
  border-left: 4px solid var(--primary-color);
  box-shadow: var(--shadow-premium);
  padding: 1rem 1.5rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideInToast 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
  min-width: 280px;
}

.toast.success {
  border-left-color: var(--success);
}

.toast.error {
  border-left-color: var(--danger);
}

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

@keyframes slideInLog {
  from { opacity: 0; transform: translateX(-15px); }
  to { opacity: 1; transform: translateX(0); }
}

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

@keyframes slideUpWidget {
  from { opacity: 0; transform: translateY(50px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseGreen {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes pulseYellow {
  0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5); }
  70% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

/* Pagination Styling */
.pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--card-border);
  flex-wrap: wrap;
  gap: 1rem;
}

.pagination-info {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.pagination-buttons {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.pagination-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 32px;
  text-align: center;
}

.pagination-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

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

.pagination-btn.active {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
  box-shadow: 0 2px 8px var(--primary-glow);
}

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

#pull-progress-overlay {
  display: none;
}
#pull-progress-overlay.visible {
  display: flex;
}

/* ========================================== */
/* RESPONSIVE DESIGN & MOBILE BREAKPOINTS     */
/* ========================================== */

/* Table Horizontal Overflow Wrapper */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

.table-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  width: 100%;
}

.header-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.header-row > div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Tablet & Mobile Breakpoints (<= 1024px) */
@media (max-width: 1024px) {
  .app-container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid var(--card-border);
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .sidebar-nav {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    width: 100%;
  }

  .nav-item {
    white-space: nowrap;
    padding: 0.5rem 0.85rem;
  }

  .main-content {
    padding: 1.25rem;
    width: 100%;
  }

  .metrics-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .device-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

/* Mobile Small Devices (<= 768px) */
@media (max-width: 768px) {
  .view-title {
    font-size: 1.35rem;
  }

  .view-subtitle {
    font-size: 0.8rem;
  }

  .table-filters input,
  .table-filters select {
    width: 100% !important;
    flex: 1 1 100%;
  }

  .header-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-row > div {
    width: 100%;
  }

  .header-row .btn {
    width: 100%;
    justify-content: center;
  }

  .pagination-bar {
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
    text-align: center;
  }

  .modal-box {
    width: 95vw !important;
    max-width: 95vw !important;
    padding: 1.25rem !important;
    margin: 1rem;
  }
}
