:root {
  --navy: #18273f;
  --navy-2: #223654;
  --blue: #365e9d;
  --blue-soft: #eef3fa;
  --gold: #b88b3d;
  --gold-soft: #fbf5e9;
  --green: #31836c;
  --red: #bd554f;
  --ink: #1c2838;
  --muted: #6d7988;
  --line: #e4e8ed;
  --surface: #ffffff;
  --canvas: #f5f7f9;
  --shadow: 0 10px 30px rgba(25, 39, 61, .07);
  --sidebar: 252px;
}

* { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; min-width: 320px; font-family: "DM Sans", system-ui, sans-serif; font-size: 14px; line-height: 1.45; color: var(--ink); background: var(--canvas); text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

html.auth-locked, body.auth-pending { overflow: hidden; }
.auth-gate { position: fixed; inset: 0; z-index: 500; display: grid; grid-template-columns: 1.05fr .95fr; min-height: 100vh; background: white; }
.auth-gate.is-hidden { opacity: 0; pointer-events: none; transition: opacity .35s ease; }
.auth-visual { position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 48px clamp(36px, 6vw, 90px); color: white; background: radial-gradient(circle at 15% 85%, rgba(184,139,61,.26), transparent 35%), linear-gradient(145deg, #142339, #203654); }
.auth-visual::after { content: "§"; position: absolute; right: -30px; bottom: -145px; color: rgba(255,255,255,.035); font: 700 520px/1 "Playfair Display", serif; }
.auth-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; }
.auth-brand .brand-mark { width: 48px; height: 48px; }
.auth-brand .brand-copy strong { font-size: 20px; }
.auth-message { position: relative; z-index: 1; max-width: 620px; margin-block: auto; }
.auth-message .eyebrow { margin: 0 0 20px; }
.auth-message h1 { margin: 0 0 22px; font: 700 clamp(36px, 4vw, 58px)/1.12 "Playfair Display", serif; letter-spacing: -.7px; }
.auth-message > p:last-child { max-width: 540px; color: #b8c4d2; font-size: 15px; line-height: 1.7; }
.auth-security { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; }
.auth-security > span:first-child { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; color: #d7b66f; }
.auth-security svg { width: 18px; }
.auth-security > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.auth-security strong { font-size: 11px; }.auth-security small { color: #8fa0b4; font-size: 9px; }
.auth-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 35px; background: #fbfcfd; }
.auth-card { width: min(410px, 100%); }
.auth-card h2 { margin: 0 0 8px; color: var(--ink); font: 700 30px/1.2 "Playfair Display", serif; }
.auth-card > p, .auth-copy { margin: 0 0 28px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form .form-group { gap: 7px; }
.auth-form .form-group label { font-size: 11px; }
.auth-form .form-group input { height: 47px; padding-inline: 13px; background: white; }
.password-field { position: relative; }.password-field input { padding-right: 46px !important; }
.password-toggle { position: absolute; right: 5px; top: 5px; width: 37px; height: 37px; border: 0; color: #718096; background: transparent; }.password-toggle svg { width: 17px; }
.auth-submit { width: 100%; min-height: 47px; margin-top: 5px; }
.auth-error { margin: 0 !important; padding: 10px 12px; border: 1px solid #f0cecb; border-radius: 6px; color: #9d413c !important; background: #fff4f3; font-size: 10px !important; }
.auth-note { display: flex; align-items: flex-start; gap: 9px; margin-top: 23px; padding-top: 18px; border-top: 1px solid var(--line); color: #7c8999; font-size: 9px; line-height: 1.5; }.auth-note svg { width: 15px; flex: 0 0 auto; color: var(--green); }
.auth-domain { position: absolute; bottom: 22px; margin: 0; color: #9aa4b0; font-size: 9px; letter-spacing: .5px; }
.auth-loader { min-height: 190px; display: grid; place-items: center; align-content: center; gap: 17px; color: #7f8b99; }.auth-loader span { width: 35px; height: 35px; border: 3px solid #e2e7ed; border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }.auth-loader p { margin: 0; font-size: 11px; }
.password-rules { margin: -5px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; color: #8793a1; font-size: 9px; }.password-rules li::before { content: "•"; margin-right: 5px; color: var(--gold); }
@keyframes spin { to { transform: rotate(360deg); } }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); z-index: 20; display: flex; flex-direction: column; padding: 28px 17px 18px; color: #d9e0e8; background: var(--navy); transition: transform .25s ease; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 10px 22px; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.3); color: #d7b774; font: 700 25px/1 "Playfair Display", serif; transform: rotate(45deg); }
.brand-mark::first-letter { transform: rotate(-45deg); }
.brand-copy { display: flex; flex-direction: column; line-height: 1.15; }
.brand-copy strong { color: white; font: 700 17px/1.2 "Playfair Display", serif; letter-spacing: 1.1px; }
.brand-copy span { color: #aeb9c8; font-size: 9px; letter-spacing: 3.3px; margin-top: 4px; }
.main-nav { display: flex; flex-direction: column; gap: 5px; }
.nav-item { width: 100%; border: 0; border-radius: 7px; padding: 10px 12px; display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 10px; color: #aeb8c6; background: transparent; text-align: left; font-weight: 500; }
.nav-item svg { width: 18px; height: 18px; }
.nav-item:hover { color: white; background: rgba(255,255,255,.06); }
.nav-item.active { color: white; background: rgba(255,255,255,.11); box-shadow: inset 3px 0 #c5a363; }
.nav-item em { min-width: 21px; padding: 2px 6px; border-radius: 99px; font-size: 10px; font-style: normal; color: #d4dce6; background: rgba(255,255,255,.1); text-align: center; }
.nav-item em.warning { background: #9e553c; color: white; }
.sidebar-divider { height: 1px; background: rgba(255,255,255,.1); margin: 18px 11px; }
.nav-label { margin: 0 12px 8px; color: #738198; font-size: 10px; font-weight: 700; letter-spacing: 1.4px; }
.main-nav.compact .nav-item { padding-block: 9px; }
.sidebar-footer { margin-top: auto; }
.security-pill { display: flex; gap: 10px; align-items: center; margin: 0 6px 12px; padding: 11px; border: 1px solid rgba(255,255,255,.09); border-radius: 8px; background: rgba(255,255,255,.035); }
.security-pill > svg { width: 18px; color: #76b99e; }
.security-pill div { display: flex; flex-direction: column; gap: 2px; }
.security-pill strong { font-size: 11px; color: #cbd4df; }
.security-pill small { font-size: 9px; color: #7f8da1; }
.profile-mini { width: 100%; border: 0; border-top: 1px solid rgba(255,255,255,.09); padding: 17px 8px 0; background: transparent; color: white; display: grid; grid-template-columns: 35px 1fr 16px; text-align: left; align-items: center; gap: 9px; }
.profile-mini > span:nth-child(2) { display: flex; flex-direction: column; }
.profile-mini strong { font-size: 11px; }
.profile-mini small { font-size: 9px; color: #7f8da1; margin-top: 2px; }
.avatar { width: 35px; height: 35px; border-radius: 50%; display: inline-grid; place-items: center; flex: 0 0 auto; font-size: 10px; font-weight: 700; color: white; background: #36557f; }

.main-content { margin-left: var(--sidebar); min-height: 100vh; }
.topbar { height: 72px; position: sticky; top: 0; z-index: 15; padding: 0 34px; display: flex; align-items: center; gap: 15px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); }
.global-search { max-width: 590px; flex: 1; display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 42px; border: 1px solid #dce1e7; border-radius: 7px; background: #f9fafb; }
.global-search:focus-within { border-color: #8aa1c4; box-shadow: 0 0 0 3px #edf2f9; }
.global-search svg { width: 18px; color: #8190a3; }
.global-search input { flex: 1; border: 0; outline: 0; color: var(--ink); background: transparent; }
.global-search kbd { border: 1px solid #dce1e7; padding: 2px 6px; border-radius: 4px; color: #8a94a2; background: white; font-size: 10px; }
.quick-add, .button { border: 1px solid transparent; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-weight: 600; }
.quick-add { height: 42px; padding: 0 17px; color: white; background: var(--blue); }
.quick-add svg, .button svg { width: 16px; }
.quick-add:hover, .button.primary:hover { background: #294e88; }
.top-actions { display: flex; gap: 4px; margin-left: auto; }
.icon-button { position: relative; width: 38px; height: 38px; border: 0; display: inline-grid; place-items: center; border-radius: 6px; color: #647286; background: transparent; }
.icon-button:hover { background: #eef2f6; }
.icon-button svg { width: 19px; }
.icon-button b { position: absolute; top: 3px; right: 2px; width: 16px; height: 16px; display: grid; place-items: center; border: 2px solid white; border-radius: 50%; color: white; background: var(--red); font-size: 8px; }
.menu-toggle { display: none; }
.page-container { padding: 31px 34px 80px; }
.page { max-width: 1500px; margin: 0 auto; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.eyebrow { color: var(--gold) !important; font-size: 10px; font-weight: 700; letter-spacing: 1.4px; }
.page-heading h1 { margin: 6px 0 5px; font: 700 30px/1.15 "Playfair Display", serif; }
.page-heading p { margin: 0; color: var(--muted); }
.heading-actions { display: flex; gap: 9px; }
.button { min-height: 40px; padding: 0 15px; }
.button.primary { color: white; background: var(--blue); }
.button.secondary { border-color: #dbe1e8; color: #526173; background: white; }
.button.ghost { border-color: #d7dee7; color: #506074; background: transparent; }
.button.danger { color: white; background: var(--red); }
.alert-banner { display: flex; align-items: center; gap: 14px; padding: 14px 17px; border: 1px solid #ead8b7; border-left: 3px solid var(--gold); border-radius: 7px; background: var(--gold-soft); margin-bottom: 20px; }
.alert-banner .alert-icon { width: 33px; height: 33px; display: grid; place-items: center; border-radius: 50%; color: #9d722d; background: #f2e5ca; }
.alert-banner .alert-icon svg { width: 17px; }
.alert-banner div { flex: 1; }
.alert-banner strong { font-size: 13px; }
.alert-banner p { margin: 2px 0 0; color: #7e6d52; font-size: 11px; }
.alert-banner button { border: 0; display: flex; align-items: center; gap: 6px; color: #795b28; background: transparent; font-size: 11px; font-weight: 700; }
.alert-banner button svg { width: 14px; }
.metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-bottom: 18px; }
.metric-card, .panel { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: 0 2px 5px rgba(23,39,62,.02); }
.metric-card { padding: 18px; }
.metric-top { display: flex; align-items: center; justify-content: space-between; }
.metric-icon { width: 35px; height: 35px; border-radius: 7px; display: grid; place-items: center; }
.metric-icon svg { width: 18px; }
.metric-icon.navy { color: #32527e; background: #edf2f8; }
.metric-icon.gold { color: #a47931; background: #fbf2e1; }
.metric-icon.green { color: #26765f; background: #eaf5f1; }
.metric-icon.blue { color: #406ba8; background: #eaf1fa; }
.trend { border-radius: 99px; padding: 3px 7px; font-size: 9px; font-weight: 600; }
.trend.up { color: #24765e; background: #eaf5f1; }
.trend.neutral { color: #7b8795; background: #f3f5f7; }
.metric-card > p { margin: 16px 0 5px; color: var(--muted); font-size: 11px; }
.metric-card > strong { display: block; font: 700 25px/1.1 "Playfair Display", serif; }
.metric-card > small { display: block; color: #8a94a0; font-size: 9px; margin-top: 6px; }
.metric-card > small b { color: var(--red); }
.dashboard-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 18px; margin-bottom: 18px; }
.panel { min-width: 0; }
.panel-header { min-height: 70px; padding: 17px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #edf0f3; }
.panel-header h2 { margin: 0 0 3px; font: 700 17px/1.2 "Playfair Display", serif; }
.panel-header p { margin: 0; color: #8a94a2; font-size: 10px; }
.text-button { border: 0; display: flex; align-items: center; gap: 5px; color: var(--blue); background: transparent; font-size: 10px; font-weight: 600; }
.text-button svg { width: 13px; }
.timeline { padding: 5px 20px 11px; }
.timeline-item { min-height: 76px; display: grid; grid-template-columns: 46px 10px 1fr auto; align-items: center; gap: 10px; border-bottom: 1px solid #eef1f4; }
.timeline-item:last-child { border-bottom: 0; }
.timeline-item time { color: #435168; font-size: 11px; font-weight: 600; }
.timeline-item > i { width: 8px; height: 8px; border: 2px solid white; border-radius: 50%; box-shadow: 0 0 0 2px currentColor; }
.timeline-item > i.blue { color: #4e75ad; background: #4e75ad; }.timeline-item > i.gold { color: #b68e48; background: #b68e48; }.timeline-item > i.red { color: #bf5a54; background: #bf5a54; }.timeline-item > i.green { color: #448a73; background: #448a73; }
.timeline-item div strong { font-size: 11px; }
.timeline-item div p { margin: 3px 0; color: #687587; font-size: 10px; }
.timeline-item div > span { display: flex; align-items: center; gap: 4px; color: #9099a5; font-size: 9px; }
.timeline-item div > span svg { width: 11px; }
.tag, .status { display: inline-flex; align-items: center; justify-content: center; border-radius: 99px; padding: 4px 8px; font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; }
.tag.blue { color: #42699d; background: #edf3fa; }.tag.gold { color: #946e2f; background: #fbf2e3; }.tag.red { color: #a84a46; background: #faedec; }.tag.green { color: #27735d; background: #eaf5f0; }.tag.purple { color: #6d4eb5; background: #f0ecff; }
.activity-list { padding: 5px 20px; }
.activity { min-height: 72px; display: flex; align-items: center; gap: 11px; border-bottom: 1px solid #eef1f4; }
.activity > div { display: flex; flex-direction: column; align-items: flex-start; }
.activity p { margin: 0; color: #657184; font-size: 10px; }
.activity p strong { color: #303d50; }
.activity a { color: var(--blue); font-size: 10px; font-weight: 600; margin: 2px 0; }
.activity small { color: #99a2ae; font-size: 8px; }
.soft-blue { color: #42699d; background: #eaf1fa; }.soft-gold { color: #98702e; background: #faf0dc; }.soft-green { color: #337a65; background: #e7f3ee; }.soft-purple { color: #725c92; background: #f0ecf7; }
.activity-more { width: 100%; border: 0; border-top: 1px solid #eef1f4; padding: 12px; color: #687587; background: transparent; font-size: 10px; font-weight: 600; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 11px 18px; color: #8b95a3; background: #fafbfc; font-size: 8px; letter-spacing: .5px; white-space: nowrap; }
td { padding: 12px 18px; border-top: 1px solid #edf0f3; color: #5d6978; font-size: 10px; white-space: nowrap; }
.case-title { display: flex; align-items: center; gap: 10px; min-width: 290px; }
.case-title > div { display: flex; flex-direction: column; }
.case-title strong { color: #263449; font-size: 10px; }.case-title small { color: #909aa6; font-size: 8px; margin-top: 3px; }
.case-icon { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 6px; color: #41638f; background: #edf2f8; font: 700 13px "Playfair Display", serif; }.case-icon.green { color: #34755f; background: #eaf4ef; }.case-icon.red { color: #aa4d48; background: #f9eceb; }
.person { display: inline-flex; align-items: center; gap: 6px; }.avatar.tiny { width: 23px; height: 23px; font-size: 7px; }.avatar.purple { background: #75618e; }.avatar.gold { background: #9a7438; }
.status.in-progress { color: #3c659b; background: #edf3fa; }.status.review { color: #886628; background: #fbf1dc; }.status.urgent { color: #a54642; background: #faeae9; }
.row-action { border: 0; color: #91a0b3; background: transparent; }.row-action svg { width: 16px; }

/* Shared application pages */
.section-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-header h1 { margin: 0 0 5px; font: 700 27px "Playfair Display", serif; }.section-header p { margin: 0; color: var(--muted); font-size: 12px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: white; margin-bottom: 14px; }
.field-search { min-width: 240px; flex: 1; height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid #dfe4ea; border-radius: 6px; background: #fafbfc; }.field-search input { flex: 1; border: 0; outline: 0; background: transparent; }.field-search svg { width: 16px; color: #8491a2; }
.select { height: 38px; border: 1px solid #dfe4ea; border-radius: 6px; padding: 0 30px 0 11px; color: #566476; background: white; font-size: 11px; }
.data-panel { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: white; }
.data-panel .panel-header { min-height: 59px; }
.data-table tbody tr:hover { background: #f9fbfd; }.data-table td { font-size: 11px; }.data-table th { font-size: 9px; }.data-table td strong { color: #263449; }
.checkbox { width: 15px; height: 15px; accent-color: var(--blue); }
.pagination { display: flex; align-items: center; justify-content: space-between; padding: 13px 17px; border-top: 1px solid var(--line); color: #84909d; font-size: 10px; }.page-buttons { display: flex; gap: 5px; }.page-buttons button { width: 28px; height: 28px; border: 1px solid #dce2e8; border-radius: 5px; color: #697688; background: white; }.page-buttons button.active { color: white; border-color: var(--blue); background: var(--blue); }
.empty-state { min-height: 390px; display: grid; place-items: center; text-align: center; color: #8090a2; }.empty-state svg { width: 55px; height: 55px; margin-bottom: 10px; color: #b5c1ce; }.empty-state h3 { margin: 0 0 7px; color: #435168; }.empty-state p { margin: 0 0 18px; font-size: 11px; }
.contact-name { display: flex; align-items: center; gap: 9px; }.contact-name span:last-child { display: flex; flex-direction: column; }.contact-name small { color: #8c97a5; font-size: 8px; }
.case-number { padding: 3px 7px; color: #476a9c; border-radius: 4px; background: #edf3fa; font-size: 9px; font-weight: 700; }
.favorite { border: 0; background: transparent; color: #c2a15f; font-size: 17px; }
.tabs { display: flex; gap: 4px; margin-bottom: 17px; border-bottom: 1px solid var(--line); }.tabs button { border: 0; border-bottom: 2px solid transparent; padding: 10px 14px; color: #788596; background: transparent; font-size: 11px; }.tabs button.active { color: var(--blue); border-bottom-color: var(--blue); font-weight: 700; }
.calendar-strip { display: grid; grid-template-columns: repeat(7, 1fr); border: 1px solid var(--line); border-radius: 8px 8px 0 0; background: white; }.day { padding: 15px; text-align: center; color: #7b8796; }.day strong { display: block; color: #445267; font-size: 17px; margin-top: 5px; }.day.active { color: white; background: var(--blue); }.day.active strong { color: white; }
.agenda-board { display: grid; grid-template-columns: 110px 1fr; min-height: 410px; border: 1px solid var(--line); border-top: 0; background: white; }.time-column { border-right: 1px solid var(--line); }.time-slot { height: 65px; border-bottom: 1px solid #edf0f3; padding: 10px 14px; color: #8a95a3; font-size: 10px; }.event-column { position: relative; background: repeating-linear-gradient(to bottom, transparent 0, transparent 64px, #edf0f3 65px); }.calendar-event { position: absolute; left: 3%; right: 18%; min-height: 52px; padding: 9px 12px; border-left: 3px solid var(--blue); border-radius: 4px; color: #385d8e; background: #edf3fa; font-size: 10px; }.calendar-event strong { display: block; color: #263d5b; margin-bottom: 2px; }.calendar-event.gold { left: 25%; right: 3%; color: #86672f; border-color: var(--gold); background: #fbf4e7; }.calendar-event.red { left: 10%; right: 30%; color: #a24844; border-color: var(--red); background: #faeceb; }
.document-layout { display: grid; grid-template-columns: minmax(430px, .9fr) 1.1fr; min-height: 550px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: white; }.document-list { border-right: 1px solid var(--line); }.document-row { display: grid; grid-template-columns: 25px 1fr auto; gap: 8px; align-items: center; padding: 13px 16px; border-bottom: 1px solid #edf0f3; font-size: 11px; }.document-row.folder { background: #f8fafc; font-weight: 600; }.document-row svg { width: 17px; color: #6882a6; }.document-actions { display: flex; gap: 4px; }.document-actions button { border: 0; color: #8da0b8; background: transparent; }.document-preview { display: grid; place-items: center; background: #f7f8fa; }.paper { width: 80%; min-height: 410px; padding: 48px; color: #3a4657; background: white; box-shadow: var(--shadow); }.paper h3 { text-align: center; font: 700 16px "Playfair Display", serif; }.paper p { font: 12px/1.8 Georgia, serif; text-align: justify; }.placeholder { padding: 1px 5px; color: #1d6f82; border: 1px solid #82c5d0; border-radius: 3px; background: #e8f8fa; }
.calculator-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }.calculator-card { min-height: 170px; padding: 23px; border: 1px solid var(--line); border-radius: 8px; background: white; transition: .2s; }.calculator-card:hover { border-color: #9aacca; transform: translateY(-2px); box-shadow: var(--shadow); }.calculator-card span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 7px; color: var(--blue); background: #edf3fa; }.calculator-card span svg { width: 19px; }.calculator-card h3 { margin: 18px 0 8px; font-size: 13px; }.calculator-card p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.role-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin-bottom: 20px; }.role-card { padding: 17px; border: 1px solid var(--line); border-radius: 8px; background: white; }.role-card > span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 6px; color: var(--blue); background: #edf3fa; }.role-card svg { width: 16px; }.role-card h3 { margin: 13px 0 4px; font-size: 12px; }.role-card p { margin: 0; color: #8b96a4; font-size: 9px; }.role-card strong { display: block; margin-top: 14px; color: #536276; font-size: 10px; }
.security-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 18px; }.security-list { padding: 0 20px; }.security-item { min-height: 70px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }.security-item:last-child { border-bottom: 0; }.security-item > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 6px; color: #347a65; background: #eaf4ef; }.security-item svg { width: 17px; }.security-item div { flex: 1; }.security-item strong { display: block; font-size: 11px; }.security-item small { color: #8995a3; font-size: 9px; }.toggle { width: 36px; height: 20px; padding: 2px; border: 0; border-radius: 99px; background: #ccd4dd; }.toggle::after { content: ""; display: block; width: 16px; height: 16px; border-radius: 50%; background: white; transition: .2s; }.toggle.on { background: var(--green); }.toggle.on::after { transform: translateX(16px); }
.chart-placeholder { padding: 22px; }.bars { height: 200px; display: flex; align-items: flex-end; gap: 18px; padding-top: 20px; border-bottom: 1px solid var(--line); }.bar { flex: 1; min-width: 20px; position: relative; border-radius: 4px 4px 0 0; background: #9ab0d0; }.bar.primary { background: var(--blue); }.bar::after { content: attr(data-label); position: absolute; left: 50%; bottom: -22px; transform: translateX(-50%); color: #8c97a5; font-size: 8px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(12,24,41,.55); backdrop-filter: blur(3px); }
.modal { position: relative; width: min(620px, 100%); max-height: 90vh; overflow: auto; border-radius: 10px; background: white; box-shadow: 0 25px 80px rgba(5,15,30,.25); }
.modal-close { position: absolute; top: 15px; right: 15px; z-index: 2; width: 32px; height: 32px; border: 0; border-radius: 5px; color: #758295; background: #f2f4f6; }.modal-close svg { width: 16px; }
.modal-body { padding: 30px; }.modal-body h2 { margin: 0 0 5px; font: 700 23px "Playfair Display", serif; }.modal-body > p { margin: 0 0 24px; color: var(--muted); font-size: 11px; }.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }.form-group { display: flex; flex-direction: column; gap: 6px; }.form-group.full { grid-column: 1 / -1; }.form-group label { color: #536173; font-size: 10px; font-weight: 600; }.form-group input, .form-group select, .form-group textarea { width: 100%; border: 1px solid #dbe1e7; border-radius: 6px; padding: 10px 11px; outline: 0; color: var(--ink); background: #fbfcfd; }.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: #829cc2; box-shadow: 0 0 0 3px #edf2f8; }.form-group textarea { min-height: 85px; resize: vertical; }.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 23px; padding-top: 18px; border-top: 1px solid var(--line); }
.toast { position: fixed; right: 28px; bottom: 86px; z-index: 120; padding: 13px 18px; border-radius: 7px; color: white; background: var(--navy); box-shadow: var(--shadow); font-size: 11px; transform: translateY(30px); opacity: 0; pointer-events: none; transition: .25s; }.toast.show { transform: translateY(0); opacity: 1; }
.ai-fab { position: fixed; right: 25px; bottom: 24px; z-index: 40; height: 46px; border: 0; border-radius: 99px; display: flex; align-items: center; gap: 8px; padding: 0 17px; color: white; background: var(--navy-2); box-shadow: 0 8px 25px rgba(24,39,63,.25); }.ai-stars { color: #d7b66f; font-size: 18px; }.ai-label { font-size: 11px; font-weight: 600; }
.ai-chat { display: flex; flex-direction: column; height: 520px; }.ai-chat-header { padding: 24px 25px 17px; color: white; background: var(--navy); }.ai-chat-header h2 { margin: 0 0 4px; font: 700 20px "Playfair Display", serif; }.ai-chat-header p { margin: 0; color: #b8c3d1; font-size: 10px; }.ai-messages { flex: 1; overflow: auto; padding: 20px; background: #f7f9fb; }.message { max-width: 80%; padding: 11px 13px; border-radius: 8px; font-size: 11px; line-height: 1.5; }.message.bot { color: #3b485a; background: white; box-shadow: 0 2px 7px rgba(25,39,61,.06); }.suggestions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }.suggestions button { border: 1px solid #d5deea; border-radius: 99px; padding: 7px 10px; color: #46658e; background: white; font-size: 9px; }.ai-input { padding: 13px; display: flex; gap: 8px; border-top: 1px solid var(--line); }.ai-input input { flex: 1; border: 1px solid #dce2e8; border-radius: 6px; padding: 10px; outline: 0; }.ai-input button { width: 40px; border: 0; border-radius: 6px; color: white; background: var(--blue); }

@media (max-width: 1100px) { .metrics-grid { grid-template-columns: 1fr 1fr; }.dashboard-grid { grid-template-columns: 1fr; }.calculator-grid { grid-template-columns: 1fr 1fr; }.role-cards { grid-template-columns: 1fr 1fr; }.document-layout { grid-template-columns: 1fr; }.document-preview { min-height: 500px; }.document-list { border-right: 0; border-bottom: 1px solid var(--line); }.quick-add span:last-child { display: none; } }
@media (max-width: 780px) { :root { --sidebar: 235px; }.sidebar { transform: translateX(-100%); }.sidebar.open { transform: translateX(0); box-shadow: 10px 0 30px rgba(10,20,35,.2); }.main-content { margin-left: 0; }.menu-toggle { display: inline-grid; }.topbar { padding: 0 15px; }.page-container { padding: 23px 16px 75px; }.global-search kbd, .top-actions .icon-button:last-child { display: none; }.page-heading, .section-header { align-items: flex-start; flex-direction: column; }.metrics-grid, .calculator-grid, .role-cards, .security-grid { grid-template-columns: 1fr; }.heading-actions { width: 100%; }.heading-actions .button { flex: 1; }.calendar-strip .day:nth-child(-n+2) { display: none; }.calendar-strip { grid-template-columns: repeat(5, 1fr); }.agenda-board { grid-template-columns: 70px 1fr; }.ai-fab { width: 48px; padding: 0; justify-content: center; }.ai-label { display: none; }.form-grid { grid-template-columns: 1fr; }.form-group.full { grid-column: auto; } }
@media (max-width: 490px) { .metrics-grid { grid-template-columns: 1fr; }.topbar { gap: 7px; }.quick-add { padding: 0 11px; }.page-heading h1 { font-size: 26px; }.alert-banner button { display: none; }.timeline-item { grid-template-columns: 42px 8px 1fr; }.timeline-item > .tag { display: none; }.heading-actions { flex-direction: column; }.section-header .button { width: 100%; }.paper { width: 94%; padding: 25px; }.document-layout { display: block; }.document-preview { min-height: 430px; } }
@media (max-width: 900px) { .auth-gate { grid-template-columns: 1fr; }.auth-visual { min-height: 235px; padding: 30px; }.auth-message { margin: 35px 0 10px; }.auth-message h1 { font-size: 32px; }.auth-message > p:last-child { display: none; }.auth-security { display: none; }.auth-panel { padding: 36px 24px 60px; }.auth-domain { bottom: 14px; } }

/* MetaJurídico-inspired application shell */
:root { --app-header-height: 64px; --brand-blue: #263760; --brand-indigo: #4059aa; }
body { background: #f4f6fa; }
.sidebar { inset: 0 0 auto 0; width: 100%; height: var(--app-header-height); padding: 0; display: block; overflow: visible; color: #cbd2e1; background: var(--brand-blue); box-shadow: 0 1px 0 rgba(10,22,48,.22); transform: none; }
.sidebar .topbar { position: relative; top: auto; height: 64px; padding: 0 18px; display: flex; gap: 8px; border: 0; background: transparent; backdrop-filter: none; }
.sidebar .brand { width: 160px; flex: 0 0 160px; gap: 10px; padding: 0; }
.brand-symbol { width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.35); border-radius: 3px; color: #d8b871; font: 700 19px/1 "Playfair Display",serif; }
.sidebar .brand-copy strong { font-size: 15px; letter-spacing: .7px; }.sidebar .brand-copy span { font-size: 7px; letter-spacing: 2.7px; }
.header-add { width: 42px; height: 40px; flex: 0 0 42px; border: 1px solid rgba(255,255,255,.55); border-radius: 7px; display: grid; place-items: center; color: var(--brand-blue); background: white; }
.header-add svg { width: 18px; }
.header-add:hover, .header-add[aria-expanded="true"] { color: #4059aa; background: #f0f4fb; box-shadow: 0 3px 10px rgba(13,27,55,.16); }
.quick-create { position: relative; flex: 0 0 42px; }
.quick-create-menu { position: absolute; top: 52px; left: 0; z-index: 120; width: 278px; padding: 7px; border: 1px solid #d9dee8; border-radius: 9px; background: white; box-shadow: 0 14px 38px rgba(18,32,59,.22); transform-origin: 22px top; animation: quickMenuIn .14s ease-out; }
.quick-create-menu::before { content: ""; position: absolute; top: -7px; left: 16px; width: 13px; height: 13px; border-left: 1px solid #d9dee8; border-top: 1px solid #d9dee8; background: white; transform: rotate(45deg); }
.quick-create-title { position: relative; padding: 8px 10px 9px; color: #27344a; font-size: 12px; font-weight: 700; }
.quick-create-menu button { position: relative; width: 100%; min-height: 48px; padding: 7px 10px; border: 0; border-radius: 6px; display: grid; grid-template-columns: 25px 1fr; grid-template-rows: auto auto; align-items: center; column-gap: 8px; color: #3f4858; background: transparent; text-align: left; }
.quick-create-menu button:hover { color: #314f99; background: #f1f5fc; }
.quick-create-menu button > span:first-child { grid-row: 1 / 3; width: 23px; height: 23px; display: grid; place-items: center; border-radius: 5px; color: #4968a4; background: #edf2fa; }
.quick-create-menu button svg { width: 14px; }.quick-create-menu button > span:nth-child(2) { font-size: 11px; font-weight: 600; }.quick-create-menu button small { grid-column: 2; color: #8a96a6; font-size: 8px; margin-top: 1px; }
.quick-create-divider { height: 1px; margin: 5px 4px; background: #e5e8ed; }
@keyframes quickMenuIn { from { opacity: 0; transform: translateY(-5px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.sidebar .global-search { width: 210px; min-width: 170px; max-width: 210px; flex: 0 1 210px; height: 40px; border: 0; background: white; transition: flex-basis .22s ease,max-width .22s ease,box-shadow .18s ease; }
.sidebar .global-search:focus-within { max-width: 340px; flex-basis: 340px; box-shadow: 0 0 0 3px rgba(129,157,209,.24),0 7px 18px rgba(11,25,53,.15); }
.sidebar .global-search input { font-size: 12px; }
.advanced-search { width: 40px; height: 40px; padding: 0; border: 1px solid rgba(255,255,255,.4); border-radius: 7px; display: flex; align-items: center; justify-content: center; gap: 7px; color: #32466e; background: white; font-size: 10px; }
.advanced-search span:last-child { display: none; }
.advanced-search svg { width: 14px; }
.sidebar .top-actions { flex: 0 0 auto; margin-left: 0; }.sidebar .icon-button { color: #d7ddeb; }.sidebar .icon-button:hover { color: white; background: rgba(255,255,255,.1); }.sidebar .icon-button b { border-color: var(--brand-blue); background: #1786d4; }
.top-profile { max-width: 190px; height: 42px; border: 0; display: flex; align-items: center; gap: 8px; padding: 0 4px 0 8px; color: white; background: transparent; text-align: left; }
.top-profile > svg { width: 14px; color: #aeb8ce; }.top-profile .avatar { width: 31px; height: 31px; background: #6f7198; }
.top-profile-copy { min-width: 0; display: flex; flex-direction: column; }.top-profile-copy strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }.top-profile-copy small { color: #9eabc2; font-size: 7px; margin-top: 2px; }
.sidebar .main-nav { position: static; min-width: 0; height: 64px; flex: 1 1 auto; display: flex; flex-direction: row; align-items: stretch; justify-content: flex-start; gap: 0; overflow-x: auto; scrollbar-width: none; }
.sidebar .main-nav::-webkit-scrollbar { display: none; }
.nav-overflow-control { position: relative; z-index: 4; width: 28px; height: 40px; flex: 0 0 28px; border: 1px solid rgba(255,255,255,.12); border-radius: 6px; display: grid; place-items: center; color: #fff; background: rgba(255,255,255,.09); box-shadow: 0 3px 10px rgba(10,21,43,.12); transition: opacity .15s ease,background .15s ease; }.nav-overflow-control[hidden] { display: none !important; }.nav-overflow-control:hover:not(:disabled) { background: rgba(255,255,255,.18); }.nav-overflow-control:disabled { opacity: .28; cursor: default; }.nav-overflow-control svg { width: 13px; }.nav-overflow-control.previous svg { transform: rotate(180deg); }
.sidebar .nav-item { width: auto; min-width: max-content; height: 64px; padding: 0 7px; display: flex; grid-template-columns: none; justify-content: center; gap: 4px; border-radius: 0; border-bottom: 3px solid transparent; color: #aeb7ca; font-size: 8.7px; }
.sidebar .nav-item svg { display: none; }.sidebar .nav-item:hover { background: rgba(255,255,255,.04); }.sidebar .nav-item.active { color: white; border-bottom-color: white; background: transparent; box-shadow: none; font-weight: 700; }
.sidebar .nav-item em { min-width: 17px; padding: 1px 4px; font-size: 8px; }.sidebar .nav-item em.warning { background: #b45849; }
.main-content { margin-left: 0; padding-top: var(--app-header-height); }
.page-container { padding: 20px 30px 72px; }
.page { max-width: 1540px; }
.page-heading, .section-header { margin-bottom: 16px; }
.page-heading h1, .section-header h1 { margin-top: 3px; color: #2e4e96; font-family: "DM Sans",sans-serif; font-size: 20px; line-height: 1.25; }
.page-heading > div:first-child > p:last-child, .section-header p { font-size: 10px; }
.eyebrow { font-size: 8px; }
.button, .quick-add { border-radius: 5px; font-size: 10px; }.button.primary, .quick-add { background: var(--brand-indigo); }
.alert-banner { padding: 11px 14px; border-radius: 6px; }
.metric-card, .panel, .data-panel, .toolbar { border-color: #dfe3ea; border-radius: 7px; box-shadow: none; }
.metric-card { padding: 15px; }.metric-card > p { margin-top: 12px; }.metric-card > strong { font-family: "DM Sans",sans-serif; font-size: 23px; }
.panel-header { min-height: 60px; padding: 14px 17px; }.panel-header h2 { font-family: "DM Sans",sans-serif; font-size: 14px; }
.toolbar { padding: 10px 12px; background: #edf2fb; }
.data-panel thead th, th { color: #26334c; background: #e9edf5; }
.data-table tbody tr:hover { background: #f3f6fb; }
.tabs { margin-bottom: 10px; background: white; }.tabs button.active { color: var(--brand-indigo); border-bottom-color: var(--brand-indigo); }
.field-search, .select { border-color: #d5dae3; background: white; }
.ai-fab { right: 24px; bottom: 20px; height: 48px; border-radius: 50%; width: 48px; padding: 0; justify-content: center; background: var(--brand-indigo); }.ai-label { display: none; }.ai-stars { color: white; }

@media (max-width: 1320px) {
  .sidebar .topbar { padding-inline: 12px; gap: 6px; }
  .sidebar .brand { width: 125px; flex-basis: 125px; }
  .sidebar .global-search { width: 175px; min-width: 145px; max-width: 175px; flex-basis: 175px; }
  .sidebar .global-search:focus-within { max-width: 275px; flex-basis: 275px; }
  .sidebar .nav-item { padding-inline: 3px; font-size: 8.2px; }
  .sidebar .top-actions .icon-button:last-child { display: none; }
  .top-profile-copy { display: none; }.top-profile { width: 46px; }
}

/* Header alignment and external resources */
.sidebar .brand-copy { min-width: 0; padding-left: 2px; }.sidebar .brand-copy strong { letter-spacing: 1.05px; }.sidebar .brand-copy span { letter-spacing: 3px; }
.case-nav, .external-links-nav { position: relative; height: 64px; flex: 0 0 auto; }
.case-nav-menu { position: fixed; z-index: 185; width: 176px; padding: 8px 0; border: 1px solid #d7deea; border-radius: 9px; color: #344258; background: #fff; box-shadow: 0 18px 45px rgba(14,29,55,.24); animation: quickMenuIn .14s ease-out; }
.case-nav-menu button { width: 100%; min-height: 40px; padding: 0 17px; border: 0; display: flex; align-items: center; color: #354052; background: transparent; text-align: left; font-size: 10px; }
.case-nav-menu button:hover, .case-nav-menu button:focus { color: #314f99; background: #f0f4fb; outline: 0; }
.sidebar .external-links-button { height: 64px; }.sidebar .external-links-button i { width: 12px; height: 12px; display: grid; place-items: center; transition: transform .16s ease; }.sidebar .external-links-button i svg { width: 11px; height: 11px; display: block; }.sidebar .external-links-button[aria-expanded="true"] i { transform: rotate(90deg); }
.external-links-menu { position: fixed; z-index: 180; width: min(390px,calc(100vw - 24px)); padding: 8px; border: 1px solid #d7deea; border-radius: 9px; color: #344258; background: #fff; box-shadow: 0 18px 45px rgba(14,29,55,.24); animation: quickMenuIn .14s ease-out; }
.external-links-head { min-height: 55px; padding: 7px 9px 12px; border-bottom: 1px solid #e5e9f0; display: flex; align-items: center; justify-content: space-between; gap: 15px; }.external-links-head div { display: flex; flex-direction: column; gap: 3px; }.external-links-head strong { color: #243450; font-size: 12px; }.external-links-head small { color: #8491a3; font-size: 8px; }.external-links-head > span { width: 28px; height: 28px; border-radius: 6px; display: grid; place-items: center; color: #4059aa; background: #edf2fa; }.external-links-head svg { width: 14px; }
.external-links-scroll { max-height: min(570px,calc(100vh - 180px)); padding: 5px 2px 2px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #bcc7d8 transparent; }
.external-links-scroll a { position: relative; min-height: 41px; padding: 7px 34px 7px 10px; border-radius: 5px; display: flex; flex-direction: column; justify-content: center; gap: 2px; color: #3d4b60; text-decoration: none; }.external-links-scroll a::after { content: "↗"; position: absolute; right: 11px; top: 50%; transform: translateY(-50%); color: #8a9ab0; font-size: 12px; }.external-links-scroll a:hover, .external-links-scroll a:focus { color: #314f99; background: #f0f4fb; outline: 0; }.external-links-scroll a span { font-size: 9.5px; font-weight: 600; line-height: 1.3; }.external-links-scroll a small { color: #8b97a7; font-size: 7.8px; line-height: 1.3; }

@media (max-width: 780px) {
  :root { --app-header-height: 58px; }
  .sidebar { height: 58px; transform: none; }
  .sidebar .topbar { height: 58px; padding: 0 12px; }
  .menu-toggle { display: inline-grid; color: white; }
  .sidebar .brand { width: 126px; flex-basis: 126px; }.sidebar .brand-symbol { width: 27px; height: 27px; }.sidebar .brand-copy strong { font-size: 12px; }.sidebar .brand-copy span { display: none; }
  .advanced-search, .sidebar .top-actions { display: none; }.quick-create .header-add { display: grid; }
  .nav-overflow-control { display: none !important; }
  .sidebar .global-search, .sidebar .global-search:focus-within { width: auto; min-width: 0; max-width: none; flex: 1 1 auto; }.sidebar .global-search input { min-width: 0; }
  .top-profile { width: 38px; padding: 0; }.top-profile > svg { display: none; }
  .sidebar .main-nav { display: none; position: fixed; left: 0; right: 0; top: 58px; bottom: auto; height: auto; max-height: calc(100vh - 58px); padding: 8px; flex-direction: column; align-items: stretch; overflow-y: auto; background: var(--brand-blue); box-shadow: 0 12px 30px rgba(16,29,54,.25); }
  .sidebar.open .main-nav { display: flex; }
  .sidebar .nav-item { width: 100%; height: 43px; padding: 0 14px; justify-content: flex-start; border: 0; border-radius: 5px; }
  .sidebar .nav-item svg { display: block; }.sidebar .nav-item.active { border: 0; background: rgba(255,255,255,.1); }
  .case-nav, .external-links-nav { width: 100%; height: auto; }.sidebar .case-nav-button, .sidebar .external-links-button { width: 100%; }.case-nav-menu { position: static; width: 100%; margin: 3px 0 7px; border-color: rgba(255,255,255,.12); color: #d9e0ec; background: #1e2d51; box-shadow: none; }.case-nav-menu button { color: #d1d9e7; }.case-nav-menu button:hover, .case-nav-menu button:focus { color: #fff; background: rgba(255,255,255,.08); }.external-links-menu { position: static; width: 100%; margin: 3px 0 7px; border-color: rgba(255,255,255,.12); color: #d9e0ec; background: #1e2d51; box-shadow: none; }.external-links-head { border-color: rgba(255,255,255,.1); }.external-links-head strong { color: #fff; }.external-links-head small { color: #91a0ba; }.external-links-scroll { max-height: 45vh; }.external-links-scroll a { color: #d1d9e7; }.external-links-scroll a:hover, .external-links-scroll a:focus { color: #fff; background: rgba(255,255,255,.08); }.external-links-scroll a small { color: #8e9cb4; }
  .main-content { padding-top: 58px; }.page-container { padding: 18px 13px 70px; }
  .quick-create-menu { position: fixed; top: 55px; left: 8px; right: 8px; width: auto; }.quick-create-menu::before { left: 184px; }
}

/* Visual refinement: familiar legal-workflow density */
.module-strip { min-height: 42px; margin: -20px -30px 15px; padding: 0 30px; display: flex; align-items: stretch; gap: 2px; overflow-x: auto; border-bottom: 1px solid #d9e0ee; background: white; scrollbar-width: none; }
.module-strip::-webkit-scrollbar { display: none; }
.module-strip button { min-width: max-content; border: 0; border-bottom: 2px solid transparent; padding: 0 13px; display: flex; align-items: center; gap: 6px; color: #6d7f99; background: transparent; font-size: 10px; }
.module-strip button svg { width: 14px; }.module-strip button:hover { color: #39569c; background: #f7f9fd; }.module-strip button.active { color: #3653a0; border-bottom-color: #4059aa; background: #f4f7fd; font-weight: 700; }
.page-heading, .section-header { position: relative; padding-bottom: 10px; border-bottom: 2px solid #4059aa; }
.dashboard-page .page-heading { border-bottom: 0; }
.section-header::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 85px; height: 2px; background: #d1aa5f; }
.page-heading h1, .section-header h1 { letter-spacing: -.2px; }
.heading-actions { align-items: center; }
.button { box-shadow: 0 1px 2px rgba(24,43,83,.05); transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.button:hover { transform: translateY(-1px); }.button.secondary:hover { border-color: #9fb0ce; color: #36569a; background: #f9fbff; }
.button.primary { box-shadow: 0 3px 8px rgba(57,82,157,.16); }
.toolbar { gap: 8px; border-color: #d5dff1; background: linear-gradient(180deg,#f1f5fc,#edf2fb); }
.field-search, .select { box-shadow: 0 1px 2px rgba(33,50,80,.03); }.field-search:focus-within { border-color: #758ec1; box-shadow: 0 0 0 3px rgba(64,89,170,.08); }
.metric-card { position: relative; overflow: hidden; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.metric-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: linear-gradient(90deg,#4059aa,#7f93c8 55%,transparent); opacity: .65; }
.metric-card:hover { border-color: #cbd5e5; transform: translateY(-2px); box-shadow: 0 8px 22px rgba(34,52,86,.07); }
.metric-icon { border-radius: 50%; }
.panel { transition: border-color .18s ease, box-shadow .18s ease; }.panel:hover { border-color: #d2d9e5; box-shadow: 0 5px 16px rgba(31,48,80,.045); }
.panel-header { background: linear-gradient(180deg,#fff,#fcfdff); }
.data-panel { box-shadow: 0 2px 8px rgba(31,48,80,.035); }
.data-table thead { position: sticky; top: var(--app-header-height); z-index: 2; }
.data-table th { height: 38px; padding: 9px 14px; letter-spacing: .35px; }.data-table td { height: 48px; padding: 9px 14px; border-color: #e8ecf2; }
.data-table tbody tr { transition: background .14s ease; }.data-table tbody tr:nth-child(even) { background: #fcfdff; }.data-table tbody tr:hover { background: #f2f6fd; }
.row-action { width: 28px; height: 28px; display: inline-grid; place-items: center; border-radius: 4px; }.row-action:hover { color: #4059aa; background: #e8eef9; }
.status::before { content: ""; width: 5px; height: 5px; margin-right: 5px; border-radius: 50%; background: currentColor; }
.pagination { min-height: 48px; background: #fbfcfe; }
.calculator-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }.calculator-card { min-height: 158px; padding: 20px; }
.document-layout { border-radius: 6px; box-shadow: 0 3px 12px rgba(31,48,80,.04); }.document-row:hover { background: #f1f5fb; }
.modal { border: 1px solid #d6deeb; box-shadow: 0 28px 80px rgba(13,28,56,.28); }.modal::before { content: ""; display: block; height: 4px; background: linear-gradient(90deg,#334d91,#536db8,#c5a259); }.modal-body h2 { color: #263b69; font-family: "DM Sans",sans-serif; }
.form-group input, .form-group select, .form-group textarea { transition: border-color .15s ease, box-shadow .15s ease; }.form-group input:hover, .form-group select:hover, .form-group textarea:hover { border-color: #b9c5d7; }
.ai-fab { transition: transform .18s ease, box-shadow .18s ease; box-shadow: 0 8px 22px rgba(51,77,145,.3); }.ai-fab:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 12px 26px rgba(51,77,145,.36); }

@media (max-width: 1100px) { .calculator-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 780px) { .module-strip { margin: -18px -13px 14px; padding: 0 13px; }.page-heading, .section-header { padding-bottom: 9px; }.data-table thead { top: 58px; } }
@media (max-width: 520px) { .calculator-grid { grid-template-columns: 1fr; } }

/* Advanced search */
.advanced-search-modal { max-height: 94vh; overflow: hidden; }
.advanced-search-modal::before { height: 3px; }
.advanced-search-modal .modal-close { top: 13px; right: 13px; }
.advanced-search-form { max-height: calc(94vh - 3px); overflow-y: auto; padding: 26px 28px 24px; background: #fff; }
.advanced-search-head { min-height: 64px; display: grid; grid-template-columns: 245px 1fr 245px; align-items: start; padding-bottom: 18px; border-bottom: 1px solid #e1e5ec; }
.advanced-search-head > div { grid-column: 2; text-align: center; }.advanced-search-head .eyebrow { margin: 0 0 4px; }.advanced-search-head h2 { margin: 0; display: flex; justify-content: center; align-items: center; gap: 8px; color: #3854a0; font-size: 20px; }.advanced-search-head h2 svg { width: 20px; }
.columns-toggle { height: 42px; padding: 0 15px; border: 2px solid #4059aa; border-radius: 7px; display: flex; align-items: center; justify-content: center; gap: 8px; color: #4059aa; background: white; font-size: 12px; font-weight: 600; }.columns-toggle:hover { background: #f2f5fc; }.columns-toggle svg { width: 17px; }
.columns-panel { margin: 13px 0; padding: 13px 16px; display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; border: 1px solid #dce3f0; border-radius: 7px; background: #f7f9fd; }.columns-panel label { display: flex; align-items: center; gap: 7px; color: #526075; font-size: 10px; }.columns-panel input, .advanced-field label input { accent-color: #4bc424; }
.advanced-grid { padding: 22px 0 18px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 21px 23px; }
.advanced-field { min-width: 0; display: flex; flex-direction: column; gap: 7px; }.advanced-field > label { min-height: 18px; display: flex; align-items: center; gap: 5px; color: #343c49; font-size: 11px; font-weight: 500; }.advanced-field > label input { width: 15px; height: 15px; margin: 0; }
.advanced-field > input, .advanced-field > select, .date-range { width: 100%; height: 43px; border: 1px solid #d6dce5; border-radius: 6px; color: #48576c; background: #fff; outline: 0; }.advanced-field > input, .advanced-field > select { padding: 0 11px; font-size: 10px; }.advanced-field > input:focus, .advanced-field > select:focus, .date-range:focus-within { border-color: #7d95c5; box-shadow: 0 0 0 3px rgba(64,89,170,.08); }
.date-range { display: grid; grid-template-columns: 1fr 18px 1fr; align-items: center; }.date-range span { color: #9ba5b2; text-align: center; }.date-range input { min-width: 0; height: 40px; border: 0; outline: 0; padding: 0 8px; color: #5d697a; background: transparent; font-size: 9px; }
.other-data-toggle { width: 100%; height: 52px; padding: 0 17px; border: 1px solid #dce3f0; border-radius: 8px; display: grid; grid-template-columns: 22px 1fr 18px; align-items: center; gap: 8px; color: #3b56a0; background: #f5f7fc; text-align: left; font-size: 12px; font-weight: 700; }.other-data-toggle:hover { background: #eef2fa; }.other-data-toggle svg { width: 17px; }.other-data-toggle > span:last-child { justify-self: end; }
.other-data-panel { padding: 18px 16px; display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; border: 1px solid #e0e5ed; border-top: 0; border-radius: 0 0 8px 8px; }
.advanced-actions { padding-top: 24px; display: flex; justify-content: center; gap: 10px; }.advanced-actions .button { min-width: 122px; min-height: 43px; }

@media (max-width: 1050px) { .advanced-search-head { grid-template-columns: 210px 1fr; }.advanced-search-head > div { grid-column: 2; }.advanced-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }.columns-panel, .other-data-panel { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 680px) { .advanced-search-form { padding: 20px 14px; }.advanced-search-head { display: flex; flex-direction: column-reverse; align-items: stretch; gap: 14px; }.advanced-search-head > div { text-align: left; }.advanced-search-head h2 { justify-content: flex-start; font-size: 17px; }.advanced-grid, .columns-panel, .other-data-panel { grid-template-columns: 1fr; }.advanced-actions { flex-wrap: wrap; }.advanced-actions .button { flex: 1; min-width: 100px; } }

/* Settings center */
.settings-page { min-height: calc(100vh - var(--app-header-height) - 40px); margin: -20px -30px -70px; display: grid; grid-template-columns: 238px minmax(0,1fr); background: #f4f6fa; }
.settings-sidebar { min-width: 0; border-right: 1px solid #d9e0eb; background: #fff; }
.settings-sidebar-head { height: 64px; padding: 0 16px 0 20px; border-bottom: 1px solid #e1e6ee; display: flex; align-items: center; justify-content: space-between; color: #172238; font-size: 13px; }
.settings-collapse { width: 38px; height: 38px; border: 1px solid #dfe4ec; border-radius: 5px; display: grid; place-items: center; color: #8090a7; background: #fff; box-shadow: 0 2px 6px rgba(27,44,76,.08); }
.settings-collapse:hover { color: #4059aa; background: #f7f9fd; }.settings-collapse svg { width: 15px; }
.settings-sidebar nav { padding: 10px 7px 24px; display: flex; flex-direction: column; gap: 2px; }
.settings-sidebar nav button { position: relative; width: 100%; min-height: 40px; padding: 0 14px 0 22px; border: 0; border-radius: 5px; display: flex; align-items: center; gap: 10px; color: #29313d; background: transparent; text-align: left; font-size: 10.5px; }
.settings-sidebar nav button:hover { color: #3e59a4; background: #f6f8fc; }.settings-sidebar nav button.active { color: #3855a3; background: #f0f3fa; font-weight: 700; }
.settings-sidebar nav button.active::after { content: ""; position: absolute; inset: 0 0 0 auto; width: 3px; border-radius: 3px 0 0 3px; background: #4059aa; }
.settings-sidebar nav button > span { width: 17px; height: 17px; display: grid; place-items: center; flex: 0 0 17px; }.settings-sidebar nav svg { width: 15px; height: 15px; }.settings-sidebar nav b { font: inherit; white-space: nowrap; }
.settings-page.menu-collapsed { grid-template-columns: 66px minmax(0,1fr); }.menu-collapsed .settings-sidebar-head { padding: 0; justify-content: center; }.menu-collapsed .settings-sidebar-head strong { display: none; }.menu-collapsed .settings-sidebar nav button { padding: 0; justify-content: center; }.menu-collapsed .settings-sidebar nav button b { display: none; }
.settings-workspace { min-width: 0; padding: 23px 28px 70px; }
.settings-title { min-height: 48px; margin-bottom: 14px; display: flex; align-items: flex-start; gap: 10px; }
.settings-title > span { width: 36px; height: 36px; border-radius: 4px; display: grid; place-items: center; color: #fff; background: #4059aa; box-shadow: 0 4px 10px rgba(64,89,170,.16); }.settings-title > span svg { width: 17px; }
.settings-title h1 { margin: 2px 0 3px; color: #1b2942; font-size: 18px; }.settings-title p { margin: 0; color: #7a879a; font-size: 10px; }
.settings-card, .settings-welcome-card { border: 1px solid #d6deeb; border-radius: 9px; background: #fff; box-shadow: 0 2px 7px rgba(35,52,82,.025); }
.settings-card { padding: 20px; }.settings-card-head { min-height: 54px; margin: -4px 0 18px; padding-bottom: 14px; border-bottom: 1px solid #e7eaf0; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.settings-card h2, .settings-welcome-card h2 { margin: 0 0 7px; color: #202b3e; font-size: 15px; }.settings-card p, .settings-welcome-card p { margin: 0; color: #7a8492; font-size: 10.5px; line-height: 1.55; }.settings-card-head p { max-width: 720px; }
.settings-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px 18px; }.settings-control { min-width: 0; display: flex; flex-direction: column; gap: 7px; color: #364154; font-size: 10px; font-weight: 600; }.settings-control.wide, .settings-toggle-list.wide { grid-column: 1/-1; }
.settings-control input, .settings-control select, .settings-control textarea { width: 100%; height: 42px; padding: 0 12px; border: 1px solid #d7dde7; border-radius: 5px; color: #465368; background: #fff; outline: 0; font: inherit; font-weight: 400; }.settings-control textarea { min-height: 92px; padding: 10px 12px; resize: vertical; }.settings-control input:focus, .settings-control select:focus, .settings-control textarea:focus { border-color: #8196c4; box-shadow: 0 0 0 3px rgba(64,89,170,.08); }.settings-control b { color: #e14343; }
.settings-weekdays { grid-column: 1/-1; min-width: 0; margin: 0; padding: 13px; border: 1px solid #d7dde7; border-radius: 7px; }.settings-weekdays legend { padding: 0 6px; color: #364154; font-size: 10px; font-weight: 700; }.settings-weekdays > div { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 8px; }.settings-weekdays label { min-width: 0; height: 38px; border: 1px solid #d7dde7; border-radius: 5px; display: grid; place-items: center; color: #5f6d82; background: #fff; font-size: 9.5px; font-weight: 700; cursor: pointer; transition: border-color .15s ease, background .15s ease, color .15s ease; }.settings-weekdays input { position: absolute; opacity: 0; pointer-events: none; }.settings-weekdays label:has(input:checked) { border-color: #4059aa; color: #fff; background: #4059aa; box-shadow: 0 4px 10px rgba(64,89,170,.14); }.settings-weekdays label:hover { border-color: #8196c4; background: #f6f8fd; }.settings-weekdays label:has(input:checked):hover { background: #344c94; }
.settings-toggle-list { border: 1px solid #e2e7ef; border-radius: 7px; overflow: hidden; }.settings-toggle-row { min-height: 60px; padding: 11px 14px; border-bottom: 1px solid #e8ecf2; display: flex; align-items: center; justify-content: space-between; gap: 20px; }.settings-toggle-row:last-child { border-bottom: 0; }.settings-toggle-row div { display: flex; flex-direction: column; gap: 3px; }.settings-toggle-row strong { color: #334056; font-size: 10.5px; }.settings-toggle-row small { color: #8792a2; font-size: 9.5px; line-height: 1.4; }
.settings-footer { margin-top: 20px; padding-top: 17px; border-top: 1px solid #e7eaf0; display: flex; justify-content: flex-end; }
.settings-welcome-card { min-height: 215px; padding: 30px 34px; display: flex; align-items: center; justify-content: space-between; gap: 34px; overflow: hidden; }.settings-welcome-card > div { max-width: 850px; }.settings-welcome-card h2 { margin-bottom: 12px; font-size: 18px; }.settings-welcome-card p { font-size: 11px; }.settings-welcome-card .eyebrow { margin-bottom: 8px; color: #b18028; font-size: 8.5px; font-weight: 700; }.welcome-actions { margin-top: 22px; display: flex; gap: 9px; }.welcome-shield { width: 150px; height: 150px; flex: 0 0 150px; display: grid; place-items: center; color: rgba(64,89,170,.12); transform: rotate(-7deg); }.welcome-shield svg { width: 132px; height: 132px; stroke-width: .8; }
.settings-quick-grid { margin-top: 14px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }.settings-quick-grid article { min-height: 112px; padding: 17px; border: 1px solid #dfe4ec; border-radius: 7px; display: flex; flex-direction: column; background: #fff; }.settings-quick-grid article > span { width: 28px; height: 28px; margin-bottom: 12px; color: #4059aa; }.settings-quick-grid svg { width: 22px; height: 22px; }.settings-quick-grid strong { color: #2b374c; font-size: 11px; }.settings-quick-grid small { margin-top: 4px; color: #8791a1; font-size: 9px; line-height: 1.4; }
.integration-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; }.integration-card { min-height: 225px; padding: 19px; border: 1px solid #dbe1ea; border-radius: 8px; display: flex; flex-direction: column; background: #fff; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }.integration-card:hover { border-color: #c5d0e2; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(29,48,82,.06); }.integration-card-top { margin-bottom: 14px; display: flex; justify-content: space-between; align-items: flex-start; }.integration-icon, .settings-feature-icon { width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center; color: #4059aa; background: #edf2fc; }.integration-icon svg, .settings-feature-icon svg { width: 19px; }.integration-card h2 { margin: 0 0 3px; color: #27364f; font-size: 13px; }.integration-card > strong { color: #6f7d91; font-size: 9px; font-weight: 500; }.integration-card p { min-height: 38px; margin: 10px 0 15px; color: #7b8798; font-size: 9.5px; line-height: 1.5; }.integration-card .button { margin-top: auto; align-self: flex-start; }
.channel-list { display: flex; flex-direction: column; }.channel-row { min-height: 70px; padding: 13px 0; border-bottom: 1px solid #e7eaf0; display: grid; grid-template-columns: 48px minmax(0,1fr) auto auto; align-items: center; gap: 13px; }.channel-row:last-child { border-bottom: 0; }.channel-row .integration-icon { width: 38px; height: 38px; }.channel-row > div { display: flex; flex-direction: column; gap: 4px; }.channel-row strong { color: #334056; font-size: 10.5px; }.channel-row small { color: #8792a2; font-size: 9px; }
.empty-settings { min-height: 280px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }.empty-settings > span { width: 58px; height: 58px; margin-bottom: 15px; border-radius: 50%; display: grid; place-items: center; color: #7990c1; background: #eff3fb; }.empty-settings svg { width: 25px; }.empty-settings p { max-width: 460px; }
.security-overview-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; }.settings-card.compact { min-height: 210px; display: flex; flex-direction: column; align-items: flex-start; }.settings-card.compact .settings-feature-icon { margin-bottom: 18px; }.settings-card.compact p { min-height: 52px; }.settings-card.compact .button, .settings-card.compact .status { margin-top: auto; }
.system-status { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1px; border: 1px solid #e3e7ee; border-radius: 7px; overflow: hidden; background: #e3e7ee; }.system-status > div { min-height: 76px; padding: 15px; display: flex; flex-direction: column; gap: 7px; background: #fff; }.system-status span { color: #8a94a3; font-size: 9px; text-transform: uppercase; letter-spacing: .4px; }.system-status strong { color: #344157; font-size: 11px; }.settings-note { margin-top: 17px; padding: 12px 14px; border: 1px solid #dbe4f2; border-radius: 6px; color: #60718d; background: #f4f7fc; font-size: 9.5px; line-height: 1.5; }
.contact-fields-card .case-config-head { margin-bottom: 18px; }.contact-fields-subtitle { margin: 18px 0 14px; color: #263653; font-size: 13px; }.contact-fields-empty { min-height: 260px; }.contact-fields-empty .button { margin-top: 18px; }
.contact-field-editor { margin-bottom: 18px; border: 1px solid #d8e0ef; border-radius: 8px; overflow: hidden; background: #fff; box-shadow: 0 4px 14px rgba(31,48,82,.035); }.contact-field-editor header { min-height: 48px; padding: 0 22px; border-bottom: 1px solid #e5eaf2; display: flex; align-items: center; gap: 8px; color: #293a5c; background: #fafbfe; font-size: 12px; }.contact-field-editor header svg { width: 15px; color: #4059aa; }.contact-field-editor-body { padding: 20px 22px 22px; display: grid; gap: 18px; }.contact-field-editor .modal-check { margin: -4px 0 0; color: #3b4657; font-size: 10px; }
.contact-field-preview { min-height: 120px; padding: 17px 18px; border: 1px dashed #ccd8ee; border-radius: 8px; display: flex; flex-direction: column; gap: 12px; background: #f7faff; }.contact-field-preview > small { color: #8a96a8; font-size: 9px; }.contact-field-preview label { max-width: 330px; display: flex; flex-direction: column; gap: 8px; color: #2e394c; font-size: 10px; }.contact-field-preview input, .contact-field-preview select, .contact-field-preview textarea { width: 100%; min-height: 40px; border: 1px solid #d4dbe6; border-radius: 5px; padding: 0 11px; color: #7b8798; background: #eef2f7; font-size: 10px; }.contact-field-preview textarea { min-height: 68px; padding-top: 10px; }.contact-preview-check { min-height: 36px; display: flex; align-items: center; gap: 8px; color: #66758c; }
.contact-field-editor-actions { display: flex; justify-content: center; gap: 10px; }.contact-field-editor-actions .button { min-width: 98px; }
.general-toolbar { margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }.general-toolbar label { width: min(330px,100%); height: 42px; border: 1px solid #d7deea; border-radius: 5px; display: grid; grid-template-columns: 1fr 42px; align-items: center; overflow: hidden; background: #fff; }.general-toolbar input { min-width: 0; height: 100%; border: 0; outline: 0; padding: 0 12px; color: #425066; font-size: 10px; }.general-toolbar label > span { width: 42px; height: 42px; display: grid; place-items: center; color: #fff; background: #4059aa; }.general-toolbar label > span svg { width: 14px; height: 14px; }.tags-toolbar > div { display: flex; gap: 8px; align-items: center; }.tags-toolbar select { width: 164px; height: 42px; border: 1px solid #d7deea; border-radius: 5px; padding: 0 12px; color: #778195; background: #fff; font-size: 10px; }.tags-toolbar .button.secondary:disabled { opacity: .55; cursor: not-allowed; }.tags-table th, .tags-table td { text-align: center; }.tags-table th:nth-child(2), .tags-table td:nth-child(2) { text-align: left; }.tags-table input[type="checkbox"] { width: 14px; height: 14px; accent-color: #4059aa; }.tag-color-line { width: 32px; height: 7px; margin-right: 8px; border-radius: 999px; display: inline-block; vertical-align: middle; background: var(--swatch); }
.general-judicial-filters { margin-bottom: 18px; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px; }.general-judicial-filters select { height: 42px; border: 1px solid #d7dde7; border-radius: 5px; padding: 0 12px; color: #647086; background: #fff; font-size: 10px; }.judicial-tree { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 9px; overflow-x: hidden; }.judicial-node-group { width: calc(100% - (var(--level) * 24px)); max-width: 760px; margin-left: calc(var(--level) * 24px); display: flex; flex-direction: column; align-items: flex-start; gap: 9px; }.judicial-node { min-height: 40px; width: 100%; padding: 0 10px 0 12px; border: 1px solid #dfe6f1; border-left: 3px solid var(--node-color); border-radius: 7px; display: grid; grid-template-columns: 18px auto minmax(0,1fr) max-content; align-items: center; gap: 8px; color: #1f2c42; background: #fff; box-shadow: 0 2px 7px rgba(29,45,74,.055); }.judicial-toggle, .judicial-node > span { width: 18px; height: 24px; border: 0; padding: 0; display: grid; place-items: center; color: #9aabbf; background: transparent; font-size: 15px; line-height: 1; transform: rotate(90deg); cursor: pointer; }.judicial-toggle.collapsed { transform: rotate(0deg); }.judicial-toggle:hover { color: #4059aa; }.judicial-node strong { padding: 5px 9px; border-radius: 999px; color: var(--node-color); background: color-mix(in srgb, var(--node-color) 12%, white); font-size: 8px; letter-spacing: .35px; white-space: nowrap; }.judicial-node b { min-width: 0; padding-right: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10.5px; font-weight: 700; }.judicial-node-actions { min-width: 0; display: inline-flex; align-items: center; justify-content: flex-end; gap: 5px; }.judicial-node-actions .button { margin-left: 0; white-space: nowrap; }.judicial-node-actions > button:not(.button) { width: 26px; height: 26px; border: 1px solid #dfe6f1; border-radius: 5px; display: grid; place-items: center; color: #7890ad; background: #fff; }.judicial-node-actions > button:not(.button):hover { color: #4059aa; background: #eef3fb; }.judicial-node-actions svg { width: 13px; }.button.compact { min-height: 28px; padding: 0 10px; font-size: 9px; }.general-inline-actions { margin-left: -4px; display: inline-flex; gap: 3px; }.general-inline-actions button { width: 27px; height: 27px; border-radius: 4px; display: grid; place-items: center; color: #7890ad; }.general-inline-actions button:hover { color: #4059aa; background: #eef3fb; }.general-inline-actions svg { width: 13px; }.general-name-only { grid-column: 1/-1; display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 12px; }.general-name-only input { height: 42px; }

@media (max-width: 1100px) { .settings-page { grid-template-columns: 205px minmax(0,1fr); }.integration-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }.settings-quick-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }.security-overview-grid { grid-template-columns: 1fr; } }
@media (max-width: 780px) { .settings-page { min-height: calc(100vh - 58px); margin: -18px -13px -70px; grid-template-columns: 1fr; }.settings-sidebar { position: sticky; top: 58px; z-index: 4; border-right: 0; border-bottom: 1px solid #d9e0eb; }.settings-sidebar-head { display: none; }.settings-sidebar nav { padding: 7px 10px; flex-direction: row; overflow-x: auto; scrollbar-width: none; }.settings-sidebar nav::-webkit-scrollbar { display: none; }.settings-sidebar nav button { width: auto; min-width: max-content; min-height: 36px; padding: 0 12px; }.settings-sidebar nav button.active::after { inset: auto 8px 0; width: auto; height: 2px; }.settings-page.menu-collapsed { grid-template-columns: 1fr; }.menu-collapsed .settings-sidebar nav button { padding: 0 12px; }.menu-collapsed .settings-sidebar nav button b { display: block; }.settings-workspace { padding: 18px 13px 70px; }.integration-grid { grid-template-columns: 1fr; }.settings-welcome-card { padding: 24px; }.welcome-shield { display: none; }.settings-weekdays > div { grid-template-columns: repeat(4,minmax(0,1fr)); }.general-judicial-filters { grid-template-columns: 1fr; }.judicial-node { grid-template-columns: 18px auto minmax(0,1fr); row-gap: 7px; }.judicial-node-actions { grid-column: 1/-1; justify-content: flex-start; padding-left: 26px; }.judicial-node-actions .button { grid-column: auto; justify-self: auto; } }
@media (max-width: 560px) { .settings-form-grid, .settings-quick-grid, .system-status { grid-template-columns: 1fr; }.settings-control.wide, .settings-toggle-list.wide, .settings-weekdays { grid-column: auto; }.settings-weekdays > div { grid-template-columns: repeat(2,minmax(0,1fr)); }.judicial-node-group { margin-left: calc(var(--level) * 10px); }.judicial-node { width: 100%; }.channel-row { grid-template-columns: 43px minmax(0,1fr); }.channel-row > .status, .channel-row > .button { grid-column: 2; justify-self: start; }.welcome-actions { flex-direction: column; align-items: stretch; }.settings-title h1 { font-size: 16px; } }

/* Third-party integrations */
.third-party-panel { padding: 21px 22px 28px; border: 1px solid #d3dced; border-radius: 9px; background: #fff; }
.third-party-head { margin-bottom: 22px; padding-bottom: 14px; border-bottom: 2px solid #4059aa; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }.third-party-head h2 { margin: 0 0 5px; color: #3653a0; font-size: 15px; }.third-party-head p { margin: 0; color: #76879f; font-size: 10px; }.third-party-head > span { display: flex; align-items: center; gap: 6px; color: #73829a; font-size: 9px; }.third-party-head > span svg { width: 14px; }
.provider-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; align-items: stretch; }.provider-card { min-width: 0; border: 1px solid #d4dded; border-radius: 8px; display: flex; flex-direction: column; overflow: hidden; background: #fff; box-shadow: 0 2px 6px rgba(33,51,83,.025); }
.provider-banner { height: 116px; padding: 18px; display: flex; align-items: center; justify-content: center; gap: 13px; overflow: hidden; }
.provider-banner.google { color: #4e5157; background: linear-gradient(135deg,#f5f7fa,#d9dce2); }.google-wordmark { white-space: nowrap; font-size: clamp(24px,2.8vw,40px); letter-spacing: -3px; }.google-wordmark b:nth-child(1),.google-wordmark b:nth-child(4){color:#4285f4}.google-wordmark b:nth-child(2),.google-wordmark b:nth-child(6){color:#ea4335}.google-wordmark b:nth-child(3){color:#fbbc05}.google-wordmark b:nth-child(5){color:#34a853}.google-wordmark strong { color:#555b65; font-weight:500; letter-spacing:-2px; }
.provider-banner.pjn { color: #133957; background: linear-gradient(135deg,#eef2f6,#cfd5dc); }.provider-banner.pjn > span { width: 54px; height: 54px; flex: 0 0 54px; display: grid; place-items: center; border: 2px solid #8ca0b5; border-radius: 50%; }.provider-banner.pjn svg { width: 34px; }.provider-banner.pjn strong { max-width: 210px; font-family: "Playfair Display",serif; font-size: 18px; line-height: 1.05; }.provider-banner.pjn small { display: none; }
.provider-banner.srt { flex-direction: column; gap: 0; color: #fff; background: linear-gradient(135deg,#1fa5d4,#138ebd); }.provider-banner.srt strong { font-size: 48px; line-height: 1; letter-spacing: 2px; }.provider-banner.srt small { font-size: 9px; letter-spacing: .2px; }
.provider-banner.mendoza { justify-content: flex-start; color: #fff; background: linear-gradient(135deg,#182b5f,#2f4277); }.provider-banner.mendoza > span { width: 52px; height: 52px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.5); border-radius: 50%; }.provider-banner.mendoza svg { width: 29px; }.provider-banner.mendoza div { display: flex; flex-direction: column; }.provider-banner.mendoza strong { font-family: "Playfair Display",serif; font-size: 20px; letter-spacing: .5px; }.provider-banner.mendoza small { font-size: 8px; letter-spacing: 2px; }
.provider-banner.whatsapp { justify-content: flex-start; color: #fff; background: linear-gradient(135deg,#128c7e,#25d366); }.provider-banner.whatsapp .wa-mark { width: 62px; height: 62px; border: 4px solid white; border-radius: 50%; display: grid; place-items: center; font-size: 37px; }.provider-banner.whatsapp div { display: flex; flex-direction: column; }.provider-banner.whatsapp strong { font-size: 27px; }.provider-banner.whatsapp small { color: rgba(255,255,255,.85); font-size: 10px; }
.provider-banner.mail { justify-content: flex-start; color: #fff; background: linear-gradient(135deg,#4059aa,#253a76); }.provider-banner.mail > span { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 12px; background: rgba(255,255,255,.14); }.provider-banner.mail svg { width: 29px; }.provider-banner.mail div { display: flex; flex-direction: column; }.provider-banner.mail strong { font-size: 20px; }.provider-banner.mail small { color: rgba(255,255,255,.75); font-size: 10px; }
.provider-summary { position: relative; min-height: 91px; padding: 25px 16px 13px; border-bottom: 1px solid #d8e0ee; }.provider-logo { position: absolute; left: 17px; top: -28px; width: 46px; height: 46px; padding: 8px; border: 1px solid #cfd9e9; border-radius: 9px; display: grid; place-items: center; color: #4059aa; background: #fff; box-shadow: 0 3px 8px rgba(24,44,79,.09); font-size: 10px; font-weight: 800; }.provider-logo svg { width: 25px; }.provider-logo.google-g { color: #4285f4; font-size: 24px; }.provider-logo.srt-logo { color: #159dcc; }.provider-logo.wa-logo { color: #16a66b; font-size: 22px; }.provider-logo.mail-logo { color: #4059aa; }.provider-summary h3 { margin: 0 0 4px; color: #202a3a; font-size: 11.5px; }.provider-summary p { margin: 0 0 7px; color: #6f819b; font-size: 9px; line-height: 1.35; }.link-state { padding: 2px 9px; border: 1px solid #cbd5e3; border-radius: 10px; color: #60758f; background: #f5f7fa; font-size: 8px; }
.provider-config { min-height: 255px; padding: 17px 16px 16px; display: flex; flex-direction: column; gap: 12px; }.provider-config > p { margin: 0; color: #6d809b; font-size: 9.5px; line-height: 1.55; }.provider-config label { min-width: 0; display: flex; flex-direction: column; gap: 6px; color: #303949; font-size: 9px; font-weight: 700; }.provider-config label > span::first-letter { color: #e14343; }.provider-config input, .provider-config select { width: 100%; height: 38px; padding: 0 10px; border: 1px solid #cfd9e9; border-radius: 5px; color: #43516a; background: #eef4fd; outline: 0; font-size: 9.5px; }.provider-config input:focus, .provider-config select:focus { border-color: #8196c4; box-shadow: 0 0 0 3px rgba(64,89,170,.08); }.password-field { position: relative; }.password-field input { padding-right: 35px; }.password-field i { position: absolute; right: 10px; top: 10px; width: 16px; height: 16px; color: #8b98aa; }.password-field svg { width: 14px; }.provider-inline { display: grid; grid-template-columns: 1fr 1.5fr; gap: 10px; }
.provider-button { width: 100%; min-height: 38px; margin-top: auto; border: 1px solid #4059aa; border-radius: 4px; color: #fff; background: #4059aa; font-size: 9.5px; font-weight: 700; }.provider-button:hover { background: #344c94; }.provider-button.outline { border-color: #d3d9e2; color: #3d4654; background: #fff; }.provider-button.outline:hover { border-color: #9eacc1; background: #fafbfe; }.google-config { justify-content: space-between; }.google-mini { margin-right: 8px; color: #4285f4; font-size: 15px; }.provider-config ul { margin: 0; padding-left: 17px; color: #687a92; font-size: 9px; line-height: 1.65; }.whatsapp-button { border-color: #168c62; background: #168c62; }.whatsapp-button:hover { background: #107451; }

/* WhatsApp QR connection simulation */
.whatsapp-connect-modal { max-height: 94vh; overflow: hidden; }.whatsapp-connect-modal::before { background: linear-gradient(90deg,#128c7e,#25d366); }.whatsapp-connect-modal .modal-close { color: #6a788d; }
.whatsapp-connect-shell { max-height: calc(94vh - 4px); padding: 24px; overflow-y: auto; background: #f4f6f9; }.whatsapp-connect-head { margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }.whatsapp-connect-head > div { display: flex; align-items: center; gap: 11px; }.wa-live-mark { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: #18a971; font-size: 25px; }.whatsapp-connect-head .eyebrow { margin: 0 0 3px; color: #16845e; }.whatsapp-connect-head h2 { margin: 0; color: #26354c; font-size: 17px; }.demo-badge { padding: 5px 9px; border: 1px solid #e3b64f; border-radius: 4px; color: #8a6412; background: #fff4d7; font-size: 8px; font-weight: 800; letter-spacing: .45px; }
.browser-simulation { border: 1px solid #cbd4df; border-radius: 9px; overflow: hidden; background: #fff; box-shadow: 0 12px 35px rgba(26,42,68,.12); }.browser-chrome { height: 45px; padding: 0 14px; display: grid; grid-template-columns: 75px minmax(0,1fr) 75px; align-items: center; background: #e8ebef; }.browser-dots { display: flex; gap: 6px; }.browser-dots i { width: 9px; height: 9px; border-radius: 50%; background: #f16a62; }.browser-dots i:nth-child(2) { background: #eab63c; }.browser-dots i:nth-child(3) { background: #54b953; }.browser-address { width: min(530px,100%); height: 28px; margin: auto; padding: 0 12px; border-radius: 14px; display: flex; align-items: center; gap: 7px; color: #536274; background: #fff; font-size: 8.5px; }.browser-address svg { width: 12px; color: #159668; }.browser-menu { justify-self: end; color: #7a8492; letter-spacing: 2px; }
.browser-content { min-height: 430px; display: grid; grid-template-columns: minmax(0,1.25fr) minmax(310px,.75fr); background: linear-gradient(#00a884 0 115px,#f0f2f5 115px); }.whatsapp-instructions, .qr-demo-panel { margin: 72px 0 28px; background: #fff; }.whatsapp-instructions { margin-left: 55px; padding: 28px 35px; border-radius: 7px 0 0 7px; }.whatsapp-instructions h3 { margin: 0 0 10px; color: #2d3748; font-size: 18px; }.whatsapp-instructions > p { max-width: 570px; margin: 0 0 20px; color: #6f7b8a; font-size: 10px; line-height: 1.55; }.whatsapp-instructions ol { margin: 0; padding-left: 20px; color: #3b4655; font-size: 10.5px; line-height: 2.15; }.wa-browser-logo { width: 38px; height: 38px; margin-bottom: 16px; border: 2px solid #15a36b; border-radius: 50%; display: grid; place-items: center; color: #15a36b; font-size: 21px; }.whatsapp-policy { margin-top: 18px; padding: 11px; border: 1px solid #d6e9e2; border-radius: 6px; display: flex; align-items: center; gap: 10px; color: #27765d; background: #f2faf7; }.whatsapp-policy > svg { width: 18px; flex: 0 0 18px; }.whatsapp-policy span { display: flex; flex-direction: column; gap: 2px; }.whatsapp-policy strong { font-size: 9.5px; }.whatsapp-policy small { color: #66877b; font-size: 8.5px; }
.qr-demo-panel { margin-right: 55px; padding: 26px 32px; border-radius: 0 7px 7px 0; display: flex; flex-direction: column; align-items: center; border-left: 1px solid #e4e7eb; }.qr-demo { position: relative; width: 210px; height: 210px; padding: 8px; border: 1px solid #e0e4e8; background: #fff; }.qr-demo svg { width: 100%; height: 100%; }.qr-demo > span { position: absolute; left: 50%; bottom: 12px; padding: 3px 7px; transform: translateX(-50%); border-radius: 3px; color: #fff; background: rgba(219,68,55,.88); font-size: 7px; font-weight: 800; letter-spacing: 1px; }.qr-state { width: 100%; margin-top: 13px; display: flex; align-items: center; justify-content: center; gap: 8px; text-align: left; }.qr-state > b { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: #e2a62b; }.qr-state span { display: flex; flex-direction: column; gap: 1px; }.qr-state strong { color: #4b596d; font-size: 9px; }.qr-state small { color: #8792a0; font-size: 7.7px; }.qr-state.scanning > b { background: #198fd1; animation: pulse 1s infinite; }.qr-state.demo-success > svg { width: 17px; color: #18a46f; }.qr-state.demo-success strong { color: #147451; }.whatsapp-simulate { width: 100%; margin-top: 16px; background: #168b62; }.whatsapp-simulate:hover { background: #107451; }.qr-demo-panel .text-button { margin-top: 10px; font-size: 8px; }
.whatsapp-connect-foot { padding-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }.whatsapp-connect-foot p { max-width: 760px; margin: 0; color: #6f7d90; font-size: 8.8px; line-height: 1.5; }
@keyframes pulse { 0%,100%{opacity:.4;transform:scale(.8)}50%{opacity:1;transform:scale(1.15)} }

@media (max-width: 1180px) { .provider-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 820px) { .third-party-panel { padding: 16px 13px 22px; }.provider-grid { grid-template-columns: 1fr; }.browser-content { grid-template-columns: 1fr; }.whatsapp-instructions { margin: 50px 18px 0; border-radius: 7px 7px 0 0; }.qr-demo-panel { margin: 0 18px 25px; border-left: 0; border-top: 1px solid #e4e7eb; border-radius: 0 0 7px 7px; }.browser-chrome { grid-template-columns: 55px minmax(0,1fr) 30px; }.whatsapp-connect-head { align-items: flex-start; }.demo-badge { margin-right: 28px; }.whatsapp-connect-foot { align-items: flex-start; flex-direction: column; } }
@media (max-width: 520px) { .third-party-head > span { display: none; }.provider-banner { height: 100px; }.provider-config { min-height: 225px; }.whatsapp-connect-shell { padding: 16px 10px; }.demo-badge { display: none; }.browser-dots { display: none; }.browser-chrome { grid-template-columns: 1fr 20px; }.browser-address { margin: 0; }.whatsapp-instructions { margin: 34px 8px 0; padding: 22px 18px; }.qr-demo-panel { margin: 0 8px 18px; padding: 22px 18px; }.qr-demo { width: 190px; height: 190px; } }

/* Official Meta Cloud API setup */
.official-api-notice { margin: 5px 0 18px; padding: 13px 15px; border: 1px solid #cde6dc; border-radius: 7px; display: flex; align-items: flex-start; gap: 11px; color: #1f7458; background: #f1faf7; }.official-api-notice > svg { width: 20px; flex: 0 0 20px; }.official-api-notice strong { display: block; margin-bottom: 3px; font-size: 10px; }.official-api-notice p { margin: 0; color: #5b7e72; font-size: 9px; line-height: 1.5; }
.link-state.connected { border-color: #b8decf; color: #187454; background: #edf9f4; }.queue-error { max-width: 260px; margin-top: 4px; display: block; color: #b14d4d; font-size: 8px; line-height: 1.35; }
.meta-setup-grid { display: grid; grid-template-columns: minmax(260px,.72fr) minmax(0,1.28fr); gap: 16px; }.meta-setup-steps, .meta-config-form { padding: 20px; border: 1px solid #dce2eb; border-radius: 8px; background: #fff; }.meta-setup-steps h3 { margin: 0 0 15px; color: #28364c; font-size: 13px; }.meta-setup-steps ol { margin: 0; padding-left: 20px; color: #56657a; font-size: 9.5px; line-height: 1.8; }.meta-setup-steps .whatsapp-policy { margin-top: 20px; }.meta-config-form .form-grid { gap: 13px; }.meta-config-form .form-group label { font-size: 9px; }.meta-config-form .form-group input, .meta-config-form .form-group select { height: 39px; background: #f7f9fc; }.meta-config-form .form-group textarea { min-height: 74px; resize: vertical; background: #f7f9fc; }.whatsapp-connect-foot > div { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.whapi-guide-links { margin: 17px 0 2px; display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }.whapi-guide-links a { min-height: 37px; padding: 0 10px; border: 1px solid #cbd8e8; border-radius: 5px; display: flex; align-items: center; justify-content: center; gap: 6px; color: #345593; background: #f6f9fe; text-decoration: none; font-size: 8.7px; font-weight: 700; text-align: center; }.whapi-guide-links a:hover { border-color: #8da5cb; background: #edf3fc; }.whapi-guide-links a:first-child { color: #fff; border-color: #168b62; background: #168b62; }.whapi-guide-links a:first-child:hover { background: #107451; }.whapi-official-help { margin-top: 12px; display: inline-flex; align-items: center; gap: 5px; color: #3f5fa0; font-size: 8.7px; font-weight: 700; text-decoration: none; }.whapi-official-help:hover { text-decoration: underline; }
@media (max-width: 800px) { .meta-setup-grid { grid-template-columns: 1fr; }.whatsapp-connect-foot > div { width: 100%; justify-content: stretch; }.whatsapp-connect-foot > div .button { flex: 1; } }
@media (max-width: 480px) { .whapi-guide-links { grid-template-columns: 1fr; } }

/* Unified notification center */
.notification-center { overflow: hidden; }.notification-channel-legend { min-height: 58px; padding: 12px 22px; border-bottom: 1px solid #e3e8f0; display: flex; justify-content: flex-end; align-items: center; gap: 22px; color: #62718a; background: #f8faff; }.notification-channel-legend span { min-width: 100px; display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 9px; }.notification-channel-legend svg { width: 15px; }.notification-channel-legend .wa-channel { color: #168b62; }.notification-channel-legend .google-channel { color: #4285f4; font-weight: 800; }
.notification-matrix { display: flex; flex-direction: column; }.notification-rule { min-height: 72px; padding: 11px 22px; border-bottom: 1px solid #edf0f5; display: grid; grid-template-columns: minmax(310px,1fr) repeat(3,120px); align-items: center; gap: 5px; transition: opacity .15s ease,background .15s ease; }.notification-rule:hover { background: #fafbfe; }.notification-rule.disabled { opacity: .5; background: #f6f7f9; }.notification-rule > label { min-height: 38px; display: flex; align-items: center; justify-content: center; gap: 7px; color: #5c6b81; font-size: 9px; cursor: pointer; }.notification-rule input { width: 16px; height: 16px; accent-color: #4059aa; }.notification-main { justify-content: flex-start !important; }.notification-main span { display: flex; flex-direction: column; gap: 3px; }.notification-main strong { color: #29364b; font-size: 10.5px; }.notification-main small { color: #7c899b; font-size: 8.5px; line-height: 1.35; }.notification-rule > label:not(.notification-main) span { display: none; }
@media (max-width: 820px) { .notification-channel-legend { display: none; }.notification-rule { padding: 15px; grid-template-columns: 1fr repeat(3,42px); }.notification-main { grid-column: 1 / -1; }.notification-rule > label:not(.notification-main) span { display: none; } }
@media (max-width: 480px) { .notification-rule { grid-template-columns: 1fr; }.notification-rule > label:not(.notification-main) { min-height: 32px; justify-content: flex-start; }.notification-rule > label:not(.notification-main) span { display: inline; }.notification-main { grid-column: auto; } }

/* Expedientes configuration */
.status.configured { border: 1px solid color-mix(in srgb,var(--status-color) 30%,white); color: color-mix(in srgb,var(--status-color) 72%,#1d2738); background: color-mix(in srgb,var(--status-color) 13%,white); }
.case-settings-tabs { margin: -5px 0 15px; border-bottom: 1px solid #d8deea; display: flex; gap: 24px; overflow-x: auto; scrollbar-width: none; }.case-settings-tabs::-webkit-scrollbar { display: none; }.case-settings-tabs button { min-width: max-content; min-height: 42px; padding: 0 3px; border: 0; border-bottom: 2px solid transparent; color: #667a96; background: transparent; font-size: 10px; }.case-settings-tabs button:hover { color: #4059aa; }.case-settings-tabs button.active { border-bottom-color: #4059aa; color: #334f9e; font-weight: 700; }
.case-config-card { padding: 18px 20px 24px; }.case-config-head { min-height: 70px; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 2px solid #4059aa; display: flex; align-items: center; justify-content: space-between; gap: 20px; }.case-config-head h2 { margin: 0 0 4px; color: #3653a0; font-size: 17px; }.case-config-head p { color: #74849c; }.case-config-head .button { flex: 0 0 auto; }
.case-config-toolbar { margin-bottom: 12px; display: flex; justify-content: space-between; }.case-config-toolbar label { width: min(360px,100%); height: 39px; padding-left: 12px; border: 1px solid #d7deea; border-radius: 5px; display: flex; align-items: center; color: #7b8ca6; background: #fff; }.case-config-toolbar svg { width: 15px; }.case-config-toolbar input { width: 100%; height: 100%; padding: 0 10px; border: 0; outline: 0; color: #364358; font-size: 10px; }
.case-config-table { width: 100%; border-collapse: collapse; }.case-config-table th { height: 38px; padding: 0 12px; color: #263248; background: #e9edf5; text-align: left; font-size: 9px; }.case-config-table td { min-height: 43px; padding: 11px 12px; border-bottom: 1px solid #e8ecf2; color: #3b4555; font-size: 10px; vertical-align: middle; }.case-config-table td:first-child strong { margin-right: 8px; font-weight: 500; }.case-config-table td:first-child small { margin-top: 3px; display: block; color: #8390a1; }.case-config-table th:last-child,.case-config-table td:last-child { width: 120px; text-align: center; }.case-color-swatch { width: 32px; height: 8px; margin-right: 8px; border-radius: 8px; display: inline-block; background: var(--swatch); vertical-align: middle; }.case-config-table code { color: #7b8798; font: 8px "DM Sans",sans-serif; }.case-default-tag,.case-archive-tag { margin-left: 5px; padding: 2px 6px; border-radius: 8px; color: #395da5; background: #ebf1fc; font-size: 7px; font-weight: 700; }.case-archive-tag { color: #735f5f; background: #f2eeee; }
.case-row-actions { display: flex; align-items: center; justify-content: center; gap: 4px; }.case-row-actions button { width: 28px; height: 28px; border: 0; border-radius: 4px; display: grid; place-items: center; color: #7890b7; background: transparent; }.case-row-actions button:hover { color: #3f5aa5; background: #edf2fb; }.case-row-actions button:last-child:hover { color: #b34f4f; background: #fff1f1; }.case-row-actions svg { width: 14px; }
.case-config-empty { min-height: 170px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #9aa5b5; text-align: center; }.case-config-empty svg { width: 36px; margin-bottom: 10px; color: #c3cad5; }.case-config-empty strong { color: #69778b; font-size: 11px; }.case-config-empty small { margin-top: 4px; font-size: 8.5px; }.case-config-empty.standalone { grid-column: 1/-1; border: 1px dashed #d6deeb; border-radius: 7px; background: #fafbfe; }
.custom-fields-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }.custom-field-card { min-height: 145px; padding: 15px; border: 1px solid #dce3ee; border-radius: 7px; display: flex; flex-direction: column; background: #fff; }.custom-field-card > div:first-child { display: flex; justify-content: space-between; color: #5972aa; font-size: 8px; }.custom-field-card > div:first-child b { color: #8a6926; }.custom-field-card h3 { margin: 15px 0 4px; color: #2e3b51; font-size: 12px; }.custom-field-card small { color: #8a95a4; font-size: 8px; }.custom-field-card .case-row-actions { margin-top: auto; justify-content: flex-end; }
.case-check-grid { grid-column: 1/-1; padding: 13px; border: 1px solid #dce2ec; border-radius: 6px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }.case-check-grid legend { padding: 0 7px; color: #55657d; font-size: 9px; font-weight: 700; }.case-check-grid label,.modal-check { min-height: 34px; display: flex; align-items: center; gap: 7px; color: #4c596d; font-size: 9.5px; }.case-check-grid input,.modal-check input { width: 15px; height: 15px; accent-color: #4059aa; }.modal-check.full { grid-column: 1/-1; }.custom-field-live-preview { padding: 14px; border: 1px dashed #ccd6e6; border-radius: 6px; background: #f7f9fd; }.custom-field-live-preview > small { color: #8a96a8; font-size: 8px; }.custom-field-live-preview label { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }.custom-field-live-preview input { max-width: 270px; }.case-modal-divider { margin-top: 8px; border-bottom: 1px solid #dce2ec; }.case-modal-divider span { position: relative; top: 7px; padding-right: 8px; color: #4059aa; background: #fff; font-size: 9px; font-weight: 700; }

/* Main expedientes section */
.cases-page .section-header.compact { margin-bottom: 9px; padding: 0 2px 8px; border-bottom: 1px solid #c9d3e8; align-items: flex-start; }
.cases-page .section-header.compact h1 { color: #334f9e; font-family: "DM Sans",sans-serif; font-size: 18px; }
.cases-page .section-header.compact p { color: #6d7e99; }
.export-actions { align-items: center; gap: 8px; color: #6c7d97; font-size: 11px; }
.export-actions .button { min-height: 32px; padding: 0 12px; }
.case-list-filters { min-height: 48px; margin-bottom: 10px; padding: 9px 11px; border: 1px solid #cfd8eb; border-radius: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; background: #f9fbff; }
.case-list-filters .segmented { min-height: 24px; padding: 2px; border-radius: 99px; display: flex; background: #e5e7eb; }
.case-list-filters .segmented button { min-width: 76px; min-height: 22px; border: 0; border-radius: 99px; color: #8a93a0; background: transparent; font-size: 10px; }
.case-list-filters .segmented button.active { color: #fff; background: #4059aa; }
.case-list-filters label:not(.case-days-filter) { display: inline-flex; align-items: center; gap: 7px; color: #6b7b94; font-size: 10px; }
.case-list-filters input[type="checkbox"] { width: 28px; height: 16px; appearance: none; border-radius: 99px; background: #c8d1de; position: relative; cursor: pointer; }
.case-list-filters input[type="checkbox"]::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: .15s; }
.case-list-filters input[type="checkbox"]:checked { background: #4059aa; }
.case-list-filters input[type="checkbox"]:checked::after { transform: translateX(12px); }
.filter-divider { width: 1px; align-self: stretch; min-height: 26px; background: #d9e0ec; }
.case-days-filter { display: inline-grid; grid-template-columns: auto 78px 62px; align-items: center; gap: 6px; color: #6b7b94; font-size: 10px; }
.case-days-filter select,
.case-days-filter input { height: 33px; border: 1px solid #d7deea; border-radius: 5px; padding: 0 9px; color: #46546a; background: #fff; }
.case-list-shell { border: 1px solid #cfd8eb; border-radius: 8px; overflow: hidden; background: #fff; }
.case-list-toolbar { min-height: 58px; padding: 10px 11px; border-bottom: 1px solid #e5eaf3; display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #fff; }
.case-search { width: min(310px, 100%); height: 40px; display: flex; align-items: center; border: 1px solid #d6deeb; border-radius: 5px; overflow: hidden; background: #fff; }
.case-search svg { width: 40px; height: 100%; padding: 12px; order: 2; color: #fff; background: #4059aa; }
.case-search input { min-width: 0; flex: 1; height: 100%; border: 0; outline: 0; padding: 0 12px; color: #354258; background: #fff; }
.case-list-panel { overflow-x: auto; border: 0; border-radius: 0; }
.case-list-table { min-width: 1220px; }
.case-list-table thead { position: static; top: auto; z-index: auto; display: table-header-group; }
.contact-list-panel { overflow-x: auto; }
.contact-list-table { min-width: 1080px; }
.contact-list-table thead { position: static; top: auto; z-index: auto; display: table-header-group; }
.contact-list-table th { height: 39px; background: #e9edf5; color: #263248; text-transform: uppercase; vertical-align: middle; }
.contact-list-table tbody td { background: #fff; }

/* Escritos */
.documents-page { min-height: calc(100vh - 105px); }
.documents-heading { margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid #304d96; }
.documents-heading h1 { color: #304d96; font-family: "DM Sans", sans-serif; font-size: 20px; }
.documents-heading .heading-actions { display: flex; justify-content: flex-end; gap: 8px; }
.document-settings { color: white; border-color: #4059aa; background: #4059aa; }
.documents-workspace { display: grid; grid-template-columns: minmax(560px, 60%) minmax(410px, 40%); gap: 10px; align-items: stretch; }
.documents-manager { min-height: 540px; display: flex; flex-direction: column; background: white; }
.documents-search { height: 42px; margin-bottom: 5px; display: flex; align-items: center; border: 1px solid #d5dce8; border-radius: 6px; background: white; }
.documents-search input { flex: 1; height: 100%; border: 0; padding: 0 12px; outline: 0; background: transparent; }
.documents-search svg { width: 18px; margin-right: 13px; color: #0070d7; }
.documents-table-head { min-height: 36px; display: grid; grid-template-columns: 28px minmax(0, 1fr) 160px; align-items: center; gap: 8px; padding: 0 10px; color: #1d2940; background: #e9edf4; font-size: 11px; font-weight: 700; }
.documents-tree { flex: 1; min-height: 420px; overflow: auto; border-bottom: 1px solid #e4e8ef; }
.document-folder-row,
.document-file-row { width: 100%; min-height: 40px; display: grid; grid-template-columns: 28px 22px minmax(0, 1fr) auto; align-items: center; gap: 6px; border: 0; border-bottom: 1px solid #edf0f5; padding: 0 12px; text-align: left; background: #f8fafd; }
.document-folder-row svg,
.document-file-name svg { width: 15px; color: #4059aa; }
.document-folder-row strong { color: #313b4d; font-size: 12px; font-weight: 600; }
.document-folder-row small { color: #7b8798; font-size: 10px; }
.folder-toggle { width: 16px; height: 16px; display: grid; place-items: center; border: 1px solid #b9c7dc; border-radius: 50%; color: #0070d7; background: white; font-size: 12px; line-height: 1; }
.document-file-row { grid-template-columns: 52px minmax(0, 1fr) 160px; padding-left: 18px; background: white; }
.document-folder-items[hidden] { display: none; }
.document-file-row:nth-child(odd) { background: #fbfcfe; }
.document-file-row.selected { background: #f1f5ff; box-shadow: inset 3px 0 0 #4059aa; }
.document-file-indent { width: 28px; }
.document-file-name { min-width: 0; display: flex; align-items: center; gap: 8px; color: #2b3545; font-size: 12px; }
.document-file-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.document-actions { display: flex; justify-content: flex-end; gap: 6px; }
.document-actions button,
.document-preview-head button,
.document-editor-topbar button { border: 0; display: inline-grid; place-items: center; color: #8ba0bd; background: transparent; }
.document-actions button { width: 26px; height: 26px; border-radius: 4px; }
.document-actions button:hover { color: #0070d7; background: #e9f2ff; }
.document-actions svg { width: 17px; }
.documents-preview-pane { min-height: 540px; display: grid; place-items: center; background: #f4f6fa; }
.documents-preview-pane.expanded { position: fixed; inset: 78px 18px 18px; z-index: 80; background: #f4f6fa; box-shadow: 0 15px 45px rgba(21,35,62,.2); }
.document-empty-preview { text-align: center; color: #7c8ba0; }
.document-empty-preview > svg { width: 58px; height: 58px; margin-bottom: 12px; color: #bdc8d5; }
.document-empty-preview h3 { margin: 0 0 8px; color: #506079; font-size: 15px; }
.document-empty-preview p { margin: 0; font-size: 12px; }
.document-empty-preview p svg { width: 15px; vertical-align: -3px; }
.document-preview-card { width: 100%; height: 100%; display: flex; flex-direction: column; border: 1px solid #cbd7ea; background: white; box-shadow: 0 8px 18px rgba(31,48,80,.08); }
.document-preview-head { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 14px; color: white; background: #4059aa; }
.document-preview-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.document-preview-head div { display: flex; gap: 4px; }
.document-preview-head button { width: 28px; height: 28px; color: rgba(255,255,255,.78); }
.document-preview-head svg { width: 16px; }
.document-preview-body { flex: 1; overflow: auto; padding: 18px; background: #eef2f7; }
.document-page-preview { max-width: 620px; min-height: 760px; margin: 0 auto; padding: 58px 52px; color: #101827; background: white; box-shadow: 0 2px 7px rgba(21,34,54,.12); column-count: 2; column-gap: 40px; font: 11px/1.72 Georgia, serif; text-align: justify; }
.document-page-preview h1 { column-span: all; margin: 0 0 18px; text-align: center; font: 700 13px/1.3 Georgia, serif; text-transform: uppercase; }
.document-page-preview mark,
.editor-paper mark { padding: 1px 4px; border: 1px solid #96ced8; border-radius: 3px; color: #28737f; background: #e9f8fa; }
.select.small { width: 92px; height: 28px; padding-left: 8px; font-size: 11px; }

.document-editor-page { min-height: calc(100vh - 64px); margin: -28px -28px -75px; background: #eef1f6; }
.document-editor-topbar { height: 64px; display: flex; align-items: center; gap: 7px; padding: 0 24px; border-bottom: 1px solid #dde4ef; background: white; }
.editor-doc-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; color: white; background: #176bdc; box-shadow: 0 4px 10px rgba(23,107,220,.22); }
.editor-doc-icon svg { width: 19px; }
.editor-title-input { width: 225px; height: 40px; border: 1px solid #1681ff; border-radius: 5px; padding: 0 12px; outline: 0; font-weight: 600; }
.document-editor-topbar .button { height: 40px; }
.document-editor-topbar select { height: 32px; border: 1px solid #d8e0eb; border-radius: 4px; padding: 0 10px; background: white; }
.document-editor-topbar > button:not(.button):not(.editor-close) { width: 28px; height: 32px; border-radius: 4px; color: #3e4a5f; font-size: 14px; }
.document-editor-topbar > button:not(.button):hover { background: #edf3ff; }
.editor-close { margin-left: auto; width: 32px; height: 32px; color: #6d7890; }
.document-editor-shell { min-height: calc(100vh - 128px); display: grid; grid-template-columns: 255px minmax(580px, 1fr) 290px; }
.editor-left-panel,
.editor-right-panel { padding: 20px 16px; background: #f8fafd; border-right: 1px solid #dce4ef; }
.editor-right-panel { border-right: 0; border-left: 1px solid #dce4ef; background: white; }
.editor-left-panel h3,
.editor-right-panel h3 { margin: 0 0 24px; display: flex; align-items: center; gap: 8px; color: #27364c; letter-spacing: .06em; font-size: 12px; }
.editor-left-panel h4,
.editor-variable-group h4 { margin: 28px 0 12px; color: #75849a; letter-spacing: .06em; font-size: 10px; }
.editor-upload-drop { min-height: 112px; display: grid; place-items: center; text-align: center; border: 1px dashed #cbd5e3; border-radius: 8px; background: white; cursor: pointer; }
.editor-upload-drop span svg { width: 22px; color: #1681ff; }
.editor-upload-drop strong { color: #344258; font-size: 13px; }
.editor-upload-drop small { color: #7d8aa0; }
.editor-model-search,
.editor-variable-search { height: 40px; display: flex; align-items: center; gap: 8px; border: 1px solid #d8e0eb; border-radius: 7px; padding: 0 10px; background: white; }
.editor-model-search input,
.editor-variable-search input { flex: 1; border: 0; outline: 0; background: transparent; }
.editor-model-search svg,
.editor-variable-search svg { width: 16px; color: #0070d7; }
.editor-model-link,
.editor-variable-group button,
.editor-tools-list button,
.editor-tools-list label { width: 100%; min-height: 42px; display: flex; align-items: center; gap: 10px; border: 0; padding: 0 10px; color: #394a63; background: transparent; text-align: left; font-weight: 600; cursor: pointer; }
.editor-model-link svg:first-child { width: 18px; color: #00a0ff; }
.editor-model-link svg:last-child,
.editor-variable-group button svg { width: 14px; margin-left: auto; color: #738098; }
.editor-variable-group button:hover,
.editor-model-link:hover,
.editor-tools-list button:hover,
.editor-tools-list label:hover { background: #f0f5ff; }
.editor-canvas { position: relative; overflow: auto; padding: 28px 0 60px; background: #dfe4eb; }
.editor-ruler { width: 735px; height: 22px; margin: 0 auto 6px; background: repeating-linear-gradient(90deg,#cbd5e1 0,#cbd5e1 1px,transparent 1px,transparent 38px), #eef2f7; border: 1px solid #d4dce7; }
.editor-paper { width: 735px; min-height: 940px; margin: 0 auto; padding: 72px 78px; outline: 0; color: #1c2431; background: white; box-shadow: 0 3px 14px rgba(25,39,61,.1); font: 14px/1.7 Georgia, serif; }
.editor-paper:focus { box-shadow: 0 0 0 2px #9bb8ea, 0 3px 14px rgba(25,39,61,.1); }
.editor-paper img { max-width: 100%; }
.signature-line { margin-top: 42px; text-align: center; }
.editor-variable-group { border-top: 1px solid #edf1f5; padding-top: 8px; }
.editor-variable-section { margin-bottom: 6px; }
.editor-variable-section-head { min-height: 34px !important; border-radius: 7px !important; background: #f7f9fc !important; }
.editor-variable-section-head strong { flex: 1; font-size: 12px; }
.variable-section-icon { width: 22px; height: 22px; display: grid; place-items: center; color: #4059aa; }
.variable-section-icon svg { width: 15px; }
.editor-variable-section-head > svg { width: 14px; transition: transform .15s ease; }
.editor-variable-section.open .editor-variable-section-head > svg { transform: rotate(90deg); }
.editor-variable-options { display: none; padding: 5px 0 7px 31px; max-height: 310px; overflow: auto; }
.editor-variable-section.open .editor-variable-options { display: block; }
.editor-variable-options button { min-height: 24px !important; padding: 0 8px !important; color: #31415a; font-size: 11px; font-weight: 500; }
.editor-variable-options button::before { content: "⋮"; color: #7f95b5; margin-right: 6px; }
.editor-variable-options button:hover { color: #4059aa; background: #f4f7ff; }
.editor-variable-group button span { flex: 1; text-align: left; }
.editor-tools-list { margin-top: 20px; border-top: 1px solid #edf1f5; padding-top: 12px; }

.contact-create-modal { max-height: 96vh; overflow: auto; border-radius: 8px; }
.contact-create-modal::before { display: none; }
.contact-create-modal .modal-close { display: none; }
.contact-create-form { padding: 0 20px 28px; background: #fff; }
.contact-create-titlebar { min-height: 58px; margin: 0 -20px 24px; padding: 0 20px; display: flex; align-items: center; gap: 8px; color: white; background: #4059aa; font-weight: 700; }
.contact-create-titlebar svg { width: 20px; }
.contact-create-card { margin: 0 0 22px; padding: 16px; border: 1px solid #d5def2; border-radius: 8px; background: #f9fbff; }
.contact-create-card header { min-height: 28px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; color: #344f9e; }
.contact-create-card header svg { width: 16px; }
.contact-create-card h2 { margin: 0; color: #344f9e; font-size: 14px; font-family: "DM Sans", sans-serif; }
.contact-section-toggle { width: 28px; height: 28px; margin-left: auto; border: 0; color: #7c8ba6; background: transparent; }
.contact-section-toggle svg { transition: transform .15s ease; }
.contact-create-card.collapsed .contact-create-grid,
.contact-create-card.collapsed .contact-upload-note,
.contact-create-card.collapsed .contact-dropzone,
.contact-create-card.collapsed .contact-attachment-list { display: none; }
.contact-create-card.collapsed .contact-section-toggle svg { transform: rotate(-90deg); }
.contact-create-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 10px; }
.contact-create-grid .form-group { min-width: 0; }
.contact-create-grid .form-group span { color: #3d4657; font-size: 12px; font-weight: 500; }
.contact-create-grid .form-group span b { color: #e44848; }
.contact-create-grid input,
.contact-create-grid select,
.contact-create-grid textarea { min-height: 42px; width: 100%; border: 1px solid #d5d9e2; border-radius: 4px; padding: 0 10px; color: #263244; background: white; outline: 0; }
.contact-create-grid textarea { min-height: 96px; padding: 10px; resize: vertical; }
.contact-create-grid .wide { grid-column: span 2; }
.contact-create-grid .full { grid-column: 1 / -1; }
.contact-create-grid .small { grid-column: span 1; }
.contact-create-grid .phone > div,
.contact-create-grid .icon-field > div { display: flex; align-items: center; border: 1px solid #d5d9e2; border-radius: 4px; background: white; overflow: hidden; }
.contact-create-grid .phone em { width: 46px; min-height: 42px; display: grid; place-items: center; color: white; background: #4059aa; font-style: normal; }
.contact-create-grid .phone input,
.contact-create-grid .icon-field input { border: 0; min-height: 42px; }
.contact-create-grid .icon-field svg { width: 18px; margin-left: 10px; color: #166fe5; }
.contact-upload-button { min-height: 40px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid #d5d9e2; border-radius: 4px; color: #2f3541; background: white; cursor: pointer; }
.contact-upload-button svg { width: 15px; }
.contact-upload-note { margin: 0 0 10px; color: #7c8798; font-size: 12px; }
.contact-dropzone { min-height: 168px; padding: 24px; border: 1px dashed #4059aa; border-radius: 8px; display: grid; place-items: center; gap: 9px; text-align: center; color: #3e4655; background: white; cursor: pointer; }
.contact-dropzone > span svg { width: 36px; color: #4059aa; }
.contact-dropzone .button { width: min(860px, 80%); justify-content: center; pointer-events: none; }
.contact-attachment-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.contact-attachment-list span { min-height: 28px; padding: 0 9px; border: 1px solid #dce3ef; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; background: white; font-size: 11px; }
.contact-attachment-list svg { width: 14px; color: #4059aa; }
.contact-attachment-list small { color: #7e8999; }
.contact-create-actions { display: flex; gap: 25px; align-items: center; padding: 8px 8px 10px; }
.contact-create-actions .button { min-width: 120px; justify-content: center; }
.contact-create-actions .button:last-child { min-width: 210px; }

@media (max-width: 940px) {
  .contact-create-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-create-grid .wide { grid-column: span 2; }
}

@media (max-width: 620px) {
  .contact-create-grid { grid-template-columns: 1fr; }
  .contact-create-grid .wide,
  .contact-create-grid .full,
  .contact-create-grid .small { grid-column: 1; }
  .contact-create-actions { flex-direction: column; align-items: stretch; gap: 9px; }
}

@media (max-width: 1180px) {
  .documents-workspace { grid-template-columns: 1fr; }
  .documents-preview-pane { min-height: 430px; }
  .document-editor-shell { grid-template-columns: 220px minmax(520px, 1fr); }
  .editor-right-panel { grid-column: 1 / -1; border-left: 0; border-top: 1px solid #dce4ef; }
}

@media (max-width: 820px) {
  .document-editor-page { margin: -23px -16px -75px; }
  .document-editor-topbar { flex-wrap: wrap; height: auto; min-height: 64px; padding: 10px 14px; }
  .editor-close { margin-left: 0; }
  .document-editor-shell { display: block; }
  .editor-paper,
  .editor-ruler { width: calc(100vw - 36px); }
  .editor-paper { padding: 42px 28px; }
}
.case-list-table th { height: 39px; background: #e9edf5; color: #263248; text-transform: none; }
.case-list-table td { min-height: 48px; background: #fffaf0; }
.case-list-table td:nth-child(3) { min-width: 330px; }
.case-list-table td:nth-child(8) small { color: #6b7b94; }
.case-list-table .row-action { width: 30px; height: 30px; border-radius: 5px; color: #7e91b2; }
.case-list-table .row-action:hover { background: #edf2fb; color: #4059aa; }

.case-create-modal { width: min(1536px, calc(100vw - 18px)) !important; max-height: 96vh; border-radius: 8px; background: #fff; }
.case-create-modal::before { display: none; }
.case-create-modal .modal-close { display: none; }
.case-create-form { padding: 0 20px 30px; background: #fff; }
.case-create-page { padding: 0; background: #fff; border-radius: 8px; overflow: hidden; }
.case-create-page-form { min-height: calc(100vh - var(--app-header-height) - 42px); }
.case-create-titlebar { min-height: 48px; margin: 0 -20px 20px; padding: 0 22px; border-radius: 7px 7px 0 0; display: flex; align-items: center; justify-content: space-between; color: #fff; background: #4059aa; }
.case-create-titlebar.page-titlebar { border-radius: 8px 8px 0 0; }
.case-create-page > .case-create-titlebar { margin: 0; }
.case-create-titlebar svg { width: 19px; }
.case-create-card,
.case-create-section { margin: 0 10px 20px; border: 1px solid #d4def2; border-radius: 8px; background: #f9fbff; overflow: hidden; }
.case-create-card { margin: 0 10px 22px; padding: 16px 16px 20px; border: 1px solid #d4def2; border-radius: 8px; background: #f9fbff; overflow: hidden; }
.case-create-card > header { margin-bottom: 16px; display: flex; align-items: center; gap: 8px; color: #344f9e; }
.case-create-card > header svg { width: 16px; }
.case-create-card h2 { margin: 0; color: #344f9e; font-size: 13px; font-family: "DM Sans",sans-serif; }
.case-create-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.case-create-grid .full { grid-column: 1/-1; }
.case-create-grid .wide { grid-column: span 2; }
.case-create-form .form-group label { color: #3d4657; font-size: 10px; font-weight: 500; }
.case-create-form .form-group input,
.case-create-form .form-group select,
.case-create-form .form-group textarea { min-height: 42px; border-color: #d5d9e2; border-radius: 4px; background: #fff; }
.case-create-form .form-group textarea { min-height: 65px; }
.responsible-picker { min-height: 42px; max-height: 84px; padding: 6px 7px; border: 1px solid #d5d9e2; border-radius: 4px; display: flex; flex-wrap: wrap; gap: 6px; overflow: auto; background: #fff; }
.responsible-picker label { min-height: 25px; padding: 0 9px; border: 1px solid #d6d2f0; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; color: #6a6fb1; background: #f8f7ff; font-size: 10px; cursor: pointer; }
.responsible-picker input { width: 13px !important; height: 13px !important; min-height: 13px !important; accent-color: #4059aa; }
.inline-field { display: grid; grid-template-columns: minmax(0,1fr) 144px; gap: 4px; }
.inline-field .button { min-height: 41px; justify-content: center; white-space: nowrap; }
.case-segmented { min-height: 41px; display: grid; grid-template-columns: 1fr 1fr; border: 1px solid #d9dee8; border-radius: 4px; overflow: hidden; background: #fff; }
.case-segmented label { min-height: 39px; display: grid; place-items: center; color: #111827; cursor: pointer; }
.case-segmented input { position: absolute; opacity: 0; pointer-events: none; }
.case-segmented input:checked + span { width: 100%; height: 100%; display: grid; place-items: center; color: #fff; background: #4059aa; }
.case-create-section-head { width: 100%; min-height: 48px; border: 0; padding: 0 17px; display: flex; align-items: center; gap: 9px; color: #344f9e; background: transparent; font-weight: 700; text-align: left; }
.case-create-section-head svg { width: 15px; }
.case-create-section-head svg:last-child { margin-left: auto; transition: .15s; }
.case-create-section.open .case-create-section-head svg:last-child { transform: rotate(-90deg); }
.case-create-section:not(.open) .case-create-section-head svg:last-child { transform: rotate(90deg); }
.case-create-section:not(.open) .case-create-section-body { display: none; }
.case-create-section-body { padding: 0 17px 17px; border-top: 0; }
.case-create-grid.thirds { grid-template-columns: repeat(3,minmax(0,1fr)); }
.portal-link-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 26px; }
.portal-field { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; align-content: start; }
.portal-field strong { grid-column: 1/-1; color: #3d4657; font-size: 10px; font-weight: 500; }
.portal-field strong small { color: #111827; font-size: 10px; font-weight: 600; }
.portal-field label { display: flex; flex-direction: column; gap: 4px; color: #58677d; font-size: 8px; }
.portal-field label:first-of-type,
.portal-field label.portal-number { grid-column: span 2; }
.portal-field.pjn-field label:first-of-type { grid-column: auto; }
.portal-field label.portal-tail { grid-column: 1/-1; }
.portal-field input,
.portal-field select { min-height: 40px; border: 1px solid #d5dae3; border-radius: 4px; padding: 0 10px; color: #46546a; background: #fff; }
.portal-field > small { grid-column: 1/-1; margin-top: -2px; color: #8a95a5; font-size: 10px; }
.portal-field .button { grid-column: 1/-1; justify-self: end; min-height: 40px; min-width: 118px; margin-top: 2px; }
.case-linkage-grid { display: grid; grid-template-columns: 1.02fr 1fr 1fr; gap: 18px; align-items: start; }
.case-linkage-block { min-width: 0; display: grid; grid-template-rows: auto auto auto auto; align-content: start; }
.case-linkage-title { min-height: 30px; display: flex; align-items: center; gap: 8px; color: #1f2937; font-size: 11px; }
.case-linkage-title > span { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.case-linkage-title small { color: #111827; font-size: 11px; font-weight: 600; }
.round-tool { width: 27px; height: 27px; border: 1px solid #d5dae3; border-radius: 50%; display: grid; place-items: center; color: #4b5563; background: #fff; }
.round-tool svg { width: 14px; }
.case-linkage-row { display: grid; gap: 8px; align-items: end; }
.case-linkage-row label { min-width: 0; display: flex; flex-direction: column; gap: 4px; color: #49576b; font-size: 8px; }
.case-linkage-row select,
.case-linkage-row input { width: 100%; height: 40px; border: 1px solid #d5dae3; border-radius: 4px; padding: 0 10px; color: #46546a; background: #fff; }
.case-linkage-row select:disabled,
.case-linkage-row input:disabled { color: #9aa4b2; background: #eef0f4; }
.pjn-row { grid-template-columns: 60px minmax(170px,1fr) 66px 40px; }
.single-row { grid-template-columns: minmax(0,1fr) 40px; }
.connector-button { width: 40px; height: 40px; border: 1px solid #c8cdd5; border-radius: 4px; display: grid; place-items: center; color: #6b7280; background: #e2e2e2; }
.connector-button svg { width: 16px; }
.case-linkage-block > small { min-height: 20px; padding-top: 3px; color: #8a95a5; font-size: 10px; }
.linkage-config { justify-self: end; min-width: 118px; min-height: 40px; margin-top: 4px; justify-content: center; }
.case-form-actions { margin: 28px 0 10px; display: flex; justify-content: center; gap: 12px; }
.case-form-actions .button { min-width: 170px; justify-content: center; }
.workflow-modal { height: min(760px,92vh); max-height: 92vh; }.workflow-builder { height: 100%; display: flex; flex-direction: column; background: #fff; }.workflow-builder > header { min-height: 90px; padding: 20px 25px; border-bottom: 1px solid #e1e6ee; display: flex; align-items: center; justify-content: space-between; gap: 20px; }.workflow-builder header h2 { margin: 2px 0 4px; color: #263b69; font-size: 18px; }.workflow-builder header p { margin: 0; color: #7a8798; font-size: 9px; }.workflow-builder-grid { min-height: 0; flex: 1; display: grid; grid-template-columns: 300px minmax(0,1fr); }.workflow-builder-grid aside { padding: 28px 24px; border-right: 1px solid #e3e7ee; background: #fafbfc; }.workflow-builder-grid aside h3 { margin: 0 0 24px; color: #2e394c; font-size: 12px; }.workflow-builder-grid aside p { margin: 0 0 15px; color: #647086; font-size: 9.5px; }.workflow-builder-grid main { padding: 30px 38px; overflow-y: auto; }.workflow-start { width: max-content; margin-bottom: 18px; padding: 9px 13px; border: 1px solid #abe185; border-radius: 7px; color: #407335; background: #f3ffeb; font-size: 9px; }.workflow-task { position: relative; min-height: 78px; margin-left: 15px; padding: 12px 42px 12px 32px; border-left: 1px solid #b9c9e5; display: flex; align-items: center; }.workflow-task > i { position: absolute; left: -13px; width: 26px; height: 26px; border: 2px solid #fff; border-radius: 50%; display: grid; place-items: center; color: #fff; background: #4059aa; box-shadow: 0 0 0 1px #b9c9e5; font-size: 8px; font-style: normal; }.workflow-task > div { display: flex; flex-direction: column; gap: 3px; }.workflow-task span { color: #4963a5; font-size: 8px; }.workflow-task strong { color: #303c50; font-size: 10px; }.workflow-task small { color: #7d899a; font-size: 8.5px; }.workflow-task > button { position: absolute; right: 5px; width: 28px; height: 28px; border: 0; color: #9a6b6b; background: transparent; }.workflow-task svg { width: 14px; }
.cover-config-layout { display: grid; grid-template-columns: minmax(320px,.78fr) minmax(420px,1.22fr); gap: 18px; }.cover-controls { max-height: 640px; padding-right: 10px; overflow-y: auto; }.cover-controls section { padding: 12px 4px; border-bottom: 1px solid #e7ebf1; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 18px; }.cover-controls section h3 { grid-column: 1/-1; margin: 0; color: #334e8f; font-size: 8px; text-transform: uppercase; letter-spacing: .55px; }.cover-option { min-height: 27px; display: flex; align-items: center; gap: 7px; color: #4a5668; font-size: 9px; cursor: pointer; }.cover-option input { position: absolute; opacity: 0; }.cover-option span { position: relative; width: 26px; height: 15px; border-radius: 12px; background: #c8cfda; transition: .15s; }.cover-option span::after { content:""; position:absolute; top:2px; left:2px; width:11px; height:11px; border-radius:50%; background:#fff; transition:.15s; }.cover-option input:checked + span { background: #1889df; }.cover-option input:checked + span::after { transform: translateX(11px); }.cover-controls .cover-footer-controls { display: flex; flex-direction: column; }.cover-footer-controls p { margin: 2px 0 5px; font-size: 8.5px; }.cover-footer-controls [data-footer-lines] { display: flex; flex-direction: column; gap: 6px; }.cover-footer-controls [data-footer-lines] label { display: flex; gap: 5px; }.cover-footer-controls input { min-height: 35px; flex: 1; padding: 0 10px; border: 1px solid #d8dfe9; border-radius: 5px; font-size: 9px; }.cover-footer-controls label button { width: 34px; border: 0; color: #7f8998; background: transparent; }.cover-footer-controls svg { width: 13px; }.button.compact { min-height: 34px; align-self: flex-start; padding: 0 11px; font-size: 8.5px; }
.cover-preview-shell { min-height: 630px; padding: 24px; border-radius: 7px; display: flex; flex-direction: column; align-items: center; background: #f3f4f6; }.cover-preview-shell > span { margin-bottom: 8px; color: #838a96; font-size: 7px; letter-spacing: 1px; }.case-cover-preview { width: min(450px,100%); min-height: 590px; display: flex; flex-direction: column; background: #fff; box-shadow: 0 8px 22px rgba(32,47,75,.16); }.case-cover-preview header { min-height: 52px; padding: 10px 16px; display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 9px; color: #fff; background: #1e417b; }.case-cover-preview header > b { width: 27px; height: 27px; display: grid; place-items: center; color: #1e417b; background: #fff; font-size: 7px; }.case-cover-preview header div { display: flex; flex-direction: column; }.case-cover-preview header div:last-child { text-align: right; }.case-cover-preview header strong { font-size: 7.5px; }.case-cover-preview header small { color: rgba(255,255,255,.78); font-size: 5px; letter-spacing: .3px; }.case-cover-preview main { flex:1; padding: 14px 18px; }.case-cover-preview main > em { padding: 3px 6px; color: #385990; background: #edf2f8; font-size: 5px; font-style: normal; font-weight: 800; letter-spacing: .4px; }.case-cover-preview main > h2 { margin: 7px 0 11px; padding-bottom: 7px; border-bottom: 1px solid #183b70; color: #111a29; font-size: 10px; }.case-cover-preview main section { margin-bottom: 8px; padding: 8px 10px; background: #f5f7fa; }.case-cover-preview main section h3 { margin: -8px -10px 6px; padding: 4px 8px; color: #fff; background: #1b3d73; font-size: 5px; letter-spacing: .5px; }.case-cover-preview main section:first-of-type { border-left: 2px solid #204b8e; }.case-cover-preview main section:first-of-type h3 { margin: 0 0 4px; padding: 0; color: #4c5a6f; background: transparent; }.case-cover-preview main section strong { display:block; font-size:7px; }.case-cover-preview main section small { color:#536071;font-size:5px; }.case-cover-preview main section > div { display:grid; grid-template-columns:1fr 1fr; gap:7px; }.case-cover-preview main section span { display:flex; flex-direction:column; color:#29364a;font-size:6px; }.case-cover-preview main section span small { text-transform:uppercase;letter-spacing:.35px;font-size:4.7px; }.case-cover-preview footer { min-height: 45px; padding: 8px 15px; border-top: 1px solid #1d4179; display: flex; justify-content: space-between; align-items: center; }.case-cover-preview footer div { display:flex;flex-direction:column; }.case-cover-preview footer strong { color:#1d4179;font-size:5.5px; }.case-cover-preview footer small { max-width:330px;color:#788291;font-size:4.5px; }.case-cover-preview footer > b { width:27px;height:27px;display:grid;place-items:center;color:#fff;background:#111;font-size:5px; }
@media (max-width: 1050px) { .custom-fields-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }.cover-config-layout { grid-template-columns: 1fr; }.cover-controls { max-height:none; }.cover-preview-shell { min-height: 620px; }.workflow-builder-grid { grid-template-columns: 230px minmax(0,1fr); } }
@media (max-width: 700px) { .case-config-head { align-items:flex-start;flex-direction:column; }.case-config-head .button { width:100%; }.custom-fields-grid { grid-template-columns:1fr; }.case-check-grid { grid-template-columns:1fr; }.workflow-builder > header { align-items:flex-start;flex-direction:column; }.workflow-builder > header .button { width:100%; }.workflow-builder-grid { display:block;overflow-y:auto; }.workflow-builder-grid aside { border-right:0;border-bottom:1px solid #e3e7ee; }.workflow-builder-grid main { overflow:visible;padding:24px 18px; }.cover-config-layout { display:block; }.cover-preview-shell { margin-top:18px;padding:13px; }.case-config-table { min-width:680px; } }

/* Legibility pass: keeps the MetaJurídico-style density, but makes daily use easier on the eyes. */
.sidebar .nav-item { font-size: 9.6px; letter-spacing: .05px; }
.sidebar .global-search input { font-size: 12.8px; }
.advanced-search,
.button,
.quick-add { font-size: 11px; }
.top-profile-copy strong { font-size: 9.8px; }
.top-profile-copy small { font-size: 7.8px; }
.quick-create-title { font-size: 13px; }
.quick-create-menu button > span:nth-child(2) { font-size: 12px; }
.quick-create-menu button small { font-size: 9px; line-height: 1.35; }
.external-links-head strong { font-size: 13px; }
.external-links-head small,
.external-links-scroll a small { font-size: 9px; }
.external-links-scroll a span { font-size: 10.5px; }

.eyebrow,
.settings-welcome-card .eyebrow { font-size: 9.5px; }
.page-heading > div:first-child > p:last-child,
.section-header p,
.settings-title p,
.settings-card p,
.settings-welcome-card p,
.integration-card p,
.third-party-head p,
.provider-config > p,
.settings-note { font-size: 11.5px; line-height: 1.6; }
.page-heading h1,
.section-header h1 { font-size: 21px; }
.settings-title h1 { font-size: 19px; }
.panel-header h2,
.settings-card h2,
.settings-welcome-card h2,
.case-config-head h2 { font-size: 16px; }
.settings-welcome-card h2 { font-size: 19px; }

th,
.data-table th,
.case-config-table th { font-size: 10px; }
td,
.data-table td,
.case-config-table td { font-size: 12px; line-height: 1.45; }
.data-table td strong,
.case-config-table td:first-child strong,
.contact-name strong { font-weight: 700; }
.case-title strong { font-size: 11.5px; }
.case-title small,
.contact-name small,
.case-number,
.pagination,
.empty-state p,
.queue-error { font-size: 10px; }

.tag,
.status,
.link-state,
.case-default-tag,
.case-archive-tag { font-size: 9px; }
.metric-card > p,
.alert-banner p,
.timeline-item time,
.timeline-item div strong,
.activity p,
.activity a,
.document-row,
.calculator-card p,
.role-card strong,
.security-item strong,
.modal-body > p,
.message,
.toast,
.ai-label { font-size: 12px; }
.metric-card > small,
.panel-header p,
.timeline-item div p,
.activity small,
.role-card p,
.security-item small,
.ai-chat-header p,
.suggestions button { font-size: 10px; }

.field-search input,
.select,
.form-group label,
.form-group input,
.form-group select,
.form-group textarea,
.settings-control,
.settings-control input,
.settings-control select,
.provider-config label,
.provider-config input,
.provider-config select,
.provider-button,
.meta-config-form .form-group label,
.meta-setup-steps ol,
.whapi-guide-links a,
.whapi-official-help,
.notification-rule > label,
.case-settings-tabs button,
.case-config-toolbar input,
.case-check-grid label,
.modal-check,
.cover-option,
.cover-footer-controls input,
.button.compact { font-size: 11px; }

.settings-toggle-row strong,
.channel-row strong,
.notification-main strong,
.case-config-empty strong,
.custom-field-card h3,
.workflow-builder-grid aside h3,
.workflow-task strong,
.provider-summary h3,
.official-api-notice strong,
.whatsapp-policy strong,
.qr-state strong { font-size: 12px; }
.settings-toggle-row small,
.channel-row small,
.notification-main small,
.case-config-empty small,
.custom-field-card small,
.workflow-builder header p,
.workflow-builder-grid aside p,
.workflow-task small,
.provider-summary p,
.provider-config ul,
.official-api-notice p,
.whatsapp-policy small,
.whatsapp-connect-foot p,
.qr-state small { font-size: 10px; line-height: 1.45; }
.case-config-table code,
.custom-field-card > div:first-child,
.custom-field-live-preview > small,
.case-modal-divider span,
.workflow-start,
.workflow-task span,
.workflow-task > i,
.cover-controls section h3,
.cover-footer-controls p,
.cover-preview-shell > span,
.demo-badge,
.browser-address,
.qr-demo-panel .text-button { font-size: 9.5px; }
.whatsapp-instructions > p,
.whatsapp-instructions ol { font-size: 11px; }

@media (max-width: 1320px) {
  .sidebar .nav-item { font-size: 9px; }
}

@media (max-width: 780px) {
  .sidebar .nav-item { font-size: 12px; }
  .sidebar .brand-copy strong { font-size: 12.5px; }
}
