/* ==========================================================================
   SIDEBAR & COLLAPSIBLE CONFIG STYLES (COMPACT, ELEGANT & SMOOTH)
   ========================================================================== */

#app-sidebar {
  width: 285px;
  min-width: 285px;
  background: #0b111e;
  border-right: 1px solid #1e293b;
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
  padding: 14px 12px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s ease;
  z-index: 40;
}

/* Reduced typography for compact data density */
.sb-brand div:first-child {
  font-size: 14px !important;
}

.sb-section-label {
  font-size: 10px !important;
  font-weight: 700 !important;
  color: #64748b !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  margin-bottom: 6px !important;
}

.sb-select, .sb-section .form-input {
  font-size: 11px !important;
  background: #0e1626 !important;
  border: 1px solid #1e293b !important;
  color: #f1f5f9 !important;
  border-radius: 6px !important;
  padding: 6px 8px !important;
}

.sb-info-card {
  background: #0e1626 !important;
  border: 1px solid #1e293b !important;
  border-radius: 8px !important;
  padding: 8px 10px !important;
  font-size: 11px !important;
}

.sb-info-key {
  font-size: 10px !important;
  color: #64748b !important;
}

.sb-info-val {
  font-size: 10px !important;
  color: #cbd5e1 !important;
}

.sb-info-val.mono {
  font-size: 10px !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  font-weight: 600 !important;
}

/* --- COLLAPSIBLE HARDWARE PARAMETERS ANIMATION --- */
.advanced-params-collapsible {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform-origin: top center;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, margin 0.3s ease;
  margin-bottom: 0;
}

.advanced-params-collapsible.is-expanded {
  max-height: 1000px;
  opacity: 1;
  margin-bottom: 8px;
}

.params-box {
  background: #080d16 !important;
  border: 1px solid #1e293b !important;
  border-radius: 6px !important;
}

.param-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 0;
}

.param-label-wrap {
  font-size: 10px !important;
  color: #94a3b8 !important;
}

.param-select {
  width: 130px !important;
  font-size: 10px !important;
  background: #05090f !important;
  border: 1px solid #1e293b !important;
  color: #cbd5e1 !important;
  border-radius: 4px !important;
  padding: 2px 4px !important;
}

/* --- BUTTON DYNAMIC STATES (GRAY INACTIVE -> GREEN ACTIVE) --- */
.sb-btn-apply {
  width: 100%;
  background: #2563eb;
  color: #ffffff;
  border: 1px solid #3b82f6;
  border-radius: 6px;
  padding: 7px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sb-btn-apply.is-disabled-save {
  background: #1e293b !important;
  color: #64748b !important;
  border-color: #334155 !important;
  cursor: not-allowed !important;
  opacity: 0.65 !important;
  pointer-events: none !important;
  box-shadow: none !important;
}

.sb-btn-apply.is-active-save {
  background: #10b981 !important;
  color: #ffffff !important;
  border-color: #059669 !important;
  cursor: pointer !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.45) !important;
}

.sb-btn-cancel {
  width: 100%;
  background: #1e293b !important;
  border: 1px solid #334155 !important;
  color: #94a3b8 !important;
  border-radius: 6px !important;
  padding: 6px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease !important;
}

.sb-btn-cancel:hover {
  background: #334155 !important;
  color: #f1f5f9 !important;
}

.sb-btn-stealth {
  width: 100%;
  margin-top: 6px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #f87171;
  border-radius: 6px;
  padding: 6px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.sb-btn-stealth:hover {
  background: rgba(239, 68, 68, 0.15);
}
