/* Referencia visual: miderecholegal.ar. Verde #80d6a3, gris carbón y blanco. */
.practice-input { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; min-height: 48px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); cursor: text; }
.practice-input[hidden] { display: none; }
.practice-input:focus-within { outline: 2px solid var(--green); outline-offset: 1px; }
.practice-input input[data-practice-entry] { flex: 1 1 210px; width: 0; min-width: 120px; border: 0; box-shadow: none; outline: none; padding: 4px; min-height: 30px; }
.practice-chip { display: inline-flex; align-items: center; gap: 7px; padding: 4px 8px 4px 12px; max-width: 100%; border-radius: 18px; background: var(--mint-soft); color: var(--green); border: 1px solid var(--mint); font-size: 12px; line-height: 1.5; }
.practice-chip > span { overflow-wrap: anywhere; min-width: 0; }
.practice-chip button { border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 19px; min-width: 26px; min-height: 26px; line-height: 1; padding: 3px; }
.practice-chip button:hover { background: var(--mint); }
.practice-catalog-row { display: flex; flex-wrap: wrap; align-items: center; gap: 15px; padding: 20px 24px; border-top: 1px solid var(--line); }
.practice-catalog-row > .field { flex: 1 1 260px; }
.practice-catalog-row .form-actions { display: flex; flex-wrap: wrap; margin: 0; }
@font-face { font-family: Roboto; font-style: normal; font-weight: 400 700; font-display: swap; src: url('fonts/roboto-latin.woff2') format('woff2'); }
@font-face { font-family: Montserrat; font-style: normal; font-weight: 400 700; font-display: swap; src: url('fonts/montserrat-latin.woff2') format('woff2'); }
:root {
    --mint: #80d6a3; --mint-hover: #68c38d; --mint-soft: #edf9f1; --green: #23623d;
    --charcoal: #333333; --text: #373737; --muted: #727b76; --line: #e6eae7; --surface: #fff; --background: #f6f6f6;
    --radius: 10px; --sidebar: 246px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Roboto, 'Segoe UI', sans-serif; color: var(--text); background: var(--background); font-size: 14px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled, select:disabled { opacity: .65; cursor: default; }
:focus-visible { outline: 3px solid #368553; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(25px, 2.7vw, 34px); font-weight: 500; letter-spacing: -.7px; line-height: 1.25; }
h2 { font-family: Montserrat, 'Segoe UI', sans-serif; font-weight: 600; font-size: 15px; line-height: 1.5; }
h3 { font-weight: 500; font-size: 17px; }
.icon { width: 21px; height: 21px; flex: 0 0 auto; vertical-align: middle; }
.muted, .cell-secondary { color: var(--muted); }
.eyebrow { display: block; color: var(--green); font: 600 10px/1.6 Montserrat, sans-serif; letter-spacing: 1.9px; margin-bottom: 10px; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; top: 10px; left: 10px; z-index: 20; padding: 12px; background: white; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); background: var(--surface); border-right: 1px solid var(--line); z-index: 5; display: flex; flex-direction: column; padding: 35px 20px 25px; }
.brand { display: flex; align-items: center; gap: 11px; font: 600 19px/1.05 Montserrat, sans-serif; letter-spacing: -.8px; }
.brand-symbol { display: flex; align-items: center; color: var(--charcoal); background: var(--mint); border-radius: 11px; min-width: 48px; height: 48px; padding: 0 7px; font-size: 30px; letter-spacing: -3px; }
.brand-symbol span { color: white; }
.brand > span:last-child > span { display: block; color: var(--green); }
.brand small { display: block; font-size: 7px; letter-spacing: .8px; font-weight: 500; margin-top: 10px; color: var(--muted); white-space: nowrap; }
.nav-label { font: 500 9px Montserrat, sans-serif; text-transform: uppercase; color: #8a928d; letter-spacing: 1.5px; margin: 48px 12px 15px; }
.nav-item { padding: 13px 15px; margin-bottom: 7px; display: flex; align-items: center; gap: 12px; border-radius: 7px; color: #626262; border-left: 3px solid transparent; font-weight: 500; transition: background .15s; }
.nav-item:hover { background: #f6f8f6; }
.nav-item.is-active { color: var(--green); background: var(--mint-soft); border-left-color: var(--mint); }
.sidebar-footer { margin-top: auto; padding: 20px 12px 0; border-top: 1px solid var(--line); color: #626262; font-size: 12px; }
.sidebar-footer small { display: block; margin-top: 6px; padding-left: 14px; color: var(--muted); font-size: 10px; }
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #4a9c66; margin-right: 6px; }
.workspace { margin-left: var(--sidebar); min-height: 100vh; display: flex; flex-direction: column; }
.topbar { min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 17px 38px; background: white; border-bottom: 1px solid var(--line); }
.topbar-context { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.topbar-context span { margin: 0 10px; color: #c5cbc7; }
.account { display: flex; align-items: center; gap: 11px; }
.account strong { font-size: 12px; font-weight: 500; display: block; }
.account small { font-size: 11px; color: var(--muted); display: block; }
.avatar { display: flex; align-items: center; justify-content: center; width: 35px; height: 35px; border-radius: 50%; background: var(--mint-soft); color: var(--green); font-weight: 600; }
.account form { margin-left: 12px; border-left: 1px solid var(--line); padding-left: 15px; }
.icon-button { display: flex; align-items: center; justify-content: center; border: 0; background: transparent; padding: 7px; color: var(--muted); }
.icon-button:hover { color: var(--green); }
.content { width: 100%; max-width: 1640px; margin: 0 auto; padding: 37px 38px 45px; flex: 1; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.page-heading p { color: var(--muted); font-size: 13px; margin-top: 9px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 10px 17px; border-radius: 6px; border: 1px solid transparent; font-weight: 500; font-size: 12px; text-align: center; white-space: nowrap; transition: background .15s; }
.button .icon { height: 17px; width: 17px; }
.button-primary { background: var(--mint); color: #203b29; border-color: var(--mint); }
.button-primary:hover { background: var(--mint-hover); border-color: var(--mint-hover); }
.button-secondary { background: white; color: #555e58; border-color: #dce2dd; }
.button-secondary:hover { background: #f2f6f3; }
.button-danger { background: white; color: #a24141; border-color: #edd7d7; }
.button-danger:hover { background: #fff3f3; }
.button-small { min-height: 33px; padding: 7px 10px; font-size: 11px; }
.button-wide { width: 100%; }
.text-link { color: var(--green); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px; margin-bottom: 28px; }
.stat-card { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 19px; display: flex; gap: 15px; align-items: center; transition: border-color .15s; }
.stat-card:hover { border-color: var(--mint); }
.stat-card > span:last-child { color: #737b76; font-size: 11px; }
.stat-card strong { display: block; color: var(--charcoal); font-size: 29px; font-weight: 500; line-height: 1.2; margin-top: 5px; }
.stat-icon { display: grid; place-items: center; width: 45px; height: 45px; flex: 0 0 auto; background: var(--mint-soft); color: #3b8253; border-radius: 11px; }
.stat-icon.amber { background: #fff5e6; color: #aa771e; }
.stat-icon.blue { background: #edf4fb; color: #587fa8; }
.card { background: white; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.case-waiting-list { margin-top: 24px; scroll-margin-top: 100px; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 23px 24px 19px; border-bottom: 1px solid var(--line); }
.card-heading p { font-size: 11px; color: var(--muted); margin-top: 5px; }
.card-body { padding: 23px 24px; }
.section-chip, .count-chip { font-size: 10px; color: #636e67; background: #f4f6f4; border: 1px solid var(--line); border-radius: 5px; padding: 4px 9px; white-space: nowrap; }
.filter-bar { padding: 18px 24px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.search-field { display: flex; align-items: center; position: relative; flex: 1; min-width: 220px; }
.search-field .icon { position: absolute; left: 12px; color: #929a94; width: 17px; height: 17px; }
input, select, textarea { width: 100%; background: white; color: var(--text); padding: 10px 12px; border: 1px solid #dce3dd; border-radius: 5px; min-height: 42px; font-size: 12px; line-height: 1.5; }
input::placeholder { color: #929992; }
input:focus, select:focus, textarea:focus { border-color: var(--mint); outline: 2px solid #80d6a32b; outline-offset: 0; }
.search-field input { padding-left: 38px; }
.filter-bar select { min-width: 156px; }
.table-scroll { overflow: auto; }
table { border-collapse: collapse; width: 100%; font-size: 12px; text-align: left; }
th { color: #778079; background: #fafbfa; padding: 14px 20px; font: 500 9px/1.5 Montserrat, sans-serif; text-transform: uppercase; letter-spacing: .6px; white-space: nowrap; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
td { padding: 19px 20px; border-bottom: 1px solid #edf0ed; vertical-align: middle; }
th:first-child, td:first-child { padding-left: 24px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fcfdfc; }
.cell-main { display: block; font-weight: 500; font-size: 12px; margin-top: 4px; }
.cell-secondary { display: block; font-size: 10px; margin-top: 4px; }
.case-id { font-size: 10px; font-weight: 500; color: var(--green); white-space: nowrap; }
.case-id:hover { text-decoration: underline; }
.motive { display: block; max-width: 190px; overflow-wrap: anywhere; font-size: 11px; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 5px; font-size: 9px; font-weight: 500; line-height: 1.5; white-space: nowrap; }
.badge > span { width: 5px; height: 5px; background: currentColor; border-radius: 50%; }
.badge-green { color: #34754b; background: #edf8f0; }.badge-blue { color: #4e7197; background: #eef4fb; }
.badge-amber { color: #966b21; background: #fff6e7; }.badge-red { color: #a24a4a; background: #fceeee; }
.badge-slate { color: #707a73; background: #f0f3f0; }
.nowrap { white-space: nowrap; }
.row-action { display: grid; place-items: center; width: 29px; height: 29px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); }
.row-action:hover { color: var(--green); background: var(--mint-soft); }
.row-action .icon { width: 15px; height: 15px; }
.pagination-bar { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding: 15px 24px; font-size: 11px; color: var(--muted); gap: 16px; }
.pagination-bar > div { display: flex; gap: 8px; }
.empty-state { padding: 65px 24px; text-align: center; color: var(--muted); }
.empty-state > .icon { width: 38px; height: 38px; color: #a9c6b1; margin-bottom: 14px; }
.empty-state h3 { color: #535e56; margin-bottom: 9px; }
.empty-state p { font-size: 12px; line-height: 1.9; }
.page-footer { display: flex; justify-content: space-between; gap: 12px; margin: 0 38px; padding: 19px 0; border-top: 1px solid var(--line); font-size: 10px; color: #90978f; flex-wrap: wrap; }
.page-footer small { display: block; margin-top: 5px; }.portal-clocks { display: flex; flex-direction: column; gap: 5px; text-align: right; font-variant-numeric: tabular-nums; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: #6d7b70; margin-bottom: 20px; }
.back-link .icon { width: 15px; height: 15px; }
.detail-title { font-size: clamp(20px, 2.3vw, 28px); overflow-wrap: anywhere; }
.heading-badges { display: flex; gap: 7px; flex-wrap: wrap; }
.dot-separator { margin: 0 7px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; align-items: start; }
.case-information { display: grid; gap: 20px; }
.data-list { margin: 0; padding: 6px 24px; }
.data-list > div { padding: 13px 0; border-bottom: 1px solid #f0f2ef; display: grid; grid-template-columns: 44% 56%; gap: 8px; font-size: 11px; }
.data-list > div:last-child { border-bottom: 0; }
.data-list dt { color: var(--muted); }.data-list dd { margin: 0; overflow-wrap: anywhere; }
.preserve-lines { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; }
.asset-item { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 13px; font-size: 12px; }
.asset-item strong, .asset-item span { display: block; }.asset-item span { color: var(--muted); margin-top: 4px; }
.valuation + .valuation { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.valuation strong, .valuation-amount { display: block; }.valuation strong { font-size: 12px; font-weight: 500; }
.valuation-amount { color: var(--green); font-size: 23px; margin: 5px 0; font-weight: 500; }.valuation small { font-size: 10px; }
.attachments-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 20px; }
.attachment { display: flex; flex-direction: column; gap: 7px; font-size: 10px; color: var(--muted); }.attachment img { width: 100%; height: 135px; object-fit: cover; border-radius: 6px; background: #f0f2f0; }
.conversation-thread { padding: 24px 20px; display: flex; flex-direction: column; gap: 18px; background: #fafbf9; }
.message { max-width: 91%; border-radius: 10px; padding: 15px 17px; font-size: 12px; }
.message-in { background: white; border: 1px solid var(--line); border-bottom-left-radius: 2px; align-self: flex-start; }
.message-out { background: #eaf6ee; border: 1px solid #d9ecdf; border-bottom-right-radius: 2px; align-self: flex-end; }
.message-author { color: #587161; font-size: 10px; font-weight: 500; margin-bottom: 7px; }.message-author span { display: block; color: #7c8a80; font-size: 9px; }
.message-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; }.message time { display: block; font-size: 9px; color: #879189; text-align: right; margin-top: 8px; }
.conversation-footer { padding: 13px 20px; color: #859087; font-size: 10px; border-top: 1px solid var(--line); }
.older-messages { align-self: center; font-size: 11px; color: var(--green); text-decoration: underline; padding: 4px; }
.row-actions { display: flex; gap: 7px; align-items: center; }.row-actions form { margin: 0; }
.you-label { font-size: 9px; color: var(--green); background: var(--mint-soft); border-radius: 4px; padding: 2px 5px; margin-left: 4px; }
.users-pagination { border-top: 1px solid var(--line); padding: 14px 24px; }.users-pagination nav { overflow: auto; }
.users-pagination ul { list-style: none; display: flex; align-items: center; gap: 7px; margin: 0; padding: 0; }.users-pagination a { display: block; padding: 4px 10px; border-radius: 4px; border: 1px solid var(--line); font-size: 11px; }.users-pagination .active a { background: var(--mint); border-color: var(--mint); }
.user-form { max-width: 850px; }.user-form .card + .card { margin-top: 23px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.field { display: flex; flex-direction: column; gap: 7px; }.field-full { grid-column: 1 / -1; }
.field label { font-size: 12px; color: #4c594f; font-weight: 500; }.field-help { font-size: 10px; color: var(--muted); display: block; line-height: 1.7; margin-top: 4px; }
.field .checkbox-label { display: flex; align-items: flex-start; gap: 9px; line-height: 1.5; cursor: pointer; }
.checkbox-label input[type="checkbox"] { width: 16px; height: 16px; min-width: 16px; min-height: 16px; flex: 0 0 16px; margin: 1px 0 0; padding: 0; accent-color: var(--green); }
.checkbox-label span { min-width: 0; }
.form-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; }
.alert { padding: 14px 18px; border-radius: 6px; font-size: 12px; display: flex; gap: 10px; margin-bottom: 22px; border: 1px solid transparent; }.alert ul { margin: 7px 0 0; padding-left: 18px; }
.alert-success { background: #edf8f0; color: #2b6740; border-color: #d4eadb; }.alert-error { background: #fff2f0; color: #9a4740; border-color: #f0d4ce; }
.login-page { min-height: 100vh; background: white; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: .92fr 1.08fr; }
.login-intro { position: relative; overflow: hidden; padding: 45px 55px 30px; display: flex; flex-direction: column; background: #333; color: white; }
.login-intro::after { content: ''; position: absolute; width: 420px; height: 420px; border: 1px solid #80d6a327; border-radius: 50%; bottom: -240px; right: -150px; box-shadow: 0 0 0 70px #80d6a308, 0 0 0 140px #80d6a305; pointer-events: none; }
.brand-light { color: white; }.brand-light > span:last-child > span { color: var(--mint); }.brand-light .brand-symbol { color: #333; }
.login-intro-content { margin: auto 0; padding: 85px 0; max-width: 460px; }.login-intro-content .eyebrow { color: var(--mint); margin-bottom: 24px; }
.login-intro h1 { font-size: clamp(34px, 4vw, 59px); font-weight: 400; letter-spacing: -1.9px; line-height: 1.14; color: white; }
.login-intro p { color: #c2cac4; line-height: 1.9; font-size: 14px; max-width: 330px; margin-top: 28px; font-weight: 400; }
.intro-rule { background: var(--mint); height: 3px; width: 48px; margin-top: 35px; }.login-intro > small { font-size: 11px; color: #a3afa6; }
.login-panel { padding: 55px 35px 25px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.login-form { width: 100%; max-width: 350px; margin: auto 0; }.login-form h2 { font-family: Roboto, sans-serif; font-size: 29px; font-weight: 500; letter-spacing: -.6px; margin: 3px 0 8px; }
.login-form > p.muted { font-size: 13px; margin-bottom: 28px; }.form-stack { display: flex; flex-direction: column; gap: 22px; }
.login-form input { min-height: 48px; font-size: 13px; }.login-form .button { min-height: 48px; margin-top: 4px; }
.login-help { color: #8a928c; font-size: 11px; text-align: center; margin-top: 30px; line-height: 1.8; }.login-version { margin-top: 45px; color: #959b96; font-size: 10px; }
.password-field { position: relative; }.password-field input { padding-right: 75px; }.password-toggle { background: transparent; border: 0; position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 10px; color: #698474; padding: 7px; }
.error-page { min-height: 100vh; display: grid; place-items: center; padding: 25px; }.error-card { max-width: 520px; padding: 40px; }.error-card h1 { font-size: 27px; margin-bottom: 15px; }.error-card p { color: var(--muted); margin-bottom: 25px; }
@media (min-width: 1600px) { .content { padding-top: 45px; }.stat-card { padding: 25px; } }
@media (max-width: 1250px) { :root { --sidebar: 214px; }.sidebar { padding-inline: 16px; }.brand { font-size: 16px; }.brand-symbol { width: 42px; min-width: 42px; height: 42px; font-size: 26px; }.brand small { font-size: 6px; }.content { padding: 30px 25px; }.topbar { padding-inline: 25px; }.stats-grid { gap: 12px; }.stat-card { padding: 18px 13px; gap: 10px; }.stat-icon { width: 36px; height: 36px; }.stat-card > span:last-child { font-size: 10px; }.detail-grid { grid-template-columns: minmax(0, 1fr); }.conversation-card { order: 2; } }
@media (max-width: 920px) { :root { --sidebar: 190px; }.stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.sidebar { padding-inline: 12px; }.brand { font-size: 14px; gap: 8px; }.brand-symbol { min-width: 35px; width: 35px; height: 38px; font-size: 23px; }.brand small { display: none; }.topbar-context { font-size: 10px; }.account strong { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.login-intro { padding-inline: 35px; } }
@media (max-width: 680px) {
    .sidebar { position: static; width: 100%; padding: 15px 20px 0; border-right: 0; border-bottom: 1px solid var(--line); }.brand { font-size: 17px; }.brand-symbol { width: 39px; min-width: 39px; height: 39px; font-size: 25px; }.sidebar nav { display: flex; gap: 20px; margin-top: 16px; }.nav-item { border-left: 0; border-bottom: 3px solid transparent; border-radius: 0; margin-bottom: 0; padding: 11px 9px; font-size: 12px; }.nav-item.is-active { background: transparent; border-bottom-color: var(--mint); }.nav-label, .sidebar-footer { display: none; }
    .workspace { margin-left: 0; }.topbar { min-height: 63px; padding: 12px 20px; }.topbar-context { font-size: 10px; }.account strong { max-width: 95px; font-size: 10px; }.account small { font-size: 9px; }.account { gap: 7px; }.account form { margin-left: 3px; padding-left: 6px; }.avatar { width: 28px; height: 28px; font-size: 11px; }
    .content { padding: 25px 16px 32px; }.page-heading { gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }.page-heading p { font-size: 12px; }.eyebrow { font-size: 9px; }.stats-grid { gap: 10px; margin-bottom: 22px; }.stat-card { padding: 17px 12px; }.stat-card strong { font-size: 25px; }.stat-icon { width: 33px; height: 33px; }.stat-icon .icon { width: 18px; height: 18px; }
    .card-heading { padding: 19px 17px 16px; }.card-heading h2 { font-size: 13px; }.card-body { padding: 18px 17px; }.filter-bar { padding: 15px 17px; gap: 9px; }.search-field { min-width: 100%; }.filter-bar > div:not(.search-field) { flex: 1; }.filter-bar select { min-width: 0; }.filter-bar .button { flex: 1; }.page-footer { margin: 0 16px; font-size: 9px; }.page-footer span { text-align: right; }.form-grid { grid-template-columns: 1fr; gap: 20px; }.data-list { padding-inline: 17px; }.detail-grid { gap: 17px; }.message { max-width: 95%; }.conversation-thread { padding: 18px 13px; }
    .login-shell { grid-template-columns: 1fr; }.login-intro { min-height: 240px; padding: 25px 27px; }.login-intro-content { margin: 0; padding: 27px 0 0; }.login-intro h1 { font-size: 32px; letter-spacing: -.6px; }.login-intro h1 br { display: none; }.login-intro p { font-size: 12px; margin-top: 15px; max-width: 340px; }.login-intro-content .eyebrow { margin-bottom: 12px; }.intro-rule, .login-intro > small { display: none; }.login-panel { padding: 35px 27px 22px; }.login-form h2 { font-size: 26px; }.login-version { margin-top: 30px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* Isologos originales: color en fondos claros, blanco en el panel oscuro del login. */
.brand .brand-logo { display: block; width: 205px; max-width: 100%; height: auto; }
.sidebar .brand { display: block; }
.brand-caption { display: block; margin-top: 13px; color: #727b76; font: 500 8px/1.6 Montserrat, sans-serif; letter-spacing: 1px; }
.login-intro .brand-logo { width: 250px; }
@media (max-width: 680px) { .sidebar .brand { max-width: 205px; }.sidebar .brand-caption { display: none; }.login-intro .brand-logo { width: 210px; } }

/* El portal ocupa el viewport; cada área administra su propio desplazamiento. */
html.portal-document, body.portal-shell { height: 100%; overflow: hidden; }
body.portal-shell { height: 100vh; height: 100dvh; overscroll-behavior: none; }
.portal-shell .sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
.portal-shell .workspace { height: 100%; min-height: 0; min-width: 0; margin-left: var(--sidebar); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; }
.portal-shell .topbar { position: sticky; top: 0; z-index: 10; min-width: 0; }
.portal-shell .account { flex: 0 0 auto; }
.portal-shell .content { min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.portal-shell .page-footer { min-width: 0; margin: 0 20px; padding: 8px 0; gap: 4px 12px; flex-wrap: nowrap; }
.portal-shell .page-footer > div { min-width: 0; }
.portal-shell .page-footer small { display: none; }
.portal-shell .portal-clocks { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; gap: 2px 14px; overflow-wrap: anywhere; }

/* La identificación del caso pertenece al header, fuera de ambos paneles. */
.portal-shell .topbar-case { padding: 13px 20px; gap: 16px; }
.case-header { display: flex; align-items: flex-start; flex: 1; min-width: 0; gap: 13px; }
.case-back { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; margin-top: 5px; border: 1px solid var(--line); border-radius: 7px; color: var(--green); }
.case-back:hover { background: var(--mint-soft); }
.case-header-details { min-width: 0; }
.case-header .eyebrow { margin: 0 0 3px; font-size: 9px; }
.case-header-title { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; }
.case-header h1 { font-size: clamp(14px, 1.6vw, 21px); line-height: 1.35; letter-spacing: -.3px; overflow-wrap: anywhere; }
.case-header-person { display: flex; align-items: baseline; flex-wrap: wrap; margin-top: 4px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.case-header-person strong { color: var(--text); font-weight: 500; }
.case-header .heading-badges { gap: 5px; }

/* Una sola pestaña visible, con altura limitada y scroll dentro del panel activo. */
.portal-shell .case-content { max-width: none; margin: 0; padding: 16px; display: flex; flex-direction: column; overflow: hidden; }
.case-content > .alert { flex-shrink: 0; max-height: 30%; overflow: auto; margin-bottom: 12px; }
.case-workspace { display: flex; flex-direction: column; flex: 1 1 0; min-width: 0; min-height: 0; gap: 10px; }
.case-workspace-actions { display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto; flex-wrap: wrap; gap: 10px 16px; min-width: 0; }
.case-preload-form { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.case-assignment-form { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: 0 1 520px; min-width: 0; }
.case-assignment-form input:not([type="hidden"]), .case-assignment-form select { min-width: 0; flex: 1; text-overflow: ellipsis; }
.case-assignment-form .button { flex: 0 0 auto; }
.case-assignment-summary { flex: 0 0 auto; color: var(--muted); font-size: 11px; }
.case-assignment-summary strong { color: var(--text); font-weight: 500; margin-right: 6px; }
.case-workspace .detail-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); align-items: stretch; gap: 0; flex: 1 1 0; min-width: 0; min-height: 0; }
.case-workspace .case-information { display: grid; grid-template-rows: minmax(0, 1fr); gap: 0; min-width: 0; min-height: 0; }
.case-information-scroll { min-width: 0; min-height: 0; padding: 4px 6px 12px 4px; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.case-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 18px; }
.case-summary-card { min-width: 0; box-shadow: 0 4px 16px #203b2909, 0 1px 3px #203b2905; }
.case-summary-wide { grid-column: 1 / -1; }
.case-advances-card { scroll-margin-top: 24px; }
.case-advances-card .card-heading > div { min-width: 0; }
.case-advances-card .card-heading p { overflow-wrap: anywhere; }
.case-advance-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 15px; }
.case-advance-form select { min-width: 0; text-overflow: ellipsis; }
.case-advance-form .form-actions { margin: 0; }
.case-advance-history { margin-top: 20px; }
.case-advance-event { border-top: 1px solid var(--line); padding: 18px 0; overflow-wrap: anywhere; }
.case-advance-event:last-child { padding-bottom: 0; }
.case-advance-event h3 { font-size: 14px; font-weight: 500; }
.case-advance-meta { display: flex; flex-wrap: wrap; gap: 7px; color: var(--muted); font-size: 11px; margin: 6px 0 10px; }
.case-advance-event p { font-size: 13px; }
.case-advance-empty { margin-top: 20px; }
.case-summary-card > .card-heading, .case-workspace .conversation-card > .card-heading { padding: 16px 18px; }
.case-summary-card > .card-body { padding: 18px; }
.case-assets-card .asset-item:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.asset-metadata { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.asset-metadata small { font-size: 10px; }
.asset-item .asset-metadata .section-chip { display: inline-flex; margin: 0; }
.case-valuations-card .valuation { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.case-valuations-card .valuation strong { overflow-wrap: anywhere; }
.case-valuations-card .valuation small { display: block; margin-top: 4px; }
.case-valuations-card .valuation-amount { margin: 0; font-size: 21px; }
.case-information .data-list { padding: 4px 18px; }
.case-information .data-list > div { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); padding: 11px 0; }
.case-information .data-list dt { overflow-wrap: anywhere; }
.case-workspace .conversation-card { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-width: 0; min-height: 0; order: initial; }
.case-workspace .conversation-thread { min-width: 0; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.case-workspace .conversation-thread > * { flex-shrink: 0; }
.case-workspace .message { min-width: 0; }
.case-information-scroll:focus-visible, .conversation-thread:focus-visible { outline-offset: -3px; }
.case-panel-tabs { display: flex; align-self: flex-start; flex: 0 0 auto; gap: 4px; max-width: 100%; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: #eaf0eb; }
.case-panel-tabs [role="tab"] { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; min-height: 36px; padding: 7px 14px; border-radius: 5px; font-size: 12px; color: #657168; }
.case-panel-tabs [role="tab"] .icon { width: 17px; height: 17px; }
.case-panel-tabs [aria-selected="true"] { background: white; color: var(--green); box-shadow: 0 1px 4px #203b2912; font-weight: 500; }
.case-workspace [data-case-panel][hidden] { display: none; }
.alert-info { color: #426b86; background: #edf5fa; border-color: #d6e7f1; }
.professional-form { max-width: 1100px; }
.professional-registration-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-column: 1 / -1; gap: 20px; align-items: end; }
@media (max-width: 680px) { .professional-registration-row { grid-template-columns: minmax(0, 1fr); } }
.professional-form > fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.professional-form .card + .card, .profile-review-form { margin-top: 20px; }
.profile-feedback { margin-bottom: 20px; }
.coverage-options { min-width: 0; margin: 0 0 24px; padding: 15px; border: 1px solid var(--line); border-radius: 6px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.coverage-options legend { font-size: 12px; padding: 0 6px; }
.coverage-options label { display: flex; gap: 9px; align-items: flex-start; font-size: 12px; cursor: pointer; }
.coverage-options input { width: 16px; height: 16px; min-height: 0; flex: 0 0 auto; margin: 2px 0 0; padding: 0; accent-color: var(--green); }
.archive-dialog { width: min(540px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 26px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: white; box-shadow: 0 18px 90px #132b2240; overflow: auto; }
.archive-dialog::backdrop { background: #1e2e2780; }
.archive-dialog h2 { font-size: 19px; }
.archive-dialog p { margin: 10px 0 18px; font-size: 12px; }
.archive-dialog .field { margin-top: 18px; }
.row-actions .button-danger { border-color: #c97878; }

@media (max-width: 1100px) {
    .portal-shell .topbar-case .account-details { display: none; }
}
@media (max-width: 920px) {
    body.portal-shell { --sidebar: 72px; }
    .portal-shell .sidebar { padding: 20px 8px; border-right: 1px solid var(--line); border-bottom: 0; }
    .portal-shell .sidebar .brand { display: flex; justify-content: center; max-width: none; }
    .portal-shell .sidebar .brand-logo { width: 42px; max-width: none; height: 46px; object-fit: cover; object-position: left; }
    .portal-shell .sidebar .brand-caption, .portal-shell .nav-label, .portal-shell .sidebar-footer, .portal-shell .nav-item-label { display: none; }
    .portal-shell .sidebar nav { display: flex; flex-direction: column; gap: 8px; margin-top: 28px; }
    .portal-shell .nav-item { justify-content: center; padding: 13px 8px; margin: 0; border: 0; border-radius: 7px; }
    .portal-shell .nav-item.is-active { background: var(--mint-soft); box-shadow: inset 3px 0 var(--mint); }
    .portal-shell .account-details { display: none; }
}
@media (max-width: 680px) {
    .professional-registration-row { grid-template-columns: minmax(0, 1fr); }
    body.portal-shell { --sidebar: 58px; }
    .portal-shell .sidebar { padding: 14px 6px; }
    .portal-shell .sidebar .brand-logo { width: 36px; height: 40px; }
    .portal-shell .topbar { padding: 10px 12px; }
    .portal-shell .topbar-case { align-items: flex-start; gap: 8px; }
    .portal-case-view .account .avatar { display: none; }
    .case-header { gap: 8px; }
    .case-back { width: 27px; height: 29px; }
    .case-back .icon { width: 17px; height: 17px; }
    .case-header-person { font-size: 11px; }
    .case-header .heading-badges .badge { padding: 3px 5px; font-size: 8px; white-space: normal; }
    .portal-shell .case-content { padding: 10px; }
    .case-summary-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .case-valuations-card .valuation { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .case-panel-tabs { align-self: stretch; }
    .case-workspace-actions { align-items: stretch; }
    .case-assignment-form { flex-basis: 100%; width: 100%; margin: 0; }
    .coverage-options { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 10px; }
    .form-actions { flex-wrap: wrap; }
    .case-panel-tabs [role="tab"] { flex: 1; padding-inline: 8px; font-size: 11px; }
    .case-workspace .conversation-thread { padding: 16px 12px; }
    .portal-shell .page-footer { margin: 0 12px; padding: 6px 0; }
    .portal-shell .page-footer > div:first-child { display: none; }
    .portal-shell .portal-clocks { width: 100%; flex-direction: column; align-items: flex-start; gap: 0; font-size: 9px; text-align: left; }
    .portal-shell .clock-zone { display: none; }
}
