html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(164, 130, 93, .45);
}

/* One primary action colour throughout the admin. The Bootstrap classes stay
   unchanged so permission and page-specific button behaviour is unaffected. */
.btn-dark {
  --bs-btn-color: #fff;
  --bs-btn-bg: #a4825d;
  --bs-btn-border-color: #a4825d;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #8e6e4f;
  --bs-btn-hover-border-color: #8e6e4f;
  --bs-btn-focus-shadow-rgb: 164, 130, 93;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #795d42;
  --bs-btn-active-border-color: #795d42;
  --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: #a4825d;
  --bs-btn-disabled-border-color: #a4825d;
}

.btn-outline-dark {
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #a4825d;
  --bs-btn-hover-border-color: #a4825d;
  --bs-btn-focus-shadow-rgb: 164, 130, 93;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #8e6e4f;
  --bs-btn-active-border-color: #8e6e4f;
  --bs-btn-disabled-color: #212529;
  --bs-btn-disabled-bg: transparent;
  --bs-btn-disabled-border-color: #212529;
}

.delete-icon-button {
  --bs-btn-color: #a4825d;
  --bs-btn-bg: #fff;
  --bs-btn-border-color: #d9cab9;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #a4825d;
  --bs-btn-hover-border-color: #a4825d;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #8e6e4f;
  --bs-btn-active-border-color: #8e6e4f;
  --bs-btn-disabled-color: #a4825d;
  --bs-btn-disabled-bg: #f7f4f1;
  --bs-btn-disabled-border-color: #e6ddd3;
  display: inline-grid;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  place-items: center;
}

.delete-icon-button::before {
  content: "";
  width: 1.3rem;
  height: 1.3rem;
  background: currentColor;
  -webkit-mask: url('/images/trash.svg') center / contain no-repeat;
  mask: url('/images/trash.svg') center / contain no-repeat;
}

.delete-icon-button svg {
  display: none;
}

html {
  position: relative;
  min-height: 100%;
  max-width: 100%;
  overflow-x: clip;
}

body {
  margin-bottom: 0;
  max-width: 100%;
  overflow-x: clip;
  background: #f7f7f5;
  color: #20221f;
}

.admin-shell { min-width: 0; min-height: 100vh; display: flex; }
.admin-sidebar { position: sticky; top: 0; width: 248px; height: 100vh; display: flex; flex-direction: column; flex: 0 0 auto; overflow: hidden; padding: 1.5rem 1rem; background: #fff; border-right: 1px solid #e9e6e1; }
.admin-brand { padding: .5rem .75rem 1.75rem; color: #20221f; text-decoration: none; font-size: 1.1rem; font-weight: 700; }
.admin-brand span { color: #8a857d; font-weight: 400; }
.admin-nav { display: grid; flex: 1 1 auto; min-height: 0; gap: .35rem; overflow-y: auto; overscroll-behavior: contain; padding-right: .2rem; }
.admin-nav a { display: flex; align-items: center; padding: .7rem .75rem; color: #5c5b57; border-radius: .7rem; text-decoration: none; font-weight: 500; }
.admin-nav a:hover, .admin-nav a.active { color: #20221f; background: #f0ece7; }
.admin-nav .badge { width: auto; min-width: 1.55rem; flex: 0 0 auto; text-align: center; }
.orders-list-table { table-layout: fixed; }
.order-number-column { width: 12rem; }
.order-customer-column { width: 14rem; }
.order-store-column { width: 6.5rem; white-space: nowrap; }
.order-store-indicator { display: inline-grid; place-items: center; width: 1.25rem; height: 1.25rem; color: #a4825d; font-size: 1.35rem; font-weight: 700; line-height: 1; }
.admin-nav-group { position: relative; display: grid; gap: .25rem; }
.admin-nav-group > summary { display: flex; align-items: center; padding: .7rem .75rem; border-radius: .7rem; color: #5c5b57; font-weight: 500; cursor: pointer; list-style: none; }
.admin-nav-group > summary::-webkit-details-marker { display: none; }
.admin-nav-group > summary:hover, .admin-nav-group > summary.active { color: #20221f; background: #f0ece7; }
.admin-nav .admin-nav-group-label { width: auto; text-align: start; }
.admin-nav .admin-nav-group-chevron { width: auto; margin-left: auto; color: #8a857d; font-size: .9rem; transition: transform .15s ease; }
.admin-nav-group[open] > summary .admin-nav-group-chevron { transform: rotate(180deg); }
.admin-nav-group-links { display: grid; gap: .2rem; margin-left: .75rem; padding-left: .6rem; border-left: 1px solid #e9e3db; }
.admin-nav-group-links a { padding-block: .55rem; font-size: .92rem; }
.admin-sidebar-user { margin-top: auto; padding: 1rem .75rem 0; border-top: 1px solid #eeeae5; }
.admin-sidebar-user .navbar-nav { gap: .25rem; }
.admin-main { min-width: 0; flex: 1 1 auto; }
.admin-content { width: 100%; max-width: 1440px; margin-inline: auto; padding: 2rem; }
.create-fab { position: fixed; right: 2rem; bottom: 2rem; width: 3.25rem; height: 3.25rem; border-radius: 50%; font-size: 1.8rem; line-height: 1; box-shadow: 0 .5rem 1.25rem rgba(32,34,31,.22); z-index: 1040; }
.offcanvas .offcanvas-body { padding-top: 0; }
@media (max-width: 767.98px) { .admin-shell { display: block; } .admin-sidebar { position: static; width: 100%; height: auto; padding: .75rem 1rem; border-right: 0; border-bottom: 1px solid #e9e6e1; } .admin-brand { display: block; padding: .25rem 0 .65rem; font-size: 1.1rem; } .admin-brand span { display: inline; } .admin-nav { display: flex; flex: 0 0 auto; gap: .25rem; overflow-x: auto; padding: 0 .1rem .15rem; } .admin-nav a, .admin-nav-group > summary { flex: 0 0 auto; justify-content: flex-start; white-space: nowrap; padding: .5rem .65rem; } .admin-nav-group { flex: 0 0 auto; } .admin-nav-group-links { display: none; } .admin-nav-group[open] > .admin-nav-group-links { display: grid; position: absolute; z-index: 1030; margin: .2rem 0 0; padding: .35rem; background: #fff; border: 1px solid #e9e3db; border-radius: .7rem; box-shadow: 0 .5rem 1.25rem rgba(32,34,31,.12); } .admin-nav-group-links a { padding-block: .55rem; } .admin-sidebar-user { display: none; } .admin-content { padding: 1rem; } .create-fab { right: 1rem; bottom: 1rem; } }

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.auth-shell {
  min-height: calc(100vh - 220px);
  display: grid;
  place-items: center;
  padding: 2rem 0 4rem;
}

.auth-card {
  width: min(100%, 480px);
  border-radius: 1.25rem;
}

.eyebrow {
  color: #7c6651;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.dashboard-hero {
  background: linear-gradient(135deg, #fff 0%, #f1ebe3 100%);
  border: 1px solid rgba(88, 70, 54, .08);
}
.dashboard-brand-image { display: block; width: min(100%, 760px); height: auto; margin-inline: auto; }

.dashboard-card {
  transition: transform .15s ease, box-shadow .15s ease;
}

.dashboard-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 .75rem 1.5rem rgba(42, 37, 32, .1) !important;
}

.dashboard-chart-card {
  --sales-accent: #c5a075;
  --sales-accent-light: #e1c8aa;
  --sales-accent-dark: #a4825d;
  border-radius: 1.25rem;
}

.dashboard-chart-totals > div {
  min-width: 8rem;
}

.dashboard-chart-totals span {
  display: block;
  color: #7b7770;
  font-size: .8rem;
}

.dashboard-chart-totals strong {
  display: block;
  margin-top: .2rem;
  color: #20221f;
  font-size: 1.25rem;
}

.dashboard-bars {
  display: grid;
  grid-template-columns: repeat(14, minmax(2.4rem, 1fr));
  gap: .65rem;
  min-height: 18rem;
  padding: 1rem .5rem 0;
  border-bottom: 1px solid #e9e4dd;
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 4.45rem, #f0ece7 4.5rem);
}

.dashboard-bar-column {
  position: relative;
  display: grid;
  grid-template-rows: 1.35rem 1fr 1.65rem;
  min-width: 0;
  text-align: center;
}

.dashboard-bar-tooltip {
  position: absolute;
  z-index: 2;
  bottom: calc(100% - .75rem);
  left: 50%;
  display: grid;
  gap: .15rem;
  width: max-content;
  min-width: 9.5rem;
  padding: .65rem .75rem;
  border-radius: .65rem;
  background: var(--sales-accent-dark);
  color: #fff;
  box-shadow: 0 .6rem 1.25rem rgba(164, 130, 93, .22);
  font-size: .75rem;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, .35rem);
  transition: opacity .15s ease, transform .15s ease;
}

.dashboard-bar-tooltip strong {
  font-size: .8rem;
}

.dashboard-bar-column:hover .dashboard-bar-tooltip,
.dashboard-bar-column:focus .dashboard-bar-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.dashboard-bar-value {
  color: #8d6d4d;
  font-size: .75rem;
  font-weight: 700;
}

.dashboard-bar-track {
  display: flex;
  align-items: end;
  min-height: 0;
}

.dashboard-bar {
  width: 100%;
  min-height: 0;
  border-radius: .55rem .55rem .2rem .2rem;
  background: linear-gradient(180deg, var(--sales-accent-light) 0%, var(--sales-accent) 100%);
  box-shadow: 0 .3rem .75rem rgba(197, 160, 117, .3);
  transition: height .2s ease, filter .2s ease;
}

.dashboard-bar-column:hover .dashboard-bar {
  filter: brightness(1.18);
}

.dashboard-bar-label {
  padding-top: .55rem;
  color: #7b7770;
  font-size: .7rem;
  white-space: nowrap;
}

.dashboard-chart-empty {
  margin-top: 1rem;
}

.work-hours-week-board {
  display: grid;
  width: 100%;
  max-width: 100%;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: .75rem;
}

.planner-week-board {
  display: grid;
  width: 100%;
  max-width: 100%;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border: 1px solid #e6e1da;
  border-radius: .85rem;
  overflow: hidden;
}

.planner-day-card {
  min-width: 0;
  min-height: 13rem;
  padding: .8rem;
  border-right: 1px solid #e6e1da;
  background: #fff;
}

.planner-day-card:last-child { border-right: 0; }

.planner-day-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: .5rem;
}

.planner-day-heading {
  min-width: 0;
  overflow-wrap: anywhere;
}

.planner-add-button {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .65rem .9rem;
  border: 1px solid #a4825d;
  border-radius: .65rem;
  background: #a4825d;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 .25rem .6rem rgba(32, 34, 31, .14);
}

.planner-add-button:hover { background: #8e6e4f; border-color: #8e6e4f; }
.planner-add-button:focus-visible { outline: 0; box-shadow: 0 0 0 .25rem rgba(164, 130, 93, .35); }
.planner-add-button span { font-size: 1.15rem; line-height: .8; }

.planner-day-add,
.work-hours-day-add {
  position: relative;
  display: inline-flex;
  width: 1.65rem;
  height: 1.65rem;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #d8d1c8;
  border-radius: 50%;
  background: #fff;
  color: #7c6651;
  font-size: 0;
}

.planner-day-add::after,
.work-hours-day-add::after {
  position: absolute;
  top: 50%;
  left: 50%;
  color: #7c6651;
  content: "+";
  font-size: 1.35rem;
  line-height: 1;
  transform: translate(-50%, -55%);
}

.planner-day-add:hover, .work-hours-day-add:hover { border-color: #7c6651; background: #f5f0e9; }

.planner-item {
  display: block;
  padding: .45rem .5rem;
  border: 1px solid #e3ded7;
  border-radius: .5rem;
  background: #faf9f7;
  color: #2b2d2b;
  font-size: .78rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.planner-event { border-left: 3px solid #7c6651; }
.planner-event span { display: block; margin-bottom: .15rem; color: #7c6651; font-size: .67rem; font-weight: 700; text-transform: uppercase; }
.planner-task { display: flex; align-items: flex-start; gap: .45rem; padding: .35rem; }
.planner-task form { display: grid; flex: 0 0 auto; margin: .15rem 0 0; }
.planner-task.is-complete .planner-task-details { color: #77736d; text-decoration: none; }
.planner-check { width: 1.05rem; height: 1.05rem; margin: 0; accent-color: #198754; cursor: pointer; }
.planner-task-details { flex: 1; min-width: 0; padding: .1rem; border: 0; background: transparent; color: #2b2d2b; font-size: .78rem; line-height: 1.3; text-align: left; overflow-wrap: anywhere; }
.planner-task-details:hover { color: #7c6651; text-decoration: underline; }

@media (max-width: 1199.98px) {
  .planner-week-board { overflow-x: auto; overscroll-behavior-x: contain; grid-template-columns: repeat(7, minmax(9.5rem, 1fr)); }
  .planner-day-card { min-height: 11rem; }
}

.work-hours-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, auto);
  grid-template-areas:
    "heading actions"
    "heading filter";
  gap: 1rem 1.5rem;
  align-items: start;
}

.work-hours-heading {
  grid-area: heading;
  min-width: 0;
}

.work-hours-heading h2 {
  white-space: nowrap;
}

.work-hours-toolbar-actions {
  grid-area: actions;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: .5rem;
  min-width: 0;
}

.work-hours-toolbar-filter {
  grid-area: filter;
  justify-self: start;
  width: min(20rem, 100%);
  min-width: 0;
}

.dashboard-week-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: .75rem;
}

.dashboard-week-heading > * { min-width: 0; }

.dashboard-week-heading strong { text-align: end; }

@media (max-width: 991.98px) {
  .work-hours-toolbar {
    grid-template-columns: 1fr;
    grid-template-areas: "heading" "actions" "filter";
  }

  .work-hours-toolbar-actions {
    justify-content: flex-start;
  }

  .work-hours-toolbar-filter {
    width: min(100%, 24rem);
  }
}

.work-hours-day-card {
  min-width: 0;
  min-height: 220px;
  border-color: #f0ece7 !important;
}

.work-hours-day-header {
  display: grid;
  gap: .25rem;
}

.work-hours-day-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .5rem;
}

.work-hours-day-total {
  font-size: .95rem;
  line-height: 1.2;
  white-space: nowrap;
}

.work-hours-day-card .btn {
  font-size: .84rem;
  white-space: normal;
}

.work-hours-day-card .bg-white {
  overflow-wrap: anywhere;
}

@media (max-width: 1199.98px) {
  .work-hours-week-board { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 767.98px) {
  .work-hours-week-board { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
  .work-hours-day-card { min-height: 190px; padding: .75rem !important; }
  .work-hours-heading h2 { white-space: normal; }
  .work-hours-toolbar-actions { justify-content: flex-start; }
  .dashboard-week-heading { align-items: flex-start; flex-direction: column; }
  .dashboard-week-heading strong { text-align: start; }
}

.feature-icon {
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border-radius: .85rem;
  background: #292a27;
  color: #fff;
  font-weight: 700;
}

.invitation-details dt {
  color: #777;
  font-weight: 500;
}

.table > :not(caption) > * > * {
  padding: .9rem 1.25rem;
}

/* Alternating rows make dense operational lists easier to scan. */
.table > tbody > tr:nth-child(odd) > * {
  background-color: #f7f6f4;
}

.table.table-hover > tbody > tr:hover > * {
  background-color: #efede9;
}

.list-group > .list-group-item:nth-child(odd) {
  background-color: #f7f6f4;
}

.list-group > .list-group-item-action:nth-child(odd):hover,
.list-group > .list-group-item-action:nth-child(odd):focus {
  background-color: #efede9;
}

.invoice-category-items > .invoice-item-row:nth-child(odd),
.manual-order-category-items > .manual-order-item-row:nth-child(odd) {
  background-color: #f7f6f4;
  border-radius: .65rem;
}

.customer-search {
  width: min(100%, 430px);
}

.list-page-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.list-page-tools {
  display: grid;
  justify-items: end;
  gap: .7rem;
}

.list-page-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: .5rem;
}

.list-page-filter {
  display: grid;
  grid-template-columns: minmax(15rem, 1fr) 11rem auto;
  gap: .5rem;
  width: min(100%, 42rem);
}

.finance-summary-grid,
.finance-expense-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .8rem;
}

.finance-summary-card,
.finance-expense-summary > div {
  padding: 1rem 1.1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: .8rem;
  background: #fbfaf8;
}

.finance-summary-card span,
.finance-expense-summary span {
  display: block;
  color: var(--bs-secondary-color);
  font-size: .82rem;
  margin-bottom: .25rem;
}

.finance-summary-card strong,
.finance-expense-summary strong {
  display: block;
  font-size: 1.25rem;
}

.finance-summary-balance {
  background: #f0ebe5;
  border-color: #ddcfbf;
}

.finance-movements-table .table > :not(caption) > * > * {
  padding: .75rem 1rem;
}

.finance-filter {
  display: grid;
  grid-template-columns: 10rem 11rem minmax(12rem, 1fr) auto;
  align-items: end;
  gap: .75rem;
  padding: 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: .8rem;
  background: #fbfaf8;
}

.finance-filter .form-label {
  margin-bottom: .35rem;
  font-size: .82rem;
  color: var(--bs-secondary-color);
}

.finance-balance-update > * {
  background-color: #f0ebe5 !important;
}

@media (max-width: 991.98px) {
  .list-page-header {
    grid-template-columns: 1fr;
  }

  .list-page-tools {
    justify-items: start;
  }

  .list-page-actions {
    justify-content: start;
  }

  .list-page-filter,
  .finance-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .list-page-filter .btn,
  .finance-filter .btn {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767.98px) {
  .dashboard-chart-totals { flex-wrap: wrap; gap: 1rem !important; }
  .dashboard-chart-totals > div { min-width: 0; flex: 1 1 7rem; }
}

@media (max-width: 575.98px) {
  .list-page-filter {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .list-page-filter .btn {
    width: 100%;
  }

  .finance-summary-grid,
  .finance-expense-summary {
    grid-template-columns: 1fr;
  }

  .finance-filter {
    grid-template-columns: 1fr;
  }
}

.empty-state {
  min-height: 260px;
  display: grid;
  place-content: center;
}

.category-thumb, .product-thumb {
  width: 3.5rem;
  height: 3.5rem;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: .6rem;
  background: #efebe6;
  color: #7c6651;
  font-weight: 700;
}

.category-thumb img, .product-thumb {
  object-fit: cover;
}

.category-thumb img {
  width: 100%;
  height: 100%;
}

.product-thumb {
  display: block;
}

.product-thumb-empty {
  display: grid;
  place-items: center;
}

.category-edit-image {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: .75rem;
}

.invoice-product-image {
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: .55rem;
  background: #efebe6;
  color: #7c6651;
  font-size: .8rem;
  font-weight: 700;
}

.invoice-product-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.invoice-selected-product {
  display: flex;
  align-items: center;
  gap: .7rem;
  min-width: 0;
  padding: .55rem .7rem;
  border: 1px solid #e6e1da;
  border-radius: .65rem;
  background: #faf8f5;
}

.invoice-selected-product-image, .invoice-picker-image, .invoice-picker-placeholder {
  width: 3rem;
  height: 3rem;
  flex: 0 0 auto;
  border-radius: .5rem;
  object-fit: cover;
}

.invoice-picker-placeholder {
  display: grid;
  place-items: center;
  background: #efebe6;
  color: #7c6651;
  font-weight: 700;
}

.invoice-unit-cost[readonly] {
  background-color: #f3f0eb;
  border-color: #d8d0c6;
  color: #6d6257;
  cursor: not-allowed;
  pointer-events: none;
}

.invoice-picker-card {
  display: flex;
  align-items: center;
  gap: .8rem;
  min-height: 5rem;
  padding: .8rem;
  border: 1px solid #e6e1da;
  border-radius: .8rem;
  background: #fff;
  color: #20221f;
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.invoice-picker-card:hover, .invoice-picker-card:focus {
  border-color: #7c6651;
  box-shadow: 0 .5rem 1rem rgba(56, 46, 37, .1);
  transform: translateY(-1px);
}

.invoice-picker-card.is-selected {
  border-color: #20221f;
  background-color: #f3efe9;
  box-shadow: inset 0 0 0 1px #20221f;
}

.invoice-picker-card strong, .invoice-picker-card small {
  display: block;
}

.invoice-picker-card small {
  margin-top: .15rem;
  color: #77736d;
}

.text-pre-line { white-space: pre-line; }

.thought-clouds-section { overflow: hidden; }

.thought-clouds-categories {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items: center;
}

.thought-cloud-category {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .55rem .85rem;
  border: 1px solid #dfd4c6;
  border-radius: 999px;
  background: #fffaf5;
  color: #55483d;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}

.thought-cloud-category:hover { color: #332a24; border-color: #b99d80; transform: translateY(-1px); }
.thought-cloud-category.is-active { border-color: #b08c68; background: #f1e6d9; color: #332a24; font-weight: 700; }
.thought-cloud-category span { color: #806d5c; font-size: .88rem; }
.thought-cloud-category-select { width: min(100%, 19rem); }

.thought-clouds-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.thought-cloud-note {
  position: relative;
  display: flex;
  min-height: 12.5rem;
  flex-direction: column;
  align-items: stretch;
  padding: 1.35rem 1.5rem 1.2rem;
  border: 1px solid #e1dbd4;
  border-radius: .8rem;
  background: #fff;
  color: #312a25;
  text-align: left;
  text-decoration: none;
  box-shadow: 0 .25rem .8rem rgba(57, 45, 35, .05);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

button.thought-cloud-note { width: 100%; }
.thought-cloud-note-shell { position: relative; }
.thought-cloud-note-shell > .thought-cloud-note { height: 100%; }
.thought-cloud-note-shell > .entity-history-button { position: absolute; right: 1rem; bottom: .75rem; }
.thought-cloud-note-shell:has(> .entity-history-button) .thought-cloud-note time { padding-right: 2.25rem; }

.entity-history-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    border: 1px solid #bfc4c8;
    border-radius: 50%;
    background: transparent;
    color: #6c757d;
    font: italic 600 1rem/1 Georgia, serif;
    vertical-align: middle;
    cursor: pointer;
}
.entity-history-button:hover { background: #f0eeeb; border-color: #6c757d; color: #252927; }
.entity-history-button:focus-visible { outline: 2px solid #0d6efd; outline-offset: 3px; }
@media print { .entity-history-button { display: none !important; } }
.thought-cloud-note:hover, .thought-cloud-note:focus-visible { border-color: #b99d80; box-shadow: 0 .6rem 1.25rem rgba(57, 45, 35, .1); outline: none; transform: translateY(-2px); }
.thought-cloud-note strong { display: -webkit-box; margin-bottom: .65rem; overflow: hidden; font-size: 1.05rem; line-height: 1.3; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.thought-cloud-note-body { display: -webkit-box; overflow: hidden; color: #5b5047; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 4; white-space: pre-line; }
.thought-cloud-note time { margin-top: auto; padding-top: .75rem; color: #806d5c; font-size: .82rem; }

.thought-cloud-note.is-draft { cursor: default; }
.thought-cloud-note.is-draft:hover { transform: none; }
.thought-cloud-draft-title,
.thought-cloud-draft-body {
  position: relative;
  z-index: 1;
  width: 100%;
  border: 0;
  background: transparent;
  color: #312a25;
  outline: 0;
}
.thought-cloud-draft-title { margin-bottom: .65rem; font-weight: 700; font-size: 1.05rem; }
.thought-cloud-draft-title::placeholder, .thought-cloud-draft-body::placeholder { color: #907c6b; opacity: 1; }
.thought-cloud-draft-body { min-height: 4.8rem; resize: none; line-height: 1.45; }
.thought-cloud-note.is-unsaved { border-color: #d49b55; }

.thought-clouds-footer { display: flex; justify-content: flex-end; align-items: center; gap: 1rem; margin-top: 1.25rem; color: #67594d; }
.thought-clouds-footer .btn[aria-disabled="true"] { pointer-events: none; opacity: .42; }
.thought-clouds-empty { padding: 2.5rem 1rem; border: 1px dashed #d9cab9; border-radius: 1rem; background: #fffaf5; text-align: center; color: #67594d; }

@media (max-width: 991.98px) {
  .thought-clouds-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 575.98px) {
  .thought-clouds-grid { grid-template-columns: 1fr; }
  .thought-clouds-footer { justify-content: space-between; }
}

@media (max-width: 767.98px) {
  .dashboard-bars { gap: .35rem; overflow-x: auto; padding-inline: .25rem; }
  .dashboard-bar-label { font-size: .62rem; }
}
