/* Clínicas Grupal · colours taken from the client's logo and documents */
:root {
  --brand: #1374d6;        /* logo blue */
  --brand-600: #0f63b8;
  --brand-50: #eaf3fd;
  --brand-100: #d5e7fb;
  --accent: #ffc72c;       /* logo yellow */
  --navy: #12305a;         /* document headers */
  --ink: #16243a;
  --muted: #64748b;
  --line: #e4e9f0;
  --line-2: #eef2f6;
  --bg: #f4f7fb;
  --card: #ffffff;
  --ok: #138a4f;   --ok-50: #e7f6ee;
  --warn: #a05a00; --warn-50: #fff4dd;
  --bad: #c0352b;  --bad-50: #fdecea;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 36, 70, .04), 0 4px 16px rgba(16, 36, 70, .05);
  --sidebar: 256px;
  font-size: 15px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-600); }
h1 { font-size: 1.6rem; line-height: 1.25; margin: 0 0 1rem; color: var(--navy); font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 1.02rem; margin: 0 0 .9rem; color: var(--navy); font-weight: 650; }
h3 { font-size: .9rem; margin: 1.1rem 0 .45rem; color: var(--ink); font-weight: 600; }
small, .muted { color: var(--muted); }
.ic { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ---------------------------------------------------------------- shell */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar); flex-shrink: 0; background: var(--card); border-right: 1px solid var(--line);
  position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; z-index: 30;
}
.side-brand { padding: 1.25rem 1.25rem 1rem; border-bottom: 1px solid var(--line-2); }
.side-brand img { height: 60px; width: auto; display: block; margin-left: -6px; }
.side-nav { flex: 1; overflow-y: auto; padding: .9rem .75rem; }
.side-section { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: #94a3b8; padding: .9rem .75rem .4rem; }
.side-nav a {
  display: flex; align-items: center; gap: .7rem; padding: .58rem .75rem; margin-bottom: 2px;
  border-radius: 10px; color: #3b4a60; font-weight: 500; font-size: .93rem;
}
.side-nav a:hover { background: var(--bg); color: var(--navy); }
.side-nav a.active { background: var(--brand-50); color: var(--brand); font-weight: 600; }
.side-nav a.active .ic { color: var(--brand); }
.side-nav .count { margin-left: auto; background: var(--accent); color: var(--navy); font-size: .72rem; font-weight: 700; border-radius: 999px; padding: .05rem .5rem; }
.side-user { border-top: 1px solid var(--line-2); padding: .9rem 1rem 1rem; }
.who { display: flex; align-items: center; gap: .7rem; margin-bottom: .7rem; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center;
  font-weight: 600; font-size: .85rem; flex-shrink: 0;
}
.who b { display: block; font-size: .88rem; color: var(--ink); line-height: 1.2; }
.who span { display: block; font-size: .76rem; color: var(--muted); line-height: 1.3; }
.side-actions { display: flex; gap: .4rem; }
.side-actions a, .side-actions button {
  flex: 1; display: inline-flex; justify-content: center; align-items: center; gap: .35rem; font: inherit; font-size: .8rem;
  padding: .42rem .5rem; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: #3b4a60; cursor: pointer;
}
.side-actions a:hover, .side-actions button:hover { background: var(--bg); }
.side-actions form { flex: 1; display: flex; margin: 0; }
.side-actions .ic { width: 15px; height: 15px; }

.main { flex: 1; margin-left: var(--sidebar); min-width: 0; }
.content { max-width: 1240px; margin: 0 auto; padding: 2rem 2.25rem 3.5rem; }
.mobilebar { display: none; }
.overlay { display: none; }

/* --------------------------------------------------------------- blocks */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.4rem; margin-bottom: 1.25rem; box-shadow: var(--shadow); }
.card > h2:first-child { margin-top: 0; }
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-side { grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr); }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.page-head h1 { margin: 0 0 .35rem; }
.page-head .sub { color: var(--muted); font-size: .92rem; margin: 0; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1.4rem; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--brand-100); }
.stat.primary::before { background: var(--brand); }
.stat.accent::before { background: var(--accent); }
.stat span { display: block; color: var(--muted); font-size: .8rem; font-weight: 500; }
.stat b { display: block; font-size: 1.85rem; color: var(--navy); font-weight: 700; line-height: 1.15; margin-top: .25rem; font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; }
.card.table-wrap { padding: 0; }
.card.table-wrap > h2, .card.table-wrap > .page-head { padding: 1.2rem 1.4rem 0; }
.card.table-wrap > .pagination { padding: 0 1.4rem 1.1rem; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .75rem 1rem; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
th { background: #f8fafc; color: var(--muted); font-weight: 600; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
th:first-child, td:first-child { padding-left: 1.4rem; }
th:last-child, td:last-child { padding-right: 1.4rem; }
.card:not(.table-wrap) th:first-child, .card:not(.table-wrap) td:first-child { padding-left: .6rem; }
.card:not(.table-wrap) th:last-child, .card:not(.table-wrap) td:last-child { padding-right: .6rem; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fafcff; }
tfoot th { background: #fff; border-top: 1px solid var(--line); color: var(--navy); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td a b { color: var(--navy); }
td a:hover b { color: var(--brand); }

dl.data { display: grid; grid-template-columns: 190px 1fr; gap: .55rem 1rem; margin: 0; font-size: .92rem; }
dl.data dt { color: var(--muted); }
dl.data dd { margin: 0; color: var(--ink); font-weight: 500; }

/* ---------------------------------------------------------------- forms */
.field { margin: 0 0 1rem; }
label { display: block; font-weight: 600; font-size: .84rem; color: #334155; margin-bottom: .35rem; }
input[type=text], input[type=password], input[type=email], input[type=date], input[type=time], input[type=number], input[type=search], select, textarea {
  width: 100%; padding: .62rem .8rem; border: 1px solid #d3dbe5; border-radius: 10px; font: inherit; font-size: .93rem;
  background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-100); }
input[type=checkbox] { width: 1.05rem; height: 1.05rem; accent-color: var(--brand); vertical-align: -3px; margin: 0 .35rem 0 0; }
input[type=file] { font: inherit; font-size: .85rem; width: 100%; padding: .55rem; border: 1px dashed #c4cfdc; border-radius: 10px; background: #fafcff; }
input[type=file]::file-selector-button { font: inherit; font-weight: 600; border: 0; background: var(--brand-50); color: var(--brand); padding: .4rem .8rem; border-radius: 8px; margin-right: .7rem; cursor: pointer; }
.helptext, .field small { display: block; color: var(--muted); font-size: .78rem; margin-top: .3rem; }
.errorlist { list-style: none; padding: 0; margin: .35rem 0 0; color: var(--bad); font-size: .82rem; }
.checks { display: grid; gap: .35rem; }
.checks > div, .checks li { margin: 0; }
.checks label { display: flex; align-items: center; font-weight: 500; font-size: .9rem; margin: 0; padding: .45rem .6rem; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.checks label:hover { background: var(--bg); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.25rem; }
.form-grid .wide { grid-column: 1 / -1; }
.check-row { display: flex; align-items: center; gap: .1rem; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 1rem; }
.check-row label { display: inline; margin: 0; font-weight: 500; font-size: .9rem; }
.filters { display: flex; flex-wrap: wrap; gap: .8rem; align-items: flex-end; padding: 1rem 1.2rem; }
.filters .field { margin: 0; min-width: 170px; flex: 1; }

/* -------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem; border: 1px solid var(--brand); background: var(--brand);
  color: #fff; padding: .6rem 1.05rem; border-radius: 10px; font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer;
  text-decoration: none; transition: background .15s, box-shadow .15s; white-space: nowrap;
}
.btn:hover { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--brand-100); }
.btn.secondary { background: #fff; color: #334155; border-color: #d3dbe5; }
.btn.secondary:hover { background: var(--bg); color: var(--navy); }
.btn.danger { background: var(--bad); border-color: var(--bad); }
.btn.danger:hover { background: #a42b22; }
.btn.small { padding: .38rem .75rem; font-size: .82rem; border-radius: 8px; }
.btn.block { width: 100%; }
.btn .ic { width: 16px; height: 16px; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

/* ---------------------------------------------------------------- pills */
.pill { display: inline-flex; align-items: center; gap: .3rem; padding: .18rem .62rem; border-radius: 999px; font-size: .75rem; font-weight: 600; background: var(--brand-50); color: var(--brand-600); white-space: nowrap; }
.pill.ok { background: var(--ok-50); color: var(--ok); }
.pill.warn { background: var(--warn-50); color: var(--warn); }
.pill.bad { background: var(--bad-50); color: var(--bad); }
.pill.grey { background: #eef2f6; color: #526077; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge { display: inline-block; min-width: 1.3rem; padding: 0 .4rem; border-radius: 999px; font-size: .72rem; font-weight: 700; text-align: center; margin-left: .3rem; background: var(--accent); color: var(--navy); }

/* ------------------------------------------------------------- messages */
.messages { list-style: none; padding: 0; margin: 0 0 1.2rem; }
.messages li { padding: .8rem 1rem; border-radius: 10px; margin-bottom: .5rem; background: var(--brand-50); color: var(--navy); border: 1px solid var(--brand-100); font-size: .92rem; }
.messages li.success { background: var(--ok-50); color: var(--ok); border-color: #c5e9d5; }
.messages li.error { background: var(--bad-50); color: var(--bad); border-color: #f6cfcb; }
.notice { display: flex; gap: .75rem; padding: 1rem 1.1rem; border-radius: 12px; background: var(--warn-50); color: #6b4300; border: 1px solid #f3dca8; margin-bottom: 1.2rem; font-size: .92rem; }
.notice .ic { color: var(--warn); margin-top: 2px; }
.notice.info { background: var(--brand-50); color: var(--navy); border-color: var(--brand-100); }
.notice.info .ic { color: var(--brand); }

/* ------------------------------------------------------------ case file */
.case-title { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.case-ref { font-size: .8rem; font-weight: 600; color: var(--muted); letter-spacing: .03em; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; padding: .62rem 0; border-bottom: 1px solid var(--line-2); font-size: .9rem; }
.checklist li:last-child { border-bottom: 0; }
.checklist .pill { flex-shrink: 0; }
.progress { height: 8px; background: var(--line-2); border-radius: 999px; overflow: hidden; margin: .2rem 0 1rem; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), #3d9bf0); border-radius: 999px; }
.doclist { list-style: none; padding: 0; margin: 0 0 .4rem; }
.doclist li { display: flex; align-items: center; gap: .6rem; padding: .5rem .65rem; border: 1px solid var(--line-2); border-radius: 10px; margin-bottom: .4rem; font-size: .9rem; }
.doclist li .ic { color: var(--brand); }
.doclist li small { margin-left: auto; white-space: nowrap; }
.timeline { list-style: none; padding: 0 0 0 .2rem; margin: 0; max-height: 440px; overflow-y: auto; }
.timeline li { position: relative; padding: 0 0 .9rem 1.2rem; border-left: 2px solid var(--line); margin-left: .3rem; font-size: .88rem; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: .35rem; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--brand); }
.timeline li:last-child { border-left-color: transparent; }
.timeline li small { display: block; font-size: .76rem; }
.note { background: #fbfcfe; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 10px; padding: .7rem .9rem; margin-bottom: .6rem; white-space: pre-wrap; font-size: .9rem; }
.note small { display: block; white-space: normal; margin-top: .35rem; font-size: .76rem; }
.upload-box { margin-top: 1.1rem; padding-top: 1.1rem; border-top: 1px solid var(--line-2); }

/* -------------------------------------------------------------- lawyers */
.person { display: flex; gap: .85rem; padding: .85rem 0; border-bottom: 1px solid var(--line-2); }
.person:last-child { border-bottom: 0; }
.person .avatar { background: var(--brand-50); color: var(--brand); }
.person b { color: var(--navy); }
.person .lines { font-size: .87rem; color: #475569; }

/* ----------------------------------------------------------------- auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: #fff; }
.auth-side {
  background:
    linear-gradient(180deg, rgba(10, 30, 62, .55) 0%, rgba(10, 30, 62, .35) 25%, rgba(10, 30, 62, .82) 45%, rgba(10, 30, 62, .94) 75%, rgba(10, 30, 62, .97) 100%),
    linear-gradient(90deg, rgba(19, 116, 214, .35), rgba(19, 116, 214, 0) 60%),
    url("img/login.cb0df750bcf9.jpg") center 30% / cover no-repeat, var(--navy);
  color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
}
.auth-side::after { content: ""; position: absolute; left: 3rem; right: 3rem; bottom: 0; height: 4px; background: linear-gradient(90deg, var(--accent), var(--brand)); border-radius: 4px 4px 0 0; }
.auth-side .mark { background: #fff; border-radius: 16px; padding: .9rem 1.1rem; display: inline-block; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.auth-side .mark img { height: 70px; display: block; }
.auth-side h2 { color: #fff; font-size: 1.9rem; line-height: 1.2; font-weight: 700; margin: 0 0 .8rem; max-width: 420px; }
.auth-side p { color: #c7d8f0; max-width: 420px; margin: 0; }
.auth-side ul { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: .6rem; color: #dbe7f7; font-size: .92rem; }
.auth-side li { display: flex; gap: .6rem; align-items: center; }
.auth-side li .ic { color: var(--accent); }
.auth-side .foot { font-size: .78rem; color: #8fa9cc; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 2.5rem 1.5rem; }
.auth-box { width: 100%; max-width: 400px; }
.auth-box .logo-m { display: none; }
.auth-box h1 { margin-bottom: .35rem; }
.auth-box .lead { color: var(--muted); margin: 0 0 1.6rem; }
.qr { display: flex; justify-content: center; margin: .9rem 0; padding: .8rem; border: 1px solid var(--line); border-radius: 12px; }
.steps { padding-left: 1.1rem; margin: 0 0 .5rem; color: #334155; font-size: .9rem; }
.steps li { margin-bottom: .25rem; }
.secret { font-family: ui-monospace, Consolas, monospace; background: var(--bg); padding: .5rem .7rem; border-radius: 8px; text-align: center; letter-spacing: .06em; font-size: .85rem; }
.code-input { font-size: 1.6rem !important; letter-spacing: .5em; text-align: center; font-weight: 600; padding: .7rem !important; }
.linkbtn { background: none; border: 0; color: var(--muted); font: inherit; font-size: .88rem; cursor: pointer; }
.linkbtn:hover { color: var(--navy); }

.pagination { display: flex; gap: .6rem; align-items: center; justify-content: center; margin-top: 1rem; font-size: .88rem; color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 2rem 1rem !important; }

/* ----------------------------------------------------------- responsive */
@media (max-width: 1080px) {
  .grid-side { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0,0,0,.15); }
  body.menu-open .sidebar { transform: none; }
  body.menu-open .overlay { display: block; position: fixed; inset: 0; background: rgba(15, 30, 55, .35); z-index: 25; }
  .main { margin-left: 0; }
  .mobilebar {
    display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 20;
    background: #fff; border-bottom: 1px solid var(--line); padding: .6rem 1rem;
  }
  .mobilebar img { height: 34px; }
  .mobilebar button { background: none; border: 1px solid var(--line); border-radius: 9px; padding: .4rem .5rem; color: var(--navy); display: flex; }
  .content { padding: 1.2rem 1rem 2.5rem; }
  .grid-2, .grid-3, .form-grid { grid-template-columns: 1fr; }
  h1 { font-size: 1.35rem; }
  dl.data { grid-template-columns: 1fr; gap: .1rem; }
  dl.data dd { margin-bottom: .65rem; }
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-box .logo-m { display: block; height: 52px; margin: 0 auto 1.5rem; }
  .auth-box h1, .auth-box .lead { text-align: center; }
  table.stack thead { display: none; }
  table.stack tr { display: block; border-bottom: 1px solid var(--line); padding: .5rem 0; }
  table.stack td { display: flex; justify-content: space-between; gap: 1rem; border: 0; padding: .3rem 1rem !important; text-align: right; }
  table.stack td::before { content: attr(data-label); color: var(--muted); font-size: .78rem; font-weight: 600; text-align: left; }
  .filters .field { min-width: 100%; }
}

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative; overflow: hidden; border-radius: 18px; margin-bottom: 1.5rem; min-height: 190px;
  background: linear-gradient(120deg, #0f2f5c 0%, #12407e 55%, #1374d6 100%); color: #fff; box-shadow: var(--shadow);
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
}
.hero-body { padding: 1.9rem 2rem; position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: center; }
.hero-date { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: #a9c8ef; font-weight: 600; }
.hero h1 { color: #fff; font-size: 1.75rem; margin: .35rem 0 .45rem; }
.hero p { color: #d3e3f7; margin: 0; max-width: 520px; font-size: .95rem; }
.hero .actions { margin-top: 1.1rem; }
.hero .btn { background: #fff; color: var(--navy); border-color: #fff; }
.hero .btn:hover { background: #eef5ff; color: var(--navy); }
.hero .btn.ghost { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.35); }
.hero .btn.ghost:hover { background: rgba(255,255,255,.18); }
.hero-photo { position: relative; background-size: cover; background-position: center; }
.hero-photo::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #12407e 0%, rgba(18, 64, 126, .55) 30%, rgba(18, 64, 126, 0) 70%); }
.hero::after { content: ""; position: absolute; left: 0; bottom: 0; height: 4px; width: 100%; background: linear-gradient(90deg, var(--accent) 0 18%, transparent 18%); z-index: 3; }
.hero-kpis { display: flex; gap: 1.6rem; margin-top: 1.1rem; flex-wrap: wrap; }
.hero-kpis div b { display: block; font-size: 1.5rem; color: #fff; line-height: 1.1; }
.hero-kpis div span { font-size: .78rem; color: #a9c8ef; }

/* ------------------------------------------------------- stage colours */
.pill.stage-1 { background: #fff4dd; color: #a05a00; }
.pill.stage-2 { background: #eaf3fd; color: #0f63b8; }
.pill.stage-3 { background: #f1ebfd; color: #6b3fc4; }
.pill.stage-4 { background: #e3f6f8; color: #0b7f8f; }
.pill.stage-5 { background: #e7f6ee; color: #138a4f; }
.sw-1 { background: #f5a524; } .sw-2 { background: #1374d6; } .sw-3 { background: #8b5cf6; } .sw-4 { background: #0ea5b7; } .sw-5 { background: #22a06b; } .sw-6 { background: #94a3b8; }

.stagebar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--line-2); margin: .4rem 0 1rem; }
.stagebar span { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; }
.legend div { display: flex; align-items: center; gap: .5rem; font-size: .86rem; color: #475569; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legend b { color: var(--navy); }

.barlist { display: grid; gap: .85rem; }
.barlist .row { display: grid; grid-template-columns: minmax(120px, 210px) 1fr 42px; gap: .9rem; align-items: center; font-size: .9rem; }
.barlist .track { height: 10px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.barlist .fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), #4aa3f5); }
.barlist .num { text-align: right; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.barlist .label { color: #334155; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* -------------------------------------------------------------- avatars */
.av { width: 34px; height: 34px; border-radius: 10px; display: inline-grid; place-items: center; font-weight: 700; font-size: .78rem; flex-shrink: 0; }
.av.t1 { background: #eaf3fd; color: #0f63b8; } .av.t2 { background: #fff4dd; color: #a05a00; } .av.t3 { background: #f1ebfd; color: #6b3fc4; }
.av.t4 { background: #e7f6ee; color: #138a4f; } .av.t5 { background: #fdecef; color: #be2f5b; } .av.t6 { background: #e6f7f8; color: #0e7c86; }
.cell-person { display: flex; align-items: center; gap: .7rem; }
.cell-person small { display: block; font-size: .76rem; }

.section-title { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; }
.section-title h2 { margin: 0; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-photo { display: none; }
  .hero-body { padding: 1.4rem 1.3rem; }
  .hero h1 { font-size: 1.4rem; }
  .barlist .row { grid-template-columns: 1fr 1fr 36px; }
}

/* ----------------------------------------------------- attention panel */
.attn { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.attn-tile {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: .2rem .9rem; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.05rem 1.15rem;
  box-shadow: var(--shadow); color: var(--ink); position: relative; overflow: hidden; transition: transform .15s, box-shadow .15s, border-color .15s;
}
.attn-tile:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(16, 36, 70, .10); border-color: var(--brand-100); color: var(--ink); }
.attn-tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--warn); }
.attn-ic { grid-row: 1 / 3; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--warn-50); color: var(--warn); }
.attn-ic .ic { width: 22px; height: 22px; }
.attn-txt b { display: block; font-size: 1.9rem; line-height: 1.05; color: var(--navy); font-variant-numeric: tabular-nums; }
.attn-txt span { display: block; font-size: .86rem; color: #475569; font-weight: 500; }
.attn-go { grid-column: 2; display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; font-weight: 600; color: var(--brand); }
.attn-go .ic { width: 15px; height: 15px; }
.attn-parados::before { background: #8b5cf6; }
.attn-parados .attn-ic { background: #f1ebfd; color: #6b3fc4; }
.attn-sin_asignar::before { background: var(--brand); }
.attn-sin_asignar .attn-ic { background: var(--brand-50); color: var(--brand); }
.attn-tile.clear::before { background: var(--ok); }
.attn-tile.clear .attn-ic { background: var(--ok-50); color: var(--ok); }
.attn-tile.clear .attn-go { color: var(--ok); }
.filter-chip { align-items: center; }

/* ------------------------------------------------------- stage tracker */
.stepper-card { padding: 1.15rem 1.4rem; }
.stepper { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; counter-reset: s; }
.stepper li { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .5rem; padding: 0 .3rem; }
.stepper li::before { content: ""; position: absolute; top: 17px; left: calc(-50% + 22px); right: calc(50% + 22px); height: 3px; border-radius: 3px; background: var(--line); }
.stepper li:first-child::before { display: none; }
.stepper li.done::before, .stepper li.current::before { background: linear-gradient(90deg, var(--brand), #3d9bf0); }
.stepper .dot {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .9rem;
  background: #fff; border: 2px solid var(--line); color: #94a3b8; position: relative; z-index: 1;
}
.stepper .dot .ic { width: 18px; height: 18px; stroke-width: 3; }
.stepper .label { font-size: .82rem; color: var(--muted); font-weight: 500; line-height: 1.3; }
.stepper li.done .dot { background: var(--brand); border-color: var(--brand); color: #fff; }
.stepper li.done .label { color: #334155; }
.stepper li.current .dot { background: var(--accent); border-color: var(--accent); color: var(--navy); box-shadow: 0 0 0 5px rgba(255, 199, 44, .25); }
.stepper li.current .label { color: var(--navy); font-weight: 700; }

/* ---------------------------------------------- documents mini progress */
.minidocs { display: flex; align-items: center; gap: .55rem; min-width: 110px; }
.minidocs .track { flex: 1; height: 7px; border-radius: 999px; background: var(--line-2); overflow: hidden; min-width: 60px; }
.minidocs .track span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #f5a524, #ffc72c); }
.minidocs.full .track span { background: linear-gradient(90deg, #138a4f, #22a06b); }
.minidocs b { font-size: .8rem; color: var(--navy); font-variant-numeric: tabular-nums; }

.legend.mini { gap: .35rem 1rem; padding: 0 1.4rem .9rem; margin-top: -.3rem; }
.legend.mini div { font-size: .76rem; }
.legend.mini i { width: 8px; height: 8px; border-radius: 2px; }

@media (max-width: 900px) {
  .attn { grid-template-columns: 1fr; gap: .7rem; }
  .stepper-card { padding: 1rem .6rem; }
  .stepper .dot { width: 30px; height: 30px; font-size: .8rem; }
  .stepper li::before { top: 14px; left: calc(-50% + 18px); right: calc(50% + 18px); }
  .stepper .label { font-size: .66rem; }
  .minidocs { min-width: 0; width: 130px; }
}
.nowrap { white-space: nowrap; }

/* ------------------------------------------------- import and access sheet */
.import-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.import-step { position: relative; padding-top: 1.6rem; }
.import-step .step-n { position: absolute; top: -14px; left: 1.4rem; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--navy); font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 4px var(--bg); }
.import-step p { font-size: .9rem; margin: 0 0 1rem; }
.import-step form .field { margin-bottom: .8rem; }
.sheet-box { display: flex; gap: 1rem; align-items: center; justify-content: space-between; padding: .9rem 1rem; border: 1px solid var(--brand-100); background: var(--brand-50); border-radius: 12px; margin-bottom: 1.1rem; }
.sheet-box p { margin: .2rem 0 0; font-size: .85rem; }
@media (max-width: 900px) {
  .import-steps { grid-template-columns: 1fr; gap: 1.6rem; }
  .sheet-box { flex-direction: column; align-items: flex-start; }
}
