/* ==========================================================
   ADMIN UI PACK — TOPO PADRÃO (ALINHADO COM O TOPO DO CURSOS)
   - Mantém o pack, mas ajusta tipografia/spacing pra bater com o “Cursos”
   - Inclui subtitle opcional + ícone em botão ghost + cards pack
   ========================================================== */

:root{
  --ui-primary: #6366f1;
  --ui-primary-dark: #4f46e5;

  --ui-text: #0f172a;
  --ui-muted: #64748b;

  --ui-border: #e2e8f0;
  --ui-bg: #ffffff;
  --ui-page: #f1f5f9;

  /* sombra bem suave (modelo real) */
  --ui-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

@font-face{
  font-family:'Quicksand';
  src:url('../font/Quicksand-Regular.ttf') format('truetype');
  font-weight:400;
  font-style:normal;
}

@font-face{
  font-family:'Quicksand';
  src:url('../font/Quicksand-Medium.ttf') format('truetype');
  font-weight:500;
  font-style:normal;
}

@font-face{
  font-family:'Quicksand';
  src:url('../font/Quicksand-SemiBold.ttf') format('truetype');
  font-weight:600;
  font-style:normal;
}

@font-face{
  font-family:'Quicksand';
  src:url('../font/Quicksand-Bold.ttf') format('truetype');
  font-weight:700;
  font-style:normal;
}

body.admin-ui{
  background: var(--ui-page);
}

/* wrapper opcional */
.admin-wrap{
  margin: 0 40px 40px 40px;
  box-sizing: border-box;
}
@media (max-width: 900px){
  .admin-wrap{ margin: 20px; }
}

/* ==========================================================
   HEADER (ALINHADO AO TOPO DE CURSOS)
   ========================================================== */
.admin-header{
  background: var(--ui-bg);
  padding: 28px 34px;               /* mais “ar” como no Cursos */
  border-radius: 24px;
  box-shadow: var(--ui-shadow);

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;

  border: 1px solid #eef2ff;        /* sem barra inferior rígida */
  /* border-bottom: 4px solid var(--ui-primary);  <- removido p/ ficar igual Cursos */
}

/* lado esquerdo */
.admin-header__info h1{
  margin: 0;
  font-size: 2.2rem;                /* alinhado ao visual do Cursos */
  font-weight: 700;                 /* título forte como no Cursos */
  color: var(--ui-text);
  letter-spacing: -0.6px;
}

/* subtitle opcional (ex.: “Gerencie seus cursos”) */
.admin-header__subtitle{
  margin-top: 6px;
  color: var(--ui-muted);
  font-weight: 600;
  font-size: 0.95rem;
}

/* label opcional (mantém padrão do pack) */
.admin-header__label{
  display: inline-flex;
  align-items: center;
  gap: 10px;

  margin-top: 12px;

  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;

  padding: 8px 14px;
  border-radius: 12px;

  font-size: 0.9rem;
  font-weight: 700;
}

.admin-header__label .material-symbols-rounded{
  font-size: 18px;
  font-variation-settings: 'FILL' 1;
  color: #64748b;
}

/* lado direito */
.admin-actions{
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* ==========================================================
   BOTÕES (ALINHADO AO TOPO DE CURSOS)
   ========================================================== */
.ui-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  height: 42px;                     /* um tiquinho mais “compact” igual Cursos */
  padding: 0 18px;

  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  user-select: none;

  border: 1px solid transparent;

  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease, opacity .15s ease;
}

.ui-btn:hover{
  transform: translateY(-1px);
}

.ui-btn:focus{
  outline: none;
  box-shadow: 0 0 0 4px rgba(99,102,241,0.18);
}

/* ícone no ghost (ex.: “Filtros”) */
.ui-btn__icon{
  font-size: 18px;
  line-height: 1;
  opacity: .85;
}

/* GHOST (igual ao “Filtros” do Cursos) */
.ui-btn--ghost{
  background: #fff;
  border-color: #cbd5e1;
  color: #334155;
}

.ui-btn--ghost:hover{
  border-color: #b6c2d1;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

/* PRIMÁRIO (igual ao “+ Novo Curso”) */
.ui-btn--primary{
  background: linear-gradient(135deg, var(--ui-primary) 0%, var(--ui-primary-dark) 100%);
  color: #fff;
  border-color: transparent;

  padding: 0 20px;

  /* mantém o vibe pill sem forçar uppercase (Cursos não é full uppercase) */
  text-transform: none;
  letter-spacing: 0;

  box-shadow: 0 14px 28px rgba(99,102,241,0.22);
}

.ui-btn--primary:hover{
  box-shadow: 0 18px 34px rgba(99,102,241,0.28);
}

/* DANGER — útil pra botões “Excluir” padronizados no header */
.ui-btn--danger{
  background: #ef4444;
  color: #fff;
  border-color: transparent;
  box-shadow: 0 14px 28px rgba(239,68,68,0.18);
  text-transform: none;
  letter-spacing: 0;
}
.ui-btn--danger:hover{
  box-shadow: 0 18px 34px rgba(239,68,68,0.22);
}

/* bolinha do + (só aparece quando você usar no template do header para primary) */
.ui-btn__bubble{
  width: 28px;
  height: 28px;
  border-radius: 999px;

  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.28);

  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ui-btn__bubble .material-symbols-rounded{
  font-size: 18px;
  color: #fff;
  font-variation-settings: 'FILL' 1;
}

/* responsivo */
@media (max-width: 900px){
  .admin-header{
    flex-direction: column;
    align-items: flex-start;
  }
  .admin-actions{
    width: 100%;
    justify-content: flex-start;
  }
  .ui-btn{
    width: 100%;
  }
}

/* garante que o Material Symbols renderize como ícone (evita aparecer "auto_stories") */
.material-symbols-rounded{
  font-family: 'Material Symbols Rounded';
  font-weight: 400;
  font-style: normal;
  display: inline-block;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================
   ADMIN CARDS PACK — PADRÃO DE LISTAS (BASEADO EM CURSOS)
   - grid de cards
   - card base
   - header (badge + ações redondas)
   - tags/meta
   - footer actions-grid (3 colunas)
   ========================================================== */

/* container padrão de páginas com cards */
.admin-cards-wrap{
  margin: 0 40px 40px 40px;
  box-sizing: border-box;
}
@media (max-width: 900px){
  .admin-cards-wrap{ margin: 20px; }
}

/* grid responsivo */
.admin-cards-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 25px;
}

/* card base */
.admin-card{
  background: var(--ui-bg);
  border-radius: 24px;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  display: flex;
  flex-direction: column;

  border: 1px solid transparent;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.04);
}

.admin-card:hover{
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  border-color: #e2e8f0;
}

/* header do card */
.admin-card__top{
  padding: 20px 20px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

/* badge (ex: Unidade) */
.admin-card__badge{
  background: #eff6ff;
  color: #3b82f6;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ações redondas no topo (status/duplicar etc) */
.admin-card__top-actions{
  display:flex;
  align-items:center;
  gap:10px;
}

.admin-pill-action{
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-weight: 600;
  box-shadow: 0 8px 18px rgba(0,0,0,0.06);
  text-decoration: none;

  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
  border: 1px solid rgba(0,0,0,0.02);
}
.admin-pill-action:hover{
  transform: scale(1.06);
  box-shadow: 0 14px 26px rgba(0,0,0,0.10);
}
.admin-pill-action .material-symbols-rounded{ font-size: 20px; }

/* variações de pill */
.pill-success{ background: #dcfce7; color: #15803d; }
.pill-danger { background: #fee2e2; color: #b91c1c; }
.pill-purple { background: #ede9fe; color:#7c3aed; }
.pill-neutral{ background: #f1f5f9; color:#475569; }

.pill-purple:hover{ filter: brightness(.95); }
.pill-success:hover{ filter: brightness(.98); }
.pill-danger:hover{ filter: brightness(.98); }

/* título do card */
.admin-card__title{
  font-size: 1.3rem;
  font-weight: 700;
  color: #1e293b;
  margin: 10px 0;
  padding: 0 20px;
  line-height: 1.25;
}

/* meta tags */
.admin-card__meta{
  padding: 0 20px 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-meta-tag{
  background: #f8fafc;
  color: #64748b;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #f1f5f9;
}

.admin-meta-tag .material-symbols-rounded{
  font-size: 16px;
  line-height: 1;
}

/* footer do card (actions) */
.admin-card__footer{
  background: #f8fafc;
  padding: 16px 20px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: center;
}

.admin-actions-grid{
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

@media (max-width: 420px){
  .admin-actions-grid{ grid-template-columns: repeat(2, 1fr); }
}

/* botão de ação quadradinho/soft */
.admin-action-btn{
  width: 100%;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
  border: 1px solid rgba(0,0,0,0.02);
}
.admin-action-btn:hover{
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
}
.admin-action-btn .material-symbols-rounded{ font-size: 20px; }

/* variações de cor (reaproveitáveis no admin inteiro) */
.btn-soft-blue   { background: #e0f2fe; color: #0284c7; }
.btn-soft-green  { background: #dcfce7; color: #16a34a; }
.btn-soft-purple { background: #ede9fe; color: #7c3aed; }
.btn-soft-cyan   { background: #ecfeff; color: #0891b2; }
.btn-soft-indigo { background: #eef2ff; color: #4f46e5; }
.btn-soft-red    { background: #fee2e2; color: #dc2626; }
.btn-soft-amber  { background: #fffbeb; color: #b45309; }
.btn-soft-slate  { background: #f1f5f9; color: #475569; }

/* hover com inversão leve (mantém o “premium”) */
.btn-soft-blue:hover   { filter: brightness(.92); }
.btn-soft-green:hover  { filter: brightness(.92); }
.btn-soft-purple:hover { filter: brightness(.92); }
.btn-soft-cyan:hover   { filter: brightness(.92); }
.btn-soft-indigo:hover { filter: brightness(.92); }
.btn-soft-red:hover    { filter: brightness(.92); }
.btn-soft-amber:hover  { filter: brightness(.92); }
.btn-soft-slate:hover  { filter: brightness(.95); }

/* estado vazio padrão */
.admin-empty-state{
  grid-column: 1/-1;
  text-align: center;
  padding: 90px 30px;
  color: #94a3b8;
  background: #fff;
  border-radius: 24px;
  border: 1px dashed #e2e8f0;
}
.admin-empty-state .material-symbols-rounded{
  font-size: 60px;
  opacity: .25;
  display: inline-block;
}
.admin-empty-state p{
  font-weight: 700;
  font-size: 1.05rem;
  margin-top: 12px;
}
/* ==========================================================
   AJUSTE FINO — MAIS RESPIRO ENTRE CARDS (~5mm)
   ========================================================== */

.admin-cards-grid{
  gap: 32px; /* antes: 25px */
}

/* opcional: dá um respiro extra do topo para o grid */
.admin-cards-wrap{
  margin-top: 6px;
}

/* respiro interno do topo do card (badge + ações) */
.admin-card__top{
  padding: 22px 22px 12px; /* antes: 20px 20px 10px */
}

/* respiro do título */
.admin-card__title{
  margin: 12px 0;
  padding: 0 22px;
}

/* respiro da área de meta */
.admin-card__meta{
  padding: 0 22px 22px;
}

/* respiro do footer */
.admin-card__footer{
  padding: 18px 22px;
}
/* ==========================================================
   FIX — HEADER ENCAVALANDO NO GRID
   (coloque no FINAL do admin-ui-pack.css)
   ========================================================== */

/* garante que o header “ocupa espaço” e não sobrepõe */
.admin-header{
  position: relative;
  z-index: 2;
  margin-bottom: 22px; /* ~5mm */
}

/* o wrapper da área de cards sempre começa “abaixo” do header */
.admin-cards-wrap{
  position: relative;
  z-index: 1;
  margin-top: 0 !important;
  padding-top: 6px; /* respiro extra */
}

/* se o grid vier direto depois do header (sem wrap), ainda assim dá respiro */
.admin-header + .admin-cards-grid,
.admin-header + .courses-grid,
.page-header + .admin-cards-grid,
.page-header + .courses-grid{
  margin-top: 22px;
}

/* aumenta o gap entre cards (horizontal e vertical) */
.admin-cards-grid{
  gap: 32px;
}
/* ==========================================================
   HEADER — label sem box (azul da plataforma, sem bold)
   ========================================================== */

.admin-header__label{
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin-top: 10px;

  color: var(--ui-primary) !important;
  font-weight: 500; /* sem bold */
  font-size: 0.95rem;
  border-radius: 0 !important;
}

.admin-header__label .material-symbols-rounded{
  color: var(--ui-primary) !important;
  font-variation-settings: 'FILL' 0;
  font-size: 18px;
}
/* Label do topo (ex: nome do curso) — PILL soft no azul da plataforma */
.admin-header__label{
  background: #eef2ff !important;
  border: 1px solid rgba(99,102,241,0.18) !important;
  color: var(--ui-primary) !important;
  font-weight: 600 !important;
}

.admin-header__label .material-symbols-rounded{
  color: var(--ui-primary) !important;
}
/* LABEL DO CURSO (TOP) — COM BOX estilo "Button 1" */
body.admin-ui .admin-header__label,
body.admin-ui .course-label{
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;

  background: #eef2ff !important;           /* soft azul (button 1) */
  border: 1px solid #e0e7ff !important;
  color: var(--ui-primary) !important;

  padding: 8px 14px !important;
  border-radius: 999px !important;

  font-size: .88rem !important;
  font-weight: 500 !important;              /* sem bold */
  line-height: 1 !important;
  box-shadow: none !important;
}

/* ícone azul e levinho */
body.admin-ui .admin-header__label .material-symbols-rounded,
body.admin-ui .course-label .material-symbols-rounded{
  color: var(--ui-primary) !important;
  font-size: 18px !important;
  font-variation-settings: 'FILL' 0 !important;
}

/* ==========================================================
   HEADER TYPOGRAPHY OVERRIDES
   ========================================================== */
body.admin-ui .admin-header,
body.admin-ui .admin-actions,
body.admin-ui .admin-header .ui-btn,
body.admin-ui .admin-header__info h1,
body.admin-ui .admin-header__subtitle,
body.admin-ui .admin-header__label{
  font-family: 'Quicksand', sans-serif !important;
}

body.admin-ui .admin-header__info h1{
  font-weight: 700 !important;
}

body.admin-ui .admin-header__subtitle{
  font-weight: 500 !important;
}

body.admin-ui .admin-header__label{
  font-weight: 600 !important;
}

body.admin-ui .admin-header .ui-btn{
  font-weight: 600 !important;
}

body.admin-ui .admin-header .ui-btn__bubble{
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
}
