:root{font:16px/1.45 system-ui,sans-serif;color:#22394b;background:#f2f6f9;--navy:#08243f;--blue:#125584;--green:#276c43;--border:#d9e5ed;--muted:#4d6476}*{box-sizing:border-box}body{margin:0}[hidden]{display:none!important}button,input,select,textarea{font:inherit}button{background:var(--blue);border:1px solid transparent;color:white;border-radius:8px;padding:.68rem .9rem;font-weight:650;cursor:pointer;white-space:nowrap}button:hover{background:var(--navy)}button.minor{color:var(--blue);background:white;border-color:#bcd3e1}button.minor:hover{background:#edf5f9}button.danger{background:#972e3d}button:disabled{opacity:.55;cursor:not-allowed}button:focus-visible,input:focus-visible,select:focus-visible,a:focus-visible,textarea:focus-visible{outline:3px solid #58a4d2;outline-offset:2px}a{color:var(--blue)}p{margin:.45rem 0 1rem;color:var(--muted)}h1,h2,h3{color:var(--navy);margin:0;line-height:1.15}h1{font-size:clamp(1.8rem,4vw,2.65rem);letter-spacing:-.04em}h2{font-size:1.27rem}h3{font-size:1.05rem}header{background:white;border-bottom:1px solid var(--border)}header img{width:144px;height:auto}.shell{max-width:1190px;margin:auto;padding-inline:clamp(1rem,4vw,2rem)}.top,#account,.hero,.section-top,.actions{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap}.top{min-height:72px}.hero{background:var(--navy);padding:clamp(1.2rem,4vw,2.4rem);border-bottom:4px solid #74ba85;border-radius:14px}.hero h1,.hero p{color:white}.hero p{margin-bottom:0;color:#d9e8f3}.hero button{background:var(--green)}main{padding-block:1.6rem 4rem}.panel{padding:clamp(1rem,3vw,1.5rem);background:white;border:1px solid var(--border);border-radius:12px;min-width:0}.login{max-width:460px;margin:2rem auto}.login form{display:grid;gap:1rem}.notice{padding:.7rem 1rem;background:#e7f3ea;border:1px solid #c3dec9;border-radius:8px}.notice.error,.form-error{background:#fff0f1;color:#8a2531}.form-error{border-radius:6px;padding:.55rem}nav{display:flex;gap:.5rem;margin:1.1rem 0;overflow-x:auto}nav button{background:transparent;color:var(--blue)}nav button:hover,nav button[aria-current]{background:#e2eff7;color:var(--navy)}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.8rem;margin-bottom:1rem}.stat{background:white;border:1px solid var(--border);border-radius:10px;padding:.9rem 1rem}.stat strong,.stat span{display:block}.stat strong{font-size:1.55rem;color:var(--navy)}.stat span{color:var(--muted);font-size:.9rem}.filters,.columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem}.filters,.search{margin:.8rem 0}.search{max-width:400px}label{display:grid;gap:.35rem;font-size:.89rem;font-weight:650;color:var(--navy);min-width:0}input,select,textarea{border:1px solid #b9cdd9;border-radius:7px;color:#20374b;background:white;padding:.56rem .6rem;min-width:0;width:100%;font-weight:400}textarea{resize:vertical}.table-wrap{overflow-x:auto}table{width:100%;border-collapse:collapse;text-align:left;font-size:.9rem}th,td{padding:.72rem .55rem;vertical-align:middle;border-bottom:1px solid var(--border)}th{background:#eaf2f8;color:var(--navy);white-space:nowrap}td small{display:block;color:var(--muted)}td button{padding:.38rem .58rem;font-size:.85rem}td:last-child{white-space:nowrap}.actions{justify-content:flex-start;gap:.4rem}.actions button{flex:none}dialog{border:1px solid var(--border);border-radius:14px;padding:1.4rem;width:min(90vw,790px);max-height:92dvh;color:var(--navy)}dialog::backdrop{background:#071b2db5}dialog form{display:grid;gap:.8rem}#delete-dialog{max-width:420px}.detail{margin:.3rem 0}.row{display:grid;grid-template-columns:minmax(0,1fr) 84px 127px auto;gap:.65rem;margin-bottom:.7rem;align-items:end}.checkbox{display:flex;align-items:center;gap:.55rem}.checkbox input{width:1.15rem;height:1.15rem}@media(max-width:650px){.stats{grid-template-columns:repeat(2,minmax(0,1fr))}.filters,.columns{grid-template-columns:1fr}.row{grid-template-columns:1fr 1fr}.row label:first-child{grid-column:1/-1}.top img{width:105px}#identity{display:none}dialog{width:calc(100% - 24px);padding:1rem}}

.badge{padding:.3rem .65rem;border-radius:6px;background:#e7f3ea;color:#205939;font-size:.86rem;font-weight:650}
.history{margin:0;padding-left:1.4rem;max-height:16rem;overflow:auto}
.history li{padding:.5rem .3rem;border-bottom:1px solid var(--border)}
.history li strong,.history li span{display:block}
.history li p{margin:.2rem 0;color:var(--muted);white-space:pre-wrap;overflow-wrap:anywhere}

.row{grid-template-columns:minmax(0,1fr) 76px 112px minmax(114px,auto) auto}
.unit-preview{font-size:.83rem;display:grid;gap:.15rem;align-self:center;color:var(--navy);font-weight:650}
.unit-preview output{font-variant-numeric:tabular-nums;font-size:.94rem}
@media(max-width:650px){.row{grid-template-columns:1fr 1fr}}

.toast{position:fixed;z-index:10;right:clamp(.75rem,4vw,2rem);bottom:max(1rem,env(safe-area-inset-bottom));margin:0;width:max-content;max-width:min(28rem,calc(100vw - 1.5rem));border-radius:10px;box-shadow:0 10px 26px #08243f24;pointer-events:none}

.table-wrap tbody tr[data-tone="approved"]{background:#e8f4eb}
.table-wrap tbody tr[data-tone="closed"]{background:#fcecef}
.table-wrap tbody tr[data-tone="completed"]{background:#edf0f3}
.table-wrap tbody tr[data-tone="approved"] td:first-child{box-shadow:inset 4px 0 #2f7950}
.table-wrap tbody tr[data-tone="closed"] td:first-child{box-shadow:inset 4px 0 #aa3546}
.table-wrap tbody tr[data-tone="completed"] td:first-child{box-shadow:inset 4px 0 #657687}
.table-wrap td .pending-amount{display:block}
.pending-amount,.stat .pending-amount{color:#9d2033;font-weight:750}
.badge.pending-amount{background:#fcecef}

/* Presentación del panel y adaptación a pantallas táctiles. */
:root{
  --navy:#08264a;--blue:#0759a3;--green:#238039;--border:#d9e5ef;
  background:#f2f6fb;color:#18334e;
}
body{min-height:100dvh}
.shell{
  padding-left:max(clamp(1rem,4vw,2rem),env(safe-area-inset-left));
  padding-right:max(clamp(1rem,4vw,2rem),env(safe-area-inset-right));
}
header{
  background:linear-gradient(110deg,#08264a,#0c345d);
  border-bottom:1px solid #18466f;color:white;padding-top:env(safe-area-inset-top);
}
.top{min-height:76px}
.brand{display:flex;flex-direction:column;align-items:center;gap:0}
.brand img{width:144px;height:48px;object-fit:contain}
.brand span{margin-top:-.23rem;padding-bottom:.35rem;color:#e2f1ff;font-size:.77rem;font-weight:700;letter-spacing:.025em}
#account{justify-content:flex-end;gap:.55rem;min-width:0}
#identity{max-width:17rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:650}
header .minor{border-color:#567da5;background:#153d65;color:white;padding:.48rem .7rem}
header .minor:hover{background:#24517a}
main{padding-block:1.35rem 3rem}
#workspace{display:flex;flex-direction:column;gap:1rem}
nav{
  order:-1;margin:0;gap:.35rem;align-items:stretch;
  padding:.4rem;background:#092c52;border-radius:12px;box-shadow:0 4px 14px #08264a1a;
}
nav button{display:flex;gap:.45rem;align-items:center;border-radius:8px;color:#edf7ff;padding:.55rem .84rem;font-size:.91rem}
nav button:hover,nav button[aria-current]{background:#085da9;color:#fff}
nav button:focus-visible{outline-color:#b2e2ff;outline-offset:-2px}
.nav-icon{display:inline-grid;place-items:center;font-size:1.1rem;line-height:1;min-width:1.18rem}
.hero{
  position:relative;overflow:hidden;isolation:isolate;
  min-height:164px;align-items:center;border:1px solid #d1e3ee;border-bottom:4px solid #359650;
  background:linear-gradient(94deg,#f5faff 23%,#e5f2fce8 47%,#0c335b30 74%),url('./assets/oficinas.jpg') right center / 59% auto no-repeat,#e8f3fe;
  box-shadow:0 5px 13px #112c4711;
}
.hero h1{color:#09284c}.hero p{color:#2a4b68}
.hero h1{border-left:4px solid #0c4b81;padding-left:.8rem}
.hero p{padding-left:1.02rem}
.hero button,#new-client,#new-user{background:#227837;color:white}
.hero button:hover,#new-client:hover,#new-user:hover{background:#18592a}
.panel,dialog{border-color:#d5e3ef;box-shadow:0 4px 15px #1538580e}
.login{border-top:4px solid #0b4f8a;box-shadow:0 10px 24px #11345112}
.stat{border-left:4px solid #145d9f;box-shadow:0 3px 10px #19436612}
.stat:nth-child(2){border-left-color:#48748d}
.stat:nth-child(3){border-left-color:#197bb3}
.stat:nth-child(4){border-left-color:#328648}
.stat strong{font-variant-numeric:tabular-nums}
.table-wrap{border:1px solid #dbe7f1;border-radius:10px;background:#fff}
th{background:#edf5fb;color:#0a3156;font-weight:700}
th,td{padding:.73rem .62rem}
tbody tr:nth-child(even):not([data-tone]){background:#f7fafc}
tbody tr:last-child td{border-bottom:0}
.cell-content{min-width:0;overflow-wrap:anywhere}
.mobile-cell-label{display:none}
.filters>label,.search{font-size:.86rem}
input,select,textarea{font-size:1rem}
.toast{bottom:max(1rem,env(safe-area-inset-bottom))}
@media(max-width:800px){
  .top{min-height:65px;gap:.35rem}
  .brand img{width:113px;height:38px}
  .brand span{font-size:.68rem}
  header .minor{font-size:.77rem;padding:.38rem .48rem;min-height:36px}
  #workspace{padding-bottom:calc(4.6rem + env(safe-area-inset-bottom))}
  nav{
    position:fixed;z-index:8;inset:auto 0 0;justify-content:space-around;gap:.25rem;
    padding:.38rem max(.4rem,env(safe-area-inset-right)) calc(.38rem + env(safe-area-inset-bottom)) max(.4rem,env(safe-area-inset-left));
    border-radius:0;border-top:1px solid #c9dceb;background:#f8fbff;box-shadow:0 -5px 20px #09284b1a;
  }
  nav button{flex:1 1 0;flex-direction:column;justify-content:center;gap:.2rem;padding:.45rem .21rem;min-width:0;min-height:50px;color:#153a60;font-size:.69rem;white-space:normal;line-height:1.15}
  nav button[aria-current],nav button:hover{background:#0a3b69;color:#fff}
  nav button:focus-visible{outline-offset:-2px}
  .nav-icon{font-size:1.2rem}
  body:has(#workspace:not([hidden])) .toast{bottom:calc(4.45rem + env(safe-area-inset-bottom))}
  .hero{min-height:156px;background-size:auto,cover,auto;background-position:center,center,center;gap:.9rem}
  .hero{background-image:linear-gradient(94deg,#f5faff 9%,#edf6ffed 54%,#dbeaf89e),url('./assets/oficinas.jpg')}
  .hero button{align-self:start}
  .stats{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:700px){
  .table-wrap{border:0;background:transparent;border-radius:0;overflow:visible}
  table{display:block;background:none}
  thead{position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden;white-space:nowrap}
  tbody{display:grid;gap:.62rem}
  tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.58rem .7rem;padding:.72rem;
    border:1px solid #d6e4ef;border-radius:10px;background:white;box-shadow:0 2px 6px #1a426910}
  tbody tr td{display:block;padding:0;border:0;min-width:0;white-space:normal!important}
  tbody tr td:first-child{grid-column:1/-1;padding-bottom:.43rem;border-bottom:1px solid #cddce7;font-size:1rem;font-weight:650}
  .table-wrap tbody tr[data-tone] td:first-child{box-shadow:none}
  tbody tr td:last-child,.empty-row{grid-column:1/-1}
  tbody tr td:last-child .mobile-cell-label{display:none}
  .mobile-cell-label{display:block;color:#4b637a;font-size:.75rem;font-weight:650;margin-bottom:.12rem}
  #quote-list td:nth-child(2){grid-column:1/-1}
  td .actions button,td>div>button{min-height:42px}
}
@media(max-width:380px){
  .top{padding-block:.35rem}
  #account{gap:.26rem}
  header .minor{font-size:.72rem;padding:.35rem}
  .hero h1{font-size:1.65rem}
  nav button{font-size:.63rem}
}

/* Navegación integrada y panel de control. */
:root{background:#f4f7fb;--navy:#09264b;--blue:#075aa5;--green:#217b31;--border:#d7e3ee}
header{background:linear-gradient(110deg,#08264a 0%,#0b335d 70%,#08264a);border-bottom:0;box-shadow:0 3px 12px #0b29472a}
header .shell{max-width:1320px;display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:1.2rem;min-height:76px}
header .brand{padding:0;min-width:132px;gap:0}
header .brand img{height:43px;width:155px}
header .brand span{font-size:.75rem;padding-bottom:.35rem}
#app-nav{display:flex;position:static;order:0;justify-content:center;align-items:center;gap:.35rem;margin:0;padding:0;background:transparent;border:0;box-shadow:none;min-width:0;overflow:visible}
#app-nav button{padding:.55rem .7rem;font-size:.88rem;min-height:38px;gap:.35rem;white-space:nowrap}
#app-nav button[aria-current]{background:linear-gradient(#0872c3,#095691);box-shadow:0 2px 7px #001a3f60}
#account{grid-column:3;justify-content:flex-end;gap:.45rem}
#identity{max-width:12rem;font-size:.82rem}
header .minor{background:#133d66;border-color:#446990;border-radius:7px;font-size:.8rem}
main.shell{max-width:1320px}
.hero{
  align-items:center;gap:1rem;border-radius:11px;min-height:158px;
  background:linear-gradient(100deg,#eff7ff 0%,#f0f8ff 31%,#f0f8ffdb 45%,#0c3f7b28 72%),url('./assets/banner-matisa.jpg') right 46% / 74% auto no-repeat,#eef8ff;
}
.hero-copy{min-width:0}
.hero h1{font-size:clamp(1.65rem,4vw,2.6rem);font-weight:780}
.hero-tools{display:flex;align-items:center;flex-wrap:wrap;gap:.85rem;max-width:100%}
.calendar-tile{background:#f7fbff;color:#102f51;border:1px solid #d9e8f4;border-radius:9px;padding:.45rem .7rem;display:grid;min-width:99px;text-align:center;box-shadow:0 3px 8px #06244524;line-height:1.15}
.calendar-tile span{font-size:.74rem;text-transform:capitalize}
.calendar-tile strong{font-size:1.7rem}
body:not([data-view="quotes"]) .calendar-tile{display:none}
body:not([data-view="quotes"]) .hero{background:#fff;min-height:108px;border-bottom:1px solid #d1e3ee}
#new-quote,#new-client,#new-user{background:linear-gradient(#27913a,#19732c);box-shadow:0 3px 7px #195b2924;border-radius:8px}
#stats{gap:.78rem;margin-bottom:.8rem}
.dashboard-stat{display:flex;align-items:center;gap:.72rem;min-height:95px;padding:.75rem .8rem;background:linear-gradient(145deg,#fff,#f8fbfe);box-shadow:0 3px 9px #14385619}
.dashboard-stat strong{font-size:clamp(1.13rem,2.05vw,1.75rem);line-height:1.15;overflow-wrap:anywhere}
.dashboard-stat span:not(.record-icon){font-weight:700;color:#162f52}
.dashboard-stat:nth-child(2){border-left-color:#2e893d}
.dashboard-stat:nth-child(3){border-left-color:#718496}
.dashboard-stat:nth-child(4){border-left-color:#1a76bc}
.record-icon{flex:none;width:2.55rem;height:2.55rem;display:inline-grid;place-items:center;border-radius:50%;background:#e0f0fc;color:#075ba4;font-size:1.3rem;font-weight:750}
.dashboard-stat:nth-child(2) .record-icon{background:#e1f4e2;color:#237e32}
.dashboard-stat:nth-child(3) .record-icon{background:#e9edf1;color:#4e657a}
.status-pill{display:inline-block;max-width:100%;padding:.18rem .55rem;border-radius:100px;background:#e8edf3;color:#42566f;font-size:.77rem;font-weight:750;white-space:normal}
.status-pill[data-tone="approved"]{background:#d6efd8;color:#185f25}
.status-pill[data-tone="closed"]{background:#f6d9de;color:#842839}
.status-pill[data-tone="completed"]{background:#dfe6ec;color:#324b62}
.status-pill[data-tone="sent"]{background:#d7eaff;color:#0b538f}
.records-layout{display:grid;grid-template-columns:minmax(0,2.4fr) minmax(204px,.83fr);gap:1rem;align-items:start}
.company-layout{display:grid;gap:1rem;min-width:0}
.company-layout .filters{grid-template-columns:minmax(0,1fr) minmax(0,1.35fr);margin-bottom:0}
.company-layout #company-heading{margin-bottom:.8rem}
.info-side{background:linear-gradient(160deg,#fff,#f8fbff)}
.role-list{margin:.6rem 0 0}
.role-list dt{border-top:1px solid #e0ebf3;padding:.48rem 0 .12rem;color:#0d3761;font-weight:750}
.role-list dd{padding:0 0 .55rem;color:#38516c;overflow-wrap:anywhere}
.avatar-name{display:flex;align-items:center;gap:.45rem}
.avatar-name .record-icon{width:2rem;height:2rem;font-size:.75rem}
.client-name{font-weight:750;color:#0b315b}
#demo-note{background:#f1f7fd;border-color:#d3e6f6;color:#244a6a;font-size:.84rem;padding:.52rem .7rem}
@media(max-width:1070px){
  header .shell{grid-template-columns:auto minmax(0,1fr);gap:.5rem;padding-block:.35rem}
  #account{grid-column:2}
  #app-nav{
    position:fixed;z-index:8;inset:auto 0 0;justify-content:space-around;gap:.25rem;
    padding:.38rem max(.4rem,env(safe-area-inset-right)) calc(.38rem + env(safe-area-inset-bottom)) max(.4rem,env(safe-area-inset-left));
    background:#fbfdff;border-top:1px solid #cedfeb;box-shadow:0 -4px 14px #0d2d4c1a;
  }
  #app-nav button{flex:1 1 0;flex-direction:column;gap:.16rem;white-space:normal;min-height:49px;color:#153a60;font-size:.73rem;padding:.38rem .22rem;justify-content:center}
  #app-nav button[aria-current]{color:#fff;background:linear-gradient(#0b477d,#073159)}
  #workspace{padding-bottom:calc(4.6rem + env(safe-area-inset-bottom))}
  body:has(#workspace:not([hidden])) .toast{bottom:calc(4.55rem + env(safe-area-inset-bottom))}
}
@media(max-width:820px){
  .records-layout{grid-template-columns:minmax(0,1fr)}
  .company-layout .filters{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:700px){
  main.shell{padding-top:.82rem}
  header .brand{min-width:104px}
  header .brand img{width:114px;height:36px}
  #identity{display:none}
  header .minor{font-size:.71rem;padding:.43rem .44rem}
  .hero{padding:1rem;min-height:147px;gap:.65rem}
  body[data-view="quotes"] .hero{
    background-image:linear-gradient(100deg,#f0f8ff 0%,#f0f8fff0 42%,#eff7ff70 82%),url('./assets/banner-matisa.jpg');
    background-size:auto,cover;background-position:center,center;
  }
  .hero-copy h1{font-size:clamp(1.5rem,6vw,2rem)}
  .hero-copy p{font-size:.84rem}
  .hero-tools{justify-content:flex-start;flex:1 1 100%}
  .calendar-tile{display:none}
  .dashboard-stat{min-height:80px;gap:.44rem;padding:.65rem .51rem}
  .dashboard-stat strong{font-size:clamp(1rem,4.9vw,1.4rem)}
  .dashboard-stat span:not(.record-icon){font-size:.74rem}
  .dashboard-stat .record-icon{width:1.9rem;height:1.9rem;font-size:.97rem}
  .company-layout .filters{grid-template-columns:1fr}
  .view .panel{padding:.92rem}
  .info-side{order:0}
}

.dashboard-stat .record-icon{display:grid;place-items:center;width:3.25rem;height:3.25rem}
.dashboard-stat .record-icon svg{width:1.9rem;height:1.9rem;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
.payment-correction{display:grid;gap:.75rem;background:#f0f6fc;border:1px solid var(--border);border-radius:12px;padding:1rem}
.payment-correction button,#correct-payment{justify-self:start;white-space:normal}
@media(max-width:700px){
  .dashboard-stat .record-icon{width:2.45rem;height:2.45rem}
  .dashboard-stat .record-icon svg{width:1.48rem;height:1.48rem}
}


.manage-summary,.manage-section{min-width:0;border:1px solid var(--border);border-radius:12px;padding:1rem}
.manage-summary{background:#f0f6fc}
.manage-summary p{margin:0 0 .35rem}
.manage-summary p:last-child,.manage-section .form-error{margin-bottom:0}
.manage-section{display:grid;gap:.8rem;background:white}
.manage-section button,.manage-delete button{white-space:normal}
.manage-delete{justify-self:end}
.manage-delete:has(button[hidden]){display:none}

#company-contact{min-width:0;border:1px solid var(--border);border-radius:10px;padding:.75rem}
#company-contact legend{padding:0 .3rem;color:var(--navy);font-size:.89rem;font-weight:650}


#login-panel{
  display:grid;grid-template-columns:minmax(0,1.18fr) minmax(0,1fr);
  max-width:960px;margin:clamp(1rem,5vw,4rem) auto 0;padding:0;
  overflow:hidden;border:1px solid var(--border);border-radius:20px;
  box-shadow:0 18px 45px #102a5422;
}
.login-hero{
  display:flex;align-items:flex-end;min-height:460px;padding:clamp(1.5rem,4vw,3rem);
  border-bottom:5px solid #08a55d;
  background:linear-gradient(0deg,#12183ef5 3%,#12183e58 67%,#163e6b22),
             url('./assets/banner-matisa.jpg') 65% center / cover no-repeat,#141d46;
}
.login-hero h1{color:white;font-size:clamp(2.15rem,4.6vw,3.5rem);line-height:1.04}
.login-access{align-self:center;padding:clamp(1.5rem,4vw,3.2rem);min-width:0}
.login-access h2{font-size:clamp(1.65rem,3vw,2.2rem);letter-spacing:-.035em}
.login-access p{margin:.5rem 0 1.7rem}
#login label{gap:.5rem}
#login input,#login button{min-height:48px}
#login input{background:#f6f9fd}
#login button{margin-top:.35rem;background:#087b31}
#login button:hover:not(:disabled){background:#086226}
@media(max-width:700px){
  #login-panel{grid-template-columns:1fr;max-width:470px;border-radius:15px}
  .login-hero{min-height:190px;background-position:65% 45%}
  .login-access p{margin-bottom:1.2rem}
}

@media(prefers-reduced-motion:no-preference){
  #login-panel:not([hidden]),#workspace:not([hidden])>.hero{
    animation:screen-enter 360ms ease-out both;
  }
  #login-panel:not([hidden]) .login-access{
    animation:screen-enter 350ms 85ms ease-out both;
  }
  .view:not([hidden]),#company-contact:not([hidden]),#payment-correction:not([hidden]){
    animation:screen-enter 240ms ease-out both;
  }
  #stats .dashboard-stat{animation:screen-enter 280ms ease-out both}
  #stats .dashboard-stat:nth-child(2){animation-delay:35ms}
  #stats .dashboard-stat:nth-child(3){animation-delay:70ms}
  #stats .dashboard-stat:nth-child(4){animation-delay:105ms}
  dialog[open]{animation:dialog-enter 200ms ease-out both}
  dialog[open]::backdrop{animation:fade-in 200ms ease-out both}
  .toast:not([hidden]){animation:screen-enter 180ms ease-out both}
  button{transition:background-color 150ms,color 150ms,border-color 150ms,box-shadow 150ms}
  input,select,textarea{transition:background-color 150ms,border-color 150ms}
}
@keyframes screen-enter{
  from{opacity:0;transform:translateY(7px)}
  to{opacity:1;transform:translateY(0)}
}
@keyframes dialog-enter{
  from{opacity:0;transform:translateY(6px) scale(.99)}
  to{opacity:1;transform:translateY(0) scale(1)}
}
@keyframes fade-in{from{opacity:0}to{opacity:1}}

@media(prefers-reduced-motion:no-preference){
  header .brand img{animation:brand-enter 540ms ease-out both}
  header .brand span{animation:fade-in 320ms 140ms ease-out both}
  .login-hero{position:relative;isolation:isolate;overflow:hidden}
  .login-hero::before{
    content:"";position:absolute;inset:0;z-index:-1;background:inherit;
    animation:photo-settle 1500ms ease-out both;
  }
  .login-hero h1{animation:screen-enter 540ms 150ms ease-out both}
  #login label:first-child{animation:screen-enter 360ms 160ms ease-out both}
  #login label:nth-child(2){animation:screen-enter 360ms 220ms ease-out both}
  #login button{animation:screen-enter 360ms 280ms ease-out both}
  #app-nav button[aria-current] .nav-icon{animation:icon-pop 260ms ease-out both}
  #workspace .hero-copy{animation:screen-enter 350ms ease-out both}
  .table-wrap tbody tr:nth-child(-n+5){animation:row-enter 230ms ease-out both}
  .table-wrap tbody tr:nth-child(2){animation-delay:25ms}
  .table-wrap tbody tr:nth-child(3){animation-delay:50ms}
  .table-wrap tbody tr:nth-child(4){animation-delay:75ms}
  .table-wrap tbody tr:nth-child(5){animation-delay:100ms}
  .history li:first-child,.form-error:not([hidden]){
    animation:screen-enter 210ms ease-out both;
  }
  button{transition:background-color 150ms,color 150ms,border-color 150ms,box-shadow 150ms,scale 120ms ease-out}
  button:active:not(:disabled){scale:.98}
  input,select,textarea{
    transition:background-color 150ms,border-color 150ms,box-shadow 180ms ease-out;
  }
  input:focus,select:focus,textarea:focus{box-shadow:0 0 0 4px #145d9f20}
}
@media(prefers-reduced-motion:no-preference) and (hover:hover) and (pointer:fine){
  .dashboard-stat{transition:box-shadow 200ms ease-out,translate 200ms ease-out}
  .dashboard-stat:hover{translate:0 -3px;box-shadow:0 8px 18px #102a5426}
  .table-wrap tbody td{transition:box-shadow 160ms ease-out}
  .table-wrap tbody tr:hover td{box-shadow:inset 0 0 0 999px #1873b40b}
}
@keyframes brand-enter{
  from{opacity:0;transform:translateY(-6px) scale(.93)}
  to{opacity:1;transform:translateY(0) scale(1)}
}
@keyframes photo-settle{from{transform:scale(1.075)}to{transform:scale(1)}}
@keyframes icon-pop{from{transform:scale(.85)}to{transform:scale(1)}}
@keyframes row-enter{from{opacity:0;transform:translateY(3px)}to{opacity:1;transform:translateY(0)}}
