/* ==========================================================================
   Skill Bridge Mozambique — Light & Minimalist Admin & Portal CSS
   ========================================================================== */

.tabular {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.btn-teal {
  background-color: var(--teal);
  color: #FFFFFF;
  border-color: var(--teal);
}
.btn-teal:hover {
  background-color: var(--teal-dark);
  border-color: var(--teal-dark);
}

.btn-spark {
  background-color: var(--amber);
  color: #FFFFFF;
  border-color: var(--amber);
}

.field {
  margin-bottom: 1rem;
}
.field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}
.field .hint {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  color: var(--text-primary);
  background: var(--bg-main);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--teal);
}
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
  border-color: var(--teal);
}
.error-msg {
  display: none;
  font-size: 0.75rem;
  color: var(--danger);
  margin-top: 0.25rem;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--text-primary);
  display: block;
  line-height: 1.1;
}
.brand-name span {
  color: var(--teal);
}
.brand-country {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  display: block;
}

.job-ref {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.2rem 0.5rem;
  background: var(--bg-teal-soft);
  color: var(--teal);
  border-radius: var(--radius-sm);
}

.modern-dialog {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  max-width: 640px;
  width: 92%;
  margin: auto;
  background: var(--bg-main);
  color: var(--text-primary);
}
.modern-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
}
.dialog-header {
  padding: 1.25rem 1.5rem;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dialog-header h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text-primary);
}
.dialog-close-btn {
  background: transparent;
  border: 1px solid var(--border);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.dialog-close-btn:hover {
  background: var(--bg-muted);
  color: var(--text-primary);
}
.dialog-body {
  padding: 1.5rem;
}

/* ==========================================================================
   1. Admin Console Layout (Light Sidebar + Light Workspace)
   ========================================================================== */
.admin-shell {
  display: none;
  min-height: 100vh;
}

.admin-shell.authenticated {
  display: grid;
  grid-template-columns: 268px 1fr;
}

.admin-sidebar {
  background: var(--bg-main);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--border);
}

.admin-sidebar-brand {
  padding: 1.35rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.admin-nav-section {
  padding: 1.25rem 1rem;
  flex: 1;
  overflow-y: auto;
}

.admin-nav-label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 0 0.75rem;
  margin-bottom: 0.5rem;
  margin-top: 1.25rem;
}
.admin-nav-label:first-child {
  margin-top: 0;
}

.admin-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.admin-nav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
}

.admin-nav-btn i {
  width: 18px;
  text-align: center;
  color: var(--text-muted);
}

.admin-nav-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.admin-nav-btn.active {
  background: var(--bg-teal-soft);
  color: var(--teal);
  border-color: var(--border);
  font-weight: 600;
}

.admin-nav-btn.active i {
  color: var(--teal);
}

.nav-counter-pill {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: var(--bg-muted);
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.admin-nav-btn.active .nav-counter-pill {
  background: var(--teal);
  color: #FFFFFF;
}

.admin-sidebar-footer {
  padding: 1.15rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
  font-size: 0.8125rem;
}

.admin-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg-subtle);
}

.admin-topbar {
  background: var(--bg-main);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 40;
}

.admin-content-body {
  padding: 2rem;
  max-width: 1400px;
  width: 100%;
}

.admin-tab-panel {
  display: none;
}

.admin-tab-panel.active {
  display: block;
}

/* ==========================================================================
   2. Minimalist Light KPI Cards & Data Tables
   ========================================================================== */
.kpi-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.15rem;
  margin-bottom: 1.75rem;
}

.kpi-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
  margin-bottom: 1.75rem;
}

.kpi-card {
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.kpi-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kpi-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.kpi-meta {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.data-card {
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.data-card-header {
  padding: 1.15rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.data-card-header h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

.admin-table th {
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.admin-table td {
  padding: 0.95rem 1.25rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: middle;
  overflow-wrap: break-word;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table tr:hover td {
  background: var(--bg-subtle);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  white-space: nowrap;
  border: 1px solid transparent;
}

.status-pill.teal {
  background: var(--bg-teal-soft);
  color: var(--teal);
}

.status-pill.spark {
  background: var(--amber-bg);
  color: var(--amber);
}

.status-pill.success {
  background: var(--emerald-bg);
  color: var(--emerald);
}

.status-pill.slate {
  background: var(--bg-muted);
  color: var(--text-secondary);
}

.status-select-inline {
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-main);
  color: var(--text-primary);
  cursor: pointer;
}

/* ==========================================================================
   3. Light-First 2FA Admin Auth Gate
   ========================================================================== */
.admin-auth-gate {
  min-height: 100vh;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
}

.admin-auth-card {
  background: var(--bg-main);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 920px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  overflow: hidden;
  border: 1px solid var(--border);
}

.admin-auth-form-col {
  padding: 2.75rem 2.5rem;
}

.admin-auth-info-col {
  background: var(--bg-teal-soft);
  color: var(--text-primary);
  padding: 2.75rem 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-left: 1px solid var(--border);
}

.admin-role-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--bg-teal-soft);
  color: var(--teal);
}

.security-notice-box {
  background: transparent;
  border: none;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 0.85rem 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin: 1rem 0 1.25rem;
}

/* ==========================================================================
   4. Candidate & Company Portal Layout (`painel.html`)
   ========================================================================== */
.portal-hero-bar {
  background: var(--bg-subtle);
  color: var(--text-primary);
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
}

.portal-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  padding: 2.5rem 0 4rem;
  align-items: start;
}

.portal-profile-card {
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  position: sticky;
  top: 96px;
}

.portal-avatar {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--teal);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.timeline-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.timeline-step {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.timeline-step::before {
  content: "";
  height: 4px;
  border-radius: 999px;
  background: var(--border);
}

.timeline-step.done {
  color: var(--teal);
}
.timeline-step.done::before {
  background: var(--teal);
}

.timeline-step.current {
  color: var(--text-primary);
  font-weight: 600;
}
.timeline-step.current::before {
  background: var(--amber);
}

@media (max-width: 980px) {
  .admin-shell.authenticated {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    position: static;
    height: auto;
  }
  .kpi-grid-4 {
    grid-template-columns: 1fr 1fr;
  }
  .kpi-grid-3 {
    grid-template-columns: 1fr;
  }
  .admin-auth-card,
  .portal-grid,
  .form-grid-2 {
    grid-template-columns: 1fr;
  }
  .admin-auth-info-col {
    border-left: none;
    border-top: 1px solid var(--border);
  }
  .timeline-steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .kpi-grid-4,
  .kpi-grid-3 {
    grid-template-columns: 1fr;
  }
  .admin-topbar {
    padding: 0.9rem 1.25rem;
    flex-wrap: wrap;
  }
  .admin-content-body {
    padding: 1.25rem;
  }
  .admin-auth-form-col,
  .admin-auth-info-col {
    padding: 1.75rem 1.25rem;
  }
  .field input,
  .field select,
  .field textarea {
    font-size: 16px;
  }
}
