:root {
    color-scheme: light;
    --ink: #30212a;
    --muted: #65545d;
    --brand: #ad2347;
    --brand-hover: #861635;
    --brand-ink: #81263f;
    --brand-soft: #f9e5eb;
    --brand-light: #fff2f6;
    --brand-gradient: linear-gradient(155deg, #bd3255, #9c1d40);
    --line-subtle: #f2e8ec;
    --line: #eadde2;
    --paper: #fff;
    --background: #faf7f8;
    --shadow: 0 2px 3px #4a1e3307, 0 15px 35px #4a1e3305;
    font-family: "Inter", "Segoe UI", system-ui, sans-serif;
    font-size: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--background); }
h1, h2, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button, select { color: inherit; }
svg { display: block; flex: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.sr-only, .skip:not(:focus) {
    width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap;
    position: absolute; border: 0;
}
.skip:focus { position: fixed; z-index: 10; top: 12px; left: 12px; background: white; padding: 12px; border-radius: 8px; }
#expedientes, #agenda { scroll-margin-top: 22px; }

.button {
    display: inline-flex; justify-content: center; align-items: center; gap: .55rem;
    padding: .7rem 1rem; min-height: 44px; border-radius: 10px; border: 1px solid transparent;
    font-size: .875rem; font-weight: 650; white-space: nowrap;
    transition: background .15s ease, border-color .15s ease;
}
.button svg { width: 18px; height: 18px; }
.button-primary { background: var(--brand-gradient); color: #fff; }
.button-primary:hover { background: var(--brand-hover); }
.button-outline { border-color: #e7c9d2; background: #fff; color: var(--brand-ink); }
.button-outline:hover { background: var(--brand-light); border-color: #dcaebd; }
.brand { display: inline-flex; gap: 11px; align-items: center; }
.brand-mark {
    display: grid; place-items: center; width: 39px; height: 39px; flex: none;
    background: var(--brand-gradient); color: #fff5f7; border-radius: 11px;
}
.brand-mark svg { width: 21px; height: 21px; fill: currentColor; stroke: none; }
.brand strong { display: block; font-size: .94rem; line-height: 1.25; letter-spacing: -.02em; }
.brand small { display: block; margin-top: 3px; font-size: .75rem; color: var(--muted); }
.environment-dot { flex: none; width: 8px; height: 8px; background: #b84360; border-radius: 50%; }
.feature-icon {
    display: grid; place-items: center; width: 39px; height: 39px; flex: none; border-radius: 10px;
}
.feature-icon svg { width: 20px; height: 20px; }
.feature-icon.mint { background: var(--brand-soft); color: var(--brand-ink); }
.feature-icon.blue { background: #e8eff8; color: #375879; }
.feature-icon.peach { background: #f7ece1; color: #845137; }
.feature-icon.lilac { background: #f0ebf8; color: #654d89; }

.site-content { background: #fffbfc; }
.site-wrap { max-width: 1220px; width: calc(100% - 96px); margin-inline: auto; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { min-height: 75px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.landing-hero {
    min-height: 520px; padding-block: 56px;
    display: grid; grid-template-columns: 1fr .98fr; align-items: center; gap: 44px;
}
.demo-label {
    display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px;
    border-radius: 30px; color: var(--brand-ink); background: var(--brand-soft); font-weight: 650; font-size: .82rem;
}
.hero-copy h1 {
    margin: 19px 0 18px; color: #361e2a; font-size: clamp(2.5rem, 5.22vw, 4.65rem);
    font-weight: 740; letter-spacing: -.063em; line-height: 1.02;
    text-wrap: balance;
}
.hero-copy h1 span { color: #c24562; }
.hero-copy p { max-width: 420px; color: var(--muted); font-size: 1.08rem; line-height: 1.65; }
.hero-cta { margin-top: 27px; min-height: 48px; padding-inline: 19px; }
.hero-visual {
    position: relative; overflow: hidden; min-height: 404px; border: 1px solid #eed5dd; border-radius: 27px;
    background: radial-gradient(ellipse at 98% 15%, #fff2ee, transparent 55%),
        radial-gradient(ellipse at 5% 94%, #fff1f5, transparent 66%), linear-gradient(145deg, #f1cbd7, #f8dce3);
    display: grid; place-items: center; isolation: isolate;
}
.visual-grid {
    position: absolute; inset: 0 0 0 42%; z-index: -1; opacity: .6;
    background: radial-gradient(#aa3c5f50 1px, transparent 1.3px) 0 0 / 13px 13px;
    mask-image: linear-gradient(110deg, transparent 10%, #000 94%);
}
.visual-orbit { position: absolute; border: 1px solid #ab325c2c; border-radius: 50%; z-index: -1; }
.orbit-one { width: 430px; height: 430px; right: -170px; top: -210px; }
.orbit-two { width: 470px; height: 470px; left: -195px; bottom: -350px; }
.hero-mock {
    width: min(77%, 410px); background: #fffffff2; border: 1px solid #fff5f8; border-radius: 17px;
    box-shadow: 0 18px 45px #7b2b4726; transform: translate(-10px, -10px);
}
.mock-head { display: flex; gap: 6px; align-items: center; padding: 13px 17px; border-bottom: 1px solid var(--line-subtle); color: #47303d; font-size: .85rem; font-weight: 750; }
.mock-logo { width: 23px; height: 23px; display: grid; place-items: center; color: white; background: var(--brand); border-radius: 7px; margin-right: 3px; }
.mock-logo svg { width: 12px; height: 12px; fill: currentColor; stroke: none; }
.mock-head i { border-radius: 50%; width: 5px; height: 5px; background: #cba5b3; }
.mock-head i:first-of-type { margin-left: auto; }
.mock-content { padding: 17px; }
.mock-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mock-stats div { padding: 11px 13px; border-radius: 9px; background: #fdf1f4; }
.mock-stats div + div { background: #f9e4eb; }
.mock-stats span, .mock-stats strong { display: block; }
.mock-stats span { font-size: .72rem; font-weight: 600; color: var(--muted); }
.mock-stats strong { margin-top: 4px; font-size: 1.55rem; line-height: 1.1; letter-spacing: -.045em; }
.mock-pipeline { margin-top: 12px; border: 1px solid var(--line-subtle); padding: 12px; border-radius: 9px; }
.mock-pipeline > span { font-size: .76rem; font-weight: 670; }
.mock-segments { display: grid; grid-template-columns: 2fr 4fr 2fr 2fr 2fr; gap: 3px; height: 14px; margin-block: 10px; }
.mock-segments i { border-radius: 3px; background: #a0c7df; }
.mock-segments i:nth-child(2) { background: #d0839a; }
.mock-segments i:nth-child(3) { background: #e5bc9d; }
.mock-segments i:nth-child(4) { background: #c2b0db; }
.mock-segments i:nth-child(5) { background: #c4bdc7; }
.mock-legend { display: flex; flex-wrap: wrap; gap: 3px 9px; color: var(--muted); font-size: .61rem; }
.mock-legend span { display: flex; align-items: center; gap: 3px; white-space: nowrap; }
.mock-legend i { width: 6px; height: 6px; border-radius: 50%; background: #a0c7df; }
.mock-legend span:nth-child(2) i { background: #d0839a; }
.mock-legend span:nth-child(3) i { background: #c2b0db; }
.mock-agenda {
    position: absolute; right: 5%; bottom: 9%; display: flex; align-items: center; gap: 10px;
    background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 10px 14px 10px 10px;
    box-shadow: 0 9px 22px #7b2b4722;
}
.mock-agenda-icon { width: 33px; height: 33px; display: grid; place-items: center; border-radius: 8px; background: #f5e9db; color: #865135; }
.mock-agenda-icon svg { width: 17px; height: 17px; }
.mock-agenda strong, .mock-agenda small { display: block; }
.mock-agenda strong { font-size: .75rem; }
.mock-agenda small { color: var(--muted); font-size: .68rem; margin-top: 2px; }
.landing-capabilities { padding-bottom: 58px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.landing-capabilities article { background: #fff; border: 1px solid var(--line); border-radius: 15px; display: flex; align-items: flex-start; gap: 12px; padding: 19px; }
.landing-capabilities h2 { font-size: 1rem; letter-spacing: -.025em; margin: 2px 0 5px; }
.landing-capabilities p { color: var(--muted); font-size: .875rem; line-height: 1.5; }
.site-footer { background: #fff; border-top: 1px solid var(--line); }
.footer-inner { display: flex; min-height: 68px; padding-block: 15px; align-items: center; justify-content: space-between; gap: 10px 24px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); }
.missing-view { min-height: 68vh; padding-block: 75px; }
.missing-view h1 { font-size: 2.4rem; letter-spacing: -.04em; }
.missing-view p { margin: 10px 0 24px; color: var(--muted); }

.app-shell { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
    display: flex; flex-direction: column; align-items: stretch; position: sticky; top: 0; height: 100vh;
    background: #fffbfd; border-right: 1px solid var(--line); padding: 24px 15px 18px;
}
.sidebar-brand { margin-inline: 8px; }
.side-nav { margin-top: 43px; display: grid; gap: 5px; }
.side-nav a { display: flex; gap: 11px; align-items: center; padding: 10px 12px; min-height: 44px; border-radius: 9px; color: var(--muted); font-size: .9rem; font-weight: 600; }
.side-nav a svg { width: 19px; height: 19px; }
.side-nav a:hover { background: var(--brand-light); color: var(--brand-ink); }
.side-nav .is-current { background: linear-gradient(105deg, #f7dfe7, var(--brand-light)); color: var(--brand-ink); }
.sidebar-footer { display: flex; align-items: center; gap: 11px; padding: 13px 11px; border-top: 1px solid var(--line); margin-top: auto; }
.sidebar-footer strong, .sidebar-footer small { display: block; }
.sidebar-footer strong { font-size: .83rem; }
.sidebar-footer small { color: var(--muted); font-size: .76rem; margin-top: 2px; }
.app-main { background: linear-gradient(155deg, #fcedf2, var(--background) 460px); }
.app-topbar {
    min-height: 65px; background: #fff; border-bottom: 1px solid var(--line); padding: 10px clamp(22px, 3vw, 42px);
    display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: .84rem;
}
.app-location, .cutoff { display: flex; gap: 8px; align-items: center; }
.top-context, .top-chevron { color: var(--muted); }
.top-chevron svg { width: 14px; height: 14px; }
.top-current { font-weight: 650; }
.cutoff { color: var(--muted); white-space: nowrap; }
.cutoff svg { width: 17px; height: 17px; }
.icon-button {
    display: inline-grid; place-items: center; padding: 0; width: 40px; height: 40px; border: 1px solid transparent;
    border-radius: 8px; background: transparent; color: var(--muted);
}
.icon-button:hover { background: var(--brand-light); }
.icon-button svg { width: 20px; height: 20px; }
.menu-button { display: none; }

.dashboard-content { max-width: 1530px; margin-inline: auto; padding: 28px clamp(22px, 3vw, 42px) 48px; }
.dashboard-intro { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 22px; }
.dashboard-intro h1 { font-size: clamp(1.95rem, 3vw, 2.7rem); font-weight: 740; letter-spacing: -.055em; line-height: 1.12; }
.dashboard-intro p { margin-top: 7px; color: var(--muted); line-height: 1.5; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card, .panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.stat-card { padding: 15px; min-width: 0; }
.stat-card .feature-icon { width: 36px; height: 36px; margin-bottom: 9px; }
.stat-card .feature-icon svg { width: 18px; height: 18px; }
.stat-card h2 { font-size: .87rem; font-weight: 650; color: #523b48; line-height: 1.3; }
.stat-card > strong { display: block; font-size: 2rem; line-height: 1.1; letter-spacing: -.05em; margin: 4px 0 6px; font-variant-numeric: tabular-nums; }
.stat-card p { color: var(--muted); font-size: .76rem; line-height: 1.4; }

.overview-grid { display: grid; grid-template-columns: minmax(0, 1.13fr) minmax(0, 1fr); gap: 16px; margin-bottom: 18px; }
.panel { padding: 18px; min-width: 0; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.panel-heading h2 { font-size: 1.1rem; letter-spacing: -.025em; line-height: 1.23; }
.panel-heading p { color: var(--muted); font-size: .83rem; margin-top: 4px; line-height: 1.45; }
.total-chip {
    display: inline-block; padding: 5px 9px; border-radius: 25px; white-space: nowrap;
    background: var(--brand-light); color: var(--brand-ink); font-size: .74rem; font-weight: 650;
}
.pipeline-chart { display: grid; gap: 3px; margin-top: 14px; }
.pipeline-row {
    display: grid; grid-template-columns: minmax(124px, .9fr) minmax(45px, 1.15fr) 22px; align-items: center; gap: 10px;
    border: 1px solid transparent; border-radius: 8px; padding: 6px 3px; background: transparent; text-align: left;
    min-height: 37px; font-size: .835rem; color: #513744;
}
.pipeline-row:hover, .pipeline-row[aria-pressed="true"] { background: var(--brand-light); border-color: var(--line); }
.pipeline-row strong { font-weight: 650; text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }
.pipeline-row meter {
    appearance: none; display: block; height: 11px; width: 100%;
    background: #f3edf0; border: 0; border-radius: 20px; overflow: hidden;
}
.pipeline-row meter::-webkit-meter-bar { height: 100%; background: #f3edf0; border: 0; border-radius: 20px; }
.pipeline-row meter::-webkit-meter-optimum-value { background: var(--bar); border-radius: 20px; }
.pipeline-row meter::-moz-meter-bar { background: var(--bar); border-radius: 20px; }
.sky { --bar: #a0c7df; --badge: #eaf1f9; --badge-text: #325f7a; }
.mint { --bar: #d0839a; --badge: var(--brand-soft); --badge-text: var(--brand-ink); }
.peach { --bar: #e5bc9d; --badge: #f8eee4; --badge-text: #795030; }
.lilac { --bar: #c2b0db; --badge: #f1ecf8; --badge-text: #614981; }
.slate { --bar: #c4bdc7; --badge: #efedf0; --badge-text: #534856; }
.agenda-icon { width: 35px; height: 35px; }
.agenda-list { list-style: none; padding: 0; margin: 9px 0 0; }
.agenda-list li + li { border-top: 1px solid var(--line-subtle); }
.agenda-row {
    display: grid; grid-template-columns: 43px minmax(0, 1fr) 18px; align-items: center; gap: 10px;
    width: 100%; border: 0; border-radius: 7px; background: transparent; text-align: left; padding: 6px 3px;
}
.agenda-row:hover { background: var(--brand-light); }
.agenda-date { display: grid; justify-items: center; align-content: center; min-height: 39px; border-radius: 8px; background: var(--brand-light); color: var(--brand-ink); line-height: 1; }
.agenda-date strong { font-size: .98rem; font-variant-numeric: tabular-nums; }
.agenda-date span { font-size: .69rem; margin-top: 3px; }
.agenda-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.agenda-copy strong { font-size: .84rem; font-weight: 650; line-height: 1.2; }
.agenda-copy span { color: var(--muted); font-size: .75rem; line-height: 1.3; }
.agenda-row > svg { width: 16px; height: 16px; color: var(--muted); }
.cases-panel { padding-bottom: 7px; }
.filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 14px 0 12px; }
.search-field, .select-field {
    position: relative; display: flex; align-items: center; min-width: 0; border: 1px solid #e2d2d9;
    border-radius: 8px; color: var(--muted); background: #fff;
}
.search-field { width: min(100%, 300px); padding-inline: 9px; gap: 7px; }
.search-field svg, .select-field svg { width: 16px; height: 16px; }
.search-field:focus-within, .select-field:focus-within { outline: 2px solid var(--brand); outline-offset: 1px; }
.search-field input, .select-field select { border: 0; outline: none; min-height: 40px; font-size: .85rem; }
.search-field input { min-width: 0; width: 100%; color: var(--ink); background: transparent; }
.search-field input::placeholder { color: var(--muted); }
.select-field select { width: 100%; appearance: none; background: transparent; border-radius: 8px; padding: 5px 32px 5px 10px; }
.select-field svg { pointer-events: none; position: absolute; right: 8px; }
.text-button { border: 0; background: transparent; color: var(--brand); font-weight: 650; text-decoration: underline; text-underline-offset: 3px; padding: 8px; font-size: .82rem; min-height: 40px; }
.table-scroll { overflow-x: auto; }
.cases-table { width: 100%; min-width: 670px; border-collapse: collapse; text-align: left; font-size: .86rem; }
.cases-table thead { background: #f8eef2; color: #593f50; }
.cases-table thead th { font-size: .78rem; font-weight: 650; white-space: nowrap; }
.cases-table thead th:first-child { border-start-start-radius: 8px; border-end-start-radius: 8px; }
.cases-table thead th:last-child { border-start-end-radius: 8px; border-end-end-radius: 8px; }
.cases-table th, .cases-table td { padding: 9px 10px; }
.cases-table tbody tr + tr { border-top: 1px solid var(--line-subtle); }
.cases-table tbody tr:hover { background: #fff8fa; }
.cases-table tbody th strong, .cases-table tbody th small { display: block; }
.cases-table tbody th strong { font-weight: 650; }
.cases-table tbody th small { margin-top: 3px; font-weight: 500; color: var(--muted); }
.cases-table td:nth-child(4) { white-space: nowrap; }
.cases-table td:last-child { width: 48px; padding-block: 4px; padding-inline: 4px; text-align: right; }
.details-button svg { width: 17px; height: 17px; }
.stage-badge {
    display: inline-block; padding: 4px 8px; border-radius: 30px; background: var(--badge);
    color: var(--badge-text); font-size: .74rem; font-weight: 670; line-height: 1.3; white-space: nowrap;
}
.empty-cases { padding: 21px 8px; color: var(--muted); font-size: .9rem; }
dialog {
    width: min(495px, calc(100% - 28px)); max-height: calc(100% - 28px); padding: 0; border: 1px solid var(--line);
    border-radius: 16px; color: var(--ink); box-shadow: 0 18px 70px #42182f50;
}
dialog::backdrop { background: #321722a0; }
.dialog-shell { padding: 25px; position: relative; }
.dialog-close { position: absolute; top: 12px; right: 12px; }
.case-id { color: var(--muted); font-size: .85rem; margin-bottom: 4px; }
#case-title { font-size: 1.55rem; line-height: 1.2; letter-spacing: -.04em; margin: 0 30px 9px 0; }
.case-summary { margin-top: 15px; color: var(--muted); line-height: 1.5; }
.case-details { margin: 16px 0 0; }
.case-details div { border-top: 1px solid var(--line); padding-top: 11px; margin-top: 11px; }
.case-details dt { display: flex; align-items: center; gap: 5px; font-weight: 650; font-size: .86rem; }
.case-details dt svg { width: 17px; height: 17px; }
.case-details dd { margin: 5px 0 0 22px; color: var(--muted); font-size: .875rem; line-height: 1.45; }

@media (min-width: 1600px) {
    .app-shell { grid-template-columns: 260px minmax(0, 1fr); }
}
@media (max-width: 1120px) {
    .app-shell { grid-template-columns: 203px minmax(0, 1fr); }
    .sidebar { padding-inline: 10px; }
    .sidebar .brand { gap: 8px; }
    .sidebar .brand strong { font-size: .85rem; }
    .sidebar .brand-mark { width: 34px; height: 34px; }
    .overview-grid { gap: 12px; }
    .panel { padding-inline: 14px; }
    .pipeline-row { grid-template-columns: minmax(112px, .92fr) minmax(32px, 1fr) 14px; gap: 7px; }
}
@media (max-width: 930px) {
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .site-wrap { width: calc(100% - 60px); }
    .landing-hero { min-height: 450px; gap: 24px; }
    .hero-visual { min-height: 330px; }
    .landing-capabilities article { padding: 13px; gap: 8px; }
    .landing-capabilities .feature-icon { width: 34px; height: 34px; }
}
@media (max-width: 760px) {
    .app-shell { display: block; }
    .sidebar { display: none; }
    .sidebar.mobile-open {
        display: flex; position: absolute; z-index: 4; inset: 60px auto auto 0; height: auto; width: min(285px, 100%);
        padding: 18px 13px 12px; border-bottom-right-radius: 13px; border-bottom: 1px solid var(--line);
        box-shadow: 0 17px 32px #46223420;
    }
    .sidebar.mobile-open .side-nav { margin: 19px 0 14px; }
    .app-topbar { min-height: 60px; padding: 7px 15px; }
    .menu-button { display: inline-grid; margin-left: -5px; }
    .dashboard-content { padding-inline: 16px; }
    .site-wrap { width: calc(100% - 36px); }
    .landing-hero { grid-template-columns: 1fr; padding-block: 42px 23px; gap: 25px; }
    .hero-copy h1 { font-size: clamp(2.45rem, 8.25vw, 4rem); }
    .hero-visual { min-height: 327px; }
    .landing-capabilities { grid-template-columns: 1fr; gap: 10px; padding-bottom: 32px; }
    .landing-capabilities article { padding: 14px; gap: 10px; }
}
@media (max-width: 550px) {
    .top-context, .top-chevron { display: none; }
    .app-topbar { gap: 6px; }
    .app-location, .cutoff { gap: 5px; }
    .cutoff { font-size: .75rem; }
    .cutoff svg { width: 15px; height: 15px; }
    .dashboard-intro { align-items: flex-start; flex-direction: column; gap: 13px; margin-bottom: 16px; }
    .dashboard-intro p { font-size: .93rem; }
    .stats-grid { gap: 9px; margin-bottom: 13px; }
    .stat-card { padding: 12px; }
    .overview-grid { grid-template-columns: 1fr; margin-bottom: 13px; }
    .search-field { width: 100%; }
    .cases-table { min-width: 0; }
    .cases-table th, .cases-table td { padding-inline: 6px; }
    .cases-table tr > :nth-child(3), .cases-table tr > :nth-child(4) { display: none; }
    .cases-table .stage-badge { white-space: normal; }
    .cases-table td:last-child { width: 39px; padding-inline: 0; }
    .details-button { width: 36px; }
    .header-inner { min-height: 66px; }
    .header-action { padding-inline: 9px; font-size: .76rem; }
    .brand-mark { height: 33px; width: 33px; }
    .brand-mark svg { width: 18px; height: 18px; }
    .brand { gap: 7px; }
    .brand strong { font-size: .81rem; }
    .brand small { font-size: .7rem; }
    .hero-visual { min-height: 270px; border-radius: 18px; }
    .hero-mock { transform: translate(-5px, -15px); width: 87%; }
    .mock-content { padding: 11px; }
    .mock-head { padding: 10px 11px; }
    .mock-agenda { bottom: 6%; right: 4%; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
}
