/* Dashboard styles. */

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 9px
}

.story-grid {
  display: grid;
  grid-template-columns: .92fr 1.08fr;
  gap: 20px;
  margin: 25px 0
}

.panel h2,
.expense-panel h2 {
  font-size: 29px;
  letter-spacing: -.03em;
  margin: 0
}

.category-chart {
  display: grid;
  grid-template-columns: max-content minmax(44px, 1fr) max-content;
  column-gap: 12px;
  row-gap: 15px;
  align-items: center;
  padding-top: 25px
}

.bar-track {
  min-width: 0;
  height: 18px;
  background: #eeeae0;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  overflow: hidden
}

.bar-fill {
  height: 100%;
  border-right: 1.5px solid var(--ink);
  border-radius: 999px
}

.expense-panel {
  padding: 0;
  overflow: hidden
}

.filters {
  display: flex;
  align-items: end;
  gap: 8px
}

.filters label {
  display: grid;
  gap: 4px
}

.filters label span {
  font-size: 10px;
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing: .1em
}

.filters select {
  min-width: 145px;
  border: 2px solid var(--ink);
  background: #fff;
  border-radius: 12px;
  padding: 10px
}

.pill-child {
  background: #e9edff;
  color: #3b4dd8
}

.pill-category {
  background: #dff8f7;
  color: #047986
}

@media(max-width:980px) {
  .header-actions {
      margin-left: auto
    }

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

  .filters {
      flex-wrap: wrap
    }
}

@media(max-width:640px) {
  .header-actions .round-button,
    .header-actions .button {
      display: none
    }

  .filters {
      display: grid;
      width: 100%
    }

  .filters label,
    .filters select,
    .filters button {
      width: 100%
    }
}

@media print {
  .story-grid {
      grid-template-columns: 1fr 1fr
    }
}

.story-grid {
  margin: 20px 0
}

.entry-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 31px;
  height: 31px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 17px;
  line-height: 1
}

.entry-toggle:hover,
.entry-toggle[aria-expanded="true"] {
  color: var(--ink);
  border-color: var(--ink);
  background: #fffaf0
}

.entry-toggle small {
  position: absolute;
  right: -5px;
  top: -6px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-size: 9px;
  display: grid;
  place-items: center
}

.entry-detail-row>td {
  padding: 0;
  background: #fffaf0
}

.entry-panel {
  padding: 7px 18px 14px 42px;
  border-top: 1px dashed var(--line);
  position: relative
}

.entry-row {
  display: grid;
  grid-template-columns: 110px minmax(150px, 1fr) 90px 24px;
  gap: 14px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px
}

.entry-row time {
  color: var(--muted)
}

.entry-row strong {
  text-align: right
}

.entry-delete {
  border: 0;
  background: transparent;
  color: #aaa;
  cursor: pointer;
  font-size: 18px
}

.entry-delete:hover {
  color: #b42318
}

.entry-empty {
  padding: 14px 0;
  color: var(--muted);
  font-size: 13px
}

.entry-add {
  width: 29px;
  height: 29px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  margin-top: 10px
}

.entry-add:hover {
  color: var(--ink);
  border-color: var(--ink)
}

.entry-dialog {
  width: min(470px, calc(100% - 28px));
  border: 2px solid var(--ink);
  border-radius: 24px;
  padding: 0;
  background: #fffaf0;
  box-shadow: 8px 8px 0 var(--ink)
}

.entry-dialog::backdrop {
  background: rgba(32, 32, 53, .55)
}

.entry-dialog form {
  padding: 23px
}

.entry-dialog-head,
.entry-dialog-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px
}

.entry-dialog-head h2 {
  margin: 0;
  font-size: 25px
}

.entry-dialog-fields {
  display: grid;
  gap: 14px;
  margin: 22px 0
}

.entry-dialog-fields label {
  display: grid;
  gap: 5px
}

.entry-dialog-fields label>span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 1000
}

.entry-dialog-fields input {
  width: 100%;
  border: 2px solid var(--ink);
  border-radius: 11px;
  padding: 11px;
  background: #fff
}

.entry-dialog-foot span {
  color: #b42318;
  font-size: 12px
}

@media(max-width:640px) {
  .expense-main-row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      margin: 12px;
      border: 1px solid var(--line);
      border-radius: 16px;
      background: #fff;
      overflow: hidden
    }

  .expense-main-row td {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      padding: 10px 12px;
      border-top: 1px solid var(--line);
      text-align: right
    }

  .expense-main-row td:first-child {
      grid-column: 1/-1;
      border-top: 0;
      padding: 14px 12px
    }

  .expense-main-row td::before {
      content: attr(data-label);
      font-size: 9px;
      text-transform: uppercase;
      letter-spacing: .08em;
      color: var(--muted);
      font-weight: 1000;
      text-align: left
    }

  .expense-main-row td:first-child::before {
      display: none
    }

  .expense-main-row td:nth-child(2),
    .expense-main-row td:nth-child(3) {
      border-top: 0
    }

  .entry-toggle {
      right: 10px
    }

  .entry-detail-row {
      display: block;
      margin: 0 12px 14px
    }

  .entry-detail-row td {
      display: block;
      border: 1px solid var(--line);
      border-top: 0;
      border-radius: 0 0 16px 16px
    }

  .entry-panel {
      padding: 6px 12px 12px
    }

  .entry-row {
      grid-template-columns: 1fr auto 23px;
      gap: 8px
    }

  .entry-row time {
      grid-column: 1/-1;
      font-size: 11px
    }

  .entry-row strong {
      text-align: right
    }
}

.category-chart {
  row-gap: 17px;
  padding-top: 28px;
}

.bar-track {
  height: 20px;
  background: #eeeae0;
  border: 1.5px solid var(--ink);
  box-shadow: inset 0 2px 0 rgba(32, 32, 53, .05);
}

.bar-fill {
  min-width: 7px;
  border-right: 1.5px solid var(--ink);
  transition: width .4s ease;
}

.child-card {
  border: 1px solid rgba(31, 41, 55, .10);
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 18px 40px rgba(31, 41, 55, .09);
  backdrop-filter: blur(14px);
}

.child-card small {
  display: block;
  margin-bottom: 6px;
  color: inherit;
  opacity: .72;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.child-card {
  display: flex;
  align-items: center;
  gap: 15px;
  min-height: 130px;
  padding: 22px;
  border-radius: 24px;
}

.child-card strong,
.child-card span {
  display: block;
}

.child-card strong {
  color: #26364a;
  font-size: 26px;
  line-height: 1.1;
  letter-spacing: -.035em;
}

.child-card span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.bar-track {
  border-color: rgba(31, 41, 55, .12);
}

.filters select,
textarea,
.entry-dialog-fields input {
  border: 1px solid rgba(31, 41, 55, .16);
}

.pill-child,
.pill-category {
  background: #f5f1ea;
  color: #3f4a57;
}

@media(max-width:640px) {
  .child-card {
      min-height: 112px;
    }
}

.dashboard-layout {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 28px 48px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.app-sidebar {
  position: sticky;
  top: 14px;
  display: grid;
  gap: 14px;
}

.sidebar-card {
  border: 1px solid rgba(31, 41, 55, .10);
  border-radius: 22px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 12px 30px rgba(31, 41, 55, .07);
}

.sidebar-total {
  padding: 22px;
  color: #fff;
  background:
    linear-gradient(135deg, #1d4ed8 0%, #7c3aed 100%);
}

.sidebar-label {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .13em;
  text-transform: uppercase;
  opacity: .76;
}

.sidebar-total strong {
  display: block;
  font-size: 38px;
  line-height: 1;
  letter-spacing: -.06em;
}

.sidebar-total small {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, .75);
}

.app-sidebar .child-card {
  min-height: 0;
  padding: 17px;
  border-radius: 20px;
  box-shadow: 0 12px 28px rgba(31, 41, 55, .06);
}

.app-sidebar .child-avatar {
  width: 46px;
  height: 46px;
  border-radius: 15px;
}

.story-grid {
  grid-template-columns: minmax(0, 1fr);
}

.category-panel {
  border-top-color: var(--pink);
}

.expense-panel {
  border-top-color: var(--mint);
}

.bar-label span,
.expense-emoji,
.pill-category span {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 9px;
  background: #f2f4f7;
  font-size: 14px;
}

.pill-category span {
  width: 20px;
  height: 20px;
  border-radius: 7px;
  font-size: 12px;
}

@media(max-width:1080px) {
  .dashboard-layout {
      grid-template-columns: 1fr;
    }

  .app-sidebar {
      position: static;
      grid-template-columns: 1.2fr 1fr 1fr;
    }
}

@media(max-width:760px) {
  .dashboard-layout {
      padding: 8px 14px 32px;
    }

  .app-sidebar {
      grid-template-columns: 1fr;
    }
}

.dashboard-layout {
  max-width: 1560px;
  min-height: 100vh;
  padding: 0;
  grid-template-columns: 276px minmax(0, 1fr);
  gap: 0;
}

.app-sidebar {
  position: sticky;
  top: 0;
  min-height: 100vh;
  padding: 18px 16px;
  align-content: start;
  background:
    linear-gradient(180deg, #0f2742 0%, #071c31 100%);
  color: #fff;
  box-shadow: 12px 0 36px rgba(15, 39, 66, .16);
}

.sidebar-brand {
  min-width: 0;
  color: #fff;
  padding: 0 2px 14px;
}

.sidebar-brand .brand-badge {
  width: 38px;
  height: 38px;
}

.sidebar-brand small {
  color: rgba(255, 255, 255, .7);
}

.sidebar-card {
  border-color: rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  box-shadow: none;
}

.sidebar-total {
  position: relative;
  overflow: hidden;
  min-height: 182px;
  padding: 24px 20px;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
}

.sidebar-total strong {
  font-size: 44px;
}

.sidebar-total small {
  color: rgba(255, 255, 255, .82);
}

.sidebar-spark {
  position: absolute;
  left: 18px;
  right: 16px;
  bottom: 18px;
  height: 38px;
  opacity: .78;
  background:
    linear-gradient(135deg, transparent 46%, rgba(255, 255, 255, .85) 47% 52%, transparent 53%) 0 0/34px 34px,
    linear-gradient(to top, rgba(255, 255, 255, .16), transparent);
  clip-path: polygon(0 78%, 12% 70%, 25% 73%, 38% 50%, 50% 42%, 62% 55%, 74% 58%, 86% 39%, 100% 18%, 100% 100%, 0 100%);
}

.app-sidebar .child-card {
  background: rgba(255, 255, 255, .09);
  border: 0;
  border-left: 0;
}

.app-sidebar .child-card small,
.app-sidebar .child-card span {
  color: rgba(255, 255, 255, .72);
}

.app-sidebar .child-card strong {
  color: #fff;
}

.app-sidebar .child-card::after {
  content: "";
  grid-column: 1/-1;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue) 72%, rgba(255, 255, 255, .14) 72%);
}

.sidebar-sync {
  margin-top: auto;
  padding: 16px;
  background: rgba(255, 255, 255, .06);
}

.sync-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sidebar-sync span,
.sidebar-sync small {
  display: block;
}

.sidebar-sync span {
  font-weight: 850;
}

.sidebar-sync i {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 7px;
  vertical-align: -4px;
  border-radius: 50%;
  background: #10b981;
}

.sidebar-sync button {
  width: 30px;
  height: 30px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.sidebar-sync button:hover {
  background: rgba(255, 255, 255, .14);
}

.sidebar-sync button:disabled {
  cursor: wait;
  opacity: .55;
}

.sidebar-sync small {
  margin-top: 4px;
  color: rgba(255, 255, 255, .68);
}

.sidebar-sync .sync-time {
  color: rgba(255, 255, 255, .52);
  font-size: 11px;
}

.sync-error {
  margin-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, .10);
  padding-top: 8px;
}

.sync-error summary {
  color: rgba(255, 255, 255, .82);
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
}

.sync-error small {
  overflow-wrap: anywhere;
  color: rgba(255, 255, 255, .62);
  font-size: 11px;
  line-height: 1.35;
}

.story-grid {
  gap: 18px;
  margin: 0 0 18px;
}

.category-panel,
.expense-panel {
  border-top: 5px solid var(--blue);
}

.category-panel {
  border-top-color: var(--pink);
}

.expense-panel {
  border-top-color: var(--mint);
}

.panel h2,
.expense-panel h2 {
  font-size: 25px;
}

.category-chart {
  row-gap: 18px;
}

.expense-panel {
  overflow: hidden;
}

.filters {
  align-items: center;
}

.filters select {
  border-radius: 10px;
}

.expense-emoji,
.bar-label span,
.pill-category span {
  background: #eef6ff;
}

@media(max-width:1120px) {
  .dashboard-layout {
      grid-template-columns: 1fr;
    }

  .app-sidebar {
      display: none;
    }

  .mobile-brand {
      color: var(--ink);
      min-width: 0;
    }

  .mobile-brand small {
      color: var(--muted);
    }

  .mobile-actions {
      position: absolute;
      top: 18px;
      right: 18px;
      display: flex;
      gap: 9px;
    }

  .mobile-summary .sidebar-total {
      min-height: 132px;
      padding: 22px;
      border: 0;
      border-radius: 18px;
    }

  .mobile-summary .sidebar-total strong {
      font-size: 42px;
    }

  .mobile-summary .child-card {
      min-height: 112px;
      padding: 16px;
      background: #fff;
      color: var(--ink);
    }

  .mobile-summary .child-card strong {
      color: var(--ink);
    }

  .story-grid {
      grid-template-columns: 1fr;
    }
}

@media(max-width:720px) {
  .mobile-actions .round-button {
      display: grid;
      width: 48px;
      height: 48px;
      border-radius: 50%;
    }

  .mobile-summary .child-card {
      display: grid;
      grid-template-columns: auto 1fr;
      gap: 12px;
    }

  .mobile-summary .child-card::after {
      content: "";
      grid-column: 1/-1;
      height: 5px;
      border-radius: 999px;
      background: linear-gradient(90deg, var(--blue) 72%, #e5e7eb 72%);
    }

  .story-grid {
      margin-bottom: 16px;
    }

  .category-panel {
      padding: 20px;
    }

  .category-chart {
      row-gap: 16px;
    }

  .filters {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 8px;
    }

  .filters label {
      display: none;
    }

  .filters::before {
      content: "Filter";
      align-self: center;
      color: var(--muted);
      font-weight: 850;
    }

  .expense-main-row {
      position: relative;
      margin: 0;
      padding: 16px 58px 16px 56px;
      border-top: 1px solid var(--line);
      border-radius: 0;
      background: #fff;
    }

  .expense-main-row td {
      padding: 0;
      border: 0;
      text-align: left;
    }

  .expense-main-row td::before {
      display: none;
    }

  .expense-main-row td[data-label="Expense"] {
      margin-bottom: 8px;
    }

  .expense-main-row td[data-label="For"],
    .expense-main-row td[data-label="Category"] {
      display: inline-flex;
      margin-right: 6px;
    }

  .expense-main-row td[data-label="Monthly"] {
      position: absolute;
      right: 58px;
      top: 16px;
      font-size: 18px;
      font-weight: 750;
    }

  .expense-main-row td[data-label="James"],
    .expense-main-row td[data-label="Dónal"] {
      display: inline;
      color: var(--muted);
      font-size: 13px;
    }

  .expense-main-row td[data-label="James"]::after {
      content: " / ";
    }

  .entry-toggle {
      right: 16px;
      top: 50%;
    }

  .entry-detail-row {
      margin: 0;
    }

  .entry-detail-row td {
      border-radius: 0;
    }
}

@media(max-width:430px) {
  .mobile-brand b {
      font-size: 18px;
    }

  .mobile-summary .sidebar-total strong {
      font-size: 38px;
    }

  .mobile-summary .child-card {
      grid-template-columns: 1fr;
    }
}

.dashboard-layout {
  max-width: none;
  width: 100%;
  margin: 0;
  grid-template-columns: 248px minmax(0, 1fr);
}

.app-sidebar {
  padding: 18px 14px;
}

.sidebar-total {
  min-height: 158px;
  padding: 20px 18px;
}

.sidebar-total strong {
  font-size: 38px;
}

.app-sidebar .child-card {
  padding: 15px;
}

.sidebar-sync {
  padding: 14px;
}

.story-grid {
  gap: 14px;
  margin-bottom: 14px;
}

.panel h2,
.expense-panel h2 {
  font-size: 23px;
}

.category-chart {
  row-gap: 14px;
  padding-top: 18px;
}

.bar-track {
  height: 16px;
}

@media(max-width:1120px) {
  .dashboard-layout {
      display: block;
    }
}

@media(max-width:720px) {
  .mobile-brand {
      gap: 9px;
      padding-right: 112px;
    }

  .mobile-brand .brand-badge {
      width: 38px;
      height: 38px;
    }

  .mobile-brand b {
      font-size: 17px;
      line-height: 1.1;
    }

  .mobile-brand small {
      font-size: 10px;
    }

  .mobile-actions {
      top: 10px;
      right: 12px;
      gap: 7px;
    }

  .mobile-actions .round-button {
      width: 40px;
      height: 40px;
    }

  .mobile-summary .sidebar-total {
      min-height: 0;
      display: grid;
      grid-template-columns: 1fr auto;
      align-items: end;
      gap: 2px 12px;
      padding: 14px 16px;
      border-radius: 16px;
    }

  .mobile-summary .sidebar-total .sidebar-label {
      grid-column: 1;
      margin: 0;
      font-size: 10px;
    }

  .mobile-summary .sidebar-total strong {
      grid-column: 1;
      font-size: 31px;
    }

  .mobile-summary .sidebar-total small {
      grid-column: 2;
      grid-row: 1 / span 2;
      align-self: center;
      max-width: 82px;
      margin: 0;
      text-align: right;
      font-size: 11px;
      line-height: 1.25;
    }

  .mobile-summary .sidebar-spark {
      display: none;
    }

  .mobile-summary .child-card {
      min-height: 0;
      display: grid;
      grid-template-columns: auto 1fr;
      align-items: center;
      gap: 9px;
      padding: 10px;
      border-radius: 14px;
    }

  .mobile-summary .child-card small {
      margin: 0;
      font-size: 10px;
    }

  .mobile-summary .child-card strong {
      font-size: 20px;
    }

  .mobile-summary .child-card span {
      margin-top: 0;
      font-size: 11px;
    }

  .mobile-summary .child-card::after {
      height: 3px;
    }

  .category-panel {
      padding: 15px;
      border-radius: 16px;
    }

  .category-panel .panel-title {
      align-items: center;
    }

  .category-panel .eyebrow {
      display: none;
    }

  .category-chart {
      column-gap: 8px;
      row-gap: 10px;
      padding-top: 12px;
    }

  .bar-track {
      height: 10px;
    }

  .expense-panel {
      border-radius: 16px;
    }

  .expense-panel h2 {
      font-size: 22px;
    }

  .expense-main-row {
      padding-top: 13px;
      padding-bottom: 13px;
    }
}

@media(max-width:430px) {
  .mobile-summary .sidebar-total strong {
      font-size: 29px;
    }

  .mobile-summary .child-card strong {
      font-size: 18px;
    }

  .mobile-summary .child-card {
      gap: 7px;
      padding: 9px;
    }
}

.dashboard-layout {
  grid-template-columns: 248px minmax(0, 1fr);
}

.story-grid {
  grid-template-columns: minmax(420px, .9fr) minmax(520px, 1.1fr);
}

.expense-panel {
  max-width: none;
}

@media(min-width:1500px) {
  .story-grid {
      grid-template-columns: minmax(460px, .85fr) minmax(640px, 1.15fr);
    }
}

@media(min-width:721px) and (max-width:1280px) {
  .dashboard-layout {
      grid-template-columns: 210px minmax(0, 1fr);
    }

  .app-sidebar {
      padding: 14px 10px;
    }

  .sidebar-brand {
      gap: 9px;
    }

  .sidebar-brand .brand-badge {
      width: 38px;
      height: 38px;
    }

  .sidebar-brand b {
      font-size: 15px;
    }

  .sidebar-total {
      min-height: 136px;
      padding: 16px 14px;
    }

  .sidebar-total strong {
      font-size: 31px;
    }

  .app-sidebar .child-card {
      padding: 12px;
      gap: 10px;
    }

  .app-sidebar .child-avatar {
      width: 40px;
      height: 40px;
    }

  .app-sidebar .child-card strong {
      font-size: 24px;
    }

  .header-actions {
      gap: 7px;
    }

  .story-grid {
      grid-template-columns: 1fr;
      gap: 14px;
    }

  .category-panel {
      overflow: hidden;
    }

  .category-chart {
      grid-template-columns: max-content minmax(120px, 1fr) max-content;
    }

  .bar-track {
      min-width: 0;
    }

  .filters {
      flex-wrap: wrap;
      justify-content: flex-end;
    }

  .filters select {
      min-width: 132px;
    }
}

@media(max-width:720px) {
  main#top,
    .mobile-summary,
    .story-grid,
    .category-panel,
    .expense-panel,
    .table-wrap {
      width: 100%;
      max-width: 100%;
      min-width: 0;
    }

  .story-grid {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
    }

  .category-panel {
      overflow: hidden;
    }

  .category-chart {
      width: 100%;
      min-width: 0;
    }

  .bar-track {
      min-width: 0;
    }

  .expense-main-row {
      display: block;
      grid-template-columns: none;
      width: 100%;
      min-width: 0;
      overflow: hidden;
    }

  .expense-main-row td {
      width: auto;
      max-width: 100%;
    }

  .expense-main-row td[data-label="Expense"] {
      padding-right: 78px;
    }

  .expense-main-row td[data-label="Monthly"] {
      right: 48px;
      max-width: 78px;
      overflow: hidden;
      text-align: right;
      white-space: nowrap;
    }

  .expense-main-row td[data-label="James"],
    .expense-main-row td[data-label="Dónal"] {
      position: static;
      width: auto;
      max-width: none;
    }

  .entry-toggle {
      position: absolute;
      right: 12px;
    }
}

@media(max-width:720px) {
  .filters {
      display: grid;
      grid-template-columns: 1fr 1fr auto;
      align-items: end;
      gap: 8px;
      width: 100%;
    }

  .filters::before {
      display: none;
      content: none;
    }

  .filters label {
      display: grid;
      min-width: 0;
      width: auto;
      gap: 4px;
    }

  .filters label span {
      display: block;
      font-size: 9px;
      letter-spacing: .08em;
      white-space: nowrap;
    }

  .filters select {
      min-width: 0;
      width: 100%;
      height: 44px;
      padding: 9px 28px 9px 10px;
      font-size: 16px;
    }

  .filters .button,
    .filters button {
      width: auto;
      min-width: 58px;
      height: 44px;
      padding: 9px 12px;
      font-size: 14px;
    }
}

@media(max-width:430px) {
  .filters {
      grid-template-columns: 1fr 1fr;
    }

  .filters .button,
    .filters button {
      grid-column: 1 / -1;
      justify-self: end;
    }
}

.mobile-expense-card {
  display: none;
}

.mobile-expense-list {
  display: none;
}

.paid-by {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 14px;
  white-space: nowrap;
}

.paid-by span {
  white-space: nowrap;
}

.paid-by b {
  margin-right: 3px;
}

.payer-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  padding: 4px 8px;
  background: #f3f4f6;
  color: #475467;
}

.payer-pill b {
  color: inherit;
}

@media (min-width: 721px) and (max-width: 1100px) {
  .expense-last-cell .paid-by {
      min-width: 0;
      justify-content: flex-end;
      gap: 5px;
      white-space: normal;
    }

  .expense-last-cell .payer-pill {
      max-width: 100%;
      padding: 4px 7px;
    }

  .expense-last-cell .entry-toggle {
      position: relative;
      right: auto;
      top: auto;
      transform: none;
      justify-self: end;
      width: 30px;
      height: 30px;
    }
}

.entry-detail-row > td {
  background: #f7faff;
}

.entry-panel {
  background: #f7faff;
  border-top: 1px solid #e6edf7;
}

@media(max-width:720px) {
  .mobile-expense-list {
      display: block;
      background: #f8fbff;
    }

  .mobile-expense-card {
      display: block;
      padding: 0;
      border-top: 1px solid #e5edf7;
      background: #fbfdff;
    }

  .mobile-expense-card:first-child {
      border-top: 0;
    }

  .mobile-expense-summary {
      display: grid;
      grid-template-columns: 32px minmax(0, 1fr);
      column-gap: 10px;
      padding: 12px 10px 6px;
    }

  .mobile-expense-emoji,
    .mobile-expense-main,
    .mobile-expense-actions,
    .mobile-entry-panel {
      grid-area: auto;
    }

  .mobile-expense-emoji {
      grid-column: 1;
      grid-row: 1;
      align-self: start;
      width: 30px;
      height: 30px;
      font-size: 23px;
    }

  .mobile-expense-main {
      grid-column: 2;
      grid-row: 1;
      min-width: 0;
    }

  .mobile-expense-top {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 10px;
      align-items: baseline;
    }

  .mobile-expense-top strong {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-size: 18px;
      line-height: 1.15;
      text-align: left;
    }

  .mobile-expense-top span {
      white-space: nowrap;
      font-size: 18px;
      line-height: 1.15;
    }

  .mobile-expense-chips,
    .mobile-paid-by {
      display: flex;
      flex-wrap: wrap;
      gap: 5px;
      margin-top: 7px;
    }

  .mobile-paid-by .payer-pill {
      padding: 5px 8px;
      font-size: 12px;
      line-height: 1;
    }

  .mobile-expense-actions {
      display: flex;
      justify-content: flex-end;
      padding: 0 10px 10px 52px;
      min-height: 0;
    }

  .mobile-entry-toggle,
    .mobile-expense-card .mobile-entry-toggle {
      position: relative;
      inset: auto;
      transform: none;
      width: 32px;
      height: 32px;
      align-self: auto;
      justify-self: auto;
    }

  .mobile-log-entry .entry-delete {
      width: 28px;
      height: 28px;
      display: grid;
      place-items: center;
    }

  .mobile-entry-panel .entry-add {
      margin-top: 8px;
      background: #fff;
    }
}

.app,
.dashboard-layout {
  min-height: 100dvh;
}

.app-sidebar {
  box-sizing: border-box;
  min-height: 100dvh;
  height: 100dvh;
}

@media(max-width:1120px) {
  .app-sidebar {
      height: auto;
      min-height: 0;
    }
}

@media(max-width:1120px) {
  .mobile-brand {
      display: flex;
      min-width: 0;
      flex: 1 1 auto;
      padding-right: 0;
      color: #fff;
      text-decoration: none;
    }

  .mobile-brand > span:not(.brand-badge) {
      display: block;
      min-width: 0;
    }

  .mobile-brand b {
      display: block;
      color: #fff;
      font-size: 17px;
      line-height: 1.1;
      white-space: nowrap;
    }

  .mobile-brand small {
      display: block;
      color: rgba(255, 255, 255, .72);
      font-size: 10px;
      letter-spacing: .12em;
      text-transform: uppercase;
      white-space: nowrap;
    }

  .mobile-actions {
      position: static;
      display: flex;
      flex: 0 0 auto;
      gap: 7px;
    }

  .mobile-actions .round-button {
      display: grid;
      width: 38px;
      height: 38px;
      border-color: rgba(255, 255, 255, .16);
      background: rgba(255, 255, 255, .12);
      color: #fff;
      box-shadow: none;
    }
}

.sidebar-children {
  display: grid;
  gap: 14px;
}

.child-card {
  border-left: 5px solid var(--person-color, var(--blue));
}

.child-card .child-avatar {
  background: var(--person-color, var(--blue));
}

.payer-pill {
  border: 1px solid color-mix(in srgb, var(--person-color, #64748b) 28%, white);
  background: color-mix(in srgb, var(--person-color, #64748b) 10%, white);
  color: color-mix(in srgb, var(--person-color, #64748b) 70%, #111827);
}

.pill-child {
  background: color-mix(in srgb, var(--person-color, var(--blue)) 10%, white);
  color: color-mix(in srgb, var(--person-color, var(--blue)) 70%, #111827);
}

.pill-category {
  border: 1px solid color-mix(in srgb, var(--category-color, #64748b) 24%, white);
  background: color-mix(in srgb, var(--category-color, #64748b) 10%, white);
  color: color-mix(in srgb, var(--category-color, #64748b) 70%, #111827);
}

.pill-category span {
  background: color-mix(in srgb, var(--category-color, #64748b) 14%, white);
}

.story-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  width: 100%;
  margin: 16px 0 18px;
}

.category-panel {
  width: 100%;
  max-width: none;
  overflow: hidden;
}

.category-chart {
  display: grid;
  grid-template-columns: none;
  gap: 15px;
  width: 100%;
  padding-top: 24px;
}

.bar-track {
  width: 100%;
  min-width: 0;
}

@media (max-width: 1120px) {
  .story-grid {
      margin-top: 14px;
    }

  .category-chart {
      gap: 13px;
    }
}

@media (max-width: 520px) {
  .category-panel {
      padding: 18px 14px;
    }

  .category-chart {
      gap: 12px;
    }

  .bar-track {
      height: 14px;
    }
}

body:not([data-page="editor"]) .story-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
  gap: 14px;
  align-items: stretch;
  margin: 10px 0 14px;
}

.category-panel {
  border-top-color: var(--blue);
}

.contributors-panel {
  border-top-color: rgba(31, 41, 55, .08);
}

.contributors-panel .panel-title h2,
.category-panel .panel-title h2 {
  font-size: 23px;
}

.contributor-card {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 94px;
  padding: 16px 14px;
  border: 1px solid color-mix(in srgb, var(--person-color, var(--blue)) 22%, #dbe3ef);
  border-radius: 12px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--person-color, var(--blue)) 7%, white), #fff);
  box-shadow: 0 12px 30px rgba(15, 23, 42, .04);
}

.contributor-card::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 14px;
  width: 38px;
  height: 4px;
  border-radius: 999px;
  background: var(--person-color, var(--blue));
}

.category-chart {
  gap: 12px;
  padding-top: 16px;
}

.bar-track {
  height: 12px;
  border: 0;
  background: #edf0f4;
}

.bar-fill {
  border: 0;
}

.rank-1 {
  background: #fde68a;
}

.rank-2 {
  background: #e9ddff;
}

.rank-3 {
  background: #fed7c3;
}

@media (max-width: 1180px) {
  body:not([data-page="editor"]) .story-grid {
      grid-template-columns: minmax(0, 1fr);
      gap: 10px;
    }

  body:not([data-page="editor"]) .contributors-panel {
      order: 1;
    }

  body:not([data-page="editor"]) .category-panel {
      order: 2;
    }

  .contributor-card {
      grid-template-columns: 32px minmax(0, 1fr);
      min-height: 72px;
      gap: 8px;
      padding: 12px 10px;
    }

  .contributor-card::before {
      top: 7px;
      left: 10px;
      width: 30px;
      height: 3px;
    }
}

@media (max-width: 720px) {
  body:not([data-page="editor"]) .story-grid {
      margin: 8px 0 10px;
    }

  .contributors-panel,
    .category-panel {
      padding: 14px 12px;
    }
}

@media (max-width: 720px) {
  .mobile-summary .child-card::after {
      content: none;
      display: none;
    }
}
