/* Mundologia: components styles. Split from styles.backup.css. */

.hero-card,
.mini-card,
.panel,
.category-hero,
.newsletter,
.metric,
.login-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(8, 14, 27, .92), rgba(3, 7, 18, .94));
  box-shadow: var(--shadow);
}

.section-title h2:after,
.panel > h2:after,
.panel > h3:after,
.related h2:after {
  content: "";
  display: block;
  width: 36px;
  height: 3px;
  margin-top: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, #a855f7, #7c3aed);
}

.btn-ghost,
.btn-primary,
.newsletter button,
.compact-newsletter button,
.ad-tall button,
.ad-inline button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid rgba(168,85,247,.48);
  border-radius: var(--radius);
  color: #d8b4fe;
  background: rgba(10,16,31,.9);
}

.btn-primary,
.newsletter button,
.compact-newsletter button {
  color: #fff;
  border: 0;
  background: linear-gradient(135deg, #8b5cf6, #6423d1);
  box-shadow: 0 0 26px rgba(124,58,237,.25);
}

.section-title select,
.form-grid select,
.table-actions select,
.admin-table td select {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 34px 9px 12px;
  color: var(--text);
  background-color: rgba(4, 10, 22, .96);
  background-image: linear-gradient(45deg, transparent 50%, #c084fc 50%), linear-gradient(135deg, #c084fc 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.section-title select { min-width: 148px; }

select option {
  color: #e5e7eb;
  background: #070d18;
}

.top-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  z-index: 60;
  display: grid;
  gap: 8px;
  width: 260px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #070d18;
  box-shadow: var(--shadow);
}
.top-dropdown a,
.top-dropdown button {
  display: grid;
  width: 100%;
  padding: 9px;
  border: 0;
  text-align: left;
  background: transparent;
}
.top-dropdown span { color: var(--muted); font-size: 12px; }

.newsletter input,
.compact-newsletter input,
.login-card input,
.form-grid input,
.form-grid select,
.editor-form textarea,
.table-actions input,
.table-actions select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: 0;
  color: #e5e7eb;
  background: rgba(4, 10, 22,.84);
  padding: 13px 14px;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: #e9d5ff;
  background: rgba(9, 15, 29, .9);
}

.icon-button.active {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #8b5cf6, #5b21b6);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 7px 11px;
  border-radius: 5px;
  color: #fff;
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
  box-shadow: 0 0 22px rgba(124, 58, 237, .35);
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
}

.meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: #b8c0cf;
  font-size: 13px;
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.25);
  background: linear-gradient(135deg, #f59e0b, #f8fafc 42%, #60a5fa);
}

.avatar.tiny { width: 24px; height: 24px; display: inline-block; margin-right: 8px; vertical-align: middle; }

.cover-link { position: absolute; inset: 0; z-index: 3; }

.panel { padding: 26px; }

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-title h2,
.panel h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.18;
}

.section-title a,
.sidebar-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #c084fc;
  font-size: 13px;
}

.btn-ghost,
.btn-primary { padding: 10px 20px; }

.btn-ghost.wide { width: 100%; }

form.is-submitting {
  cursor: progress;
}

form.is-submitting button {
  opacity: .72;
  cursor: progress;
}

form.is-submitting button[type="submit"],
form.is-submitting button:not([type]) {
  position: relative;
}

.search-box { padding-right: 0; }

.search-box button {
  display: grid;
  flex: 0 0 48px;
  place-items: center;
  width: 48px;
  height: 44px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: linear-gradient(135deg, #8b5cf6, #5b21b6);
}

.section-title small { color: #9ca3af; font-size: 14px; font-weight: 400; }

.danger { color: #fb7185; border-color: rgba(225,29,72,.35); }

.alert {
  padding: 12px;
  border: 1px solid #ef4444;
  border-radius: var(--radius);
  color: #fecaca;
  background: rgba(127,29,29,.78);
}

.alert.success {
  border-color: #22c55e;
  color: #bbf7d0;
  background: rgba(5,46,22,.78);
}

.btn-danger {
  min-height: 42px;
  padding: 10px 18px;
  border: 1px solid #e11d48;
  border-radius: var(--radius);
  color: #fb7185;
  background: rgba(11,18,32,.9);
}

.empty-state { text-align: center; padding: 100px 20px; }

.pagination{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}

.auth-shell{max-width:520px;margin:40px auto;padding:32px}

.auth-shell form{display:grid;gap:16px}

.auth-shell label{display:grid;gap:7px;color:#cbd5e1}

.auth-shell input{height:46px;padding:0 14px;border:1px solid var(--line);border-radius:var(--radius);background:#070d18}

.alert.error{border-color:rgba(239,68,68,.45);color:#fecaca;background:rgba(127,29,29,.25)}

.empty-state.compact{padding:45px 20px}

.toast-stack {
  position: fixed;
  z-index: 120;
  top: 96px;
  right: 24px;
  width: min(430px, calc(100vw - 32px));
  display: grid;
  gap: 12px;
  pointer-events: none;
}

.admin-body .toast-stack {
  top: 102px;
}

.toast {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 32px;
  gap: 13px;
  align-items: start;
  padding: 15px 14px;
  border: 1px solid rgba(148,163,184,.18);
  border-radius: 10px;
  color: #edf2fb;
  background:
    linear-gradient(145deg, rgba(11,18,32,.98), rgba(5,10,22,.98));
  box-shadow: 0 20px 70px rgba(0,0,0,.48), 0 0 36px rgba(124,58,237,.14);
  pointer-events: auto;
  overflow: hidden;
}

.toast:before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, #8b5cf6, #2563eb);
}

.toast > svg {
  width: 42px;
  height: 42px;
  padding: 10px;
  border-radius: 50%;
  color: #d8b4fe;
  background: rgba(124,58,237,.18);
}

.toast strong {
  display: block;
  margin: 1px 0 4px;
  color: #fff;
  font-size: 14px;
}

.toast p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.45;
  font-size: 13px;
}

.toast-close {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(148,163,184,.15);
  border-radius: 7px;
  color: #94a3b8;
  background: rgba(15,23,42,.68);
}

.toast-close svg {
  width: 16px;
}

.toast-success {
  border-color: rgba(34,197,94,.34);
}

.toast-success:before {
  background: linear-gradient(180deg, #22c55e, #16a34a);
}

.toast-success > svg {
  color: #86efac;
  background: rgba(20,83,45,.48);
}

.toast-error {
  border-color: rgba(239,68,68,.4);
}

.toast-error:before {
  background: linear-gradient(180deg, #fb7185, #dc2626);
}

.toast-error > svg {
  color: #fecaca;
  background: rgba(127,29,29,.44);
}

.toast.is-hiding {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .18s ease, transform .18s ease;
}

@media(max-width:700px) {
  .toast-stack,
  .admin-body .toast-stack {
    top: 76px;
    right: 12px;
    left: 12px;
    width: auto;
  }

  .toast {
    grid-template-columns: 38px minmax(0,1fr) 30px;
    padding: 13px 12px;
  }

  .toast > svg {
    width: 38px;
    height: 38px;
  }
}
