/* =============================================================================
   Axians Events — Tema visual
   Derivado das guidelines Axians Product & Services Branding.
   Paleta: navy #0D1641 · magenta #FF005B · azul #0169B4 / #00BBFC · dark #04018D
   Estilo: clean, minimalista, cartões, cantos suaves, gradientes energéticos.
   ============================================================================= */

:root {
  /* Cores da marca */
  --navy:        #0D1641;
  --navy-2:      #04018D;
  --magenta:     #FF005B;
  --magenta-2:   #AA0469;
  --blue:        #0169B4;
  --blue-2:      #00BBFC;

  /* Gradientes oficiais */
  --grad-pink:   linear-gradient(135deg, #FF005B 0%, #AA0469 100%);
  --grad-blue:   linear-gradient(135deg, #00BBFC 0%, #0169B4 100%);
  --grad-dark:   linear-gradient(135deg, #0D1641 0%, #04018D 100%);
  --grad-brand:  linear-gradient(120deg, #0169B4 0%, #7d1585 55%, #FF005B 100%);

  /* Neutros */
  --ink:         #0D1641;
  --muted:       #5b6580;
  --line:        #e7e9f0;
  --surface:     #ffffff;
  --canvas:      #f5f6fa;
  --canvas-2:    #eef0f6;

  /* Sistema */
  --radius:      16px;
  --radius-sm:   10px;
  --shadow:      0 1px 2px rgba(13,22,65,.04), 0 8px 24px rgba(13,22,65,.06);
  --shadow-lg:   0 12px 40px rgba(13,22,65,.12);
  --sidebar-w:   264px;

  --font-sans:   "Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { color: var(--navy); font-weight: 700; letter-spacing: -.01em; }

/* ---- Marca / logótipo simplificado (formas Axians) ------------------------ */
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.brand__mark {
  width: 30px; height: 30px; flex: 0 0 30px; position: relative;
}
.brand__mark::before,
.brand__mark::after {
  content: ""; position: absolute; border-radius: 50% 50% 50% 0;
}
.brand__mark::before {
  width: 18px; height: 18px; left: 0; top: 6px;
  background: var(--grad-blue); transform: rotate(-45deg);
}
.brand__mark::after {
  width: 20px; height: 20px; right: 0; bottom: 0;
  background: var(--grad-pink); border-radius: 50%;
  mix-blend-mode: multiply;
}
.brand__name { color: var(--navy); font-size: 1.15rem; letter-spacing: -.02em; }
.brand__name b { color: var(--magenta); }

/* =============================================================================
   Layout autenticado (sidebar + conteúdo)
   ============================================================================= */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
  background: var(--navy);
  background-image: radial-gradient(120% 60% at 0% 0%, rgba(1,105,180,.35), transparent 60%);
  color: #cfd6ec; padding: 22px 16px; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 8px;
}
.sidebar .brand__name { color: #fff; }
.sidebar__section {
  text-transform: uppercase; font-size: .68rem; letter-spacing: .12em;
  color: #6f7aa5; margin: 18px 12px 6px;
}
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: var(--radius-sm); color: #c3cbe6; font-weight: 500;
  text-decoration: none; transition: background .15s, color .15s;
}
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.active { background: var(--grad-pink); color: #fff; }
.nav a .bi { font-size: 1.05rem; }
.sidebar__foot { margin-top: auto; border-top: 1px solid rgba(255,255,255,.08); padding-top: 14px; }
.sidebar__user { font-size: .85rem; color: #aeb7d6; padding: 0 12px 10px; }
.sidebar__user strong { color: #fff; display: block; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 68px; background: var(--surface); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; position: sticky; top: 0; z-index: 20;
}
.topbar h1 { font-size: 1.25rem; margin: 0; }
.content { padding: 28px; max-width: 1180px; width: 100%; }

/* Botão de menu (mobile) */
.menu-toggle { display: none; background: none; border: 0; font-size: 1.4rem; color: var(--navy); }

/* =============================================================================
   Componentes
   ============================================================================= */

/* Cartões */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px;
}
.card + .card { margin-top: 18px; }
.card__title { font-size: 1rem; margin: 0 0 14px; }

.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Cartões de estatística */
.stat {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px;
  position: relative; overflow: hidden;
}
.stat::after {
  content: ""; position: absolute; right: -20px; top: -20px;
  width: 90px; height: 90px; border-radius: 50%; opacity: .12;
}
.stat--pink::after { background: var(--grad-pink); }
.stat--blue::after { background: var(--grad-blue); }
.stat--dark::after { background: var(--grad-dark); }
.stat--mix::after { background: var(--grad-brand); }
.stat__label { color: var(--muted); font-size: .82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat__value { font-size: 2.2rem; font-weight: 800; color: var(--navy); line-height: 1.1; margin-top: 6px; }
.stat__icon {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  color: #fff; font-size: 1.1rem; margin-bottom: 12px;
}
.stat__icon.pink { background: var(--grad-pink); }
.stat__icon.blue { background: var(--grad-blue); }
.stat__icon.dark { background: var(--grad-dark); }
.stat__icon.mix  { background: var(--grad-brand); }

/* Botões */
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 10px 18px; font-weight: 600; font-size: .92rem; font-family: inherit;
  transition: transform .06s ease, box-shadow .15s, background .15s, opacity .15s;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--grad-pink); color: #fff; box-shadow: 0 6px 16px rgba(255,0,91,.28); }
.btn--primary:hover { color: #fff; box-shadow: 0 8px 22px rgba(255,0,91,.36); }
.btn--dark { background: var(--navy); color: #fff; }
.btn--dark:hover { color:#fff; background:#131d54; }
.btn--blue { background: var(--grad-blue); color:#fff; }
.btn--blue:hover { color:#fff; }
.btn--ghost { background: var(--surface); color: var(--navy); border-color: var(--line); }
.btn--ghost:hover { background: var(--canvas-2); color: var(--navy); }
.btn--wa { background:#25D366; color:#fff; }
.btn--wa:hover { color:#fff; background:#1eb959; }
.btn--sm { padding: 7px 12px; font-size: .82rem; }
.btn--block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Badges de estado */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: 999px; font-size: .76rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .03em;
}
.badge--open { background: rgba(0,187,252,.14); color: var(--blue); }
.badge--closed { background: rgba(13,22,65,.08); color: var(--navy); }
.badge--completed { background: rgba(255,0,91,.12); color: var(--magenta); }
.badge--soft { background: var(--canvas-2); color: var(--muted); }

/* Tabelas modernas */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); }
table.data { width: 100%; border-collapse: collapse; background: var(--surface); }
table.data th, table.data td { padding: 13px 16px; text-align: left; font-size: .9rem; }
table.data thead th {
  background: var(--canvas); color: var(--muted); font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; font-size: .74rem;
  border-bottom: 1px solid var(--line);
}
table.data tbody tr { border-bottom: 1px solid var(--line); }
table.data tbody tr:last-child { border-bottom: 0; }
table.data tbody tr:hover { background: var(--canvas); }

/* Formulários */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; color: var(--navy); }
.field .hint { color: var(--muted); font-size: .8rem; margin-top: 4px; }
.input, .select, .textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); font-family: inherit; font-size: .95rem;
  color: var(--ink); background: var(--surface); transition: border .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(1,105,180,.15);
}
.textarea { min-height: 110px; resize: vertical; }
.check { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
.check input { width: 18px; height: 18px; accent-color: var(--magenta); }

/* Grupo de opções tipo "pill" (radio elegante) */
.choices { display: flex; gap: 10px; flex-wrap: wrap; }
.choice {
  position: relative; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 18px; cursor: pointer; font-weight: 600; color: var(--muted);
  transition: all .15s; background: var(--surface);
}
.choice input { position: absolute; opacity: 0; }
.choice:has(input:checked) {
  border-color: var(--magenta); color: var(--magenta);
  background: rgba(255,0,91,.05); box-shadow: 0 0 0 3px rgba(255,0,91,.1);
}

/* Mensagens flash */
.flashes { position: fixed; top: 16px; right: 16px; z-index: 100; display: flex; flex-direction: column; gap: 10px; max-width: 360px; }
.flash {
  padding: 13px 16px; border-radius: var(--radius-sm); color: #fff;
  box-shadow: var(--shadow-lg); font-weight: 600; font-size: .9rem;
  display: flex; align-items: center; gap: 10px; animation: slideIn .25s ease;
}
.flash--success { background: linear-gradient(135deg, #0169B4, #00BBFC); }
.flash--error { background: var(--grad-pink); }
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }

/* Cartões de evento */
.event-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column;
  transition: transform .12s, box-shadow .15s;
}
.event-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); text-decoration: none; }
.event-card__band { height: 8px; background: var(--grad-brand); }
.event-card__body { padding: 18px 20px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.event-card__title { margin: 0; font-size: 1.1rem; }
.event-card__meta { color: var(--muted); font-size: .86rem; display: flex; flex-direction: column; gap: 5px; }
.event-card__meta span { display: flex; align-items: center; gap: 8px; }
.event-card__foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.slots { font-size: .82rem; color: var(--muted); font-weight: 600; }
.slots b { color: var(--navy); }

/* Escala 0-10 */
.scale { display: flex; gap: 6px; flex-wrap: wrap; }
.scale label {
  width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--line); border-radius: 10px; font-weight: 700; color: var(--muted);
  transition: all .12s;
}
.scale input { position: absolute; opacity: 0; }
.scale label:hover { border-color: var(--blue); }
.scale label:has(input:checked) { background: var(--grad-blue); color: #fff; border-color: transparent; }

/* Utilitários */
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; gap: 16px; flex-wrap: wrap; }
.page-head p { color: var(--muted); margin: 4px 0 0; }
.muted { color: var(--muted); }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 10px; } .mt-2 { margin-top: 20px; }
.mb-0 { margin-bottom: 0; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.text-right { text-align: right; }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .bi { font-size: 2.4rem; color: var(--canvas-2); display: block; margin-bottom: 10px; }
.divider { height: 1px; background: var(--line); margin: 18px 0; border: 0; }
.chart-box { position: relative; height: 280px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.toolbar .input { max-width: 280px; }

/* =============================================================================
   Layout de autenticação (login / registo)
   ============================================================================= */
.auth {
  min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr;
}
.auth__aside {
  background: var(--navy); background-image: var(--grad-dark);
  position: relative; overflow: hidden; color: #fff;
  display: flex; flex-direction: column; justify-content: space-between; padding: 44px;
}
.auth__aside::before, .auth__aside::after {
  content: ""; position: absolute; border-radius: 50%;
}
.auth__aside::before { width: 340px; height: 340px; background: var(--grad-pink); right: -80px; top: -60px; opacity: .85; filter: blur(2px); border-radius: 50% 50% 50% 0; }
.auth__aside::after { width: 260px; height: 260px; background: var(--grad-blue); left: -70px; bottom: -60px; opacity: .8; }
.auth__aside .brand__name { color: #fff; position: relative; z-index: 2; }
.auth__tag { position: relative; z-index: 2; }
.auth__tag h2 { color: #fff; font-size: 2.1rem; line-height: 1.15; margin: 0 0 12px; }
.auth__tag p { color: #b9c2e6; max-width: 380px; }
.auth__form { display: grid; place-items: center; padding: 40px; }
.auth__form-inner { width: 100%; max-width: 380px; }
.auth__form h1 { font-size: 1.6rem; margin: 0 0 4px; }
.auth__form .sub { color: var(--muted); margin: 0 0 26px; }
.auth__alt { text-align: center; margin-top: 20px; color: var(--muted); font-size: .9rem; }

/* =============================================================================
   Responsivo
   ============================================================================= */
@media (max-width: 900px) {
  .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .grid.cols-3 { grid-template-columns: 1fr; }
  .grid.cols-2 { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth__aside { display: none; }
}
@media (max-width: 760px) {
  .sidebar {
    position: fixed; left: 0; top: 0; z-index: 60; transform: translateX(-100%);
    transition: transform .2s ease;
  }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .menu-toggle { display: block; }
  .content { padding: 18px; }
  .grid.cols-4 { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
