/* BSOS HR Portal — Design System v1.0 */
/* Brand: Batranu' Sas | #1D553C (verde) / #E02535 (rosu) / #0f172a (dark bg) */

:root {
  --green:   #1D553C;
  --green-l: #2a7a56;
  --red:     #E02535;
  --bg:      #0f172a;
  --bg2:     #1e293b;
  --bg3:     #263548;
  --border:  #334155;
  --text:    #e2e8f0;
  --text-m:  #94a3b8;
  --text-d:  #64748b;
  --radius:  12px;
  --radius-s: 8px;
  --shadow:  0 4px 24px rgba(0,0,0,0.4);
}

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

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

body {
  font-family: -apple-system, 'Inter', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

/* ─── TOPBAR ─────────────────────────────────── */
.topbar {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
}
.topbar-logo .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
}
.topbar-nav {
  display: flex;
  gap: 4px;
  align-items: center;
}
.topbar-nav a {
  color: var(--text-m);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 6px 12px;
  border-radius: var(--radius-s);
  transition: background 0.15s, color 0.15s;
}
.topbar-nav a:hover, .topbar-nav a.active {
  background: var(--bg3);
  color: var(--text);
}
.topbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-m);
}
.avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--green);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  color: #fff;
}

/* ─── LAYOUT ─────────────────────────────────── */
.page { max-width: 1100px; margin: 0 auto; padding: 32px 24px; }
.page-wide { max-width: 1400px; margin: 0 auto; padding: 32px 24px; }

/* ─── PAGE HEADER ────────────────────────────── */
.page-header { margin-bottom: 32px; }
.page-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.page-header .sub {
  font-size: 0.875rem;
  color: var(--text-m);
  margin-top: 4px;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-d);
  margin-bottom: 12px;
}
.breadcrumb a { color: var(--text-d); text-decoration: none; }
.breadcrumb a:hover { color: var(--text-m); }
.breadcrumb span { color: var(--text-d); }

/* ─── CARDS ──────────────────────────────────── */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.card-sm { padding: 16px; }
.card-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-d);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.card-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.card-sub { font-size: 0.8rem; color: var(--text-m); margin-top: 6px; }

/* ─── GRID HELPERS ───────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ─── BADGES ─────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-green  { background: rgba(29,85,60,0.3);  color: #6ee7b7; }
.badge-red    { background: rgba(224,37,53,0.25); color: #fca5a5; }
.badge-yellow { background: rgba(217,119,6,0.25); color: #fde68a; }
.badge-blue   { background: rgba(37,99,235,0.2);  color: #93c5fd; }
.badge-gray   { background: rgba(100,116,139,0.2);color: #94a3b8; }

/* Nivel badges */
.nivel-Junior    { background: #1e3a5f; color: #93c5fd; }
.nivel-Standard  { background: #1e3050; color: #a5b4fc; }
.nivel-Senior    { background: #14532d; color: #86efac; }
.nivel-Specialist{ background: #451a03; color: #fdba74; }
.nivel-Manager   { background: #4a044e; color: #f0abfc; }

/* ─── BUTTONS ────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-s);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s, transform 0.1s;
  text-decoration: none;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--green);  color: #fff; }
.btn-primary:hover { background: var(--green-l); }
.btn-danger  { background: var(--red);   color: #fff; }
.btn-danger:hover { opacity: 0.85; }
.btn-ghost   { background: transparent; color: var(--text-m); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg3); color: var(--text); }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }

/* ─── PROGRESS BAR ───────────────────────────── */
.progress-wrap { margin-bottom: 12px; }
.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-m);
  margin-bottom: 5px;
}
.progress-track {
  height: 6px;
  background: var(--bg);
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--green);
  transition: width 0.4s ease;
}
.progress-fill.red { background: var(--red); }
.progress-fill.yellow { background: #f59e0b; }

/* ─── CHECKLIST ──────────────────────────────── */
.checklist { list-style: none; }
.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}
.checklist li:last-child { border-bottom: none; }
.check-box {
  width: 20px; height: 20px;
  border-radius: 6px;
  border: 2px solid var(--border);
  flex-shrink: 0;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, border-color 0.15s;
  margin-top: 1px;
}
.check-box.checked {
  background: var(--green);
  border-color: var(--green);
}
.check-box.checked::after {
  content: '';
  width: 5px; height: 9px;
  border: 2px solid #fff;
  border-top: none; border-left: none;
  transform: rotate(45deg) translate(-1px, -1px);
}
.checklist li.done .check-text { color: var(--text-d); text-decoration: line-through; }

/* ─── TABLES ─────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
thead th {
  background: var(--bg);
  color: var(--text-d);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
}
tbody td {
  padding: 12px 16px;
  font-size: 0.85rem;
  border-top: 1px solid var(--bg);
  color: var(--text);
}
tbody tr:hover td { background: var(--bg3); }

/* ─── FORMS ──────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-m);
  margin-bottom: 6px;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  color: var(--text);
  font-size: 0.875rem;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.15s;
  font-family: inherit;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--green);
}
.form-textarea { resize: vertical; min-height: 80px; }
.form-hint { font-size: 0.75rem; color: var(--text-d); margin-top: 4px; }

/* Score selector */
.score-selector { display: flex; gap: 8px; }
.score-btn {
  width: 40px; height: 40px;
  border-radius: var(--radius-s);
  border: 2px solid var(--border);
  background: transparent;
  color: var(--text-m);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  display: flex; align-items: center; justify-content: center;
}
.score-btn:hover { border-color: var(--green); color: var(--text); }
.score-btn.selected { background: var(--green); border-color: var(--green); color: #fff; }

/* ─── ALERTS ─────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-s);
  font-size: 0.875rem;
  margin-bottom: 16px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.alert-red    { background: rgba(224,37,53,0.1);  border: 1px solid rgba(224,37,53,0.3);  color: #fca5a5; }
.alert-green  { background: rgba(29,85,60,0.15);  border: 1px solid rgba(29,85,60,0.4);   color: #6ee7b7; }
.alert-yellow { background: rgba(217,119,6,0.1);  border: 1px solid rgba(217,119,6,0.3);  color: #fde68a; }

/* ─── SECTION TITLE ──────────────────────────── */
.section-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-d);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 28px 0 14px;
}

/* ─── EMPTY STATE ────────────────────────────── */
.empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-d);
  font-size: 0.875rem;
}
.empty .icon { font-size: 2.5rem; margin-bottom: 12px; }

/* ─── FOOTER ─────────────────────────────────── */
.portal-footer {
  text-align: center;
  padding: 32px 24px;
  color: var(--text-d);
  font-size: 0.75rem;
  border-top: 1px solid var(--border);
  margin-top: 48px;
}

/* ─── MOBILE ─────────────────────────────────── */
@media (max-width: 600px) {
  .page, .page-wide { padding: 16px; }
  .topbar { padding: 0 16px; }
  .topbar-nav { display: none; }
  .card { padding: 16px; }
}
