/* ─── neu-* aliases ────────────────────────────────────────────────────────
   Older views, Stimulus controllers and specs still use these class names.
   They render with the Liquid Floppy tokens so nothing looks out of place;
   prefer the new components (.btn, .input, .panel, .status…) in new markup.
──────────────────────────────────────────────────────────────────────────── */

/* Components layer: Tailwind utilities (utilities layer) can still override these. */
@layer components {


.neu-flat, .neu-offset {
  position: relative; box-sizing: border-box; border-radius: 32px;
  background: var(--glass); backdrop-filter: blur(18px); border: 1px solid var(--line);
}
.neu-offset { transition: transform .5s var(--spring), box-shadow .3s ease; }
.neu-offset:hover { transform: translateY(-3px); box-shadow: 0 16px 32px var(--shadow); }

.neu-btn {
  --fill: var(--line);
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; box-sizing: border-box;
  border-radius: 999px; border: none; cursor: pointer; white-space: nowrap;
  background: var(--chip); color: var(--ink); font-weight: 800; font-size: 14px; text-decoration: none;
  transition: transform .45s var(--spring), opacity .2s ease;
}
.neu-btn::before {
  content: ""; position: absolute; left: 50%; top: 140%; width: 170%; aspect-ratio: 1; margin-left: -85%;
  border-radius: 40%; background: var(--fill); z-index: -1;
  transition: top .8s var(--ease-out); animation: spin 6s linear infinite; animation-play-state: paused;
}
.neu-btn:hover::before { top: -40%; animation-play-state: running; }
.neu-btn:hover { transform: scale(1.04); }
.neu-btn:active { transform: scale(.95); }
.neu-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.neu-btn-neutral { color: var(--ink); }
.neu-btn-success { background: #1E9E63; color: #fff; --fill: rgba(0, 0, 0, .18); }
.neu-btn-danger { background: transparent; border: 1.5px solid color-mix(in srgb, var(--danger) 45%, transparent); color: var(--danger); --fill: color-mix(in srgb, var(--danger) 12%, transparent); }
.neu-btn-processing { color: var(--warn); cursor: progress; min-width: 64px; }
.neu-btn-processing::after { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; animation: spin .8s linear infinite; }

.neu-input {
  width: 100%; min-height: 50px; box-sizing: border-box; padding: 0 20px;
  border-radius: 999px; background: var(--chip); border: none; color: var(--ink);
  font-size: 15px; font-weight: 600; outline: none; appearance: none;
  transition: box-shadow .25s ease;
}
textarea.neu-input { border-radius: 20px; padding: 12px 18px; }
.neu-input:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }
select.neu-input {
  cursor: pointer; padding-right: 48px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23625F7A' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 20px center;
}
.neu-label { display: block; margin: 0 0 8px 10px; font-size: 14px; font-weight: 800; color: var(--ink); }
.neu-error { display: block; margin: 6px 0 0 10px; font-size: 13px; font-weight: 700; color: var(--danger); }

.neu-dot-online, .neu-dot-offline, .neu-dot-busy, .neu-dot-unknown { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.neu-dot-online { background: var(--ok-dot); animation: ping 1.8s ease-out infinite; }
.neu-dot-offline { background: #9A96B0; }
.neu-dot-busy { background: var(--warn-dot); animation: ping-warn 1.8s ease-out infinite; }
.neu-dot-unknown { background: #9A96B0; }
.neu-status-online, .neu-status-offline, .neu-status-busy, .neu-status-unknown { font-weight: 800; }
.neu-status-online { color: var(--ok); }
.floppy .neu-status-online { color: #136B45; }
.neu-status-offline, .neu-status-unknown { color: var(--muted); }
.floppy .neu-status-offline, .floppy .neu-status-unknown { color: var(--paper-muted); }
.neu-status-busy { color: var(--warn); }
.floppy .neu-status-busy { color: #8A5A00; }

.neu-transitioning { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--warn); }
.neu-transitioning::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--warn-dot); animation: ping-warn 1.8s ease-out infinite; }

.neu-toggle { position: relative; display: inline-block; width: 48px; height: 28px; border-radius: 999px; background: var(--chip); cursor: pointer; }
.neu-toggle::after { content: ""; position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--tile); box-shadow: 0 2px 6px var(--shadow); transition: transform .45s var(--spring), background .2s ease; }
input[type="checkbox"]:checked + .neu-toggle { background: var(--accent); }
input[type="checkbox"]:checked + .neu-toggle::after { transform: translateX(20px); }

.neu-list-item { display: flex; align-items: center; border-radius: 16px; cursor: pointer; transition: background .2s ease; }
.neu-list-item:hover { background: var(--chip); }
.neu-list-item--selected { background: var(--tile); box-shadow: 0 8px 18px var(--shadow); }

.neu-tooltip { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; background: var(--chip); color: var(--muted); font-size: 10px; font-weight: 800; cursor: help; flex-shrink: 0; }
.neu-tooltip::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: 10px;
  white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .15s ease; z-index: 10;
}
.neu-tooltip:hover::after { opacity: 1; }

.neu-flash {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px 14px 22px; border-radius: 24px; font-weight: 700; font-size: 15px;
  background: var(--glass-strong); border: 1px solid var(--line); box-shadow: 0 12px 24px var(--shadow);
  animation: pop .45s var(--spring);
}
.neu-flash-notice { border-left: 6px solid var(--ok-dot); }
.neu-flash-alert { border-left: 6px solid var(--danger); color: var(--danger); }
.neu-flash a { text-decoration: underline; }
.neu-flash-dismiss { background: none; border: none; cursor: pointer; color: var(--muted); font-size: 18px; line-height: 1; padding: 4px 8px; border-radius: 999px; }
.neu-flash-dismiss:hover { background: var(--chip); color: var(--ink); }

/* Plain tables inherit the design without per-view classes */
table:not(.table) { width: 100%; border-collapse: separate; border-spacing: 0; }
table:not(.table) th { text-align: left; padding: 10px 14px; font-size: 12px; font-weight: 800; color: var(--muted); border-bottom: none !important; }
table:not(.table) td { padding: 12px 14px; border-top: 1px solid var(--line); }
table:not(.table) tbody tr:hover td { background: var(--chip); }

}
