/* SlideAI — hub de apresentações (workspace) */
:root {
  --dash-bg: #07070b;
  --dash-side: #0c0c12;
  --dash-surface: #14141e;
  --dash-border: rgba(255, 255, 255, 0.09);
  --dash-text: #f4f4f8;
  --dash-dim: #9b9bb0;
  --dash-accent: #22d3ee;
  --dash-display: "Space Grotesk", "Manrope", system-ui, sans-serif;
  --dash-body: "Manrope", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body.dash {
  margin: 0;
  min-height: 100vh;
  color: var(--dash-text);
  font-family: var(--dash-body);
  background: var(--dash-bg);
  -webkit-font-smoothing: antialiased;
}
body.dash a { color: inherit; text-decoration: none; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

.dash-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

/* —— Sidebar —— */
.dash-side {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 14px;
  background: var(--dash-side);
  border-right: 1px solid var(--dash-border);
}
.dash-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  font-family: var(--dash-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.05em;
  margin-bottom: 8px;
}
.dash-mark {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: color-mix(in srgb, var(--dash-accent) 22%, transparent);
  color: var(--dash-accent);
}
.dash-mark .ui-ico { width: 16px; height: 16px; }
.dash-upgrade {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0 4px 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13px;
  background: var(--dash-accent);
  color: #041018;
}
.dash-upgrade:hover { filter: brightness(1.06); }
.dash-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dash-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 500;
  color: var(--dash-dim);
}
.dash-nav a:hover { background: rgba(255,255,255,0.04); color: var(--dash-text); }
.dash-nav a.on {
  background: color-mix(in srgb, var(--dash-accent) 14%, transparent);
  color: var(--dash-text);
}
.dash-nav .ico {
  width: 18px; height: 18px;
  opacity: 0.85;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dash-nav .ico .ui-ico { width: 16px; height: 16px; }
.dash-side-foot { margin-top: auto; padding: 12px 8px 4px; }
.dash-hint {
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
  color: var(--dash-dim);
  opacity: 0.85;
}

/* —— Main —— */
.dash-main {
  padding: 28px clamp(20px, 3vw, 40px) 48px;
  min-width: 0;
}
.dash-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}
.dash-top h1 {
  margin: 0;
  margin-right: auto;
  font-family: var(--dash-display);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 700;
  letter-spacing: -0.045em;
}
.dash-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.dash-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--dash-border);
  background: transparent;
  color: var(--dash-text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.dash-btn .ui-ico { width: 14px; height: 14px; }
.dash-btn:hover { border-color: var(--dash-accent); color: var(--dash-accent); }
.dash-btn-primary {
  background: var(--dash-accent);
  border-color: transparent;
  color: #041018;
}
.dash-btn-primary:hover { filter: brightness(1.06); color: #041018; }

.dash-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}
.dash-tabs {
  display: flex;
  gap: 4px;
  padding: 3px;
  border-radius: 10px;
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
}
.dash-tab {
  border: none;
  background: transparent;
  color: var(--dash-dim);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
}
.dash-tab.on {
  background: color-mix(in srgb, var(--dash-accent) 18%, var(--dash-surface));
  color: var(--dash-text);
}
.dash-search {
  margin-left: auto;
  min-width: min(240px, 100%);
}
.dash-search input {
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--dash-border);
  background: var(--dash-surface);
  color: var(--dash-text);
  font-family: inherit;
  font-size: 13px;
  outline: none;
}
.dash-search input:focus {
  border-color: color-mix(in srgb, var(--dash-accent) 50%, var(--dash-border));
}
.dash-search input::placeholder { color: var(--dash-dim); }

/* —— Grid —— */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
.dash-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  border: 1px solid var(--dash-border);
  background: var(--dash-surface);
  overflow: hidden;
  transition: border-color .15s ease, transform .15s ease;
}
.dash-card:hover {
  border-color: color-mix(in srgb, var(--dash-accent) 40%, var(--dash-border));
  transform: translateY(-2px);
}
.dash-card-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #050508;
  cursor: pointer;
  border: none;
  padding: 0;
  display: block;
  width: 100%;
  color: inherit;
}
.dash-card-thumb .slide {
  position: absolute;
  width: 960px;
  height: 540px;
  max-width: none;
  left: 50%;
  top: 50%;
  margin-left: -480px;
  margin-top: -270px;
  transform: scale(var(--thumb-scale, 0.25));
  transform-origin: center center;
  pointer-events: none;
  animation: none;
  box-shadow: none;
  border-radius: 0;
}
.dash-card-body {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 12px 14px;
}
.dash-card-meta { flex: 1; min-width: 0; }
.dash-card-title {
  margin: 0 0 4px;
  display: block;
  font-family: var(--dash-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--dash-text);
}
.dash-menu a {
  display: block;
  color: var(--dash-text);
  font-size: 13px;
  text-align: left;
  padding: 8px 10px;
  border-radius: 7px;
}
.dash-menu a:hover { background: rgba(255,255,255,0.06); }
.dash-card-sub {
  margin: 0;
  font-size: 12px;
  color: var(--dash-dim);
}
.dash-card-menu {
  position: relative;
  flex-shrink: 0;
}
.dash-more {
  width: 32px; height: 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--dash-dim);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.dash-more .ui-ico { width: 16px; height: 16px; }
.dash-more:hover { background: rgba(255,255,255,0.06); color: var(--dash-text); }
.dash-menu {
  position: absolute;
  right: 0; bottom: 100%;
  margin-bottom: 4px;
  min-width: 148px;
  padding: 6px;
  border-radius: 10px;
  background: #1a1a26;
  border: 1px solid var(--dash-border);
  box-shadow: 0 16px 40px rgba(0,0,0,0.45);
  z-index: 20;
  display: none;
}
.dash-menu.open { display: grid; gap: 2px; }
.dash-menu button {
  border: none;
  background: transparent;
  color: var(--dash-text);
  font-family: inherit;
  font-size: 13px;
  text-align: left;
  padding: 8px 10px;
  border-radius: 7px;
  cursor: pointer;
}
.dash-menu button:hover { background: rgba(255,255,255,0.06); }
.dash-menu button.danger { color: #f87171; }
.dash-fav {
  position: absolute;
  top: 10px; right: 10px;
  z-index: 2;
  width: 30px; height: 30px;
  border-radius: 8px;
  border: none;
  background: rgba(0,0,0,0.45);
  color: var(--dash-dim);
  cursor: pointer;
  font-size: 14px;
  display: grid;
  place-items: center;
}
.dash-fav .ui-ico { width: 14px; height: 14px; }
.dash-fav.on { color: #fbbf24; }

/* —— Empty state —— */
.dash-empty {
  margin: 36px auto 56px;
  max-width: 520px;
  padding: 8px 16px 24px;
  text-align: center;
  color: var(--dash-dim);
}
.dash-empty-stage {
  position: relative;
  height: 168px;
  margin: 0 auto 28px;
  max-width: 340px;
}
.dash-empty-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 168px;
  height: 100px;
  border-radius: 12px;
  border: 1px solid var(--dash-border);
  background: linear-gradient(160deg, #171722 0%, #101018 100%);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform-origin: center center;
}
.dash-empty-card-a {
  transform: translate(-78%, -58%) rotate(-8deg);
  opacity: 0.45;
}
.dash-empty-card-b {
  transform: translate(-50%, -50%);
  z-index: 2;
  border-color: color-mix(in srgb, var(--dash-accent) 35%, var(--dash-border));
  background:
    radial-gradient(120% 80% at 10% 0%, color-mix(in srgb, var(--dash-accent) 18%, transparent), transparent 55%),
    linear-gradient(160deg, #1a1a26 0%, #12121a 100%);
}
.dash-empty-card-c {
  transform: translate(-22%, -42%) rotate(9deg);
  opacity: 0.4;
  z-index: 1;
}
.dash-empty-bar {
  display: block;
  width: 42%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}
.dash-empty-bar.accent {
  background: color-mix(in srgb, var(--dash-accent) 70%, #fff);
  width: 36%;
}
.dash-empty-line {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}
.dash-empty-line.w35 { width: 35%; }
.dash-empty-line.w40 { width: 40%; }
.dash-empty-line.w50 { width: 50%; }
.dash-empty-line.w55 { width: 55%; }
.dash-empty-line.w60 { width: 60%; }
.dash-empty-line.w70 { width: 70%; }
.dash-empty-dots {
  margin-top: auto;
  display: flex;
  gap: 5px;
}
.dash-empty-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--dash-accent) 55%, transparent);
  display: block;
}
.dash-empty-dots i:nth-child(2) { opacity: 0.55; }
.dash-empty-dots i:nth-child(3) { opacity: 0.3; }
.dash-empty-title {
  margin: 0 0 8px;
  font-family: var(--dash-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--dash-text);
}
.dash-empty-sub {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--dash-dim);
}
.dash-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.dash-empty-actions[hidden] { display: none; }
.dash-empty.is-error .dash-empty-stage { opacity: 0.35; filter: grayscale(0.4); }
.dash-empty.is-error .dash-empty-title { color: #fca5a5; }

@media (prefers-reduced-motion: no-preference) {
  .dash-empty-card-b {
    animation: dash-empty-float 4.5s ease-in-out infinite;
  }
}
@keyframes dash-empty-float {
  0%, 100% { transform: translate(-50%, -50%); }
  50% { transform: translate(-50%, calc(-50% - 6px)); }
}

@media (max-width: 800px) {
  .dash-layout { grid-template-columns: 1fr; }
  .dash-side {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    border-right: none;
    border-bottom: 1px solid var(--dash-border);
    gap: 6px;
  }
  .dash-nav { flex-direction: row; flex-wrap: wrap; width: 100%; }
  .dash-side-foot { display: none; }
  .dash-upgrade { margin: 0; }
  .dash-search { margin-left: 0; width: 100%; }
}
