:root {
  --green: #167353;
  --green-dark: #0d503a;
  --green-soft: #eaf6f1;
  --mint: #dff4eb;
  --ink: #18302a;
  --muted: #6d7c77;
  --line: #e4ebe8;
  --bg: #f6f8f7;
  --white: #fff;
  --blue: #edf4ff;
  --amber: #fff4df;
  --red: #b42318;
  --shadow: 0 10px 30px rgba(20, 67, 52, 0.07);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
}
.hidden {
  display: none !important;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 250px;
  background: var(--white);
  border-right: 1px solid var(--line);
  padding: 26px 18px 20px;
  display: flex;
  flex-direction: column;
  z-index: 30;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ink);
  padding: 0 8px 30px;
}
.brand-mark {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(22, 115, 83, 0.2);
}
.brand b {
  display: block;
  font-size: 21px;
  letter-spacing: -0.8px;
}
.brand b span {
  color: var(--green);
}
.brand small,
.profile-link small,
.ari-side small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 2px;
}

.brand .brand-mark {
  animation: appBrandEnter 520ms cubic-bezier(0.2, 0.85, 0.3, 1.15) both;
}

button:active,
.dashboard-action:active {
  transform: translateY(1px) scale(0.985);
}

@keyframes appBrandEnter {
  from {
    opacity: 0;
    transform: scale(0.8) rotate(-5deg);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .brand .brand-mark {
    animation: none;
  }
  button,
  .dashboard-action {
    transition: none !important;
  }
}
.side-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.side-nav button {
  border: 0;
  background: none;
  border-radius: 11px;
  padding: 12px 13px;
  display: flex;
  align-items: center;
  gap: 13px;
  text-align: left;
  font-weight: 650;
  color: #52625d;
}
.side-nav button span {
  width: 22px;
  text-align: center;
  font-size: 19px;
}
.side-nav button:hover,
.side-nav button.active {
  background: var(--green-soft);
  color: var(--green);
}
.ari-side {
  margin-top: auto;
  border: 0;
  background: linear-gradient(145deg, #e6f7f0, #f0f8ff);
  border-radius: 14px;
  padding: 13px;
  display: flex;
  gap: 10px;
  text-align: left;
  align-items: center;
}
.ari-avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: white;
  box-shadow: 0 4px 12px rgba(22, 115, 83, 0.22);
}
.ari-side b {
  font-size: 13px;
}
.profile-link {
  border: 0;
  border-top: 1px solid var(--line);
  background: none;
  margin-top: 16px;
  padding: 16px 6px 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  text-align: left;
  gap: 9px;
}
.profile-avatar,
.avatar-btn {
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #dceee7;
  color: var(--green-dark);
  font-weight: 800;
}
.profile-avatar {
  width: 34px;
  height: 34px;
  font-size: 11px;
}
.profile-link b {
  font-size: 12px;
}
.app-shell {
  margin-left: 250px;
  min-height: 100vh;
}
.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 76px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 34px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.app-header strong {
  display: block;
  font-size: 18px;
}
.app-header small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ari-header {
  border: 1px solid #cae7dc;
  background: var(--green-soft);
  color: var(--green);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 750;
}
.icon-btn,
.avatar-btn {
  width: 38px;
  height: 38px;
}
.icon-btn {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  font-size: 22px;
  color: var(--green);
}
.avatar-btn {
  font-size: 11px;
}
.cloud-status {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.cloud-status.saved {
  color: var(--green);
}
.cloud-status.error {
  color: var(--red);
}
.backup-button {
  border: 1px solid var(--line);
  background: white;
  border-radius: 999px;
  padding: 8px 11px;
  font-size: 11px;
  font-weight: 800;
  color: var(--green-dark);
}
main {
  max-width: 1240px;
  margin: auto;
  padding: 35px 38px 70px;
}
.screen {
  display: none;
}
.screen.active {
  display: block;
  animation: fade 0.22s ease;
}
@keyframes fade {
  from {
    opacity: 0.35;
    transform: translateY(4px);
  }
}
h1 {
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -1px;
  margin: 2px 0 7px;
}
h2 {
  font-size: 17px;
  letter-spacing: -0.25px;
  margin: 0 0 12px;
}
.muted {
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}
.eyebrow {
  font-size: 10px !important;
  letter-spacing: 1.25px;
  font-weight: 850;
  color: var(--green);
  margin: 0 0 8px !important;
}
.welcome-row,
.page-intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 25px;
}
.onboarding-guide {
  margin-bottom: 22px;
  border-color: #cfe5da;
  background: linear-gradient(135deg, #ffffff, #f1faf6);
}
.onboarding-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.onboarding-head .muted { max-width: 680px; }
.onboarding-close {
  align-self: flex-start;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #e8f3ee;
  color: var(--green-dark);
  font-size: 21px;
}
.onboarding-progress {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
  margin: 22px 0 16px;
  color: #52645e;
  font-size: 13px;
}
.onboarding-progress > i {
  height: 8px;
  overflow: hidden;
  border-radius: 20px;
  background: #dcebe4;
}
.onboarding-progress em {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transition: width .25s ease;
}
.onboarding-steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.onboarding-step {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid #dceae3;
  border-radius: 13px;
  background: #fff;
}
.onboarding-check {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background: #e8f3ee;
  color: var(--green);
  font-weight: 800;
  font-size: 12px;
}
.onboarding-step.done .onboarding-check { background: var(--green); color: #fff; }
.onboarding-step div { min-width: 0; }
.onboarding-step b,
.onboarding-step small { display: block; }
.onboarding-step b { font-size: 13px; }
.onboarding-step small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}
.onboarding-step button {
  border: 0;
  border-radius: 9px;
  padding: 8px 10px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 750;
}
.onboarding-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.section-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
}
.section-tools-stacked { align-items: stretch; flex-direction: column; }
.section-search {
  display: flex;
  align-items: center;
  gap: 9px;
  width: min(100%, 620px);
  padding: 0 14px;
  border: 1px solid #d8e3de;
  border-radius: 14px;
  background: #fff;
}
.section-search span { color: #167353; font-size: 1.25rem; }
.section-search input { border: 0; box-shadow: none; background: transparent; width: 100%; min-height: 44px; padding: 0; }
.section-search input:focus { outline: 0; box-shadow: none; }
.tool-status { color: #66756f; }
.activity-summary-tabs {
  display: inline-flex;
  gap: 4px;
  margin: 0 0 14px;
  padding: 4px;
  border-radius: 12px;
  background: #edf3f0;
}
.activity-summary-tabs button {
  min-width: 88px;
  padding: 9px 16px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #52645d;
  font-weight: 700;
  cursor: pointer;
}
.activity-summary-tabs button.active { background: #fff; color: #126646; box-shadow: 0 2px 8px rgba(24, 76, 58, .1); }
.activity-week-summary { margin-bottom: 18px; padding: 18px; border: 1px solid #dbe8e2; border-radius: 18px; background: #f8fcfa; }
.activity-week-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.activity-week-day {
  min-height: 118px;
  padding: 12px 10px;
  border: 1px solid #dce7e2;
  border-radius: 14px;
  background: #fff;
  color: #31483f;
  text-align: left;
  cursor: pointer;
}
.activity-week-day:hover, .activity-week-day:focus-visible { border-color: #167353; }
.activity-week-day.today { box-shadow: inset 0 0 0 2px #8fd0b8; }
.activity-week-day > span, .activity-week-day > small { display: block; }
.activity-week-day > span { color: #64756e; font-size: .78rem; text-transform: uppercase; }
.activity-week-day > b { display: block; margin: 3px 0 10px; font-size: 1.1rem; }
.activity-week-day > strong { display: block; color: #167353; }
.activity-week-day > small { margin-top: 4px; color: #6d7b76; }
.section-dashboard { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.section-dashboard > button,
.section-dashboard > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 70px;
  padding: 14px 16px;
  border: 1px solid #dce7e2;
  border-radius: 16px;
  background: #fff;
  color: #42534d;
  text-align: left;
}
.section-dashboard > button { cursor: pointer; }
.section-dashboard > button.active { border-color: #167353; background: #edf8f3; color: #125c43; }
.section-dashboard > button:hover,
.section-dashboard > button:focus-visible { border-color: #167353; transform: translateY(-1px); }
.section-dashboard b { color: #153b2f; font-size: 1.45rem; }
.client-origin-dashboard { display: flex; flex-wrap: wrap; }
.client-origin-dashboard > button {
  flex: 0 1 auto;
  min-height: 48px;
  gap: 12px;
  border-color: var(--origin-color, #167353);
}
.client-origin-dashboard > button.active {
  background: var(--origin-color, #167353);
  border-color: var(--origin-color, #167353);
  color: var(--origin-text, #fff);
}
.client-origin-dashboard > button.active b { color: inherit; }
.search-empty { grid-column: 1 / -1; }
@media (max-width: 760px) {
  .section-tools { align-items: stretch; flex-direction: column; }
  .section-dashboard { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .activity-week-days { grid-template-columns: 1fr; }
  .activity-week-day { min-height: 0; display: grid; grid-template-columns: 70px 1fr auto; align-items: center; gap: 8px; }
  .activity-week-day > b, .activity-week-day > strong, .activity-week-day > small { margin: 0; }
}
.compact {
  width: auto !important;
  margin: 0 !important;
  padding: 11px 17px !important;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.metrics article,
.card,
.center-card,
.invoice-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 2px 4px rgba(23, 63, 51, 0.015);
}
.metrics article {
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 105px;
}
.metrics article.dashboard-action {
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.metrics article.dashboard-action:hover,
.metrics article.dashboard-action:focus-visible {
  transform: translateY(-2px);
  border-color: #9bcfbd;
  box-shadow: var(--shadow);
  outline: none;
}
.metrics article.featured {
  border-color: #c8e3d9;
  background: linear-gradient(135deg, #fff, #f3fbf7);
}
.metric-icon {
  display: grid !important;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  color: var(--green) !important;
  font-weight: 850;
  font-size: 17px !important;
}
.metric-icon.mint {
  background: var(--mint);
}
.metric-icon.blue {
  background: var(--blue);
  color: #3d6ba8 !important;
}
.metric-icon.green {
  background: var(--green);
  color: #fff !important;
}
.metric-icon.amber {
  background: var(--amber);
  color: #a76413 !important;
}
.metrics article div > span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.metrics b {
  display: block;
  font-size: 24px;
  letter-spacing: -0.6px;
  margin: 4px 0 1px;
}
.metrics small {
  color: #9aa6a2;
  font-size: 10px;
}
.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(250px, 0.75fr);
  gap: 20px;
}
.card,
.center-card {
  padding: 20px;
  margin-bottom: 16px;
}
.card-head,
.center-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.card-head button {
  border: 0;
  background: none;
  color: var(--green);
  font-size: 12px;
  font-weight: 750;
}
.center-summary {
  display: flex;
  flex-direction: column;
}
.center-summary > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 14px 2px;
}
.center-summary > div:first-child {
  border-top: 0;
}
.center-summary span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}
.center-summary strong {
  display: block;
  color: var(--green);
  font-size: 13px;
  margin-top: 5px;
}
.center-summary .summary-origin {
  display: flex;
  width: fit-content;
  margin-top: 6px;
  border-radius: 999px;
  padding: 4px 8px;
  background: #eef3ff;
  color: #4d6396;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.25px;
}
.center-summary .summary-service {
  max-width: 240px;
  text-align: right;
}
.origin-summary-card {
  margin-top: 0;
}
.origin-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}
.origin-summary-item {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: var(--bg);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.origin-summary-item:hover,
.origin-summary-item:focus-visible {
  transform: translateY(-2px);
  border-color: #9bcfbd;
  box-shadow: var(--shadow);
  outline: none;
}
.origin-summary-item span,
.origin-summary-item small {
  display: block;
}
.origin-summary-item span {
  min-height: 34px;
  color: #4d6396;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
  text-transform: uppercase;
}
.origin-summary-item b {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 28px;
}
.origin-summary-item small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}
.empty-state {
  color: var(--muted);
  padding: 25px 2px;
  line-height: 1.5;
  font-size: 14px;
}
.calendar-connect {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}
.calendar-copy {
  display: flex;
  align-items: center;
  gap: 12px;
}
.calendar-copy h2 {
  margin-bottom: 3px;
}
.calendar-copy p {
  font-size: 12px;
}
.google-icon {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: #4285f4;
}
.button-stack {
  display: flex;
  gap: 8px;
}
.quick-panel {
  min-width: 0;
}
.ari-card {
  background: linear-gradient(150deg, #167353 0%, #0b5940 100%);
  color: white;
  border-radius: 18px;
  padding: 25px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.ari-card:after {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  right: -70px;
  top: -45px;
}
.ari-card .ari-orbit {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  margin-bottom: 24px;
}
.ari-card .eyebrow {
  color: #aee5d1;
}
.ari-card h2 {
  font-size: 21px;
}
.ari-card p:not(.eyebrow) {
  font-size: 13px;
  color: #d9eee7;
  line-height: 1.55;
}
.ari-card button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  border: 0;
  border-radius: 11px;
  background: white;
  color: var(--green-dark);
  padding: 12px 14px;
  font-weight: 800;
  margin-top: 18px;
}
.quick-actions {
  padding: 17px;
}
.quick-actions > button {
  width: 100%;
  display: grid;
  grid-template-columns: 32px 1fr;
  grid-template-rows: auto auto;
  border: 0;
  border-top: 1px solid var(--line);
  background: none;
  text-align: left;
  padding: 12px 0;
  column-gap: 9px;
}
.quick-actions > button:first-of-type {
  border-top: 0;
}
.quick-actions > button > span {
  grid-row: 1/3;
  display: grid;
  place-items: center;
  background: var(--green-soft);
  color: var(--green);
  border-radius: 9px;
}
.quick-actions b {
  font-size: 12px;
}
.quick-actions small {
  color: var(--muted);
  font-size: 10px;
  margin-top: 2px;
}
.primary,
.secondary {
  border-radius: 11px;
  padding: 12px 15px;
  font-weight: 750;
  margin-top: 10px;
}
.primary {
  width: 100%;
  border: 1px solid var(--green);
  background: var(--green);
  color: white;
}
.primary:hover {
  background: var(--green-dark);
}
.secondary {
  width: 100%;
  background: white;
  border: 1px solid #b9d8cc;
  color: var(--green);
}
.text-button {
  width: 100%;
  border: 0;
  background: none;
  color: var(--muted);
  padding: 12px;
  font-weight: 700;
}
.month-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 14px;
}
.month-nav button {
  border: 0;
  background: var(--green-soft);
  color: var(--green);
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 22px;
}
.month-nav div {
  text-align: center;
}
.month-nav b {
  text-transform: capitalize;
}
.month-nav span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 2px;
}
.activity-calendar-card {
  margin-bottom: 16px;
}
.activity-calendar-card .card-head .muted {
  margin: 4px 0 0;
}
.activity-calendar-card .card-head .secondary {
  width: auto;
}
.activity-calendar-weekdays,
.activity-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
  min-width: 840px;
}
.activity-calendar-scroll {
  overflow-x: auto;
  padding: 2px 2px 8px;
}
.activity-calendar-weekdays {
  margin: 10px 0 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}
.activity-calendar-day {
  min-height: 128px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  text-align: left;
  overflow: hidden;
}
.activity-calendar-day-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-weight: 850;
}
.activity-calendar-day-head > span {
  font-size: 15px;
}
.activity-calendar-day-head b {
  min-width: 21px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #edf3f1;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}
.activity-calendar-appointment {
  display: flex;
  gap: 5px;
  align-items: center;
  min-width: 0;
  margin-top: 4px;
  padding: 5px 6px;
  border-radius: 7px;
  color: #fff;
  line-height: 1.15;
}
.activity-calendar-appointment strong {
  flex: 0 0 auto;
  font-size: 10px;
}
.activity-calendar-appointment em {
  min-width: 0;
  overflow: hidden;
  font-size: 10px;
  font-style: normal;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.activity-calendar-more {
  display: block;
  margin-top: 5px;
  color: var(--green);
  font-size: 10px;
  font-weight: 800;
}
.activity-calendar-origin-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 14px 0 10px;
}
.activity-calendar-origin-legend span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}
.activity-day-summary {
  margin: 8px 0 14px;
  padding: 16px;
  border: 1px solid #b9d8cc;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--green-soft), #fff);
}
.activity-day-summary-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.activity-day-summary-head span {
  color: var(--green);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .08em;
}
.activity-day-summary-head h3 {
  margin: 4px 0 0;
  text-transform: capitalize;
}
.activity-day-summary-head > b {
  color: var(--green);
  font-size: 12px;
  line-height: 1.4;
  text-align: right;
}
.activity-day-agenda {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.activity-day-agenda-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 12px;
  border-left: 5px solid var(--activity-color);
  border-radius: 11px;
  background: rgba(255,255,255,.82);
}
.activity-day-agenda-item time {
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
}
.activity-day-agenda-item div {
  min-width: 0;
}
.activity-day-agenda-item b,
.activity-day-agenda-item span {
  display: block;
}
.activity-day-agenda-item b {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.activity-day-agenda-item span {
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.activity-day-agenda.empty-state {
  display: block;
  padding: 14px;
  background: rgba(255,255,255,.82);
}
.activity-calendar-day.has-activities {
  border-color: #cfdcd7;
  background: #fff;
}
.activity-calendar-day.selected {
  outline: 2px solid var(--green);
  outline-offset: 1px;
}
.activity-calendar-blank {
  min-height: 1px;
}
.badge {
  background: var(--green-soft);
  color: var(--green);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 800;
}
.session-row {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.session-row:last-child {
  border-bottom: 0;
}
.session-row time {
  font-weight: 800;
}
.session-row span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}
.session-row.unclassified {
  border-left: 3px solid #d08a21;
  padding-left: 10px;
}
.billing-state {
  display: inline-flex !important;
  width: fit-content;
  margin-top: 6px !important;
  border-radius: 999px;
  padding: 4px 8px;
  background: #fff5df;
  color: #8a5a08 !important;
  font-size: 10px !important;
  font-weight: 800;
}
.billing-state.billed {
  background: var(--green-soft);
  color: var(--green-dark) !important;
}
.billing-state.not-required {
  background: #eef2f0;
  color: #5f6f6a !important;
}
.form-card {
  max-width: 720px;
}
label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin: 14px 0;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #dce5e1;
  border-radius: 10px;
  padding: 12px;
  background: white;
  margin-top: 6px;
  outline: none;
  color: var(--ink);
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.three {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.status {
  color: var(--green);
  font-size: 12px;
}
.status.error {
  color: var(--red);
}
.close-btn {
  border: 0;
  background: var(--bg);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 18px;
}
.center-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}
.center-card {
  margin: 0;
}
.center-head p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 12px;
}
.financial-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin: 16px 0;
}
.financial-grid div {
  background: var(--bg);
  padding: 12px;
  border-radius: 10px;
}
.financial-grid span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 5px;
}
.invoice-direction-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  max-width: 520px;
  margin-bottom: 18px;
  padding: 5px;
  background: #eaf2ee;
  border-radius: 13px;
}
.invoice-direction-tabs button {
  border: 0;
  border-radius: 9px;
  background: transparent;
  padding: 11px 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.invoice-direction-tabs button.active {
  background: #fff;
  color: var(--green);
  box-shadow: 0 2px 8px rgba(23, 63, 51, 0.08);
}
.tabs {
  display: flex;
  gap: 7px;
  margin-bottom: 15px;
}
.tabs button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
}
.tabs button.active {
  background: var(--green-soft);
  border-color: #cce4da;
  color: var(--green);
}
.invoice-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding: 16px;
}
.invoice-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}
.invoice-card strong {
  display: block;
  text-align: right;
  margin-bottom: 6px;
}
.invoice-card em {
  font-style: normal;
  background: var(--amber);
  color: #99600a;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 750;
}
.invoice-card em.done {
  background: var(--green-soft);
  color: var(--green);
}
.total-row {
  display: flex;
  justify-content: space-between;
  padding: 16px 0;
  font-size: 20px;
}
.resource-list {
  padding: 6px 20px;
}
.resource-btn {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 0;
  background: white;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.resource-btn:last-child {
  border: 0;
}
.resource-btn > span {
  font-size: 20px;
}
.resource-btn b,
.resource-btn small {
  display: block;
}
.resource-btn small {
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}
.resource-btn i {
  font-style: normal;
  font-size: 22px;
  color: #9aa6a2;
}
.integration-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.integration-row span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}
.privacy-note {
  background: var(--green-soft);
  border-radius: 10px;
  padding: 12px;
  color: #4f6d62;
  font-size: 11px;
  margin: 16px 0 0;
}
.invoice-paper {
  background: white;
  padding: 28px;
  border-radius: 16px;
  border: 1px solid var(--line);
}
.invoice-head,
.invoice-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.invoice-head {
  padding-bottom: 20px;
  border-bottom: 2px solid var(--green);
}
.invoice-head .right {
  text-align: right;
}
.invoice-head span,
.invoice-meta span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}
.invoice-meta {
  margin: 24px 0;
}
.invoice-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-block: 1px solid var(--line);
}
.invoice-line span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}
.invoice-grand-total {
  display: flex;
  justify-content: space-between;
  font-size: 22px;
  padding: 20px 0;
}
.bottom-nav {
  display: none;
}
.ari-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 28, 22, 0.45);
  backdrop-filter: blur(3px);
  z-index: 100;
  display: flex;
  justify-content: flex-end;
  padding: 15px;
}
.ari-modal {
  width: min(420px, 100%);
  height: 100%;
  background: #fff;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}
.ari-modal > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 17px 18px;
  border-bottom: 1px solid var(--line);
}
.ari-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ari-title b,
.ari-title small {
  display: block;
}
.ari-title small {
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}
.ari-modal > header > button {
  border: 0;
  background: var(--bg);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 20px;
}
.ari-messages {
  padding: 22px;
  overflow: auto;
  flex: 1;
  background: #f8faf9;
}
.ari-bubble {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px 16px 16px 16px;
  padding: 15px;
  box-shadow: var(--shadow);
  font-size: 13px;
  line-height: 1.5;
}
.ari-bubble p {
  margin: 5px 0 0;
}
.ari-bubble.user {
  margin-left: 35px;
  background: var(--green);
  color: white;
  border-radius: 16px 5px 16px 16px;
}
.ari-suggestions {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 15px;
}
.ari-suggestions button {
  border: 1px solid #cce3da;
  background: #fff;
  color: var(--green);
  padding: 10px;
  border-radius: 999px;
  font-size: 11px;
}
.ari-input {
  display: flex;
  gap: 8px;
  padding: 13px 15px;
  border-top: 1px solid var(--line);
}
.ari-input input {
  margin: 0;
}
.ari-input button {
  border: 0;
  background: var(--green);
  color: white;
  width: 42px;
  border-radius: 10px;
  font-size: 20px;
}
.ari-disclaimer {
  text-align: center;
  color: #8a9893;
  font-size: 9px;
  margin: 0 15px 12px;
}
.toast {
  position: fixed;
  z-index: 200;
  left: 50%;
  bottom: 25px;
  transform: translate(-50%, 20px);
  background: #173b30;
  color: white;
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: 0.25s;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.cloud-gate {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(246, 248, 247, 0.96);
  display: grid;
  place-items: center;
}
.cloud-gate.hidden {
  display: none;
}
.cloud-gate > div {
  display: grid;
  justify-items: center;
  gap: 9px;
  text-align: center;
}
.cloud-gate small {
  color: var(--muted);
}
.backup-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(8, 28, 22, 0.48);
  display: grid;
  place-items: center;
  padding: 18px;
}
.dashboard-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 125;
  display: flex;
  justify-content: flex-end;
  padding: 15px;
  background: rgba(8, 28, 22, 0.48);
  backdrop-filter: blur(3px);
}
.dashboard-detail-panel {
  display: flex;
  flex-direction: column;
  width: min(480px, 100%);
  height: 100%;
  overflow: hidden;
  padding: 22px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}
.dashboard-detail-panel header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--line);
}
.dashboard-detail-panel header h2 {
  margin: 3px 0 0;
}
.dashboard-detail-panel header .muted {
  margin: 6px 0 0;
}
.dashboard-detail-list {
  flex: 1;
  overflow: auto;
  padding: 10px 0;
}
.dashboard-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 2px;
  border-bottom: 1px solid var(--line);
}
.dashboard-detail-row b,
.dashboard-detail-row span {
  display: block;
}
.dashboard-detail-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}
.dashboard-detail-row strong {
  flex: 0 0 auto;
  color: var(--green);
}
.dashboard-detail-row strong.negative-detail-amount {
  color: #b85f18;
}
.finance-detail-row > div {
  min-width: 0;
  flex: 1 1 180px;
}
.finance-detail-row > div b,
.finance-detail-row > div span {
  overflow-wrap: anywhere;
}
.finance-detail-row .finance-detail-action {
  width: auto;
  flex: 0 0 auto;
}
.dashboard-detail-row .dashboard-edit-session {
  width: auto;
  flex: 0 0 auto;
}
.dashboard-detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 14px;
}
.dashboard-detail-actions button {
  margin: 0;
}
.backup-modal {
  width: min(540px, 100%);
  max-height: min(650px, 90vh);
  overflow: auto;
  background: #fff;
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}
.client-import-modal {
  width: min(920px, 100%);
}
.client-import-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0 8px;
}
.client-import-actions button {
  width: auto;
  margin: 0;
}
.client-import-preview {
  max-height: 390px;
  overflow: auto;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.client-import-preview table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.client-import-preview th,
.client-import-preview td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.client-import-preview th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bg);
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}
.import-result {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.import-result.create {
  background: var(--green-soft);
  color: var(--green-dark);
}
.import-result.update {
  background: var(--blue);
  color: #3d5f98;
}
.import-result.error {
  background: #fde9e7;
  color: var(--red);
}
#confirmClientImport {
  margin-bottom: 0;
}
.backup-modal header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.backup-list {
  display: grid;
  gap: 9px;
  margin-top: 18px;
}
.backup-list > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
}
.backup-list span,
.backup-list small {
  display: block;
}
.backup-list small {
  color: var(--muted);
  margin-top: 3px;
}
.backup-list button {
  border: 1px solid #b9d8cc;
  background: white;
  color: var(--green);
  border-radius: 9px;
  padding: 8px 10px;
  font-weight: 800;
  font-size: 11px;
}
@media (max-width: 1050px) {
  .metrics {
    grid-template-columns: 1fr 1fr;
  }
  .home-grid {
    grid-template-columns: 1fr;
  }
  .quick-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .ari-card,
  .quick-actions {
    margin: 0;
  }
}
@media (max-width: 760px) {
  .sidebar {
    display: none;
  }
  .app-shell {
    margin: 0;
  }
  .app-header {
    height: 66px;
    padding: calc(8px + env(safe-area-inset-top)) 16px 8px;
  }
  .ari-header,
  .avatar-btn,
  .cloud-status {
    display: none;
  }
  .backup-button {
    padding: 7px 9px;
  }
  main {
    padding: 22px 15px calc(92px + env(safe-area-inset-bottom));
  }
  h1 {
    font-size: 26px;
  }
  .welcome-row,
  .page-intro {
    align-items: flex-start;
  }
  .welcome-row .primary {
    display: none;
  }
  .onboarding-steps { grid-template-columns: 1fr; }
  .onboarding-step { grid-template-columns: auto 1fr; }
  .onboarding-step button { grid-column: 2; justify-self: start; }
  .metrics {
    gap: 10px;
  }
  .metrics article {
    padding: 14px;
    min-height: 92px;
  }
  .metric-icon {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }
  .metrics b {
    font-size: 20px;
  }
  .quick-panel {
    grid-template-columns: 1fr;
  }
  .center-cards {
    grid-template-columns: 1fr;
  }
  .bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 7px 5px calc(7px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
  }
  .bottom-nav button {
    border: 0;
    background: none;
    color: #788681;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-size: 18px;
  }
  .bottom-nav button span {
    font-size: 9px;
  }
  .bottom-nav button.active {
    color: var(--green);
  }
  .calendar-connect {
    align-items: stretch;
    flex-direction: column;
  }
  .button-stack {
    flex-direction: column;
  }
  .ari-overlay {
    padding: 0;
  }
  .ari-modal {
    border-radius: 0;
  }
  .ari-card {
    padding: 22px;
  }
}
@media (max-width: 430px) {
  .dashboard-detail-overlay {
    padding: 0;
  }
  .dashboard-detail-panel {
    border-radius: 0;
  }
  .dashboard-detail-actions {
    grid-template-columns: 1fr;
  }
  .center-summary .summary-service {
    max-width: none;
    text-align: left;
  }
  .metrics article {
    display: block;
  }
  .metrics article .metric-icon {
    margin-bottom: 9px;
  }
  .two {
    grid-template-columns: 1fr;
  }
  .page-intro {
    display: block;
  }
  .page-intro .primary {
    margin-top: 15px !important;
  }
  .session-row {
    grid-template-columns: 48px 1fr;
  }
  .activity-calendar-weekdays,
  .activity-calendar {
    gap: 6px;
  }
  .activity-calendar-day {
    min-height: 120px;
    padding: 7px;
    text-align: left;
  }
  .activity-day-agenda {
    grid-template-columns: 1fr;
  }
  .dashboard-detail-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .session-row > strong {
    grid-column: 2;
  }
  .center-summary > div {
    display: block;
  }
  .center-summary strong {
    display: block;
    margin-top: 7px;
  }
}
@page {
  size: A4;
  margin: 0;
}
@media print {
  html,
  body {
    width: 210mm;
    min-height: 297mm;
    background: #fff !important;
  }
  body * {
    visibility: hidden !important;
  }
  #invoicePreview,
  #invoicePreview *,
  #settlementPreview,
  #settlementPreview * {
    visibility: visible !important;
  }
  #invoicePreview,
  #settlementPreview {
    display: block !important;
    position: absolute;
    inset: 0;
    box-sizing: border-box;
    padding: 15mm;
  }
  .invoice-paper {
    border: 0;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
  }
  .invoice-preview-actions,
  #shareInvoiceStatus,
  #shareSettlementStatus,
  #closePreview,
  #closeSettlementPreview,
  .bottom-nav,
  .app-header,
  .sidebar {
    display: none !important;
  }
  body.print-settlement #invoicePreview {
    display: none !important;
  }
  body:not(.print-settlement) #settlementPreview {
    display: none !important;
  }
}

.invoice-payment {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  color: var(--muted);
  font-size: 12px;
}
.invoice-preview-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
.invoice-preview-actions.has-excel-download {
  grid-template-columns: repeat(3, 1fr);
}
.settlement-preview-actions {
  grid-template-columns: repeat(3, 1fr);
}
.settlement-document-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 24px 0;
}
.settlement-document-summary > div {
  padding: 14px;
  border-radius: 12px;
  background: var(--green-soft);
}
.settlement-document-summary span,
.settlement-document-summary b {
  display: block;
}
.settlement-document-summary span {
  color: var(--muted);
  font-size: 11px;
}
.settlement-document-summary b {
  margin-top: 5px;
  color: var(--green-dark);
  font-size: 17px;
}
.settlement-document-detail {
  border-block: 1px solid var(--line);
  padding: 16px 0;
}
.settlement-document-detail-head,
.settlement-document-detail #settlementPreviewBreakdown > div {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 18px;
}
.settlement-document-detail-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}
.settlement-document-detail-head span {
  color: var(--muted);
  font-size: 11px;
}
.settlement-document-detail #settlementPreviewBreakdown > div {
  padding: 10px 0;
  border-top: 1px solid #edf1ef;
}
.settlement-document-detail #settlementPreviewBreakdown > div span,
.settlement-document-detail #settlementPreviewBreakdown > div b {
  font-size: 12px;
}
.settlement-grand-total {
  color: var(--green-dark);
}
.settlement-document-note {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.invoice-preview-actions .primary,
.invoice-preview-actions .secondary {
  margin-top: 0;
}
.invoice-paper.pdf-export {
  width: 794px !important;
  min-height: 1123px !important;
  padding: 57px !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-sizing: border-box !important;
}
.invoice-paper.pdf-export.has-template .invoice-content {
  margin: 11px;
  padding: 34px;
}
@media (max-width: 700px) {
  .invoice-preview-actions,
  .invoice-preview-actions.has-excel-download {
    grid-template-columns: 1fr;
  }
  .settlement-preview-actions,
  .settlement-document-summary {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .bottom-nav {
    grid-template-columns: repeat(6, 1fr);
  }
  .bottom-nav button {
    min-width: 0;
    padding-inline: 1px;
  }
  .bottom-nav button span {
    font-size: 8px;
    white-space: nowrap;
  }
}

.invoice-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.invoice-actions strong {
  width: 100%;
}
.invoice-state-btn {
  border: 0;
  background: none;
  color: var(--green);
  font-size: 10px;
  font-weight: 800;
  padding: 4px;
}
.finance-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}
.finance-metrics article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}
.finance-metrics .finance-metric-card {
  position: relative;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.finance-metrics .finance-metric-card::after {
  content: "Ver detalle →";
  position: absolute;
  right: 15px;
  bottom: 10px;
  color: var(--green);
  font-size: 9px;
  font-weight: 800;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.finance-metrics .finance-metric-card:hover,
.finance-metrics .finance-metric-card:focus-visible {
  transform: translateY(-2px);
  border-color: #afd7c7;
  box-shadow: 0 10px 24px rgba(16, 91, 66, 0.1);
  outline: none;
}
.finance-metrics .finance-metric-card:hover::after,
.finance-metrics .finance-metric-card:focus-visible::after {
  opacity: 1;
}
.finance-metrics span,
.finance-metrics small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.finance-metrics b {
  display: block;
  font-size: 23px;
  margin: 7px 0 4px;
  letter-spacing: -0.5px;
}
.finance-metrics .finance-result {
  background: linear-gradient(145deg, var(--green), var(--green-dark));
  color: #fff;
  border-color: transparent;
}
.finance-metrics .finance-result span,
.finance-metrics .finance-result small {
  color: #d8eee6;
}
.finance-metrics .finance-result::after {
  color: #fff;
}
.finance-metrics .negative {
  color: #ffd3cc;
}
.finance-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 16px;
  align-items: start;
}
.finance-bars {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 22px;
}
.finance-bars > div > span {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}
.finance-bars strong {
  color: var(--green);
}
.finance-bars i {
  display: block;
  height: 12px;
  background: var(--bg);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 8px;
}
.finance-bars em {
  display: block;
  height: 100%;
  background: var(--green);
  border-radius: inherit;
  transition: width 0.35s ease;
}
.finance-bars > div:nth-child(2) em {
  background: #d88938;
}
.movement-row {
  display: grid;
  grid-template-columns: 38px 1fr auto 28px;
  align-items: center;
  gap: 11px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.movement-row:last-child {
  border-bottom: 0;
}
.movement-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 900;
}
.movement-icon.expense {
  background: #fff0e7;
  color: #b85f18;
}
.movement-icon.pending {
  background: var(--amber);
  color: #99600a;
}
.movement-row b,
.movement-row span {
  display: block;
}
.movement-row span {
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}
.movement-row > strong {
  color: var(--green);
  white-space: nowrap;
}
.movement-row .expense-amount {
  color: #b85f18;
}
.movement-row .pending-amount {
  color: #99600a;
}
.delete-movement {
  border: 0;
  background: var(--bg);
  border-radius: 50%;
  width: 26px;
  height: 26px;
  color: var(--muted);
}
.record-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.record-actions button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--green-dark);
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 10px;
  font-weight: 800;
}
.record-actions button:hover {
  background: var(--green-soft);
  border-color: #cce4da;
}
.record-actions .prepare-invoice {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.record-actions .prepare-invoice:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
}
.client-quick-actions button:disabled {
  cursor: default;
  opacity: 0.62;
}
.advisor-export-status {
  margin: -10px 0 18px;
}
.record-actions .danger-link {
  color: var(--red);
}
.record-actions .danger-link:hover {
  background: #fff1ef;
  border-color: #f1c4be;
}
.session-row > .record-actions {
  grid-column: 2/-1;
}
.center-actions {
  margin-top: 10px;
}
.client-quick-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.client-quick-actions button {
  margin-top: 0;
}
.client-activity-history-row > div {
  min-width: 0;
}
.calendar-color-field input[type="color"] {
  width: 74px;
  height: 44px;
  padding: 4px;
  cursor: pointer;
}
.quick-origin-center-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px 14px;
  align-items: end;
  margin: -2px 0 14px;
  padding: 14px;
  border: 1px solid #cce4da;
  border-radius: 14px;
  background: var(--green-soft);
}
.quick-origin-center-actions {
  display: flex;
  grid-column: 1 / -1;
  gap: 8px;
}
.quick-origin-center-actions button {
  width: auto;
  margin: 0;
}
.invoice-actions > .record-actions {
  width: 100%;
}
.movement-row {
  grid-template-columns: 38px 1fr auto;
  min-width: 0;
}
.movement-row > .record-actions {
  grid-column: 2/-1;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}
.movement-row > div:not(.record-actions) {
  min-width: 0;
}
.movement-row > div:not(.record-actions) b,
.movement-row > div:not(.record-actions) span {
  overflow-wrap: anywhere;
}
.form-card .text-button {
  margin-top: 3px;
}
.invoice-tax-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0;
}
.invoice-tax-summary span {
  padding: 10px;
  border-radius: 10px;
  background: var(--bg);
  color: var(--muted);
  font-size: 11px;
}
.invoice-tax-summary b {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 14px;
}
.movement-row.row-income {
  background: #eef9f3;
  margin: 0 -12px;
  padding-left: 12px;
  padding-right: 12px;
  border-radius: 10px;
}
.movement-row.row-expense {
  background: #fff1ef;
  margin: 0 -12px;
  padding-left: 12px;
  padding-right: 12px;
  border-radius: 10px;
}
.field-help {
  margin: -2px 0 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.settlement-config {
  margin: 18px 0;
  padding: 18px;
  border: 1px solid #d7e7e0;
  border-radius: 18px;
  background: #f7fbf9;
}
.settlement-config legend {
  padding: 0 8px;
  color: var(--green-dark);
  font-weight: 800;
}
.check-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 10px;
  margin: 0;
}
.check-row input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--green);
}
.settlement-rate-history {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.settlement-rate-history span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #e8f4ef;
  color: var(--green-dark);
  font-size: 0.82rem;
  font-weight: 700;
}
.settlements-card {
  margin-top: 22px;
}
.settlements-head {
  align-items: flex-start;
  gap: 18px;
}
.settlements-head .muted {
  margin: 6px 0 0;
}
.settlement-config-action {
  display: flex;
  align-items: center;
  gap: 8px;
}
.settlement-config-action select {
  min-width: 180px;
}
.settlement-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}
.settlement-item {
  padding: 16px;
  border: 1px solid #dfe9e5;
  border-radius: 18px;
  background: #fff;
}
.settlement-item.in-progress {
  border-style: dashed;
  background: #fbfdfc;
}
.settlement-item-head,
.settlement-item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.settlement-item-head h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}
.settlement-item-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}
.settlement-status {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff1d6;
  color: #865600;
  font-size: 0.78rem;
  font-weight: 800;
}
.settlement-status.invoice_received {
  background: #e8f0ff;
  color: #2757a5;
}
.settlement-status.paid {
  background: #e4f5ed;
  color: #126245;
}
.settlement-status.in_progress {
  background: #eef1f3;
  color: #52606a;
}
.settlement-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.settlement-metrics div {
  padding: 10px;
  border-radius: 12px;
  background: #f5f8f7;
}
.settlement-metrics span,
.settlement-metrics b {
  display: block;
}
.settlement-metrics span {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.76rem;
}
.settlement-metrics b {
  font-size: 0.94rem;
}
.settlement-item-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}
@media (max-width: 1050px) {
  .finance-metrics {
    grid-template-columns: 1fr 1fr;
  }
  .finance-layout {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .client-quick-actions {
    grid-template-columns: 1fr;
  }
  .quick-origin-center-form {
    grid-template-columns: 1fr;
  }
  .quick-origin-center-actions {
    grid-column: 1;
    flex-direction: column;
  }
  .quick-origin-center-actions button {
    width: 100%;
  }
  .finance-metrics {
    gap: 10px;
  }
  .finance-metrics article {
    padding: 14px;
    min-height: 92px;
  }
  .finance-metrics b {
    font-size: 19px;
  }
  .invoice-card {
    align-items: flex-start;
    gap: 10px;
  }
  .invoice-actions {
    max-width: 190px;
  }
  .movement-row {
    grid-template-columns: 34px 1fr auto;
  }
  .movement-row > strong {
    font-size: 12px;
  }
  .record-actions button {
    padding: 7px 8px;
  }
  .session-row > .record-actions {
    grid-column: 1/-1;
    justify-content: flex-start;
  }
  .movement-row > .record-actions {
    grid-column: 1/-1;
    justify-content: flex-start;
  }
  .three,
  .invoice-tax-summary {
    grid-template-columns: 1fr;
  }
}

.template-manager {
  max-width: 720px;
}
.template-upload {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 12px;
}
.template-list {
  display: grid;
  gap: 9px;
  margin-top: 16px;
}
.template-list > div {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px;
}
.template-list img {
  width: 48px;
  height: 62px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 5px;
}
.template-list b,
.template-list small {
  display: block;
}
.template-list small {
  color: var(--muted);
  font-size: 10px;
  margin-top: 4px;
}
.template-list button {
  border: 1px solid #b9d8cc;
  background: #fff;
  color: var(--green);
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 10px;
  font-weight: 800;
}
.template-list button.danger-link {
  border-color: #f1c4be;
  color: var(--red);
}
.template-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.invoice-paper {
  position: relative;
  overflow: hidden;
}
.invoice-content {
  position: relative;
  z-index: 1;
}
.invoice-template-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.invoice-paper.has-template .invoice-content {
  margin: 3mm;
  padding: 9mm;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
}
.invoice-paper.excel-template {
  min-height: 1123px;
  padding: 0;
}
.invoice-paper.excel-template .invoice-content {
  display: none;
}
.invoice-paper.excel-template .invoice-template-background {
  object-fit: contain;
  background: #fff;
}
@media (max-width: 600px) {
  .template-list > div {
    grid-template-columns: 50px 1fr;
  }
  .template-actions {
    grid-column: 1/-1;
    justify-content: flex-start;
  }
}
@media (max-width: 430px) {
  .template-upload {
    grid-template-columns: 1fr;
  }
  .invoice-paper {
    padding: 16px;
  }
  .invoice-paper.has-template:not(.excel-template) .invoice-content {
    margin: 0;
    padding: 18px 14px;
  }
  .invoice-paper.excel-template {
    min-height: calc((100vw - 32px) * 1.414);
  }
}
@media print {
  .invoice-paper {
    min-height: 267mm;
  }
  .invoice-paper.has-template:not(.excel-template) .invoice-content {
    margin: 3mm;
    padding: 9mm;
  }
  .invoice-paper.excel-template {
    width: 180mm !important;
    height: 267mm !important;
    min-height: 267mm !important;
    max-height: 267mm !important;
  }
  .invoice-template-background {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}

.client-type {
  display: inline-flex;
  margin-top: 8px;
  background: var(--green-soft);
  color: var(--green);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.45px;
}
.client-contact {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
  margin: 10px 0;
}
.resource-viewer {
  max-width: 860px;
}
.resource-viewer textarea {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.55;
  min-height: 390px;
}
.resource-official {
  display: inline-block;
  margin: 12px 0 2px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}
.resource-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.resource-actions .primary,
.resource-actions .secondary {
  margin-top: 10px;
}
@media (max-width: 560px) {
  .resource-actions {
    grid-template-columns: 1fr;
  }
}
.page-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
}
.client-origin {
  display: inline-flex;
  margin: 8px 0 0 5px;
  background: #eef3ff;
  color: #4d6396;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.35px;
}
.center-card.editing-record {
  border: 2px solid var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}
.form-card:not(.hidden) {
  scroll-margin-top: 82px;
}
.invoice-meta > div:last-child {
  text-align: right;
}
@media (max-width: 430px) {
  .page-actions {
    justify-content: stretch;
    margin-top: 15px;
  }
  .page-actions .compact {
    flex: 1;
    padding-inline: 10px !important;
  }
  .page-intro .page-actions .primary {
    margin-top: 0 !important;
  }
}
.period-control {
  margin: 0;
  font-size: 10px;
  color: var(--muted);
}
.period-control input {
  width: 130px;
  margin-top: 3px;
  padding: 8px;
}
.inline-create {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 14px;
  color: var(--muted);
  font-size: 11px;
}
.attachment-info {
  color: var(--green);
  font-size: 11px;
  margin: -6px 0 10px;
}
.invoice-card em.partial {
  background: #e9efff;
  color: #496095;
}
.invoice-card em.overdue {
  background: #fff0ed;
  color: var(--red);
}
.trend-card {
  margin-bottom: 16px;
}
.annual-bars {
  height: 150px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 8px;
  align-items: end;
  margin-top: 18px;
}
.annual-bars > div {
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 5px;
}
.annual-bars > div > span {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 2px;
  height: 100%;
  border-bottom: 1px solid var(--line);
}
.annual-bars i,
.annual-bars em {
  display: block;
  width: 35%;
  min-height: 0;
  border-radius: 5px 5px 0 0;
}
.annual-bars i {
  background: var(--green);
}
.annual-bars em {
  background: #d88938;
}
.annual-bars small {
  text-align: center;
  color: var(--muted);
  font-size: 9px;
}
.report-controls {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.report-controls label {
  margin: 0;
}
.report-controls input {
  padding: 9px;
}
.report-table {
  overflow: auto;
  margin-top: 16px;
}
.report-table table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}
.report-table th,
.report-table td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}
.report-table th {
  background: var(--green-soft);
  color: var(--green-dark);
  position: sticky;
  top: 0;
}
.view-attachment {
  white-space: nowrap;
}
.invoice-create-types {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 13px;
}
.invoice-create-types .secondary {
  background: var(--green-soft);
}
@media (max-width: 760px) {
  .page-actions {
    align-items: flex-end;
  }
  .period-control {
    flex: 1;
  }
  .period-control input {
    width: 100%;
  }
  .annual-bars {
    gap: 4px;
    height: 125px;
  }
  .report-controls > * {
    flex: 1 1 135px;
  }
  .inline-create {
    justify-content: flex-start;
    padding-top: 0;
  }
}
@media (max-width: 760px) {
  .settlements-head,
  .settlement-item-head {
    align-items: stretch;
    flex-direction: column;
  }
  .settlement-config-action {
    align-items: stretch;
    flex-direction: column;
  }
  .settlement-config-action select {
    min-width: 0;
    width: 100%;
  }
  .settlement-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.ari-avatar img,.ari-header img{width:100%;height:100%;object-fit:contain}.ari-avatar{overflow:hidden}.ari-header span{width:28px;height:28px;display:inline-grid;place-items:center}.ari-header img{transform:scale(1.2)}
