/* MobPlay Store — Painel Admin */

.admin {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}

/* Sidebar — alinhamento à esquerda */
.side {
  background: var(--bg-2);
  border-right: 1px solid var(--border-soft);
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: sticky;
  top: 0;
  height: 100vh;
  width: 248px;
}
.side__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 6px 10px 22px;
  text-align: left;
}
.side__logo .mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  object-fit: contain;
  flex-shrink: 0;
}
.side__badge {
  font-size: 0.62rem;
  font-weight: 700;
  background: rgba(108, 60, 233, 0.2);
  color: #c4b5fd;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  letter-spacing: 0.05em;
}
.side__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: stretch;
  width: 100%;
}
.side__link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 11px;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.18s var(--ease);
  text-align: left;
  width: 100%;
}
.side__link span:first-child {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 18px;
}
.side__link:hover {
  color: var(--text);
  background: var(--surface);
}
.side__link--active {
  color: #fff;
  background: var(--grad-soft);
  box-shadow: inset 0 0 0 1px rgba(108, 60, 233, 0.3);
}
.side__foot {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  width: 100%;
}
.side__user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  text-align: left;
}
.side__user-info {
  min-width: 0;
  text-align: left;
}
.side__user-name {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.side__user-role {
  color: var(--muted);
  font-size: 0.78rem;
}
.side__foot .btn,
.side__foot a.btn {
  justify-content: flex-start;
  text-align: left;
  width: 100%;
  padding-left: 10px;
}

/* Content */
.main {
  padding: 30px 36px 60px;
  max-width: 1100px;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.topbar h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.topbar p {
  color: var(--muted);
  margin-top: 3px;
}

/* Stat cards */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
.statc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  overflow: hidden;
  animation: rise 0.4s var(--ease) both;
}
.statc::after {
  content: '';
  position: absolute;
  right: -30px;
  top: -30px;
  width: 90px;
  height: 90px;
  background: var(--grad);
  filter: blur(40px);
  opacity: 0.18;
  border-radius: 50%;
}
.statc__num {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.statc__lbl {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 4px;
}

/* Panels & tables */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-top: 22px;
}
.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.panel__head h3 {
  font-size: 1.15rem;
  font-weight: 700;
}
.table {
  width: 100%;
  border-collapse: collapse;
}
.table th {
  text-align: left;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-soft);
}
.table td {
  padding: 12px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.92rem;
  vertical-align: middle;
}
.table tr:last-child td {
  border-bottom: none;
}
.table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}
.tcell {
  display: flex;
  align-items: center;
  gap: 12px;
}
.tcell img,
.tcell .ph {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  object-fit: cover;
}
.tcell .ph {
  display: grid;
  place-items: center;
  background: var(--grad-soft);
  color: var(--violet);
  font-weight: 800;
}
.row-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}
.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  cursor: pointer;
  color: var(--muted);
  transition: all 0.18s;
}
.icon-btn:hover {
  color: var(--text);
  border-color: var(--violet);
}
.icon-btn--danger:hover {
  color: #fda4a4;
  border-color: rgba(239, 68, 68, 0.5);
}

/* Forms / editor */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-grid .full {
  grid-column: 1 / -1;
}

/* Dropzone */
.drop {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.2s var(--ease);
  background: var(--bg-2);
}
.drop:hover,
.drop.drag {
  border-color: var(--violet);
  background: var(--grad-soft);
  color: var(--text);
}
.drop__preview {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: center;
}
.drop__preview img {
  max-height: 80px;
  border-radius: 10px;
}

/* Switch */
.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.switch input {
  display: none;
}
.switch__track {
  width: 44px;
  height: 26px;
  border-radius: var(--radius-full);
  background: var(--surface-2);
  border: 1px solid var(--border);
  position: relative;
  transition: background 0.2s;
}
.switch__track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--muted);
  transition: all 0.22s var(--ease);
}
.switch input:checked + .switch__track {
  background: var(--violet);
  border-color: var(--violet);
}
.switch input:checked + .switch__track::after {
  left: 20px;
  background: #fff;
}

/* Progress */
.progress {
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--surface-2);
  overflow: hidden;
  margin-top: 10px;
}
.progress__bar {
  height: 100%;
  width: 0;
  background: var(--grad);
  transition: width 0.2s;
}

/* Screenshot manager */
.shot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.shot-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.shot-item img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}
.shot-item button {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  color: #fff;
  cursor: pointer;
}

/* Login */
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}
.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow);
  animation: rise 0.5s var(--ease) both;
}
.login-card .mark {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  object-fit: contain;
  margin: 0 auto 18px;
  display: block;
}

.back-link {
  color: var(--muted);
  font-size: 0.9rem;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  cursor: pointer;
  margin-bottom: 16px;
}
.back-link:hover {
  color: var(--text);
}

/* Relatórios */
.report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 120px;
  margin-top: 12px;
}
.bar-chart__col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.bar-chart__bar {
  width: 100%;
  max-width: 36px;
  background: var(--grad);
  border-radius: 4px 4px 0 0;
  min-height: 4px;
  transition: height 0.3s var(--ease);
}
.bar-chart__lbl {
  font-size: 0.65rem;
  color: var(--muted-2);
  text-align: center;
}
.metric-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.metric-box {
  background: var(--bg-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
}
.metric-box strong {
  display: block;
  font-size: 1.4rem;
  font-family: 'Space Grotesk', sans-serif;
}
.metric-box span {
  color: var(--muted);
  font-size: 0.78rem;
}

/* Editor da loja */
.store-preview {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 16px;
  background: var(--bg);
}
.store-preview__hero {
  padding: 32px 24px;
  background: var(--grad-soft);
  border-bottom: 1px solid var(--border-soft);
}
.store-preview__hero h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
}
.store-preview__hero .grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@media (max-width: 760px) {
  .admin {
    grid-template-columns: 1fr;
  }
  .side {
    position: relative;
    height: auto;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    overflow-x: visible;
  }
  .side__nav {
    flex-direction: column;
    align-items: stretch;
  }
  .side__foot {
    display: none;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .main {
    padding: 20px;
  }
}
