:root {
  --ebm-bg: #030712;
  --ebm-bg-deep: #01040b;
  --ebm-surface: #07101f;
  --ebm-surface-2: #0b1628;
  --ebm-surface-3: #0f1d32;
  --ebm-line: rgba(132, 168, 219, 0.16);
  --ebm-line-strong: rgba(25, 200, 255, 0.34);
  --ebm-text: #f4f8ff;
  --ebm-muted: #8d9bb2;
  --ebm-cyan: #19c8ff;
  --ebm-cyan-soft: #81e6ff;
  --ebm-violet: #8b5cf6;
  --ebm-mint: #37d39a;
  --ebm-amber: #f5a524;
  --ebm-danger: #ff5d77;
  --ebm-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  --ebm-radius-sm: 12px;
  --ebm-radius: 18px;
  --ebm-radius-lg: 24px;
  --ebm-font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html {
  background: var(--ebm-bg);
}

body.ebm-expenses-page {
  min-width: 320px;
  margin: 0 !important;
  background: var(--ebm-bg) !important;
  color: var(--ebm-text) !important;
  font-family: var(--ebm-font) !important;
  overflow-x: hidden;
}

body.ebm-expenses-page::before,
body.ebm-expenses-page::after {
  content: "";
  position: fixed;
  z-index: 0;
  width: 45vw;
  height: 45vw;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.12;
  pointer-events: none;
}

body.ebm-expenses-page::before {
  top: -22vw;
  right: -10vw;
  background: var(--ebm-violet);
}

body.ebm-expenses-page::after {
  bottom: -28vw;
  left: 12vw;
  background: var(--ebm-cyan);
}

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

.ebm-app {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  color: var(--ebm-text);
  font-family: var(--ebm-font);
  font-size: 14px;
  line-height: 1.5;
  background:
    linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px);
  background-size: 42px 42px;
}

.ebm-app button,
.ebm-app input,
.ebm-app select,
.ebm-app textarea {
  margin: 0;
  color: inherit;
  font: inherit;
}

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

.ebm-app button {
  cursor: pointer;
  touch-action: manipulation;
}

.ebm-app svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ebm-app [hidden] {
  display: none !important;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.ebm-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  width: 220px;
  flex-direction: column;
  padding: 24px 18px;
  border-right: 1px solid var(--ebm-line);
  background: rgba(3, 8, 19, 0.9);
  box-shadow: 20px 0 60px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(24px);
}

.ebm-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 10px;
  color: var(--ebm-text);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-decoration: none;
}

.ebm-brand-mark {
  display: flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 1px solid var(--ebm-line-strong);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(25, 200, 255, 0.16), rgba(139, 92, 246, 0.1));
  box-shadow: inset 0 0 24px rgba(25, 200, 255, 0.08), 0 0 30px rgba(25, 200, 255, 0.08);
}

.ebm-brand-mark i {
  display: block;
  width: 3px;
  border-radius: 8px;
  background: linear-gradient(var(--ebm-cyan-soft), var(--ebm-violet));
  box-shadow: 0 0 8px rgba(25, 200, 255, 0.55);
}

.ebm-brand-mark i:nth-child(1),
.ebm-brand-mark i:nth-child(5) { height: 10px; }
.ebm-brand-mark i:nth-child(2),
.ebm-brand-mark i:nth-child(4) { height: 20px; }
.ebm-brand-mark i:nth-child(3) { height: 28px; }

.ebm-main-nav {
  display: grid;
  gap: 8px;
  margin-top: 46px;
}

.ebm-nav-item {
  position: relative;
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 13px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: var(--ebm-radius-sm);
  color: var(--ebm-muted);
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.ebm-nav-item:hover,
.ebm-nav-item:focus-visible {
  color: var(--ebm-text);
  border-color: var(--ebm-line);
  background: rgba(255, 255, 255, 0.035);
  outline: none;
}

.ebm-nav-item.is-active {
  color: var(--ebm-cyan-soft);
  border-color: rgba(25, 200, 255, 0.2);
  background: linear-gradient(90deg, rgba(25, 200, 255, 0.14), rgba(25, 200, 255, 0.025));
}

.ebm-nav-item.is-active::before {
  content: "";
  position: absolute;
  left: -19px;
  width: 3px;
  height: 24px;
  border-radius: 0 4px 4px 0;
  background: var(--ebm-cyan);
  box-shadow: 0 0 14px rgba(25, 200, 255, 0.8);
}

.ebm-sidebar-footer {
  display: grid;
  gap: 6px;
  margin-top: auto;
}

.ebm-main {
  width: calc(100% - 220px);
  max-width: 1640px;
  margin-left: 220px;
  padding: 30px clamp(22px, 3.2vw, 54px) 54px;
}

.ebm-topbar {
  display: flex;
  min-height: 72px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.ebm-topbar h1,
.ebm-panel-head h2,
.ebm-recorder-copy h2,
.ebm-modal h2 {
  margin: 0;
  color: var(--ebm-text);
  font-family: var(--ebm-font);
}

.ebm-topbar h1 {
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 760;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.ebm-topbar p,
.ebm-panel-head p {
  margin: 6px 0 0;
  color: var(--ebm-muted);
  font-size: 13px;
}

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

.ebm-connection {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid var(--ebm-line);
  border-radius: 999px;
  color: var(--ebm-muted);
  background: rgba(7, 16, 31, 0.72);
  font-size: 11px;
  font-weight: 650;
}

.ebm-connection i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ebm-mint);
  box-shadow: 0 0 10px rgba(55, 211, 154, 0.72);
}

.ebm-connection.is-warning i { background: var(--ebm-amber); box-shadow: 0 0 10px rgba(245, 165, 36, 0.65); }

.ebm-icon-button,
.ebm-pagination button {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--ebm-line);
  border-radius: 11px;
  color: var(--ebm-muted);
  background: rgba(7, 16, 31, 0.72);
  transition: 180ms ease;
}

.ebm-icon-button:hover,
.ebm-pagination button:hover:not(:disabled) {
  color: var(--ebm-cyan-soft);
  border-color: var(--ebm-line-strong);
  transform: translateY(-1px);
}

.ebm-summary-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 16px;
  margin-top: 22px;
}

.ebm-stat-card {
  position: relative;
  display: grid;
  min-height: 126px;
  grid-template-columns: 42px 1fr auto;
  align-items: start;
  gap: 15px;
  padding: 21px;
  overflow: hidden;
  border: 1px solid var(--ebm-line);
  border-radius: var(--ebm-radius);
  background: linear-gradient(145deg, rgba(12, 25, 44, 0.9), rgba(5, 12, 24, 0.95));
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18), inset 0 1px rgba(255, 255, 255, 0.025);
}

.ebm-stat-card::after {
  content: "";
  position: absolute;
  inset: auto -30% -80% 40%;
  height: 140px;
  border-radius: 50%;
  background: var(--ebm-card-glow, var(--ebm-cyan));
  filter: blur(68px);
  opacity: 0.11;
}

.ebm-stat-review { --ebm-card-glow: var(--ebm-amber); }
.ebm-stat-records { --ebm-card-glow: var(--ebm-violet); }

.ebm-stat-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(25, 200, 255, 0.3);
  border-radius: 12px;
  color: var(--ebm-cyan-soft);
  background: rgba(25, 200, 255, 0.1);
}

.ebm-stat-review .ebm-stat-icon { color: #ffd27a; border-color: rgba(245, 165, 36, 0.36); background: rgba(245, 165, 36, 0.12); }
.ebm-stat-records .ebm-stat-icon { color: #c6adff; border-color: rgba(139, 92, 246, 0.36); background: rgba(139, 92, 246, 0.12); }

.ebm-stat-card span {
  display: block;
  color: #b7c4d7;
  font-size: 12px;
  font-weight: 650;
}

.ebm-stat-card strong {
  display: block;
  margin-top: 6px;
  color: var(--ebm-text);
  font-size: clamp(22px, 2.3vw, 31px);
  font-weight: 760;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.ebm-stat-card small {
  display: block;
  margin-top: 7px;
  color: var(--ebm-muted);
  font-size: 10px;
}

.ebm-mini-chart {
  display: flex;
  height: 42px;
  align-items: flex-end;
  gap: 4px;
  margin-top: 22px;
}

.ebm-mini-chart i {
  width: 4px;
  border-radius: 8px;
  background: linear-gradient(var(--ebm-cyan-soft), var(--ebm-cyan));
  box-shadow: 0 0 10px rgba(25, 200, 255, 0.3);
}

.ebm-mini-chart i:nth-child(1) { height: 14px; }
.ebm-mini-chart i:nth-child(2) { height: 24px; }
.ebm-mini-chart i:nth-child(3) { height: 20px; }
.ebm-mini-chart i:nth-child(4) { height: 34px; }
.ebm-mini-chart i:nth-child(5) { height: 29px; }

.ebm-stat-orbit,
.ebm-pulse-dot {
  align-self: center;
  justify-self: center;
}

.ebm-stat-orbit {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(245, 165, 36, 0.35);
  border-radius: 50%;
  box-shadow: inset 0 0 12px rgba(245, 165, 36, 0.12), 0 0 20px rgba(245, 165, 36, 0.08);
}

.ebm-pulse-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--ebm-violet);
  box-shadow: 0 0 0 8px rgba(139, 92, 246, 0.08), 0 0 22px rgba(139, 92, 246, 0.5);
}

.ebm-recorder {
  position: relative;
  display: grid;
  min-height: 238px;
  grid-template-columns: 230px minmax(270px, 0.9fr) minmax(260px, 1.1fr);
  align-items: center;
  gap: clamp(16px, 3vw, 42px);
  margin-top: 18px;
  padding: 28px clamp(22px, 3vw, 42px);
  overflow: hidden;
  border: 1px solid rgba(25, 200, 255, 0.2);
  border-radius: var(--ebm-radius-lg);
  background:
    radial-gradient(circle at 18% 52%, rgba(25, 200, 255, 0.14), transparent 28%),
    radial-gradient(circle at 78% 30%, rgba(139, 92, 246, 0.08), transparent 32%),
    linear-gradient(130deg, rgba(9, 21, 39, 0.96), rgba(4, 10, 21, 0.97));
  box-shadow: var(--ebm-shadow), inset 0 1px rgba(255, 255, 255, 0.03);
}

.ebm-recorder::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 34%, rgba(255, 255, 255, 0.022) 50%, transparent 66%);
  pointer-events: none;
}

.ebm-recorder-visual {
  display: grid;
  place-items: center;
}

.ebm-mic-button {
  position: relative;
  display: grid;
  width: 134px;
  height: 134px;
  place-items: center;
  border: 1px solid rgba(129, 230, 255, 0.9);
  border-radius: 50%;
  color: #d8f8ff;
  background: radial-gradient(circle at 50% 42%, rgba(25, 200, 255, 0.25), rgba(7, 19, 35, 0.96) 60%);
  box-shadow:
    0 0 0 8px rgba(25, 200, 255, 0.06),
    0 0 0 19px rgba(25, 200, 255, 0.025),
    0 0 36px rgba(25, 200, 255, 0.38),
    inset 0 0 34px rgba(25, 200, 255, 0.12);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.ebm-mic-button svg {
  width: 51px;
  height: 51px;
  stroke-width: 1.55;
  filter: drop-shadow(0 0 12px rgba(25, 200, 255, 0.55));
}

.ebm-mic-button:hover,
.ebm-mic-button:focus-visible {
  outline: none;
  transform: scale(1.035);
  box-shadow: 0 0 0 9px rgba(25, 200, 255, 0.08), 0 0 0 22px rgba(25, 200, 255, 0.03), 0 0 54px rgba(25, 200, 255, 0.52), inset 0 0 38px rgba(25, 200, 255, 0.17);
}

.ebm-app[data-state="recording"] .ebm-mic-button {
  color: #fff;
  border-color: rgba(129, 230, 255, 0.98);
  background: radial-gradient(circle at 50% 42%, rgba(25, 200, 255, 0.27), rgba(8, 13, 31, 0.97) 62%);
  box-shadow: 0 0 0 10px rgba(25, 200, 255, 0.09), 0 0 0 24px rgba(139, 92, 246, 0.035), 0 0 54px rgba(25, 200, 255, 0.42);
  animation: ebm-breathe 1.8s ease-in-out infinite;
}

.ebm-recorder-state {
  display: inline-block;
  margin-bottom: 11px;
  color: var(--ebm-cyan);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.ebm-app[data-state="recording"] .ebm-recorder-state { color: var(--ebm-cyan); }
.ebm-app[data-state="processing"] .ebm-recorder-state { color: #c7adff; }

.ebm-recorder-copy h2 {
  font-size: clamp(25px, 3vw, 38px);
  font-weight: 750;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.ebm-recorder-copy > p {
  max-width: 390px;
  margin: 12px 0 0;
  color: var(--ebm-muted);
  font-size: 13px;
}

.ebm-recorder-actions {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 17px;
}

.ebm-recorder-actions > span {
  color: #66778f;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ebm-manual-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  border: 1px solid rgba(139, 92, 246, 0.34);
  border-radius: 11px;
  color: #d6c8ff;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.16), rgba(25, 200, 255, 0.07));
  box-shadow: 0 8px 24px rgba(34, 17, 72, 0.18);
  font-size: 11px;
  font-weight: 720;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.ebm-manual-button svg { width: 16px; height: 16px; }
.ebm-manual-button:hover,
.ebm-manual-button:focus-visible {
  outline: none;
  transform: translateY(-1px);
  border-color: rgba(169, 133, 255, 0.58);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.24), rgba(25, 200, 255, 0.1));
  box-shadow: 0 12px 32px rgba(67, 42, 126, 0.24);
}

.ebm-recording-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.ebm-timer {
  min-width: 64px;
  color: var(--ebm-cyan-soft);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.ebm-waveform {
  width: 100%;
  height: 96px;
  opacity: 0.66;
  pointer-events: none;
}

.ebm-processing {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  background: rgba(3, 8, 19, 0.84);
  backdrop-filter: blur(12px);
}

.ebm-processing strong,
.ebm-processing small {
  display: block;
}

.ebm-processing strong { font-size: 15px; }
.ebm-processing small { margin-top: 3px; color: var(--ebm-muted); font-size: 11px; }

.ebm-loader {
  width: 38px;
  height: 38px;
  border: 2px solid rgba(25, 200, 255, 0.16);
  border-top-color: var(--ebm-cyan);
  border-radius: 50%;
  animation: ebm-spin 0.8s linear infinite;
}

.ebm-trend-panel {
  position: relative;
  margin-top: 18px;
  padding: 24px;
  overflow: hidden;
  scroll-margin-top: 22px;
  border: 1px solid rgba(25, 200, 255, 0.18);
  border-radius: var(--ebm-radius-lg);
  background:
    radial-gradient(circle at 85% 0%, rgba(139, 92, 246, 0.12), transparent 36%),
    linear-gradient(145deg, rgba(8, 21, 38, 0.97), rgba(4, 10, 20, 0.98));
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.24), inset 0 1px rgba(255, 255, 255, 0.025);
}

.ebm-trend-panel::after {
  content: "";
  position: absolute;
  right: 8%;
  bottom: -90px;
  width: 260px;
  height: 150px;
  border-radius: 50%;
  background: rgba(25, 200, 255, 0.12);
  filter: blur(70px);
  pointer-events: none;
}

.ebm-panel-kicker {
  display: block;
  margin-bottom: 5px;
  color: var(--ebm-cyan);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.ebm-trend-live {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid rgba(55, 211, 154, 0.22);
  border-radius: 999px;
  color: #8ceac4;
  background: rgba(55, 211, 154, 0.07);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.ebm-trend-live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ebm-mint);
  box-shadow: 0 0 10px rgba(55, 211, 154, 0.75);
}

.ebm-trend-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.ebm-trend-metrics > div {
  min-height: 80px;
  padding: 15px 16px;
  border: 1px solid rgba(132, 168, 219, 0.11);
  border-radius: 13px;
  background: rgba(2, 8, 17, 0.4);
}

.ebm-trend-metrics span {
  display: block;
  color: var(--ebm-muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ebm-trend-metrics strong {
  display: block;
  margin-top: 6px;
  color: var(--ebm-text);
  font-size: 21px;
  letter-spacing: -0.035em;
}

.ebm-trend-chart-wrap {
  position: relative;
  min-height: 270px;
  margin-top: 14px;
  padding: 8px 4px 0 48px;
  border: 1px solid rgba(132, 168, 219, 0.1);
  border-radius: 15px;
  background: rgba(1, 6, 14, 0.38);
}

.ebm-app .ebm-trend-chart {
  display: block;
  width: 100%;
  height: 240px;
  overflow: visible;
}

.ebm-trend-grid path {
  fill: none;
  stroke: rgba(132, 168, 219, 0.12);
  stroke-width: 1;
  stroke-dasharray: 4 7;
}

.ebm-trend-area {
  fill: url(#ebm-trend-area-gradient);
  stroke: none;
}

.ebm-trend-line {
  fill: none;
  stroke: var(--ebm-cyan-soft);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: url(#ebm-trend-glow);
}

#ebm-trend-points circle {
  fill: #07101f;
  stroke: var(--ebm-cyan-soft);
  stroke-width: 3;
  filter: drop-shadow(0 0 5px rgba(25, 200, 255, 0.72));
}

.ebm-trend-scale {
  position: absolute;
  top: 30px;
  bottom: 36px;
  left: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #60718a;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 8px;
}

.ebm-trend-axis {
  position: absolute;
  right: 4px;
  bottom: 9px;
  left: 48px;
  height: 18px;
  color: #60718a;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 8px;
}

.ebm-trend-axis span {
  position: absolute;
  transform: translateX(-50%);
}

.ebm-trend-empty {
  position: absolute;
  inset: 52px 36px 38px 76px;
  display: grid;
  place-items: center;
  align-content: center;
  padding: 20px;
  color: #cdd9e8;
  background: rgba(3, 8, 18, 0.58);
  text-align: center;
  backdrop-filter: blur(2px);
}

.ebm-trend-empty strong { font-size: 14px; }
.ebm-trend-empty span { max-width: 420px; margin-top: 5px; color: var(--ebm-muted); font-size: 10px; }

.ebm-expenses-panel {
  margin-top: 18px;
  padding: 24px;
  border: 1px solid var(--ebm-line);
  border-radius: var(--ebm-radius-lg);
  background: linear-gradient(145deg, rgba(9, 19, 35, 0.96), rgba(4, 10, 20, 0.96));
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.22);
}

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

.ebm-panel-head h2 {
  font-size: 20px;
  font-weight: 720;
  letter-spacing: -0.025em;
}

.ebm-export-actions {
  display: flex;
  gap: 8px;
}

.ebm-primary-button,
.ebm-ghost-button,
.ebm-outline-button,
.ebm-danger-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 720;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.ebm-primary-button {
  border: 1px solid #4ed9ff;
  color: #00111b;
  background: linear-gradient(135deg, #44dcff, #19b8f3);
  box-shadow: 0 8px 24px rgba(25, 200, 255, 0.22);
}

.ebm-primary-button:hover,
.ebm-primary-button:focus-visible {
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(25, 200, 255, 0.32);
}

.ebm-app button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
  transform: none !important;
}

.ebm-ghost-button,
.ebm-outline-button,
.ebm-danger-button {
  border: 1px solid var(--ebm-line);
  color: #c8d3e3;
  background: rgba(255, 255, 255, 0.025);
}

.ebm-outline-button svg { width: 16px; height: 16px; }
.ebm-outline-button:hover,
.ebm-ghost-button:hover { border-color: var(--ebm-line-strong); color: var(--ebm-cyan-soft); transform: translateY(-1px); }
.ebm-danger-button { color: #ff93a5; border-color: rgba(255, 93, 119, 0.22); }
.ebm-danger-button:hover { color: #fff; border-color: rgba(255, 93, 119, 0.5); background: rgba(255, 93, 119, 0.12); }

.ebm-filters {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) 170px 190px auto;
  align-items: end;
  gap: 10px;
  margin-top: 23px;
  padding: 14px;
  border: 1px solid rgba(132, 168, 219, 0.1);
  border-radius: 15px;
  background: rgba(2, 8, 17, 0.45);
}

.ebm-filters label,
.ebm-form-grid label {
  display: grid;
  gap: 6px;
}

.ebm-filters label > span,
.ebm-form-grid label > span {
  color: var(--ebm-muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ebm-search-field {
  position: relative;
  display: flex !important;
  align-items: center;
}

.ebm-search-field svg {
  position: absolute;
  left: 13px;
  width: 17px;
  height: 17px;
  color: var(--ebm-muted);
}

.ebm-app input,
.ebm-app select,
.ebm-app textarea {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--ebm-line);
  border-radius: 10px;
  outline: none;
  color: #dce6f4;
  background: rgba(5, 13, 26, 0.92);
  font-size: 12px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.ebm-app textarea {
  min-height: 76px;
  padding-top: 10px;
  resize: vertical;
}

.ebm-app input:focus,
.ebm-app select:focus,
.ebm-app textarea:focus {
  border-color: var(--ebm-line-strong);
  box-shadow: 0 0 0 3px rgba(25, 200, 255, 0.08);
}

.ebm-app input[type="date"],
.ebm-app input[type="month"] { color-scheme: dark; }
.ebm-search-field input { padding-left: 39px; }

.ebm-review-toggle {
  display: flex !important;
  min-height: 42px;
  align-items: center;
  gap: 9px !important;
  padding: 0 13px;
  border: 1px solid var(--ebm-line);
  border-radius: 10px;
  background: rgba(5, 13, 26, 0.92);
}

.ebm-review-toggle input,
.ebm-checkbox-field input {
  width: 16px;
  min-height: 16px;
  accent-color: var(--ebm-cyan);
}

.ebm-review-toggle > span,
.ebm-checkbox-field > span {
  color: #c3cedd !important;
  font-size: 11px !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.ebm-table-wrap {
  margin-top: 17px;
  overflow-x: auto;
  border: 1px solid rgba(132, 168, 219, 0.11);
  border-radius: 14px;
}

.ebm-table {
  width: 100%;
  min-width: 850px;
  border-collapse: collapse;
  color: var(--ebm-text);
  font-size: 12px;
}

.ebm-table th {
  height: 44px;
  padding: 0 16px;
  border-bottom: 1px solid var(--ebm-line);
  color: #76869d;
  background: rgba(4, 11, 22, 0.78);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.ebm-table td {
  height: 55px;
  padding: 8px 16px;
  border-bottom: 1px solid rgba(132, 168, 219, 0.085);
  color: #c7d2e1;
  vertical-align: middle;
}

.ebm-table tr:last-child td { border-bottom: 0; }
.ebm-table tbody tr { transition: background 160ms ease; }
.ebm-table tbody tr:hover { background: rgba(25, 200, 255, 0.025); }
.ebm-table td:nth-child(2) strong { display: block; color: #edf5ff; font-size: 12px; font-weight: 630; }
.ebm-table td:nth-child(2) small { display: block; max-width: 320px; margin-top: 2px; overflow: hidden; color: #718198; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.ebm-table td:nth-child(5) { color: #f4f8ff; font-weight: 720; white-space: nowrap; }

.ebm-category {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.ebm-category::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ebm-cyan);
  box-shadow: 0 0 8px rgba(25, 200, 255, 0.45);
}

.ebm-status {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid rgba(55, 211, 154, 0.23);
  border-radius: 999px;
  color: #8ceac4;
  background: rgba(55, 211, 154, 0.09);
  font-size: 9px;
  font-weight: 750;
  white-space: nowrap;
}

.ebm-status.is-review { color: #ffd17b; border-color: rgba(245, 165, 36, 0.3); background: rgba(245, 165, 36, 0.11); }
.ebm-status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

.ebm-row-actions {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--ebm-muted);
  background: transparent;
}

.ebm-row-actions:hover { color: var(--ebm-cyan-soft); border-color: var(--ebm-line); background: rgba(255,255,255,.025); }
.ebm-row-actions svg { width: 16px; height: 16px; }

.ebm-empty {
  display: grid;
  min-height: 250px;
  place-items: center;
  align-content: center;
  padding: 30px;
  text-align: center;
}

.ebm-empty-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid var(--ebm-line);
  border-radius: 18px;
  color: var(--ebm-cyan-soft);
  background: rgba(25, 200, 255, 0.06);
}

.ebm-empty strong { margin-top: 16px; font-size: 14px; }
.ebm-empty p { margin: 5px 0 0; color: var(--ebm-muted); font-size: 11px; }

.ebm-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 15px;
  color: var(--ebm-muted);
  font-size: 10px;
}

.ebm-pagination > div { display: flex; align-items: center; gap: 8px; }
.ebm-pagination button { width: 31px; height: 31px; font-size: 18px; }
.ebm-pagination button:disabled { opacity: 0.32; cursor: not-allowed; }
#ebm-page-current { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid rgba(25,200,255,.34); border-radius: 9px; color: var(--ebm-cyan-soft); background: rgba(25,200,255,.08); }

.ebm-mobile-nav { display: none; }

.ebm-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
}

.ebm-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 3, 9, 0.78);
  backdrop-filter: blur(14px);
}

.ebm-modal-card {
  position: relative;
  z-index: 1;
  width: min(680px, 100%);
  max-height: calc(100dvh - 38px);
  padding: 24px;
  overflow-y: auto;
  border: 1px solid rgba(25, 200, 255, 0.22);
  border-radius: var(--ebm-radius-lg);
  background: linear-gradient(145deg, #0b1729, #050b16);
  box-shadow: 0 35px 120px rgba(0, 0, 0, 0.62), 0 0 80px rgba(25, 200, 255, 0.08);
}

.ebm-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.ebm-modal-head span { color: var(--ebm-cyan); font-size: 9px; font-weight: 800; letter-spacing: .16em; }
.ebm-modal-head h2 { margin-top: 5px; font-size: 25px; letter-spacing: -.035em; }
.ebm-modal-head > button { width: 34px; height: 34px; border: 1px solid var(--ebm-line); border-radius: 9px; color: var(--ebm-muted); background: rgba(255,255,255,.025); font-size: 22px; line-height: 1; }

.ebm-modal-intro {
  max-width: 540px;
  margin: 9px 0 0;
  color: var(--ebm-muted);
  font-size: 11px;
}

.ebm-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 23px;
}

.ebm-form-wide { grid-column: 1 / -1; }
.ebm-checkbox-field { display: flex !important; align-items: center; grid-template-columns: auto 1fr; }
.ebm-modal-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--ebm-line); }
.ebm-modal-actions > div { display: flex; gap: 8px; }

.ebm-manual-safe {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ebm-muted);
  font-size: 9px;
}

.ebm-manual-safe i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ebm-mint);
  box-shadow: 0 0 9px rgba(55, 211, 154, 0.62);
}

.ebm-toast-region {
  position: fixed;
  z-index: 150;
  right: 22px;
  bottom: 22px;
  display: grid;
  width: min(360px, calc(100vw - 32px));
  gap: 10px;
}

.ebm-toast {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 14px 15px;
  border: 1px solid rgba(55, 211, 154, 0.26);
  border-radius: 13px;
  color: #d9f8eb;
  background: rgba(7, 24, 26, 0.96);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
  animation: ebm-toast-in 220ms ease-out both;
}

.ebm-toast.is-error { color: #ffe0e6; border-color: rgba(255, 93, 119, 0.3); background: rgba(31, 10, 19, 0.97); }
.ebm-toast strong { display: block; font-size: 12px; }
.ebm-toast span { display: block; margin-top: 2px; color: rgba(255,255,255,.62); font-size: 10px; }

.ebm-access-message {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: 24px;
  color: white;
  background: #030712;
  text-align: center;
}

@keyframes ebm-spin { to { transform: rotate(360deg); } }
@keyframes ebm-breathe { 50% { transform: scale(1.045); } }
@keyframes ebm-toast-in { from { opacity: 0; transform: translateY(10px); } }

@media (max-width: 1180px) {
  .ebm-sidebar { width: 82px; padding-inline: 13px; }
  .ebm-brand { justify-content: center; padding: 0; }
  .ebm-brand > span:last-child,
  .ebm-nav-item span { display: none; }
  .ebm-nav-item { justify-content: center; padding: 0; }
  .ebm-nav-item.is-active::before { left: -14px; }
  .ebm-main { width: calc(100% - 82px); margin-left: 82px; }
  .ebm-recorder { grid-template-columns: 190px 1fr; }
  .ebm-waveform { position: absolute; right: 3%; bottom: 17px; width: 40%; height: 62px; opacity: .32; }
  .ebm-filters { grid-template-columns: minmax(220px, 1fr) 160px 180px; }
  .ebm-review-toggle { grid-column: 1 / -1; width: max-content; }
}

@media (max-width: 850px) {
  .ebm-summary-grid { grid-template-columns: 1fr 1fr; }
  .ebm-stat-total { grid-column: 1 / -1; }
  .ebm-recorder { grid-template-columns: 160px 1fr; }
  .ebm-mic-button { width: 118px; height: 118px; }
  .ebm-filters { grid-template-columns: 1fr 1fr; }
  .ebm-search-field { grid-column: 1 / -1; }
  .ebm-review-toggle { grid-column: auto; width: auto; }
}

@media (max-width: 680px) {
  body.ebm-expenses-page { padding: 0 !important; }
  .ebm-sidebar { display: none; }
  .ebm-main { width: 100%; margin: 0; padding: 19px 14px 100px; }
  .ebm-topbar { min-height: 60px; align-items: center; }
  .ebm-topbar h1 { font-size: 27px; }
  .ebm-topbar p { display: none; }
  .ebm-connection { width: 36px; min-height: 36px; justify-content: center; padding: 0; }
  .ebm-connection span { display: none; }
  .ebm-summary-grid { gap: 10px; margin-top: 15px; }
  .ebm-stat-card { min-height: 104px; grid-template-columns: 34px 1fr; gap: 10px; padding: 15px; border-radius: 15px; }
  .ebm-stat-card strong { font-size: 22px; }
  .ebm-stat-card small { display: none; }
  .ebm-stat-icon { width: 34px; height: 34px; border-radius: 10px; }
  .ebm-stat-icon svg { width: 17px; height: 17px; }
  .ebm-mini-chart,
  .ebm-stat-orbit,
  .ebm-pulse-dot { display: none !important; }
  .ebm-recorder { min-height: 470px; grid-template-columns: 1fr; gap: 12px; margin-top: 11px; padding: 28px 20px 24px; text-align: center; }
  .ebm-recorder-visual { align-self: end; }
  .ebm-mic-button { width: 142px; height: 142px; }
  .ebm-recorder-copy { align-self: start; }
  .ebm-recorder-copy h2 { font-size: 29px; }
  .ebm-recorder-copy > p { margin-inline: auto; }
  .ebm-recorder-actions { justify-content: center; flex-wrap: wrap; }
  .ebm-recording-controls { justify-content: center; }
  .ebm-timer { width: 100%; font-size: 25px; }
  .ebm-waveform { right: 10%; bottom: 12px; width: 80%; height: 55px; }
  .ebm-expenses-panel { margin-top: 11px; padding: 17px 14px; border-radius: 18px; }
  .ebm-panel-head { align-items: center; }
  .ebm-panel-head p { display: none; }
  .ebm-export-actions .ebm-outline-button { width: 39px; padding: 0; font-size: 0; }
  .ebm-export-actions .ebm-outline-button svg { width: 17px; height: 17px; }
  .ebm-filters { grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px; }
  .ebm-filters label > span { font-size: 8px; }
  .ebm-review-toggle { grid-column: 1 / -1; }
  .ebm-table-wrap { overflow: visible; border: 0; }
  .ebm-table { min-width: 0; border-collapse: separate; border-spacing: 0 9px; }
  .ebm-table thead { display: none; }
  .ebm-table tbody,
  .ebm-table tr,
  .ebm-table td { display: block; width: 100%; height: auto; }
  .ebm-table tr { position: relative; padding: 14px; border: 1px solid var(--ebm-line); border-radius: 13px; background: rgba(5, 13, 26, 0.72); }
  .ebm-table td { display: grid; grid-template-columns: 92px 1fr; padding: 5px 38px 5px 0; border: 0; text-align: left; }
  .ebm-table td::before { content: attr(data-label); color: #687992; font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
  .ebm-table td:nth-child(2) { padding-top: 0; }
  .ebm-table td:nth-child(2) small { max-width: 185px; }
  .ebm-table td:last-child { position: absolute; top: 9px; right: 8px; display: block; width: 32px; padding: 0; }
  .ebm-pagination { margin-bottom: 5px; }
  .ebm-mobile-nav {
    position: fixed;
    z-index: 60;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 10px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    min-height: 66px;
    padding: 7px;
    border: 1px solid rgba(132, 168, 219, 0.22);
    border-radius: 19px;
    background: rgba(5, 12, 24, 0.92);
    box-shadow: 0 18px 55px rgba(0,0,0,.48);
    backdrop-filter: blur(22px);
  }
  .ebm-mobile-nav button { display: grid; place-items: center; gap: 2px; border: 0; border-radius: 13px; color: #718198; background: transparent; font-size: 8px; font-weight: 700; }
  .ebm-mobile-nav button svg { width: 20px; height: 20px; }
  .ebm-mobile-nav button.is-active { color: var(--ebm-cyan-soft); background: rgba(25, 200, 255, 0.08); }
  .ebm-trend-panel { margin-top: 11px; padding: 17px 14px; border-radius: 18px; }
  .ebm-trend-head { align-items: flex-start; }
  .ebm-trend-head p { display: block; max-width: 230px; }
  .ebm-trend-live { min-height: 26px; padding-inline: 8px; font-size: 7px; }
  .ebm-trend-metrics { grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 15px; }
  .ebm-trend-metrics > div { min-height: 70px; padding: 12px; }
  .ebm-trend-metrics > div:first-child { grid-column: 1 / -1; }
  .ebm-trend-metrics strong { font-size: 19px; }
  .ebm-trend-chart-wrap { min-height: 230px; padding-left: 38px; }
  .ebm-app .ebm-trend-chart { height: 205px; }
  .ebm-trend-axis { left: 38px; }
  .ebm-trend-empty { inset: 42px 18px 34px 56px; }
  .ebm-modal { padding: 10px; align-items: end; }
  .ebm-modal-card { width: 100%; max-height: 92dvh; padding: 20px 15px; border-radius: 22px 22px 12px 12px; }
  .ebm-form-grid { grid-template-columns: 1fr; }
  .ebm-form-wide { grid-column: auto; }
  .ebm-modal-actions { align-items: stretch; flex-direction: column-reverse; }
  .ebm-modal-actions > div { display: grid; grid-template-columns: 1fr 1.3fr; }
  .ebm-manual-safe { justify-content: center; }
  .ebm-toast-region { right: 16px; bottom: 88px; left: 16px; width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .ebm-app *,
  .ebm-app *::before,
  .ebm-app *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
