@charset "UTF-8";
/* ============================================================
   AGRCOLA BGS RRHH - ESTILOS GLOBALES
   ============================================================ */

:root {
  --color-primary:    #1a5c2e;
  --color-secondary:  #006400;
  --color-primary-light: #2d7a42;
  --color-primary-dark:  #143d20;
  --color-accent:     #4caf50;
  --color-bg:         #f5f5f0;
  --color-sidebar:    #1a3a24;
  --color-sidebar-hover: rgba(255,255,255,0.1);
  --color-sidebar-active: rgba(255,255,255,0.15);
  --color-white:      #ffffff;
  --color-text:       #1a1a2e;
  --color-text-muted: #6b7280;
  --color-border:     #e5e7eb;
  --color-border-light: #f0f0ec;
  --radius:           10px;
  --radius-sm:        6px;
  --radius-lg:        14px;
  --shadow-sm:        0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:        0 4px 12px rgba(0,0,0,0.10);
  --shadow-lg:        0 8px 30px rgba(0,0,0,0.12);
  --sidebar-width:    280px;
  --sidebar-collapsed:72px;
  --topbar-height:    64px;
  --font:             'Inter', sans-serif;
  --transition:       0.2s ease;
}

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

html { font-size: 14px; }

body {
  font-family: var(--font);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  width: var(--sidebar-width);
  background: var(--color-sidebar);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: width var(--transition);
  overflow: hidden;
}

.sidebar.collapsed { width: var(--sidebar-collapsed); }
.sidebar.collapsed .brand-name,
.sidebar.collapsed .brand-sub,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .sidebar-certs,
.sidebar.collapsed .auditor-mode { display: none; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 12px; }
.sidebar.collapsed .sidebar-header { justify-content: center; padding: 16px 10px; }

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 16px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo {
  flex-shrink: 0;
}

.logo-placeholder {
  width: 42px; height: 42px;
  background: var(--color-accent);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: white;
}

.brand-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.3px;
  display: block;
}

.brand-sub {
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: all var(--transition);
  margin-bottom: 2px;
  white-space: nowrap;
}

.nav-item i { font-size: 15px; width: 18px; text-align: center; flex-shrink: 0; }
.nav-item:hover { background: var(--color-sidebar-hover); color: #fff; }
.nav-item.active { background: var(--color-sidebar-active); color: #fff; border-left: 3px solid var(--color-accent); }

.nav-separator {
  font-size: 10px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  letter-spacing: 1px;
  padding: 12px 12px 4px;
  font-weight: 600;
}

.nav-badge {
  margin-left: auto;
  background: #e53e3e;
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

.sidebar-certs {
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.certs-label {
  font-size: 9px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.certs-badges { display: flex; gap: 8px; }

.cert-badge {
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff;
  cursor: pointer;
  transition: background var(--transition);
}
.cert-badge:hover { background: rgba(255,255,255,0.25); }

.auditor-mode {
  margin: 8px;
  background: rgba(76,175,80,0.2);
  border: 1px solid rgba(76,175,80,0.4);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #81c784;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-toggle {
  position: absolute;
  bottom: 16px; right: 8px;
  background: rgba(255,255,255,0.1);
  border: none;
  color: rgba(255,255,255,0.7);
  width: 28px; height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  transition: all var(--transition);
}
.sidebar-toggle:hover { background: rgba(255,255,255,0.2); }

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

.sidebar.collapsed ~ .main-wrapper {
  margin-left: var(--sidebar-collapsed);
}

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  height: var(--topbar-height);
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-left { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.topbar-module-icon { font-size: 18px; color: var(--color-primary); }
.topbar-title { font-size: 16px; font-weight: 600; color: var(--color-primary); white-space: nowrap; }
.topbar-menu-btn { background: none; border: none; cursor: pointer; font-size: 18px; color: var(--color-text-muted); display: none; }

.topbar-center { flex: 1; max-width: 500px; margin: 0 auto; }

.topbar-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 8px 16px;
}

.topbar-search i { color: var(--color-text-muted); font-size: 13px; }
.topbar-search input { border: none; background: none; outline: none; font-size: 13px; width: 100%; color: var(--color-text); }

.topbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* Notificaciones */
.notif-wrapper { position: relative; }
.notif-btn {
  background: none; border: none; cursor: pointer;
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--color-text-muted);
  position: relative;
  transition: background var(--transition);
}
.notif-btn:hover { background: var(--color-bg); }
.notif-dot {
  position: absolute; top: 4px; right: 4px;
  background: #e53e3e; color: white;
  font-size: 9px; font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
}
.notif-dropdown {
  position: absolute; right: 0; top: calc(100% + 8px);
  width: 320px; background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: none; z-index: 200;
}
.notif-dropdown.show { display: block; }
.notif-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--color-border); }
.notif-header span { font-weight: 600; font-size: 13px; }
.notif-header button { background: none; border: none; cursor: pointer; color: var(--color-primary); font-size: 12px; }
.notif-list { max-height: 300px; overflow-y: auto; }
.notif-empty { padding: 24px; text-align: center; color: var(--color-text-muted); font-size: 13px; }

/* User menu */
.user-menu-wrapper { position: relative; }
.user-menu-btn {
  display: flex; align-items: center; gap: 10px;
  background: none; border: 1px solid var(--color-border);
  border-radius: 8px; padding: 6px 12px 6px 8px;
  cursor: pointer;
  transition: all var(--transition);
}
.user-menu-btn:hover { background: var(--color-bg); }
.user-info { text-align: right; }
.user-name { font-size: 13px; font-weight: 600; display: block; }
.user-role { font-size: 11px; color: var(--color-text-muted); display: block; }
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--color-primary);
  color: white; font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }

.user-dropdown {
  position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 180px; background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 6px 0; display: none; z-index: 200;
}
.user-dropdown.show { display: block; }
.user-dropdown a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 16px; font-size: 13px; color: var(--color-text);
  text-decoration: none;
  transition: background var(--transition);
}
.user-dropdown a:hover { background: var(--color-bg); }
.user-dropdown a.text-danger { color: #e53e3e; }
.dropdown-divider { border-top: 1px solid var(--color-border); margin: 4px 0; }

.logout-btn {
  display: none;
  width: 38px; height: 38px; border-radius: 50%;
  background: none; border: none; cursor: pointer;
  color: var(--color-text-muted); font-size: 16px;
  align-items: center; justify-content: center;
  text-decoration: none;
  transition: background var(--transition);
}
.logout-btn:hover { background: var(--color-bg); color: #e53e3e; }

/* ============================================================
   FLASH ALERT
   ============================================================ */
.flash-alert {
  margin: 12px 24px 0;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; gap: 10px;
  font-size: 13.5px; font-weight: 500;
  animation: slideDown 0.3s ease;
}
.flash-alert button { margin-left: auto; background: none; border: none; cursor: pointer; font-size: 15px; opacity: 0.6; }
.flash-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.flash-error   { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.flash-warning { background: #fffbeb; border: 1px solid #fed7aa; color: #92400e; }
.flash-info    { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }

@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* ============================================================
   PAGE CONTENT
   ============================================================ */
.page-content {
  flex: 1;
  padding: 24px;
  max-width: 1400px;
  width: 100%;
}

.page-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--color-border);
  font-size: 12px;
  color: var(--color-text-muted);
  display: flex; align-items: center; gap: 12px;
}
.page-footer a { color: var(--color-text-muted); text-decoration: none; }
.page-footer a:hover { color: var(--color-primary); text-decoration: underline; }

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 24px; gap: 16px;
}
.page-title { font-size: 22px; font-weight: 700; color: var(--color-text); }
.page-subtitle { font-size: 13px; color: var(--color-text-muted); margin-top: 2px; }
.header-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
  display: flex; align-items: center; justify-content: space-between;
}
.card-header h3 { font-size: 14px; font-weight: 600; }
.card-body { padding: 20px; }
.card-body.p-0 { padding: 0; }
.card-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
  display: flex; justify-content: flex-end; gap: 10px;
}
.mb-4 { margin-bottom: 16px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }

.btn-link { font-size: 12px; color: var(--color-primary); text-decoration: none; font-weight: 500; }
.btn-link:hover { text-decoration: underline; }
.btn-link-danger { font-size: 12px; color: #e53e3e; text-decoration: none; font-weight: 500; cursor: pointer; }
.btn-link-danger:hover { text-decoration: underline; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 600;
  cursor: pointer;
  border: none; text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--color-primary); color: white;
}
.btn-primary:hover { background: var(--color-primary-light); }

.btn-secondary {
  background: var(--color-text-muted); color: white;
}
.btn-secondary:hover { background: #4b5563; }

.btn-ghost {
  background: transparent; color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}
.btn-ghost:hover { background: var(--color-bg); }

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

.btn-outline-sm {
  font-size: 12px; padding: 5px 12px;
  background: rgba(26,92,46,0.08); color: var(--color-primary);
  border: 1px solid rgba(26,92,46,0.2);
  border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none; font-weight: 500;
  transition: all var(--transition);
}
.btn-outline-sm:hover { background: var(--color-primary); color: white; }

.btn-outline-file {
  font-size: 12px; padding: 6px 12px;
  background: rgba(26,92,46,0.08); color: var(--color-primary);
  border: 1px solid rgba(26,92,46,0.2);
  border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer; font-weight: 500;
  transition: all var(--transition);
}
.btn-outline-file:hover { background: var(--color-primary); color: white; }

.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-block { width: 100%; justify-content: center; padding: 11px; }

.btn-action {
  width: 30px; height: 30px; border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; border: none; cursor: pointer; text-decoration: none;
  transition: all var(--transition);
}
.btn-view  { background: rgba(26,92,46,0.08); color: var(--color-primary); }
.btn-edit  { background: rgba(59,130,246,0.1); color: #3b82f6; }
.btn-delete{ background: rgba(239,68,68,0.1);  color: #ef4444; }
.btn-action:hover { filter: brightness(0.85); }

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; color: var(--color-text); margin-bottom: 6px; }
.required { color: #ef4444; }

.form-control, .form-select, textarea.form-control {
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 13.5px; color: var(--color-text);
  background: var(--color-white);
  transition: border-color var(--transition);
  font-family: var(--font);
}
.form-control:focus, .form-select:focus, textarea.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(26,92,46,0.08);
}

textarea.form-control { resize: vertical; min-height: 80px; }

.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.form-full { grid-column: 1 / -1; }
.form-section h4 { font-size: 14px; font-weight: 600; margin-bottom: 16px; color: var(--color-primary); border-bottom: 1px solid var(--color-border-light); padding-bottom: 8px; }
.form-actions { margin-top: 20px; display: flex; justify-content: flex-end; }

.input-icon-wrapper { position: relative; }
.input-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--color-text-muted); font-size: 14px; }
.input-icon-right { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--color-text-muted); }
.input-icon-wrapper .form-control { padding-left: 38px; }

.checkbox-label { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13.5px; }
.checkbox-label input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--color-primary); }

.inline-form { display: flex; gap: 10px; align-items: center; }
.inline-form .form-control, .inline-form .form-select { flex: 1; }

.file-upload-area { display: flex; align-items: center; gap: 12px; }

/* ============================================================
   TABLES
   ============================================================ */
.data-table {
  width: 100%; border-collapse: collapse;
  font-size: 13px;
}
.data-table thead tr { background: var(--color-bg); border-bottom: 2px solid var(--color-border); }
.data-table th {
  padding: 11px 16px; text-align: left;
  font-size: 11.5px; font-weight: 600;
  color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.5px;
}
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--color-border-light); vertical-align: middle; }
.data-table tbody tr:hover { background: rgba(26,92,46,0.02); }
.empty-cell { text-align: center; color: var(--color-text-muted); padding: 40px !important; }
.actions-cell { display: flex; gap: 6px; align-items: center; }

.table-sm { width: 100%; border-collapse: collapse; font-size: 13px; }
.table-sm th { padding: 8px 12px; font-size: 11px; font-weight: 600; color: var(--color-text-muted); text-transform: uppercase; border-bottom: 1px solid var(--color-border); }
.table-sm td { padding: 9px 12px; border-bottom: 1px solid var(--color-border-light); }

/* ============================================================
   STATS
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.stats-grid-4 { grid-template-columns: repeat(4, 1fr); }

.stat-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: var(--shadow-sm);
}
.stat-icon { font-size: 22px; width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-value { font-size: 24px; font-weight: 700; line-height: 1; }
.stat-label { font-size: 12px; color: var(--color-text-muted); margin-top: 2px; }

.stat-green  .stat-icon { background: rgba(26,92,46,0.1);  color: var(--color-primary); }
.stat-blue   .stat-icon { background: rgba(59,130,246,0.1); color: #3b82f6; }
.stat-teal   .stat-icon { background: rgba(20,184,166,0.1); color: #14b8a6; }
.stat-orange .stat-icon { background: rgba(249,115,22,0.1); color: #f97316; }
.stat-yellow .stat-icon { background: rgba(234,179,8,0.1);  color: #eab308; }
.stat-red    .stat-icon { background: rgba(239,68,68,0.1);  color: #ef4444; }
.stat-purple .stat-icon { background: rgba(168,85,247,0.1); color: #a855f7; }
.stat-gray   .stat-icon { background: rgba(107,114,128,0.1);color: #6b7280; }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px; font-weight: 600;
}
.badge-green   { background: #f0fdf4; color: #15803d; }
.badge-blue    { background: #eff6ff; color: #1d4ed8; }
.badge-yellow  { background: #fefce8; color: #a16207; }
.badge-orange  { background: #fff7ed; color: #c2410c; }
.badge-red     { background: #fef2f2; color: #b91c1c; }
.badge-gray    { background: #f9fafb; color: #6b7280; }
.badge-teal    { background: #f0fdfa; color: #0f766e; }
.badge-purple  { background: #faf5ff; color: #7e22ce; }
.badge-outline { background: transparent; border: 1px solid var(--color-border); color: var(--color-text-muted); }

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.45);
  display: none;
  align-items: center; justify-content: center;
  padding: 20px;
  backdrop-filter: blur(3px);
}
.modal-overlay.show { display: flex; }

.modal {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.25s ease;
}
.modal-lg { max-width: 700px; }

@keyframes modalIn { from { opacity:0; transform: scale(0.95) translateY(10px); } to { opacity:1; transform: scale(1) translateY(0); } }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--color-border);
}
.modal-header h3 { font-size: 15px; font-weight: 700; }
.modal-close {
  background: none; border: none; cursor: pointer;
  font-size: 22px; color: var(--color-text-muted); line-height: 1;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  transition: background var(--transition);
}
.modal-close:hover { background: var(--color-bg); }

.modal-body { padding: 22px; }

.modal-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
  margin-top: 8px;
}

/* ============================================================
   FILTERS
   ============================================================ */
.filters-bar { margin-bottom: 16px; }
.filters-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filter-select { min-width: 150px; }
.search-input-wrapper {
  flex: 1;
  display: flex; align-items: center; gap: 10px;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  min-width: 250px;
}
.search-input-wrapper i { color: var(--color-text-muted); font-size: 13px; flex-shrink: 0; }
.search-input-wrapper .form-control { border: none; padding: 0; box-shadow: none; }
.search-input-wrapper .form-control:focus { box-shadow: none; }
.search-input-wrapper form { flex: 1; }

/* ============================================================
   TABS
   ============================================================ */
.tabs-nav {
  display: flex; border-bottom: 2px solid var(--color-border);
  margin-bottom: 24px; gap: 4px;
}
.tab-btn {
  background: none; border: none; cursor: pointer;
  padding: 10px 16px;
  font-size: 13.5px; font-weight: 500;
  color: var(--color-text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
  display: flex; align-items: center; gap: 8px;
}
.tab-btn:hover { color: var(--color-primary); }
.tab-btn.active { color: var(--color-primary); border-bottom-color: var(--color-primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ============================================================
   DASHBOARD GRIDS
   ============================================================ */
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.dashboard-grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }

/* Bar charts */
.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.bar-label { min-width: 140px; font-size: 12px; color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { flex: 1; height: 8px; background: var(--color-bg); border-radius: 4px; overflow: hidden; position: relative; }
.bar-fill { height: 100%; background: var(--color-primary); border-radius: 4px; position: relative; display: flex; align-items: center; }
.bar-fill-label { position: absolute; right: 4px; font-size: 10px; color: white; font-weight: 600; }
.bar-fill-blue   { background: #3b82f6; }
.bar-fill-green  { background: var(--color-primary); }
.bar-fill-yellow { background: #eab308; }
.bar-fill-orange { background: #f97316; }
.bar-value { font-size: 12px; font-weight: 600; color: var(--color-text); min-width: 24px; text-align: right; }

/* Activities */
.activity-list { display: flex; flex-direction: column; gap: 10px; }
.activity-item { display: flex; gap: 10px; align-items: flex-start; }
.activity-icon { width: 28px; height: 28px; border-radius: 50%; background: var(--color-bg); display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; }
.activity-info { flex: 1; }
.activity-text { font-size: 12.5px; line-height: 1.4; }
.activity-time { font-size: 11px; color: var(--color-text-muted); margin-top: 2px; }

/* Birthdays */
.birthday-list { display: flex; flex-direction: column; gap: 10px; }
.birthday-item { display: flex; align-items: center; gap: 10px; }
.birthday-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--color-primary); color: white; font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.birthday-info { flex: 1; }
.birthday-info strong { font-size: 13px; display: block; }
.birthday-info span { font-size: 12px; color: var(--color-text-muted); }
.birthday-day { font-size: 18px; font-weight: 700; }

/* ============================================================
   PROFILE
   ============================================================ */
.profile-layout { display: grid; grid-template-columns: 280px 1fr; gap: 20px; }
.profile-sidebar-card {
  background: white; border: 1px solid var(--color-border);
  border-radius: var(--radius); padding: 24px;
  text-align: center; height: fit-content;
  box-shadow: var(--shadow-sm);
}
.profile-photo-wrapper { margin-bottom: 16px; }
.profile-photo { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; border: 3px solid var(--color-border); }
.profile-photo-placeholder {
  width: 110px; height: 110px; border-radius: 50%;
  background: var(--color-primary); color: white;
  font-size: 36px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto;
}
.profile-name { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.profile-cargo { font-size: 13px; color: var(--color-text-muted); margin-bottom: 10px; }
.profile-meta { margin-top: 16px; text-align: left; display: flex; flex-direction: column; gap: 8px; }
.meta-item { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.profile-firma { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--color-border); }

.profile-photo-section { display: flex; align-items: center; gap: 20px; margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--color-border-light); }
.photo-preview {
  width: 100px; height: 100px; border-radius: 50%;
  background: var(--color-bg); border: 2px dashed var(--color-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; color: var(--color-text-muted); overflow: hidden; flex-shrink: 0;
}
.photo-upload-btns { display: flex; flex-direction: column; gap: 8px; }

/* Info grid profile */
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.info-item { }
.info-label { font-size: 11px; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.5px; display: block; margin-bottom: 3px; }
.info-item span { font-size: 13.5px; font-weight: 500; }

/* Remuneraciones grid */
.rem-grid { }
.rem-item { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--color-border-light); }
.rem-total { border-top: 2px solid var(--color-border); border-bottom: none; }
.rem-label { font-size: 13px; }
.rem-value { font-size: 13px; }

/* ============================================================
   USER CELL
   ============================================================ */
.user-cell { display: flex; align-items: center; gap: 10px; }
.user-avatar-sm {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--color-primary); color: white;
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
}
.user-avatar-sm img { width: 100%; height: 100%; object-fit: cover; }
.user-fullname { font-size: 13px; font-weight: 500; }
.user-email { font-size: 12px; color: var(--color-text-muted); }

/* ============================================================
   CONFIGURACIÓN
   ============================================================ */
.config-layout { display: grid; grid-template-columns: 220px 1fr; gap: 20px; }
.config-nav { background: white; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 8px; height: fit-content; box-shadow: var(--shadow-sm); }
.config-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--color-text-muted); text-decoration: none;
  font-size: 13px; font-weight: 500;
  transition: all var(--transition);
  margin-bottom: 2px;
}
.config-nav-item:hover { background: var(--color-bg); color: var(--color-primary); }
.config-nav-item.active { background: rgba(26,92,46,0.08); color: var(--color-primary); font-weight: 600; }
.config-content { }

.areas-list, .cargos-list { display: flex; flex-direction: column; gap: 2px; }
.area-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; border-radius: var(--radius-sm);
  background: var(--color-bg); font-size: 13.5px;
}
.areas-level { margin-bottom: 12px; }
.areas-level-title { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--color-text-muted); letter-spacing: 0.5px; padding: 4px 12px; }

/* ============================================================
   CAPACITACIONES
   ============================================================ */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.cap-card { padding: 0; }
.cap-card-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--color-border-light); }
.cap-title { font-size: 14px; font-weight: 600; padding: 12px 16px 8px; }
.cap-meta { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 10px; font-size: 12px; color: var(--color-text-muted); }
.cap-meta span { display: flex; align-items: center; gap: 4px; }
.cap-area { font-size: 12px; color: var(--color-text-muted); padding: 0 16px 8px; }
.cap-desc { font-size: 12.5px; color: var(--color-text-muted); padding: 0 16px 10px; line-height: 1.5; }
.cap-card .btn-outline-sm { margin: 0 16px 16px; }
.cap-actions { display: flex; gap: 4px; }

/* ============================================================
   AUDITORÍA
   ============================================================ */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-header h3 { font-size: 16px; font-weight: 600; }
.certs-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-bottom: 24px; }
.cert-card { background: white; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); }
.cert-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.cert-badge-big { font-size: 13px; font-weight: 700; padding: 4px 12px; border-radius: 6px; }
.cert-GL { background: rgba(59,130,246,0.1); color: #1d4ed8; }
.cert-GR { background: rgba(26,92,46,0.1); color: var(--color-primary); }
.cert-Ra { background: rgba(245,158,11,0.1); color: #b45309; }
.cert-card h4 { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.cert-actions { display: flex; gap: 4px; }
.progress-bar-wrapper { display: flex; align-items: center; gap: 8px; margin: 10px 0; }
.progress-bar-track { flex: 1; height: 6px; background: var(--color-bg); border-radius: 3px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: var(--color-primary); border-radius: 3px; transition: width 0.5s ease; }
.progress-label { font-size: 11px; font-weight: 600; color: var(--color-primary); }

/* ============================================================
   DOCUMENTOS
   ============================================================ */
.doc-cell { display: flex; align-items: center; gap: 10px; }
.doc-icon { font-size: 22px; }
.docs-grid { display: flex; flex-direction: column; gap: 4px; }
.doc-card { display: flex; align-items: center; gap: 14px; padding: 12px; border: 1px solid var(--color-border-light); border-radius: var(--radius-sm); background: var(--color-bg); }
.doc-card-icon { font-size: 28px; flex-shrink: 0; }
.doc-card-info { flex: 1; }
.doc-card-info h4 { font-size: 13.5px; font-weight: 600; margin-bottom: 4px; }
.doc-card-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.doc-card-actions { display: flex; gap: 6px; }

/* ============================================================
   RECLAMOS - TOGGLE
   ============================================================ */
.toggle-box {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--color-bg); border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 16px;
}
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: var(--color-border); border-radius: 24px;
  transition: 0.3s;
}
.toggle-slider::before {
  content: ''; position: absolute;
  width: 18px; height: 18px; border-radius: 50%;
  background: white; left: 3px; top: 3px;
  transition: 0.3s; box-shadow: var(--shadow-sm);
}
.toggle-switch input:checked + .toggle-slider { background: var(--color-primary); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ============================================================
   INFO BANNER
   ============================================================ */
.info-banner {
  background: rgba(26,92,46,0.05); border: 1px solid rgba(26,92,46,0.15);
  border-radius: var(--radius); padding: 14px 18px;
  display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px;
}
.info-banner i { font-size: 20px; flex-shrink: 0; margin-top: 2px; }
.info-banner strong { font-size: 13.5px; font-weight: 600; display: block; margin-bottom: 2px; }
.info-banner p { font-size: 12.5px; color: var(--color-text-muted); }

/* ============================================================
   REPORTES
   ============================================================ */
.reportes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.resumen-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.resumen-item { text-align: center; padding: 20px; border: 1px solid var(--color-border-light); border-radius: var(--radius-sm); background: var(--color-bg); }
.resumen-value { font-size: 32px; font-weight: 700; line-height: 1; margin-bottom: 6px; }
.resumen-label { font-size: 13px; color: var(--color-text-muted); }

/* ============================================================
   SUPERADMIN
   ============================================================ */
.tables-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.table-card {
  background: white; border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); padding: 14px;
  display: flex; flex-direction: column; gap: 8px;
}
.table-card h4 { font-size: 13px; font-weight: 600; }
.table-card-actions { display: flex; gap: 6px; margin-top: auto; }

/* ============================================================
   EMPTY STATES
   ============================================================ */
.empty-state {
  text-align: center; padding: 60px 20px;
  color: var(--color-text-muted);
}
.empty-state i { font-size: 48px; opacity: 0.3; display: block; margin-bottom: 16px; }
.empty-state p { font-size: 14px; margin-bottom: 16px; }
.empty-state-sm { text-align: center; padding: 24px; color: var(--color-text-muted); font-size: 13px; }

/* ============================================================
   LOGIN
   ============================================================ */
.login-body {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-secondary) 100%);
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.login-wrapper {
  position: relative; z-index: 2; width: 100%; max-width: 440px; padding: 20px;
  display: flex; flex-direction: column; align-items: center;
}
.login-card {
  background: white; border-radius: var(--radius-lg);
  padding: 42px 40px 32px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.28);
  width: 100%;
}
/* Logo */
.login-logo {
  display: flex; align-items: center; justify-content: center;
  gap: 14px; margin-bottom: 22px; text-align: left;
}
.login-logo-img { height: 60px; width: auto; object-fit: contain; border-radius: 8px; }
.login-logo-icon {
  width: 56px; height: 56px; background: var(--color-primary);
  border-radius: 12px; display: flex; align-items: center;
  justify-content: center; font-size: 26px; color: white; flex-shrink: 0;
}
.login-brand-text { text-align: left; }
.login-brand { font-size: 21px; font-weight: 800; color: var(--color-primary); line-height: 1.2; margin: 0; }
.login-brand-sub { font-size: 10px; color: var(--color-text-muted); letter-spacing: 1.8px; text-transform: uppercase; margin: 2px 0 0; }
.login-divider { border: none; border-top: 1px solid var(--color-border); margin: 0 0 24px; }
.login-title { font-size: 22px; font-weight: 700; margin-bottom: 6px; text-align: center; }
.login-subtitle { font-size: 13.5px; color: var(--color-text-muted); margin-bottom: 24px; text-align: center; }
.login-footer { margin-top: 18px; text-align: center; font-size: 12px; color: var(--color-text-muted); }
.login-footer strong { color: var(--color-primary); }
/* Footer inferior */
.login-bottom-footer {
  margin-top: 20px; text-align: center;
  font-size: 11.5px; color: rgba(255,255,255,0.65);
  letter-spacing: 0.3px; line-height: 1.6;
}

.bg-circle { position: absolute; border-radius: 50%; opacity: 0.08; }
.bg-circle-1 { width: 400px; height: 400px; background: rgba(255,255,255,1); top: -150px; right: -100px; }
.bg-circle-2 { width: 300px; height: 300px; background: rgba(255,255,255,1); bottom: -100px; left: -80px; }
.bg-circle-3 { width: 200px; height: 200px; background: rgba(255,255,255,1); bottom: 50%; right: -50px; }

.alert { padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.alert-danger { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

/* ============================================================
   PERFIL EDITAR
   ============================================================ */
.total-preview {
  margin-top: 16px; padding: 12px 16px;
  background: rgba(26,92,46,0.05); border: 1px solid rgba(26,92,46,0.15);
  border-radius: var(--radius-sm); font-size: 14px;
}

/* ============================================================
   UTILITY
   ============================================================ */
.text-green  { color: var(--color-primary); }
.text-blue   { color: #3b82f6; }
.text-red    { color: #ef4444; }
.text-orange { color: #f97316; }
.text-teal   { color: #14b8a6; }
.text-gray   { color: #6b7280; }
.text-pink   { color: #ec4899; }
.text-muted  { color: var(--color-text-muted); }
.text-sm     { font-size: 12px; }
.text-center { text-align: center; }
.d-none      { display: none; }
.mt-2        { margin-top: 8px; }

/* Responsive */
@media (max-width: 1024px) {
  .dashboard-grid, .dashboard-grid-2, .reportes-grid { grid-template-columns: 1fr; }
  .profile-layout { grid-template-columns: 1fr; }
  .config-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.mobile-open { transform: translateX(0); }
  .main-wrapper { margin-left: 0; }
  .topbar-menu-btn { display: flex; }
  .topbar-center { display: none; }
  .user-info { display: none; }
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .resumen-grid { grid-template-columns: repeat(2, 1fr); }
  .logout-btn { display: flex; }
  .sidebar-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 99; display: none; }
  .sidebar-overlay.show { display: block; }
}
