/* =====================================================================
   Coliseu Pokemon — tema do painel administrativo
   ===================================================================== */
:root {
  --brand:      #e3350d;   /* vermelho Poké Ball */
  --brand-600:  #c32d0b;
  --brand-soft: #fde8e3;
  --gold:       #ffcb05;   /* amarelo Pikachu */
  --gold-soft:  #fff6d6;

  --ink:        #1c2230;
  --ink-2:      #5a6475;
  --muted:      #707a8a;
  --line:       #e8ecf3;
  --bg:         #f3f5fa;
  --card:       #ffffff;
  --sidebar:    #14181f;
  --sidebar-2:  #1c222c;

  --r-sm: 10px;
  --r:    16px;
  --r-lg: 22px;

  --sh-sm: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .05);
  --sh:    0 4px 16px rgba(16, 24, 40, .07);
  --sh-lg: 0 18px 48px rgba(16, 24, 40, .12);

  /* gradientes (paleta curada — sem roxo cru/HSL) */
  --g1: linear-gradient(135deg, #ff7a59, #e3350d);
  --g2: linear-gradient(135deg, #4dabf7, #1c7ed6);
  --g3: linear-gradient(135deg, #69db7c, #2f9e44);
  --g4: linear-gradient(135deg, #ffd43b, #f59f00);
  --g5: linear-gradient(135deg, #da77f2, #9c36b5);
  --g6: linear-gradient(135deg, #3bc9db, #1098ad);
}

* { box-sizing: border-box; }

body.admin {
  margin: 0;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ---------------- Layout shell ---------------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 264px;
  flex-shrink: 0;
  background: var(--sidebar);
  color: #c9d1dc;
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  transition: transform .25s ease;
}
.sidebar__brand {
  display: flex; align-items: center; gap: 12px;
  padding: 22px 22px 18px;
}
.pokeball {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(#ff4d4d 0 49%, #fff 49% 51%, #f4f6fb 51% 100%);
  border: 3px solid #0c0f14;
  position: relative; flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(255,255,255,.06);
}
.pokeball::after {
  content: ''; position: absolute; inset: 0; margin: auto;
  width: 11px; height: 11px; border-radius: 50%;
  background: #fff; border: 3px solid #0c0f14;
}
.sidebar__brand b { color: #fff; font-size: 17px; letter-spacing: -.2px; display: block; line-height: 1.1; }
.sidebar__brand span { font-size: 11px; color: #6f7a8a; text-transform: uppercase; letter-spacing: 1.5px; }

.nav-section { padding: 8px 14px; }
.nav-section__title {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.4px;
  color: #5b6675; padding: 14px 10px 6px;
}
.nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 11px;
  color: #aeb7c4; font-weight: 500; font-size: 14.5px;
  margin-bottom: 2px; transition: all .15s;
}
.nav-link i { font-size: 18px; width: 20px; text-align: center; }
.nav-link:hover { background: var(--sidebar-2); color: #fff; }
.nav-link.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-600));
  color: #fff;
  box-shadow: 0 6px 16px rgba(227,53,13,.35);
}
.nav-link .badge-count {
  margin-left: auto; background: rgba(255,255,255,.14);
  font-size: 11px; padding: 2px 8px; border-radius: 20px; font-weight: 700;
}
.nav-link.active .badge-count { background: rgba(0,0,0,.18); }

.sidebar__foot { margin-top: auto; padding: 14px; }
.user-chip {
  display: flex; align-items: center; gap: 11px;
  padding: 10px; border-radius: 13px; background: var(--sidebar-2);
}
.user-chip .avatar { width: 38px; height: 38px; font-size: 14px; }
.user-chip b { color: #fff; font-size: 13.5px; display: block; line-height: 1.15; }
.user-chip span { font-size: 11.5px; color: #7a8595; }

/* ---------------- Main ---------------- */
.main { flex: 1; margin-left: 264px; min-width: 0; }

.topbar {
  height: 68px; background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 16px;
  padding: 0 28px; position: sticky; top: 0; z-index: 30;
}
.topbar h1 { font-size: 19px; font-weight: 700; margin: 0; letter-spacing: -.3px; }
.topbar .sub { color: var(--muted); font-size: 13px; }
.topbar__spacer { flex: 1; }

.search-mini {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 12px; padding: 8px 14px; width: 280px; color: var(--muted);
}
.search-mini input { border: 0; background: transparent; outline: 0; width: 100%; font-size: 14px; color: var(--ink); }

.content { padding: 28px; max-width: 1320px; }

/* ---------------- Botões ---------------- */
.btn { border-radius: 11px; font-weight: 600; font-size: 14px; padding: 9px 16px; border: 1px solid transparent; }
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-600); color: #fff; }
.btn-ghost { background: var(--card); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--bg); }
.btn-soft { background: var(--brand-soft); color: var(--brand-600); }
.btn-gold { background: var(--gold); color: #5b4500; }
.btn-lg { padding: 12px 22px; font-size: 15px; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 9px; }

/* ---------------- Cards ---------------- */
.card-c {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--sh-sm);
}
.card-c__head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.card-c__head h3 { margin: 0; font-size: 16px; font-weight: 700; }
.card-c__body { padding: 22px; }

/* ---------------- Cabeçalho de página (padrão admin) ---------------- */
.page-hd { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-hd__icon { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; color: #fff; font-size: 24px; box-shadow: 0 10px 22px rgba(16,24,40,.16); flex-shrink: 0; }
.page-hd__txt { min-width: 0; }
.page-hd__txt h2 { margin: 0; font-size: 23px; font-weight: 800; letter-spacing: -.5px; }
.page-hd__txt p { margin: 3px 0 0; color: var(--muted); font-size: 14px; }
.page-hd__actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
@media (max-width: 640px) { .page-hd__actions { margin-left: 0; width: 100%; } }

/* ---------------- Dashboard hero ---------------- */
.dash-hero {
  position: relative; overflow: hidden; border-radius: var(--r-lg);
  padding: 30px 34px; margin-bottom: 24px; color: #fff;
  background:
    radial-gradient(600px 300px at 90% -40%, rgba(255,203,5,.35), transparent 60%),
    linear-gradient(120deg, #1c1230, #2a1714 75%);
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.dash-hero__word { position: absolute; right: -10px; top: 50%; transform: translateY(-50%); font-size: 150px; font-weight: 800; letter-spacing: -8px; color: #fff; opacity: .04; pointer-events: none; }
.dash-hero .avatar { width: 58px; height: 58px; font-size: 20px; border: 3px solid rgba(255,255,255,.2); }
.dash-hero h2 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.6px; position: relative; }
.dash-hero p { margin: 4px 0 0; color: #cfc8dd; font-size: 14.5px; position: relative; }
.dash-hero__actions { margin-left: auto; display: flex; gap: 10px; position: relative; z-index: 2; flex-wrap: wrap; }
.dash-hero__sprite { position: absolute; right: 220px; bottom: -8px; width: 76px; opacity: .9; image-rendering: pixelated; animation: floaty-a 5s ease-in-out infinite; }
@keyframes floaty-a { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-12px) } }
@media (max-width: 760px) { .dash-hero__sprite { display: none; } .dash-hero__actions { margin-left: 0; width: 100%; } }

/* ---------------- KPI ---------------- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; }
.kpi {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 22px; box-shadow: var(--sh-sm); position: relative; overflow: hidden;
  transition: transform .18s, box-shadow .18s;
}
.kpi::after { content: ''; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%; background: currentColor; opacity: .05; }
.kpi:hover { transform: translateY(-4px); box-shadow: var(--sh); }
.kpi__icon {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  color: #fff; font-size: 22px; margin-bottom: 16px; box-shadow: 0 8px 18px rgba(16,24,40,.14);
}
.kpi__value { font-size: 32px; font-weight: 800; letter-spacing: -1px; line-height: 1; }
.kpi__label { color: var(--muted); font-size: 13.5px; margin-top: 6px; font-weight: 500; }
.kpi__trend { font-size: 12px; font-weight: 700; margin-top: 10px; display: inline-flex; align-items: center; gap: 4px; }
.kpi__trend.up { color: #2f9e44; }
.kpi__trend.flat { color: var(--muted); }

.g1 { background: var(--g1); } .g2 { background: var(--g2); } .g3 { background: var(--g3); }
.g4 { background: var(--g4); } .g5 { background: var(--g5); } .g6 { background: var(--g6); }

/* ---------------- Avatar ---------------- */
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 15px;
  background-size: cover; background-position: center;
}

/* ---------------- Badges / chips ---------------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: 20px; font-size: 12.5px; font-weight: 600;
  background: var(--bg); color: var(--ink-2); border: 1px solid var(--line);
}
.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 8px; font-size: 12.5px; font-weight: 700; }
.status-badge i { font-size: 13px; }
.sb-secondary { background: #eef1f6; color: #5a6475; }
.sb-warning   { background: #fff4dd; color: #b27800; }
.sb-danger    { background: #fde8e3; color: var(--brand-600); }
.sb-info      { background: #e3f2fd; color: #1565c0; }
.sb-primary   { background: #e8eefe; color: #2440b3; }
.sb-success   { background: #e6f6ec; color: #1e7d3a; }
.sb-dark      { background: #e7e9ee; color: #3a4150; }

.cat-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

/* ---------------- Tabela ---------------- */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .6px;
  color: var(--muted); font-weight: 700; padding: 12px 16px; border-bottom: 1px solid var(--line);
}
.tbl td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr:hover td { background: #fafbfd; }
.tbl .title-cell { font-weight: 600; color: var(--ink); }
.tbl .title-cell small { display: block; color: var(--muted); font-weight: 400; font-size: 12.5px; margin-top: 2px; }

/* ---------------- Misc ---------------- */
.muted { color: var(--muted); }
.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); font-weight: 700; margin: 0 0 14px; }
.empty {
  text-align: center; padding: 48px 24px; color: var(--muted);
}
.empty i { font-size: 42px; opacity: .4; display: block; margin-bottom: 12px; }

/* listas de tarefas */
.task-item { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.task-item:last-child { border-bottom: 0; }
.task-item .t-title { font-weight: 600; font-size: 14.5px; }
.task-item .t-meta { color: var(--muted); font-size: 12.5px; }

/* barra de produção por categoria */
.bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.bar-row .lbl { width: 110px; font-size: 13px; font-weight: 600; flex-shrink: 0; }
.bar-track { flex: 1; height: 9px; background: var(--bg); border-radius: 20px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 20px; }
.bar-row .num { width: 28px; text-align: right; font-weight: 700; font-size: 13px; }

/* flash */
.flash { padding: 13px 18px; border-radius: 12px; font-weight: 600; font-size: 14px; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.flash-success { background: #e6f6ec; color: #1e7d3a; }
.flash-error   { background: #fde8e3; color: var(--brand-600); }
.flash-info    { background: #e3f2fd; color: #1565c0; }

/* filtros */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 20px; }
.filter-tab {
  padding: 8px 15px; border-radius: 10px; font-size: 13.5px; font-weight: 600;
  background: var(--card); border: 1px solid var(--line); color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 7px;
}
.filter-tab.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.filter-tab .cnt { font-size: 11px; background: rgba(0,0,0,.07); padding: 1px 7px; border-radius: 12px; }
.filter-tab.active .cnt { background: rgba(255,255,255,.2); }

/* forms */
.form-label { font-weight: 600; font-size: 13.5px; margin-bottom: 6px; color: var(--ink); }
.form-control, .form-select {
  border-radius: 11px; border: 1px solid var(--line); padding: 10px 14px; font-size: 14.5px;
}
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.form-hint { font-size: 12.5px; color: var(--muted); margin-top: 5px; }

/* mobile */
.sidebar-toggle { display: none; }
@media (max-width: 992px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .sidebar-toggle { display: inline-flex; }
  .search-mini { display: none; }
}
