/* ============================================================
   nickihub — central de vídeos
   Paleta: plum escuro + mel (produtos) + violeta (receitas)
   ============================================================ */

:root {
  --void:      #0E0B12;
  --panel:     #16121D;
  --raise:     #1E1826;
  --raise-2:   #271F31;
  --line:      rgba(255, 255, 255, .075);
  --line-str:  rgba(255, 255, 255, .14);

  --honey:     #FFB13B;
  --honey-dim: rgba(255, 177, 59, .14);
  --berry:     #B57BFF;
  --berry-dim: rgba(181, 123, 255, .14);
  --mint:      #3DDC84;
  --danger:    #FF6B6B;

  --text:      #F3EEE7;
  --mute:      #9E95AA;
  --faint:     #6C6478;

  --display: 'Bricolage Grotesque', 'Archivo', system-ui, sans-serif;
  --body:    'Inter', system-ui, -apple-system, sans-serif;
  --mono:    'JetBrains Mono', ui-monospace, monospace;

  --rail-w: 252px;
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;

  --ease: cubic-bezier(.2, .8, .25, 1);
  --shadow: 0 18px 50px rgba(0, 0, 0, .55);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--void);
  color: var(--text);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body.app {
  background-image:
    radial-gradient(900px 480px at 12% -8%, rgba(255, 177, 59, .07), transparent 62%),
    radial-gradient(760px 420px at 92% 4%, rgba(181, 123, 255, .07), transparent 60%);
  background-attachment: fixed;
}

h1, h2, h3, h4 { font-family: var(--display); margin: 0; letter-spacing: -.02em; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--honey); outline-offset: 3px; border-radius: 4px; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2C2436; border-radius: 20px; border: 3px solid var(--void); }
::-webkit-scrollbar-thumb:hover { background: #3B3148; }

/* ============================================================
   ESTRUTURA
   ============================================================ */
.app-shell {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  min-height: 100vh;
}

/* ---------- Barra lateral ---------- */
.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 24px 16px 18px;
  background: linear-gradient(180deg, #161020 0%, #120E18 100%);
  border-right: 1px solid var(--line);
  z-index: 40;
}

.rail-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 8px 4px;
  animation: slide-in .5s var(--ease) both;
}

.brand-mark {
  width: 30px; height: 30px;
  border-radius: 9px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--honey), #FF8A3D);
  box-shadow: 0 6px 18px rgba(255, 138, 61, .3);
}
.brand-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #171019;
  animation: pulse-dot 2.6s var(--ease) infinite;
}
@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(.6); opacity: .6; }
}

.brand-text {
  font-family: var(--display);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -.035em;
}
.brand-text span { color: var(--honey); }

.rail-nav { position: relative; display: flex; flex-direction: column; gap: 3px; }

.rail-indicator {
  position: absolute;
  left: 0; top: 0;
  width: 100%;
  height: 42px;
  border-radius: 11px;
  background: var(--raise);
  border: 1px solid var(--line-str);
  transition: transform .42s var(--ease), opacity .3s;
  opacity: 0;
  pointer-events: none;
}
.rail-indicator.is-ready { opacity: 1; }
.rail-indicator::before {
  content: '';
  position: absolute;
  left: -16px; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 18px;
  border-radius: 0 3px 3px 0;
  background: var(--honey);
}

.rail-item {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 11px;
  height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--mute);
  cursor: pointer;
  text-align: left;
  transition: color .2s;
  animation: slide-in .5s var(--ease) both;
}
.rail-item:nth-child(2) { animation-delay: .04s; }
.rail-item:nth-child(3) { animation-delay: .08s; }
.rail-item:nth-child(4) { animation-delay: .12s; }
.rail-item:nth-child(6) { animation-delay: .16s; }

.rail-item svg { width: 17px; height: 17px; fill: currentColor; flex: none; transition: transform .3s var(--ease); }
.rail-item:hover { color: var(--text); }
.rail-item:hover svg { transform: translateY(-1px) scale(1.06); }
.rail-item.is-active { color: var(--text); }
.rail-item.is-active svg { fill: var(--honey); }

.rail-label { flex: 1; font-weight: 500; font-size: 14.5px; }

.rail-count {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
  background: rgba(255, 255, 255, .05);
  padding: 1px 7px;
  border-radius: 20px;
}
.rail-item.is-active .rail-count { color: var(--honey); background: var(--honey-dim); }

.rail-divider { height: 1px; background: var(--line); margin: 9px 12px; }

.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }

.rail-action {
  display: flex; align-items: center; gap: 9px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
  color: var(--mute);
  font-size: 13.5px;
  cursor: pointer;
  transition: all .22s var(--ease);
}
.rail-action svg { width: 15px; height: 15px; fill: currentColor; transition: transform .5s var(--ease); }
.rail-action:hover { color: var(--text); border-color: var(--line-str); background: rgba(255, 255, 255, .06); }
.rail-action:hover svg { transform: rotate(90deg); }

.rail-user {
  display: flex; align-items: center; gap: 10px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--line);
}
.user-avatar {
  width: 30px; height: 30px; flex: none;
  border-radius: 9px;
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; font-size: 13px;
  background: var(--honey-dim); color: var(--honey);
}
body[data-role="colaborador"] .user-avatar { background: var(--berry-dim); color: var(--berry); }
.user-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.user-meta strong { font-size: 13px; font-weight: 600; }
.user-meta span { font-size: 11px; color: var(--faint); font-family: var(--mono); }
.user-exit {
  width: 28px; height: 28px; flex: none;
  display: grid; place-items: center;
  border-radius: 8px; color: var(--faint);
  transition: all .2s;
}
.user-exit svg { width: 15px; height: 15px; fill: currentColor; }
.user-exit:hover { color: var(--danger); background: rgba(255, 107, 107, .1); }

/* ---------- Área principal ---------- */
.app-main { min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 30px;
  background: rgba(14, 11, 18, .82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.topbar-title { flex: 1; min-width: 0; }
.topbar-title h1 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}
.topbar-sub {
  display: block;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--faint);
  letter-spacing: .04em;
}

.topbar-tools { display: flex; align-items: center; gap: 10px; }

.search {
  position: relative;
  display: flex; align-items: center; gap: 8px;
  height: 38px;
  padding: 0 12px;
  border-radius: 11px;
  background: var(--raise);
  border: 1px solid var(--line);
  transition: border-color .2s, box-shadow .2s, width .3s var(--ease);
  width: 210px;
}
.search:focus-within { border-color: rgba(255, 177, 59, .45); box-shadow: 0 0 0 3px rgba(255, 177, 59, .1); width: 260px; }
.search svg { width: 15px; height: 15px; fill: var(--faint); flex: none; }
.search input { border: 0; background: none; outline: none; width: 100%; font-size: 14px; }
.search input::placeholder { color: var(--faint); }
.search-clear { border: 0; background: none; color: var(--faint); cursor: pointer; font-size: 18px; line-height: 1; padding: 0 2px; }
.search-clear:hover { color: var(--text); }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: transform .18s var(--ease), background .2s, border-color .2s, box-shadow .2s;
  white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; fill: currentColor; }
.btn:active { transform: scale(.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--honey), #FF8F3C);
  color: #17110A;
  box-shadow: 0 8px 22px rgba(255, 143, 60, .22);
}
.btn-primary:hover { box-shadow: 0 12px 30px rgba(255, 143, 60, .34); transform: translateY(-1px); }

.btn-soft { background: var(--raise-2); color: var(--text); border-color: var(--line-str); }
.btn-soft:hover { background: #322942; }

.btn-ghost { background: rgba(255, 255, 255, .06); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: rgba(255, 255, 255, .11); }

.rail-toggle { display: none; }

/* ============================================================
   VIEWS
   ============================================================ */
.viewport { padding: 26px 30px 70px; }

.view { display: none; }
.view.is-active { display: block; animation: view-in .38s var(--ease) both; }

@keyframes view-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
@keyframes slide-in {
  from { opacity: 0; transform: translateX(-10px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Chips (produtos / ingredientes) ---------- */
.chips-bar {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 24px;
  padding-bottom: 4px;
}
.chips {
  display: flex; gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.chips::-webkit-scrollbar { display: none; }

.chip {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px;
  padding: 0 15px;
  border-radius: 30px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
  color: var(--mute);
  font-size: 13.5px; font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all .24s var(--ease);
}
.chip:hover { color: var(--text); border-color: var(--line-str); transform: translateY(-1px); }
.chip .chip-num { font-family: var(--mono); font-size: 11px; color: var(--faint); }

.chip.is-active {
  background: var(--honey); border-color: var(--honey); color: #17110A; font-weight: 600;
  box-shadow: 0 8px 20px rgba(255, 177, 59, .22);
}
.chip.is-active .chip-num { color: rgba(23, 17, 10, .6); }

#receitaChips .chip.is-active {
  background: var(--berry); border-color: var(--berry); color: #150F1D;
  box-shadow: 0 8px 20px rgba(181, 123, 255, .22);
}

.chip-add {
  flex: none;
  width: 36px; padding: 0;
  justify-content: center;
  font-size: 19px; color: var(--faint);
  border-style: dashed;
}
.chip-add:hover { color: var(--honey); border-color: var(--honey); }

/* ---------- Containers de categoria ---------- */
.stack { display: flex; flex-direction: column; gap: 22px; }

.panel {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, .028), rgba(255, 255, 255, .012));
  padding: 20px 22px 24px;
  animation: panel-in .45s var(--ease) both;
}
.panel:nth-child(1) { animation-delay: .02s; }
.panel:nth-child(2) { animation-delay: .09s; }
.panel:nth-child(3) { animation-delay: .16s; }
.panel:nth-child(4) { animation-delay: .23s; }

@keyframes panel-in {
  from { opacity: 0; transform: translateY(16px) scale(.995); }
  to   { opacity: 1; transform: none; }
}

.panel-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 18px;
}
.panel-head h2 {
  font-size: 16.5px; font-weight: 700;
  display: flex; align-items: center; gap: 10px;
}
.panel-head h2::before {
  content: '';
  width: 7px; height: 7px; border-radius: 2px;
  background: var(--honey);
  box-shadow: 0 0 12px rgba(255, 177, 59, .6);
}
.panel[data-accent="berry"] .panel-head h2::before { background: var(--berry); box-shadow: 0 0 12px rgba(181, 123, 255, .6); }

.panel-count {
  font-family: var(--mono); font-size: 11px;
  color: var(--faint);
  border: 1px solid var(--line);
  padding: 2px 8px; border-radius: 20px;
}
.panel-actions { margin-left: auto; display: flex; gap: 8px; }

.panel-upload {
  display: inline-flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 12px;
  border-radius: 9px;
  border: 1px dashed var(--line-str);
  background: transparent; color: var(--mute);
  font-size: 12.5px; cursor: pointer;
  transition: all .22s var(--ease);
}
.panel-upload svg { width: 13px; height: 13px; fill: currentColor; }
.panel-upload:hover { color: var(--honey); border-color: var(--honey); background: var(--honey-dim); }

/* ---------- Grade de vídeos ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 16px;
}

.card {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--raise);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
  animation: card-in .45s var(--ease) both;
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(14px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 177, 59, .5);
  box-shadow: 0 16px 34px rgba(0, 0, 0, .5);
}

.card-media {
  position: relative;
  aspect-ratio: 9 / 16;
  background: #0B080F;
  overflow: hidden;
}
.card-media video {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s var(--ease), opacity .3s;
}
.card:hover .card-media video { transform: scale(1.05); }

.card-play {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: linear-gradient(180deg, rgba(0, 0, 0, .05), rgba(0, 0, 0, .55));
  transition: opacity .3s;
}
.card-play span {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(20, 15, 25, .6);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, .22);
  transition: transform .3s var(--ease), background .3s;
}
.card-play svg { width: 15px; height: 15px; fill: #fff; margin-left: 2px; }
.card:hover .card-play span { transform: scale(1.12); background: var(--honey); }
.card:hover .card-play svg { fill: #17110A; }

.card-badge {
  position: absolute; top: 9px; left: 9px;
  font-family: var(--mono); font-size: 10px;
  padding: 3px 7px; border-radius: 6px;
  background: rgba(11, 8, 15, .72);
  backdrop-filter: blur(6px);
  color: #EDE6F2;
  letter-spacing: .04em;
}

.card-tools {
  position: absolute; top: 8px; right: 8px;
  display: flex; gap: 5px;
  opacity: 0; transform: translateY(-5px);
  transition: all .25s var(--ease);
}
.card:hover .card-tools, .card:focus-within .card-tools { opacity: 1; transform: none; }

.card-tool {
  width: 28px; height: 28px;
  border: 0; border-radius: 8px;
  display: grid; place-items: center;
  background: rgba(11, 8, 15, .78);
  backdrop-filter: blur(6px);
  color: #EDE6F2;
  cursor: pointer;
  transition: background .2s, color .2s, transform .2s;
}
.card-tool svg { width: 14px; height: 14px; fill: currentColor; }
.card-tool:hover { background: var(--honey); color: #17110A; transform: scale(1.08); }
.card-tool.is-danger:hover { background: var(--danger); color: #fff; }

.card-body { padding: 10px 11px 12px; }
.card-title {
  font-size: 13px; font-weight: 500;
  line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  margin-top: 5px;
  font-family: var(--mono); font-size: 10.5px;
  color: var(--faint);
  display: flex; gap: 8px;
}

/* ---------- Estados vazios ---------- */
.empty {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 34px 20px;
  border: 1px dashed var(--line-str);
  border-radius: var(--r-md);
  color: var(--faint);
  text-align: center;
}
.empty strong { font-family: var(--display); font-size: 14.5px; color: var(--mute); font-weight: 600; }
.empty p { margin: 0; font-size: 13px; max-width: 320px; }

/* ============================================================
   SOBRE
   ============================================================ */
.about-panel { max-width: 760px; }
.about-text { color: var(--mute); font-size: 15px; margin: 0 0 22px; white-space: pre-line; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.contact-card {
  display: flex; flex-direction: column; gap: 3px;
  padding: 15px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
  transition: all .25s var(--ease);
}
.contact-card:hover { border-color: rgba(255, 177, 59, .45); transform: translateY(-2px); background: var(--honey-dim); }
.contact-label { font-family: var(--mono); font-size: 10.5px; color: var(--faint); letter-spacing: .08em; text-transform: uppercase; }
.contact-value { font-size: 15px; font-weight: 500; }
.about-foot { margin: 22px 0 0; font-size: 12px; color: var(--faint); font-family: var(--mono); }

/* ============================================================
   MODAIS
   ============================================================ */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center;
  padding: 24px;
  background: rgba(8, 6, 11, .78);
  backdrop-filter: blur(8px);
  animation: fade-in .25s var(--ease);
}
.modal-backdrop[hidden] { display: none; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.modal-close {
  position: absolute; top: 12px; right: 14px;
  width: 34px; height: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .05);
  color: var(--text);
  font-size: 22px; line-height: 1;
  cursor: pointer; z-index: 3;
  transition: all .2s;
}
.modal-close:hover { background: var(--danger); border-color: var(--danger); color: #fff; }

/* ---------- Player ---------- */
.modal-player {
  position: relative;
  width: min(430px, 92vw);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #0B080F;
  border: 1px solid var(--line-str);
  box-shadow: var(--shadow);
  animation: pop-in .32s var(--ease);
}
@keyframes pop-in {
  from { opacity: 0; transform: translateY(18px) scale(.96); }
  to   { opacity: 1; transform: none; }
}
.modal-player video {
  width: 100%;
  max-height: 74vh;
  display: block;
  background: #000;
}
.player-meta {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}
.player-meta > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.player-meta strong { font-size: 14px; font-weight: 600; }
.player-meta span { font-family: var(--mono); font-size: 11px; color: var(--faint); }

.player-nav button {
  position: absolute; top: 42%;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(11, 8, 15, .6);
  backdrop-filter: blur(6px);
  color: #fff; font-size: 24px; line-height: 1;
  cursor: pointer; opacity: 0;
  transition: opacity .25s, background .2s, transform .2s;
}
.modal-player:hover .player-nav button { opacity: .9; }
.player-nav button:hover { background: var(--honey); color: #17110A; transform: scale(1.06); }
#playerPrev { left: 12px; }
#playerNext { right: 12px; }

/* ---------- Sheets (upload / gerenciar) ---------- */
.sheet {
  position: relative;
  width: min(560px, 94vw);
  max-height: 88vh;
  overflow-y: auto;
  padding: 26px 26px 24px;
  border-radius: var(--r-lg);
  background: var(--panel);
  border: 1px solid var(--line-str);
  box-shadow: var(--shadow);
  animation: pop-in .32s var(--ease);
}
.sheet-wide { width: min(720px, 94vw); }
.sheet h3 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.sheet-hint { color: var(--faint); font-size: 13px; margin: 0 0 18px; }

.form { display: flex; flex-direction: column; gap: 14px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-family: var(--mono); font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); }
.field input, .field select, .field textarea {
  height: 42px;
  padding: 0 13px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--raise);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { height: auto; padding: 11px 13px; resize: vertical; line-height: 1.5; font-family: var(--body); }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: rgba(255, 177, 59, .5);
  box-shadow: 0 0 0 3px rgba(255, 177, 59, .1);
}
.field select { appearance: none; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, var(--faint) 50%), linear-gradient(135deg, var(--faint) 50%, transparent 50%); background-position: calc(100% - 17px) 19px, calc(100% - 12px) 19px; background-size: 5px 5px; background-repeat: no-repeat; }

.form-actions { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.form-msg { font-size: 13px; margin: 8px 0 0; min-height: 18px; }
.form-msg.is-error { color: var(--danger); }
.form-msg.is-ok { color: var(--mint); }

/* ---------- Dropzone ---------- */
.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 30px 20px;
  border: 1.5px dashed var(--line-str);
  border-radius: var(--r-md);
  color: var(--faint);
  text-align: center;
  transition: all .25s var(--ease);
}
.dropzone svg { width: 26px; height: 26px; fill: var(--faint); transition: transform .3s var(--ease), fill .25s; }
.dropzone strong { font-family: var(--display); color: var(--mute); font-size: 15px; }
.dropzone button { border: 0; background: none; color: var(--honey); cursor: pointer; text-decoration: underline; padding: 0; }
.dropzone.is-over { border-color: var(--honey); background: var(--honey-dim); color: var(--honey); }
.dropzone.is-over svg { transform: translateY(-4px); fill: var(--honey); }

.upload-queue { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.upload-queue:empty { display: none; }
.queue-item {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 11px;
  background: var(--raise);
  border: 1px solid var(--line);
  overflow: hidden;
  animation: card-in .3s var(--ease) both;
}
.queue-name { flex: 1; min-width: 0; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-status { font-family: var(--mono); font-size: 11px; color: var(--faint); }
.queue-item.is-done .queue-status { color: var(--mint); }
.queue-item.is-error .queue-status { color: var(--danger); }
.queue-bar {
  position: absolute; left: 0; bottom: 0; height: 2px;
  background: linear-gradient(90deg, var(--honey), #FF8F3C);
  width: 0; transition: width .25s var(--ease);
}
.queue-remove { border: 0; background: none; color: var(--faint); cursor: pointer; font-size: 17px; line-height: 1; }
.queue-remove:hover { color: var(--danger); }

/* ---------- Gerenciar ---------- */
.seg {
  display: flex; gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--raise);
  border: 1px solid var(--line);
  margin: 16px 0 20px;
  overflow-x: auto;
  scrollbar-width: none;
}
.seg::-webkit-scrollbar { display: none; }
.seg-item {
  flex: 1;
  height: 34px; padding: 0 14px;
  border: 0; border-radius: 9px;
  background: transparent; color: var(--mute);
  font-size: 13.5px; font-weight: 500;
  cursor: pointer; white-space: nowrap;
  transition: all .22s var(--ease);
}
.seg-item:hover { color: var(--text); }
.seg-item.is-active { background: var(--raise-2); color: var(--text); box-shadow: 0 2px 10px rgba(0, 0, 0, .3); }

.manage-panel { display: none; }
.manage-panel.is-active { display: block; animation: view-in .3s var(--ease) both; }

.sortable { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }

.row-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px;
  border-radius: 11px;
  background: var(--raise);
  border: 1px solid var(--line);
  transition: border-color .2s, transform .2s var(--ease), opacity .2s;
}
.row-item.is-dragging { opacity: .45; border-color: var(--honey); }
.row-item.is-over { transform: translateY(2px); border-color: var(--honey); }
.row-grip { cursor: grab; color: var(--faint); display: grid; place-items: center; width: 18px; }
.row-grip svg { width: 14px; height: 14px; fill: currentColor; }
.row-grip:active { cursor: grabbing; }
.row-input {
  flex: 1; min-width: 0;
  height: 32px; padding: 0 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 14px;
  transition: all .2s;
}
.row-input:hover { border-color: var(--line); }
.row-input:focus { border-color: rgba(255, 177, 59, .5); background: rgba(0, 0, 0, .25); outline: none; }
.row-id { font-family: var(--mono); font-size: 10.5px; color: var(--faint); }
.row-del {
  width: 30px; height: 30px;
  border: 1px solid var(--line); border-radius: 8px;
  background: transparent; color: var(--faint);
  cursor: pointer; display: grid; place-items: center;
  transition: all .2s;
}
.row-del svg { width: 14px; height: 14px; fill: currentColor; }
.row-del:hover { color: var(--danger); border-color: var(--danger); background: rgba(255, 107, 107, .1); }

.add-form { display: flex; gap: 8px; }
.add-form input {
  flex: 1;
  height: 40px; padding: 0 13px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--raise);
  outline: none;
  transition: border-color .2s;
}
.add-form input:focus { border-color: rgba(255, 177, 59, .5); }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%; bottom: 26px;
  transform: translateX(-50%) translateY(12px);
  z-index: 120;
  padding: 11px 18px;
  border-radius: 12px;
  background: var(--raise-2);
  border: 1px solid var(--line-str);
  box-shadow: var(--shadow);
  font-size: 14px;
  opacity: 0;
  transition: opacity .28s var(--ease), transform .28s var(--ease);
}
.toast[hidden] { display: none; }
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.is-error { border-color: rgba(255, 107, 107, .5); }
.toast.is-ok { border-color: rgba(61, 220, 132, .45); }

/* ============================================================
   RESPONSIVO
   ============================================================ */
@media (max-width: 1080px) {
  .search { width: 170px; }
  .search:focus-within { width: 200px; }
}

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }

  .rail {
    position: fixed;
    left: 0; top: 0;
    width: 268px;
    transform: translateX(-102%);
    transition: transform .34s var(--ease);
    box-shadow: 24px 0 60px rgba(0, 0, 0, .5);
  }
  .rail.is-open { transform: none; }

  .rail-scrim {
    position: fixed; inset: 0; z-index: 35;
    background: rgba(8, 6, 11, .6);
    backdrop-filter: blur(3px);
    animation: fade-in .25s var(--ease);
  }
  .rail-scrim[hidden] { display: none; }

  .rail-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 4px;
    width: 38px; height: 38px;
    padding: 0 9px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--raise);
    cursor: pointer;
  }
  .rail-toggle span { display: block; height: 1.6px; background: var(--text); border-radius: 2px; transition: transform .3s var(--ease), opacity .2s; }
  .rail-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.6px) rotate(45deg); }
  .rail-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .rail-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.6px) rotate(-45deg); }

  .topbar { padding: 13px 18px; gap: 12px; flex-wrap: wrap; }
  .topbar-title h1 { font-size: 18px; }
  .topbar-tools { width: 100%; }
  .search { flex: 1; width: auto; }
  .search:focus-within { width: auto; }
  .btn-upload span { display: none; }
  .btn-upload { padding: 0 13px; }

  .viewport { padding: 20px 18px 60px; }
  .panel { padding: 17px 15px 20px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
}

@media (max-width: 480px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .sheet { padding: 22px 18px 20px; }
  .modal-backdrop { padding: 12px; }
}

/* ---------- Movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
