/* ============================================================
   SIGATH S.A.S — Estilos principales
   ============================================================ */

:root {
  --primary:        #1a3a6c;
  --primary-light:  #1a6fc4;
  --primary-dark:   #0f2347;
  --accent:         #00b4d8;
  --success:        #28a745;
  --warning:        #ffc107;
  --danger:         #dc3545;
  --sidebar-w:      260px;
  --topbar-h:       64px;
  --sidebar-bg:     #0f2347;
  --sidebar-hover:  rgba(255,255,255,0.08);
  --sidebar-active: rgba(26,111,196,0.35);
  --body-bg:        #f0f4f8;
  --card-bg:        #ffffff;
  --text-muted:     #6c757d;
  --border:         #e2e8f0;
  --shadow-sm:      0 1px 4px rgba(0,0,0,0.06);
  --shadow:         0 2px 12px rgba(0,0,0,0.09);
  --radius:         10px;
  --radius-lg:      16px;
  --transition:     0.22s ease;
  --font:           'Inter', sans-serif;
}

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

body.sigath-app {
  font-family: var(--font);
  background: var(--body-bg);
  color: #1e293b;
  margin: 0;
  overflow-x: hidden;
}

/* ─── SCROLLBAR ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c1cad4; border-radius: 4px; }

/* ─── SIDEBAR ───────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  z-index: 1050;
  transition: transform var(--transition);
  overflow: hidden;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.brand-icon {
  width: 40px; height: 40px;
  background: var(--primary-light);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px; flex-shrink: 0;
}
.brand-name { color: #fff; font-size: 17px; font-weight: 700; display: block; }
.brand-sub  { color: rgba(255,255,255,0.45); font-size: 10px; display: block; }

.sidebar-empresa {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 20px;
  background: rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.empresa-avatar {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--primary-light); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.empresa-avatar img { width: 100%; height: 100%; object-fit: cover; }
.empresa-nombre { color: #fff; font-size: 12px; font-weight: 600; line-height: 1.3; }
.empresa-rol    { color: rgba(255,255,255,0.45); font-size: 10px; }

.sidebar-nav {
  flex: 1; overflow-y: auto;
  padding: 10px 12px;
}
.nav-section-label {
  color: rgba(255,255,255,0.3);
  font-size: 10px; font-weight: 600;
  letter-spacing: 1px;
  padding: 14px 8px 4px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 14px; font-weight: 500;
  transition: background var(--transition), color var(--transition);
  cursor: pointer;
}
.nav-item:hover { background: var(--sidebar-hover); color: #fff; }
.nav-item.active { background: var(--sidebar-active); color: #fff; }
.nav-item.nav-item-danger { color: rgba(255,100,100,0.7); }
.nav-item.nav-item-danger:hover { background: rgba(220,53,69,0.15); color: #ff6b6b; }
.nav-item i { width: 20px; font-size: 17px; flex-shrink: 0; }

.sidebar-footer {
  padding: 10px 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

/* ─── OVERLAY MOBILE ─────────────────────────────────────── */
.sidebar-overlay {
  display: none; position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1040;
}
.sidebar-overlay.show { display: block; }

/* ─── MAIN WRAPPER ───────────────────────────────────────── */
.main-wrapper {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left var(--transition);
}

/* ─── TOPBAR ─────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  position: sticky; top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-right { display: flex; align-items: center; gap: 8px; }

.btn-sidebar-toggle, .btn-icon {
  width: 38px; height: 38px;
  border: none; background: transparent;
  border-radius: 8px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 18px;
  transition: background var(--transition);
}
.btn-sidebar-toggle:hover, .btn-icon:hover { background: var(--body-bg); }

.btn-user {
  display: flex; align-items: center; gap: 8px;
  border: none; background: transparent;
  padding: 6px 10px; border-radius: 10px;
  cursor: pointer;
  transition: background var(--transition);
}
.btn-user:hover { background: var(--body-bg); }
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--primary-light);
  color: #fff; font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-name { display: block; font-size: 13px; font-weight: 600; color: #1e293b; line-height: 1.2; }
.user-rol  { display: block; font-size: 11px; color: var(--text-muted); }

/* ─── NOTIFICATIONS ──────────────────────────────────────── */
.notif-dropdown .btn-icon { position: relative; }
.notif-badge {
  position: absolute; top: 2px; right: 2px;
  width: 18px; height: 18px;
  background: var(--danger); color: #fff;
  border-radius: 50%; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
}
.notif-panel { width: 360px; padding: 0; border-radius: var(--radius-lg); overflow: hidden; }
.notif-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); background: #fff; }
.notif-body { max-height: 360px; overflow-y: auto; background: #f8fafc; }
.notif-footer { padding: 10px 16px; border-top: 1px solid var(--border); text-align: center; font-size: 13px; background: #fff; }
.notif-item { display: flex; gap: 12px; padding: 12px 16px; cursor: pointer; border-bottom: 1px solid var(--border); transition: background var(--transition); }
.notif-item:hover { background: #f0f4f8; }
.notif-item.unread { background: #eef4ff; }
.notif-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.notif-info    { background: #dbeafe; color: #1d4ed8; }
.notif-success { background: #dcfce7; color: #16a34a; }
.notif-warning { background: #fef3c7; color: #d97706; }
.notif-danger  { background: #fee2e2; color: #dc2626; }
.notif-title   { margin: 0 0 2px; font-size: 13px; font-weight: 600; color: #1e293b; }
.notif-msg     { margin: 0 0 4px; font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.notif-time    { font-size: 11px; color: var(--text-muted); }
.notif-empty   { text-align: center; padding: 32px 16px; color: var(--text-muted); }
.notif-empty i { font-size: 32px; display: block; margin-bottom: 8px; }

/* ─── PAGE CONTENT ───────────────────────────────────────── */
.page-content { flex: 1; padding: 28px 28px 40px; max-width: 1400px; }

/* ─── PAGE HEADER ────────────────────────────────────────── */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 28px; gap: 16px;
}
.page-title { font-size: 24px; font-weight: 700; color: var(--primary); margin: 0; }
.page-subtitle { color: var(--text-muted); font-size: 14px; margin: 4px 0 0; }

/* ─── CARDS ──────────────────────────────────────────────── */
.card { border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); background: var(--card-bg); }
.card-header { background: transparent; border-bottom: 1px solid var(--border); padding: 16px 20px; font-weight: 600; }

/* ─── STAT CARDS ─────────────────────────────────────────── */
.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; gap: 18px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.stat-icon {
  width: 56px; height: 56px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; flex-shrink: 0;
}
.stat-icon.blue    { background: #dbeafe; color: #1d4ed8; }
.stat-icon.green   { background: #dcfce7; color: #16a34a; }
.stat-icon.orange  { background: #ffedd5; color: #ea580c; }
.stat-icon.purple  { background: #ede9fe; color: #7c3aed; }
.stat-icon.red     { background: #fee2e2; color: #dc2626; }
.stat-icon.teal    { background: #ccfbf1; color: #0d9488; }
.stat-value { font-size: 28px; font-weight: 700; color: #1e293b; line-height: 1; margin: 0; }
.stat-label { font-size: 13px; color: var(--text-muted); margin: 4px 0 0; }

/* ─── TABLES ─────────────────────────────────────────────── */
.table-wrapper { background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--border); overflow: hidden; box-shadow: var(--shadow-sm); }
.table { margin: 0; font-size: 14px; }
.table thead th { background: #f8fafc; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); border-bottom: 2px solid var(--border); padding: 12px 16px; }
.table tbody td { padding: 13px 16px; vertical-align: middle; border-color: var(--border); }
.table tbody tr:hover { background: #f8fafc; }

/* ─── FORMS ──────────────────────────────────────────────── */
.form-label { font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 6px; }
.form-control, .form-select {
  border-color: var(--border); border-radius: 8px;
  font-size: 14px; padding: 9px 13px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(26,111,196,0.1);
}

/* ─── BUTTONS ────────────────────────────────────────────── */
.btn-primary { background: var(--primary-light); border-color: var(--primary-light); }
.btn-primary:hover { background: var(--primary); border-color: var(--primary); }
.btn-sigath { background: linear-gradient(135deg, var(--primary), var(--primary-light)); border: none; color: #fff; border-radius: 8px; padding: 10px 20px; font-weight: 600; }

/* ─── BADGES ─────────────────────────────────────────────── */
.badge { font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 20px; }

/* ─── UPLOAD ZONE ────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 24px; text-align: center;
  cursor: pointer; transition: border-color var(--transition), background var(--transition);
  background: #f8fafc;
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--primary-light);
  background: #eef4ff;
}
.upload-zone i { font-size: 40px; color: var(--primary-light); display: block; margin-bottom: 12px; }

/* ─── HOJA DE VIDA (pública) ─────────────────────────────── */
.hv-container { max-width: 860px; margin: 0 auto; }
.hv-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 36px 40px; color: #fff;
  display: flex; align-items: center; gap: 24px;
}
.hv-foto {
  width: 100px; height: 100px; border-radius: 50%;
  border: 4px solid rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.15);
  overflow: hidden; display: flex; align-items: center; justify-content: center;
  font-size: 36px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.hv-foto img { width: 100%; height: 100%; object-fit: cover; }
.hv-nombre  { font-size: 26px; font-weight: 700; margin: 0; }
.hv-cargo   { opacity: 0.85; font-size: 15px; margin: 4px 0 0; }
.hv-section { background: #fff; border-left: 1px solid var(--border); border-right: 1px solid var(--border); padding: 28px 40px; }
.hv-section:last-child { border-bottom: 1px solid var(--border); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.hv-section-title { font-size: 13px; font-weight: 700; color: var(--primary-light); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 2px solid #eef4ff; }

/* ─── TIMELINE ───────────────────────────────────────────── */
.timeline { position: relative; padding-left: 20px; }
.timeline::before { content: ''; position: absolute; left: 6px; top: 4px; bottom: 0; width: 2px; background: var(--border); }
.timeline-item { position: relative; margin-bottom: 20px; }
.timeline-item::before { content: ''; position: absolute; left: -18px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary-light); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--primary-light); }
.timeline-date { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.timeline-title { font-weight: 600; margin-bottom: 2px; }
.timeline-sub { font-size: 13px; color: var(--text-muted); }

/* ─── MODAL ──────────────────────────────────────────────── */
.modal-header { border-bottom: 1px solid var(--border); background: #f8fafc; }
.modal-title { font-weight: 700; color: var(--primary); }
.modal-footer { border-top: 1px solid var(--border); }

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-wrapper { margin-left: 0 !important; }
  .btn-sidebar-toggle { display: flex !important; }
  .page-content { padding: 20px 16px 32px; }
}

/* ─── LOGIN PAGE ─────────────────────────────────────────── */
body.login-page {
  background: linear-gradient(135deg, #0f2347 0%, #1a3a6c 50%, #1a6fc4 100%);
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
}
.login-card {
  background: #fff; border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  width: 100%; max-width: 440px; padding: 48px 40px;
}
.login-logo { text-align: center; margin-bottom: 32px; }
.login-logo .logo-icon { width: 64px; height: 64px; background: linear-gradient(135deg, var(--primary), var(--primary-light)); border-radius: 16px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 30px; margin: 0 auto 16px; }
.login-logo h1 { font-size: 26px; font-weight: 800; color: var(--primary); margin: 0; }
.login-logo p { color: var(--text-muted); font-size: 13px; margin: 4px 0 0; }
.btn-login { width: 100%; padding: 13px; font-size: 15px; font-weight: 700; border-radius: 10px; background: linear-gradient(135deg, var(--primary), var(--primary-light)); border: none; color: #fff; transition: opacity var(--transition); }
.btn-login:hover { opacity: 0.9; }
.login-footer { text-align: center; margin-top: 24px; font-size: 13px; color: var(--text-muted); }

/* ─── REGISTRO EMPLEADO ──────────────────────────────────── */
body.register-page {
  background: linear-gradient(135deg, #0f2347, #1a6fc4);
  min-height: 100vh; padding: 40px 16px;
}
.register-container { max-width: 760px; margin: 0 auto; }
.register-card { background: #fff; border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.register-header { background: linear-gradient(135deg, var(--primary), var(--primary-light)); padding: 28px 36px; color: #fff; }
.register-steps { display: flex; gap: 0; }
.register-step { flex: 1; padding: 10px 16px; text-align: center; font-size: 12px; font-weight: 600; border-bottom: 3px solid transparent; color: rgba(255,255,255,0.5); transition: all var(--transition); }
.register-step.active { color: #fff; border-color: #fff; }
.register-step.done { color: rgba(255,255,255,0.8); border-color: rgba(255,255,255,0.4); }
.register-body { padding: 32px 36px; }

/* ─── UTILS ──────────────────────────────────────────────── */
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--primary-light); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; overflow: hidden; flex-shrink: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.avatar-lg { width: 72px; height: 72px; font-size: 24px; }

.section-divider { height: 1px; background: var(--border); margin: 24px 0; }

.empty-state { text-align: center; padding: 56px 24px; color: var(--text-muted); }
.empty-state i { font-size: 56px; display: block; margin-bottom: 16px; opacity: 0.4; }
.empty-state h5 { color: #374151; margin-bottom: 8px; }

/* ─── ANIMATIONS ─────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-fadeInUp { animation: fadeInUp 0.35s ease; }

.spinner-sigath { border: 3px solid var(--border); border-top-color: var(--primary-light); border-radius: 50%; width: 32px; height: 32px; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
