/* Extracted from index.html <style> blocks (v0.x – v1.6), original order kept. */

:root {
  font-family: var(--font-ui);
  color: var(--ink-1);
  background: var(--paper-1);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--accent-mid);
  outline-offset: 2px;
}
.app {
  display: flex;
  min-height: 100vh;
}
.side {
  width: 242px;
  min-width: 242px;
  background: var(--ink-0);
  color: var(--rule-1);
  padding: 24px 13px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin: 0 12px;
}
.brand b {
  color: var(--accent-mid);
}
.tagline {
  font-size: 0.9375rem;
  letter-spacing: 0.13em;
  margin: 5px 12px 29px;
  color: var(--ink-4);
}
.nav {
  display: grid;
  gap: 5px;
}
.nav button {
  text-align: left;
  border: 0;
  border-radius: 10px;
  padding: 12px 13px;
  background: transparent;
  color: var(--rule-2);
  font-weight: 600;
  font-size: 0.9375rem;
}
.nav button:hover,
.nav button.active {
  background: var(--ink-1);
  color: white;
}
.sidenote {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--ink-4);
}
.main {
  padding: 30px 38px;
  max-width: 1450px;
  width: 100%;
  margin: 0 auto;
}
.top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 23px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--ink-3);
  font-size: 0.9375rem;
  font-weight: 800;
}
.top h1 {
  font-size: 1.8125rem;
  letter-spacing: -1px;
  margin: 6px 0;
}
.muted {
  color: var(--ink-3);
  font-size: 0.9375rem;
  line-height: 1.5;
}
.small {
  font-size: 0.9375rem;
}
.pill {
  display: inline-block;
  background: var(--paper-2);
  color: var(--accent);
  padding: 6px 10px;
  border-radius: 100px;
  font-size: 0.9375rem;
  font-weight: 800;
}
.pill.green {
  color: var(--ok);
  background: var(--ok-soft);
}
.pill.orange {
  color: var(--warn);
  background: var(--warn-soft);
}
.pill.gray {
  color: var(--ink-3);
  background: var(--paper-2);
}
.btn {
  background: var(--ink-1);
  color: white;
  border: 1px solid var(--ink-1);
  padding: 10px 15px;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 700;
}
.btn:hover {
  background: var(--accent-fill);
}
.btn.light {
  background: var(--paper-0);
  color: var(--ink-2);
  border-color: var(--rule-1);
}
.btn.light:hover {
  background: var(--paper-1);
}
.btn.ghost {
  border: 0;
  color: var(--ink-3);
  background: transparent;
  padding: 6px 8px;
}
.btn.danger {
  background: var(--bad-soft);
  border-color: var(--bad-line);
  color: var(--bad);
}
.btn.sm {
  padding: 7px 10px;
  font-size: 0.9375rem;
}
.actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.card {
  background: var(--paper-0);
  border: 1px solid var(--paper-2);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 3px 16px #0e122009;
}
.columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.stat {
  font-size: 1.875rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin: 10px 0 4px;
}
.label {
  font-weight: 700;
  font-size: 0.9375rem;
  margin-bottom: 10px;
}
.section {
  margin-top: 20px;
}
.list {
  display: grid;
  gap: 10px;
}
.line {
  padding: 12px 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 13px;
  border-bottom: 1px solid var(--paper-2);
}
.line:last-child {
  border-bottom: 0;
}
.grow {
  flex: 1;
  min-width: 0;
}
.strong {
  font-weight: 750;
  font-size: 0.9375rem;
}
.divider {
  height: 1px;
  background: var(--paper-2);
  margin: 16px 0;
}
.empty {
  padding: 22px;
  text-align: center;
  border: 1px dashed var(--rule-1);
  border-radius: 13px;
  color: var(--ink-3);
  font-size: 0.9375rem;
}
.drop {
  border: 2px dashed var(--rule-2);
  border-radius: 15px;
  background: var(--paper-0);
  text-align: center;
  padding: 28px 18px;
  cursor: pointer;
  transition: 0.15s;
}
.drop.drag {
  border-color: var(--accent);
  background: var(--paper-2);
}
.drop strong {
  display: block;
  font-size: 1.0625rem;
  margin: 8px 0;
}
.drop input {
  display: none;
}
.field {
  display: grid;
  gap: 6px;
  margin: 11px 0;
}
.field label {
  font-size: 0.9375rem;
  font-weight: 750;
  color: var(--ink-3);
}
input:not([type='checkbox']):not([type='file']),
textarea,
select {
  border: 1px solid var(--rule-1);
  background: var(--paper-0);
  border-radius: 10px;
  padding: 11px;
  width: 100%;
  color: var(--ink-1);
  font-size: 0.9375rem;
}
textarea {
  min-height: 90px;
  resize: vertical;
}
.fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 15px;
}
.row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.row > * {
  min-width: 0;
}
.right {
  margin-left: auto;
}
.project {
  border: 1px solid var(--rule-1);
  border-radius: 13px;
  padding: 15px;
  display: grid;
  gap: 11px;
}
.projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}
.chip {
  font-size: 0.9375rem;
  padding: 5px 8px;
  border-radius: 7px;
  background: var(--paper-1);
  color: var(--ink-3);
  white-space: nowrap;
}
.countdown {
  font-weight: 850;
  font-size: 1.25rem;
  white-space: nowrap;
}
.red {
  color: var(--bad);
}
.greenText {
  color: var(--ok);
}
.notice {
  border-radius: 12px;
  background: var(--warn-soft);
  border: 1px solid var(--warn-line);
  padding: 13px 15px;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--warn);
}
.blueNotice {
  background: var(--paper-1);
  border-color: var(--rule-1);
  color: var(--accent-strong);
}
.hidden {
  display: none !important;
}
.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.tabs button {
  border: 1px solid var(--rule-1);
  background: var(--paper-0);
  padding: 7px 11px;
  border-radius: 8px;
  font-size: 0.9375rem;
}
.tabs button.active {
  background: var(--ink-1);
  color: white;
}
.fileName {
  overflow-wrap: anywhere;
}
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--ink-1);
  color: #fff;
  box-shadow: 0 7px 30px #0002;
  padding: 12px 18px;
  border-radius: 10px;
  z-index: 10;
  font-size: 0.9375rem;
  max-width: 320px;
}
.mobileNav {
  display: none;
}
.stack {
  display: grid;
  gap: 12px;
}
.badgeCount {
  background: var(--paper-2);
  color: var(--accent-strong);
  border-radius: 7px;
  font-size: 0.9375rem;
  padding: 4px 8px;
  font-weight: 700;
}
.kpi {
  font-size: 0.9375rem;
  color: var(--ink-3);
}
.kpi b {
  font-size: 0.9375rem;
  color: var(--ink-1);
}
.preview {
  max-width: 100%;
  max-height: 160px;
  object-fit: contain;
  border-radius: 10px;
}
.footnote {
  font-size: 0.9375rem;
  color: var(--ink-4);
  line-height: 1.5;
  margin-top: 15px;
}
details summary {
  cursor: pointer;
  font-weight: 700;
}
.headerTools {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
@media (max-width: 980px) {
  .side {
    width: 205px;
    min-width: 205px;
  }
  .main {
    padding: 25px;
  }
  .columns {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 720px) {
  .app {
    display: block;
  }
  .side {
    display: none;
  }
  .main {
    padding: 19px 15px 95px;
  }
  .columns,
  .two,
  .projects,
  .fields {
    grid-template-columns: 1fr;
  }
  .top h1 {
    font-size: 1.5625rem;
  }
  .mobileNav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    background: var(--ink-0);
    padding: 9px max(10px, env(safe-area-inset-right)) calc(9px + env(safe-area-inset-bottom))
      max(10px, env(safe-area-inset-left));
    gap: 4px;
    z-index: 5;
    justify-content: space-around;
    box-shadow: 0 -3px 18px #0002;
  }
  .mobileNav button {
    background: transparent;
    color: var(--rule-2);
    border: 0;
    padding: 8px 5px;
    font-size: 0.9375rem;
    font-weight: 700;
  }
  .mobileNav button.active {
    color: white;
    background: var(--accent-strong);
    border-radius: 8px;
  }
  .card {
    padding: 15px;
  }
  .top {
    display: block;
  }
  .headerTools {
    margin-top: 12px;
  }
}

.tableScroll {
  overflow-x: auto;
}
.dataTable {
  width: 100%;
  border-collapse: collapse;
  min-width: 730px;
  font-size: 0.9375rem;
}
.dataTable th {
  text-align: left;
  background: var(--paper-1);
  color: var(--ink-3);
  padding: 11px;
}
.dataTable td {
  border-top: 1px solid var(--paper-2);
  padding: 12px 10px;
  vertical-align: top;
}
.folderGrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.folderCard {
  border: 1px solid var(--rule-1);
  border-radius: 12px;
  padding: 14px;
  background: var(--paper-0);
}
.folderCard b {
  display: block;
  margin: 8px 0 4px;
}
.folderCard .stat {
  font-size: 1.375rem;
  margin: 3px 0;
}
.filterBar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.fieldInline {
  max-width: 310px;
}
.mini {
  font-size: 0.9375rem;
  color: var(--ink-4);
}
.kpiNum {
  font-size: 1.625rem;
  font-weight: 850;
  margin: 7px 0;
}
.badgeNoCost {
  display: inline-block;
  border-radius: 7px;
  background: var(--ok-soft);
  color: var(--ok);
  padding: 7px 10px;
  font-size: 0.9375rem;
  font-weight: 750;
}
@media (max-width: 800px) {
  .folderGrid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .folderGrid {
    grid-template-columns: 1fr;
  }
}

/* v1.4.1: private cloud upload drop target */
.cdDrop {
  border: 2px dashed var(--accent-mid);
  border-radius: 14px;
  background: var(--paper-1);
  min-height: 136px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-align: center;
  cursor: pointer;
  padding: 18px;
  color: var(--ink-1);
  transition:
    background 0.15s,
    border-color 0.15s;
}
.cdDrop:hover,
.cdDrop:focus-visible,
.cdDrop.cdDragOver {
  background: var(--paper-2);
  border-color: var(--accent);
  outline: none;
}
.cdDropIcon {
  font-size: 1.8125rem;
  line-height: 1;
}
.cdChosen {
  font-size: 0.9375rem;
  color: var(--accent);
  max-width: 100%;
  overflow-wrap: anywhere;
}
.cdVisuallyHidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* v1.5.4: single folder tree picker */
.cdTreePicker {
  border: 1px solid var(--rule-1);
  background: var(--paper-0);
  border-radius: 12px;
  padding: 0;
  max-width: 100%;
}
.cdTreePicker > summary {
  cursor: pointer;
  padding: 13px 15px;
  font-weight: 650;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
}
.cdTreePicker > summary::-webkit-details-marker {
  display: none;
}
.cdTreePicker[open] > summary {
  border-bottom: 1px solid var(--rule-1);
  background: var(--paper-0);
}
.cdTreeItems {
  padding: 10px;
  max-height: 360px;
  overflow: auto;
}
.cdTreeRoot {
  border-bottom: 1px solid var(--paper-2);
  padding: 4px 2px;
}
.cdTreeRoot > summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
  padding: 8px;
  border-radius: 7px;
}
.cdTreeRoot > summary:hover {
  background: var(--paper-1);
}
.cdTreeItem {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-1);
}
.cdTreeItem:hover,
.cdTreeItem.isSelected {
  background: var(--paper-2);
}
.cdTreeChildren {
  padding: 0 0 8px 15px;
}
.cdTreeCreate {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 0 4px 12px;
}
.cdTreeCreate input {
  width: 210px;
  max-width: 100%;
  padding: 8px 10px;
}
.cdQuotaPanel {
  border: 1px solid var(--rule-1);
  background: var(--paper-0);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 18px;
}
.cdQuotaPanel input[type='number'] {
  min-height: 44px;
  width: 100%;
}
@media (max-width: 760px) {
  .cdTreeCreate input {
    flex: 1;
    min-width: 130px;
  }
  .cdTreePicker {
    width: 100%;
  }
}

.cloudbar {
  background: var(--paper-1);
  border-bottom: 1px solid var(--accent-mid);
  padding: 14px 24px;
  font: 13px system-ui;
  color: var(--ink-1);
}
.cloudbar .cloudrow {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
}
.cloudbar input {
  background: var(--paper-0);
  border: 1px solid var(--rule-2);
  border-radius: 7px;
  padding: 9px;
  min-width: 160px;
  max-width: 280px;
  flex: 1;
}
.cloudbar button {
  background: var(--ink-1);
  color: white;
  border: 0;
  border-radius: 7px;
  padding: 9px 12px;
  cursor: pointer;
}
.cloudbar button:disabled {
  opacity: 0.5;
}
.cloudbar small {
  display: block;
  color: var(--ink-3);
  margin-top: 8px;
}
.cloudbar .cloudstatus {
  font-weight: 700;
  margin: 0 0 8px;
}
.cloudbar .error {
  color: var(--bad);
}
.cloudbar .ok {
  color: var(--ok);
}
.cloudbar label {
  font-size: 0.9375rem;
  font-weight: 600;
}
.cloudbar .settingrow {
  margin-top: 10px;
}
.cloudhint {
  font-size: 0.9375rem;
  color: var(--ink-3);
  margin-top: 4px;
}
.cloudhint.warn {
  color: var(--warn);
}
#cloudControls [hidden] {
  display: none !important;
}

/* v1.4.1: private cloud upload drop target */
.cdDrop {
  border: 2px dashed var(--accent-mid);
  border-radius: 14px;
  background: var(--paper-1);
  min-height: 136px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-align: center;
  cursor: pointer;
  padding: 18px;
  color: var(--ink-1);
  transition:
    background 0.15s,
    border-color 0.15s;
}
.cdDrop:hover,
.cdDrop:focus-visible,
.cdDrop.cdDragOver {
  background: var(--paper-2);
  border-color: var(--accent);
  outline: none;
}
.cdDropIcon {
  font-size: 1.8125rem;
  line-height: 1;
}
.cdChosen {
  font-size: 0.9375rem;
  color: var(--accent);
  max-width: 100%;
  overflow-wrap: anywhere;
}
.cdVisuallyHidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* v0.6 Login / Password Reset */
body.auth-locked > .app,
body.auth-locked > #mobileNav,
body.auth-locked > #cloudControls {
  display: none !important;
}
#authGate[hidden],
#authSetup[hidden],
#authLogin[hidden],
#authRecover[hidden],
#authNewPassword[hidden],
#authMfaEnroll[hidden],
#authMfaVerify[hidden] {
  display: none !important;
}
.authGate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 0%, var(--ink-1) 0%, var(--ink-0) 58%, var(--ink-0) 100%);
  padding: 24px;
  font-family: var(--font-ui);
}
.authShell {
  width: min(100%, 420px);
}
.authBrand {
  font-size: 1.875rem;
  letter-spacing: 0.04em;
  font-weight: 850;
  color: white;
  text-align: center;
}
.authBrand span {
  color: var(--accent-mid);
}
.authTagline {
  text-align: center;
  color: var(--rule-2);
  letter-spacing: 0.16em;
  font-size: 0.9375rem;
  margin: 5px 0 29px;
}
.authCard {
  background: var(--paper-0);
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 30px 70px #0005;
}
.authCard h1 {
  font-size: 1.625rem;
  color: var(--ink-0);
  margin: 0 0 8px;
}
.authCard p {
  font-size: 0.9375rem;
  color: var(--ink-3);
  line-height: 1.6;
  margin: 0 0 20px;
}
.authCard label {
  display: block;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--ink-2);
  margin: 14px 0 6px;
}
.authCard input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--rule-2);
  border-radius: 8px;
  padding: 12px;
  font-size: 0.9375rem;
  background: var(--paper-0);
  color: var(--ink-0);
}
.authCard input:focus {
  outline: 2px solid var(--accent-mid);
  outline-offset: 1px;
}
.authPrimary {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 9px;
  padding: 13px;
  background: var(--accent-fill);
  color: white;
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 700;
  margin-top: 20px;
}
.authPrimary:disabled {
  opacity: 0.6;
}
.authLink {
  border: none;
  background: none;
  color: var(--accent);
  font-size: 0.9375rem;
  cursor: pointer;
  padding: 8px 0;
}
.authRow {
  display: flex;
  justify-content: flex-end;
  margin-top: 7px;
}
.authMsg {
  min-height: 20px;
  font-size: 0.9375rem;
  color: var(--bad);
  margin-top: 12px;
  line-height: 1.5;
}
.authMsg.good {
  color: var(--ok);
}
.authFooter {
  text-align: center;
  color: var(--rule-2);
  font-size: 0.9375rem;
  margin-top: 18px;
  line-height: 1.6;
}
.authSetupHelp {
  font-size: 0.9375rem;
  color: var(--ink-3);
  margin-top: 12px;
  line-height: 1.5;
}
.authQR {
  display: block;
  width: 200px;
  height: 200px;
  margin: 12px auto;
  max-width: 100%;
}
.authTip {
  font-size: 0.9375rem;
  color: var(--ink-3);
  line-height: 1.5;
}
.authSecondary {
  display: block;
  width: 100%;
  border: 1px solid var(--rule-2);
  border-radius: 9px;
  padding: 10px;
  background: var(--paper-0);
  color: var(--ink-1);
  cursor: pointer;
  margin-top: 10px;
}
/* v1.4.1: private cloud upload drop target */
.cdDrop {
  border: 2px dashed var(--accent-mid);
  border-radius: 14px;
  background: var(--paper-1);
  min-height: 136px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-align: center;
  cursor: pointer;
  padding: 18px;
  color: var(--ink-1);
  transition:
    background 0.15s,
    border-color 0.15s;
}
.cdDrop:hover,
.cdDrop:focus-visible,
.cdDrop.cdDragOver {
  background: var(--paper-2);
  border-color: var(--accent);
  outline: none;
}
.cdDropIcon {
  font-size: 1.8125rem;
  line-height: 1;
}
.cdChosen {
  font-size: 0.9375rem;
  color: var(--accent);
  max-width: 100%;
  overflow-wrap: anywhere;
}
.cdVisuallyHidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* v1.0 cloud business dashboard */
.dashIntro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 5px 1px 15px;
}
.dashIntro h2 {
  font-size: 1.625rem;
  letter-spacing: -0.04em;
  margin: 3px 0 6px;
}
.dashEyebrow {
  font-size: 0.9375rem;
  letter-spacing: 0.14em;
  font-weight: 800;
  color: var(--accent);
}
.dashActions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.dashActions select {
  border: 1px solid var(--rule-1);
  background: var(--paper-0);
  padding: 10px 12px;
  border-radius: 9px;
  max-width: 240px;
}
.dashMetrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.dashMetric {
  min-width: 0;
}
.dashKpiNumber {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--ink-1);
  margin: 10px 0 4px;
  overflow-wrap: anywhere;
}
.dashMainGrid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
}
.dashSectionTitle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.dashSectionTitle h2 {
  margin: 0;
}
.dashTimelineItem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-top: 1px solid var(--paper-2);
  padding: 13px 0;
}
.dashTimelineItem:first-of-type {
  border-top: 0;
}
.dashTimelineItem > div {
  min-width: 0;
}
.dashDays {
  font-weight: 750;
  font-size: 0.9375rem;
  border-radius: 50px;
  padding: 7px 10px;
  background: var(--paper-1);
  color: var(--accent-strong);
  white-space: nowrap;
}
.dashDanger {
  color: var(--bad);
  background: var(--bad-soft);
}
.dashWarning {
  color: var(--warn);
  background: var(--warn-soft);
}
.dashAttention {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 13px 0 22px;
}
.dashAttention > span {
  padding: 12px;
  background: var(--paper-1);
  border-radius: 12px;
}
.dashAttention .muted {
  display: block;
  line-height: 1.3;
}
.dashAmount {
  font-size: 0.9375rem;
  font-weight: 800;
  white-space: nowrap;
  color: var(--ok);
}
.dashAmount.dashExpense {
  color: var(--bad);
}
.dashProjects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 10px 0 14px;
}
.dashProjectCard {
  box-shadow: none;
  border: 1px solid var(--paper-2);
}
.dashProjectHead {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-start;
}
.dashProjectNumbers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  border-top: 1px solid var(--paper-2);
  border-bottom: 1px solid var(--paper-2);
  padding: 12px 0;
  margin: 12px 0;
}
.dashProjectNumbers span {
  font-size: 0.9375rem;
  color: var(--ink-3);
  overflow-wrap: anywhere;
}
.dashProjectNumbers b {
  display: block;
  font-size: 0.9375rem;
  color: var(--ink-1);
  margin-top: 5px;
}
.dashProjectCard > .btn {
  margin-top: 10px;
}
@media (max-width: 950px) {
  .dashMetrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashMainGrid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .dashProjects,
  .dashMetrics {
    grid-template-columns: 1fr;
  }
  .dashAttention {
    grid-template-columns: 1fr;
  }
  .dashIntro h2 {
    font-size: 1.4375rem;
  }
}

/* v1.4.1: private cloud upload drop target */
.cdDrop {
  border: 2px dashed var(--accent-mid);
  border-radius: 14px;
  background: var(--paper-1);
  min-height: 136px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-align: center;
  cursor: pointer;
  padding: 18px;
  color: var(--ink-1);
  transition:
    background 0.15s,
    border-color 0.15s;
}
.cdDrop:hover,
.cdDrop:focus-visible,
.cdDrop.cdDragOver {
  background: var(--paper-2);
  border-color: var(--accent);
  outline: none;
}
.cdDropIcon {
  font-size: 1.8125rem;
  line-height: 1;
}
.cdChosen {
  font-size: 0.9375rem;
  color: var(--accent);
  max-width: 100%;
  overflow-wrap: anywhere;
}
.cdVisuallyHidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* v1.5.5: safe duplicate viewer, upload confirmation, and contextual destructive actions */
.cdFileReady {
  background: var(--ok-soft) !important;
  border-color: var(--ok) !important;
  color: var(--ok) !important;
}
.cdFileReady .cdDropIcon {
  font-size: 2.75rem;
  font-weight: 900;
  color: var(--ok);
}
.cdFileReady .cdChosen {
  font-size: 0.9375rem;
  color: var(--ok);
  font-weight: 650;
}
.uploadStatus,
.duplicateSafe {
  display: flex;
  align-items: center;
  gap: 15px;
  border-radius: 14px;
  padding: 19px;
  margin: 14px 0;
  border: 1px solid var(--ok-line);
  background: var(--ok-soft);
  color: var(--ok);
}
.duplicateSafe {
  align-items: flex-start;
  border-color: var(--warn-line);
  background: var(--warn-soft);
  color: var(--warn);
}
.duplicateSafe h3 {
  margin: 0 0 5px;
  font-size: 1.125rem;
}
.duplicateSafe p {
  font-size: 0.9375rem;
  margin: 6px 0;
  line-height: 1.5;
}
.duplicateIcon,
.uploadStatusIcon {
  font-size: 2rem;
  line-height: 1.1;
  font-weight: 800;
}
.folderMore,
.fileMore {
  position: relative;
  z-index: 5;
  flex-shrink: 0;
}
.folderMore summary,
.fileMore summary {
  list-style: none;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid var(--rule-1);
  border-radius: 10px;
  background: var(--paper-0);
  font-size: 1.375rem;
  color: var(--ink-1);
}
.folderMore summary::-webkit-details-marker,
.fileMore summary::-webkit-details-marker {
  display: none;
}
.folderMore[open],
.fileMore[open] {
  z-index: 20;
}
.folderMorePanel,
.fileMorePanel {
  position: absolute;
  right: 0;
  top: 43px;
  min-width: 175px;
  border: 1px solid var(--rule-1);
  border-radius: 10px;
  padding: 8px;
  background: var(--paper-0);
  box-shadow: 0 10px 25px #0e122025;
  z-index: 25;
}
.folderMorePanel button,
.fileMorePanel button {
  width: 100%;
  text-align: left;
  color: var(--bad) !important;
}
.trashNotice {
  margin: 14px 0;
  padding: 18px;
  border-radius: 12px;
  background: var(--paper-0);
  border: 1px solid var(--rule-1);
}
.trashRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 12px 0;
  border-top: 1px solid var(--paper-2);
}
.trashRow small {
  display: block;
  color: var(--ink-3);
  margin-top: 5px;
}
.proofCheckbox {
  display: flex;
  gap: 10px;
  align-items: start;
  margin-top: 14px;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--ink-2);
}
.proofCheckbox input {
  width: 18px;
  height: 18px;
}
@media (max-width: 640px) {
  .trashRow,
  .uploadStatus {
    flex-wrap: wrap;
  }
  .folderFile {
    flex-wrap: wrap;
  }
}

.v12-options {
  padding: 14px;
  border: 1px solid var(--rule-1);
  border-radius: 12px;
  background: var(--paper-1);
  margin: 12px 0;
}
.v12-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 9px 0;
  flex-wrap: wrap;
  color: var(--ink-1);
  font-weight: 600;
}
.v12-toggle input {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
}
.v12-hide {
  display: none !important;
}
.v12-note {
  color: var(--ink-3);
  font-size: 0.9375rem;
  margin: 6px 0;
}
.v12-deadline-form {
  max-width: 740px;
}
.v12-deadline-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding: 12px 0;
  border-bottom: 1px solid var(--paper-2);
}
.v12-deadline-line:last-child {
  border-bottom: 0;
}
.v12-deadline-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.v12-deadline-actions .btn {
  white-space: nowrap;
}

/* v1.4.1: private cloud upload drop target */
.cdDrop {
  border: 2px dashed var(--accent-mid);
  border-radius: 14px;
  background: var(--paper-1);
  min-height: 136px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-align: center;
  cursor: pointer;
  padding: 18px;
  color: var(--ink-1);
  transition:
    background 0.15s,
    border-color 0.15s;
}
.cdDrop:hover,
.cdDrop:focus-visible,
.cdDrop.cdDragOver {
  background: var(--paper-2);
  border-color: var(--accent);
  outline: none;
}
.cdDropIcon {
  font-size: 1.8125rem;
  line-height: 1;
}
.cdChosen {
  font-size: 0.9375rem;
  color: var(--accent);
  max-width: 100%;
  overflow-wrap: anywhere;
}
.cdVisuallyHidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.trashActions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.trashMore {
  position: relative;
}
.trashMore summary {
  list-style: none;
  cursor: pointer;
  background: var(--paper-1);
  border: 1px solid var(--rule-1);
  border-radius: 9px;
  padding: 8px 12px;
  font-size: 1.25rem;
}
.trashMore summary::-webkit-details-marker {
  display: none;
}
.trashMore > div {
  position: absolute;
  z-index: 5;
  right: 0;
  top: 100%;
  width: 205px;
  padding: 8px;
  background: var(--paper-0);
  border: 1px solid var(--accent-mid);
  border-radius: 10px;
  box-shadow: 0 12px 30px #0e122022;
}
.trashFinancial {
  margin-top: 9px;
}
.trashFinancial .pill {
  font-size: 0.9375rem;
}
@media (max-width: 680px) {
  .trashRow {
    align-items: flex-start;
    flex-direction: column;
  }
  .trashActions {
    width: 100%;
  }
}

/* v1.5.2 : application shell. The authGate has its own setup/login form. */
#cloudControls {
  display: none !important;
}
.headerTools {
  position: relative;
  flex-wrap: nowrap;
  gap: 12px;
}
.profileButton {
  display: flex;
  gap: 9px;
  align-items: center;
  min-width: 165px;
  border: 1px solid var(--rule-1);
  border-radius: 12px;
  background: var(--paper-0);
  padding: 6px 10px 6px 7px;
  color: var(--ink-1);
  box-shadow: 0 2px 9px #0e12200d;
}
.profileButton:hover {
  background: var(--paper-1);
  border-color: var(--rule-2);
}
.profileAvatar {
  width: 31px;
  height: 31px;
  flex: none;
  border-radius: 10px;
  background: var(--ink-1);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
}
.profileInfo {
  display: grid;
  text-align: left;
  line-height: 1.2;
  gap: 3px;
  font-size: 0.9375rem;
}
.profileInfo small {
  font-size: 0.9375rem;
  color: var(--ink-3);
}
.hubAccountMenu {
  position: absolute;
  right: 76px;
  top: calc(100% + 9px);
  width: 245px;
  background: var(--paper-0);
  border: 1px solid var(--rule-1);
  box-shadow: 0 15px 40px #0e122022;
  border-radius: 13px;
  padding: 7px;
  z-index: 30;
}
.accountHeader {
  display: grid;
  gap: 4px;
  overflow-wrap: anywhere;
  padding: 11px 10px 12px;
  border-bottom: 1px solid var(--paper-2);
  margin-bottom: 4px;
  font-size: 0.9375rem;
}
.accountMenuAction {
  border: 0;
  background: none;
  color: var(--ink-2);
  text-align: left;
  width: 100%;
  padding: 11px 9px;
  border-radius: 8px;
  font-weight: 650;
  font-size: 0.9375rem;
}
.accountMenuAction:hover {
  background: var(--paper-1);
}
.accountMenuAction.dangerText {
  color: var(--bad);
}
.documentReviewIntro {
  border: 1px solid var(--rule-1);
  background: var(--paper-0);
  border-radius: 13px;
  padding: 15px 17px;
  margin: 16px 0;
}
.documentReviewIntro h3 {
  margin: 0 0 7px;
  font-size: 0.9375rem;
}
.documentReviewIntro p {
  margin: 0;
  color: var(--ink-3);
  font-size: 0.9375rem;
  line-height: 1.5;
}
.documentReviewIntro .btn {
  margin-top: 12px;
}
.financialReview {
  background: var(--paper-1);
  border: 1px solid var(--rule-1);
  border-radius: 14px;
  padding: 17px;
  margin-top: 14px;
}
.financialReview .warningCurrency {
  margin: 12px 0;
}
.reviewFieldGroup {
  padding-top: 12px;
}
.documentFileBar {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  background: var(--paper-1);
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--ink-3);
  font-size: 0.9375rem;
  margin-top: 10px;
}
.docFolderPath {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin: 16px 0;
  font-size: 0.9375rem;
}
.folderChildren {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin: 12px 0;
}
.folderChild {
  min-height: 84px;
  padding: 13px;
  border: 1px solid var(--rule-1);
  background: var(--paper-0);
  text-align: left;
  border-radius: 12px;
  font-weight: 700;
  color: var(--ink-2);
}
.folderChild:hover,
.folderChild.active {
  border-color: var(--accent);
  background: var(--paper-1);
}
.folderChild small {
  display: block;
  font-weight: 400;
  color: var(--ink-3);
  margin-top: 5px;
}
.folderToolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.folderToolbar input {
  max-width: 260px !important;
}
@media (max-width: 760px) {
  .profileInfo {
    display: none;
  }
  .profileButton {
    min-width: auto;
  }
  .hubAccountMenu {
    right: 0;
  }
  .headerTools {
    margin-top: 13px;
    flex-wrap: wrap;
  }
}

/* v1.5.3 — fluid, readable layout and accessible density controls */
:root {
  --hub-text: 15px;
  --hub-space: 1;
  --hub-max: 1640px;
}
body {
  font-size: var(--hub-text);
}
body[data-ui-size='comfortable'] {
  --hub-text: 16px;
  --hub-space: 1.12;
}
body[data-ui-size='large'] {
  --hub-text: 18px;
  --hub-space: 1.22;
}
.main {
  max-width: var(--hub-max);
  padding: clamp(20px, 2.7vw, 44px);
  min-width: 0;
}
.side {
  width: clamp(215px, 16vw, 260px);
  min-width: clamp(215px, 16vw, 260px);
}
.card {
  padding: calc(22px * var(--hub-space));
  border-radius: 16px;
}
.muted,
.field label,
.strong,
.btn,
.nav button,
.accountMenuAction {
  font-size: 1rem;
}
.muted.small,
.small,
.footnote,
.chip,
.kpi,
.mini {
  font-size: 1rem;
}
.field label {
  font-weight: 650;
}
input:not([type='checkbox']):not([type='file']),
select,
textarea {
  font-size: var(--hub-text);
  min-height: 44px;
}
.btn {
  min-height: 40px;
}
.btn.sm {
  min-height: 36px;
  font-size: 1rem;
}
.top h1 {
  font-size: 2rem;
}
.profileButton {
  min-width: 0;
  padding: 6px;
  border-radius: 50%;
  width: 43px;
  height: 43px;
  justify-content: center;
}
.profileAvatar {
  border-radius: 50%;
  width: 31px;
  height: 31px;
}
.profileInfo,
.profileButton > span:last-child {
  display: none;
}
.hubAccountMenu {
  right: 0;
  top: calc(100% + 6px);
}
.documentReviewIntro {
  background: var(--paper-0);
  border-color: var(--paper-2);
}
.financialReview {
  background: var(--paper-0);
}
.reviewLayout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.documentFileBar {
  font-size: 1rem;
}
.folderChild {
  min-height: 90px;
}
.folderFile {
  border: 1px solid var(--paper-2);
  border-radius: 12px;
  background: var(--paper-0);
  padding: 12px;
  margin: 9px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.folderFile[draggable='true'] {
  cursor: grab;
}
.folderFile.dragging {
  opacity: 0.5;
}
.folderChild.drop-target,
.folderCard.drop-target {
  background: var(--paper-2) !important;
  border: 2px dashed var(--accent);
}
.folderFile .grow {
  overflow-wrap: anywhere;
}
.folderMove {
  max-width: 255px !important;
  min-width: 165px !important;
}
.folderMenuButtons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.folderEmptyNote {
  font-size: 1rem;
  color: var(--ink-3);
}
.uiPreview {
  font-size: 0.9375rem;
  color: var(--ink-3);
}
@media (min-width: 1250px) {
  .main {
    flex: 1;
  }
  .columns {
    gap: 19px;
  }
  .two {
    gap: 20px;
  }
}
@media (max-width: 1000px) {
  .side {
    width: 195px;
    min-width: 195px;
  }
  .main {
    padding: 24px;
  }
  .folderGrid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 760px) {
  .app {
    display: block;
  }
  .side {
    display: none;
  }
  .main {
    width: 100%;
    padding: 18px 14px 90px;
  }
  .two,
  .columns,
  .projects,
  .fields,
  .folderGrid {
    grid-template-columns: 1fr;
  }
  .headerTools {
    flex-wrap: wrap;
  }
  .folderFile {
    flex-wrap: wrap;
  }
  .folderMove {
    width: 100%;
    max-width: none !important;
  }
}

.hubActionNotice {
  border: 1px solid var(--warn-line);
  background: var(--warn-soft);
  border-radius: 12px;
  padding: 20px;
  margin: 16px 0;
}
.hubActionNotice h3 {
  margin-top: 0;
}
.hubError,
#heError:not(:empty) {
  color: var(--bad);
  background: var(--bad-soft);
  padding: 12px;
  border-radius: 8px;
  margin: 12px 0;
}
.hubDialog {
  width: min(720px, calc(100vw - 32px));
  max-height: 90dvh;
  overflow: auto;
  border: 1px solid var(--rule-1);
  border-radius: 16px;
  padding: 24px;
  color: var(--ink-1);
  box-shadow: 0 20px 80px #0e122033;
}
.hubDialog::backdrop {
  background: #0e122088;
}
.hubDialogHead,
.hubDialogActions {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
}
.hubDialogActions {
  justify-content: flex-end;
  margin-top: 20px;
}
.hubDialog .fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.btn:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.dashAttention > span {
  min-width: 0;
}
.dashAttention .btn {
  margin-top: 8px;
}
.hubDialog button,
.hubActionNotice button {
  min-height: 40px;
}
@media (max-width: 600px) {
  .hubDialog .fields {
    grid-template-columns: 1fr;
  }
  .hubDialog {
    padding: 16px;
  }
  .hubDialogActions {
    flex-wrap: wrap;
  }
}
