/* ==========================================================================
   Processo Seletivo — Grupo Cisne
   Tema escuro, vermelho da marca como destaque. CSS puro, sem build step.
   ========================================================================== */

:root {
  --color-bg: #121214;
  --color-surface: #1b1b1f;
  --color-surface-2: #252429;
  --color-border: #34343a;

  --color-text: #f2f2f3;
  --color-text-muted: #9a9aa2;

  --color-primary: #7d1107;
  --color-primary-strong: #580c05;
  --color-primary-light: #e8a39b;
  --color-primary-soft: rgba(125, 17, 7, 0.15);

  --color-success: #2e7d32;
  --color-success-soft: rgba(46, 125, 50, 0.18);
  --color-danger: #cc0000;
  --color-danger-soft: rgba(204, 0, 0, 0.18);
  --color-warning: #b58105;
  --color-warning-soft: rgba(181, 129, 5, 0.18);

  --radius: 8px;
  --radius-sm: 4px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.4);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* -------------------------------------------------------------------- */
/* Reset & base                                                          */
/* -------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--color-primary-light);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4 {
  line-height: 1.25;
  margin: 0 0 0.5em;
}

p {
  margin: 0 0 1em;
}

.text-muted {
  color: var(--color-text-muted);
}

.text-center {
  text-align: center;
}

/* -------------------------------------------------------------------- */
/* Layout                                                                */
/* -------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}

.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main {
  flex: 1;
  padding: 24px 16px;
}

/* Topbar -------------------------------------------------------------- */

.topbar {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand:hover {
  text-decoration: none;
}

.brand-logo {
  height: 36px;
  width: auto;
}

/* Footer ---------------------------------------------------------------*/

.footer {
  border-top: 1px solid var(--color-border);
  padding: 16px;
  text-align: center;
}

.footer p {
  margin: 0;
  font-size: 0.875rem;
}

/* -------------------------------------------------------------------- */
/* Navegação (mobile-first, sem JS)                                      */
/* -------------------------------------------------------------------- */

.nav-toggle-input {
  display: none;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 36px;
  height: 36px;
  padding: 8px;
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.nav-toggle:hover {
  background: var(--color-surface-2);
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
}

.nav {
  display: none;
  width: 100%;
  flex-direction: column;
  gap: 4px;
  order: 3;
}

.nav-toggle-input:checked ~ .nav {
  display: flex;
}

.nav a,
.nav button.nav-link {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--color-text);
  text-align: left;
  background: none;
  border: none;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
}

.nav a:hover,
.nav button.nav-link:hover {
  background: var(--color-surface-2);
  text-decoration: none;
}

.nav a.active {
  background: var(--color-primary-soft);
  color: var(--color-primary-light);
}

.nav-section-title {
  margin-top: 8px;
  padding: 6px 12px 2px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }

  .nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    width: auto;
    order: 0;
    gap: 4px;
  }

  .nav a,
  .nav button.nav-link {
    width: auto;
  }

  .nav-section-title {
    display: none;
  }
}

/* -------------------------------------------------------------------- */
/* Botões                                                                */
/* -------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  font-size: 1rem;
  font-family: inherit;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-primary-strong);
}

.btn-secondary {
  background: var(--color-surface-2);
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-surface);
}

.btn-danger {
  background: transparent;
  color: var(--color-danger);
  border-color: var(--color-danger);
}

.btn-danger:hover {
  background: var(--color-danger-soft);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.875rem;
}

/* -------------------------------------------------------------------- */
/* Formulários                                                           */
/* -------------------------------------------------------------------- */

.field {
  margin-bottom: 16px;
}

label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

.field-hint {
  margin-top: 4px;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="search"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--color-text);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--color-primary-light);
  outline-offset: 1px;
}

textarea {
  min-height: 100px;
  resize: vertical;
}

.checkbox-field,
.radio-field {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.checkbox-field input,
.radio-field input {
  margin-top: 4px;
  width: auto;
}

.checkbox-field label,
.radio-field label {
  font-weight: 400;
  margin-bottom: 0;
}

.error-message {
  margin-top: 6px;
  font-size: 0.875rem;
  color: var(--color-danger);
}

fieldset {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 4px 16px 16px;
}

legend {
  padding: 0 6px;
  font-weight: 600;
}

fieldset .radio-field + .radio-field,
fieldset .checkbox-field + .checkbox-field {
  margin-top: 8px;
}

/* -------------------------------------------------------------------- */
/* Cards                                                                 */
/* -------------------------------------------------------------------- */

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.card-title {
  margin-top: 0;
}

/* -------------------------------------------------------------------- */
/* Alertas / mensagens                                                   */
/* -------------------------------------------------------------------- */

.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  border: 1px solid transparent;
}

.alert-success {
  background: var(--color-success-soft);
  border-color: var(--color-success);
  color: var(--color-text);
}

.alert-error {
  background: var(--color-danger-soft);
  border-color: var(--color-danger);
  color: var(--color-text);
}

.alert-warning {
  background: var(--color-warning-soft);
  border-color: var(--color-warning);
  color: var(--color-text);
}

/* -------------------------------------------------------------------- */
/* Badges (status do candidato, etc.)                                    */
/* -------------------------------------------------------------------- */

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--color-surface-2);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.badge-primary {
  background: var(--color-primary-soft);
  color: var(--color-primary-light);
  border-color: transparent;
}

.badge-success {
  background: var(--color-success-soft);
  color: #6fcf73;
  border-color: transparent;
}

.badge-warning {
  background: var(--color-warning-soft);
  color: #f0c14b;
  border-color: transparent;
}

/* -------------------------------------------------------------------- */
/* Tabelas                                                               */
/* -------------------------------------------------------------------- */

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

th {
  color: var(--color-text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* -------------------------------------------------------------------- */
/* Utilidades                                                            */
/* -------------------------------------------------------------------- */

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
