/* ══════════════════════════════════════════════════════════════
   Tempus Track — Brand CSS
   Cores: #093759 (primária) · #FF7F00 (acento/CTA)
   Fontes: Oscine (títulos) · Avenir Next LT Pro / system-ui (corpo)
   ══════════════════════════════════════════════════════════════ */

/* ── @font-face: Oscine ─────────────────────────────────────── */
@font-face {
  font-family: "Oscine";
  src: url("../fonts/Oscine-Regular.woff2") format("woff2"),
       url("../fonts/Oscine-Regular.woff")  format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Oscine";
  src: url("../fonts/Oscine-Bold.woff2") format("woff2"),
       url("../fonts/Oscine-Bold.woff")  format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ── Variáveis CSS ──────────────────────────────────────────── */
:root {
  --tempus-primary:      #093759;
  --tempus-primary-dark: #072845;
  --tempus-primary-mid:  #0B4772;
  --tempus-accent:       #FF7F00;
  --tempus-accent-hover: #e67200;
  --tempus-gray-dark:    #555555;
  --tempus-gray-light:   #AAAAAA;
  --tempus-bg:           #f4f7fa;
  --tempus-white:        #ffffff;

  --font-display: "Oscine", "Avenir LT Std 65 Medium", sans-serif;
  --font-body:    "Avenir Next LT Pro", system-ui, -apple-system,
                  "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.10);
  --shadow-xl: 0 16px 40px rgba(0,0,0,0.12);
}

/* ── Reset / Base ────────────────────────────────────────────── */
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  background-color: var(--tempus-bg);
  color: #1a2a3a;
}

h1, h2, h3, h4, h5, h6,
.font-display {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--tempus-primary);
  line-height: 1.25;
}

/* ── Navbar ──────────────────────────────────────────────────── */
.navbar-tempus {
  background-color: var(--tempus-primary) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.navbar-tempus .navbar-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--tempus-white) !important;
  letter-spacing: 0.02em;
}
.navbar-tempus .navbar-brand span {
  color: var(--tempus-accent);
}

/* ── Logo (imagem) na navbar ──────────────────────────────────── */
.navbar-brand .logo-plate {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border-radius: 8px;
  padding: 5px 12px;
}
.navbar-brand .logo-plate img {
  height: 26px;
  width: auto;
  display: block;
}
.navbar-tempus .nav-link {
  color: rgba(255,255,255,0.88) !important;
  font-size: 0.9rem;
  transition: color 150ms ease;
}
.navbar-tempus .nav-link:hover {
  color: var(--tempus-accent) !important;
}
.navbar-tempus .navbar-toggler-icon {
  filter: invert(1);
}

/* No mobile (navbar colapsada), centraliza a marca e fixa o botão à direita */
@media (max-width: 991.98px) {
  .navbar-tempus .container,
  .navbar-tempus .container-fluid {
    position: relative;
  }
  .navbar-tempus .navbar-brand {
    width: 100%;
    margin: 0;
    text-align: center;
  }
  .navbar-tempus .navbar-toggler {
    position: absolute;
    top: 0.1rem;
    right: 0.5rem;
    z-index: 1031;
  }
}

/* Logo centralizado também no desktop (navbars marcadas com .navbar-logo-center) */
.navbar-logo-center > .container,
.navbar-logo-center > .container-fluid {
  position: relative;
}
@media (min-width: 992px) {
  .navbar-logo-center .navbar-brand {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
  }
}

/* ── Botões ──────────────────────────────────────────────────── */
.btn-tempus-primary {
  background-color: var(--tempus-accent);
  color: var(--tempus-white);
  border: none;
  border-radius: var(--radius-md);
  padding: 10px 24px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}
.btn-tempus-primary:hover {
  background-color: var(--tempus-accent-hover);
  color: var(--tempus-white);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255,127,0,0.30);
}
.btn-tempus-primary:active {
  transform: translateY(0);
}

.btn-tempus-secondary {
  background-color: transparent;
  color: var(--tempus-primary);
  border: 2px solid var(--tempus-primary);
  border-radius: var(--radius-md);
  padding: 8px 22px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 150ms ease;
}
.btn-tempus-secondary:hover {
  background-color: var(--tempus-primary);
  color: var(--tempus-white);
}

/* ── Cards ───────────────────────────────────────────────────── */
.card-tempus {
  background: var(--tempus-white);
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: box-shadow 200ms ease, transform 200ms ease;
}
.card-tempus:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.card-tempus .card-header {
  background-color: var(--tempus-primary);
  color: var(--tempus-white);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  font-family: var(--font-display);
  font-weight: 700;
  padding: 14px 20px;
}

/* ── Badges de status ────────────────────────────────────────── */
.badge-rascunho  { background-color: var(--tempus-gray-light); color: #333; }
.badge-publicado { background-color: #28a745; color: #fff; }
.badge-encerrado { background-color: var(--tempus-gray-dark);  color: #fff; }

/* ── Inputs ──────────────────────────────────────────────────── */
.form-control:focus,
.form-select:focus {
  border-color: var(--tempus-primary);
  box-shadow: 0 0 0 3px rgba(9,55,89,0.12);
}

/* ── Radar / resultado ───────────────────────────────────────── */
/* O dimensionamento do radar público é controlado por .radar-wrap em
   resultado.html. A página admin define seu próprio #radarChart inline. */
.nivel-badge {
  display: inline-block;
  background-color: var(--tempus-accent);
  color: var(--tempus-white);
  font-weight: 700;
  border-radius: var(--radius-md);
  padding: 4px 14px;
  font-size: 1.1rem;
}
.media-geral-box {
  background: var(--tempus-primary);
  color: var(--tempus-white);
  border-radius: var(--radius-lg);
  padding: 20px 32px;
  text-align: center;
}
.media-geral-box .valor {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--tempus-accent);
}

/* ── Feedback card ───────────────────────────────────────────── */
.feedback-card {
  border-left: 4px solid var(--tempus-accent);
  background: var(--tempus-white);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 16px 20px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 150ms ease;
}
.feedback-card:hover {
  box-shadow: var(--shadow-md);
}
.feedback-card .grupo-nome {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--tempus-primary);
  font-size: 0.95rem;
}

/* ── Seção de perguntas ──────────────────────────────────────── */
.grupo-section {
  border-top: 3px solid var(--tempus-accent);
  background: var(--tempus-white);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: 24px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}
.grupo-section h5 {
  font-family: var(--font-display);
  color: var(--tempus-primary);
}
.opcao-item {
  border: 1px solid #dee2e6;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease;
}
.opcao-item:hover {
  border-color: var(--tempus-primary);
  background-color: rgba(9,55,89,0.04);
}
.opcao-item input[type="radio"]:checked + label {
  font-weight: 600;
  color: var(--tempus-primary);
}
.form-check-input:checked {
  background-color: var(--tempus-primary);
  border-color: var(--tempus-primary);
}

/* ── Admin: builder de testes ────────────────────────────────── */
.grupo-builder {
  border: 1px solid #dee2e6;
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  background: var(--tempus-white);
  box-shadow: var(--shadow-sm);
}
.grupo-builder .grupo-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.pergunta-row {
  border: 1px solid #e9ecef;
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 10px;
  background: #fafbfc;
}
.drag-handle {
  cursor: grab;
  color: var(--tempus-gray-light);
  font-size: 1.2rem;
}
.drag-handle:active {
  cursor: grabbing;
}

/* ── Utilities ───────────────────────────────────────────────── */
.text-accent    { color: var(--tempus-accent) !important; }
.text-primary-t { color: var(--tempus-primary) !important; }
.bg-primary-t   { background-color: var(--tempus-primary) !important; }
.bg-accent      { background-color: var(--tempus-accent) !important; }
.border-accent  { border-color: var(--tempus-accent) !important; }

.divider-accent {
  border: none;
  border-top: 2px solid var(--tempus-accent);
  margin: 24px 0;
}

/* ── Footer ──────────────────────────────────────────────────── */
.footer-tempus {
  background-color: var(--tempus-primary);
  color: rgba(255,255,255,0.65);
  font-size: 0.82rem;
  padding: 16px 0;
  text-align: center;
  margin-top: auto;
}
.footer-tempus a {
  color: var(--tempus-accent);
  text-decoration: none;
}

/* ── Login page ──────────────────────────────────────────────── */
.login-card {
  max-width: 420px;
  margin: 80px auto;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}
.login-card .login-header {
  background: linear-gradient(135deg, var(--tempus-primary) 0%, #0B4772 100%);
  padding: 36px 32px 28px;
  text-align: center;
  color: var(--tempus-white);
}
.login-card .login-header h1 {
  font-family: var(--font-display);
  color: var(--tempus-white);
  font-size: 1.6rem;
  margin-bottom: 4px;
}
.login-card .login-header p {
  color: rgba(255,255,255,0.70);
  font-size: 0.88rem;
  margin: 0;
}
.login-card .card-body {
  padding: 32px;
  background: var(--tempus-white);
}

/* ── Dashboard stats ─────────────────────────────────────────── */
.stat-card {
  background: var(--tempus-white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  text-align: center;
}
.stat-card .stat-value {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--tempus-accent);
}
.stat-card .stat-label {
  font-size: 0.85rem;
  color: var(--tempus-gray-dark);
  margin-top: 4px;
}

/* ── Admin: botões de ação (ícones) ──────────────────────────── */
.admin-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}
.admin-actions .btn,
.btn-action {
  --bs-btn-padding-x: 0;
  --bs-btn-padding-y: 0;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  font-size: 1rem;
  line-height: 1;
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}
.admin-actions .btn:hover,
.btn-action:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.admin-actions .btn > i { line-height: 1; }

/* Botões de ação que mostram texto (ex.: card de testes) podem crescer */
.admin-actions .btn-labeled {
  width: auto;
  padding: 0 14px;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 600;
}

/* ── Responsive tweaks ───────────────────────────────────────── */
@media (max-width: 767.98px) {
  .media-geral-box .valor { font-size: 2.2rem; }
  .login-card { margin: 32px auto; }
}
