/* Root CSS Custom Variables */
:root {
  --bg-primary: #000000;
  --bg-secondary: #08080a;
  --bg-panel: rgba(18, 18, 22, 0.75);
  --border-color: rgba(255, 255, 255, 0.06);
  --text-primary: #f5f6fa;
  --text-secondary: #8e94b2;
  
  --color-primary: #e1e1e6;
  --color-primary-glow: rgba(225, 225, 230, 0.15);
  --color-accent: #6c5ce7;
  --color-accent-glow: rgba(108, 92, 231, 0.25);
  
  --color-success: #2ecc71;
  --color-warning: #f1c40f;
  --color-danger: #e74c3c;
  
  --sidebar-width: 260px;
  --font-main: 'Plus Jakarta Sans', sans-serif;
  --font-logo: 'Outfit', sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --blur-amount: 20px;
}

/* Reset and Globals */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

/* Scrollbar customization */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

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

/* Sidebar Styling */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 24px;
  flex-shrink: 0;
  z-index: 10;
}

.logo-area {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
  cursor: pointer;
  user-select: none;
}

.logo-glow {
  position: absolute;
  top: -10px;
  left: -10px;
  width: 50px;
  height: 50px;
  background: var(--color-primary);
  filter: blur(25px);
  opacity: 0.4;
  z-index: -1;
}

.logo-icon {
  font-size: 24px;
  color: var(--color-primary);
  filter: drop-shadow(0 0 8px var(--color-primary-glow));
}

.logo-text {
  font-family: var(--font-logo);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.5px;
}

.logo-text span {
  color: var(--color-primary);
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.nav-item {
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 14px 16px;
  border-radius: 12px;
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition-smooth);
}

.nav-item i {
  font-size: 16px;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 4px 20px var(--color-primary-glow);
}

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

/* Tooltip wrapper */
.tooltip-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
}

/* Tooltip text */
.tooltip-wrapper .tooltip-text {
  visibility: hidden;
  width: 220px;
  background-color: #12121c;
  color: #fff;
  text-align: center;
  border-radius: 8px;
  padding: 8px 12px;
  position: absolute;
  z-index: 100;
  left: 105%; /* Position to the right of the sidebar item */
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  font-size: 12px;
  line-height: 1.4;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

/* Tooltip arrow pointing left */
.tooltip-wrapper .tooltip-text::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 100%;
  margin-top: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: transparent #12121c transparent transparent;
}

/* Show tooltip only when button inside is disabled */
.tooltip-wrapper:hover button:disabled ~ .tooltip-text,
.tooltip-wrapper:hover button[disabled] ~ .tooltip-text {
  visibility: visible;
  opacity: 1;
  transform: translateY(-50%) translateX(5px);
}

.sidebar-footer {
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.server-status {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  position: relative;
}

.status-online {
  background-color: var(--color-success);
  box-shadow: 0 0 10px var(--color-success);
}

.status-online::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  border-radius: 50%;
  background-color: var(--color-success);
  animation: pulse 1.8s infinite ease-in-out;
}

.status-pingable {
  background-color: var(--color-warning);
  box-shadow: 0 0 10px var(--color-warning);
}

.status-pingable::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  border-radius: 50%;
  background-color: var(--color-warning);
  animation: pulse-yellow 1.8s infinite ease-in-out;
}

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

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(2.5); opacity: 0; }
}

@keyframes pulse-yellow {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(2.5); opacity: 0; }
}

.status-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Main Content Area */
.main-content {
  flex-grow: 1;
  padding: 40px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 30px;
  background-image: radial-gradient(circle at 80% 20%, rgba(108, 92, 231, 0.05), transparent 50%);
}

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

.header-title h1 {
  font-family: var(--font-logo);
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 4px;
}

.header-subtitle {
  color: var(--text-secondary);
  font-size: 15px;
}

/* General Panels and Elements */
.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  backdrop-filter: blur(var(--blur-amount));
  -webkit-backdrop-filter: blur(var(--blur-amount));
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  overflow: hidden;
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: transform;
}

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

.panel-title {
  font-size: 18px;
  font-weight: 600;
}

.badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.badge-pulse {
  background-color: rgba(231, 76, 60, 0.15);
  color: var(--color-danger);
  border: 1px solid rgba(231, 76, 60, 0.3);
  position: relative;
  overflow: hidden;
}

.badge-pulse::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-danger);
  margin-left: 6px;
  vertical-align: middle;
  box-shadow: 0 0 6px var(--color-danger);
}

/* Dashboard Grid/Rows */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.stat-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px;
  backdrop-filter: blur(var(--blur-amount));
  -webkit-backdrop-filter: blur(var(--blur-amount));
  display: flex;
  align-items: center;
  gap: 20px;
  transition: var(--transition-smooth);
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.12);
}

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

.icon-blue { background: rgba(52, 152, 219, 0.15); color: #3498db; }
.icon-purple { background: rgba(108, 92, 231, 0.15); color: var(--color-primary); }
.icon-green { background: rgba(46, 204, 113, 0.15); color: var(--color-success); }
.icon-orange { background: rgba(230, 126, 34, 0.15); color: #e67e22; }

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

.stat-label {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
}

.stat-value {
  font-size: 20px;
  font-weight: 700;
  font-family: var(--font-logo);
}

.dashboard-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.flex-1 { flex: 1; min-width: 300px; }
.flex-2 { flex: 2; min-width: 400px; }

/* Buttons */
.btn {
  font-family: var(--font-main);
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-smooth);
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 4px 15px var(--color-accent-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(108, 92, 231, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
}

.btn-full {
  width: 100%;
  padding: 14px;
}

.btn:disabled,
.btn-primary:disabled,
.btn-secondary:disabled {
  background: rgba(255, 255, 255, 0.04) !important;
  color: rgba(255, 255, 255, 0.25) !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
  transform: none !important;
  pointer-events: none;
}

/* Tabs Toggle */
.tab-content {
  display: none;
  flex-direction: column;
  gap: 24px;
}

.tab-content.active {
  display: flex;
}

.dcp-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-right: 6px;
}

.dcp-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px 24px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  transition: var(--transition-smooth);
}

.dcp-card:hover {
  transform: translateY(-1px);
  border-color: rgba(108, 92, 231, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dcp-info-main {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

@media (max-width: 768px) {
  .dcp-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
  }
  .dcp-card-actions {
    width: 100%;
    justify-content: space-between;
  }
}

.dcp-tag {
  background: rgba(108, 92, 231, 0.1);
  color: #a29bfe;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 12px;
}

.dcp-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 6px;
}

.dcp-meta-bytes {
  font-size: 13px;
  color: var(--text-secondary);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 8px;
}

.dcp-card-actions {
  display: flex;
  gap: 10px;
}

.dcp-card-actions button {
  flex: 1;
}

/* Data Tables */
.nodes-table-container, .transfers-table-container {
  overflow-x: auto;
  padding-right: 6px;
}

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

.data-table th {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
}

.data-table td {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
}

.data-table tbody tr {
  transition: var(--transition-smooth);
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.015);
}

.table-empty {
  text-align: center;
  color: var(--text-secondary);
  padding: 40px !important;
}

/* Progress and Status indicators in Tables/Lists */
.progress-container {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 140px;
}

.progress-track {
  flex-grow: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--color-accent);
  box-shadow: 0 0 8px var(--color-accent-glow);
  width: 0%;
  transition: width 0.4s ease;
}

.progress-text {
  font-size: 12px;
  font-weight: 700;
  width: 35px;
  text-align: right;
}

/* Badges for status */
.badge-status {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.badge-status.status-completed { background: rgba(46, 204, 113, 0.1); color: var(--color-success); }
.badge-status.status-downloading { background: rgba(52, 152, 219, 0.1); color: #3498db; }
.badge-status.status-verifying { background: rgba(241, 196, 15, 0.1); color: var(--color-warning); }
.badge-status.status-failed { background: rgba(231, 76, 60, 0.1); color: var(--color-danger); }
.badge-status.status-pending { background: rgba(255, 255, 255, 0.05); color: var(--text-secondary); }
.badge-status.status-queued { background: rgba(155, 89, 182, 0.1); color: var(--color-primary); }
.badge-status.status-paused { background: rgba(230, 126, 34, 0.1); color: #e67e22; }

/* Dialog Modal styling */
.sleek-dialog {
  margin: auto;
  border: 1px solid var(--border-color);
  background: #0f0f18;
  color: var(--text-primary);
  border-radius: 18px;
  padding: 24px;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(15px);
  z-index: 100;
}

#dcp-details-dialog {
  max-width: 780px;
}

.sleek-dialog::backdrop {
  background: rgba(5, 5, 10, 0.85);
  backdrop-filter: blur(6px);
}

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

.dialog-header h3 {
  font-family: var(--font-logo);
  font-size: 20px;
  font-weight: 600;
}

.dialog-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.dialog-close:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--color-primary);
  transform: scale(1.05);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 8px;
}

.form-group select,
.premium-select {
  width: 100%;
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 14px;
  line-height: 1.5;
  height: 44px;
  outline: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  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='rgba(255,255,255,0.6)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 40px;
}

.form-group select option {
  background-color: #0f0f18;
  color: var(--text-primary);
}

.form-group select:hover,
.premium-select:hover {
  border-color: rgba(108, 92, 231, 0.4);
  background: rgba(255, 255, 255, 0.05);
}

.form-group select:focus,
.premium-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 12px rgba(108, 92, 231, 0.3);
  background: rgba(255, 255, 255, 0.05);
}

.premium-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 14px;
  outline: none;
  transition: var(--transition-smooth);
}

.premium-input:hover {
  border-color: rgba(108, 92, 231, 0.4);
  background: rgba(255, 255, 255, 0.05);
}

.premium-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 12px rgba(108, 92, 231, 0.3);
  background: rgba(255, 255, 255, 0.05);
}

.node-checkbox-list {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px;
  max-height: 180px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.checkbox-placeholder {
  color: var(--text-secondary);
  font-size: 13px;
  text-align: center;
  padding: 20px 0;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: var(--transition-smooth);
}

.checkbox-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.checkbox-item input {
  width: 16px;
  height: 16px;
  accent-color: var(--color-primary);
}

.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 30px;
}

/* Details list inside modal */
.dcp-details-meta {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 20px;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dcp-files-list-container {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  max-height: 200px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.2);
}

.dcp-files-list {
  list-style: none;
}

.dcp-files-list li {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
}

.dcp-files-list li:last-child {
  border-bottom: none;
}

.file-name {
  word-break: break-all;
  margin-right: 15px;
}

.file-size {
  color: var(--text-secondary);
  flex-shrink: 0;
}

/* Empty states */
.empty-state {
  text-align: center;
  padding: 40px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.empty-state i {
  font-size: 32px;
  opacity: 0.3;
}

/* Active transfer progress blocks on dashboard */
.active-transfers-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.active-transfer-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
}

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

.transfer-title-group h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
}

.transfer-node-sub {
  font-size: 12px;
  color: var(--text-secondary);
}

.transfer-speed-badge {
  background: rgba(0, 206, 201, 0.1);
  color: var(--color-accent);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}

.transfer-card-metrics {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 10px;
}

/* Quick instructions box */
.quick-info-box {
  background: rgba(108, 92, 231, 0.05);
  border: 1px dashed rgba(108, 92, 231, 0.2);
  border-radius: 10px;
  padding: 16px;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quick-info-box h4 {
  font-weight: 600;
  color: #a29bfe;
}

.quick-info-box p {
  color: var(--text-secondary);
  line-height: 1.4;
}

.quick-info-box code {
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 4px;
  border-radius: 4px;
  color: var(--color-accent);
  font-family: monospace;
}

.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Upload Dropzone styling */
.upload-dropzone {
  border: 2px dashed rgba(108, 92, 231, 0.4);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.01);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: var(--transition-smooth);
  margin-top: 10px;
}

.upload-dropzone:hover {
  background: rgba(108, 92, 231, 0.04);
  border-color: var(--color-primary);
  box-shadow: 0 0 15px rgba(108, 92, 231, 0.15);
}

.dropzone-icon {
  font-size: 40px;
  color: var(--color-primary);
  filter: drop-shadow(0 0 8px var(--color-primary-glow));
}

.dropzone-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.dropzone-sub {
  font-size: 12px;
  color: var(--text-secondary);
}

.selected-files-summary {
  background: rgba(0, 206, 201, 0.08);
  border: 1px solid rgba(0, 206, 201, 0.2);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-progress-container {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
}

.btn-danger-text:hover {
  background: rgba(231, 76, 60, 0.15) !important;
  border-color: var(--color-danger) !important;
  box-shadow: 0 0 10px rgba(231, 76, 60, 0.2);
}

/* Toast Notifications Styling */
.toast-notification {
  pointer-events: auto;
  background: rgba(15, 15, 24, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transform: translateX(120%);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
}

.toast-notification.show {
  transform: translateX(0);
  opacity: 1;
}

.toast-notification.hide {
  transform: translateX(50px) scale(0.9);
  opacity: 0;
  margin-top: -60px; /* pull sibling toasts up */
  pointer-events: none;
}

.toast-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.toast-success {
  border-left: 4px solid var(--color-success);
  box-shadow: 0 10px 30px rgba(46, 204, 113, 0.15);
}
.toast-success .toast-icon {
  color: var(--color-success);
}

.toast-error {
  border-left: 4px solid var(--color-danger);
  box-shadow: 0 10px 30px rgba(231, 76, 60, 0.15);
}
.toast-error .toast-icon {
  color: var(--color-danger);
}

.toast-info {
  border-left: 4px solid var(--color-primary);
  box-shadow: 0 10px 30px rgba(108, 92, 231, 0.15);
}
.toast-info .toast-icon {
  color: var(--color-primary);
}

.toast-message {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

#system-console-content,
#rsync-console-content {
  font-weight: bold;
}

/* Network selection buttons styling */
.network-btn:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: var(--color-text) !important;
}

.network-btn.active {
  background: var(--color-primary-light) !important;
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 12px rgba(108, 92, 231, 0.25);
  color: var(--color-text) !important;
}

/* Custom Scrollbar for Send DCP target grids */
#send-dcp-cinemas-list::-webkit-scrollbar,
#add-cinema-servers-container::-webkit-scrollbar {
  width: 6px;
}

#send-dcp-cinemas-list::-webkit-scrollbar-track,
#add-cinema-servers-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.01);
  border-radius: 4px;
}

#send-dcp-cinemas-list::-webkit-scrollbar-thumb,
#add-cinema-servers-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

#send-dcp-cinemas-list::-webkit-scrollbar-thumb:hover,
#add-cinema-servers-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Premium Combobox Dropdown Custom Styling */
.combobox-item {
  color: var(--text-primary);
}
.combobox-item:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff;
}
.premium-dropdown-list::-webkit-scrollbar {
  width: 6px;
}
.premium-dropdown-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.01);
}
.premium-dropdown-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
.premium-dropdown-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Transfers Table Layout Fixes */
#transfers-table td {
  padding: 16px;
  height: 72px; /* Enforce premium height to prevent jumping */
  white-space: nowrap; /* Prevent wrapping which triggers height resizing */
  vertical-align: middle;
}
#transfers-table th {
  white-space: nowrap;
}
/* Reserve fixed widths for columns prone to shifting */
#transfers-table th:nth-child(1), #transfers-table td:nth-child(1) { width: 100px; min-width: 100px; } /* ID */
#transfers-table th:nth-child(2), #transfers-table td:nth-child(2) { min-width: 250px; } /* DCP Name */
#transfers-table th:nth-child(3), #transfers-table td:nth-child(3) { min-width: 180px; } /* Target Node */
#transfers-table th:nth-child(4), #transfers-table td:nth-child(4) { width: 90px; min-width: 90px; } /* Size */
#transfers-table th:nth-child(5), #transfers-table td:nth-child(5) { min-width: 160px; } /* Progress */
#transfers-table th:nth-child(6), #transfers-table td:nth-child(6) { width: 110px; min-width: 110px; } /* Speed */
#transfers-table th:nth-child(7), #transfers-table td:nth-child(7) { width: 110px; min-width: 110px; } /* Avg Speed */
#transfers-table th:nth-child(8), #transfers-table td:nth-child(8) { width: 140px; min-width: 140px; } /* Start Time */
#transfers-table th:nth-child(9), #transfers-table td:nth-child(9) { width: 140px; min-width: 140px; } /* End Time */
#transfers-table th:nth-child(10), #transfers-table td:nth-child(10) { width: 150px; min-width: 150px; } /* Status */
#transfers-table th:nth-child(11), #transfers-table td:nth-child(11) { width: 120px; min-width: 120px; text-align: center; } /* Actions */

/* Flashing animation for new packages row */
@keyframes flash-orange {
  0%, 100% { background-color: transparent; }
  50% { background-color: rgba(230, 126, 34, 0.15); box-shadow: inset 0 0 8px rgba(230, 126, 34, 0.2); }
}
.flashing-stat-row {
  animation: flash-orange 2s infinite ease-in-out;
}

/* ==========================================
   Light Theme Config & Overrides
   ========================================== */
body.light-theme {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-panel: rgba(255, 255, 255, 0.85);
  --border-color: rgba(0, 0, 0, 0.08);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  
  --color-primary: #0f172a;
  --color-primary-glow: rgba(15, 23, 42, 0.08);
  --color-accent: #6c5ce7;
  --color-accent-glow: rgba(108, 92, 231, 0.15);

  --color-text: #0f172a;
  --color-text-primary: #0f172a;
  --color-text-secondary: #475569;
}

body.light-theme {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

body.light-theme .main-content {
  background-image: radial-gradient(circle at 80% 20%, rgba(108, 92, 231, 0.03), transparent 50%);
}

body.light-theme .dcp-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.07);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

body.light-theme .dcp-card:hover {
  border-color: rgba(108, 92, 231, 0.3);
  box-shadow: 0 6px 16px rgba(108, 92, 231, 0.08);
}

body.light-theme .stat-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.07);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

body.light-theme .stat-card:hover {
  border-color: rgba(108, 92, 231, 0.3);
}

body.light-theme .nav-item {
  color: #475569;
}

body.light-theme .nav-item:hover {
  background: rgba(0, 0, 0, 0.03);
  color: #0f172a;
}

body.light-theme .nav-item.active {
  background: var(--color-accent);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(108, 92, 231, 0.3);
}

body.light-theme .btn-secondary {
  background: #f1f5f9;
  color: #0f172a;
  border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .btn-secondary:hover {
  background: #e2e8f0;
}

body.light-theme .btn:disabled,
body.light-theme .btn-primary:disabled,
body.light-theme .btn-secondary:disabled {
  background: #e2e8f0 !important;
  color: #94a3b8 !important;
  border-color: #cbd5e1 !important;
}

body.light-theme .premium-input,
body.light-theme .premium-select,
body.light-theme select,
body.light-theme input {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.15) !important;
  color: #0f172a !important;
}

body.light-theme input::placeholder {
  color: #94a3b8 !important;
}

body.light-theme .premium-input:hover,
body.light-theme .premium-select:hover,
body.light-theme select:hover,
body.light-theme input:hover {
  border-color: rgba(108, 92, 231, 0.5) !important;
}

body.light-theme .premium-input:focus,
body.light-theme .premium-select:focus,
body.light-theme select:focus,
body.light-theme input:focus {
  border-color: var(--color-accent) !important;
  box-shadow: 0 0 12px rgba(108, 92, 231, 0.2) !important;
}

body.light-theme .node-checkbox-list {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme ::-webkit-scrollbar-track {
  background: #f1f5f9;
}

body.light-theme ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
}

body.light-theme ::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.18);
}

body.light-theme dialog,
body.light-theme .sleek-dialog {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1) !important;
}

body.light-theme .sleek-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45) !important;
  backdrop-filter: blur(6px) !important;
}

body.light-theme dialog h3,
body.light-theme dialog h2,
body.light-theme dialog label,
body.light-theme dialog p,
body.light-theme dialog span:not(.flag-icon):not(#rsync-console-content *),
body.light-theme dialog div:not(.lang-selector-login):not(.theme-toggle-btn):not(#rsync-console-content):not(#rsync-console-content *) {
  color: #0f172a !important;
}

body.light-theme .dialog-close {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
  color: #64748b !important;
}

body.light-theme .dialog-close:hover {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.15);
  color: var(--color-primary) !important;
}

body.light-theme .tab-pane {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.06);
}

body.light-theme .dcp-files-list-container {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .dcp-files-list li {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

body.light-theme .dcp-list-header {
  background: #f1f5f9;
  border-color: rgba(0, 0, 0, 0.07);
}

body.light-theme .dcp-list-header span {
  color: #475569;
}

body.light-theme code {
  background: rgba(0, 0, 0, 0.05) !important;
  color: #0f172a !important;
}

body.light-theme .system-logs-container {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.07) !important;
}

body.light-theme .log-row {
  border-bottom: 1px solid rgba(0, 0, 0, 0.04) !important;
}

body.light-theme .log-row:hover {
  background: #f8fafc !important;
}

body.light-theme .logs-table th {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
}

body.light-theme .logs-table td {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
  color: #0f172a !important;
}

body.light-theme #system-console-content,
body.light-theme #rsync-console-content {
  background: #f8fafc !important; /* Soft Slate 50 */
  color: #15803d !important; /* Green 700 */
  border-color: rgba(0, 0, 0, 0.08) !important;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06) !important;
}

body.light-theme #system-console-content div,
body.light-theme #system-console-content span,
body.light-theme #rsync-console-content div,
body.light-theme #rsync-console-content span {
  color: inherit !important;
}

body.light-theme #system-console-content div[style*="color: #ff4444"],
body.light-theme #system-console-content div[style*="color: rgb(255, 68, 68)"],
body.light-theme #rsync-console-content div[style*="color: #ff4444"],
body.light-theme #rsync-console-content div[style*="color: rgb(255, 68, 68)"] {
  color: #b91c1c !important; /* Dark Red for Errors in Light Theme */
  font-weight: 600 !important;
}

body.light-theme #system-console-content div[style*="color: #33ccff"],
body.light-theme #system-console-content div[style*="color: rgb(51, 204, 255)"] {
  color: #1d4ed8 !important; /* Dark Blue for Rsync Push in System Console */
}

body.light-theme .empty-state {
  color: #64748b !important;
}

body.light-theme .empty-state i {
  color: #94a3b8 !important;
}

body.light-theme .mapping-row {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.07) !important;
}

body.light-theme .mapping-row:hover {
  border-color: rgba(108, 92, 231, 0.3) !important;
}

body.light-theme .user-profile-container > div,
body.light-theme #clock-display,
body.light-theme .lang-selector,
body.light-theme .lang-selector-login,
body.light-theme .theme-toggle-btn {
  background: #f1f5f9 !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
  color: #475569 !important;
}

body.light-theme .lang-selector span.flag-icon,
body.light-theme .lang-selector-login span.flag-icon {
  background: transparent !important;
}

body.light-theme #clock-display span,
body.light-theme #logged-user-display {
  color: #0f172a !important;
}

body.light-theme select option {
  background: #ffffff !important;
  color: #0f172a !important;
}

body.light-theme .autocomplete-results {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06) !important;
}

body.light-theme .autocomplete-item {
  background: #ffffff !important;
  color: #0f172a !important;
}

body.light-theme .autocomplete-item:hover {
  background: rgba(108, 92, 231, 0.1) !important;
}

body.light-theme .logo-glow {
  background: var(--color-accent);
  opacity: 0.12;
}

body.light-theme #login-container {
  background: #f8fafc !important;
}

body.light-theme #login-container > div {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 20px 50px rgba(0,0,0,0.06) !important;
}

body.light-theme #login-container h2 {
  color: #0f172a !important;
}

body.light-theme .toast-notification {
  background: rgba(255, 255, 255, 0.95) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  color: #0f172a !important;
}

body.light-theme .toast-message {
  color: #0f172a !important;
}

body.light-theme .toast-success {
  box-shadow: 0 10px 30px rgba(46, 204, 113, 0.08) !important;
}

body.light-theme .toast-error {
  box-shadow: 0 10px 30px rgba(231, 76, 60, 0.08) !important;
}

body.light-theme .toast-info {
  box-shadow: 0 10px 30px rgba(108, 92, 231, 0.08) !important;
}

/* Ensure login inputs and container font styling matches KDM system exactly */
#login-container input {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-size: 14px !important;
}
#login-container button,
#login-container label,
#login-container p,
#login-container h2 {
  font-family: 'Outfit', sans-serif !important;
}


