:root {
  --primary: #1B2A4A;
  --primary-dark: #243558;
  --primary-light: #F2EDE8;
  --secondary: #B85C6E;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  /* L7 Talents brand */
  --cream:  #FAF7F4;
  --cream2: #F2EDE8;
  --rose:   #B85C6E;
  --navy:   #1B2A4A;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
  --radius: 8px;
  --radius-lg: 12px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  color: var(--navy);
  background: var(--cream);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

/* Botões */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500; cursor: pointer;
  border: none; transition: all .15s; white-space: nowrap;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: #243558; }
.btn-secondary { background: var(--cream2); color: var(--navy); border: 1px solid rgba(27,42,74,.25); }
.btn-secondary:hover { background: var(--cream2); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-block { width: 100%; justify-content: center; }

/* Formulários */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 14px; font-weight: 500; color: var(--gray-700); margin-bottom: 6px; }
.form-control {
  width: 100%; padding: 10px 14px; border: 1px solid rgba(27,42,74,.2);
  border-radius: var(--radius); font-size: 14px; color: var(--navy);
  background: var(--cream); transition: border-color .15s, box-shadow .15s;
}
.form-control:focus { outline: none; border-color: var(--rose); box-shadow: 0 0 0 3px rgba(184,92,110,.12); }
.form-control::placeholder { color: rgba(27,42,74,.35); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 4px; }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }

/* Cards */
.card {
  background: var(--cream2); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 24px; border: 1px solid rgba(27,42,74,.08);
}
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.card-title { font-size: 18px; font-weight: 600; color: var(--navy); }

/* Badges */
.badge {
  display: inline-flex; align-items: center; padding: 3px 10px;
  border-radius: 20px; font-size: 12px; font-weight: 500;
}
.badge-blue { background: var(--cream2); color: var(--navy); }
.badge-green { background: #dcfce7; color: #166534; }
.badge-yellow { background: #fef9c3; color: #854d0e; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-purple { background: #ede9fe; color: #5b21b6; }
.badge-gray { background: var(--gray-100); color: var(--gray-600); }

/* Navbar */
.navbar {
  background: rgba(242,237,232,.95); border-bottom: 1px solid rgba(184,92,110,.15);
  padding: 0 24px; height: 64px; display: flex; align-items: center;
  justify-content: space-between; position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-sm); backdrop-filter: blur(10px);
}
.navbar-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; color: var(--navy); }
.navbar-brand img { height: 36px; }
.navbar-nav { display: flex; align-items: center; gap: 8px; }
.nav-link { padding: 8px 14px; border-radius: var(--radius); font-size: 14px; color: var(--navy); font-weight: 500; opacity: .75; }
.nav-link:hover { background: var(--cream2); color: var(--navy); text-decoration: none; opacity: 1; }
.nav-link.active { background: var(--cream2); color: var(--rose); opacity: 1; }

/* Sidebar */
.layout { display: flex; min-height: calc(100vh - 64px); }
.sidebar {
  width: 240px; background: var(--cream2); border-right: 1px solid rgba(184,92,110,.15);
  padding: 24px 12px; flex-shrink: 0; position: sticky; top: 64px; height: calc(100vh - 64px); overflow-y: auto;
}
.sidebar-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border-radius: var(--radius); font-size: 14px; color: var(--navy);
  font-weight: 500; cursor: pointer; transition: all .15s; margin-bottom: 2px; opacity: .75;
}
.sidebar-item:hover { background: var(--cream); color: var(--navy); opacity: 1; }
.sidebar-item.active { background: var(--cream); color: var(--rose); opacity: 1; font-weight: 600; }
.sidebar-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.main-content { flex: 1; padding: 32px; overflow-y: auto; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: var(--cream2); border-radius: var(--radius-lg); padding: 20px;
  box-shadow: var(--shadow); display: flex; align-items: center; gap: 16px;
}
.stat-icon { width: 48px; height: 48px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; }
.stat-icon.blue { background: var(--cream2); color: var(--navy); }
.stat-icon.green { background: #dcfce7; color: var(--success); }
.stat-icon.purple { background: #ede9fe; color: var(--secondary); }
.stat-icon.yellow { background: #fef9c3; color: var(--warning); }
.stat-value { font-size: 28px; font-weight: 700; color: var(--gray-900); }
.stat-label { font-size: 13px; color: var(--gray-500); }

/* Vaga card */
.vaga-card {
  background: var(--cream2); border-radius: var(--radius-lg); padding: 20px;
  box-shadow: var(--shadow); border: 1px solid var(--gray-200);
  transition: box-shadow .2s, transform .2s; cursor: pointer;
}
.vaga-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.vaga-card.destaque { border-left: 3px solid var(--rose); }
.vaga-empresa { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.vaga-logo { width: 40px; height: 40px; border-radius: var(--radius); object-fit: cover; background: var(--gray-100); display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--primary); font-size: 16px; }
.vaga-titulo { font-size: 16px; font-weight: 600; color: var(--gray-900); margin-bottom: 6px; }
.vaga-info { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.vaga-salario { font-size: 14px; font-weight: 600; color: var(--success); }

/* Tabela */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 12px 16px; font-size: 12px; font-weight: 600; color: var(--gray-500); text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--gray-200); }
td { padding: 14px 16px; font-size: 14px; border-bottom: 1px solid var(--gray-100); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--cream); }

/* Alertas */
.alert { padding: 12px 16px; border-radius: var(--radius); font-size: 14px; margin-bottom: 16px; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 16px;
}
.modal { background: var(--cream2); border-radius: var(--radius-lg); padding: 32px; width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.modal-title { font-size: 20px; font-weight: 700; }
.modal-close { background: none; border: none; cursor: pointer; color: var(--gray-400); font-size: 24px; line-height: 1; }
.modal-close:hover { color: var(--gray-700); }

/* Utilitários */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: 13px; }
.text-muted { color: var(--gray-500); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.mt-4 { margin-top: 4px; }
.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; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.w-full { width: 100%; }
.spinner {
  width: 20px; height: 20px; border: 2px solid var(--gray-200);
  border-top-color: var(--rose); border-radius: 50%; animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Responsivo */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .main-content { padding: 16px; }
  .form-row, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .navbar { padding: 0 16px; }
  .navbar-nav .nav-link { display: none; }
  .navbar-nav .btn { display: none; }
  .hamburger { display: flex !important; }
  .card { padding: 16px; }
  .vaga-card { padding: 16px; }
  table { font-size: 12px; }
  th, td { padding: 8px 8px; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .btn-lg { padding: 12px 20px; font-size: 14px; }
  h1 { font-size: 24px !important; }
  .auth-card { padding: 24px 20px; }
}

/* Classes utilitárias mobile */
.device-mobile .hide-mobile { display: none !important; }
.device-desktop .hide-desktop { display: none !important; }

/* Hamburger menu */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 8px;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--navy); border-radius: 2px; transition: all .3s;
}

/* Mobile drawer */
.mobile-drawer {
  display: none; position: fixed; inset: 0; z-index: 200;
}
.mobile-drawer.open { display: block; }
.drawer-overlay {
  position: absolute; inset: 0; background: rgba(27,42,74,.4);
}
.drawer-panel {
  position: absolute; top: 0; left: 0; bottom: 0; width: 260px;
  background: var(--cream); padding: 24px 16px;
  display: flex; flex-direction: column; gap: 4px;
  box-shadow: 4px 0 24px rgba(0,0,0,.15);
  overflow-y: auto;
}
.drawer-logo { height: 44px; object-fit: contain; margin-bottom: 20px; }
.drawer-item {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border-radius: var(--radius); font-size: 15px; color: var(--navy);
  font-weight: 500; text-decoration: none; transition: background .15s;
}
.drawer-item:hover { background: var(--cream2); text-decoration: none; }
.drawer-item.active { background: var(--cream2); color: var(--rose); font-weight: 600; }

/* Garantir tom creme em elementos que usam white */
.stat-card, .vaga-card, .auth-card, .modal-content,
[style*="background: white"], [style*="background:white"],
[style*="background:#fff"], [style*="background: #fff"] {
  background: var(--cream2) !important;
}
