@font-face {
  font-family: Suite;
  src: url(./assets/Regular.woff);
}
@font-face {
  font-family: Suite;
  src: url(./assets/Semibold.woff);
  font-weight: 600 900;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -1px;
}
.brand svg {
  width: 30px;
  height: 30px;
}
.suite {
  color: #b8c6e4;
  font-size: 10px;
  letter-spacing: 0.13em;
  font-weight: 600;
}
.home {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  height: 100dvh;
}
.sidebar {
  background: var(--nav);
  color: var(--navtext);
  padding: 28px 15px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sidebar .brand {
  margin: 1px 10px 0;
  color: white;
}
.sidebar .suite {
  margin: 0 10px 34px;
}
.sidebar button {
  justify-content: flex-start;
  color: inherit;
  text-align: left;
  min-height: 40px;
  padding: 9px 13px;
}
.sidebar button:hover,
.sidebar button.active {
  background: #344363;
  color: white;
}
.navlabel {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #b1bfd9;
  padding: 12px;
}
.push {
  flex: 1;
}
.homeMain {
  min-width: 0;
  overflow: auto;
}
.homebar,
.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.homebar {
  height: 60px;
  padding: 0 clamp(20px, 4vw, 64px);
  color: var(--muted);
  font-size: 13px;
}
.local {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
}
.local svg {
  color: var(--accent);
}
.homeContent {
  max-width: 1400px;
  margin: auto;
  padding: 34px clamp(20px, 4vw, 64px) 45px;
}
.sectionTitle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 28px 0 14px;
}
.homeIntro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.homeIntro button {
  padding: 9px 16px;
}
.hero {
  position: relative;
  overflow: hidden;
  min-height: 152px;
  border: 1px solid #cbd2ef;
  border-radius: 10px;
  background: linear-gradient(105deg, #edf0ff 0%, #e5eafa 56%, #d8e0f6);
  padding: 24px 30px;
  color: #24355e;
  display: flex;
  align-items: center;
}
.hero h2 {
  font-size: 26px;
  margin: 3px 0 12px;
  letter-spacing: -0.9px;
}
.hero button {
  padding: 8px 14px;
}
.heroArt {
  position: absolute;
  pointer-events: none;
  right: 2%;
  top: 0;
  height: 100%;
  width: 46%;
}
.hero small {
  color: #505f88;
  font-weight: 600;
}
.templates {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.template {
  display: block;
  overflow: hidden;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  background: var(--paper);
  min-width: 0;
}
.template:hover {
  border-color: var(--accent);
  background: var(--paper);
}
.preview {
  height: 88px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  background: var(--pale);
  padding-top: 14px;
}
.miniSheet {
  transform: rotate(-4deg) translateY(7px);
  width: 74%;
  height: 76px;
  background: white;
  color: #26334b;
  padding: 7px 8px;
  border-radius: 3px 3px 0 0;
  box-shadow: 0 2px 9px #2836562a;
}
.miniTitle {
  height: 5px;
  width: 50%;
  background: var(--tone);
  margin-bottom: 5px;
}
.miniGrid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 1px;
  background: #dddfe7;
}
.miniGrid i {
  height: 6px;
  background: #fff;
}
.miniGrid i:nth-child(-n + 4) {
  background: var(--tone);
}
.miniGrid i:nth-child(8n + 1) {
  background: var(--pale);
}
.template b {
  display: block;
  padding: 12px;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fileList {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 8px;
  overflow: hidden;
}
.fileHead,
.fileRow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px 64px;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
}
.fileHead {
  background: var(--soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}
.fileRow + .fileRow {
  border-top: 1px solid var(--line);
}
.fileRow button:first-child {
  justify-content: flex-start;
  overflow: hidden;
  text-overflow: ellipsis;
}
.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 94px;
  padding: 18px;
  color: var(--muted);
}
.empty .icon {
  width: 28px;
  height: 28px;
}
.empty b {
  display: block;
  color: var(--ink);
  font-size: 14px;
}
.empty p {
  font-size: 12px;
  margin-top: 4px;
}
/* Referência de tokens; integrar à folha existente, não carregar cegamente.
   DTex usa body.dark; DSpre e DPres usam :root[data-dark]. */
:root {
  --brand-base: #082754;
  --brand-primary: #0758B5;
  --brand-primary-hover: #034889;
  --brand-accent-light: #0758B5;
  --brand-accent-dark: #70C5FF;
  --brand-tint-light: #DFEEFF;
  --brand-tint-dark: #23446A;
  --brand-nav: #112943;
  --brand-navtext: #D4E9FF;
  --brand-hero-start: #EDF6FF;
  --brand-hero-end: #D3E6FD;
  --document-bg: #ffffff;
  --document-ink: #202124;
  --document-grid: #d5d9df;
}

:root{--accent:var(--brand-accent-light);--tint:var(--brand-tint-light);--nav:var(--brand-nav);--navtext:var(--brand-navtext)}
:root[data-dark]{--accent:var(--brand-accent-dark);--tint:var(--brand-tint-dark)}
.brand img{width:30px;height:30px;object-fit:contain;flex:none}.topbar .brand img{width:23px;height:23px}
.primary{background:var(--brand-primary);color:white}.primary:hover{background:var(--brand-primary-hover);color:white}
.sidebar .suite,.sidebar button{color:var(--brand-navtext)}
.hero{background:linear-gradient(105deg,var(--brand-hero-start),var(--brand-hero-end));border-color:var(--brand-tint-dark);color:var(--brand-base)}
.hero small{color:var(--brand-base)}
:root[data-dark] .hero{background:linear-gradient(105deg,var(--brand-nav),var(--brand-tint-dark));color:var(--brand-navtext)}
:root[data-dark] .hero small{color:var(--brand-navtext)}
:focus-visible{outline-color:var(--accent)}
body{--bg:#f6f7fb;--surface:#fff;--ink:#202a40;--muted:#606d82;--edge:#dce1ec;--accent:var(--brand-accent-light);--sel:var(--brand-tint-light);--paper:var(--surface);--line:var(--edge);--soft:#f0f2f8;font:14px Suite,Arial,sans-serif}
body.dark{--bg:#151b26;--surface:#202837;--ink:#e9edf6;--muted:#b3bfd0;--edge:#3a465b;--soft:#2b3446;--accent:var(--brand-accent-dark);--sel:var(--brand-tint-dark)}
#central{position:fixed;inset:0;z-index:8;background:var(--bg)}#central[hidden],#ribbon[hidden],#ruler[hidden]{display:none}
#central button{display:inline-flex;align-items:center;gap:8px;border-radius:6px}
#central .sidebar button{background:transparent;color:var(--brand-navtext);border:0}
#central .sidebar button:hover,#central .sidebar button.active{background:var(--brand-tint-dark);color:white}
#central .sidebar{overflow:auto}#central .homeIntro h1{margin:0;font-size:28px}#central .sectionTitle{font-size:18px}
#central .template{display:block;padding:0;--pale:#dfebf8;--tone:#326491}#central .template:nth-child(2n){--pale:#e9e7f1;--tone:#6c6380}
#central .miniSheet .miniTitle,#central .miniSheet i{display:block}#central .miniSheet i{background:#dde1e9;height:3px;margin:6px 0}
#central .fileList{padding:12px 16px}#central .recent button,#central .continue{border-color:transparent;background:transparent}
#central .continue{margin-top:12px;color:var(--accent)}#central .hero button{background:var(--brand-primary);color:white;border:0}
body.dark #central .hero{color:var(--brand-navtext);background:linear-gradient(105deg,var(--brand-nav),var(--brand-tint-dark))}body.dark #central .hero small{color:inherit}
#top{height:46px;background:var(--surface);color:var(--ink);border-bottom:1px solid var(--edge);gap:4px}#top button,#top input{color:inherit}#top button:hover,#top input:focus{background:var(--soft)}#top .brand{font:700 20px Suite,Arial,sans-serif;letter-spacing:-.7px;gap:6px}#top .brand img{width:23px;height:23px}#top button{display:inline-flex;align-items:center;justify-content:center}
#tabs{height:34px}#ribbon{height:64px;padding:3px 8px;gap:8px}#ribbon .toolGroup{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:52px;border-right:1px solid var(--edge);padding:0 8px 0 0}#ribbon .toolGroup>div{display:flex;align-items:center;gap:4px}#ribbon .toolGroup small{font-size:10px;color:var(--muted)}#rail{width:42px;background:var(--soft)}#status{height:28px;min-height:28px}aside h2,dialog h2{font:600 18px Suite,Arial,sans-serif}button:focus-visible,input:focus-visible,select:focus-visible{outline-color:var(--accent)}
@media(max-width:760px){#central{grid-template-columns:52px minmax(0,1fr)}#central .sidebar{padding:14px 4px;align-items:center}#central .sidebar :is(.suite,.brand span,button span){display:none}#central .sidebar .brand{margin:0 0 16px}#central .sidebar button{padding:8px}#central .homeContent{padding:20px 16px}#central .homebar{padding:0 14px;height:45px}#central .templates{display:flex;overflow:auto}#central .template{flex:0 0 132px}#central .hero{min-height:128px;padding:16px}#central .heroArt{width:35%;right:-5%}#central .homeIntro h1{font-size:21px}#central .local span,#central .homeIntro button span{display:none}#top #new{display:none}#top .brand{font-size:16px}#top .brand img{width:20px}#ribbon{height:58px}}
@media(max-height:500px){#central .sidebar{padding-top:8px;padding-bottom:8px;gap:2px}#central .sidebar .suite{margin-bottom:6px}#central .sidebar button{min-height:32px}#top{height:36px}}
@media print{#central{display:none!important}}
/* R1.1.1 — shared suite workspace, isolated from document styling. */
#top{height:45px;padding:0 12px;gap:6px}#top .divider{background:var(--edge)}#top #homeIcon{padding:6px;min-width:32px}#top .brand{padding:4px 2px;gap:9px}
#tabs{padding:0 8px;gap:4px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none}#tabs button{height:34px;padding:0 12px;font-size:12px;flex:none}#tabs .ribbonToggle{margin-left:auto;position:sticky;right:0;background:var(--surface)}
#ribbon .toolGroup{padding:0 12px;gap:3px;flex:none}#ribbon .toolGroup>div{gap:4px}#ribbon .iconBtn,#left .iconBtn,#right .iconBtn{display:inline-flex;align-items:center;justify-content:center;width:30px;min-width:30px;height:30px;padding:5px;border:1px solid transparent;background:transparent;border-radius:4px;flex:none;margin:0;color:var(--ink)}
#ribbon .iconBtn:hover,#left .iconBtn:hover,#right .iconBtn:hover,#ribbon .iconBtn[aria-pressed=true],#right .iconBtn[aria-pressed=true]{color:var(--accent);background:var(--sel)}
#ribbon label.control{gap:4px}#ribbon select,#ribbon input:not([type=color]){padding:4px 7px}#ribbon input[type=number]{width:48px}#ribbon input[type=color]{width:22px;height:24px}
#rail{background:var(--surface);padding:7px 3px;gap:4px}#rail button{width:34px;height:34px;display:grid;place-items:center;padding:5px}
#left,#right{padding:12px;scrollbar-width:thin}#left .panelHeader,#right .panelHeader{display:flex;align-items:center;justify-content:space-between;gap:6px;margin-bottom:12px}#left .panelHeader h2,#right .panelHeader h2{font-size:14px;margin:0}#left .panelHeader .iconBtn,#right .panelHeader .iconBtn{width:25px;min-width:25px;height:25px}
#left label.control,#right label.control{display:flex;align-items:center;justify-content:space-between;gap:7px;margin:5px 0;min-width:0}#right label.control select{min-width:0;max-width:65%}#right .propertySection{border-bottom:1px solid var(--edge);padding:9px 0}#right summary{font-size:13px;font-weight:600;cursor:pointer;color:var(--ink)}#right .propertyControls{display:flex;flex-direction:column;gap:3px;padding-top:8px}#right .propertyControls>button:not(.iconBtn){justify-content:flex-start;margin:2px 0;text-align:left;font-size:12px}#right .propertyIcons{display:flex;align-items:center;gap:5px;flex-wrap:wrap}#right .propertyIcons .iconBtn{flex:0 0 30px}#right .propertyControls input[type=number]{width:64px}
#desk{background:var(--soft)}#status{background:var(--soft)}#central .fileList{padding:0}#central .fileList>small{display:block;padding:16px}#central .fileRow{min-height:51px}#central .fileRow button{border-color:transparent;background:transparent;min-width:0}#central .fileActions{display:flex;justify-content:flex-end;gap:3px}#central .fileActions .iconBtn{padding:5px}#central .fileActions [aria-pressed=true]{color:var(--accent)}#central .fileRow time{color:var(--ink);font-size:13px}
@media(max-width:760px){#top{gap:2px;padding:0 4px}#top #homeIcon{min-width:25px;padding:3px}#top .brand{gap:3px}#central .fileRow,#central .fileHead{grid-template-columns:minmax(0,1fr) 64px}#central .fileRow time,#central .fileHead span:nth-child(2){display:none}}
@media(max-width:700px){main:has(>#left:not([hidden])):has(>#right:not([hidden]))>#left{bottom:48%;max-width:85vw}#right .control{width:100%;margin:5px 0}#top #state{display:none}#right .propertyIcons{gap:8px}}
@media(max-height:500px){#top{height:36px}#ribbon{height:52px}#ribbon .toolGroup{min-height:42px}}

#central .fileRow.recent{display:grid;flex-wrap:initial;margin:0;gap:8px}#central .fileCount{font-size:13px;font-weight:400;color:var(--muted)}#central .fileRow>button:first-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#central .fileRow>button:first-child svg{flex:none}

/* Screen furniture stays at interface size while only the sheet zooms. */
#measureFrame,.previewMeasures {
  --rule-size:30px;
  --rule-face:#f1f4f7;
  --rule-margin:#d9e2eb;
  --rule-ink:#344960;
  --rule-line:#a8b7c6;
  width:max-content;
  margin-inline:auto;
}
#measureFrame.measuring,.previewMeasures {
  display:grid;
  grid-template-columns:var(--rule-size) auto;
  grid-template-rows:var(--rule-size) auto;
}
#measureFrame:not(.measuring) > :not(.measurePage){display:none}
#measureFrame #sheet{margin:0}
.measureCorner,.measureAxis{direction:ltr;user-select:none;color:var(--rule-ink);font-family:Suite,Arial,sans-serif}
.measureCorner {
  grid-area:1/1;position:sticky;top:0;left:0;z-index:4;
  display:grid;place-items:center;background:#e1e8ef;
  font-size:10px;font-weight:600;box-shadow:inset -1px -1px var(--rule-line);
}
#ruler,.measureAxis {
  grid-area:1/2;position:sticky;top:0;z-index:2;overflow:hidden;
  height:var(--rule-size);margin:0;border:0;
  background:linear-gradient(to right,var(--rule-margin) var(--margin),var(--rule-face) var(--margin),var(--rule-face) calc(100% - var(--margin)),var(--rule-margin) calc(100% - var(--margin)));
  box-shadow:inset 0 -1px var(--rule-line);
}
.measureAxis.vertical {
  grid-area:2/1;top:auto;left:0;height:auto;width:var(--rule-size);min-height:0;
  background:linear-gradient(to bottom,var(--rule-margin) var(--margin),var(--rule-face) var(--margin),var(--rule-face) calc(100% - var(--margin)),var(--rule-margin) calc(100% - var(--margin)));
  box-shadow:inset -1px 0 var(--rule-line);
}
.measureAxis canvas{position:absolute;pointer-events:none}
.measureLabels span{position:absolute;top:8px;transform:translateX(-50%);font:500 10px/13px Suite,Arial,sans-serif;font-variant-numeric:tabular-nums}
#ruler .measureHandle {
  position:absolute;transform:translateX(-50%);width:18px;height:14px;
  margin:0;padding:0;border:0;background:transparent;touch-action:none;cursor:ew-resize;
}
.measureHandle.margin{top:0;display:flex;align-items:flex-start;justify-content:center}
.measureHandle.margin::after{height:7px;margin:1px 0 0}.measureHandle.indent{bottom:0}
.measureHandle::after{content:"";display:block;margin:auto;width:9px;height:9px;background:#285787;clip-path:polygon(0 0,100% 0,100% 48%,50% 100%,0 48%)}
.measureHandle.indent::after{background:#163958;transform:rotate(180deg)}
.measureHandle:hover::after,.measureHandle:focus-visible::after{background:#0069bf}
#ruler .measureHandle:focus-visible{outline:1px solid #1264a4;outline-offset:-1px}
.previewMeasures{margin:12px auto}
.measuring>.measurePage,.previewMeasures>.measurePage{grid-area:2/2}
.previewMeasures .printedPage{margin:0}
.previewMeasures>.measureCorner,.previewMeasures>.measureAxis{position:relative;top:auto;left:auto;z-index:auto}
@media print {
  #measureFrame,.previewMeasures{display:block!important;width:auto;margin:0}
  .measureCorner,.measureAxis{display:none!important}
  .previewMeasures{break-after:page}
  .previewMeasures:last-child{break-after:auto}
  .previewMeasures .printedPage{break-after:auto}
}
