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

:root {
  --color-primary: #2657ff;
  --color-primary-dark: #173fd0;
  --color-primary-soft: #edf3ff;
  --color-accent: #20d7a4;
  --color-accent-soft: #e8fbf5;
  --color-ink: #101828;
  --color-text: #243044;
  --color-text-muted: #758097;
  --color-text-soft: #a7b0c2;
  --color-bg: #f4f7fb;
  --color-surface: #ffffff;
  --color-surface-raised: #fbfdff;
  --color-border: #e5eaf3;
  --color-success: #16b981;
  --color-error: #ef476f;
  --color-warning: #f59e0b;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-pill: 999px;
  --shadow-card: 0 24px 55px rgba(31, 60, 136, 0.14);
  --shadow-soft: 0 14px 34px rgba(31, 60, 136, 0.08);
  --font-main: "Noto Sans Thai", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-main);
  background:
    radial-gradient(circle at 12% 8%, rgba(32, 215, 164, 0.18), transparent 24rem),
    radial-gradient(circle at 84% 18%, rgba(38, 87, 255, 0.16), transparent 28rem),
    linear-gradient(135deg, #fbfdff 0%, var(--color-bg) 54%, #eef4ff 100%);
  color: var(--color-text);
  font-size: 14px;
  letter-spacing: 0;
}

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

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

.app-layout {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  min-height: 100vh;
}

.side-nav {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  background: rgba(255, 255, 255, 0.92);
  border-right: 1px solid rgba(229, 234, 243, 0.86);
  backdrop-filter: blur(18px);
}

.brand,
.user-chip,
.nav-link,
.transaction-row,
.data-main,
.panel-header,
.balance-meta,
.ratio-line,
.toolbar-panel,
.summary-strip,
.month-row {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  margin-bottom: 28px;
  padding: 8px;
}

.brand small,
.eyebrow,
.muted-text,
.empty-state,
.transaction-row small,
.data-main small,
.login-copy p,
.profile-card p {
  color: var(--color-text-muted);
}

.brand-mark,
.nav-icon,
.row-avatar,
.profile-avatar span,
.google-button span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  overflow: hidden;
  background: #0d0d0d;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 14px 28px rgba(10, 10, 10, 0.18);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.brand strong {
  color: var(--color-ink);
  font-size: 17px;
}

.brand small {
  margin-top: 1px;
  font-size: 12px;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-link {
  gap: 11px;
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 16px;
  color: var(--color-text-muted);
  font-weight: 700;
}

.nav-link:hover {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.nav-icon {
  width: 34px;
  height: 34px;
  border-radius: 14px;
  background: #f2f5fb;
  color: var(--color-text-soft);
  font-weight: 800;
}

.nav-icon svg,
.bottom-nav svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-link.is-active {
  background: #f1f6ff;
  color: var(--color-primary);
  box-shadow: inset 0 0 0 1px rgba(38, 87, 255, 0.08);
}

.nav-link.is-active .nav-icon {
  background: var(--color-primary);
  color: #fff;
}

.main-panel {
  min-width: 0;
  width: min(100%, 1240px);
  padding: 28px;
  padding-bottom: 108px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 5px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  color: var(--color-ink);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.25;
}

h2 {
  margin-bottom: 0;
  color: var(--color-ink);
  font-size: 17px;
  font-weight: 800;
}

.user-chip {
  gap: 10px;
  max-width: 280px;
  min-height: 46px;
  padding: 6px 14px 6px 6px;
  border: 1px solid rgba(229, 234, 243, 0.9);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
}

.user-chip img,
.user-chip span,
.profile-avatar img,
.profile-avatar span {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-weight: 800;
}

.user-chip strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(300px, 1.35fr) repeat(3, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.balance-card,
.panel,
.metric-card,
.toolbar-panel,
.summary-strip,
.login-card {
  border: 1px solid rgba(229, 234, 243, 0.82);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
}

.balance-card {
  position: relative;
  overflow: hidden;
  min-height: 198px;
  padding: 24px;
  color: #fff;
  border: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 42%),
    linear-gradient(135deg, #10256f 0%, #2454ff 58%, #20d7a4 120%);
  box-shadow: var(--shadow-card);
}

.balance-card::before,
.balance-card::after {
  position: absolute;
  content: "";
  border-radius: 999px;
  pointer-events: none;
}

.balance-card::before {
  right: -70px;
  top: -70px;
  width: 180px;
  height: 180px;
  border: 30px solid rgba(255, 255, 255, 0.13);
}

.balance-card::after {
  right: 24px;
  bottom: 22px;
  width: 58px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.12);
}

.balance-card p {
  position: relative;
  z-index: 1;
  margin: 30px 0 7px;
  color: rgba(255, 255, 255, 0.78);
}

.balance-card strong {
  position: relative;
  z-index: 1;
  display: block;
  font-size: 32px;
  line-height: 1.2;
}

.balance-card .status-pill {
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  backdrop-filter: blur(10px);
}

.balance-card .status-good {
  box-shadow: inset 0 0 0 1px rgba(32, 215, 164, 0.24);
}

.balance-card .status-caution,
.balance-card .status-high-risk,
.balance-card .status-danger,
.balance-card .status-muted {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.balance-meta,
.ratio-line,
.panel-header,
.toolbar-panel,
.summary-strip {
  justify-content: space-between;
  gap: 12px;
}

.ratio-line {
  position: relative;
  z-index: 1;
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.76);
}

.ratio-line b {
  color: #fff;
}

.risk-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: max-content;
  min-width: 0;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.16);
  line-height: 1.2;
  white-space: nowrap;
}

.metric-card {
  min-height: 138px;
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.metric-card::after,
.summary-strip-visual::after,
.insight-panel::after {
  position: absolute;
  content: "";
  width: 84px;
  height: 84px;
  right: -26px;
  top: -26px;
  border-radius: 50%;
  background: rgba(38, 87, 255, 0.08);
}

.metric-card-accent::after {
  background: rgba(32, 215, 164, 0.16);
}

.metric-card-danger::after {
  background: rgba(239, 71, 111, 0.13);
}

.metric-card-warning::after {
  background: rgba(245, 158, 11, 0.15);
}

.metric-card span,
.summary-strip span {
  display: block;
  margin-bottom: 12px;
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 600;
}

.metric-card strong,
.summary-strip strong,
.highlight-line {
  color: var(--color-ink);
  font-size: 22px;
  font-weight: 800;
}

.metric-card small {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 8px;
  color: var(--color-text-muted);
  font-weight: 700;
}

.content-grid,
.profile-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.panel {
  padding: 18px;
}

.insight-panel,
.summary-strip-visual {
  position: relative;
  overflow: hidden;
}

.insight-panel {
  background:
    linear-gradient(135deg, rgba(38, 87, 255, 0.07), rgba(32, 215, 164, 0.07)),
    rgba(255, 255, 255, 0.94);
}

.panel-wide {
  grid-column: 1 / -1;
}

.panel-header {
  margin-bottom: 16px;
}

.text-link {
  color: var(--color-primary);
  font-weight: 800;
}

.advice-text {
  margin-bottom: 0;
  color: var(--color-text-muted);
  line-height: 1.8;
}

.list-stack {
  display: grid;
  gap: 12px;
}

.transaction-row {
  gap: 12px;
  min-height: 50px;
}

.transaction-row > div {
  min-width: 0;
  flex: 1;
}

.transaction-row strong,
.transaction-row small,
.data-main strong,
.data-main small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transaction-row b {
  flex: 0 0 auto;
}

.row-avatar {
  width: 40px;
  height: 40px;
  border-radius: 15px;
  font-weight: 800;
}

.bg-success {
  background: var(--color-accent-soft);
  color: var(--color-success);
}

.bg-danger {
  background: rgba(239, 71, 111, 0.11);
  color: var(--color-error);
}

.bg-muted {
  background: #f0f4fa;
  color: var(--color-text-soft);
}

.text-success {
  color: var(--color-success) !important;
}

.text-danger {
  color: var(--color-error) !important;
}

.flash {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  line-height: 1.6;
}

.flash-success {
  background: rgba(22, 185, 129, 0.1);
  color: #087a55;
}

.flash-error {
  background: rgba(239, 71, 111, 0.1);
  color: #b4234c;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status-good {
  background: rgba(22, 185, 129, 0.13);
  color: #087a55;
}

.status-caution {
  background: rgba(245, 158, 11, 0.13);
  color: #a15c00;
}

.status-high-risk {
  background: rgba(249, 115, 22, 0.14);
  color: #b44909;
}

.status-danger {
  background: rgba(239, 71, 111, 0.12);
  color: #b4234c;
}

.status-muted {
  background: #f0f4fa;
  color: var(--color-text-muted);
}

.toolbar-panel {
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 14px;
}

.filter-form,
.stack-form,
.form-grid {
  display: grid;
  gap: 12px;
}

.filter-form {
  grid-template-columns: minmax(150px, 1fr) 120px auto;
  align-items: end;
  flex: 1;
}

label span {
  display: block;
  margin-bottom: 7px;
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-raised);
  color: var(--color-text);
}

input,
select {
  height: 48px;
  padding: 0 13px;
}

textarea {
  min-height: 116px;
  padding: 12px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--color-primary);
  outline: none;
  box-shadow: 0 0 0 4px rgba(38, 87, 255, 0.09);
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button,
.danger-outline-button,
.google-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  border-radius: var(--radius-md);
  border: 0;
  padding: 0 16px;
  font-weight: 800;
  cursor: pointer;
}

.primary-button {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 14px 26px rgba(38, 87, 255, 0.2);
}

.primary-button:hover {
  background: var(--color-primary-dark);
}

.secondary-button {
  border: 1px solid rgba(38, 87, 255, 0.22);
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.ghost-button {
  min-height: 36px;
  background: #f1f5fb;
  color: var(--color-text-muted);
}

.danger-button,
.danger-outline-button {
  color: var(--color-error);
}

.danger-button {
  min-height: 36px;
  background: rgba(239, 71, 111, 0.1);
}

.danger-outline-button {
  width: fit-content;
  border: 1px solid rgba(239, 71, 111, 0.28);
  background: #fff;
}

.compact-button {
  min-width: 132px;
}

.small-button {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

.summary-strip {
  margin-bottom: 16px;
  padding: 18px;
}

.summary-strip > div {
  min-width: 0;
}

.table-list {
  display: grid;
  gap: 10px;
}

.data-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(120px, auto) auto auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: #fff;
}

.data-row-compact {
  grid-template-columns: minmax(220px, 1fr) minmax(120px, auto) auto auto;
}

.data-main {
  gap: 12px;
  min-width: 0;
}

.data-main > div {
  min-width: 0;
}

.data-amount {
  color: var(--color-ink);
  font-weight: 800;
  white-space: nowrap;
}

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

.row-actions form {
  display: inline-flex;
}

.form-shell {
  display: flex;
  justify-content: center;
}

.form-panel {
  width: 100%;
  max-width: 760px;
}

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

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.calendar-scroll {
  overflow-x: auto;
  padding-bottom: 4px;
}

.calendar-weekday {
  padding: 8px;
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.calendar-day {
  min-height: 128px;
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: #fff;
}

.calendar-day.is-empty {
  border-style: dashed;
  background: transparent;
}

.calendar-day.is-today {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(38, 87, 255, 0.1);
}

.day-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--color-text-muted);
  font-weight: 800;
}

.calendar-events {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.calendar-event {
  min-width: 0;
  padding: 6px 7px;
  border-radius: 10px;
  font-size: 11px;
}

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

.event-income {
  background: var(--color-accent-soft);
  color: #087a55;
}

.event-debt {
  background: rgba(239, 71, 111, 0.11);
  color: #b4234c;
}

.event-paid {
  background: #f0f4fa;
  color: var(--color-text-muted);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 700;
}

.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 5px;
  border-radius: 50%;
}

.income-dot {
  background: var(--color-success);
}

.debt-dot {
  background: var(--color-error);
}

.paid-dot {
  background: var(--color-text-soft);
}

.more-events {
  color: var(--color-text-muted);
}

.summary-list {
  display: grid;
  gap: 12px;
}

.summary-list > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}

.summary-list > div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.summary-list span {
  color: var(--color-text-muted);
}

.year-table {
  display: grid;
  gap: 8px;
}

.month-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(110px, auto) minmax(110px, auto) minmax(110px, auto);
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-lg);
  background: #f6f8fc;
}

.month-row em {
  justify-self: end;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.profile-layout {
  align-items: start;
}

.profile-card {
  text-align: center;
}

.profile-avatar img,
.profile-avatar span {
  width: 84px;
  height: 84px;
  margin: 0 auto 14px;
  font-size: 28px;
}

.truncate-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-body {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 207, 71, 0.18), transparent 22rem),
    radial-gradient(circle at 82% 12%, rgba(32, 215, 164, 0.16), transparent 24rem),
    linear-gradient(135deg, #09111f 0%, #10256f 58%, #0d1b2f 100%);
}

.login-shell {
  width: min(100%, 452px);
}

.login-shell-figma {
  width: min(100%, 1040px);
}

.login-card {
  padding: 24px;
}

.login-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.58fr);
  align-items: center;
  gap: 32px;
  min-height: 520px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05)),
    rgba(255, 255, 255, 0.07);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(24px);
}

.login-hero-copy,
.login-action-panel {
  color: #fff;
}

.login-hero-copy .eyebrow {
  color: rgba(255, 255, 255, 0.68);
}

.login-hero-copy h1 {
  max-width: 420px;
  margin-bottom: 14px;
  color: #fff;
  font-size: 38px;
  line-height: 1.18;
}

.login-hero-copy p:last-child,
.login-action-panel p {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.8;
}

.login-logo {
  width: 58px;
  height: 58px;
  margin-bottom: 22px;
  border-radius: 20px;
}

.phone-preview {
  position: relative;
  min-height: 560px;
  padding: 22px;
  border: 10px solid rgba(255, 255, 255, 0.18);
  border-radius: 42px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f6f8fc 100%);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.34);
}

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

.phone-top span {
  width: 68px;
  height: 8px;
  border-radius: 999px;
  background: #d9e0ec;
}

.phone-top i {
  width: 34px;
  height: 34px;
  border-radius: 13px;
  background: var(--color-primary-soft);
}

.phone-card {
  display: grid;
  gap: 8px;
  min-height: 178px;
  padding: 20px;
  border-radius: 28px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 40%),
    linear-gradient(135deg, #10256f, #2657ff 62%, #20d7a4 135%);
  box-shadow: 0 24px 52px rgba(38, 87, 255, 0.25);
}

.phone-card small {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 700;
}

.phone-card strong {
  color: #fff;
  font-size: 25px;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 22px 0;
}

.quick-actions span {
  display: grid;
  place-items: center;
  height: 70px;
  border-radius: 22px;
  background: #eef4ff;
  color: var(--color-primary);
}

.quick-actions svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
}

.phone-list {
  display: grid;
  gap: 12px;
}

.phone-list div {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(31, 60, 136, 0.08);
  font-weight: 800;
}

.login-action-panel {
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.1);
}

.login-action-panel h2 {
  color: #fff;
  font-size: 24px;
}

.login-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 22px;
}

.login-header h1 {
  font-size: 21px;
  line-height: 1.35;
}

.login-preview {
  margin-bottom: 22px;
}

.login-preview span {
  display: block;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
}

.login-copy h2 {
  margin-bottom: 8px;
  font-size: 17px;
}

.google-button {
  width: 100%;
  margin-top: 18px;
  background: var(--color-primary);
  color: #fff;
}

.google-button span {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  color: var(--color-primary);
}

.bottom-nav {
  display: none;
}

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

  .side-nav {
    display: none;
  }

  .main-panel {
    width: 100%;
  }

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

  .balance-card {
    grid-column: 1 / -1;
  }

  .bottom-nav {
    position: fixed;
    right: 14px;
    bottom: 14px;
    left: 14px;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    padding: 8px;
    border: 1px solid rgba(229, 234, 243, 0.9);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(18px);
  }

  .bottom-nav a {
    display: grid;
    place-items: center;
    gap: 3px;
    min-height: 50px;
    border-radius: 16px;
    color: var(--color-text-soft);
    font-weight: 800;
  }

  .bottom-nav span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 12px;
    background: #f1f5fb;
  }

  .bottom-nav small {
    font-size: 10px;
  }

  .bottom-nav a.is-active {
    color: var(--color-primary);
    background: var(--color-primary-soft);
  }

  .bottom-nav a.is-active span {
    background: var(--color-primary);
    color: #fff;
  }

  .login-hero-card {
    grid-template-columns: 1fr;
  }

  .phone-preview {
    justify-self: center;
    width: min(100%, 340px);
  }
}

@media (max-width: 760px) {
  .main-panel {
    padding: 18px;
    padding-bottom: 100px;
  }

  .topbar {
    align-items: flex-start;
  }

  .user-chip {
    max-width: 46px;
    padding: 6px;
  }

  .user-chip strong {
    display: none;
  }

  .dashboard-grid,
  .content-grid,
  .profile-layout,
  .filter-form,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .data-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .data-row-compact {
    grid-template-columns: 1fr;
  }

  .data-amount,
  .row-actions {
    justify-self: stretch;
  }

  .row-actions {
    justify-content: flex-start;
  }

  .summary-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  .calendar-grid {
    gap: 8px;
    min-width: 720px;
  }

  .calendar-day {
    min-height: 118px;
    padding: 8px;
  }

  .calendar-event {
    padding: 6px;
    font-size: 11px;
  }

  .calendar-event small {
    display: block;
  }

  .toolbar-panel .compact-button {
    width: 100%;
    margin-top: 2px;
  }

  .toolbar-panel .filter-form {
    width: 100%;
  }

  .login-body {
    padding: 14px;
  }

  .login-hero-card {
    min-height: 0;
    padding: 18px;
    border-radius: 28px;
  }

  .login-hero-copy h1 {
    font-size: 28px;
  }

  .phone-preview {
    min-height: 480px;
    border-width: 8px;
  }

  .month-row {
    grid-template-columns: 1fr;
  }

  .month-row em {
    justify-self: start;
  }
}

@media (max-width: 430px) {
  .login-body {
    padding: 0;
  }

  .login-card {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .calendar-day {
    min-height: 118px;
  }

  .calendar-event strong {
    max-width: 100%;
  }
}
