:root {
  --ink: #242722;
  --muted: #81827a;
  --bronze: #9e7950;
  --gold: #c5a57c;
  --bg: #f6f5f1;
  --line: #e8e7e0;
  --white: #fff;
  --sidebar: #20241f;
  --green: #657860;
  --red: #a5483c
}

* {
  box-sizing: border-box
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif
}

button,
input,
select,
textarea {
  font: inherit
}

button,
a {
  -webkit-tap-highlight-color: transparent
}

button {
  cursor: pointer
}

a {
  color: inherit;
  text-decoration: none
}

button {
  color: inherit
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #b99662;
  outline-offset: 3px
}

.sidebar {
  width: 246px;
  position: fixed;
  inset: 0 auto 0 0;
  background: var(--sidebar);
  color: #d9ddd4;
  padding: 32px 20px 16px;
  display: flex;
  flex-direction: column;
  z-index: 20
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  font: 23px Georgia, serif;
  letter-spacing: 2px;
  padding: 0 8px 32px;
  color: #eee6d9
}

.brand small {
  font: 8px -apple-system, sans-serif;
  letter-spacing: 2.8px;
  display: block;
  margin-top: 8px;
  color: #a7aa9f
}

.brand-mark {
  position: relative;
  border: 1px solid #998568;
  width: 39px;
  height: 45px;
  display: grid;
  place-items: center;
  color: #d3b78c;
  font: 32px Georgia, serif
}

.brand-mark span {
  font: 8px Georgia;
  position: absolute;
  bottom: -6px;
  background: var(--sidebar);
  padding: 0 5px;
  letter-spacing: 2px
}

.workspace {
  border-top: 1px solid #373b33;
  border-bottom: 1px solid #373b33;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 19px 7px;
  font-size: 12px
}

.workspace-icon {
  width: 31px;
  height: 31px;
  background: #333b30;
  border-radius: 5px;
  display: grid;
  place-items: center;
  font-size: 10px;
  color: #b3bbab
}

.workspace small,
.sidebar-bottom small {
  display: block;
  font-size: 10px;
  color: #929889;
  margin-top: 4px
}

.status-dot {
  width: 5px;
  height: 5px;
  background: #94a085;
  border-radius: 100%;
  margin-left: auto
}

.nav-label {
  font-size: 9px;
  letter-spacing: 1.8px;
  color: #7c8375;
  margin: 28px 12px 13px
}

nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 5px;
  color: #b4b9ad;
  font-size: 12px;
  margin-bottom: 4px;
  transition: .18s
}

nav a:hover {
  background: #2d342a;
  color: #fff
}

nav a.active {
  background: #3b4235;
  color: #ede5d4;
  box-shadow: inset 2px 0 #c8a57b
}

nav a .nav-count {
  margin-left: auto;
  font-size: 10px;
  color: #9da691
}

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0
}

.sidebar-note {
  margin-top: auto;
  padding: 30px 12px 22px;
  color: #bfb5a2
}

.sidebar-note .mini-star {
  color: var(--gold);
  font-size: 29px;
  display: block;
  margin-bottom: 12px
}

.sidebar-note strong {
  font: 18px/1.5 Georgia, serif;
  font-weight: normal
}

.sidebar-note p {
  font-size: 10px;
  line-height: 1.8;
  color: #858b7f
}

.sidebar-bottom {
  border-top: 1px solid #373b33;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 19px 5px 0;
  font-size: 11px
}

.avatar {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  border-radius: 50%;
  background: #3c4437;
  color: #c9d0c1;
  font: 11px Georgia
}

.sidebar-bottom button {
  margin-left: auto;
  color: #a6ac9f
}

.shell {
  margin-left: 246px
}

.topbar {
  height: 77px;
  padding: 0 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: #fbfaf7
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 17px;
  font-size: 11px;
  color: #93958b
}

.breadcrumb strong {
  font-weight: 500;
  color: #464b41
}

.slash {
  color: #cccfc4
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 21px
}

.search-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: #999c92;
  font-size: 11px
}

.search-trigger svg {
  width: 15px
}

.search-trigger kbd {
  font: 10px -apple-system, sans-serif;
  border: 1px solid #e1e2d9;
  border-radius: 3px;
  padding: 3px 4px;
  margin-left: 23px
}

.top-divider {
  height: 20px;
  width: 1px;
  background: var(--line)
}

.local-indicator {
  font-size: 10px;
  color: #7b8573;
  display: flex;
  align-items: center;
  gap: 6px
}

.local-indicator i {
  width: 5px;
  height: 5px;
  background: #7d8f6c;
  border-radius: 50%
}

main {
  max-width: 1580px;
  margin: auto;
  padding: 34px 38px 28px;
  min-height: calc(100vh - 130px)
}

.heading-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px
}

.eyebrow {
  font-size: 9px;
  letter-spacing: 2px;
  color: #a0815c;
  font-weight: 600;
  text-transform: uppercase
}

.heading-row h1 {
  font: 34px/1.15 Georgia, serif;
  font-weight: normal;
  letter-spacing: -1px;
  margin: 10px 0
}

.heading-row p {
  font-size: 12px;
  color: var(--muted);
  margin: 0
}

.date-box {
  border: 1px solid #e0e1d7;
  padding: 10px 13px;
  display: flex;
  gap: 9px;
  align-items: center;
  border-radius: 5px;
  font-size: 10px;
  color: #757b6c
}

.date-box svg {
  width: 14px
}

.hero {
  position: relative;
  background: #edece3;
  border: 1px solid #e3e1d4;
  border-radius: 8px;
  overflow: hidden;
  min-height: 184px;
  padding: 30px 32px;
  margin-bottom: 25px;
  display: flex;
  justify-content: space-between
}

.hero .eyebrow {
  color: #8e8063;
  font-size: 8px;
  letter-spacing: 2.1px
}

.hero h2 {
  font: 30px/1.24 Georgia, serif;
  margin: 13px 0 10px;
  letter-spacing: -.7px;
  max-width: 490px
}

.hero p {
  color: #848371;
  font-size: 11px;
  line-height: 1.8;
  margin: 0;
  max-width: 440px
}

.hero-art {
  position: absolute;
  right: 8px;
  bottom: -11px;
  width: 270px;
  height: 200px;
  color: #a59879;
  opacity: .5;
  stroke-width: .7
}

.hero-copy {
  position: relative;
  z-index: 1
}

.hero-status {
  position: absolute;
  right: 24px;
  top: 22px;
  display: flex;
  gap: 7px;
  align-items: center;
  color: #8a8978;
  font-size: 8px;
  letter-spacing: 1px
}

.hero-status i {
  width: 4px;
  height: 4px;
  background: #7f8a6b;
  border-radius: 50%
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 29px
}

.stat {
  padding: 18px 19px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-align: left;
  transition: .2s
}

.stat:hover {
  border-color: #c7b391;
  transform: translateY(-2px)
}

.stat-top {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #7e8276;
  align-items: center
}

.stat-top svg {
  width: 16px;
  color: #9a987f
}

.stat-value {
  font: 30px/1 Georgia, serif;
  display: block;
  margin: 18px 0 10px;
  letter-spacing: -1px
}

.stat-value.currency {
  font-size: 26px
}

.stat-note {
  font-size: 9px;
  color: #8a917f;
  display: flex;
  align-items: center;
  gap: 5px
}

.stat-note i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #96a486
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px
}

.section-head h2 {
  font: 19px Georgia, serif;
  margin: 0;
  letter-spacing: -.3px
}

.section-head span {
  font-size: 10px;
  color: #989a90
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 29px
}

.quick {
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  padding: 15px 16px;
  font-size: 11px;
  text-align: left
}

.quick:hover {
  border-color: #b89c77;
  background: #fcfaf5
}

.quick svg {
  width: 16px;
  color: #9d835c
}

.quick .plus {
  margin-left: auto;
  color: #9a9e90;
  font-size: 16px
}

.quick.primary {
  background: #353e30;
  border-color: #353e30;
  color: #f1eee5
}

.quick.primary svg,
.quick.primary .plus {
  color: #c7b898
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(270px, 1fr);
  gap: 21px
}

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 21px 22px 15px
}

.panel-head h2 {
  font: 18px Georgia, serif;
  letter-spacing: -.3px;
  margin: 0
}

.panel-head p {
  font-size: 10px;
  color: #939789;
  margin: 7px 0 0
}

.text-link {
  border: 0;
  background: none;
  color: #987b54;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  padding: 5px 0;
  white-space: nowrap
}

.text-link svg {
  width: 12px
}

.tab-row {
  display: flex;
  gap: 22px;
  padding: 0 22px;
  border-bottom: 1px solid #f0f0e9
}

.tab-row button {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  font-size: 10px;
  color: #9b9e92;
  padding: 11px 0
}

.tab-row button.active {
  color: #6a725e;
  border-color: #8e977f
}

.tab-row b {
  font-size: 8px;
  margin-left: 5px;
  background: #f2f3ec;
  border-radius: 3px;
  padding: 2px 4px;
  font-weight: normal
}

.empty {
  min-height: 178px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 25px;
  gap: 9px
}

.empty-icon {
  border: 1px solid #e7e9df;
  border-radius: 50%;
  height: 41px;
  width: 41px;
  display: grid;
  place-items: center;
  color: #a0a68f;
  background: #f8f9f4;
  margin-bottom: 4px
}

.empty strong {
  font-size: 11px;
  font-weight: 500;
  color: #747d68
}

.empty p {
  font-size: 10px;
  line-height: 1.8;
  color: #a0a492;
  margin: 0;
  max-width: 250px
}

.empty button {
  margin-top: 3px
}

.calendar {
  padding: 0 22px 17px
}

.calendar-month {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 11px;
  color: #6c7461
}

.calendar-controls {
  display: flex;
  gap: 5px
}

.icon-button {
  border: 0;
  background: transparent;
  font-size: 19px;
  padding: 3px 7px;
  line-height: 1.2;
  border-radius: 4px
}

.icon-button:hover {
  background: #e8e9df
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px 5px;
  text-align: center
}

.calendar-grid .weekday {
  font-size: 8px;
  color: #a3a891;
  padding: 3px 0 8px
}

.day {
  aspect-ratio: 1.15;
  font-size: 10px;
  display: grid;
  place-items: center;
  position: relative;
  color: #7c8470;
  border-radius: 4px;
  border: 0;
  background: none;
  min-height: 26px
}

.day:hover {
  background: #f0f2e9
}

.day.today {
  background: #586449;
  color: #fff
}

.day.outside {
  color: #d3d6ca
}

.day.has-event:after {
  content: '';
  position: absolute;
  bottom: 3px;
  height: 3px;
  width: 3px;
  background: #b79664;
  border-radius: 50%
}

.calendar-legend {
  font-size: 8px;
  color: #999e8c;
  border-top: 1px solid #f0f1e9;
  padding-top: 13px;
  margin-top: 13px;
  display: flex;
  align-items: center;
  gap: 7px
}

.calendar-legend i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #b79664
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 20px
}

.attention {
  background: #efeee6;
  border: 1px solid #e2e1d5;
  padding: 18px 20px;
  border-radius: 6px;
  display: flex;
  gap: 13px;
  align-items: flex-start
}

.attention svg {
  width: 18px;
  color: #8c9479
}

.attention strong {
  font-size: 11px;
  font-weight: 500;
  color: #687359
}

.attention p {
  font-size: 10px;
  color: #92967f;
  line-height: 1.8;
  margin: 7px 0 0
}

.attention.alert {
  background: #faf1e8
}

.attention.alert strong {
  color: #976649
}

.recent {
  margin-top: 20px
}

.recent .empty {
  min-height: 115px
}

.table-wrap {
  overflow: auto
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px
}

th {
  font-weight: 500;
  color: #9a9d90;
  text-align: left;
  background: #fbfcf8;
  font-size: 9px;
  padding: 12px 21px;
  white-space: nowrap
}

td {
  padding: 15px 21px;
  border-top: 1px solid #f1f1ec;
  color: #737a68;
  max-width: 290px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

tr.clickable {
  cursor: pointer
}

tr.clickable:hover {
  background: #f7f8f2
}

.badge {
  font-size: 9px;
  display: inline-block;
  padding: 5px 8px;
  background: #eef2e9;
  color: #758568;
  border-radius: 3px
}

.badge.urgent {
  background: #fbede5;
  color: #a26c51
}

.list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid #f0f1e9;
  padding: 17px 22px;
  cursor: pointer
}

.list-item:last-child {
  border-bottom: 0
}

.list-item:hover {
  background: #fafbf7
}

.event-date {
  width: 40px;
  flex-shrink: 0;
  text-align: center;
  border: 1px solid #e6e9df;
  border-radius: 4px;
  padding: 6px 2px;
  font-size: 16px;
  font-family: Georgia
}

.event-date small {
  display: block;
  font: 8px sans-serif;
  color: #9b9f91;
  margin-top: 3px
}

.event-text {
  flex: 1;
  min-width: 0
}

.event-text strong {
  font-size: 11px;
  font-weight: 500;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.event-text small {
  font-size: 9px;
  color: #a1a592;
  display: block;
  margin-top: 6px
}

.event-hour {
  font-size: 10px;
  color: #949b86
}

footer {
  display: flex;
  gap: 16px;
  border-top: 1px solid var(--line);
  margin: 0 38px;
  padding: 17px 0 20px;
  color: #a7aa9e;
  font-size: 8px;
  letter-spacing: .3px
}

footer>span {
  letter-spacing: 0
}

.footer-right {
  margin-left: auto
}

.loading {
  padding: 80px;
  text-align: center;
  color: #8b947e
}

.mobile-toggle {
  display: none
}

dialog {
  width: min(730px, calc(100% - 32px));
  border: 1px solid #e3e4d8;
  padding: 0;
  border-radius: 12px;
  box-shadow: 0 20px 100px #18200f33;
  color: var(--ink);
  max-height: 88vh
}

dialog::backdrop {
  background: #1c241d88;
  backdrop-filter: blur(3px)
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 24px 27px
}

.modal-header h2 {
  font: 27px Georgia;
  margin: 9px 0 0
}

.modal-header .close-modal {
  font-size: 27px;
  color: #8f9582
}

#modal-content {
  padding: 24px 27px
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 11px;
  color: #7e8572
}

.field.wide {
  grid-column: 1/-1
}

input,
textarea,
select {
  border: 1px solid #dedfd5;
  border-radius: 5px;
  padding: 11px 12px;
  width: 100%;
  background: #fdfdfa;
  color: #3b4633;
  font-size: 12px
}

textarea {
  resize: vertical;
  min-height: 80px
}

.field-note {
  font-size: 10px;
  color: #989c8f;
  line-height: 1.6;
  margin: 0 0 20px
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 23px;
  padding-top: 20px;
  border-top: 1px solid var(--line)
}

.btn {
  border: 1px solid #dedfd3;
  border-radius: 5px;
  background: #fff;
  padding: 11px 17px;
  font-size: 11px
}

.btn.primary {
  background: #424d38;
  border-color: #424d38;
  color: #fff
}

.btn:disabled {
  opacity: .6;
  cursor: wait
}

.form-error {
  color: #a8533c;
  font-size: 12px;
  line-height: 1.7;
  margin-top: 16px
}

#toast {
  position: fixed;
  bottom: 25px;
  left: calc(50% + 100px);
  transform: translateX(-50%) translateY(100px);
  background: #38452f;
  color: #f5f6f0;
  z-index: 99;
  padding: 15px 23px;
  border-radius: 6px;
  box-shadow: 0 5px 30px #0002;
  transition: .2s;
  font-size: 12px;
  opacity: 0
}

#toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1
}

.module-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line)
}

.module-toolbar input {
  max-width: 300px
}

.module-toolbar .count-label {
  align-self: center;
  font-size: 11px;
  color: #9ba18e
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px
}

.detail-item {
  overflow-wrap: anywhere
}

.detail-item dt {
  font-size: 10px;
  color: #939a85;
  margin-bottom: 7px
}

.detail-item dd {
  font-size: 12px;
  margin: 0;
  line-height: 1.7;
  white-space: pre-wrap
}

.search-results {
  margin-top: 15px;
  max-height: 50vh;
  overflow: auto
}

.search-result {
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  padding: 15px 8px;
  border-bottom: 1px solid var(--line)
}

.search-result:hover {
  background: #f5f7ef
}

.search-result small {
  display: block;
  color: #939b85;
  margin-top: 6px
}

.project-copy {
  font-size: 13px;
  line-height: 1.9;
  color: #778269
}

.project-copy h3 {
  color: #47563b;
  font-family: Georgia;
  font-size: 19px;
  font-weight: normal
}

.empty-page {
  min-height: 330px
}

.pill-label {
  font-size: 10px;
  color: #a0835e;
  border: 1px solid #e1d9c9;
  border-radius: 4px;
  padding: 7px 10px
}

.filter-note {
  padding: 12px 22px;
  color: #8b947c;
  font-size: 11px;
  border-bottom: 1px solid var(--line)
}

@media(min-width:1450px) {
  main {
    padding-top: 40px
  }

  .hero {
    min-height: 210px;
    padding: 34px
  }

  .hero-art {
    width: 320px;
    height: 230px;
    right: 55px
  }

  .hero h2 {
    font-size: 35px
  }

  .stat {
    padding: 23px
  }

  .empty {
    min-height: 220px
  }
}

@media(max-width:1150px) {
  .sidebar {
    width: 214px;
    padding-left: 15px;
    padding-right: 15px
  }

  .shell {
    margin-left: 214px
  }

  main {
    padding: 28px 25px
  }

  .topbar {
    padding: 0 25px
  }

  .brand {
    font-size: 21px
  }

  .dashboard-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(245px, 1fr)
  }

  .hero-art {
    opacity: .23;
    right: -30px
  }

  .stat {
    padding: 15px
  }

  .stat-value.currency {
    font-size: 22px
  }

  .quick {
    padding: 14px 12px;
    gap: 8px
  }

  .date-box {
    font-size: 9px
  }

  .top-actions {
    gap: 10px
  }

  .search-trigger kbd {
    margin-left: 5px
  }
}

@media(max-width:900px) {

  .stats,
  .quick-actions {
    grid-template-columns: repeat(2, 1fr)
  }

  .dashboard-grid {
    grid-template-columns: 1fr
  }

  .stack {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start
  }

  .hero h2 {
    font-size: 27px;
    max-width: 350px
  }

  .sidebar-note {
    display: none
  }

  .sidebar-bottom {
    margin-top: auto
  }

  .search-trigger>span:nth-child(2),
  .search-trigger kbd {
    display: none
  }

  .date-box {
    display: none
  }

  .calendar-grid {
    gap: 3px
  }

  .heading-row h1 {
    font-size: 30px
  }
}

@media(max-width:650px) {
  .sidebar {
    transform: translateX(-100%);
    transition: .2s;
    width: 246px
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 20px 0 80px #0005
  }

  .shell {
    margin-left: 0
  }

  .mobile-toggle {
    display: block
  }

  .topbar {
    height: 63px;
    padding: 0 18px
  }

  .breadcrumb {
    gap: 9px;
    font-size: 10px
  }

  main {
    padding: 25px 18px
  }

  .heading-row {
    margin-bottom: 22px
  }

  .heading-row h1 {
    font-size: 30px
  }

  .hero {
    padding: 25px;
    min-height: 190px
  }

  .hero h2 {
    font-size: 27px;
    max-width: 250px
  }

  .hero p {
    max-width: 230px
  }

  .hero-status {
    display: none
  }

  .hero-art {
    right: -80px;
    opacity: .2
  }

  .stats {
    gap: 10px
  }

  .stat-value {
    font-size: 28px
  }

  .quick-actions {
    gap: 9px
  }

  .quick {
    font-size: 10px
  }

  .stack {
    display: flex
  }

  .panel-head {
    padding: 20px 17px 14px
  }

  .panel-head h2 {
    font-size: 17px
  }

  .section-head span {
    font-size: 9px
  }

  footer {
    margin: 0 18px;
    gap: 10px;
    flex-wrap: wrap
  }

  .footer-right {
    display: none
  }

  .form-grid,
  .detail-grid {
    grid-template-columns: 1fr
  }

  #modal-content {
    padding: 20px
  }

  .modal-header {
    padding: 20px
  }

  #toast {
    left: 50%;
    width: 85%;
    text-align: center
  }

  .heading-row>.btn {
    font-size: 10px;
    padding: 10px
  }

  .module-toolbar {
    padding: 15px
  }

  .module-toolbar input {
    max-width: 220px
  }

  .top-actions .top-divider {
    display: none
  }

  .day {
    aspect-ratio: 1.4
  }

  td,
  th {
    padding-left: 17px;
    padding-right: 17px
  }
}

.directory-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 24px
}

.directory-stats>div {
  background: #eeeee5;
  border: 1px solid #e1e3d7;
  border-radius: 6px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between
}

.directory-stats span {
  color: #7e886f;
  font-size: 12px
}

.directory-stats strong {
  font: 30px Georgia;
  color: #56624c
}

.directory-tools {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 20px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line)
}

.directory-tools select {
  width: auto;
  max-width: 210px;
  font-size: 11px
}

.search-field {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  min-width: 200px;
  color: #a0a88f
}

.search-field input {
  min-width: 170px
}

.directory-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  gap: 15px;
  font-size: 11px;
  color: #8d967f
}

.directory-pagination>div {
  display: flex;
  align-items: center;
  gap: 13px
}

.directory-pagination button:disabled {
  opacity: .4;
  cursor: default
}

.cell-secondary {
  display: block;
  margin-top: 6px;
  color: #a1a793;
  font-size: 10px
}

.muted-badge {
  color: #92958b;
  background: #eeeeea
}

.directory-note {
  margin: 18px 0
}

.person-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap
}

.person-toolbar .primary {
  margin-left: auto
}

.person-tabs {
  padding: 12px 0 0;
  margin-top: 15px
}

#person-body {
  padding-top: 12px
}

.related-section {
  margin: 12px 0 25px
}

.related-section h3 {
  font: 19px Georgia;
  display: flex;
  gap: 10px;
  color: #56664a
}

.related-section h3 span {
  font: 12px sans-serif;
  color: #9ca68f
}

.related-section p {
  font-size: 12px;
  color: #9aa08f
}

.related-item {
  display: flex;
  width: 100%;
  justify-content: space-between;
  text-align: left;
  gap: 15px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 13px 0;
  font-size: 12px;
  color: #758668
}

.related-item:hover {
  color: #a28157
}

@media(max-width:650px) {
  .directory-stats {
    gap: 8px
  }

  .directory-stats>div {
    padding: 15px 10px;
    display: block
  }

  .directory-stats span {
    font-size: 10px;
    display: block;
    margin-bottom: 10px
  }

  .directory-tools {
    padding: 15px
  }

  .directory-tools select {
    max-width: 100%;
    flex: 1
  }

  .directory-pagination {
    align-items: start;
    flex-direction: column
  }

  .person-toolbar .primary {
    margin-left: 0
  }

  .directory-stats strong {
    font-size: 25px
  }
}

.team-picker {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px
}

.team-picker legend {
  padding: 0 5px
}

.team-picker label {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px
}

.team-picker input {
  width: auto
}

.economic-number {
  font-size: 20px !important;
  overflow-wrap: anywhere
}

#process-detail-body {
  padding-top: 22px
}

.queue-note {
  padding: 15px 20px 0
}

#process-content .directory-tools select {
  max-width: 230px
}

#process-content td {
  max-width: 300px
}

dialog.client-wide {
  width: min(1320px, calc(100% - 32px))
}

.client-list-back {
  margin-bottom: 18px;
  font-size: 12px
}

.client-process-scroll {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px
}

.client-process-grid {
  min-width: 1050px;
  table-layout: fixed
}

.client-process-grid th:first-child {
  width: 265px
}

.client-process-grid th:nth-child(2) {
  width: 140px
}

.client-process-grid th:nth-child(3) {
  width: 110px
}

.client-process-grid th:nth-child(4) {
  width: 100px
}

.client-process-grid th:nth-child(5) {
  width: 170px
}

.client-process-grid th:nth-child(6) {
  width: 175px
}

.client-process-grid th:nth-child(7) {
  width: 150px
}

.client-process-grid th,
.client-process-grid td {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  vertical-align: top;
  padding: 15px 13px;
  overflow-wrap: anywhere;
  line-height: 1.6
}

.client-process-grid small {
  display: block;
  margin-top: 6px;
  color: #818b76;
  font-size: 10px
}

.grid-subject {
  display: block;
  margin-top: 8px;
  color: #626e56
}

.process-grid-open {
  font-weight: 600;
  white-space: normal;
  text-align: left;
  font-size: 11px
}

.client-process-grid tbody tr:hover {
  background: #f6f8f0
}

@media(max-width:650px) {
  dialog.client-wide {
    width: calc(100% - 16px)
  }

  .client-list-back {
    font-size: 11px
  }
}

.person-tabs {
  flex-wrap: wrap;
  gap: 12px
}

.client-related-grid {
  min-width: 1100px;
  width: 100%
}

.client-related-grid th,
.client-related-grid td {
  white-space: normal;
  vertical-align: top;
  min-width: 115px;
  max-width: 300px;
  overflow-wrap: anywhere
}

.client-related-grid td:first-child {
  min-width: 230px
}

.client-related-grid tr[data-client-record] {
  cursor: pointer
}

.client-related-grid tbody tr:hover {
  background: #f4f5ef
}

.agenda-panel {
  padding: 24px
}

.agenda-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px
}

.agenda-filters label {
  display: grid;
  gap: 6px;
  font-size: 13px
}

.agenda-filters input,
.agenda-filters select,
.agenda-date-controls input {
  border: 1px solid #dcded4;
  border-radius: 6px;
  padding: 10px;
  background: white;
  min-width: 0
}

.agenda-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 24px 0
}

.agenda-date-controls {
  display: flex;
  gap: 6px;
  align-items: center
}

.agenda-section {
  margin: 24px 0 34px
}

.agenda-empty {
  padding: 20px;
  color: #717767
}

.agenda-table {
  min-width: 1000px
}

.agenda-table td {
  white-space: normal;
  vertical-align: top;
  max-width: 280px
}

.agenda-table small {
  display: block;
  margin-top: 7px;
  color: #727a68
}

.agenda-overdue {
  color: #a43b32 !important;
  font-weight: 600
}

.agenda-calendar-wrap {
  overflow-x: auto
}

.agenda-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  min-width: 840px;
  gap: 1px;
  background: #e2e5da;
  border: 1px solid #e2e5da
}

.agenda-calendar>strong {
  padding: 12px;
  background: #f2f4ed
}

.agenda-calendar-day {
  background: white;
  min-height: 135px;
  padding: 10px;
  min-width: 0
}

.agenda-calendar-day.outside {
  background: #f5f5f1
}

.agenda-calendar-day.is-today {
  box-shadow: inset 0 0 0 2px #788568
}

.agenda-calendar-event {
  display: block;
  text-align: left;
  width: 100%;
  border: 0;
  border-left: 3px solid #899777;
  background: #eff2e9;
  margin-top: 6px;
  padding: 6px;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer
}

@media(max-width:700px) {
  .agenda-panel {
    padding: 12px
  }

  .agenda-filters {
    grid-template-columns: 1fr 1fr
  }

  .agenda-date-controls {
    flex-wrap: wrap
  }

  .agenda-controls .tab-row {
    flex-wrap: wrap
  }
}

.notion-source {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  max-height: 500px;
  overflow: auto;
  padding: 16px;
  background: #f4f5ef
}

.field>label {
  display: grid;
  gap: 8px
}

.field-note input[type=checkbox] {
  width: auto;
  display: inline
}

.agenda-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(210px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 16px
}

.agenda-week-day {
  border: 1px solid #dfe3d6;
  border-radius: 10px;
  padding: 12px;
  background: #fafbf7
}

.agenda-week-day.is-today {
  border: 2px solid #798966
}

.agenda-week-day h4 {
  margin: 0 0 12px;
  display: flex;
  justify-content: space-between;
  gap: 8px
}

.agenda-week-item {
  display: block;
  width: 100%;
  text-align: left;
  background: white;
  border: 1px solid #dfe3d6;
  border-radius: 7px;
  padding: 12px;
  margin-top: 12px;
  cursor: pointer;
  color: inherit;
  overflow-wrap: anywhere
}

.agenda-week-item small {
  display: block;
  margin-top: 7px;
  line-height: 1.5
}

.agenda-form-section {
  padding: 16px 0;
  border-bottom: 1px solid #e2e5da
}

.agenda-form-section summary,
.agenda-extra summary {
  cursor: pointer;
  font-weight: 600;
  padding: 12px 0
}

.agenda-form-section h3 {
  margin: 0 0 16px
}

.agenda-form-section .form-grid {
  margin-top: 12px
}

.agenda-form-section [hidden] {
  display: none !important
}

.agenda-extra {
  margin-top: 18px
}

.agenda-legend {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0
}

.agenda-legend span {
  padding: 6px 10px;
  border-radius: 5px;
  font-size: 12px
}

.ag-status-pendente {
  --ag-bg: #fff9e8;
  --ag-border: #aa791b
}

.ag-status-em_andamento {
  --ag-bg: #eaf2ff;
  --ag-border: #3269ac
}

.ag-status-aguardando,
.ag-status-a_conferir {
  --ag-bg: #fff0df;
  --ag-border: #a66723
}

.ag-status-concluido {
  --ag-bg: #e6f3e8;
  --ag-border: #317b48
}

.ag-status-cancelado {
  --ag-bg: #f4e9e9;
  --ag-border: #965555
}

.ag-status-transferida {
  --ag-bg: #eeeafa;
  --ag-border: #7153a3
}

.agenda-table tr[class*="ag-status-"] td,
.agenda-week-item[class*="ag-status-"],
.agenda-calendar-event[class*="ag-status-"],
.agenda-legend span {
  background: var(--ag-bg);
  color: #273126
}

.agenda-week-item[class*="ag-status-"],
.agenda-calendar-event[class*="ag-status-"],
.agenda-table tr[class*="ag-status-"] td:first-child {
  border-left: 4px solid var(--ag-border)
}

.publication-grid {
  table-layout: fixed;
  min-width: 960px;
  width: 100%
}

.publication-grid th:nth-child(1) {
  width: 18%
}

.publication-grid th:nth-child(2) {
  width: 21%
}

.publication-grid th:nth-child(3) {
  width: 45%
}

.publication-grid th:nth-child(4) {
  width: 16%
}

.publication-grid td {
  vertical-align: top;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere
}

.publication-content {
  white-space: pre-wrap;
  line-height: 1.6;
  font-size: 14px;
  color: #30382d
}

.publication-grid p {
  margin: 10px 0
}

/* Relatórios compartilham os botões e as cores existentes. */
.report-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 16px 0
}

.report-dialog {
  width: min(1150px, 94vw);
  max-width: 94vw;
  max-height: 94vh;
  padding: 24px;
  border: 1px solid #deddd2;
  border-radius: 14px;
  color: #30352c;
  background: #fff
}

.report-dialog::backdrop {
  background: #20271cb3
}

.report-dialog h2 {
  font-size: 26px;
  margin: 0;
  flex: 1
}

.report-options {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 16px 0
}

.report-options label {
  display: flex;
  flex-direction: column;
  gap: 6px
}

.report-options input,
.report-options select {
  padding: 9px;
  border: 1px solid #d9dace;
  border-radius: 6px;
  background: white
}

.report-selection {
  max-height: 260px;
  overflow: auto;
  padding: 10px 0
}

.report-selection label {
  display: block;
  padding: 7px 0
}

#report-frame {
  width: 100%;
  height: 65vh;
  border: 1px solid #deddd2
}

.office-identity {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 16px 0 24px;
  padding: 18px;
  border: 1px solid #dddccb;
  border-radius: 12px;
  background: #fff
}

.office-identity img {
  width: 150px;
  height: 75px;
  object-fit: contain
}

.office-identity strong {
  font-size: 20px;
  color: #46533b
}

.office-identity small {
  display: block;
  margin-top: 5px;
  color: #7a8070
}

.office-logo-preview {
  max-width: 320px;
  max-height: 180px;
  object-fit: contain;
  margin: 16px
}

.office-logo-preview[hidden] {
  display: none
}

/* Duplicar compromisso para outras datas */
.dup-panel {
  background: #efeee6;
  border: 1px solid #e2e1d5;
  padding: 16px 18px;
  border-radius: 6px;
  margin: 12px 0
}

.dup-panel p {
  margin: 8px 0
}

.dup-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0
}

.dup-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer
}

.dup-check input {
  width: auto;
  margin: 0
}

/* ===== Tela inicial (Central Jurídica) — 25/09/2026 ===== */
:root {
  --k-audiencia: #aa8357;
  --k-prazo: #b23b2e;
  --k-tarefa: #46533b;
  --k-reuniao: #3d6b8f;
  --k-diligencia: #7a5c99;
  --k-outro: #8a8a80
}

.eyebrow {
  font-size: 10px;
  letter-spacing: 1.8px
}

.home-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin: 4px 0 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line)
}

.home-head h1 {
  margin: 6px 0 4px
}

.home-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px
}

.home-head .eyebrow {
  text-transform: uppercase
}

.home-head-actions {
  display: flex;
  align-items: center;
  gap: 16px
}

.home-logo {
  height: 46px;
  width: auto;
  object-fit: contain
}

.new-menu {
  position: relative
}

.new-menu summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 16px;
  font-size: 12px
}

.new-menu summary::-webkit-details-marker {
  display: none
}

.new-menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: 0 12px 30px rgba(32, 36, 31, .12);
  padding: 6px;
  min-width: 190px;
  display: grid
}

.new-menu-list button {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: none;
  padding: 10px 12px;
  border-radius: 5px;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  color: var(--ink)
}

.new-menu-list button:hover {
  background: #f3f2ec
}

.new-menu-list svg {
  width: 15px;
  height: 15px;
  opacity: .7
}

.stat.danger .stat-value,
.stat.danger .stat-note {
  color: var(--k-prazo)
}

.stat.danger .stat-note i {
  background: var(--k-prazo)
}

.stat.warn .stat-note i {
  background: var(--k-audiencia)
}

.stat .stat-note {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.dashboard-grid {
  margin-bottom: 21px;
  align-items: start
}

.panel-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px
}

.week-group {
  padding: 4px 22px 10px
}

.week-group+.week-group {
  border-top: 1px solid #f0f0ea
}

.week-group h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 6px;
  font: 600 11px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--bronze)
}

.week-group h3 span {
  background: #f1efe7;
  color: var(--muted);
  border-radius: 9px;
  padding: 2px 7px;
  font-size: 10px;
  letter-spacing: 0
}

.week-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 9px 10px 9px 12px;
  margin: 0 -10px;
  border-left: 3px solid var(--k-outro);
  border-radius: 3px;
  cursor: pointer
}

.week-item:hover,
.week-item:focus-visible {
  background: #f7f6f1;
  outline: none
}

.week-item .when {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  padding-top: 1px
}

.week-item .what {
  min-width: 0
}

.week-item strong {
  display: block;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.week-item small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.kind-audiencia {
  border-left-color: var(--k-audiencia)
}

.kind-prazo {
  border-left-color: var(--k-prazo)
}

.kind-tarefa {
  border-left-color: var(--k-tarefa)
}

.kind-reuniao,
.kind-sessao {
  border-left-color: var(--k-reuniao)
}

.kind-diligencia {
  border-left-color: var(--k-diligencia)
}

.kind-prazo .when {
  color: var(--k-prazo)
}

.count-pill {
  min-width: 22px;
  text-align: center;
  border-radius: 11px;
  padding: 3px 8px;
  font-size: 11px;
  background: #eef2e9;
  color: #5d7052
}

.count-pill.is-alert {
  background: #f8e9e4;
  color: var(--k-prazo)
}

.attention-list {
  list-style: none;
  margin: 0;
  padding: 0 12px 12px
}

.attention-list button {
  display: grid;
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  padding: 9px 10px;
  border-radius: 5px;
  cursor: pointer;
  gap: 2px;
  color: var(--ink)
}

.attention-list button:hover {
  background: #faf6f0
}

.attention-list .reason {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  color: var(--k-prazo)
}

.attention-list .title {
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.attention-list small {
  color: var(--muted);
  font-size: 11px
}

.attention-panel .calm {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0;
  padding: 0 22px 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5
}

.attention-panel .calm svg {
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--green)
}

.djen-panel {
  margin-bottom: 21px
}

.djen-search {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  padding: 0 22px 20px
}

.djen-search .field {
  flex: 0 1 180px;
  margin: 0
}

.djen-search .btn {
  height: 38px;
  padding: 0 18px
}

.djen-search small {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 11px
}

@media (max-width:900px) {
  .home-head {
    flex-direction: column;
    align-items: flex-start
  }

  .home-logo {
    height: 36px
  }
}

.stats {
  grid-template-columns: repeat(4, minmax(0, 1fr))
}

.stat {
  min-width: 0
}

.stat-top svg {
  flex: none
}

@media (max-width:900px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }
}

/* ===== Padronização visual dos módulos — 25/09/2026 =====
   Camada final: unifica cabeçalhos, cartões de resumo, tabelas, filtros, selos e relatórios. */
:root {
  --tone-ok: #3f6b45;
  --tone-ok-bg: #eaf2e8;
  --tone-info: #35618f;
  --tone-info-bg: #e9f0f8;
  --tone-warn: #8a6420;
  --tone-warn-bg: #f8f0dc;
  --tone-alert: #a3372b;
  --tone-alert-bg: #f8e7e3;
  --tone-off: #7c7d76;
  --tone-off-bg: #efefeb
}

/* Cabeçalho de página: sobretítulo, título com serifa, descrição e ação principal alinhados */
.heading-row {
  align-items: flex-end;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px
}

.heading-row h1 {
  margin: 6px 0 4px
}

.heading-row p {
  margin: 0;
  color: var(--muted);
  font-size: 13px
}

.heading-row .eyebrow {
  text-transform: uppercase
}

/* Cartões de resumo iguais aos da tela inicial */
.directory-stats {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 22px
}

.directory-stats>div {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px
}

.directory-stats span {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .2px
}

.directory-stats strong {
  font: 28px/1 Georgia, serif;
  color: var(--ink);
  letter-spacing: -.5px
}

/* Filtros: mesma altura, mesma borda e rótulos discretos */
.directory-tools {
  gap: 10px;
  padding: 16px 20px;
  align-items: center
}

.directory-tools select,
.directory-tools input:not([type=checkbox]),
.agenda-filters input,
.agenda-filters select {
  height: 38px;
  border: 1px solid #dedfd5;
  border-radius: 6px;
  background: #fdfdfa;
  font-size: 12px;
  padding: 0 11px;
  color: var(--ink)
}

.directory-tools .search-field {
  flex: 1 1 260px;
  border: 1px solid #dedfd5;
  border-radius: 6px;
  background: #fdfdfa;
  padding: 0 12px;
  height: 38px
}

.directory-tools .search-field input {
  border: 0;
  background: none;
  height: 36px;
  padding: 0;
  flex: 1;
  max-width: none;
  outline: none
}

.directory-tools>label:not(.search-field) {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap
}

.directory-tools>label:not(.search-field) input {
  width: 150px
}

#process-court {
  flex: 0 1 200px
}

.agenda-filters label {
  font-size: 11px;
  color: var(--muted);
  gap: 5px
}

/* Relatórios: grupo compacto à direita, abaixo dos filtros */
.report-toolbar {
  justify-content: flex-end;
  align-items: center;
  margin: 0;
  padding: 10px 20px;
  border-bottom: 1px solid var(--line);
  background: #fcfcf9
}

.report-toolbar::before {
  content: "Relatórios";
  margin-right: auto;
  font-size: 10px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted)
}

#modal .report-toolbar,
#report-dialog .report-toolbar,
.agenda-panel>.report-toolbar {
  border: 0;
  background: none;
  padding: 0;
  margin: 12px 0
}

#report-dialog .report-toolbar::before {
  content: none
}

.report-toolbar .btn {
  padding: 7px 12px;
  font-size: 11px;
  background: #fff
}

/* Tabelas mais legíveis */
table {
  font-size: 12.5px
}

th {
  font-size: 10px;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: #8d9084;
  font-weight: 600;
  background: #fafaf6
}

td {
  color: #45493f;
  line-height: 1.5
}

td small,
td .cell-secondary {
  color: var(--muted);
  font-size: 11.5px
}

tbody tr.clickable:hover td,
tbody tr[data-detail]:hover td {
  background: #f8f7f2
}

.directory-pagination {
  padding: 14px 20px
}

/* Selos de situação com cor por significado */
.badge {
  font-size: 10.5px;
  font-weight: 500;
  padding: 4px 9px;
  border-radius: 10px;
  letter-spacing: .2px;
  background: var(--tone-off-bg);
  color: var(--tone-off);
  white-space: nowrap
}

.badge[data-tone=ok] {
  background: var(--tone-ok-bg);
  color: var(--tone-ok)
}

.badge[data-tone=info] {
  background: var(--tone-info-bg);
  color: var(--tone-info)
}

.badge[data-tone=warn] {
  background: var(--tone-warn-bg);
  color: var(--tone-warn)
}

.badge[data-tone=alert] {
  background: var(--tone-alert-bg);
  color: var(--tone-alert)
}

.badge[data-tone=off] {
  background: var(--tone-off-bg);
  color: var(--tone-off)
}

/* Agenda: tons suaves; a cor forte fica só na borda esquerda */
.ag-status-pendente {
  --ag-bg: #fffcf3;
  --ag-border: #b08a3e
}

.ag-status-em_andamento {
  --ag-bg: #f6f9fd;
  --ag-border: #35618f
}

.ag-status-aguardando,
.ag-status-a_conferir {
  --ag-bg: #fdf8f1;
  --ag-border: #a8743a
}

.ag-status-concluido {
  --ag-bg: #f6faf5;
  --ag-border: #3f6b45
}

.ag-status-cancelado {
  --ag-bg: #faf7f6;
  --ag-border: #9b7d78
}

.ag-status-transferida {
  --ag-bg: #f8f6fc;
  --ag-border: #6f5a9a
}

/* Títulos de seção e de cartão com a mesma família */
.panel h2,
.section-head h2,
.agenda-panel h2 {
  font-family: Georgia, serif;
  font-weight: normal;
  letter-spacing: -.2px
}

/* Agenda em lista: colunas proporcionais, título em destaque, datas compactas */
@media (min-width:1100px) {
  .agenda-table {
    min-width: 0;
    table-layout: fixed
  }

  .agenda-table th:nth-child(1) {
    width: 27%
  }

  .agenda-table th:nth-child(2) {
    width: 10%
  }

  .agenda-table th:nth-child(3),
  .agenda-table th:nth-child(4) {
    width: 12%
  }

  .agenda-table th:nth-child(5) {
    width: 13%
  }

  .agenda-table th:nth-child(6) {
    width: 13%
  }

  .agenda-table th:nth-child(7) {
    width: 13%
  }
}

.agenda-table th,
.agenda-table td {
  padding-left: 12px;
  padding-right: 12px
}

.agenda-table td:first-child .text-link {
  font-size: 12.5px;
  color: var(--ink);
  font-weight: 500;
  text-align: left;
  white-space: normal;
  line-height: 1.4;
  padding: 0
}

.agenda-table td:first-child .text-link svg {
  width: 11px;
  height: 11px;
  opacity: .5
}

.agenda-table small {
  margin-top: 4px;
  font-size: 11px
}

.agenda-table th {
  white-space: normal;
  line-height: 1.35;
  vertical-align: bottom
}

.agenda-table td:first-child .text-link {
  display: inline
}

.agenda-table td:first-child .text-link svg {
  display: inline;
  vertical-align: -1px;
  margin-left: 3px
}

/* Tela inicial: escritório licenciado em destaque à direita */
.home-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  align-items: stretch;
  gap: 28px
}

.home-hello {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start
}

.home-hello .new-menu {
  margin-top: 16px
}

.home-hello .new-menu-list {
  left: 0;
  right: auto
}

.office-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--bronze);
  border-radius: 8px;
  padding: 16px 20px 16px;
  box-shadow: 0 10px 28px rgba(32, 36, 31, .06);
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  color: var(--ink)
}

.office-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center
}

.office-card-top .text-link {
  font-size: 11px
}

.office-card-main {
  display: flex;
  align-items: center;
  gap: 16px
}

.office-card-main img {
  height: 66px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  flex: none
}

.office-card-main strong {
  display: block;
  font: 20px/1.2 Georgia, serif;
  letter-spacing: -.3px;
  color: var(--ink)
}

.office-card-main small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px
}

.office-card-line {
  margin: 0;
  font-size: 11.5px;
  color: #6d7066;
  line-height: 1.5
}

.office-card-line.contacts {
  color: var(--ink)
}

.office-card-line.contacts span {
  margin: 0 7px;
  color: var(--gold)
}

.office-card.is-empty {
  justify-content: center;
  border-style: dashed;
  border-top-style: solid
}

.office-card.is-empty small {
  color: var(--muted)
}

@media (max-width:1000px) {
  .home-head {
    grid-template-columns: 1fr
  }
}

.home-head {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 470px)
}

.office-card-line.contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0
}

.office-card-line.contacts .contact {
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis
}

.office-card-line.contacts .contact+.contact::before {
  content: "·";
  margin: 0 8px;
  color: var(--gold)
}

.office-card-line.contacts {
  display: grid;
  gap: 3px;
  border-top: 1px solid var(--line);
  padding-top: 9px;
  margin-top: 2px
}

.office-card-line.contacts .contact {
  color: var(--ink);
  display: flex;
  gap: 10px
}

.office-card-line.contacts .contact+.contact::before {
  content: none
}

.office-card-line.contacts b {
  flex: none;
  width: 44px;
  font-weight: 600;
  font-size: 10px;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 1px
}

@media (max-width:1000px) {
  .home-head {
    grid-template-columns: minmax(0, 1fr)
  }

  .office-card-main img {
    height: 52px
  }
}

/* Cartão do escritório compacto: logo, nome e contatos em uma linha */
.home-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end
}

.office-card {
  padding: 12px 16px;
  gap: 6px;
  border-top-width: 2px;
  box-shadow: 0 6px 18px rgba(32, 36, 31, .05);
  max-width: 460px;
  justify-self: end
}

.office-card-main {
  gap: 12px
}

.office-card-main img {
  height: 40px;
  max-width: 80px
}

.office-card-main strong {
  font-size: 16px;
  line-height: 1.25
}

.office-card-contacts {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
  font-size: 11px;
  color: var(--ink)
}

.office-card-contacts span {
  white-space: nowrap
}

.office-card-contacts b {
  font-weight: 600;
  font-size: 9.5px;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 3px
}

@media (max-width:1000px) {
  .home-head {
    grid-template-columns: minmax(0, 1fr)
  }

  .office-card {
    justify-self: stretch;
    max-width: none
  }
}

.office-card {
  max-width: 560px
}

.office-card-main img {
  height: 48px;
  max-width: 96px
}

.office-card-contacts span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis
}

/* Backup automático */
.backup-status {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 6px;
  border-left: 3px solid var(--tone-ok);
  background: var(--tone-ok-bg);
  margin: 8px 0 16px;
  font-size: 12px
}

.backup-status strong {
  color: var(--tone-ok);
  font-size: 13px
}

.backup-status.is-alert {
  border-left-color: var(--tone-alert);
  background: var(--tone-alert-bg)
}

.backup-status.is-alert strong {
  color: var(--tone-alert)
}

#backup-box .report-toolbar {
  border: 0;
  background: none;
  padding: 0;
  justify-content: flex-start
}

#backup-box .report-toolbar::before {
  content: none
}

#backup-dest {
  max-width: none;
  width: 100%
}

.report-toolbar .btn.primary {
  background: #424d38;
  border-color: #424d38;
  color: #fff
}

/* ===== Contratos e Financeiro ===== */
.heading-actions {
  display: flex;
  gap: 10px
}

.directory-stats>div small {
  font-size: 11px;
  color: var(--muted)
}

.directory-stats>div.is-negative strong {
  color: var(--tone-alert)
}

.directory-stats.compact {
  margin: 14px 0
}

.directory-stats.compact>div {
  padding: 12px 14px;
  gap: 6px
}

.directory-stats.compact strong {
  font-size: 20px
}

.progress {
  height: 4px;
  background: #efeee7;
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
  max-width: 140px
}

.progress i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--tone-ok)
}

.month-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px
}

.month-nav strong {
  font: 20px Georgia, serif;
  font-weight: normal;
  min-width: 190px;
  text-align: center
}

.btn.small {
  padding: 6px 10px;
  font-size: 11px
}

.finance-table .num {
  text-align: right;
  white-space: nowrap
}

.finance-table td strong {
  display: block;
  font-weight: 500;
  color: var(--ink)
}

.finance-table td small {
  display: block;
  color: var(--muted)
}

.finance-table tr.fin-receber .amount {
  color: var(--tone-ok)
}

.finance-table tr.fin-pagar .amount {
  color: var(--tone-alert)
}

.finance-table td.negative {
  color: var(--tone-alert)
}

.finance-table tr.is-reversed td {
  color: var(--muted);
  text-decoration: line-through
}

.finance-table tr.is-reversed td .badge {
  text-decoration: none
}

.flow-bars {
  display: grid;
  gap: 3px;
  min-width: 120px
}

.flow-bars i {
  display: block;
  height: 6px;
  border-radius: 3px;
  width: 0;
  justify-self: start
}

.flow-bars i.in {
  background: var(--tone-ok)
}

.flow-bars i.out {
  background: #c58b7f
}

.flow-note {
  padding: 10px 20px
}

.stacked-form h3 {
  margin: 22px 0 10px;
  font: 17px Georgia, serif
}

.stacked-form h3 small {
  font: 12px -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--muted);
  margin-left: 8px
}

.fee-block {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 16px 12px;
  margin: 0 0 12px
}

.fee-block legend {
  padding: 0 6px;
  font-weight: 600;
  font-size: 13px
}

.fee-block legend label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer
}

.fee-block legend input {
  width: auto;
  margin: 0
}

.fee-block.is-off .form-grid,
.fee-block.is-off .field-note {
  opacity: .4
}

.check-list {
  display: grid;
  gap: 6px;
  margin-bottom: 14px
}

.plain-list {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
  display: grid;
  gap: 6px
}

.contracts-table {
  min-width: 0
}

.contracts-table td {
  white-space: normal
}

.contracts-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11.5px
}

/* ===== Acesso (login) ===== */
body.auth-mode .sidebar,body.auth-mode .shell,body.auth-mode #modal{display:none}
#auth-screen{display:none}
body.auth-mode #auth-screen{display:flex;min-height:100vh;align-items:center;justify-content:center;padding:32px 16px;background:linear-gradient(180deg,#20241f 0,#20241f 38%,var(--bg) 38%)}
.auth-card{width:min(440px,100%);background:#fff;border:1px solid var(--line);border-top:3px solid var(--bronze);border-radius:10px;padding:28px 30px;box-shadow:0 18px 40px rgba(32,36,31,.18)}
.auth-brand{display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;padding-bottom:18px;margin-bottom:18px;border-bottom:1px solid var(--line)}
.auth-brand img{height:64px;width:auto;object-fit:contain}
.auth-brand strong{font:19px Georgia,serif;color:var(--ink)}
.auth-brand small{font-size:10px;letter-spacing:1.4px;text-transform:uppercase;color:var(--muted)}
.auth-card h1{font-size:24px;margin:0 0 6px}
.auth-card>p{color:var(--muted);font-size:13px;margin:0 0 16px}
.auth-card .field input{max-width:none;width:100%}
.auth-card .btn.primary{width:100%;padding:12px;font-size:13px;margin-top:6px}
.auth-card .text-link{display:block;margin:12px auto 0}
.sidebar-bottom{flex-wrap:wrap}
.user-actions{display:flex;gap:6px;flex-basis:100%;margin-top:8px}
.user-actions .btn{flex:1;justify-content:center}
.user-actions .logout-btn{border-color:#c0392b;color:#c0392b}
.user-actions .logout-btn:hover{background:#c0392b;color:#fff}
.sidebar-bottom div small{display:block}
.auth-card h1{font:26px/1.2 Georgia,serif;font-weight:normal;letter-spacing:-.4px}
/* Acesso por perfil */
body.sem-cad-clientes [data-new="clientes"],body.sem-cad-processos [data-new="processos"]{display:none!important}
body.fin-pagar [data-fin-new="receber"],body.fin-pagar select[name="tipo"] option[value="receber"]{display:none!important}
.perm-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px 18px;align-items:end;margin:6px 0 14px}
.row-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.scope-list{max-height:320px;overflow:auto;border:1px solid var(--line);border-radius:6px;padding:10px;background:#fff}
.scope-list small{color:var(--muted)}
#scope-q{max-width:none;width:100%}
/* Barra lateral em telas baixas: o usuário e o botão Sair ficam sempre visíveis */
.sidebar{overflow-y:auto;overscroll-behavior:contain}
.sidebar-bottom{flex-shrink:0}
@media (max-height:900px){.sidebar-note{display:none}.sidebar{padding-top:20px}}
@media (max-height:720px){.brand{margin-bottom:12px}#navigation a{padding-top:6px;padding-bottom:6px}}
.credentials-card dl{display:grid;grid-template-columns:auto 1fr;gap:6px 16px;margin:14px 0;font-size:15px}
.credentials-card dt{color:var(--muted,#777)}
.credentials-card .credentials-pass{font-family:ui-monospace,Menlo,monospace;font-size:20px;letter-spacing:2px;font-weight:600}

/* Leitura de documentos */
.drop-zone{display:flex;flex-direction:column;align-items:center;gap:6px;padding:34px 16px;border:2px dashed var(--line,#d8d6cf);border-radius:14px;cursor:pointer;text-align:center;color:var(--muted,#6b6b63);transition:border-color .15s,background .15s}
.drop-zone svg{width:30px;height:30px;stroke:currentColor;fill:none;stroke-width:1.5}
.drop-zone strong{color:var(--ink,#1f211c)}
.drop-zone.over,.drop-zone:hover{border-color:var(--accent,#9a7b3f);background:rgba(154,123,63,.06)}
.reading-card{border:1px solid var(--line,#e2e0d8);border-radius:14px;padding:16px 18px;margin-top:16px;background:var(--surface,#fff)}
.reading-card>header{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.reading-card>header small{display:block;color:var(--muted,#6b6b63);margin-top:2px}
.reading-card h3{font-size:13px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted,#6b6b63);margin:18px 0 8px}
.reading-card.is-done{border-color:#7fae84}
.reading-card.is-error{border-color:#d49b8f}
.reading-card td small{display:block;color:var(--muted,#6b6b63)}
.reading-event{display:grid;grid-template-columns:auto 1fr 220px;gap:6px 12px;align-items:center;padding:10px 0;border-top:1px solid var(--line,#eeece6)}
.reading-event>small,.reading-event>.badge{grid-column:1/-1}
.reading-new{margin-top:10px}
.reading-actions{display:flex;gap:12px;align-items:center;margin-top:18px}
.reading-log{margin:10px 0 0;padding-left:18px;line-height:1.7}
.tone-ok{background:#e4f1e5!important;color:#2f6b37!important}
.tone-new{background:#f6ecd9!important;color:#8a6420!important}
@media (max-width:720px){.reading-event{grid-template-columns:1fr}}
.reading-fees{border-left:3px solid var(--line,#e2e0d8);padding:4px 0 4px 14px;margin:10px 0}
.reading-fees .form-grid{margin:4px 0 10px}
