/* TalentTrack — app.css */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --accent:       #e94560;
  --accent-dark:  #c73550;
  --accent-light: rgba(233,69,96,.1);
  --bg:           #f7f7f9;
  --surface:      #ffffff;
  --surface2:     #f2f2f5;
  --border:       rgba(0,0,0,.1);
  --border-md:    rgba(0,0,0,.16);
  --text:         #1a1a2e;
  --muted:        #6b6b80;
  --radius:       8px;
  --radius-lg:    12px;
  --sidebar-w:    220px;
}

html { font-size: 16px; }
body { font-family: 'DM Sans', system-ui, sans-serif; background: var(--bg); color: var(--text); line-height: 1.55; }

/* Layout */
.layout { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  width: var(--sidebar-w); background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; position: fixed; top: 0; left: 0; height: 100vh; z-index: 20;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px; padding: 20px 16px 16px;
  border-bottom: 1px solid var(--border);
  font-family: 'Sora', sans-serif; font-size: 15px; font-weight: 600; color: var(--text);
  text-decoration: none;
}
.sidebar-nav { padding: 12px 8px; flex: 1; overflow-y: auto; }
.nav-label {
  display: block; font-size: 10px; font-weight: 500; color: var(--muted);
  text-transform: uppercase; letter-spacing: 1px; padding: 6px 8px 4px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  margin: 2px 0; border-radius: var(--radius); color: var(--muted); font-size: 13.5px;
  text-decoration: none; transition: background .15s, color .15s;
}
.nav-item i { font-size: 17px; }
.nav-item:hover { background: var(--surface2); color: var(--text); }
.nav-item.active { background: var(--accent-light); color: var(--accent); font-weight: 500; }

/* Sidebar footer */
.sidebar-footer {
  padding: 12px 8px; border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 4px;
}
.user-row {
  flex: 1; display: flex; align-items: center; gap: 9px;
  text-decoration: none; padding: 6px 8px; border-radius: var(--radius); transition: background .15s;
}
.user-row:hover { background: var(--surface2); }
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; color: #fff; flex-shrink: 0;
}
.user-name { font-size: 13px; font-weight: 500; color: var(--text); }
.user-role { font-size: 11px; color: var(--muted); }
.btn-logout {
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius); color: var(--muted); text-decoration: none; transition: background .15s, color .15s;
}
.btn-logout:hover { background: #FCEBEB; color: #a32d2d; }
.btn-logout i { font-size: 17px; }

/* Main */
.main { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-height: 100vh; }

.topbar {
  padding: 14px 24px; background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 10;
}
.topbar-title { font-family: 'Sora', sans-serif; font-size: 17px; font-weight: 600; }
.topbar-actions { display: flex; gap: 8px; }

.content { padding: 24px; flex: 1; }

/* Alerts */
.alert {
  display: flex; align-items: center; gap: 8px; padding: 11px 16px;
  border-radius: var(--radius); font-size: 13.5px; margin-bottom: 20px;
}
.alert i { font-size: 16px; }
.alert-success { background: #EAF3DE; color: #27500A; border: 1px solid #C0DD97; }
.alert-danger  { background: #FCEBEB; color: #791F1F; border: 1px solid #F7C1C1; }
.alert-warning { background: #FAEEDA; color: #633806; border: 1px solid #FAC775; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px;
  border: 1px solid var(--border-md); border-radius: var(--radius);
  font-size: 13.5px; font-family: inherit; cursor: pointer;
  background: var(--surface); color: var(--text); text-decoration: none;
  transition: background .15s, border-color .15s; white-space: nowrap;
}
.btn:hover { background: var(--surface2); }
.btn i { font-size: 16px; }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-danger  { background: #FCEBEB; color: #a32d2d; border-color: #F7C1C1; }
.btn-danger:hover { background: #F7C1C1; }
.btn-sm { padding: 5px 11px; font-size: 12.5px; }
.btn-icon {
  width: 30px; height: 30px; padding: 0; justify-content: center;
  border: 1px solid var(--border); border-radius: 6px;
  background: transparent; color: var(--muted); cursor: pointer;
  display: inline-flex; align-items: center; transition: background .15s, color .15s;
}
.btn-icon i { font-size: 15px; }
.btn-icon:hover { background: var(--surface2); color: var(--text); }
.btn-icon.danger:hover { background: #FCEBEB; color: #a32d2d; border-color: #F7C1C1; }
.action-group { display: flex; gap: 6px; }

/* Stats grid */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px;
}
.stat-label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.stat-val { font-family: 'Sora', sans-serif; font-size: 26px; font-weight: 600; }
.stat-sub { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* Card */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.card-header { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.card-title { font-size: 14px; font-weight: 500; }
.card-body { padding: 18px; }

/* Table */
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th {
  padding: 10px 16px; text-align: left; font-size: 11px; font-weight: 500;
  color: var(--muted); text-transform: uppercase; letter-spacing: .5px;
  border-bottom: 1px solid var(--border); background: var(--surface2);
}
td { padding: 11px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafafa; }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px; font-size: 11.5px; font-weight: 500;
}
.badge-novo      { background: #E6F1FB; color: #0C447C; }
.badge-em_analise { background: #FAEEDA; color: #633806; }
.badge-rejeitado { background: #FCEBEB; color: #791F1F; }
.badge-ativa     { background: #EAF3DE; color: #27500A; }
.badge-encerrada { background: #F1EFE8; color: #444441; }
.badge-admin     { background: rgba(233,69,96,.1); color: #e94560; }
.badge-gestor    { background: #E6F1FB; color: #185FA5; }
.badge-recrutador { background: #F1EFE8; color: #5F5E5A; }

/* Filter bar */
.filter-bar { display: flex; gap: 10px; margin-bottom: 16px; align-items: center; flex-wrap: wrap; }
.filter-bar input, .filter-bar select {
  padding: 8px 12px; border: 1px solid var(--border-md); border-radius: var(--radius);
  font-size: 13.5px; background: var(--surface); color: var(--text);
  font-family: inherit; outline: none; transition: border-color .15s;
}
.filter-bar input { flex: 1; min-width: 180px; }
.filter-bar input:focus, .filter-bar select:focus { border-color: var(--accent); }

/* Forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: 12px; font-weight: 500; color: var(--muted); }
.form-group input,
.form-group select,
.form-group textarea {
  padding: 9px 12px; border: 1px solid var(--border-md); border-radius: var(--radius);
  font-size: 13.5px; background: var(--surface); color: var(--text);
  font-family: inherit; outline: none; transition: border-color .15s, box-shadow .15s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(233,69,96,.12);
}
.form-group textarea { resize: vertical; min-height: 90px; }
.form-error { font-size: 12px; color: #a32d2d; margin-top: 2px; }

/* File upload zone */
.file-zone {
  border: 1.5px dashed var(--border-md); border-radius: var(--radius); padding: 22px;
  text-align: center; cursor: pointer; transition: border-color .15s, background .15s;
}
.file-zone:hover { border-color: var(--accent); background: var(--accent-light); }
.file-zone i { font-size: 26px; color: var(--muted); display: block; margin-bottom: 6px; }
.file-zone p { font-size: 13px; color: var(--muted); }
.file-zone .file-name { font-size: 12px; color: var(--accent); margin-top: 4px; font-weight: 500; }

/* Candidate detail */
.detail-header {
  display: flex; align-items: center; gap: 16px;
  padding-bottom: 20px; border-bottom: 1px solid var(--border); margin-bottom: 20px;
}
.detail-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Sora', sans-serif; font-size: 20px; font-weight: 600; color: #fff; flex-shrink: 0;
}
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.detail-grid .full { grid-column: 1 / -1; }
.detail-field label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; display: block; margin-bottom: 4px; }
.detail-field p { font-size: 14px; }

/* Section header */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-title { font-size: 14px; font-weight: 500; }

/* Empty state */
.empty-state { padding: 48px; text-align: center; color: var(--muted); }
.empty-state i { font-size: 36px; opacity: .4; display: block; margin-bottom: 10px; }

/* Auth */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); }
.auth-card {
  width: 400px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 36px;
}
.auth-brand { text-align: center; margin-bottom: 28px; }
.auth-brand svg { display: block; margin: 0 auto 10px; }
.auth-brand h1 { font-family: 'Sora', sans-serif; font-size: 20px; font-weight: 600; }
.auth-brand p { font-size: 13px; color: var(--muted); margin-top: 4px; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 12px; color: var(--muted); }

/* Page header bar */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.page-header-back { display: flex; align-items: center; gap: 10px; }

/* Responsive */
@media (max-width: 860px) {
  :root { --sidebar-w: 0px; }
  .sidebar { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
}
