/* ============================================================
   registrohoras.agired.com — estilos del producto
   Paleta tomada de la app real (distinta de la marca AGIRED usada
   en marketing): acento azul, fondos claros, tarjetas con sombra suave.
   ============================================================ */

:root {
  --rh-accent: #2563EB;
  --rh-accent-dark: #1D4ED8;
  --rh-navy: #142F5E;
  --rh-bg: #F7F9FC;
  --rh-card-bg: #FFFFFF;
  --rh-card-bg-soft: #F3F6FB;
  --rh-border: #EEF0F4;
  --rh-text: #1F2937;
  --rh-text-muted: #6B7280;
  --rh-green: #166534;
  --rh-green-bg: #DCFCE7;
  --rh-yellow: #92400E;
  --rh-yellow-bg: #FEF3C7;
  --rh-red: #991B1B;
  --rh-red-bg: #FEE2E2;
}

* { box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--rh-bg);
  color: var(--rh-text);
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- Topbar ---------- */
.rh-topbar { background: #fff; border-bottom: 1px solid var(--rh-border); position: sticky; top: 0; z-index: 20; }
.rh-topbar-inner { max-width: 1440px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 18px; }
.rh-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--rh-navy); font-size: 18px; }
.rh-brand-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--rh-accent); display: inline-block; }
.rh-brand-sub { font-weight: 500; color: var(--rh-text-muted); font-size: 13px; }
.rh-tenant-chip { color: var(--rh-accent); font-weight: 700; font-size: 12px; letter-spacing: .4px; background: #EFF4FF; padding: 6px 12px; border-radius: 20px; }
.rh-topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.rh-notif-btn { position: relative; border: none; background: none; color: var(--rh-text-muted); padding: 8px; border-radius: 8px; }
.rh-notif-btn:hover { background: var(--rh-card-bg-soft); }
.rh-notif-badge { position: absolute; top: 2px; right: 2px; background: #DC2626; color: #fff; font-size: 10px; font-weight: 700; border-radius: 10px; padding: 1px 5px; }
.rh-notif-panel { width: 340px; padding: 0; max-height: 420px; overflow-y: auto; }
.rh-notif-panel-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; font-weight: 700; border-bottom: 1px solid var(--rh-border); font-size: 13px; }
.rh-notif-empty { padding: 20px; color: var(--rh-text-muted); font-size: 13px; text-align: center; }
.rh-notif-item { display: block; padding: 12px 16px; border-bottom: 1px solid var(--rh-border); color: var(--rh-text); }
.rh-notif-item:hover { background: var(--rh-card-bg-soft); text-decoration: none; }
.rh-notif-item.is-unread { background: #F5F9FF; }
.rh-notif-item-title { font-weight: 700; font-size: 13px; }
.rh-notif-item-msg { font-size: 12.5px; color: var(--rh-text-muted); margin-top: 2px; }
.rh-notif-item-time { font-size: 11px; color: #9CA3AF; margin-top: 4px; }

.rh-user-btn { border: none; background: none; display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 20px; }
.rh-user-btn:hover { background: var(--rh-card-bg-soft); }
.rh-user-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--rh-accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.rh-user-name { font-size: 13.5px; font-weight: 600; }

/* ---------- Layout shell ---------- */
.rh-shell { max-width: 1440px; margin: 0 auto; display: flex; gap: 28px; padding: 24px; align-items: flex-start; }
.rh-sidebar { width: 240px; flex-shrink: 0; }
.rh-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 84px; }
.rh-nav-link { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; color: var(--rh-text); font-weight: 600; font-size: 14px; }
.rh-nav-link:hover { background: var(--rh-card-bg-soft); text-decoration: none; }
.rh-nav-link.active { background: #EFF4FF; color: var(--rh-accent); }
.rh-nav-icon { display: inline-flex; opacity: .85; }
.rh-main { flex: 1; min-width: 0; }

/* ---------- Page head ---------- */
.rh-page-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 22px; gap: 16px; flex-wrap: wrap; }
.rh-eyebrow { color: var(--rh-accent); font-weight: 700; font-size: 12px; letter-spacing: .5px; margin-bottom: 6px; }
.rh-title { font-size: 26px; font-weight: 800; color: var(--rh-navy); margin: 0 0 6px; }
.rh-sub { color: var(--rh-text-muted); font-size: 14px; }
.rh-period-nav { display: flex; align-items: center; gap: 10px; }
.rh-period-label { font-weight: 700; color: var(--rh-navy); font-size: 14px; }

/* ---------- Buttons ---------- */
.btn-rh-primary { background: var(--rh-accent); border-color: var(--rh-accent); color: #fff; font-weight: 600; }
.btn-rh-primary:hover { background: var(--rh-accent-dark); border-color: var(--rh-accent-dark); color: #fff; }
.btn-rh-outline { background: #fff; border: 1.5px solid #D1D5DB; color: #374151; font-weight: 600; }
.btn-rh-outline:hover { background: var(--rh-card-bg-soft); color: #374151; }

/* ---------- Cards / KPIs ---------- */
.rh-card { background: var(--rh-card-bg); border: 1px solid var(--rh-border); border-radius: 12px; padding: 22px 24px; box-shadow: 0 1px 2px rgba(16,24,40,0.04); margin-bottom: 24px; }
.rh-card-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.rh-card-eyebrow { color: var(--rh-accent); font-weight: 700; font-size: 11px; letter-spacing: .4px; margin-bottom: 4px; }
.rh-card-title { font-size: 18px; font-weight: 800; color: var(--rh-navy); }
.rh-pill-count { background: #F3F4F6; color: #4B5563; font-size: 12.5px; font-weight: 600; padding: 5px 12px; border-radius: 20px; height: fit-content; }
.rh-empty { color: var(--rh-text-muted); padding: 30px 0; text-align: center; font-size: 14px; }

.rh-kpi-row { display: flex; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.rh-kpi-card { flex: 1; min-width: 200px; background: #fff; border: 1px solid var(--rh-border); border-radius: 12px; padding: 18px 20px; box-shadow: 0 1px 2px rgba(16,24,40,0.04); }
.rh-kpi-label { font-size: 12.5px; color: var(--rh-text-muted); margin-bottom: 8px; }
.rh-kpi-value { font-size: 26px; font-weight: 800; color: #111827; }

.rh-info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 18px; }
.rh-info-card { background: var(--rh-card-bg-soft); border-radius: 10px; padding: 14px 16px; }
.rh-info-label { font-size: 10.5px; font-weight: 700; letter-spacing: .4px; color: #8B95A5; margin-bottom: 6px; }
.rh-info-value { font-size: 14px; font-weight: 700; color: #1F2937; }

.rh-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 22px; }
.rh-stat-card { background: #fff; border: 1px solid var(--rh-border); border-radius: 12px; padding: 16px 18px; box-shadow: 0 1px 2px rgba(16,24,40,0.04); position: relative; }
.rh-stat-label { font-size: 12.5px; color: var(--rh-text-muted); font-weight: 500; margin-bottom: 10px; }
.rh-stat-dot { position: absolute; top: 16px; right: 16px; width: 24px; height: 24px; border-radius: 50%; }
.rh-stat-value { font-size: 24px; font-weight: 800; color: #111827; }
.rh-stat-caption { font-size: 11.5px; color: #9CA3AF; margin-top: 6px; }

.rh-nav-card { background: #fff; border: 1px solid var(--rh-border); border-radius: 12px; padding: 14px 22px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.rh-nav-link-inline { color: var(--rh-accent); font-weight: 600; font-size: 14px; }
.rh-actions-row { display: flex; justify-content: flex-end; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.rh-filter-row { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }

/* ---------- Bar chart (dashboard comparativo) ---------- */
.rh-bar-chart { display: flex; align-items: flex-end; gap: 28px; min-height: 200px; padding: 10px 6px 0; overflow-x: auto; }
.rh-bar-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.rh-bar { width: 56px; border-radius: 8px 8px 0 0; background: var(--rh-accent); min-width: 56px; }
.rh-bar-label { font-size: 12px; color: #4B5563; font-weight: 600; text-align: center; max-width: 90px; }
.rh-bar-value { font-size: 12.5px; font-weight: 800; color: #111827; }

/* ---------- Tables ---------- */
.rh-table thead th { text-align: left; font-size: 11px; color: #9CA3AF; font-weight: 700; letter-spacing: .4px; border-bottom: 1px solid var(--rh-border); padding: 8px 6px; }
.rh-table td { padding: 14px 6px; border-bottom: 1px solid #F3F4F6; vertical-align: top; }
.rh-row-date { font-weight: 700; font-size: 13.5px; color: #1F2937; white-space: nowrap; }
.rh-row-desc { font-size: 13.5px; color: #1F2937; }
.rh-row-by { font-size: 11.5px; color: #9CA3AF; margin-top: 2px; }
.rh-hours-pill { display: inline-block; background: var(--rh-accent); color: #fff; font-weight: 700; font-size: 12.5px; padding: 4px 12px; border-radius: 16px; margin-right: 8px; }
.link-edit { color: var(--rh-accent); font-weight: 600; font-size: 12.5px; }

/* ---------- Badges ---------- */
.badge-pending, .badge-approved, .badge-rejected { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 4px 11px; border-radius: 14px; }
.badge-pending { background: var(--rh-yellow-bg); color: var(--rh-yellow); }
.badge-approved { background: var(--rh-green-bg); color: var(--rh-green); }
.badge-rejected { background: var(--rh-red-bg); color: var(--rh-red); }

/* ---------- Alerts ---------- */
.rh-alert { border-radius: 10px; font-size: 14px; margin-bottom: 20px; }

/* ---------- Auth pages (login / recuperar / activar) ---------- */
.rh-auth-body { background: linear-gradient(160deg, #0B2B3C 0%, #123449 60%, #0B2B3C 100%); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; font-family: 'Inter', sans-serif; }
.rh-auth-card { background: #fff; border-radius: 16px; padding: 40px 36px; width: 100%; max-width: 420px; box-shadow: 0 30px 60px rgba(0,0,0,.25); }
.rh-auth-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--rh-navy); font-size: 16px; margin-bottom: 22px; }
.rh-auth-title { font-size: 24px; font-weight: 800; color: var(--rh-navy); margin-bottom: 6px; }
.rh-auth-sub { color: var(--rh-text-muted); font-size: 14px; margin-bottom: 20px; }
.rh-auth-footer { text-align: center; margin-top: 18px; font-size: 13.5px; }

/* ---------- Informe imprimible ---------- */
.rh-report-body { background: #fff; }
.rh-report-toolbar { position: sticky; top: 0; background: #fff; padding: 16px 24px; border-bottom: 1px solid var(--rh-border); text-align: right; }
.rh-report-sheet { max-width: 860px; margin: 0 auto; padding: 32px 40px 60px; }
.rh-report-header { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid var(--rh-navy); padding-bottom: 14px; margin-bottom: 20px; }
.rh-report-brand { font-weight: 800; color: var(--rh-navy); font-size: 13px; letter-spacing: .3px; }
.rh-report-client { font-weight: 700; color: #1F2937; margin-top: 4px; }
.rh-report-period { font-weight: 600; color: var(--rh-text-muted); }
.rh-report-title { font-size: 22px; font-weight: 800; text-align: center; margin: 10px 0 22px; color: var(--rh-navy); }
.rh-report-meta { display: flex; gap: 24px; flex-wrap: wrap; margin-bottom: 18px; font-size: 13.5px; }
.rh-report-summary { width: 100%; border-collapse: collapse; margin-bottom: 26px; }
.rh-report-summary th { background: var(--rh-accent); color: #fff; font-size: 11px; letter-spacing: .3px; padding: 10px; text-align: left; }
.rh-report-summary td { border: 1px solid var(--rh-border); padding: 12px 10px; font-weight: 700; font-size: 15px; }
.rh-report-pct { color: var(--rh-green); }
.rh-report-section-title { font-weight: 800; color: var(--rh-navy); margin-bottom: 10px; }
.rh-report-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rh-report-table thead th { background: #1E293B; color: #fff; padding: 8px 10px; text-align: left; }
.rh-report-table td { padding: 9px 10px; border-bottom: 1px solid var(--rh-border); }
.rh-report-zebra { background: #FBFBFD; }
.rh-report-table tfoot td { border-top: 2px solid var(--rh-navy); border-bottom: none; }
.rh-report-footer { margin-top: 30px; font-size: 11px; color: #9CA3AF; text-align: center; }

@media print {
  .no-print, .rh-report-toolbar { display: none !important; }
  .rh-report-sheet { padding: 0; }
}
