/* Responsive adapter for the existing CRM. Desktop and login keep their styles. */
.m-header,.m-home-icon,.m-people-icon{display:none}
@media(max-width:800px),(max-width:1100px) and (max-height:500px) and (pointer:coarse){
 html:has(#workspace:not([hidden])){scroll-padding-block:80px 100px}
 #workspace{--m-oxford:#142338;--m-blue:#1451e8;--m-muted:#61718b;--m-line:#e3e9f2;--m-soft:#f2f6fc;--m-nav-height:68px;background:#f7f9fc}
 #workspace #navigation{position:static;display:contents;transform:none;width:auto;height:auto;padding:0;background:none;border:0}
 #workspace #navigation>.wordmark,#workspace #navigation>.sidebar-end,#workspace #more-menu,#workspace #menu,#workspace .breadcrumb,#workspace .topbar>.account,#workspace .workspace-badge{display:none!important}
 #workspace #nav{position:fixed;inset:auto 0 0;z-index:35;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;padding:5px max(8px,env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid var(--m-line);box-shadow:0 -3px 16px #14233803}
 #workspace #nav a{position:relative;display:flex;flex-direction:column;justify-content:center;gap:4px;min-height:58px;margin:0;padding:4px 2px 9px;color:#63738c;background:transparent;border-radius:0;font-size:11px;font-weight:500;line-height:1.2}
 #workspace #nav a.active{color:var(--m-blue);background:transparent;font-weight:650}
 #workspace #nav a.active:after{content:'';position:absolute;bottom:2px;width:24px;height:3px;background:var(--m-blue);border-radius:3px}
 #workspace #nav svg{width:23px;height:23px}#workspace #nav a:first-child>svg,#workspace #nav a:nth-child(2)>svg{display:none}#workspace .m-home-icon,#workspace .m-people-icon{display:flex}
 #workspace #nav a.active .m-home-icon svg{fill:var(--m-blue)}
 #workspace .workspace-main{margin:0;min-height:100dvh;padding-bottom:calc(var(--m-nav-height) + env(safe-area-inset-bottom) + 14px)}
 #workspace .topbar{position:sticky;top:0;z-index:25;height:auto;min-height:64px;padding:10px 18px;background:#fff;border-bottom:1px solid var(--m-line)}
 #workspace .m-header{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-width:0}
 #workspace .m-brand{font:22px/1.1 Georgia,serif;letter-spacing:1.8px;color:var(--m-oxford);text-decoration:none;flex:none}
 #workspace .m-brand small{display:block;margin-top:5px;font:8px/1.2 'Segoe UI',sans-serif;letter-spacing:3px;color:var(--m-muted)}
 .m-profile{position:relative;min-width:0}.m-profile summary{display:flex;align-items:center;justify-content:end;gap:6px;min-height:44px;cursor:pointer;font-size:11px;color:var(--m-oxford);list-style:none}.m-profile summary::-webkit-details-marker{display:none}
 .m-profile summary>svg{width:14px;height:14px}.m-avatar{width:32px;height:32px;flex:none;display:grid;place-items:center;border-radius:50%;background:#edf2fa;font-size:12px;color:#17345f}
 .m-profile-menu{position:absolute;inset-block-start:calc(100% + 10px);inset-inline-end:0;z-index:45;width:240px;max-width:calc(100vw - 36px);padding:16px;background:#fff;border:1px solid var(--m-line);border-radius:12px;box-shadow:0 6px 24px #14233812}
 .m-profile-menu strong,.m-profile-menu small{display:block;overflow-wrap:anywhere}.m-profile-menu small{color:var(--m-muted);margin:4px 0 12px}.m-profile-menu a,.m-profile-menu button{display:flex;align-items:center;min-height:44px;width:100%;padding:8px 0;border:0;border-top:1px solid var(--m-line);background:#fff;font:inherit;font-size:14px;color:var(--m-oxford);text-align:start}
 #workspace main{padding:20px 16px;max-width:700px;margin-inline:auto}#workspace #content{min-height:60vh}
 #workspace #content[aria-busy=true]{cursor:progress}#workspace #content[aria-busy=true]:before{content:'Cargando…';position:fixed;top:64px;inset-inline:0;z-index:24;background:#edf3fc;color:#17345f;text-align:center;padding:4px;font-size:12px}
 #workspace .m-heading{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:12px;margin:0 0 20px}
 #workspace .m-heading h1{font-size:27px;line-height:1.2;letter-spacing:-.8px;font-weight:700;margin:0;color:var(--m-oxford)}
 #workspace .m-heading p{font-size:13px;line-height:1.5;color:var(--m-muted);margin:9px 0 0;max-width:220px}
 #workspace .m-heading>.button{margin-top:1px;font-size:12px;padding:10px 12px;min-height:44px;max-width:170px}
 #workspace .m-page .button.primary{background:var(--m-blue);border-color:var(--m-blue);box-shadow:0 2px 4px #1451e80a}
 #workspace .m-page svg{width:20px;height:20px;flex:none}
 .m-icon-disc{display:grid;place-items:center;width:40px;height:40px;flex:none;border-radius:50%;background:#edf3fe;color:var(--m-blue)}
 .m-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:20px}
 #workspace .m-stats>a{display:flex;align-items:center;gap:9px;min-width:0;min-height:76px;padding:10px;background:#fff;border:1px solid var(--m-line);border-radius:10px;color:var(--m-oxford);text-decoration:none}
 .m-stats>a>span:nth-child(2){min-width:0;flex:1}.m-stats small{display:block;color:var(--m-muted);font-size:11px;line-height:1.35}.m-stats strong{display:block;font-size:25px;line-height:1.2;margin-top:5px;font-weight:650}.m-stats .m-icon-disc{width:32px;height:32px}#workspace .m-stats>a>svg{width:12px;height:12px}
 .m-calendar{background:#fff;border:1px solid var(--m-line);border-radius:14px;padding:16px 12px;margin-bottom:4px}
 .m-calendar>header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 8px}
 .m-calendar h2{font-size:16px;line-height:1.4;font-weight:650;letter-spacing:-.3px;margin:0}.m-calendar>header a{display:flex;align-items:center;gap:3px;font-size:12px;min-height:44px;white-space:nowrap}#workspace .m-calendar>header a svg{width:14px;height:14px}
 .m-month-nav{display:flex;align-items:center;justify-content:space-between;gap:12px}.m-month-nav h3{font-size:16px;font-weight:650;line-height:1.4;text-align:center;margin:0}.m-month-nav h3::first-letter{text-transform:uppercase}
 #workspace .m-month-nav .button{width:44px;min-height:44px;padding:0;display:grid;place-items:center;font-size:23px;font-weight:400;border-color:var(--m-line)}
 .m-today{font-size:12px;min-height:26px;min-width:44px;display:grid;place-items:center;margin-top:2px}
 .m-weekdays,.m-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:0}
 .m-weekdays span{font-size:12px;text-align:center;color:var(--m-muted);padding:8px 0}
 #workspace .m-days a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:44px;position:relative;border-radius:9px;text-decoration:none;color:var(--m-oxford);font-size:14px}
 #workspace .m-days a.outside{color:#64748b}#workspace .m-days a.today>span{font-weight:750;text-decoration:underline;text-underline-offset:3px}
 #workspace .m-days a.selected{background:var(--m-blue);color:#fff;font-weight:650}
 .m-days i{position:absolute;bottom:5px;width:4px;height:4px;border-radius:50%;background:var(--m-blue)}.m-days a.selected i{background:#fff}
 .m-selected-day{margin-top:18px}.m-day-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}.m-day-heading h3{font-size:13px;font-weight:650;margin:0}.m-day-heading>span{font-size:11px;color:var(--m-muted);white-space:nowrap}
 .m-activity{width:100%;display:flex;align-items:center;gap:10px;border:1px solid var(--m-line);border-inline-start:3px solid var(--m-blue);border-radius:8px;background:#fff;color:var(--m-oxford);padding:12px 10px;margin:8px 0 0;min-height:66px;text-align:start;cursor:pointer;font:inherit}
 .m-activity.hearing{border-inline-start-color:#a5630e}.m-activity>time{font-size:12px;font-weight:650;max-width:63px;flex:0 0 63px;font-variant-numeric:tabular-nums;line-height:1.5;border-inline-end:1px solid var(--m-line);padding-inline-end:8px}.m-activity>span{display:grid;gap:3px;flex:1;min-width:0}.m-activity strong{font-size:13px}.m-activity>span>span{font-size:12px;color:var(--m-muted);overflow-wrap:anywhere}.m-activity small{display:flex;align-items:center;gap:4px;font-size:11px;color:var(--m-muted);overflow-wrap:anywhere}#workspace .m-activity small svg{width:12px;height:12px}#workspace .m-activity>svg{width:14px;height:14px;color:var(--m-muted)}
 .m-empty{padding:20px 8px;text-align:center;color:var(--m-muted);font-size:13px;line-height:1.5}
 .m-directory-search{position:relative;display:flex;align-items:center;gap:8px;background:#fff;border:1px solid var(--m-line);border-radius:10px;padding-inline:12px;margin-bottom:16px}
 #workspace .m-directory-search>svg{color:var(--m-muted);width:19px;height:19px}#workspace .m-directory-search input{min-height:48px;min-width:0;flex:1;border:0;background:transparent;font-size:16px;padding:8px 0;border-radius:0}#workspace .m-directory-search input::placeholder{font-size:12px;color:var(--m-muted)}
 .m-directory-search button{width:44px;min-height:44px;display:grid;place-items:center;border:0;background:transparent;color:var(--m-blue);padding:0}
 .m-type-filters{display:flex;gap:6px;justify-content:space-between;margin-bottom:20px}#workspace .m-type-filters a{display:flex;align-items:center;justify-content:center;gap:5px;min-height:44px;padding:7px 9px;border:1px solid var(--m-line);border-radius:24px;color:var(--m-muted);background:#fff;font-size:11px;white-space:nowrap;text-decoration:none}#workspace .m-type-filters svg{width:16px;height:16px}#workspace .m-type-filters a[aria-current]{background:#eaf1ff;color:var(--m-blue);border-color:#eaf1ff;font-weight:650}
 .m-result-count{font-size:13px;color:var(--m-muted);margin:0 0 14px}.m-card-list{display:grid;gap:14px}.m-client-card,.m-event-card{padding:16px;background:#fff;border:1px solid var(--m-line);border-radius:12px;min-width:0}
 .m-client-card>header{display:flex;align-items:center;gap:12px;margin-bottom:12px}.m-client-card h2{font-size:16px;line-height:1.35;font-weight:650;margin:0 0 4px;overflow-wrap:anywhere}.m-client-card header p{font-size:12px;color:var(--m-muted);margin:0}.m-client-card .m-icon-disc{width:42px;height:42px}
 .m-contact-methods{border-top:1px solid var(--m-line);padding-top:7px;margin-bottom:9px}.m-contact-methods a{display:flex;align-items:center;gap:10px;min-height:44px;font-size:13px;overflow-wrap:anywhere;color:var(--m-oxford)!important}.m-contact-methods span{min-width:0}.m-contact-methods svg{color:var(--m-muted)}.m-contact-methods p{font-size:12px;color:var(--m-muted);margin:8px 0}
 #workspace .m-open-file{display:flex;align-items:center;gap:8px;border-radius:7px;background:var(--m-soft);min-height:44px;padding:9px 10px;font-size:13px;font-weight:600}.m-open-file svg:last-child{margin-inline-start:auto;width:16px!important}
 .m-pagination{display:flex;justify-content:space-between;gap:12px;margin-top:16px}.m-pagination:empty{display:none}
 #m-directory-results[aria-busy=true]{opacity:.65}#m-directory-results[aria-busy=true]:before{content:'Buscando…';display:block;font-size:12px;color:var(--m-muted);margin-bottom:8px}
 .m-range{display:flex;align-items:center;gap:12px;width:100%;min-height:66px;padding:12px 14px;margin-bottom:24px;background:#fff;border:1px solid var(--m-line);border-radius:10px;text-align:start;color:var(--m-oxford);font:inherit;cursor:pointer}
 .m-range>svg:first-child{color:var(--m-blue);width:24px!important;height:24px!important}.m-range>span{flex:1;min-width:0;font-size:13px;line-height:1.5}.m-range small{display:block;color:var(--m-muted);font-size:11px;margin-bottom:2px}.m-range>svg:last-child{width:15px!important;height:15px!important;color:var(--m-muted)}
 .m-list-heading{font-size:16px;font-weight:650;margin:0 0 14px;letter-spacing:-.2px}.m-event-main{display:flex;align-items:start;gap:14px}.m-date-block{flex:0 0 65px;text-align:center;background:var(--m-soft);border-radius:9px;padding:12px 4px}.m-date-block strong{display:block;font-size:30px;line-height:1.2;font-weight:650}.m-date-block span{display:block;font-size:10px;color:var(--m-muted);text-transform:uppercase;margin-top:4px}.m-event-info{flex:1;min-width:0}.m-card-line{display:flex;align-items:start;gap:9px;margin:0 0 10px;font-size:13px;line-height:1.5}.m-card-line:last-child{margin-bottom:0}.m-card-line strong,.m-card-line span{overflow-wrap:anywhere;font-weight:500}#workspace .m-card-line svg{color:var(--m-blue);width:18px;height:18px;margin-top:1px}.m-card-line:first-child strong{font-weight:650}.m-reason{margin:8px 0;font-size:12px;line-height:1.5;color:var(--m-muted);overflow-wrap:anywhere}
 #workspace .m-event-card>footer{display:flex!important;justify-content:flex-end;padding:12px 0 0;margin-top:14px;border-top:1px solid var(--m-line);background:transparent}.m-event-card>footer button{min-height:44px;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:8px 12px;border:1px solid var(--m-line);border-radius:8px;color:var(--m-blue);background:#fff;font:600 13px/1.4 'Segoe UI',sans-serif;cursor:pointer}#workspace .m-event-card>footer svg{width:16px;height:16px}
 .m-hearing-card>header{display:flex;align-items:center;gap:10px;padding-bottom:14px;border-bottom:1px solid var(--m-line)}.m-hearing-card>header>div{flex:1;min-width:0}.m-hearing-card>header strong{display:block;font-size:14px;font-weight:650}.m-hearing-card time{display:block;font-size:12px;color:var(--m-muted);margin-top:4px}.m-status{display:inline-block;flex:none;font-size:10px;color:#1451be;background:#edf3fe;border-radius:20px;padding:5px 8px}.m-status.cancelled{background:#fceff0;color:#9f2932}.m-status.completed{background:#eaf6f0;color:#16634b}
 .m-hearing-data{margin:0}.m-hearing-data>div{display:grid;grid-template-columns:95px minmax(0,1fr);align-items:start;gap:12px;padding:12px 0;border-bottom:1px solid var(--m-line);font-size:12px;line-height:1.5}.m-hearing-data>div:last-child{border:0;padding-bottom:0}.m-hearing-data dt{display:flex;align-items:center;gap:6px;color:var(--m-muted)}#workspace .m-hearing-data svg{width:17px;height:17px}.m-hearing-data dd{margin:0;text-align:end;overflow-wrap:anywhere}.m-hearing-card>footer button{width:100%}.m-sync{font-size:12px;line-height:1.5;background:#fff4dd;color:#805400;padding:8px;border-radius:6px;margin:12px 0 0}
 /* Existing record detail and representative components retain their relationships/actions. */
 #workspace .details-grid{grid-template-columns:1fr;gap:16px}#workspace .company-representative-list li{align-items:stretch}#workspace .company-representative-actions{gap:10px}#workspace .company-representative-actions .button{min-height:44px}
 #workspace .page-heading .button{min-height:44px}#workspace .v1-table{overflow:hidden}
 #workspace :is(a,button,input,select,summary):focus-visible{outline:2px solid #1451e8;outline-offset:2px}
 body:has(#workspace:not([hidden])) #notice{position:static;max-width:668px;margin:14px 16px 0;font-size:13px;border:1px solid var(--m-line);box-shadow:none;overflow-wrap:anywhere}
 #workspace #notice button{min-width:44px;min-height:44px}
 #workspace main :is(a,button){scroll-margin-block:90px 110px}
 body:has(#workspace:not([hidden])):has(#dialog[open]){overflow:hidden}
 body:has(#workspace:not([hidden])) #dialog{position:fixed;inset-inline:0;top:var(--m-viewport-top,0px);bottom:auto;margin:0;width:100%;max-width:none;height:var(--m-viewport-height,100dvh);max-height:var(--m-viewport-height,100dvh);border:0;border-radius:0;box-sizing:border-box;overflow:hidden;overscroll-behavior:contain}
 body:has(#workspace:not([hidden])) #dialog #edit-form{display:flex;flex-direction:column;height:100%;min-height:0}
 body:has(#workspace:not([hidden])) #dialog .dialog-head{flex:none;padding:16px 18px;border-bottom:1px solid #e3e9f2;background:#fff;gap:10px}
 body:has(#workspace:not([hidden])) #dialog .dialog-head h2{font-size:20px;line-height:1.3}body:has(#workspace:not([hidden])) #dialog .dialog-head button{width:44px;min-height:44px;flex:none}
 body:has(#workspace:not([hidden])) #dialog .form-grid,body:has(#workspace:not([hidden])) #dialog .v1-event-fields{display:grid;grid-template-columns:minmax(0,1fr);align-content:start;gap:18px;padding:20px 18px;flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scroll-padding:20px}
 body:has(#workspace:not([hidden])) #dialog label{font-size:13px;gap:7px;min-width:0}
 body:has(#workspace:not([hidden])) #dialog input,body:has(#workspace:not([hidden])) #dialog select,body:has(#workspace:not([hidden])) #dialog textarea{font-size:16px;min-height:46px;width:100%;min-width:0;padding:11px 12px;border-color:#cbd5e1;border-radius:8px}
 body:has(#workspace:not([hidden])) #dialog .dialog-actions{flex:none;display:flex;gap:12px;padding:12px 18px calc(12px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid #e3e9f2}
 body:has(#workspace:not([hidden])) #dialog .dialog-actions .button{min-height:46px;font-size:14px;padding:11px 14px}body:has(#workspace:not([hidden])) #dialog #save{flex:1}
 body:has(#workspace:not([hidden])) #dialog .button.primary{background:#1451e8;border-color:#1451e8}
 body:has(#workspace:not([hidden])) #dialog .button{min-height:44px}
 body:has(#workspace:not([hidden])) #dialog .v1-choice{grid-template-columns:minmax(0,1fr)}body:has(#workspace:not([hidden])) #dialog .v1-choice button{padding:18px;gap:8px;min-height:110px}
 body:has(#workspace:not([hidden])) #dialog .v1-choice strong{font-size:16px}body:has(#workspace:not([hidden])) #dialog .v1-choice span{font-size:13px}
 body:has(#workspace:not([hidden])) #dialog .company-representative-fields{grid-template-columns:minmax(0,1fr);gap:16px}body:has(#workspace:not([hidden])) #dialog .company-representative-draft{padding:14px}
 body:has(#workspace:not([hidden])) #dialog .company-representative-draft summary{min-height:44px;align-content:center;font-size:14px}
 body:has(#workspace:not([hidden])) #dialog .v1-detail-actions{display:flex;flex-wrap:wrap;gap:12px}body:has(#workspace:not([hidden])) #dialog .v1-detail-actions .button{min-height:44px}
 body:has(#workspace:not([hidden])) #dialog .details-grid{grid-template-columns:1fr;gap:18px;padding:0}body:has(#workspace:not([hidden])) #dialog .detail-pair strong{font-size:15px;overflow-wrap:anywhere}
 body:has(#workspace:not([hidden])) #dialog-error{flex:none;max-height:20vh;overflow:auto;padding:12px 18px;margin:0;background:#fff4f4;font-size:13px;line-height:1.5}body:has(#workspace:not([hidden])) #dialog-error:empty{display:none}
 .m-field-error{color:#b42332;font-size:12px!important;line-height:1.5}body:has(#workspace:not([hidden])) #dialog [aria-invalid=true]{border-color:#b42332}
 body:has(#workspace:not([hidden])) #dialog .guided-results{position:static;max-height:240px;box-shadow:none;margin:0;padding:4px;border-color:#e3e9f2}body:has(#workspace:not([hidden])) #dialog .guided-results li{min-height:48px;padding:10px}
 body:has(#workspace:not([hidden])) #dialog .guided-results strong{font-size:14px}body:has(#workspace:not([hidden])) #dialog .guided-results small{font-size:12px}
 @media(max-width:374px){#workspace .topbar{padding-inline:14px}#workspace main{padding-inline:14px}.m-profile summary>span:nth-child(2){display:none}#workspace .m-heading h1{font-size:25px}#workspace .m-heading>.button{font-size:11px;max-width:150px;padding-inline:10px}.m-type-filters{gap:4px}#workspace .m-type-filters a{font-size:10px;padding-inline:8px}.m-stats .m-icon-disc{width:27px;height:27px}#workspace .m-stats>a{gap:6px;padding-inline:8px}.m-calendar{padding-inline:10px}.m-calendar h2{font-size:15px}}
 @media(prefers-reduced-motion:reduce){#workspace *,body:has(#workspace:not([hidden])) #dialog *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
}
