@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&display=swap");

:root {
  --page: #b9bec3;
  --shell: #ecece7;
  --card: rgba(255, 255, 255, 0.72);
  --card-solid: #f7f6f1;
  --ink: #171817;
  --ink-soft: #343633;
  --muted: #777973;
  --dark: #303130;
  --dark-2: #252625;
  --yellow: #ffd650;
  --yellow-soft: #fff0a9;
  --line: rgba(31, 32, 30, 0.1);
  --line-strong: rgba(31, 32, 30, 0.17);
  --radius-xl: 34px;
  --radius-lg: 27px;
  --radius-md: 18px;
  --shadow: 0 18px 48px rgba(28, 29, 27, 0.06);
  --shadow-hover: 0 22px 55px rgba(28, 29, 27, 0.1);
  --sidebar-width: 226px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family:
    "Manrope",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

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

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

img {
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

/* Application shell */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  width: calc(100% - 22px);
  min-height: calc(100vh - 22px);
  margin: 11px;
  overflow: hidden;
  border-radius: 42px;
  background: var(--shell);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 22px);
  padding: 24px 16px 16px;
  border-right: 1px solid rgba(40, 41, 39, 0.07);
  background: rgba(243, 243, 238, 0.58);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 4px 24px;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 60px;
  padding: 8px 12px;
}

.brand img {
  width: 160px;
  height: 44px;
  object-fit: contain;
}

.sidebar nav {
  display: grid;
  gap: 5px;
}

.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 50px;
  padding: 10px 14px;
  border-radius: 15px;
  color: #444642;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 600;
  transition:
    background 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease,
    box-shadow 0.16s ease;
}

.sidebar nav a:hover {
  background: rgba(255, 255, 255, 0.62);
}

.sidebar nav a.active {
  background: var(--dark);
  color: #fff;
  box-shadow: 0 9px 24px rgba(35, 36, 34, 0.12);
}

.sidebar nav a.active .nav-icon {
  color: var(--yellow);
}

.nav-icon {
  display: grid;
  place-items: center;
  flex: 0 0 29px;
  width: 29px;
  height: 29px;
  font-size: 17px;
}

.nav-icon i {
  width: 20px;
  line-height: 1;
  text-align: center;
}

.sidebar-bottom {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  padding: 14px 4px 0;
}

.sidebar-user {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1;
  gap: 10px;
}

.sidebar-user > div {
  min-width: 0;
}

.sidebar-user strong,
.sidebar-user small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user strong {
  font-size: 13px;
  line-height: 1.3;
  font-weight: 600;
}

.sidebar-user small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.avatar,
.mini-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--dark);
  color: #fff;
  font-weight: 600;
}

.avatar {
  width: 42px;
  height: 42px;
  font-size: 14px;
}

.mini-avatar {
  width: 42px;
  height: 42px;
  font-size: 14px;
}

.logout {
  margin: 0;
}

.logout button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.64);
  color: var(--ink);
  font-size: 16px;
  cursor: pointer;
  transition:
    background 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease;
}

.logout button:hover {
  background: var(--dark);
  color: #fff;
  transform: translateY(-1px);
}

/* Content and header */
.content {
  min-width: 0;
  padding: 22px 24px 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 102px;
  padding: 0 4px 12px;
}

.topbar h1 {
  margin: 8px 0 0;
  font-size: clamp(40px, 4vw, 58px);
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.05em;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.round-action,
.circle-link {
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  cursor: pointer;
  transition:
    background 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease;
}

.round-action {
  width: 46px;
  height: 46px;
  font-size: 17px;
}

.circle-link {
  width: 42px;
  height: 42px;
  font-size: 16px;
}

.circle-link:hover,
.round-action:hover {
  background: #fff;
  transform: translateY(-1px);
}

/* Dashboard overview */
.dashboard-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(430px, 1fr);
  align-items: end;
  gap: 30px;
  padding: 12px 6px 26px;
}

.overview-labels {
  display: grid;
  grid-template-columns: 110px 110px minmax(180px, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}

.overview-labels > div {
  min-width: 0;
}

.overview-labels span {
  display: block;
  color: #333531;
  font-size: 13px;
  font-weight: 600;
}

.overview-labels strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 500;
}

.overview-labels small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.segmented-track {
  display: flex;
  height: 42px;
  gap: 6px;
}

.segmented-track i {
  display: block;
  border-radius: 999px;
}

.seg-dark {
  background: var(--dark);
}
.seg-yellow {
  background: var(--yellow);
}
.seg-stripe {
  border: 1px solid rgba(255, 255, 255, 0.65);
  background:
    repeating-linear-gradient(
      125deg,
      rgba(255, 255, 255, 0.75) 0 2px,
      transparent 2px 9px
    ),
    rgba(255, 255, 255, 0.22);
}
.seg-outline {
  border: 1px solid rgba(40, 41, 39, 0.35);
  background: rgba(255, 255, 255, 0.18);
}

.overview-numbers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.big-number {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 11px;
  align-items: center;
}

.big-number .number-icon {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.5);
  font-size: 16px;
}

.big-number strong {
  font-size: clamp(46px, 4.3vw, 60px);
  line-height: 0.95;
  font-weight: 400;
  letter-spacing: -0.055em;
}

.big-number small {
  margin-top: 7px;
  color: #444641;
  font-size: 13px;
  font-weight: 600;
}

/* Dashboard mosaic */
.dashboard-mosaic {
  display: grid;
  grid-template-columns: 1.08fr 1.05fr 0.92fr;
  grid-template-areas:
    "snapshot finance expiry"
    "growth income expiry"
    "members transactions transactions";
  gap: 12px;
  align-items: stretch;
}

.panel,
.card {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.56);
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition:
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.panel {
  padding: 22px;
  border-radius: var(--radius-lg);
}

.card {
  padding: 22px;
  border-radius: var(--radius-lg);
}

.panel:hover,
.card:hover {
  box-shadow: var(--shadow-hover);
}

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

.panel-head h2 {
  margin: 6px 0 0;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.panel-head > a:not(.circle-link):not(.btn) {
  color: #686a64;
  font-size: 12px;
  font-weight: 600;
}

.finance-snapshot {
  grid-area: snapshot;
  min-height: 276px;
}

.chart-panel {
  grid-area: finance;
  min-height: 276px;
}

.expiry-panel {
  grid-area: expiry;
  min-height: 100%;
}

.growth-panel {
  grid-area: growth;
  min-height: 238px;
}

.income-panel {
  grid-area: income;
  min-height: 238px;
}

.recent-members-panel {
  grid-area: members;
  min-height: 235px;
}

.transactions-panel {
  grid-area: transactions;
  min-height: 235px;
}

.profit-value {
  margin-top: 14px;
  font-size: clamp(38px, 3.5vw, 50px);
  line-height: 1.05;
  font-weight: 400;
  letter-spacing: -0.05em;
}

.muted {
  color: var(--muted);
}

.compact {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.mini-bars {
  display: flex;
  align-items: end;
  justify-content: space-between;
  height: 102px;
  margin-top: 22px;
  padding: 0 4px;
  gap: 10px;
}

.mini-bars span {
  width: 7px;
  border-radius: 99px;
  background: #333532;
}

.mini-bars span.accent {
  background: var(--yellow);
  box-shadow: 0 0 0 8px rgba(255, 214, 80, 0.18);
}

.week-labels {
  display: flex;
  justify-content: space-between;
  padding: 9px 1px 0;
  color: var(--muted);
  font-size: 11px;
}

.chart-wrap {
  position: relative;
  height: 190px;
  margin-top: 12px;
}

.growth-panel .chart-wrap {
  height: 150px;
  margin-top: 8px;
}

/* Dark panel */
.dark-panel {
  border-color: rgba(255, 255, 255, 0.05);
  background: var(--dark);
  color: #fff;
  box-shadow: 0 20px 50px rgba(24, 25, 24, 0.14);
}

.dark-panel .eyebrow {
  color: #aeb0aa;
}
.light-head h2 {
  color: #fff;
}

.panel-count {
  font-size: 32px;
  line-height: 1;
  font-weight: 400;
}

.dark-list {
  margin-top: 18px;
}

.dark-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.dark-list a:last-child {
  border-bottom: 0;
}

.dark-list-icon {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #4a4b49;
  font-size: 16px;
}

.dark-list div {
  min-width: 0;
  flex: 1;
}

.dark-list strong,
.dark-list small {
  display: block;
}

.dark-list strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
}

.dark-list small {
  margin-top: 4px;
  color: #a5a7a1;
  font-size: 11px;
}

.status-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #555654;
}

.status-dot.done {
  background: var(--yellow);
  box-shadow: inset 0 0 0 4px #3b3c3a;
}

.dark-panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #c6c8c1;
  font-size: 12px;
  font-weight: 600;
}

.dark-panel-footer i {
  font-size: 13px;
}

.dark-empty {
  padding: 45px 10px;
  color: #a4a6a0;
  text-align: center;
  font-size: 12px;
}

.soft-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--yellow-soft);
  font-size: 10px;
  font-weight: 700;
}

.money-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 16px;
}

.money-summary-grid > div {
  min-height: 86px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.54);
}

.money-summary-grid small,
.money-summary-grid strong {
  display: block;
}

.money-summary-grid small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.money-summary-grid strong {
  margin-top: 9px;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.money-summary-grid .yellow-tile {
  background: var(--yellow);
}
.money-summary-grid .yellow-tile small {
  color: #65541b;
}
.money-summary-grid .dark-tile {
  background: var(--dark);
  color: #fff;
}
.money-summary-grid .dark-tile small {
  color: #b6b8b2;
}

/* Lists */
.list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.list a:last-child {
  border-bottom: 0;
}

.list a > div {
  min-width: 0;
  flex: 1;
}

.list strong,
.list small {
  display: block;
}

.list strong {
  font-size: 13px;
  line-height: 1.3;
  font-weight: 600;
}

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

.compact-list {
  margin-top: 8px;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(48, 49, 48, 0.08);
  color: #5d5f59;
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
}

.badge-active,
.badge-paid,
.badge-income {
  background: #e3f3df;
  color: #376d39;
}

.badge-expired,
.badge-inactive,
.badge-unpaid,
.badge-expense,
.badge-cancelled {
  background: #f8e0dc;
  color: #914238;
}

.badge-partial,
.badge-upcoming,
.badge-low-stock {
  background: #fff0ba;
  color: #745b12;
}

/* Tables */
.table-wrap {
  overflow: auto;
  margin-top: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.34);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 15px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
  font-size: 13px;
}

th {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr {
  transition: background 0.15s ease;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.4);
}

.amount-cell {
  font-size: 15px;
  font-weight: 600;
}

.empty,
.empty-cell {
  padding: 30px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

/* Compact dashboard transaction table */
.transactions-panel .table-wrap {
  margin-top: 12px;
}

.transactions-panel th,
.transactions-panel td {
  padding-top: 11px;
  padding-bottom: 11px;
}

/* Cards and common layouts */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 10px;
  margin-top: 10px;
}

.card-head,
.page-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card h2,
.card-head h2 {
  margin: 0 0 12px;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.025em;
}

.card-head a {
  color: #5d5e58;
  font-size: 12px;
  font-weight: 600;
}

.page-actions {
  margin: 4px 0 14px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 16px;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    background 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

.btn i {
  font-size: 14px;
  line-height: 1;
}

.btn-primary {
  background: var(--dark);
  color: #fff;
}

.btn-primary:hover {
  background: #191a19;
}

.btn-light,
.btn-xs {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.66);
  color: var(--ink);
}

.btn-light:hover,
.btn-xs:hover {
  background: #fff;
}

.btn-xs {
  min-height: 35px;
  padding: 7px 11px;
  font-size: 11px;
}

.btn-danger {
  background: #7f3a36;
  color: #fff;
}

.btn-danger:hover {
  background: #6e302d;
}
.btn-block {
  width: 100%;
}

/* Forms */
.form-card {
  max-width: 900px;
}

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

.form-stack {
  display: grid;
  gap: 14px;
}

.form-grid label,
.form-stack label {
  color: #565853;
  font-size: 12px;
  font-weight: 600;
}

.form-grid input,
.form-grid select,
.form-grid textarea,
.form-stack input,
.form-stack select,
.form-stack textarea,
.filters input,
.filters select {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 7px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
  background: rgba(255, 255, 255, 0.63);
  color: var(--ink);
  font-size: 13px;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus,
.form-stack input:focus,
.form-stack select:focus,
.form-stack textarea:focus,
.filters input:focus,
.filters select:focus {
  border-color: rgba(48, 49, 48, 0.38);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 0 0 3px rgba(255, 214, 80, 0.22);
}

.form-grid textarea,
.form-stack textarea {
  min-height: 110px;
  resize: vertical;
}

.span-2 {
  grid-column: span 2;
}

.check {
  display: flex !important;
  align-items: center;
  gap: 8px;
}

.check input {
  width: auto !important;
  min-height: auto !important;
  margin: 0 !important;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.plan-card .price {
  font-size: 34px;
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -0.04em;
}

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

.profile-avatar,
.profile-photo {
  width: 82px;
  height: 82px;
  border-radius: 23px;
}

.profile-avatar {
  display: grid;
  place-items: center;
  background: var(--yellow-soft);
  font-size: 30px;
}

.profile-photo {
  object-fit: cover;
}
.ml-auto {
  margin-left: auto;
}

.action-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.action-row form {
  margin: 0;
}
.danger-zone,
.recent-section {
  margin-top: 10px;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 14px;
  font-size: 12px;
}

/* Notifications */
.flash-stack {
  position: fixed;
  z-index: 100;
  top: 20px;
  right: 20px;
  display: grid;
  gap: 8px;
  width: min(420px, calc(100vw - 40px));
}

.flash {
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  font-size: 12px;
  line-height: 1.45;
}

.flash.success {
  border-left: 4px solid #6da16d;
}
.flash.danger {
  border-left: 4px solid #b65d55;
}
.flash.warning {
  border-left: 4px solid #d9b541;
}
.flash.info {
  border-left: 4px solid #667b91;
}

.flash button {
  float: right;
  margin-left: 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
}

/* Login/public */
.login-page,
.public-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 20px;
  background:
    radial-gradient(
      circle at 82% 12%,
      rgba(255, 220, 95, 0.62),
      transparent 31%
    ),
    linear-gradient(120deg, #d9dddf 0%, #ecece8 53%, #fff0b1 100%);
}

.login-card,
.error-card {
  width: min(440px, 100%);
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 34px;
  background: rgba(249, 248, 243, 0.76);
  box-shadow: 0 24px 70px rgba(37, 37, 31, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.login-brand {
  margin-bottom: 24px;
  text-align: center;
}

.login-brand img {
  width: 190px;
  height: 74px;
  object-fit: contain;
}

.login-brand h1 {
  margin: 9px 0 6px;
  font-size: 38px;
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.login-brand p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.error-card {
  text-align: center;
}
.error-card > strong,
.error-code {
  display: block;
  margin-bottom: 8px;
  font-size: 72px;
  line-height: 1;
  font-weight: 500;
}

.mobile-only {
  display: none;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  font-size: 17px;
  cursor: pointer;
  transition:
    background 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease;
}

.icon-btn:hover {
  background: #fff;
  transform: translateY(-1px);
}

.icon-btn.mobile-only,
.mobile-only {
  display: none;
}

.content-menu-btn {
  display: none;
}

/* Font Awesome sizing consistency */
.nav-icon i,
.number-icon i,
.round-action i,
.circle-link i,
.btn i,
.logout i,
.icon-btn i,
.dark-list-icon i {
  line-height: 1;
}

/* Utilities */
.text-right {
  text-align: right;
}
.text-center {
  text-align: center;
}
.text-muted {
  color: var(--muted);
}
.font-medium {
  font-weight: 500;
}
.font-semibold {
  font-weight: 600;
}
.nowrap {
  white-space: nowrap;
}

/* Responsive */
@media (max-width: 1180px) {
  :root {
    --sidebar-width: 196px;
  }

  .brand img {
    width: 138px;
  }

  .sidebar nav a {
    padding-left: 11px;
    padding-right: 11px;
    font-size: 13px;
  }

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

  .overview-numbers {
    max-width: 650px;
  }

  .dashboard-mosaic {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "snapshot finance"
      "growth expiry"
      "income expiry"
      "members transactions";
  }

  .growth-panel,
  .income-panel,
  .recent-members-panel,
  .transactions-panel {
    min-height: 235px;
  }
}

@media (max-width: 860px) {
  .app-shell {
    display: block;
    width: calc(100% - 14px);
    min-height: calc(100vh - 14px);
    margin: 7px;
    border-radius: 32px;
  }

  .sidebar {
    position: fixed;
    z-index: 80;
    top: 7px;
    bottom: 7px;
    left: 7px;
    width: 260px;
    min-height: auto;
    border-radius: 32px 0 0 32px;
    box-shadow: 20px 0 50px rgba(20, 21, 20, 0.12);
    transform: translateX(-110%);
    transition: transform 0.2s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-top .mobile-only {
    display: grid;
    place-items: center;
  }
  .content {
    padding: 18px;
  }
  .content-menu-btn {
    display: grid;
    place-items: center;
  }
  .topbar {
    justify-content: flex-start;
  }
  .topbar-actions {
    margin-left: auto;
  }

  .dashboard-mosaic {
    grid-template-columns: 1fr;
    grid-template-areas:
      "snapshot"
      "finance"
      "expiry"
      "growth"
      "income"
      "members"
      "transactions";
  }

  .dashboard-overview {
    padding-top: 0;
  }
  .overview-numbers {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .plan-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .growth-panel .chart-wrap {
    height: 170px;
  }

  .icon-btn.mobile-only,
  .mobile-only {
    display: grid;
  }

  .content-menu-btn {
    display: grid;
  }
}

@media (max-width: 600px) {
  .app-shell {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    border-radius: 0;
  }

  .content {
    padding: 14px;
  }

  .topbar {
    align-items: flex-start;
    min-height: 86px;
  }

  .topbar h1 {
    font-size: 36px;
  }
  .topbar-actions {
    display: none;
  }
  .eyebrow {
    font-size: 10px;
  }

  .dashboard-overview {
    gap: 18px;
  }

  .overview-labels {
    grid-template-columns: 1fr 1fr;
  }

  .overview-labels .wide {
    grid-column: 1 / -1;
  }
  .overview-labels span {
    font-size: 12px;
  }
  .overview-labels strong {
    font-size: 20px;
  }
  .segmented-track {
    height: 34px;
  }
  .overview-numbers {
    gap: 8px;
  }

  .big-number {
    display: block;
  }
  .big-number .number-icon {
    margin-bottom: 7px;
  }
  .big-number strong {
    font-size: 40px;
  }

  .panel,
  .card {
    padding: 18px;
    border-radius: 22px;
  }

  .panel-head h2,
  .card h2,
  .card-head h2 {
    font-size: 20px;
  }

  .money-summary-grid {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .span-2 {
    grid-column: span 1;
  }
  .plan-grid {
    grid-template-columns: 1fr;
  }

  .page-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .filters {
    width: 100%;
  }
  .filters > * {
    min-width: 140px;
    flex: 1;
  }

  th,
  td {
    padding: 13px 12px;
    font-size: 12px;
  }

  .login-card,
  .error-card {
    padding: 28px;
  }

  .login-brand h1 {
    font-size: 34px;
  }
}

@media (max-width: 420px) {
  .overview-numbers {
    grid-template-columns: 1fr 1fr;
  }
  .overview-numbers .big-number:last-child {
    grid-column: 1 / -1;
  }

  .login-card,
  .error-card {
    padding: 25px;
    border-radius: 28px;
  }

  .profit-value {
    font-size: 36px;
  }
}

@media print {
  body {
    background: #fff;
  }
  .sidebar,
  .topbar,
  .page-actions,
  .flash-stack {
    display: none !important;
  }

  .app-shell {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    background: #fff;
    box-shadow: none;
  }

  .content {
    padding: 0;
  }
  .card,
  .panel {
    border: 1px solid #ddd;
    background: #fff;
    box-shadow: none;
  }
}

/* =========================================================
   MEMBERSHIP PAYMENT LEDGER
   ========================================================= */
.payment-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.payment-summary-grid > div {
  min-height: 92px;
  padding: 16px;
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.56);
}
.payment-summary-grid small,
.payment-summary-grid strong {
  display: block;
}
.payment-summary-grid small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.payment-summary-grid strong {
  margin-top: 10px;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -0.035em;
}
.payment-summary-grid .yellow-tile {
  background: var(--yellow);
}
.payment-summary-grid .yellow-tile small {
  color: #66541b;
}
.payment-summary-grid .dark-tile {
  background: var(--dark);
  color: #fff;
}
.payment-summary-grid .dark-tile small {
  color: #b9bbb4;
}
.form-section-heading {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.form-section-heading h2 {
  margin: 5px 0 0;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.025em;
}
@media (max-width: 600px) {
  .payment-summary-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   PRODUCT SALES / RECEIVABLES
   ========================================================= */
.sale-total-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--yellow-soft);
}
.sale-total-preview span {
  color: #66541b;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.sale-total-preview strong {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
}
