.references-view .planning-local {
  padding: 28px 24px 90px;
  min-height: 100%;
}
.references-view #content {
  max-width: 1420px;
}
.refs-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(310px, 1fr);
  gap: 24px;
  margin: auto;
  align-items: start;
  color: #e9edf2;
  font-size: 13px;
}
.refs-panel {
  background: #141b25;
  border: 1px solid #283242;
  border-radius: 13px;
  overflow: hidden;
}
.refs-main header {
  display: flex;
  gap: 12px;
  padding: 22px 24px 18px;
  align-items: flex-start;
}
.refs-heading-icon {
  display: grid;
  place-items: center;
  background: #1c1d3b;
  color: #818cf8;
  border: 1px solid #312e81;
  border-radius: 12px;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}
.refs-main h1 {
  font-size: 20px;
  font-weight: 650;
  margin: 0 0 4px;
}
.refs-main header p {
  font-size: 12px;
  color: #94a0b3;
  line-height: 1.5;
  margin: 3px 0 7px;
}
.refs-badges {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 5px;
  flex-shrink: 0;
}
.refs-badges b {
  background: #1c1d3b;
  color: #818cf8;
  border: 1px solid #312e81;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
}
.refs-badges span {
  border: 1px solid #283242;
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 10px;
  color: #94a0b3;
}
.refs-warning {
  border-block: 1px solid #713710;
  background: #2b1b14;
  padding: 12px 24px;
  color: #f8c734;
  font-size: 12px;
  line-height: 1.7;
}
.refs-reference {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #283242;
  border-radius: 13px;
  padding: 17px;
  margin: 16px 24px;
}
.refs-reference:first-child {
  margin-top: 24px;
}
.refs-reference:last-child {
  margin-bottom: 24px;
}
.refs-avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: #231b3e;
  color: #c084fc;
  border: 1px solid #3b2d66;
  display: grid;
  place-items: center;
  font-weight: 700;
  flex-shrink: 0;
}
.refs-reference-body {
  flex: 1;
  min-width: 0;
}
.refs-reference-body strong {
  font-weight: 600;
  font-size: 13px;
}
.refs-reference-body a {
  display: block;
  color: #94a0b3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
  margin-top: 5px;
}
.refs-reference-body small {
  display: block;
  color: #94a0b3;
  font-size: 11px;
  margin-top: 5px;
}
.refs-status {
  display: inline-block;
  border: 1px solid #283242;
  border-radius: 20px;
  padding: 2px 7px;
  font-size: 10px;
  color: #94a0b3;
  margin-left: 5px;
}
.refs-status.complete {
  color: #34d399;
}
.refs-status.running {
  color: #818cf8;
}
.refs-status.error, .refs-error {
  color: #f4aa67 !important;
}
.refs-row-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.references-view button {
  cursor: pointer;
}
.refs-layout button, .refs-footer button, #refs-dialog button {
  padding: 7px 12px;
  border: 1px solid #283242;
  border-radius: 7px;
  font-size: 12px;
  background: #18212e;
  color: #a7b4c6;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.refs-layout .refs-primary, .refs-footer .refs-primary {
  background: #4f46e5;
  border-color: #6366f1;
  color: #ffffff;
  font-weight: 600;
}
.refs-layout .refs-primary:hover, .refs-footer .refs-primary:hover {
  background: #4338ca;
  border-color: #4f46e5;
}
.refs-footer .refs-secondary-btn {
  background: #18212e;
  border: 1px solid #334155;
  color: #f1f5f9;
  font-weight: 500;
  padding: 7px 14px;
}
.refs-footer .refs-secondary-btn:hover {
  background: #243044;
  border-color: #475569;
}
.refs-layout button:disabled, .refs-footer button:disabled {
  opacity: .4;
  cursor: not-allowed;
}
.refs-aside {
  display: grid;
  gap: 16px;
}
.refs-aside .refs-panel {
  padding: 24px;
}
.refs-aside h2 {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 16px;
}
.refs-aside h2 svg {
  color: #748398;
}
.refs-aside p {
  color: #94a0b3;
  line-height: 1.6;
  font-size: 12px;
  margin: 0 0 14px;
}
.refs-layout input, .refs-layout textarea {
  width: 100%;
  background: #1c2430;
  border: 1px solid #283242;
  border-radius: 7px;
  padding: 9px 12px;
  font-size: 13px;
  color: #e5e7eb;
  margin-bottom: 10px;
  box-sizing: border-box;
}
.refs-layout input::placeholder {
  color: #6b7a90;
}
.refs-layout input:focus, .refs-layout textarea:focus {
  outline: 1px solid #6366f1;
  border-color: #6366f1;
}
.refs-layout .refs-link {
  border: 0;
  padding: 1px 0 16px;
  background: none;
  color: #818cf8;
  font-size: 12px;
}
.refs-layout .refs-link:hover {
  color: #a5b4fc;
  text-decoration: underline;
}
.refs-aside form > .refs-primary {
  width: 100%;
  padding: 10px;
}
.refs-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.refs-presets button {
  font-size: 11px;
  padding: 6px 9px;
  background: transparent;
  border-color: #283242;
}
.refs-presets .selected {
  color: #818cf8;
  border-color: #4f46e5;
  background: #1c1d3b;
}
.refs-aside small {
  display: block;
  font-size: 11px;
  color: #6e7d91;
  line-height: 1.7;
  margin-top: 14px;
}
#refs-custom {
  margin-top: 16px;
}
#refs-custom label {
  font-size: 12px;
  color: #94a0b3;
}
#refs-form-error {
  color: #f87171;
  font-size: 12px;
  margin-top: 10px;
}
.refs-empty {
  padding: 40px 24px;
  color: #c2ccda;
  text-align: center;
  line-height: 1.8;
}
.refs-empty span {
  color: #8493a8;
  font-size: 12px;
}
.refs-analysis {
  margin: 0 24px 20px;
  border-top: 1px solid #283242;
  padding-top: 15px;
}
.refs-analysis summary, #refs-removed summary, .refs-connection summary {
  cursor: pointer;
  color: #94a0b3;
  font-size: 12px;
}
.refs-analysis p {
  font-size: 12px;
  color: #8493a8;
  margin: 12px 0;
}
.refs-analysis textarea {
  min-height: 160px;
  margin-top: 12px;
}
.refs-analysis:not([open]) {
  margin-top: 0;
}
#refs-removed {
  margin: 0 24px;
}
.refs-connection h2 {
  margin-bottom: 12px;
}
.refs-connection code {
  font-size: 11px;
  overflow-wrap: anywhere;
  color: #a6b5c9;
}
.refs-connection details {
  margin-top: 15px;
}
.refs-connection details p {
  margin: 12px 0;
}
#refs-led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d89946;
}
#refs-led.connected {
  background: #10b981;
}
.refs-footer {
  position: fixed;
  bottom: 0;
  left: 256px;
  right: 0;
  background: #141b25;
  border-top: 1px solid #283242;
  padding: 12px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 5;
  font-size: 12px;
  color: #94a0b3;
}
.refs-reference progress {
  width: 100%;
  height: 5px;
  accent-color: #6366f1;
  display: block;
  margin-top: 10px;
}
#refs-dialog {
  width: min(900px, 90vw);
  max-height: 85vh;
  background: #141b25;
  color: #e9edf2;
  border: 1px solid #344357;
  border-radius: 12px;
  padding: 25px;
  overflow: auto;
}
#refs-dialog::backdrop {
  background: #000a;
}
#refs-dialog h2 {
  font-size: 20px;
}
#refs-dialog article {
  border-top: 1px solid #344357;
  padding: 18px 0;
}
#refs-dialog article h3 {
  font-size: 15px;
}
#refs-dialog article p {
  font-size: 12px;
  color: #a7b4c6;
  margin: 10px 0;
}
#refs-dialog pre {
  white-space: pre-wrap;
  font-size: 12px;
  line-height: 1.7;
  background: #0d1016;
  padding: 12px;
}
#refs-dialog summary {
  cursor: pointer;
  margin: 8px 0;
}
.refs-frames {
  display: flex;
  gap: 8px;
}
.refs-frames img {
  width: 31%;
  object-fit: contain;
}
#refs-close-detail {
  position: sticky;
  bottom: 0;
}
.references-view .refs-main details summary {
  list-style: revert;
}
.references-view .refs-main details summary::marker {
  color: #8493a8;
}

@media(max-width: 1300px) {
  .refs-main header { flex-wrap: wrap; }
  .refs-badges { margin-left: 54px; flex-direction: row; }
  .refs-reference { flex-wrap: wrap; }
  .refs-row-actions { margin-left: 47px; }
  .refs-layout { grid-template-columns: minmax(0, 1.7fr) minmax(290px, 1fr); }
}
@media(min-width: 1750px) {
  .references-view .planning-local { padding-top: 32px; }
  .refs-main header { flex-wrap: nowrap; }
  .refs-row-actions { margin-left: 0; }
}
@media(max-width: 1000px) {
  .refs-layout { grid-template-columns: 1fr; }
  .refs-aside { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .refs-footer { left: 0; }
}
@media(max-width: 650px) {
  .refs-aside { grid-template-columns: 1fr; }
  .refs-main header { padding: 18px; }
  .refs-reference { margin: 14px; padding: 12px; }
  .refs-reference-body { min-width: 140px; }
  .refs-badges { margin: 0; flex-wrap: wrap; }
  .refs-footer { padding: 10px 12px; }
  .refs-layout { font-size: 12px; }
}
