/* ==========================================================================
   RoOne — Components
   ========================================================================== */

/* ---------- Buttons ---------- */
.ro-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--ro-border);
  background: var(--ro-panel-raised);
  color: var(--ro-text);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: var(--ro-radius-sm);
  cursor: pointer;
  transition: transform var(--ro-fast) var(--ro-ease), border-color var(--ro-fast) var(--ro-ease), background var(--ro-fast) var(--ro-ease);
  white-space: nowrap;
}
.ro-btn:hover { border-color: var(--ro-text-faint); }
.ro-btn:active { transform: scale(0.97); }
.ro-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.ro-btn--ghost { background: transparent; border-color: transparent; color: var(--ro-text-dim); }
.ro-btn--ghost:hover { color: var(--ro-text); background: var(--ro-panel-raised); }

.ro-btn--icon { padding: 8px; border-radius: var(--ro-radius-sm); }
.ro-btn--icon svg { width: 16px; height: 16px; }

.ro-btn--sm { padding: 6px 10px; font-size: 12px; }

.ro-btn--primary {
  background: var(--ro-gradient-brand);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--ro-shadow-sm);
}
.ro-btn--primary:hover { box-shadow: var(--ro-glow-orange); }

.ro-btn--generate {
  width: 100%;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-radius: var(--ro-radius-md);
}

.ro-btn--danger-outline { color: var(--ro-danger); border-color: rgba(255,92,92,0.35); background: transparent; }
.ro-btn--danger-outline:hover { background: rgba(255,92,92,0.1); }

/* ---------- Panels / Cards ---------- */
.ro-panel {
  background: var(--ro-panel);
  border: 1px solid var(--ro-border-soft);
  border-radius: var(--ro-radius-lg);
}

.ro-card {
  background: var(--ro-panel-raised);
  border: 1px solid var(--ro-border-soft);
  border-radius: var(--ro-radius-md);
  padding: 16px;
  transition: border-color var(--ro-fast) var(--ro-ease), transform var(--ro-fast) var(--ro-ease);
}

.ro-card--clickable { cursor: pointer; }
.ro-card--clickable:hover { border-color: var(--ro-orange); }

.ro-project-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 148px;
}

.ro-project-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }

.ro-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--ro-radius-pill);
  background: var(--ro-panel-sunken);
  color: var(--ro-text-dim);
  border: 1px solid var(--ro-border-soft);
  white-space: nowrap;
}
.ro-badge--master { color: var(--ro-cyan); border-color: rgba(0,210,255,0.3); background: var(--ro-cyan-soft); }
.ro-badge--standalone { color: var(--ro-orange); border-color: rgba(243,122,32,0.3); background: var(--ro-orange-soft); }
.ro-badge--episode { color: var(--ro-magenta); border-color: rgba(196,58,130,0.3); background: var(--ro-magenta-soft); }
.ro-badge--inherited { color: var(--ro-text-faint); }

.ro-project-card__name { font-size: 15px; font-weight: 700; }
.ro-project-card__meta { font-size: 12px; color: var(--ro-text-faint); margin-top: auto; display: flex; justify-content: space-between; }

.ro-new-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 148px;
  border: 1.5px dashed var(--ro-border);
  border-radius: var(--ro-radius-md);
  color: var(--ro-text-dim);
  cursor: pointer;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  transition: border-color var(--ro-fast) var(--ro-ease), color var(--ro-fast) var(--ro-ease);
}
.ro-new-card:hover { border-color: var(--ro-orange); color: var(--ro-orange); }
.ro-new-card svg { width: 26px; height: 26px; }

.ro-empty {
  color: var(--ro-text-faint);
  font-size: 13px;
  padding: 24px;
  text-align: center;
  border: 1px dashed var(--ro-border-soft);
  border-radius: var(--ro-radius-md);
}

/* ---------- Section heads ---------- */
.ro-section-title { font-size: 13px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ro-text-dim); }
.ro-h1 { font-size: 24px; font-weight: 800; margin: 0; }
.ro-h2 { font-size: 18px; font-weight: 800; margin: 0; }
.ro-muted { color: var(--ro-text-faint); font-size: 12.5px; }

/* ---------- Form elements ---------- */
.ro-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.ro-label { font-size: 11.5px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: var(--ro-text-dim); }

.ro-input, .ro-textarea, .ro-select {
  background: var(--ro-panel-sunken);
  border: 1px solid var(--ro-border);
  color: var(--ro-text);
  border-radius: var(--ro-radius-sm);
  padding: 10px 12px;
  font-size: 13.5px;
  font-family: inherit;
  width: 100%;
  transition: border-color var(--ro-fast) var(--ro-ease), box-shadow var(--ro-fast) var(--ro-ease);
}
.ro-input:focus, .ro-textarea:focus, .ro-select:focus {
  outline: none;
  border-color: var(--ro-orange);
  box-shadow: 0 0 0 3px var(--ro-orange-soft);
}
.ro-textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
.ro-textarea--script { font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; min-height: 320px; line-height: 1.7; }

.ro-tag-input { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; background: var(--ro-panel-sunken); border: 1px solid var(--ro-border); border-radius: var(--ro-radius-sm); }
.ro-tag-input input { flex: 1; min-width: 90px; background: transparent; border: none; color: var(--ro-text); font-size: 13px; outline: none; }
.ro-tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--ro-magenta-soft); color: #f0a6cc;
  border: 1px solid rgba(196,58,130,0.35);
  border-radius: var(--ro-radius-pill); padding: 3px 9px; font-size: 11.5px; font-weight: 600;
}
.ro-tag button { background: none; border: none; color: inherit; cursor: pointer; opacity: 0.7; font-size: 13px; line-height: 1; padding: 0; }
.ro-tag button:hover { opacity: 1; }

/* ---------- Dropzones (Director drawer asset slots) ---------- */
.ro-dropzone {
  border: 1.5px dashed var(--ro-border);
  border-radius: var(--ro-radius-md);
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  cursor: pointer;
  transition: border-color var(--ro-fast) var(--ro-ease), background var(--ro-fast) var(--ro-ease);
  background: var(--ro-panel-sunken);
}
.ro-dropzone:hover, .ro-dropzone.is-dragover { border-color: var(--ro-orange); background: var(--ro-orange-soft); }
.ro-dropzone.is-filled { border-style: solid; border-color: var(--ro-border-soft); }
.ro-dropzone__thumb {
  width: 44px; height: 44px; border-radius: var(--ro-radius-sm); flex-shrink: 0;
  background: linear-gradient(135deg, var(--ro-panel-raised), var(--ro-panel-sunken));
  display: flex; align-items: center; justify-content: center;
  color: var(--ro-text-faint); font-size: 10px; font-weight: 700; overflow: hidden;
}
.ro-dropzone__thumb img { width: 100%; height: 100%; object-fit: cover; }
.ro-dropzone__label { font-size: 12.5px; font-weight: 700; }
.ro-dropzone__sub { font-size: 11px; color: var(--ro-text-faint); }
.ro-dropzone__clear { margin-left: auto; background: none; border: none; color: var(--ro-text-faint); cursor: pointer; padding: 4px; }
.ro-dropzone__clear:hover { color: var(--ro-danger); }

/* ---------- Character / Location cards (Visuals tab) ---------- */
.ro-asset-card { display: flex; flex-direction: column; gap: 10px; }
.ro-asset-card__art {
  width: 100%; aspect-ratio: 1 / 1; border-radius: var(--ro-radius-sm);
  background: linear-gradient(135deg, var(--ro-panel-sunken), var(--ro-panel-raised));
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  color: var(--ro-text-faint); font-size: 11px; position: relative;
}
.ro-asset-card__art img { width: 100%; height: 100%; object-fit: cover; }
.ro-asset-card__name { font-weight: 700; font-size: 13.5px; }
.ro-asset-card__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ro-asset-card__actions { display: flex; gap: 6px; }
.ro-asset-card--inherited { opacity: 0.85; }

/* ---------- Placeholder generated art (mock backend) ---------- */
.ro-genart {
  background: conic-gradient(from 210deg, var(--ro-orange), var(--ro-magenta), var(--ro-cyan), var(--ro-orange));
  filter: saturate(0.85);
}

/* ---------- Spinner / progress ---------- */
.ro-spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,0.25);
  border-top-color: #fff;
  animation: ro-spin 0.7s linear infinite;
}
@keyframes ro-spin { to { transform: rotate(360deg); } }

.ro-progress {
  height: 6px; border-radius: var(--ro-radius-pill);
  background: var(--ro-panel-sunken);
  overflow: hidden;
  border: 1px solid var(--ro-border-soft);
}
.ro-progress__bar {
  height: 100%;
  background: var(--ro-gradient-brand);
  width: 0%;
  transition: width 120ms linear;
}

/* ---------- Preview pane (Director & Cut) ---------- */
.ro-preview-stage {
  flex: 1;
  min-height: 220px;
  margin: 16px 16px 0;
  border-radius: var(--ro-radius-lg);
  background: #05060a;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ro-border-soft);
}
.ro-preview-stage__label {
  position: absolute; top: 12px; left: 14px;
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ro-text-dim);
  background: rgba(0,0,0,0.4); padding: 4px 8px; border-radius: var(--ro-radius-sm);
}
.ro-preview-stage__img { width: 100%; height: 100%; object-fit: cover; }
.ro-preview-stage__status {
  position: absolute; bottom: 12px; left: 14px; right: 14px;
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--ro-text-dim);
  background: rgba(5,6,10,0.55); backdrop-filter: blur(4px);
  padding: 6px 10px; border-radius: var(--ro-radius-sm);
}

.ro-transport {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
}
.ro-transport__scrub {
  flex: 1; height: 4px; border-radius: var(--ro-radius-pill);
  background: var(--ro-panel-sunken); position: relative; cursor: pointer;
  border: 1px solid var(--ro-border-soft);
}
.ro-transport__scrub-fill { position: absolute; inset: 0; width: 32%; background: var(--ro-gradient-brand); border-radius: inherit; }
.ro-transport__time { font-size: 11.5px; color: var(--ro-text-faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ro-transport__btn { background: none; border: none; color: var(--ro-text); cursor: pointer; padding: 6px; display: flex; }
.ro-transport__btn svg { width: 18px; height: 18px; }
.ro-transport__btn--play { background: var(--ro-panel-raised); border-radius: 50%; padding: 9px; border: 1px solid var(--ro-border); }
.ro-transport__btn--play:hover { border-color: var(--ro-orange); }

/* ---------- Director drawer ---------- */
.ro-director-drawer {
  background: var(--ro-panel);
  padding: 16px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

/* ---------- Timeline ---------- */
.ro-timeline-toolbar {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--ro-border-soft);
  flex-shrink: 0;
}
.ro-timeline-toolbar__spacer { flex: 1; }

.ro-timeline-body {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow: hidden;
}

.ro-track-labels {
  width: 128px;
  flex-shrink: 0;
  border-right: 1px solid var(--ro-border-soft);
  background: var(--ro-panel);
  overflow-y: hidden;
}

.ro-track-label {
  height: 52px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ro-text-dim);
  border-bottom: 1px solid var(--ro-border-soft);
}
.ro-track-label__dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

.ro-tracks-scroll {
  flex: 1;
  overflow: auto;
  position: relative;
}

.ro-timeline-ruler {
  height: 22px;
  position: sticky;
  top: 0;
  background: var(--ro-panel);
  border-bottom: 1px solid var(--ro-border-soft);
  z-index: 2;
  display: flex;
  align-items: flex-end;
}
.ro-timeline-ruler__tick {
  position: relative;
  flex-shrink: 0;
  height: 100%;
  border-left: 1px solid var(--ro-border-soft);
  font-size: 9.5px;
  color: var(--ro-text-faint);
  padding-left: 4px;
  display: flex;
  align-items: flex-end;
  padding-bottom: 2px;
}

.ro-track-row {
  height: 52px;
  position: relative;
  border-bottom: 1px solid var(--ro-border-soft);
  background: var(--ro-panel-sunken);
}

.ro-clip {
  position: absolute;
  top: 6px;
  bottom: 6px;
  border-radius: var(--ro-radius-sm);
  padding: 5px 8px;
  font-size: 10.5px;
  font-weight: 700;
  color: #14151a;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  cursor: grab;
  border: 1px solid rgba(0,0,0,0.2);
  box-shadow: var(--ro-shadow-sm);
  user-select: none;
}
.ro-clip:active { cursor: grabbing; }
.ro-clip.is-selected { outline: 2px solid #fff; outline-offset: 1px; }
.ro-clip--script { background: var(--ro-track-script); color: var(--ro-text); }
.ro-clip--video { background: var(--ro-track-video); }
.ro-clip--vo { background: var(--ro-track-vo); }
.ro-clip--music { background: var(--ro-track-music); color: #fff; }
.ro-clip--pending { background: repeating-linear-gradient(45deg, var(--ro-panel-raised), var(--ro-panel-raised) 6px, var(--ro-panel-sunken) 6px, var(--ro-panel-sunken) 12px); color: var(--ro-text-dim); border-style: dashed; }
.ro-clip__waveform { position: absolute; inset: 0; display: flex; align-items: center; gap: 1.5px; padding: 0 6px; opacity: 0.55; pointer-events: none; }
.ro-clip__waveform span { flex: 1; background: rgba(0,0,0,0.55); border-radius: 1px; }

.ro-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--ro-cyan);
  box-shadow: 0 0 8px var(--ro-cyan);
  z-index: 3;
  pointer-events: none;
}
.ro-playhead::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px; height: 10px;
  background: var(--ro-cyan);
  clip-path: polygon(50% 100%, 0 0, 100% 0);
}

/* ---------- Mobile compact timeline preview ---------- */
.ro-mobile-shots {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  overflow-x: auto;
}
.ro-mobile-shot {
  flex-shrink: 0;
  width: 84px;
  padding: 8px;
  border-radius: var(--ro-radius-sm);
  font-size: 11px;
  font-weight: 700;
  color: #14151a;
}

/* ---------- Whiteboard (Storyboard tab) ---------- */
.ro-board {
  position: relative;
  flex: 1;
  min-height: 520px;
  background:
    radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px) 0 0 / 22px 22px,
    var(--ro-panel-sunken);
  overflow: auto;
  border-radius: var(--ro-radius-lg);
  margin: 16px;
  border: 1px solid var(--ro-border-soft);
}
.ro-board__canvas { position: relative; width: 2200px; height: 1400px; }
.ro-board-card {
  position: absolute;
  width: 190px;
  min-height: 130px;
  border-radius: var(--ro-radius-sm);
  padding: 10px;
  box-shadow: var(--ro-shadow-md);
  cursor: grab;
  font-size: 12.5px;
  color: #14151a;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ro-board-card:active { cursor: grabbing; }
.ro-board-card textarea {
  flex: 1;
  background: rgba(255,255,255,0.35);
  border: none;
  border-radius: 4px;
  padding: 6px;
  font-size: 12px;
  font-family: inherit;
  resize: none;
  color: #14151a;
}
.ro-board-card__head { display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: 10.5px; text-transform: uppercase; opacity: 0.7; }
.ro-board-card__head button { background: none; border: none; cursor: pointer; opacity: 0.6; color: #14151a; }
.ro-board-card__head button:hover { opacity: 1; }
.ro-board-toolbar { position: sticky; top: 12px; left: 12px; display: flex; gap: 8px; margin: 12px; z-index: 5; width: fit-content; }

/* ---------- Modal ---------- */
.ro-modal-backdrop {
  position: fixed; inset: 0; background: rgba(5,6,10,0.65);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 20px;
  backdrop-filter: blur(2px);
}
.ro-modal {
  background: var(--ro-panel);
  border: 1px solid var(--ro-border);
  border-radius: var(--ro-radius-lg);
  padding: 22px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--ro-shadow-lg);
}
.ro-modal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.ro-modal__foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.ro-modal__type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 4px; }
.ro-modal__type-opt {
  border: 1.5px solid var(--ro-border);
  border-radius: var(--ro-radius-md);
  padding: 12px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 700;
  text-align: left;
  background: var(--ro-panel-sunken);
  color: var(--ro-text-dim);
}
.ro-modal__type-opt.is-selected { border-color: var(--ro-orange); color: var(--ro-text); background: var(--ro-orange-soft); }
.ro-modal__type-opt small { display: block; font-weight: 500; color: var(--ro-text-faint); margin-top: 3px; text-transform: none; letter-spacing: 0; }

/* ---------- Toast ---------- */
.ro-toast-stack { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
@media (max-width: 600px) { .ro-toast-stack { left: 12px; right: 12px; bottom: calc(var(--ro-mobile-dock-h) + 12px); } }
.ro-toast {
  background: var(--ro-panel-raised);
  border: 1px solid var(--ro-border);
  border-left: 3px solid var(--ro-orange);
  padding: 10px 14px;
  border-radius: var(--ro-radius-sm);
  font-size: 12.5px;
  box-shadow: var(--ro-shadow-md);
  animation: ro-toast-in 160ms var(--ro-ease);
  max-width: 320px;
}
.ro-toast--success { border-left-color: var(--ro-success); }
.ro-toast--error { border-left-color: var(--ro-danger); }
@keyframes ro-toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Audio rows ---------- */
.ro-audio-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
}
.ro-audio-row__wave { flex: 1; display: flex; align-items: center; gap: 2px; height: 28px; }
.ro-audio-row__wave span { width: 3px; border-radius: 2px; background: var(--ro-cyan); opacity: 0.75; }
.ro-audio-row__play {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--ro-panel-sunken); border: 1px solid var(--ro-border);
  display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
}
.ro-audio-row__meta { min-width: 0; }
.ro-audio-row__name { font-size: 13px; font-weight: 700; }
.ro-audio-row__sub { font-size: 11px; color: var(--ro-text-faint); }

/* ---------- Dashboard header ---------- */
.ro-dash-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  margin-bottom: 26px; flex-wrap: wrap;
}
.ro-dash-header__title { font-size: 26px; font-weight: 800; margin: 0 0 4px; }
.ro-dash-header__sub { color: var(--ro-text-faint); font-size: 13px; margin: 0; }

/* ---------- Hero project cards ---------- */
.ro-hero-card {
  background: var(--ro-panel-raised);
  border: 1px solid var(--ro-border-soft);
  border-radius: var(--ro-radius-lg);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: border-color var(--ro-fast) var(--ro-ease), transform var(--ro-fast) var(--ro-ease);
}
.ro-hero-card:hover { border-color: var(--ro-orange); transform: translateY(-1px); }

.ro-hero-card__image {
  height: 132px;
  position: relative;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}
.ro-hero-card__image--gradient {
  background-image: conic-gradient(from 210deg,
    hsl(calc(24 + var(--h, 0)) 82% 56%),
    hsl(calc(320 + var(--h, 0)) 62% 48%),
    hsl(calc(195 + var(--h, 0)) 75% 50%),
    hsl(calc(24 + var(--h, 0)) 82% 56%));
  filter: saturate(0.8);
}
.ro-hero-card__image::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.55), transparent 55%);
}

.ro-hero-badge {
  position: absolute; top: 10px; left: 10px; z-index: 1;
  font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 3px 9px; border-radius: var(--ro-radius-pill);
  background: rgba(5,6,10,0.55); backdrop-filter: blur(3px);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--ro-text-dim);
}
.ro-hero-badge--master { color: #7fe6ff; }
.ro-hero-badge--standalone { color: #ffb877; }
.ro-hero-badge--episode { color: #ec9dc4; }

.ro-hero-card__actions {
  position: absolute; top: 8px; right: 8px; z-index: 1;
  display: flex; gap: 4px;
  opacity: 0; transition: opacity var(--ro-fast) var(--ro-ease);
}
.ro-hero-card:hover .ro-hero-card__actions,
.ro-hero-card:focus-within .ro-hero-card__actions { opacity: 1; }
.ro-hero-card__actions .ro-btn {
  background: rgba(5,6,10,0.6); backdrop-filter: blur(3px); border-color: rgba(255,255,255,0.14); color: #fff;
}
.ro-hero-card__actions .ro-btn:hover { background: rgba(5,6,10,0.85); }

.ro-hero-card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.ro-hero-card__name { font-size: 16px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ro-hero-card__desc { font-size: 12px; color: var(--ro-text-faint); line-height: 1.4; min-height: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ro-hero-card__desc--placeholder { font-style: italic; opacity: 0.7; }
.ro-hero-card__meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 11px; color: var(--ro-text-faint); }

.ro-new-production-btn { flex-shrink: 0; }

/* ---------- Recently worked on strip ---------- */
.ro-recent-strip { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.ro-recent-chip {
  flex-shrink: 0; width: 168px; cursor: pointer;
  border: 1px solid var(--ro-border-soft); border-radius: var(--ro-radius-md);
  overflow: hidden; background: var(--ro-panel-raised);
  transition: border-color var(--ro-fast) var(--ro-ease);
}
.ro-recent-chip:hover { border-color: var(--ro-orange); }
.ro-recent-chip__thumb { height: 64px; background-size: cover; background-position: center; }
.ro-recent-chip__body { padding: 8px 10px 10px; }
.ro-recent-chip__name { font-size: 12px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ro-recent-chip__sub { font-size: 10.5px; color: var(--ro-text-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Cover image upload control (edit project modal) ---------- */
.ro-cover-upload {
  height: 100px; border-radius: var(--ro-radius-md); border: 1.5px dashed var(--ro-border);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background-size: cover; background-position: center; cursor: pointer; position: relative; overflow: hidden;
  color: var(--ro-text-dim); font-size: 12px; font-weight: 600;
}
.ro-cover-upload:hover { border-color: var(--ro-orange); }
.ro-cover-upload__hint { background: rgba(5,6,10,0.55); padding: 4px 10px; border-radius: var(--ro-radius-pill); }

/* ---------- Auth (Sign In / Create Account) ---------- */
.ro-auth-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 15% 10%, rgba(243,122,32,0.10), transparent 40%),
    radial-gradient(circle at 85% 90%, rgba(196,58,130,0.10), transparent 40%),
    var(--ro-bg);
}
.ro-auth-card { width: 100%; max-width: 380px; padding: 28px 26px; }
.ro-auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.ro-auth-brand img { width: 36px; height: 36px; border-radius: 50%; box-shadow: var(--ro-glow-orange); }
.ro-auth-brand__name { font-weight: 800; font-size: 17px; }
.ro-auth-error {
  background: rgba(255,92,92,0.12); border: 1px solid rgba(255,92,92,0.35);
  color: #ffb3b3; font-size: 12.5px; padding: 9px 12px; border-radius: var(--ro-radius-sm);
  margin-bottom: 14px;
}
.ro-auth-switch {
  display: block; width: 100%; text-align: center; margin-top: 14px;
  background: none; border: none; color: var(--ro-text-dim); font-size: 12.5px; cursor: pointer;
}
.ro-auth-switch:hover { color: var(--ro-orange); }
.ro-account-chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.ro-account-chip {
  display: flex; align-items: center; gap: 6px;
  background: var(--ro-panel-sunken); border: 1px solid var(--ro-border);
  border-radius: var(--ro-radius-pill); padding: 4px 10px 4px 4px; cursor: pointer;
  color: var(--ro-text); font-size: 12px; font-weight: 600;
}
.ro-account-chip:hover { border-color: var(--ro-orange); }

/* ---------- Avatar (auth screen + profile menu) ---------- */
.ro-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10.5px; font-weight: 800; color: #14151a; flex-shrink: 0;
}
.ro-avatar--lg { width: 44px; height: 44px; font-size: 15px; }

/* ---------- Profile menu (topbar) ---------- */
.ro-profile-btn {
  display: flex; align-items: center; gap: 8px;
  background: transparent; border: 1px solid transparent; border-radius: var(--ro-radius-pill);
  padding: 4px 10px 4px 4px; cursor: pointer; color: var(--ro-text);
}
.ro-profile-btn:hover { border-color: var(--ro-border); background: var(--ro-panel-raised); }
.ro-profile-btn__name { font-size: 12.5px; font-weight: 700; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ro-profile-menu-wrap { position: relative; }
.ro-profile-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 60;
  width: 230px; background: var(--ro-panel-raised); border: 1px solid var(--ro-border);
  border-radius: var(--ro-radius-md); box-shadow: var(--ro-shadow-lg); overflow: hidden; padding: 6px;
}
.ro-profile-menu__head { display: flex; align-items: center; gap: 10px; padding: 10px 8px 12px; border-bottom: 1px solid var(--ro-border-soft); margin-bottom: 6px; }
.ro-profile-menu__head-name { font-size: 13px; font-weight: 700; }
.ro-profile-menu__head-sub { font-size: 11px; color: var(--ro-text-faint); }
.ro-profile-menu__item {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  background: none; border: none; color: var(--ro-text-dim); font-size: 12.5px; font-weight: 600;
  padding: 9px 8px; border-radius: var(--ro-radius-sm); cursor: pointer;
}
.ro-profile-menu__item:hover { background: var(--ro-panel-sunken); color: var(--ro-text); }
.ro-profile-menu__item--danger { color: var(--ro-danger); }
.ro-profile-menu__item--danger:hover { background: rgba(255,92,92,0.1); color: var(--ro-danger); }
.ro-profile-menu__divider { height: 1px; background: var(--ro-border-soft); margin: 6px 2px; }
.ro-profile-menu__credit-pill { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 2px; font-size: 11px; color: var(--ro-text-faint); }
.ro-profile-menu__credit-pill strong { color: var(--ro-cyan); font-size: 12.5px; }

/* ---------- Credits & Usage modal ---------- */
.ro-modal--lg { max-width: 560px; }
.ro-credit-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.ro-credit-stat { background: var(--ro-panel-sunken); border: 1px solid var(--ro-border-soft); border-radius: var(--ro-radius-md); padding: 12px; }
.ro-credit-stat__label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ro-text-faint); font-weight: 700; }
.ro-credit-stat__value { font-size: 19px; font-weight: 800; margin-top: 4px; }
.ro-txn-table { max-height: 260px; overflow: auto; border: 1px solid var(--ro-border-soft); border-radius: var(--ro-radius-md); }
.ro-txn-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; font-size: 12px; border-bottom: 1px solid var(--ro-border-soft); }
.ro-txn-row:last-child { border-bottom: none; }
.ro-txn-row__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ro-txn-row__cost { font-weight: 700; font-variant-numeric: tabular-nums; }
.ro-txn-row__cost--free { color: var(--ro-success); }
.ro-txn-row__time { color: var(--ro-text-faint); font-size: 10.5px; white-space: nowrap; }

/* ---------- Utility flex/spacing (small, non-Tailwind-duplicating) ---------- */
.ro-row { display: flex; align-items: center; }
.ro-col { display: flex; flex-direction: column; }
.ro-gap-6 { gap: 6px; } .ro-gap-8 { gap: 8px; } .ro-gap-10 { gap: 10px; } .ro-gap-12 { gap: 12px; } .ro-gap-16 { gap: 16px; }
.ro-flex-1 { flex: 1; min-width: 0; }
.ro-mt-8 { margin-top: 8px; } .ro-mt-16 { margin-top: 16px; } .ro-mt-24 { margin-top: 24px; }
.ro-mb-8 { margin-bottom: 8px; } .ro-mb-16 { margin-bottom: 16px; }

/* ---------- Password field (show/hide eye toggle) ---------- */
.ro-password-field { position: relative; }
.ro-password-field .ro-input { padding-right: 42px; }
.ro-password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: var(--ro-radius-sm);
  color: var(--ro-text-faint);
  cursor: pointer;
}
.ro-password-toggle:hover { color: var(--ro-text); background: var(--ro-panel-raised); }

/* ---------- Boot / connecting-to-server loading state ---------- */
.ro-boot-loading {
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: var(--ro-bg);
}
.ro-spinner--lg { width: 32px; height: 32px; border-width: 3.5px; }
