/* ========================================
   Portal do Cliente - Contalents
   Design System & Styles
   ======================================== */

/* ---------- CSS Variables ---------- */
:root {
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: #eef2ff;
  --bg: #f8fafc;
  --bg-card: #ffffff;
  --text: #1e293b;
  --text-secondary: #64748b;
  --border: #e2e8f0;
  --success: #10b981;
  --success-light: #ecfdf5;
  --warning: #f59e0b;
  --warning-light: #fffbeb;
  --danger: #ef4444;
  --danger-light: #fef2f2;
  --info: #3b82f6;
  --info-light: #eff6ff;
  --neutral: #94a3b8;
  --neutral-light: #f1f5f9;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --transition: 0.2s ease;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  background: var(--bg);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
}

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

/* ---------- Screen Management ---------- */
.screen {
  display: none;
}

.screen.active {
  display: flex;
}

/* ---------- Auth Screens (Login / Invite) ---------- */
#login-screen,
#invite-screen {
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f0f4ff 0%, #faf5ff 50%, #f0fdf4 100%);
  padding: 20px;
}

.auth-card {
  max-width: 420px;
  width: 100%;
  background: var(--bg-card);
  padding: 40px;
  border-radius: 16px;
  box-shadow: var(--shadow-xl);
  text-align: center;
  animation: fadeIn 0.4s ease;
}

.auth-logo {
  margin-bottom: 24px;
}

.auth-logo img {
  max-width: 180px;
  margin: 0 auto;
}

.auth-title {
  font-family: 'Poppins', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.auth-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.auth-card .form-group {
  text-align: left;
}

/* ---------- Invite Info ---------- */
.invite-info {
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 24px;
  text-align: left;
}

.invite-info-row {
  display: flex;
  gap: 8px;
  padding: 4px 0;
  font-size: 14px;
}

.invite-label {
  color: var(--text-secondary);
  font-weight: 500;
  min-width: 70px;
}

.invite-value {
  color: var(--text);
  font-weight: 600;
}

.invite-error {
  text-align: center;
  padding: 24px 0;
}

.invite-error h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--danger);
}

.invite-error p {
  color: var(--text-secondary);
  margin-bottom: 24px;
  font-size: 14px;
}

/* ---------- Error Message ---------- */
.error-msg {
  color: var(--danger);
  font-size: 14px;
  margin-top: 4px;
  margin-bottom: 8px;
  display: none;
  text-align: left;
}

/* ---------- Forms ---------- */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--text);
}

input,
select,
textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--bg-card);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

input::placeholder,
textarea::placeholder {
  color: var(--neutral);
}

.auth-card input {
  padding: 12px 16px;
  font-size: 15px;
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-hint {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  line-height: 1.4;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

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

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

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

.btn-success:hover:not(:disabled) {
  background: #059669;
}

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

.btn-danger:hover:not(:disabled) {
  background: #dc2626;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-outline:hover:not(:disabled) {
  background: var(--bg);
  border-color: var(--text-secondary);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

.btn-full {
  width: 100%;
}

.auth-card .btn {
  padding: 14px;
  font-size: 15px;
  margin-top: 8px;
}

/* ---------- App Shell Layout ---------- */
#app-shell {
  min-height: 100vh;
  position: relative;
}

/* ---------- Sidebar ---------- */
.sidebar {
  width: 260px;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-logo {
  padding: 0 8px;
  margin-bottom: 32px;
}

.sidebar-logo img {
  max-width: 160px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
}

.nav-item:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.nav-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-item.active svg {
  stroke: var(--primary);
}

.nav-logout {
  margin-top: auto;
  color: var(--danger);
}

.nav-logout:hover {
  background: var(--danger-light);
  color: var(--danger);
}

/* ---------- Main Wrapper ---------- */
.main-wrapper {
  margin-left: 260px;
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.main-header h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.user-info {
  text-align: right;
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.user-empresa {
  font-size: 13px;
  color: var(--text-secondary);
}

#main-content {
  flex: 1;
  padding: 32px;
}

/* ---------- Cards ---------- */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.card-title {
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}

/* ---------- Metric Cards ---------- */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.metric-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  text-align: center;
  transition: box-shadow var(--transition);
}

.metric-card:hover {
  box-shadow: var(--shadow-lg);
}

.metric-card.highlight {
  border-color: var(--warning);
  background: linear-gradient(135deg, var(--bg-card), var(--warning-light));
}

.metric-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.metric-icon svg {
  width: 24px;
  height: 24px;
}

.metric-icon.primary {
  background: var(--primary-light);
  color: var(--primary);
}

.metric-icon.success {
  background: var(--success-light);
  color: var(--success);
}

.metric-icon.warning {
  background: var(--warning-light);
  color: var(--warning);
}

.metric-icon.info {
  background: var(--info-light);
  color: var(--info);
}

.metric-value {
  font-size: 32px;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  color: var(--text);
  line-height: 1.2;
}

.metric-label {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.badge-success {
  background: var(--success-light);
  color: #065f46;
}

.badge-warning {
  background: var(--warning-light);
  color: #92400e;
}

.badge-danger {
  background: var(--danger-light);
  color: #991b1b;
}

.badge-info {
  background: var(--info-light);
  color: #1e40af;
}

.badge-neutral {
  background: var(--neutral-light);
  color: #475569;
}

/* ---------- Data Grid (Vagas Cards) ---------- */
.data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

.vaga-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: box-shadow var(--transition), transform var(--transition);
}

.vaga-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.vaga-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.vaga-card-title {
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.vaga-card-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.vaga-card-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.vaga-card-meta-item svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ---------- SLA Progress Bar ---------- */
.sla-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 12px;
}

.sla-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.sla-fill.green {
  background: var(--success);
}

.sla-fill.yellow {
  background: var(--warning);
}

.sla-fill.red {
  background: var(--danger);
}

.sla-label {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

/* ---------- Table ---------- */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
}

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

thead th {
  background: var(--bg);
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 12px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background: var(--bg);
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--bg-card);
  max-width: 600px;
  width: 90%;
  border-radius: var(--radius);
  padding: 32px;
  max-height: 80vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.modal-title {
  font-family: 'Poppins', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.modal-close:hover {
  background: var(--danger-light);
  color: var(--danger);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ---------- Loading Overlay ---------- */
#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.page-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

.page-loading .spinner {
  width: 32px;
  height: 32px;
}

/* ---------- Toast Notifications ---------- */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  z-index: 10000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-lg);
  max-width: 400px;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-success {
  background: var(--success);
}

.toast-error {
  background: var(--danger);
}

.toast-warning {
  background: var(--warning);
  color: #92400e;
}

.toast-info {
  background: var(--info);
}

/* ---------- Empty State ---------- */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-secondary);
}

.empty-state svg {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  color: var(--border);
}

.empty-state h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.empty-state p {
  font-size: 14px;
  max-width: 400px;
  margin: 0 auto 24px;
}

/* ---------- Section Header ---------- */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-title {
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
}

.tab {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
}

.tab:hover {
  color: var(--text);
}

.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

/* ---------- Candidate List (inside vaga detail) ---------- */
.candidato-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.candidato-item:last-child {
  border-bottom: none;
}

.candidato-item:hover {
  background: var(--bg);
}

.candidato-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
  flex-shrink: 0;
}

.candidato-info {
  flex: 1;
}

.candidato-nome {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.candidato-cargo {
  font-size: 13px;
  color: var(--text-secondary);
}

.candidato-actions {
  display: flex;
  gap: 8px;
}

/* ---------- Detail Info Grid ---------- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-value {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

/* ---------- Mobile Header ---------- */
.mobile-header {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 90;
}

.hamburger-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  border-radius: var(--radius-sm);
}

.hamburger-btn:hover {
  background: var(--bg);
}

.mobile-logo {
  height: 28px;
  width: auto;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
}

.sidebar-overlay.active {
  display: block;
}

/* ---------- Animations ---------- */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.fade-in {
  animation: fadeIn 0.4s ease;
}

/* ---------- Responsive (Mobile) ---------- */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    width: 280px;
    box-shadow: none;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-xl);
  }

  .mobile-header {
    display: flex;
  }

  .main-wrapper {
    margin-left: 0;
  }

  .main-header {
    display: none;
  }

  #main-content {
    padding: 20px 16px;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .metric-card {
    padding: 16px;
  }

  .metric-value {
    font-size: 24px;
  }

  .data-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .modal {
    width: 95%;
    padding: 24px;
    max-height: 90vh;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .auth-card {
    padding: 28px 24px;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: none;
  }

  .tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .tab {
    white-space: nowrap;
    flex-shrink: 0;
  }
}

@media (max-width: 480px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Utility Classes ---------- */
.text-center {
  text-align: center;
}

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

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

.text-sm {
  font-size: 13px;
}

.mt-8 {
  margin-top: 8px;
}

.mt-16 {
  margin-top: 16px;
}

.mt-24 {
  margin-top: 24px;
}

.mb-16 {
  margin-bottom: 16px;
}

.mb-24 {
  margin-bottom: 24px;
}

.gap-8 {
  gap: 8px;
}

.gap-16 {
  gap: 16px;
}

.flex {
  display: flex;
}

.flex-wrap {
  flex-wrap: wrap;
}

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

.justify-between {
  justify-content: space-between;
}

.hidden {
  display: none !important;
}

/* ---------- Page Header ---------- */
.page-header {
  margin-bottom: 24px;
}

.page-header h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.page-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* ---------- Sections ---------- */
.section {
  margin-top: 32px;
}

/* ---------- Error State ---------- */
.error-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-secondary);
}

.error-state p {
  font-size: 15px;
  margin-bottom: 16px;
}

/* ---------- Attention List (Dashboard) ---------- */
.attention-list {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.attention-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
}

.attention-item:last-child {
  border-bottom: none;
}

.attention-item:hover {
  background: var(--primary-light);
}

.attention-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.attention-code {
  font-weight: 700;
  font-size: 14px;
  color: var(--primary);
  white-space: nowrap;
}

.attention-cargo {
  font-weight: 500;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attention-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.attention-arrow {
  flex-shrink: 0;
  color: var(--text-secondary);
}

/* ---------- Filter Bar (Vagas) ---------- */
.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.filter-btn {
  padding: 8px 18px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 13px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.filter-btn:hover {
  background: var(--bg);
  border-color: var(--text-secondary);
  color: var(--text);
}

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

/* ---------- Vagas Grid ---------- */
.vagas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

/* ---------- Vaga Card Extras ---------- */
.vaga-code {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.vaga-cargo {
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}

.sla-container {
  margin-bottom: 12px;
}

.sla-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.sla-info .sla-label {
  font-size: 12px;
  color: var(--text-secondary);
  display: inline;
}

.sla-days {
  font-size: 12px;
  font-weight: 600;
}

.sla-ok {
  color: var(--success);
}

.sla-warning {
  color: var(--warning);
}

.sla-danger {
  color: var(--danger);
}

.vaga-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--warning-light);
  border-radius: var(--radius-xs);
  font-size: 12px;
  font-weight: 500;
  color: #92400e;
  margin-bottom: 12px;
}

.vaga-alert svg {
  flex-shrink: 0;
  color: var(--warning);
}

.vaga-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.vaga-date {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ---------- Vaga Detalhe ---------- */
.btn-back {
  padding: 8px 16px;
  font-size: 13px;
}

.vaga-detalhe-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.vaga-detalhe-code {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 4px;
}

.vaga-detalhe-cargo {
  font-family: 'Poppins', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.2;
}

.vaga-detalhe-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.vaga-detalhe-meta span {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: var(--neutral-light);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.vaga-detalhe-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.sla-compact {
  font-size: 13px;
  font-weight: 600;
}

/* ---------- Escopo Section ---------- */
.escopo-section {
  border-color: var(--primary);
  border-width: 2px;
  margin-bottom: 24px;
}

.escopo-section h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}

.escopo-content {
  margin-bottom: 24px;
}

.escopo-block {
  margin-bottom: 16px;
}

.escopo-block:last-child {
  margin-bottom: 0;
}

.escopo-block h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.escopo-block p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  white-space: pre-wrap;
}

.escopo-actions {
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.escopo-info {
  font-size: 13px;
  color: var(--text-secondary);
  flex: 1;
}

/* ---------- Alert ---------- */
.alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
}

.alert svg {
  flex-shrink: 0;
}

.alert-warning {
  background: var(--warning-light);
  color: #92400e;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.alert-info {
  background: var(--info-light);
  color: #1e40af;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.alert-danger {
  background: var(--danger-light);
  color: #991b1b;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.text-muted {
  color: var(--text-secondary);
  font-size: 14px;
}

/* ---------- Responsive: Vagas/Dashboard extras ---------- */
@media (max-width: 768px) {
  .vagas-grid {
    grid-template-columns: 1fr;
  }

  .vaga-detalhe-header {
    flex-direction: column;
  }

  .vaga-detalhe-status {
    align-items: flex-start;
    flex-direction: row;
    gap: 12px;
  }

  .vaga-detalhe-cargo {
    font-size: 22px;
  }

  .attention-item {
    flex-wrap: wrap;
    gap: 8px;
  }

  .attention-actions {
    width: 100%;
  }

  .filter-bar {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

  .filter-btn {
    white-space: nowrap;
    flex-shrink: 0;
  }

  .escopo-actions {
    flex-direction: column;
    align-items: stretch;
  }

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