/* WhatsApp Server Manager - Lead Wave HSL Palette Design System */

:root {
  /* Color Tokens */
  --bg-primary: hsl(230, 25%, 6%);
  --bg-secondary: hsl(230, 22%, 10%);
  --bg-sidebar: hsl(230, 28%, 4%);
  
  --accent-teal: hsl(174, 90%, 50%);
  --accent-teal-glow: hsla(174, 90%, 50%, 0.2);
  --accent-lavender: hsl(270, 85%, 65%);
  --accent-lavender-glow: hsla(270, 85%, 65%, 0.2);
  
  --text-primary: hsl(210, 25%, 98%);
  --text-secondary: hsl(210, 15%, 72%);
  --text-muted: hsl(210, 10%, 48%);
  
  --glass-bg: rgba(20, 24, 38, 0.55);
  --glass-border: rgba(255, 255, 255, 0.09);
  --glass-border-focus: rgba(174, 90, 50, 0.4);
  
  --status-connected: hsl(142, 70%, 45%);
  --status-connecting: hsl(45, 90%, 55%);
  --status-linking: hsl(280, 85%, 65%);
  --status-disconnected: hsl(0, 80%, 60%);
  
  --font-family: 'Roboto', sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: hsl(222, 15%, 20%);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-teal);
}

/* Background Blur Orbs */
.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(160px);
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: screen;
}
.orb-1 {
  top: -15%;
  left: 15%;
  width: 55vw;
  height: 55vw;
  background: radial-gradient(circle, var(--accent-teal-glow) 0%, transparent 70%);
  animation: orbFloat1 28s infinite alternate ease-in-out;
}
.orb-2 {
  bottom: -20%;
  right: 5%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, var(--accent-lavender-glow) 0%, transparent 70%);
  animation: orbFloat2 22s infinite alternate ease-in-out;
}
.orb-3 {
  top: 30%;
  right: 35%;
  width: 35vw;
  height: 35vw;
  background: radial-gradient(circle, hsla(200, 85%, 60%, 0.1) 0%, transparent 70%);
  animation: orbFloat1 18s infinite alternate-reverse ease-in-out;
}

@keyframes orbFloat1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(6%, 8%) scale(1.12); }
}
@keyframes orbFloat2 {
  0% { transform: translate(0, 0) scale(1.1); }
  100% { transform: translate(-8%, -6%) scale(0.9); }
}

/* Glassmorphism Styles */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.35);
  transition: var(--transition-smooth);
}
.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 16px 48px 0 rgba(0, 0, 0, 0.45);
}

/* Login View Styling */
.login-body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}
.login-container {
  width: 100%;
  max-width: 420px;
  padding: 20px;
}
.login-card {
  padding: 40px 30px;
}
.login-header {
  text-align: center;
  margin-bottom: 35px;
}
.logo-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-lavender));
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
  box-shadow: 0 0 0 0 rgba(26, 222, 173, 0.4);
  animation: logoPulse 3s ease-in-out infinite;
}
.logo-icon {
  color: var(--bg-primary);
  width: 34px;
  height: 34px;
}
@keyframes logoPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(26, 222, 173, 0.4), 0 6px 24px rgba(26, 222, 173, 0.3); }
  50% { box-shadow: 0 0 0 14px rgba(26, 222, 173, 0), 0 6px 24px rgba(26, 222, 173, 0.45); }
}
.login-header h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.8px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-teal) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.login-header p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 6px;
}

/* Forms & Inputs */
.login-form .input-group, .form-group {
  margin-bottom: 20px;
}
label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  width: 18px;
  height: 18px;
}
input, select, textarea {
  width: 100%;
  padding: 14px 14px 14px 44px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 15px;
  font-family: var(--font-family);
  transition: var(--transition-fast);
  outline: none;
}

/* Dropdown / Select Styling */
select {
  padding-left: 14px;
  padding-right: 40px;
  background-color: hsl(230, 22%, 10%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2326d5b0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
}
select:hover {
  background-color: hsl(230, 22%, 13%);
  border-color: rgba(255, 255, 255, 0.15);
}
select option {
  background-color: hsl(230, 25%, 10%);
  color: var(--text-primary);
  padding: 10px 14px;
  font-family: var(--font-family);
  font-size: 15px;
}
select option:checked,
select option:hover {
  background-color: hsl(174, 50%, 18%);
  color: var(--accent-teal);
}
select option:disabled {
  color: var(--text-muted);
}

textarea {
  padding: 14px;
  min-height: 100px;
  resize: vertical;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent-teal);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(26, 222, 173, 0.12), 0 2px 12px rgba(26, 222, 173, 0.1);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 22px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  gap: 8px;
  outline: none;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn:active {
  transform: translateY(0);
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent-teal), hsl(174, 90%, 35%));
  color: var(--bg-primary);
  box-shadow: 0 4px 15px rgba(26, 222, 173, 0.25);
  background-size: 200% auto;
}
.btn-primary:hover {
  box-shadow: 0 8px 25px rgba(26, 222, 173, 0.4);
  background-position: right center;
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}
.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: hsl(0, 85%, 65%);
  border: 1px solid rgba(239, 68, 68, 0.25);
}
.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
}
.btn-block {
  display: flex;
  width: 100%;
}
.btn-icon {
  width: 18px;
  height: 18px;
}
button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Alerts */
.alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 20px;
}
.error-alert {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: hsl(0, 85%, 65%);
}
.alert-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.hidden {
  display: none !important;
}

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

/* Sidebar navigation */
.sidebar {
  width: 270px;
  min-width: 270px;
  background: linear-gradient(180deg, var(--bg-sidebar) 0%, hsl(230, 28%, 5%) 100%);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  z-index: 10;
  overflow: hidden;
}

/* Brand area */
.sidebar-brand {
  padding: 22px 20px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(0,0,0,0.15);
}
.sidebar-logo-circle {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-lavender));
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 12px rgba(26, 222, 173, 0.25);
}
.sidebar-logo-icon {
  color: var(--bg-primary);
  width: 20px;
  height: 20px;
}
.sidebar-brand h2 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.2;
}
.sidebar-tagline {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
  margin-top: 1px;
  letter-spacing: 0.2px;
}

/* Status bar */
.sidebar-status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  background: rgba(26, 222, 173, 0.05);
  border-bottom: 1px solid var(--glass-border);
  font-size: 12px;
}
.status-dot-live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--status-connected);
  box-shadow: 0 0 6px var(--status-connected);
  animation: pulseDot 2s ease-in-out infinite;
  flex-shrink: 0;
}
.status-live-text {
  color: var(--status-connected);
  font-weight: 600;
  font-size: 12px;
}
.status-port {
  margin-left: auto;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid var(--glass-border);
}

/* Nav sections */
.sidebar-menu {
  list-style: none;
  padding: 14px 12px 10px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}
.menu-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.1px;
  color: var(--text-muted);
  padding: 10px 10px 4px;
  margin-top: 4px;
}

/* Menu items */
.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
}
.menu-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  transform: translateX(3px);
}
.menu-item.active {
  background: linear-gradient(90deg, rgba(26, 222, 173, 0.15) 0%, rgba(26, 222, 173, 0.02) 100%);
  color: var(--accent-teal);
  border-left: 3px solid var(--accent-teal);
  padding-left: 9px;
  text-shadow: 0 0 12px rgba(26, 222, 173, 0.35);
}

/* Icon wrappers */
.menu-icon-wrap {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}
.menu-item.active .menu-icon-wrap {
  background: rgba(26, 222, 173, 0.12);
}
.menu-item:hover .menu-icon-wrap {
  background: rgba(255,255,255,0.07);
}
.menu-icon-wrap-purple {
  background: rgba(139, 92, 246, 0.1) !important;
}
.menu-icon {
  width: 16px;
  height: 16px;
}

/* Badge (device count) */
.menu-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  background: rgba(26, 222, 173, 0.15);
  color: var(--accent-teal);
  border: 1px solid rgba(26, 222, 173, 0.25);
  padding: 2px 7px;
  border-radius: 10px;
  min-width: 22px;
  text-align: center;
}

/* External link item */
.menu-item-external {
  color: var(--accent-lavender) !important;
}
.menu-item-external:hover {
  background: rgba(139, 92, 246, 0.08) !important;
  color: var(--accent-lavender) !important;
}
.menu-external-icon {
  width: 12px;
  height: 12px;
  margin-left: auto;
  opacity: 0.5;
}
.sidebar-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--glass-border);
}
.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(26, 222, 173, 0.15), rgba(139, 92, 246, 0.15));
  border: 1px solid rgba(26, 222, 173, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-teal);
  font-weight: 700;
  font-size: 13px;
}
.user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.user-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.user-role {
  font-size: 11px;
  color: var(--text-muted);
}

/* Main Content Area */
.main-content {
  flex-grow: 1;
  padding: 40px;
  overflow-y: auto;
  position: relative;
}
.header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 35px;
}
.header-title h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.header-title p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 4px;
}
.header-actions {
  display: flex;
  gap: 12px;
}

/* Content Tabs */
.tab-content {
  animation: fadeIn 0.4s ease-out;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Dashboard Panel Widgets */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}
.stat-card {
  padding: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(26, 222, 173, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  transition: var(--transition-smooth);
}
.stat-card:hover::before {
  transform: scale(1.5);
  opacity: 1.5;
}
.stat-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
}
.stat-val {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -1px;
}
.stat-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-teal);
  transition: var(--transition-smooth);
}
.stat-card:hover .stat-icon-wrapper {
  background: rgba(26, 222, 173, 0.1);
  transform: scale(1.05) rotate(-5deg);
}

.dashboard-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}
@media (max-width: 900px) {
  .dashboard-row {
    grid-template-columns: 1fr;
  }
}

.vitals-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.vital-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.vital-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}
.vital-label {
  color: var(--text-secondary);
}
.vital-val {
  font-weight: 600;
}
.progress-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-teal), var(--accent-lavender));
  border-radius: 3px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px rgba(26, 222, 173, 0.4);
}

/* Device Manager CSS */
.devices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.device-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.device-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.device-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
}
.device-icon-active {
  color: var(--accent-teal);
}
.device-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-grow: 1;
  padding-left: 12px;
}
.device-name {
  font-weight: 600;
  font-size: 16px;
}
.device-phone {
  font-size: 13px;
  color: var(--text-secondary);
}
.status-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.status-badge::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-connected {
  background: rgba(16, 185, 129, 0.12);
  color: var(--status-connected);
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.status-connected::before {
  background: var(--status-connected);
  box-shadow: 0 0 6px var(--status-connected);
  animation: pulseDot 2s ease-in-out infinite;
}
.status-connecting {
  background: rgba(245, 158, 11, 0.12);
  color: var(--status-connecting);
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.status-connecting::before {
  background: var(--status-connecting);
  animation: pulseDot 1.2s ease-in-out infinite;
}
.status-linking {
  background: rgba(139, 92, 246, 0.12);
  color: var(--status-linking);
  border: 1px solid rgba(139, 92, 246, 0.3);
}
.status-linking::before {
  background: var(--status-linking);
  animation: pulseDot 1s ease-in-out infinite;
}
.status-disconnected {
  background: rgba(239, 68, 68, 0.12);
  color: var(--status-disconnected);
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.status-disconnected::before {
  background: var(--status-disconnected);
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.75); }
}
.device-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  gap: 8px;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  animation: fadeIn 0.25s ease-out;
}
.modal-card {
  width: 100%;
  max-width: 440px;
  padding: 30px;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
}
.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
}
.modal-close:hover {
  color: var(--text-primary);
}

.qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--glass-border);
  border-radius: 12px;
  margin: 15px 0;
  min-height: 250px;
  position: relative;
}
.qr-image {
  max-width: 200px;
  max-height: 200px;
  background: white;
  padding: 10px;
  border-radius: 8px;
}
.qr-loader-spinner {
  border: 4px solid rgba(255, 255, 255, 0.1);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border-left-color: var(--accent-teal);
  animation: spin 1s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.qr-instructions {
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
  margin-top: 15px;
  line-height: 1.5;
}

/* CRUD Panels Structure */
.panel-card {
  padding: 30px;
  margin-bottom: 30px;
}
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.panel-header h2 {
  font-size: 20px;
  font-weight: 700;
}

/* Grid splits for Messaging or Rule Creation */
.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}
@media (max-width: 800px) {
  .split-grid {
    grid-template-columns: 1fr;
  }
}

/* Table styling for Logs & CRUD management */
.table-container {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
th {
  padding: 16px 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--glass-border);
}
td {
  padding: 16px 20px;
  font-size: 14px;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
tr:hover td {
  background: rgba(26, 222, 173, 0.025);
}
tbody tr {
  transition: background 0.15s ease;
}

.log-direction-received {
  color: var(--accent-lavender);
  background: rgba(139, 92, 246, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
}
.log-direction-sent {
  color: var(--accent-teal);
  background: rgba(26, 222, 173, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
}

/* Utilities */
.text-center { text-align: center; }
.mt-4 { margin-top: 20px; }
.mb-4 { margin-bottom: 20px; }
.accent-color { color: var(--accent-teal); }
.text-secondary { color: var(--text-secondary); }

/* Button Size Variants */
.btn-sm {
  padding: 7px 14px;
  font-size: 13px;
  border-radius: 7px;
}

/* Success Button Variant */
.btn-success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--status-connected);
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.btn-success:hover {
  background: rgba(16, 185, 129, 0.25);
}

/* API Key Code Token */
code {
  font-family: 'Courier New', Courier, monospace;
  background: rgba(255, 255, 255, 0.06);
  padding: 3px 7px;
  border-radius: 5px;
  font-size: 13px;
  color: var(--accent-teal);
  word-break: break-all;
}

/* Preformatted Code Blocks */
pre {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 12.5px;
  font-family: 'Courier New', Courier, monospace;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 1.7;
}

/* API Usage Instructions Box */
.api-usage-box {
  border-top: 1px solid var(--glass-border);
  padding-top: 20px;
  margin-top: 20px;
}
.api-usage-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.api-usage-title::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 16px;
  background: var(--accent-teal);
  border-radius: 2px;
}

/* Premium Styled Upload Box */
.custom-file-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 20px;
  background: rgba(255, 255, 255, 0.01);
  border: 2px dashed rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.custom-file-upload:hover {
  border-color: var(--accent-teal);
  border-style: solid;
  background: rgba(26, 222, 173, 0.05);
  box-shadow: 0 0 20px rgba(26, 222, 173, 0.12);
}
.custom-file-upload input[type="file"] {
  display: none !important;
}
.upload-icon {
  width: 42px;
  height: 42px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  transition: var(--transition-smooth);
}
.custom-file-upload:hover .upload-icon {
  color: var(--accent-teal);
  transform: scale(1.1) translateY(-2px);
  filter: drop-shadow(0 0 6px rgba(26, 222, 173, 0.4));
}
.custom-file-upload span {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
  transition: var(--transition-smooth);
}
.custom-file-upload:hover span {
  color: var(--text-primary);
}
