/* Jornada · Asesora IT — panel de RH con lenguaje visual de Odoo y la identidad de Asesora IT */
:root {
  --brand: #E35005; --brand-600: #C44504; --brand-50: #FFF4EE; --cream: #FFFAF8; --peach: #FCD1B5;
  --odoo: #714B67; --odoo-50: #F4EEF3;
  --ink: #1C0A01; --text: #212529; --muted: #6C757D; --line: #E2E5E9; --bg: #F9FAFB; --card: #FFFFFF;
  --ok: #1F8A4C; --ok-50: #E6F4EC; --bad: #D23F3A; --bad-50: #FCEAE9; --warn: #8A5A00; --warn-50: #FFF4D6;
  --radius: 8px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-title: "IBM Plex Sans", "Inter", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14px; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-600); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.error { color: var(--bad); min-height: 1.2em; margin: 10px 0 0; }
small { font-weight: 400; color: var(--muted); }

/* ---------- formularios ---------- */
label { display: block; margin: 14px 0 0; font-weight: 600; font-size: 13px; color: var(--ink); }
input, select, textarea {
  display: block; width: 100%; margin-top: 6px; padding: 8px 10px; font: inherit; color: var(--text);
  border: 1px solid var(--line); border-radius: 6px; background: #fff; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(227, 80, 5, .15); }
input[type="checkbox"] { display: inline-block; width: 16px; height: 16px; margin: 0 8px 0 0; vertical-align: -3px; accent-color: var(--brand); box-shadow: none; }
.check { font-weight: 400; color: var(--text); display: flex; align-items: flex-start; gap: 0; }
.check input { margin-top: 1px; flex: none; }

/* ---------- botones ---------- */
button { font: inherit; cursor: pointer; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 14px; border-radius: 6px;
  border: 1px solid transparent; font-weight: 500; line-height: 1.3; white-space: nowrap; transition: background .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-600); color: #fff; }
.btn-secondary { background: #fff; color: var(--text); border-color: var(--line); }
.btn-secondary:hover { background: var(--bg); border-color: #cfd4da; color: var(--ink); }
.btn-odoo { background: var(--odoo); color: #fff; }
.btn-odoo:hover { background: #5e3d55; color: #fff; }
.btn-danger { background: #fff; color: var(--bad); border-color: #f1c1bf; }
.btn-danger:hover { background: var(--bad-50); }
.btn-link { background: none; border: 0; color: var(--brand); padding: 4px 6px; font-weight: 500; }
.btn-sm { padding: 3px 9px; font-size: 12.5px; }
.btn-block { width: 100%; margin-top: 22px; padding: 10px; font-size: 15px; }

/* ---------- acceso ---------- */
.auth { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.auth-hero { background: var(--cream); padding: 56px 64px; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.auth-hero::after {
  content: ""; position: absolute; right: -200px; bottom: -290px; width: 400px; height: 400px; border-radius: 50%;
  border: 32px solid var(--brand); opacity: .9; transform: rotate(-12deg) scaleX(1.15); z-index: 0;
}
.auth-hero > * { position: relative; z-index: 1; }
.logo-row { display: flex; align-items: center; gap: 12px; }
.logo-mark { width: 44px; height: 44px; }
.logo-text { font-family: var(--font-title); font-size: 28px; font-weight: 600; color: var(--ink); }
.auth-hero h1 { font-family: var(--font-title); font-weight: 300; font-size: clamp(30px, 3.4vw, 46px); line-height: 1.15; color: var(--ink); margin: 32px 0 22px; max-width: 560px; position: relative; z-index: 1; }
.hero-list { list-style: none; padding: 0; margin: 0 0 36px; position: relative; z-index: 1; }
.hero-list li { padding: 7px 0 7px 30px; position: relative; font-size: 16px; }
.hero-list li::before { content: ""; position: absolute; left: 0; top: 10px; width: 16px; height: 16px; border-radius: 50%; border: 4px solid var(--brand); }
.by { color: var(--muted); position: relative; z-index: 1; }
.by b { color: var(--brand); }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 32px; background: #fff; }
.auth-card { width: 100%; max-width: 380px; }
.tabs { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.tabs button { flex: 1; padding: 10px 4px; border: 0; background: none; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.active { color: var(--brand); border-bottom-color: var(--brand); }

/* ---------- barra superior estilo Odoo ---------- */
#shell { min-height: 100vh; display: flex; flex-direction: column; }
.navbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 16px; background: #fff; border-bottom: 1px solid var(--line); }
.nav-brand { display: flex; align-items: center; gap: 8px; padding-right: 14px; margin-right: 4px; border-right: 1px solid var(--line); cursor: pointer; }
.nav-brand img { width: 28px; height: 28px; }
.nav-brand span { font-family: var(--font-title); font-weight: 600; font-size: 18px; color: var(--ink); }
nav { display: flex; height: 100%; overflow-x: auto; scrollbar-width: none; }
nav a { display: flex; align-items: center; padding: 0 12px; color: var(--text); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
nav a:hover { color: var(--ink); background: var(--bg); }
nav a.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.company { color: var(--muted); font-size: 13px; white-space: nowrap; }
.avatar { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--odoo); color: #fff; font-weight: 600; font-size: 12px; }

/* ---------- panel de control (título + acciones) ---------- */
#view { flex: 1; width: 100%; }
.control { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 24px; background: #fff; border-bottom: 1px solid var(--line); }
.control h1 { font-family: var(--font-title); font-weight: 400; font-size: 21px; margin: 0; color: var(--ink); }
.control .sub { color: var(--muted); font-size: 13px; }
.control .actions-right { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.content { padding: 20px 24px 32px; max-width: 1400px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.filters label { margin: 0; font-size: 12px; color: var(--muted); font-weight: 500; }
.filters input, .filters select { width: auto; min-width: 140px; margin-top: 3px; padding: 6px 8px; }
h2 { font-family: var(--font-title); font-weight: 600; font-size: 15px; margin: 26px 0 10px; color: var(--ink); display: flex; align-items: center; gap: 10px; }

/* ---------- tarjetas ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; position: relative; overflow: hidden; }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--line); }
.kpi.brand::before { background: var(--brand); } .kpi.ok::before { background: var(--ok); }
.kpi.warn::before { background: #E9A800; } .kpi.bad::before { background: var(--bad); } .kpi.odoo::before { background: var(--odoo); }
.kpi .label { color: var(--muted); font-size: 13px; }
.kpi .n { font-family: var(--font-title); font-size: 32px; font-weight: 600; color: var(--ink); margin-top: 4px; line-height: 1.1; }
.sheet { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 18px; }
.sheet.cream { background: var(--cream); border-color: var(--peach); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 20px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.linkbox { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
code { background: var(--bg); border: 1px solid var(--line); padding: 3px 8px; border-radius: 6px; font-size: 12.5px; }

/* Promoción Odoo */
.promo { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; background: linear-gradient(100deg, var(--odoo-50), var(--cream)); border: 1px solid #e3d6e0; border-radius: var(--radius); padding: 18px 22px; margin-bottom: 18px; }
.promo .odoo-word { font-family: var(--font-title); font-size: 30px; font-weight: 600; color: var(--odoo); letter-spacing: -.5px; }
.promo h3 { margin: 0 0 4px; font-family: var(--font-title); font-weight: 600; font-size: 16px; color: var(--ink); }
.promo p { margin: 0; color: var(--text); }

/* ---------- listas estilo Odoo ---------- */
.table-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-weight: 600; color: var(--ink); background: #fff; position: sticky; top: 0; white-space: nowrap; font-size: 13px; }
tbody tr:hover { background: #F6F7F9; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.empty { color: var(--muted); text-align: center; padding: 28px; }
.who { display: flex; align-items: center; gap: 10px; }
.initials { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #fff; flex: none; }
.who small { display: block; }
.voided td { color: var(--muted); }
.voided td .strike { text-decoration: line-through; }
.actions { white-space: nowrap; display: flex; gap: 4px; justify-content: flex-end; }

/* insignias */
.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 500; background: #EEF0F2; color: var(--text); margin: 1px 3px 1px 0; white-space: nowrap; }
.badge.ok { background: var(--ok-50); color: var(--ok); }
.badge.bad { background: var(--bad-50); color: var(--bad); }
.badge.warn { background: var(--warn-50); color: var(--warn); }
.badge.brand { background: var(--brand-50); color: var(--brand-600); }
.badge.odoo { background: var(--odoo-50); color: var(--odoo); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: #c5cad0; }
.dot.ok { background: var(--ok); } .dot.warn { background: #E9A800; } .dot.bad { background: var(--bad); }

/* ---------- diálogo estilo Odoo ---------- */
dialog { border: 0; border-radius: 10px; padding: 0; width: min(620px, 94vw); box-shadow: 0 16px 48px rgba(0, 0, 0, .22); }
dialog::backdrop { background: rgba(28, 10, 1, .4); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.dlg-head h3 { margin: 0; font-family: var(--font-title); font-weight: 600; font-size: 17px; color: var(--ink); }
.dlg-x { border: 0; background: none; font-size: 22px; line-height: 1; color: var(--muted); padding: 0 4px; }
.dlg-body { padding: 6px 20px 18px; max-height: 70vh; overflow: auto; }
.dlg-foot { display: flex; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line); background: #fff; }
.pin { font-family: var(--font-title); font-size: 38px; font-weight: 600; letter-spacing: 10px; text-align: center; padding: 16px; color: var(--brand-600); background: var(--cream); border: 1px dashed var(--peach); border-radius: 10px; margin: 14px 0; }
.selfie { display: block; max-width: 100%; border-radius: 10px; margin: 12px auto 0; }
.days { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.days label { margin: 0; }
.days input { position: absolute; opacity: 0; pointer-events: none; }
.days span { display: inline-block; padding: 5px 11px; border: 1px solid var(--line); border-radius: 99px; font-weight: 500; cursor: pointer; user-select: none; }
.days input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.days input:focus-visible + span { box-shadow: 0 0 0 3px rgba(227, 80, 5, .25); }

.toast { position: fixed; bottom: 22px; right: 22px; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 8px; max-width: 440px; z-index: 20; box-shadow: 0 6px 24px rgba(0,0,0,.2); }
.toast.error { background: var(--bad); }
.footer { padding: 14px 24px; color: var(--muted); font-size: 12.5px; border-top: 1px solid var(--line); background: #fff; }

@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-hero { padding: 36px 28px; }
  .auth-hero::after { width: 260px; height: 260px; right: -110px; bottom: -120px; border-width: 24px; }
  .company { display: none; }
  .control, .content { padding-left: 14px; padding-right: 14px; }
  .control .actions-right { margin-left: 0; width: 100%; }
  .promo { grid-template-columns: 1fr; }
}
