:root {
  --bg: #11161d;
  --bar: #121820;
  --panel: #171d24;
  --panel-2: #1a2129;
  --field: #141a21;
  --line: #39434e;
  --line-soft: #303943;
  --text: #e2e7ec;
  --muted: #98a3af;
  --faint: #6f7b87;
  --cyan: #20c7df;
  --cyan-soft: #10333d;
  --green: #24d59d;
  --green-soft: #0f342b;
  --red: #ff6678;
  --red-soft: #351c23;
  --orange: #f4a44b;
  --violet: #a777ef;
  --blue: #49a7ff;
  --radius: 6px;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font: 500 13px/1.4 Montserrat, Inter, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; font-weight: 550; }
strong, b, h1, h2, h3 { font-weight: 700; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid rgba(32, 199, 223, .55);
  outline-offset: 2px;
}
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.appbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  width: 100%;
  height: 54px;
  padding: 0 max(18px, calc((100vw - 1760px) / 2));
  border-bottom: 1px solid #252e37;
  background: rgba(17, 22, 29, .96);
  backdrop-filter: blur(10px);
}
.appbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.version-badge {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--muted);
  background: #171d24;
  font-size: 11px;
}
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  color: #aeb8c2;
  background: transparent;
  cursor: pointer;
  transition: color .12s ease, border-color .12s ease, background .12s ease;
}
.icon-button svg { width: 18px; height: 18px; }
.icon-button:hover { color: #f5f7f9; border-color: #53606d; background: #1a222b; }
.icon-button.quiet { border-color: transparent; background: transparent; }
.icon-button.telegram { color: var(--cyan); border-color: #087d99; background: #0c2730; border-radius: 999px; }
.icon-button.accent { color: var(--cyan); border-color: #0b7d97; background: #0c2b35; border-radius: 999px; }
.icon-button.positive { color: var(--green); border-color: #176b57; background: #0f3028; }
.icon-button.small { width: 34px; height: 34px; border-radius: 7px; }
.icon-button.small svg { width: 17px; height: 17px; }
.icon-button.disabled { opacity: .45; }

.workspace {
  width: min(1760px, calc(100% - 36px));
  margin: 0 auto;
  padding: 14px 0 34px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.stat-card {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 84px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.stat-icon {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  margin-right: 13px;
  border: 1px solid currentColor;
  border-radius: 12px;
  background: color-mix(in srgb, currentColor 12%, transparent);
}
.stat-icon svg { width: 22px; height: 22px; }
.stat-icon.blue { color: var(--blue); }
.stat-icon.orange { color: var(--orange); }
.stat-icon.green { color: #56d576; }
.stat-icon.violet { color: var(--violet); }
.stat-card > div { min-width: 0; display: grid; }
.stat-card small { color: var(--muted); font-size: 11px; font-weight: 500; }
.stat-card strong { margin-top: 1px; color: #eef2f6; font-size: 20px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.stat-card span:not(.stat-icon) { margin-top: 2px; color: var(--faint); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(390px, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}
.panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.panel-header {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 13px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}
.panel-title { display: flex; align-items: center; gap: 11px; min-width: 0; }
.panel-title h2 { margin: 0; font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.panel-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #64d8e5;
  border-radius: 8px;
  background: #10343e;
}
.panel-icon svg { width: 19px; height: 19px; }
.panel-actions { display: flex; align-items: center; gap: 8px; }

/* Search remains available in markup for compatibility, but the default view mirrors Remnawave. */
.table-toolbar { display: none; }
.compact-input, .compact-select { height: 32px; border: 1px solid var(--line-soft); border-radius: 5px; outline: none; color: var(--text); background: var(--field); padding: 0 10px; }

.table-scroll { position: relative; overflow: auto; scrollbar-color: #44505d transparent; scrollbar-width: thin; }
.service-table-scroll, .payment-table-scroll { min-height: 486px; max-height: 600px; }
.provider-table-scroll { min-height: 300px; max-height: 560px; }
.data-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.data-table th, .data-table td {
  height: 38px;
  padding: 7px 11px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
}
.data-table th:last-child, .data-table td:last-child { border-right: 0; }
.data-table thead { position: sticky; top: 0; z-index: 3; background: #181f27; }
.data-table th { height: 35px; color: #c0c8d0; font-size: 11px; font-weight: 650; white-space: nowrap; }
.data-table tbody tr { background: var(--panel); transition: background .1s ease; }
.data-table tbody tr:hover { background: #1d252e; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.clickable-row { cursor: pointer; }
.clickable-row:focus-within { background: #1d252e; }
.clickable-row.overdue td:nth-child(3) { color: var(--red); }
.clickable-row.soon td:nth-child(3) { color: #3bcce2; }
.clickable-row.paused { opacity: .62; }

.services-panel .data-table th:nth-child(1) { width: 31%; }
.services-panel .data-table th:nth-child(2) { width: 28%; }
.services-panel .data-table th:nth-child(3) { width: 31%; text-align: right; }
.services-panel .data-table td:nth-child(3) { text-align: right; }
.payments-panel .data-table th:nth-child(1) { width: 42%; }
.payments-panel .data-table th:nth-child(2) { width: 27%; text-align: right; }
.payments-panel .data-table th:nth-child(3) { width: 23%; text-align: right; }
.providers-table th:nth-child(1) { width: 190px; }
.providers-table th:nth-child(2) { width: 300px; }
.providers-table th:nth-child(3) { width: 150px; text-align: right; }
.providers-table td:nth-child(3) { text-align: right; }
.actions-column { width: 52px !important; text-align: center !important; }
.date-column { text-align: right !important; }
.money-column { text-align: right !important; }
.numeric-cell { text-align: right !important; white-space: nowrap; font-variant-numeric: tabular-nums; }

.provider-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.provider-logo {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  overflow: hidden;
  border-radius: 5px;
  color: hsl(var(--hue) 82% 68%);
  background: hsl(var(--hue) 48% 18%);
  border: 1px solid hsl(var(--hue) 48% 34%);
  font-size: 9px;
  font-weight: 750;
}
.provider-favicon { position: absolute; inset: 0; width: 100%; height: 100%; padding: 2px; object-fit: contain; background: #171d24; }
.provider-name, .service-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.provider-name { color: #d8dfe5; }
.service-name { color: #e3e9ee; font-weight: 650; }
.resource-title { display: inline-flex; align-items: center; gap: 7px; min-width: 0; max-width: calc(100% - 22px); }
.resource-edit-target { display: flex; align-items: center; gap: 5px; min-width: 0; }
.resource-flag { flex: 0 0 auto; font-size: 15px; line-height: 1; }
.resource-external, .external-link { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; color: #c7d0d8; text-decoration: none; }
.resource-external { flex: 0 0 auto; color: #8f9aa5; }
.external-link:hover, .resource-external:hover { color: var(--cyan); }
.external-link svg, .resource-external svg { flex: 0 0 auto; width: 12px; height: 12px; }
.secondary-text { margin-top: 1px; color: var(--faint); font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.due-cell { display: inline-flex; align-items: center; justify-content: flex-end; gap: 7px; width: 100%; white-space: nowrap; font-variant-numeric: tabular-nums; }
.due-cell svg { width: 13px; height: 13px; color: #a6b0ba; }
.due-cell.soon { color: #48d2e6; }
.due-cell.overdue { color: var(--red); }
.due-cell.paused { color: var(--muted); }
.amount { white-space: nowrap; font-variant-numeric: tabular-nums; }

.cell-actions { display: flex; justify-content: center; gap: 5px; }
.cell-actions.single-action { justify-content: center; }
.row-action {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid #3a4752;
  border-radius: 6px;
  color: #9eabb6;
  background: transparent;
  cursor: pointer;
}
.row-action:hover { color: #eef3f6; border-color: #64717c; background: #222b34; }
.row-action.green { color: var(--green); border-color: #188369; background: #0d3027; }
.row-action.green:hover { border-color: var(--green); background: #104032; }
.row-action.red { color: var(--red); border-color: #82404b; background: transparent; }
.row-action.neutral { color: #aeb8c2; border-color: #59646f; background: transparent; }
.row-action svg { width: 14px; height: 14px; }
.row-action[aria-busy="true"] { cursor: wait; opacity: .55; pointer-events: none; }

.period-pill, .service-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 2px 7px;
  border: 1px solid #46515c;
  border-radius: 999px;
  color: #bec7cf;
  background: transparent;
  font-size: 9px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.service-chips { display: flex; flex-wrap: wrap; gap: 5px; max-height: 48px; overflow: hidden; }
.empty-state { position: absolute; inset: 35px 0 0; display: grid; place-content: center; justify-items: center; color: var(--muted); text-align: center; background: var(--panel); }
.empty-state[hidden] { display: none; }
.empty-state > span { color: #687480; font-size: 34px; }
.empty-state p { margin: 5px 0 9px; }
.text-button { border: 0; border-radius: 6px; padding: 7px 12px; color: #5bd5e8; background: #11323c; cursor: pointer; }
.panel-footer {
  min-height: 45px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 13px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  background: var(--panel);
}
.pager { display: flex; align-items: center; gap: 6px; }
.pager button { display: grid; place-items: center; width: 25px; height: 25px; padding: 0; border: 1px solid var(--line-soft); border-radius: 6px; color: var(--muted); background: transparent; cursor: pointer; }
.pager button:disabled { opacity: .3; cursor: default; }
.pager button svg { width: 13px; height: 13px; }
.pager span { display: grid; place-items: center; min-width: 25px; height: 25px; border-radius: 6px; color: #07191d; background: #22b6ce; font-weight: 700; }
.providers-panel { margin-bottom: 0; }

.toast {
  position: fixed;
  z-index: 80;
  top: 64px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(620px, calc(100% - 32px));
  padding: 10px 14px;
  border: 1px solid #2a7562;
  border-radius: 7px;
  color: #e2fff5;
  background: #15392f;
  box-shadow: 0 12px 34px rgba(0,0,0,.28);
}
.toast.error { color: #ffe2e6; border-color: #93414e; background: #3a1d24; }

body.dialog-open { overflow: hidden; }
dialog { width: min(620px, calc(100% - 28px)); max-height: calc(100vh - 40px); padding: 0; border: 0; color: var(--text); background: transparent; overflow: visible; }
dialog::backdrop { background: rgba(4, 7, 10, .78); backdrop-filter: blur(3px); }
.dialog-card { overflow: auto; max-height: calc(100vh - 40px); border: 1px solid #46515c; border-radius: 7px; background: #171d24; box-shadow: 0 24px 80px rgba(0,0,0,.48); }
.wide-dialog { width: min(760px, calc(100vw - 28px)); }
#service-dialog { width: min(760px, calc(100% - 28px)); }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 58px; padding: 11px 15px; border-bottom: 1px solid var(--line); background: #1a2129; }
.dialog-header small { color: var(--cyan); font-size: 9px; text-transform: uppercase; letter-spacing: .13em; }
.dialog-header h3 { margin: 2px 0 0; font-size: 17px; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 15px; }
.form-grid.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field > span, .toggle-field > span { color: #c5cdd5; font-size: 11px; font-weight: 600; }
.field > small { color: var(--faint); font-size: 9px; }
input, select, textarea { width: 100%; border: 1px solid #3b4651; border-radius: 6px; outline: none; color: #edf1f4; background: #11171d; padding: 9px 10px; }
input, select { height: 38px; }
textarea { min-height: 70px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #168ca6; box-shadow: 0 0 0 2px rgba(32,199,223,.08); }
.inline-fields { display: grid; grid-template-columns: 92px 1fr; gap: 7px; }
.toggle-field { display: flex; align-items: center; gap: 9px; min-height: 38px; padding: 0 10px; border: 1px solid #3b4651; border-radius: 6px; background: #11171d; }
.toggle-field input { width: 15px; height: 15px; accent-color: var(--green); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 15px 15px; border-top: 1px solid #29323b; }
.service-dialog-actions { justify-content: space-between; align-items: center; }
.dialog-record-actions, .dialog-submit-actions { display: flex; align-items: center; gap: 8px; }
.button { min-height: 36px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 6px; font-weight: 650; cursor: pointer; }
.button.secondary { color: #c1cad2; background: #202832; }
.button.primary { color: #061813; border-color: #35d8ac; background: #42d6ad; }
.button.subtle { color: #c3ccd4; background: transparent; }
.button.danger { color: #ff9aa7; border-color: #7f3945; background: transparent; }
.button[hidden] { display: none; }
.calendar-note { display: flex; gap: 9px; margin: 0 15px; padding: 9px 10px; border: 1px solid #315660; border-radius: 6px; color: #9ebbc2; background: #12272e; font-size: 10px; }
.calendar-note svg { flex: 0 0 auto; width: 15px; height: 15px; color: var(--cyan); }
.payment-preview { display: grid; align-content: center; min-height: 38px; padding: 6px 10px; border: 1px solid #31505a; border-radius: 6px; background: #11252c; }
.payment-preview small { color: #7f99a1; font-size: 9px; }
.payment-preview strong { color: #67dcec; font-size: 12px; }
.about-list { display: grid; gap: 1px; padding: 15px; }
.about-list > div { display: grid; grid-template-columns: 130px 1fr; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.about-list > div:last-child { border-bottom: 0; }
.about-list strong { color: #d9e1e8; font-size: 11px; }
.about-list span { color: var(--muted); font-size: 11px; }

@media (max-width: 1180px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .service-table-scroll, .payment-table-scroll { min-height: 360px; }
}
@media (max-width: 820px) {
  .workspace { width: min(100% - 20px, 1760px); }
  .appbar { padding: 0 10px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .data-table { min-width: 720px; }
  .providers-table { min-width: 900px; }
}
@media (max-width: 560px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: 72px; }
  .version-badge { display: none; }
  .form-grid.two-columns { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .service-dialog-actions { align-items: stretch; flex-direction: column-reverse; }
  .dialog-record-actions, .dialog-submit-actions { width: 100%; }
  .dialog-submit-actions { justify-content: flex-end; }
  .about-list > div { grid-template-columns: 1fr; gap: 3px; }
}

/* Billing display currency and exchange-rate status. */
.currency-switcher {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 8px 0 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  color: var(--muted);
  background: #171d24;
}
.currency-switcher-label { font-size: 10px; white-space: nowrap; }
.currency-switcher select {
  width: 68px;
  height: 26px;
  padding: 0 24px 0 8px;
  border: 0;
  border-radius: 5px;
  color: #e8edf1;
  background-color: #11171d;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: none;
}
.currency-switcher select:focus { border: 0; box-shadow: 0 0 0 2px rgba(32,199,223,.14); }
.rate-status {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(36,213,157,.10);
}
.currency-switcher.stale .rate-status { background: var(--orange); box-shadow: 0 0 0 3px rgba(244,164,75,.12); }
.currency-switcher.unavailable .rate-status { background: var(--red); box-shadow: 0 0 0 3px rgba(255,102,120,.12); }
.field-inline-note { margin-left: 4px; color: var(--cyan); font-size: 10px; font-weight: 700; }
.amount.unconverted { color: var(--orange); }

@media (max-width: 620px) {
  .currency-switcher-label { display: none; }
  .currency-switcher { padding-left: 7px; }
}


/* v1.6.0 interface refinement: same palette, cleaner alignment and restrained motion. */
.info-button {
  color: #9eabb6;
  border-color: #34404b !important;
  background: rgba(23, 29, 36, .78) !important;
  border-radius: 999px;
}
.info-button:hover { color: var(--cyan); border-color: #147d94 !important; background: #102a33 !important; }

.header-action-cluster {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #151b22;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.018);
}
.header-action-cluster .icon-button {
  width: 36px;
  height: 34px;
  border: 0;
  border-right: 1px solid var(--line-soft);
  border-radius: 0;
  background: transparent;
}
.header-action-cluster .icon-button:last-child { border-right: 0; }
.header-action-cluster .icon-button.telegram { color: var(--cyan); background: rgba(12,39,48,.58); }
.header-action-cluster .icon-button.reminders { color: #b7c1ca; }
.header-action-cluster .icon-button.accent { color: var(--cyan); background: rgba(12,43,53,.72); }
.header-action-cluster .icon-button:hover { background: #202a33; }

.icon-button,
.row-action,
.button,
.pager button,
.text-button,
.stat-card {
  transition: transform .16s ease, color .16s ease, border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}
.icon-button:not(:disabled):hover,
.row-action:not(:disabled):hover,
.pager button:not(:disabled):hover { transform: translateY(-1px); }
.button:not(:disabled):hover,
.text-button:hover { transform: translateY(-1px); box-shadow: 0 7px 18px rgba(0,0,0,.16); }
.stat-card:hover { transform: translateY(-1px); border-color: #485562; box-shadow: 0 8px 22px rgba(0,0,0,.12); }
.icon-button:active,
.row-action:active,
.button:active,
.pager button:active { transform: translateY(0) scale(.97); }

.providers-table .actions-column { width: 82px !important; }
.providers-table .cell-actions { gap: 7px; }
.providers-table .row-action {
  width: 31px;
  height: 31px;
  border-radius: 8px;
}
.providers-table .row-action svg { width: 16px; height: 16px; }

.form-grid.two-columns { align-items: start; column-gap: 14px; row-gap: 13px; }
.field { align-self: start; }
.field > span { min-height: 16px; display: inline-flex; align-items: center; }
.required-field > span::after {
  content: "*";
  margin-left: 4px;
  color: var(--red);
  font-weight: 700;
}
.field > input,
.field > select,
.field .inline-fields,
.notification-field .toggle-field { min-height: 40px; }
.field > small { min-height: 13px; line-height: 1.35; }
.field-feedback:empty { visibility: hidden; }
.field-feedback.error { color: #ff8997; visibility: visible; }
input:invalid:not(:placeholder-shown),
select:invalid:not(:focus) { border-color: #70404a; }
input[aria-invalid="true"] { border-color: var(--red); }

.notification-field { gap: 6px; }
.compact-toggle {
  width: 100%;
  height: 40px;
  min-height: 40px;
  align-self: start;
  padding: 0 12px;
}
.compact-toggle span { font-size: 11px; }
.compact-toggle input { flex: 0 0 16px; }

#service-dialog .dialog-card { border-radius: 10px; }
#service-dialog .form-grid { padding: 17px 18px 15px; }
#service-dialog .calendar-note { margin: 0 18px; }
#service-dialog .dialog-actions { padding-inline: 18px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

@media (max-width: 620px) {
  .appbar-actions { gap: 6px; }
  .header-action-cluster .icon-button { width: 34px; }
}

/* v1.7.0 operations, analytics and security UI */
.table-toolbar.service-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(135px, .8fr) minmax(135px, .8fr) 145px 155px 34px;
  gap: 8px;
  align-items: center;
  padding: 9px 11px;
  border-bottom: 1px solid var(--line);
  background: #151b22;
}
.toolbar-search { position: relative; min-width: 0; }
.toolbar-search svg { position: absolute; left: 9px; top: 9px; width: 15px; height: 15px; color: var(--faint); pointer-events: none; }
.toolbar-search input { height: 34px; padding-left: 31px; }
.toolbar-combo { min-width: 0; }
.bulk-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 45px;
  padding: 7px 11px;
  border-bottom: 1px solid #24585e;
  color: #b9dfe3;
  background: #11282e;
}
.bulk-toolbar[hidden] { display: none; }
.bulk-toolbar strong { margin-right: 4px; font-size: 11px; }
.bulk-toolbar button, .management-list button {
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid #3c4b55;
  border-radius: 6px;
  color: #cbd5dc;
  background: #1c252d;
  cursor: pointer;
}
.bulk-toolbar button:hover, .management-list button:hover { border-color: #5b6d79; background: #222e37; }
.danger-text { color: #ff8997 !important; border-color: #713944 !important; }
.quiet-text { margin-left: auto; color: var(--muted) !important; background: transparent !important; border-color: transparent !important; }

.services-panel .data-table th:nth-child(1) { width: 38px; }
.services-panel .data-table th:nth-child(2) { width: 25%; }
.services-panel .data-table th:nth-child(3) { width: 24%; }
.services-panel .data-table th:nth-child(4) { width: 18%; text-align: right; }
.services-panel .data-table th:nth-child(5) { width: 22%; text-align: right; }
.services-panel .data-table td:nth-child(4),
.services-panel .data-table td:nth-child(5) { text-align: right; }
.select-column { width: 38px !important; text-align: center !important; padding-inline: 7px !important; }
.select-column input { width: 15px; height: 15px; padding: 0; accent-color: var(--cyan); cursor: pointer; }
.money-cell { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.money-cell strong { display: block; font-size: 12px; color: #e6edf2; }
.money-cell small { display: block; margin-top: 1px; color: var(--faint); font-size: 9px; }
.rate-lock.locked { color: #57c9a7; }
.row-meta { display: block; margin-top: 2px; color: var(--faint); font-size: 9px; text-transform: lowercase; }

.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #181f27;
  box-shadow: 0 1px 0 var(--line);
}

.search-combo { position: relative; min-width: 0; }
.combo-control { position: relative; }
.combo-input { height: 38px; padding-right: 34px; }
.toolbar-combo .combo-input { height: 34px; padding-block: 6px; font-size: 11px; }
.combo-toggle {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 34px;
  height: calc(100% - 2px);
  display: grid;
  place-items: center;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}
.combo-toggle svg { width: 14px; height: 14px; }
.combo-menu {
  position: absolute;
  z-index: 100;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  min-width: 250px;
  max-height: 310px;
  overflow: auto;
  border: 1px solid #46525e;
  border-radius: 8px;
  background: #20272f;
  box-shadow: 0 18px 50px rgba(0,0,0,.45);
  scrollbar-width: thin;
}
.combo-menu[hidden] { display: none; }
.combo-options { padding: 5px; }
.combo-option {
  display: grid;
  grid-template-columns: 25px 38px minmax(0, 1fr) 18px;
  align-items: center;
  width: 100%;
  min-height: 34px;
  padding: 5px 7px;
  border: 0;
  border-radius: 5px;
  color: #d2d9df;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.combo-option:hover, .combo-option.highlighted { background: #2a343e; }
.combo-option.selected { color: #e9f8f7; background: #18353a; }
.combo-option svg { width: 14px; height: 14px; color: var(--green); }
.combo-option strong { font-size: 11px; }
.combo-option span:last-of-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #aeb8c2; font-size: 11px; }
.combo-flag { font-size: 16px; }
.combo-empty { padding: 16px; color: var(--muted); text-align: center; font-size: 11px; }

.money-input { position: relative; }
.money-input input { padding-right: 60px; }
.money-input > span {
  position: absolute;
  top: 1px;
  right: 1px;
  bottom: 1px;
  min-width: 52px;
  display: grid;
  place-items: center;
  padding: 0 8px;
  border-left: 1px solid #34404a;
  color: var(--cyan);
  background: #171f26;
  border-radius: 0 5px 5px 0;
  font-size: 10px;
  font-weight: 700;
}
.quick-date-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.quick-date-actions button {
  min-height: 25px;
  padding: 3px 7px;
  border: 1px solid #34424c;
  border-radius: 5px;
  color: #9fadb8;
  background: #182128;
  font-size: 9px;
  cursor: pointer;
}
.quick-date-actions button:hover { color: #d8f5f7; border-color: #276979; background: #173039; }
.balanced-grid > .field, .balanced-grid > div.field { min-height: 92px; }
.compact-notification { max-width: 100%; }
.compact-notification .compact-toggle { width: 100%; }

.provider-row .expand-chevron { margin-left: auto; color: var(--faint); transition: transform .16s ease; }
.provider-row .expand-chevron svg { width: 14px; height: 14px; }
.provider-row .expand-chevron.expanded { transform: rotate(180deg); color: var(--cyan); }
.provider-detail-row td { padding: 0 !important; background: #131a20; }
.provider-resource-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 6px; padding: 9px 12px 12px 38px; }
.provider-resource-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 37px;
  padding: 7px 9px;
  border: 1px solid #303c46;
  border-radius: 6px;
  color: #d6dee4;
  background: #182129;
  text-align: left;
  cursor: pointer;
}
.provider-resource-list button:hover { border-color: #396d79; background: #1a2b32; }
.provider-resource-list small { color: var(--muted); white-space: nowrap; }

.toast { display: flex; align-items: center; gap: 12px; }
.toast[hidden] { display: none; }
.toast button { margin-left: auto; border: 0; color: #62e0bc; background: transparent; font-weight: 750; cursor: pointer; }
.toast.error button { color: #ffb1bb; }

.compact-dialog { width: min(470px, calc(100vw - 28px)); }
.confirm-card p { margin: 0; padding: 18px 16px; color: #bdc7cf; line-height: 1.6; }
.system-card { width: min(760px, calc(100vw - 28px)); }
.system-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; padding: 14px; }
.system-grid > div { display: grid; gap: 3px; min-height: 72px; padding: 12px; border: 1px solid #303b45; background: #151c23; }
.system-grid span { color: var(--muted); font-size: 10px; }
.system-grid strong { color: #e4ebf0; font-size: 13px; }
.system-grid small { color: var(--faint); font-size: 9px; }
.info-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 15px; }
.info-actions .button { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; }
.info-actions svg { width: 15px; height: 15px; }
.ghost-danger { margin-left: auto; }

#analytics-dialog { width: min(1080px, calc(100% - 28px)); }
.analytics-card { width: min(1080px, calc(100vw - 28px)); }
.forecast-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 14px; }
.forecast-grid article { display: grid; gap: 5px; min-height: 76px; padding: 13px; border: 1px solid #34414b; border-radius: 7px; background: #151d24; }
.forecast-grid small { color: var(--muted); }
.forecast-grid strong { color: #e8eef2; font-size: 20px; font-variant-numeric: tabular-nums; }
.charts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0 14px 15px; }
.charts-grid section { min-width: 0; padding: 11px; border: 1px solid #313e48; border-radius: 7px; background: #141b22; }
.charts-grid h4 { margin: 0 0 8px; color: #c9d2d9; font-size: 11px; }
.charts-grid canvas { display: block; width: 100%; }
.full-chart { grid-column: 1 / -1; }

.list-dialog { width: min(820px, calc(100vw - 28px)); }
.management-list { max-height: min(620px, calc(100vh - 110px)); overflow: auto; padding: 10px; }
.management-list article { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 10px 11px; border-bottom: 1px solid var(--line-soft); }
.management-list article:last-child { border-bottom: 0; }
.management-list article > div:first-child { display: grid; gap: 2px; min-width: 0; }
.management-list strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.management-list span { color: var(--muted); font-size: 10px; }
.management-list small { color: var(--faint); font-size: 9px; }
.list-actions { display: flex; gap: 7px; flex: 0 0 auto; }
.list-actions button { display: inline-flex; align-items: center; gap: 5px; }
.list-actions svg { width: 14px; height: 14px; }
.loading-row, .empty-list { padding: 28px; color: var(--muted); text-align: center; }
.error-text { color: var(--red); }

.login-page { display: grid; place-items: center; background: radial-gradient(circle at 50% 0%, #18313a 0, var(--bg) 44%); }
.login-shell { width: min(420px, calc(100% - 28px)); }
.login-card { display: grid; gap: 15px; padding: 28px; border: 1px solid #40505b; border-radius: 12px; background: rgba(23,29,36,.96); box-shadow: 0 30px 100px rgba(0,0,0,.45); }
.login-card h1 { margin: -6px 0 4px; font-size: 23px; }
.login-card > small { color: var(--cyan); text-transform: uppercase; letter-spacing: .13em; }
.login-mark { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid #177f92; border-radius: 999px; color: var(--cyan); background: #10313a; font: 700 22px/1 serif; }
.login-error { margin: 0; padding: 9px 10px; border: 1px solid #81404b; border-radius: 6px; color: #ffb0ba; background: #351d23; }

@media (max-width: 1280px) {
  .table-toolbar.service-toolbar { grid-template-columns: minmax(180px, 1fr) repeat(2, minmax(120px, .7fr)); }
  .table-toolbar.service-toolbar > :nth-child(n+4) { min-width: 0; }
}
@media (max-width: 900px) {
  .table-toolbar.service-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-toolbar .toolbar-search { grid-column: 1 / -1; }
  .services-table { min-width: 900px; }
  .system-grid, .charts-grid { grid-template-columns: 1fr; }
  .full-chart { grid-column: auto; }
}
@media (max-width: 620px) {
  .table-toolbar.service-toolbar { grid-template-columns: 1fr; }
  .forecast-grid { grid-template-columns: 1fr; }
  .system-grid { grid-template-columns: 1fr; }
  .info-actions .button { flex: 1 1 45%; justify-content: center; }
  .ghost-danger { margin-left: 0; }
  .management-list article { align-items: stretch; flex-direction: column; }
  .list-actions { width: 100%; }
  .list-actions button { flex: 1; justify-content: center; }
}


/* v1.7.1 compact system info, top-bar logout and refined analytics */
.logout-button {
  color: var(--cyan);
  border-color: #147a8c;
  border-radius: 999px;
  background: #0d2932;
}
.logout-button:hover { color: #dffcff; border-color: #20c7df; background: #113743; transform: translateY(-1px); }
.logout-button[hidden] { display: none; }

.dashboard-grid > .panel { display: flex; flex-direction: column; }
.dashboard-grid > .panel .table-scroll { flex: 1 1 auto; }
.payments-panel .panel-footer {
  flex: 0 0 auto;
  min-height: 50px;
  padding-block: 10px;
  background: linear-gradient(180deg, #161e25 0%, #151b22 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.015);
}

.system-card { width: min(650px, calc(100vw - 28px)); }
.compact-system-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 14px;
}
.compact-system-grid > div {
  min-height: 76px;
  padding: 12px 13px;
  border: 1px solid #303d47;
  border-radius: 8px;
  background: linear-gradient(145deg, #171f27, #141b22);
}
.compact-system-grid strong { margin-top: 3px; font-size: 13px; }
.compact-info-actions { padding-top: 0; }
.compact-info-actions .button { flex: 1 1 130px; justify-content: center; }

#analytics-dialog { width: min(1120px, calc(100% - 28px)); }
.analytics-card { width: min(1120px, calc(100vw - 28px)); border-radius: 10px; }
.analytics-header { background: linear-gradient(135deg, #1a242d, #182029); }
.analytics-body { display: grid; gap: 12px; padding: 14px; }
.forecast-grid { gap: 12px; padding: 0; }
.forecast-card {
  position: relative;
  display: flex !important;
  align-items: center;
  min-height: 92px !important;
  overflow: hidden;
  padding: 14px 15px !important;
  border: 1px solid #34434e !important;
  border-radius: 10px !important;
  background: linear-gradient(145deg, #182129, #141b22) !important;
}
.forecast-card::after {
  content: "";
  position: absolute;
  inset: auto -35px -50px auto;
  width: 110px;
  height: 110px;
  border-radius: 999px;
  background: currentColor;
  opacity: .045;
}
.forecast-card > div { display: grid; min-width: 0; }
.forecast-card small { color: #9ca9b5; font-size: 10px; }
.forecast-card strong { margin-top: 2px; color: #edf4f7; font-size: 21px; line-height: 1.15; }
.forecast-card div > span { margin-top: 4px; color: #6f7e8a; font-size: 9px; }
.forecast-icon {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  margin-right: 12px;
  border: 1px solid currentColor;
  border-radius: 11px;
  background: color-mix(in srgb, currentColor 11%, transparent);
}
.forecast-icon svg { width: 20px; height: 20px; }
.cyan-accent { color: var(--cyan); }
.green-accent { color: var(--green); }
.violet-accent { color: var(--violet); }

.chart-panel {
  min-width: 0;
  overflow: hidden;
  padding: 13px;
  border: 1px solid #34414b;
  border-radius: 10px;
  background: linear-gradient(145deg, #151d24, #131a21);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.012);
}
.chart-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.chart-heading h4 { margin: 0; color: #d8e2e8; font-size: 12px; }
.chart-heading span { display: block; margin-top: 2px; color: #71808d; font-size: 9px; }
.chart-badge {
  min-width: 42px;
  margin: 0 !important;
  padding: 4px 8px;
  border: 1px solid #276b79;
  border-radius: 999px;
  color: #79dfe9 !important;
  background: #112c34;
  text-align: center;
  font-weight: 700;
}
.chart-panel canvas { display: block; width: 100%; }
.trend-chart-panel { min-height: 340px; }
.analytics-breakdown-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

@media (max-width: 900px) {
  .compact-system-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analytics-breakdown-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .appbar-actions { gap: 5px; }
  .logout-button { width: 32px; height: 32px; }
  .compact-system-grid { grid-template-columns: 1fr; }
  .forecast-card { min-height: 82px !important; }
}


/* v1.7.2 bounded analytics canvases and Remnawave-inspired login */
#analytics-dialog {
  width: min(980px, calc(100% - 28px));
  max-height: calc(100vh - 28px);
  overflow: hidden;
}
.analytics-card {
  width: min(980px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow: hidden;
}
.analytics-body {
  min-height: 0;
  overflow: auto;
  scrollbar-color: #44505d transparent;
  scrollbar-width: thin;
}
.trend-chart-panel { min-height: 0; }
.chart-panel canvas {
  display: block;
  width: 100%;
  max-width: 100%;
}
#monthly-chart { height: 230px; }
#provider-chart, #currency-chart { height: 190px; }
.analytics-breakdown-grid .chart-panel { min-height: 245px; }

.login-page {
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: 32px 18px;
  background: #171d24;
}
.login-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 43%, rgba(32, 199, 223, .025), transparent 28%),
    linear-gradient(rgba(255,255,255,.006), rgba(255,255,255,0));
}
.login-shell {
  position: relative;
  z-index: 1;
  width: min(350px, calc(100vw - 36px));
  transform: translateY(-3vh);
}
.login-card {
  display: grid;
  gap: 16px;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  color: #edf3f6;
  font-size: 31px;
  font-weight: 760;
  line-height: 1;
  letter-spacing: -.045em;
  user-select: none;
}
.login-brand-primary { color: var(--cyan); }
.login-brand-secondary { color: #f1f5f7; }
.login-wave {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 38px;
  margin-right: 8px;
  color: var(--cyan);
}
.login-wave i {
  display: block;
  width: 3px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 14px rgba(32,199,223,.16);
}
.login-wave i:nth-child(1), .login-wave i:nth-child(5) { height: 14px; }
.login-wave i:nth-child(2), .login-wave i:nth-child(4) { height: 28px; }
.login-wave i:nth-child(3) { height: 38px; }
.login-field {
  display: grid;
  gap: 6px;
  color: #c8d1d9;
  font-size: 12px;
  font-weight: 600;
}
.login-field > span:first-child { padding-left: 1px; }
.login-field b { color: var(--red); font-weight: 700; }
.login-field input {
  width: 100%;
  height: 34px;
  padding: 0 11px;
  border: 1px solid #4b5661;
  border-radius: 6px;
  outline: none;
  color: #edf2f5;
  background: #1d242c;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.015);
  transition: border-color .14s ease, background .14s ease, box-shadow .14s ease;
}
.login-field input::placeholder { color: #6c7782; }
.login-field input:hover { border-color: #5b6772; }
.login-field input:focus {
  border-color: #438795;
  background: #1e2730;
  box-shadow: 0 0 0 2px rgba(32,199,223,.10);
}
.login-password-control { position: relative; display: block; }
.login-password-control input { padding-right: 40px; }
.login-password-toggle {
  position: absolute;
  top: 50%;
  right: 5px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  color: #9aa6b0;
  background: transparent;
  cursor: pointer;
  transform: translateY(-50%);
  transition: color .13s ease, background .13s ease;
}
.login-password-toggle:hover,
.login-password-toggle.is-visible { color: #dfe7ec; background: rgba(255,255,255,.035); }
.login-password-toggle svg { width: 17px; height: 17px; }
.login-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 34px;
  margin-top: 10px;
  border: 1px solid #505b66;
  border-radius: 6px;
  color: #edf2f5;
  background: #20272f;
  cursor: pointer;
  font-weight: 680;
  transition: color .14s ease, border-color .14s ease, background .14s ease, transform .14s ease;
}
.login-submit svg { width: 15px; height: 15px; }
.login-submit:hover:not(:disabled) {
  border-color: #65717c;
  background: #252e37;
  transform: translateY(-1px);
}
.login-submit:active:not(:disabled) { transform: translateY(0); }
.login-submit:disabled { opacity: .65; cursor: wait; }
.login-submit.is-loading svg { animation: login-pulse .8s ease-in-out infinite alternate; }
.login-error {
  margin: -3px 0 0;
  padding: 9px 10px;
  border: 1px solid #81404b;
  border-radius: 6px;
  color: #ffb0ba;
  background: #351d23;
  font-size: 11px;
}
@keyframes login-pulse { to { opacity: .35; transform: translateX(2px); } }

@media (max-height: 620px) {
  .login-shell { transform: none; }
  .login-brand { margin-bottom: 4px; }
}
@media (max-width: 620px) {
  #analytics-dialog, .analytics-card { max-height: calc(100vh - 16px); }
  .analytics-body { padding: 10px; }
  #monthly-chart { height: 210px; }
  #provider-chart, #currency-chart { height: 180px; }
  .analytics-breakdown-grid .chart-panel { min-height: 230px; }
  .login-brand { font-size: 27px; }
}
@media (prefers-reduced-motion: reduce) {
  .login-submit, .login-field input, .login-password-toggle { transition: none; }
  .login-submit.is-loading svg { animation: none; }
}

/* v1.7.3 interactive chart cursor and month pagination */
.trend-chart-heading { align-items: center; }
.chart-heading-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}
.month-pagination {
  display: inline-flex;
  align-items: stretch;
  min-width: 0;
  height: 30px;
  overflow: hidden;
  border: 1px solid #344650;
  border-radius: 8px;
  background: #141c23;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.015);
}
.month-page-button,
.month-period-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 100%;
  padding: 0;
  border: 0;
  color: #9eacb7;
  background: transparent;
  cursor: pointer;
  transition: color .14s ease, background .14s ease, transform .14s ease;
}
.month-page-button { flex: 0 0 30px; }
.month-page-button svg { width: 15px; height: 15px; }
.month-period-button {
  min-width: 178px;
  padding: 0 11px;
  border-right: 1px solid #2d3b45;
  border-left: 1px solid #2d3b45;
  color: #c7d2d9;
  font-size: 9px;
  font-weight: 650;
  white-space: nowrap;
}
.month-page-button:hover:not(:disabled),
.month-period-button:hover:not(:disabled) {
  color: #e7fbfa;
  background: rgba(32,199,223,.08);
}
.month-page-button:active:not(:disabled),
.month-period-button:active:not(:disabled) { transform: translateY(1px); }
.month-page-button:disabled {
  color: #4f5d68;
  cursor: default;
  opacity: .55;
}
.month-period-button.is-current {
  color: #83dfe5;
  background: rgba(32,199,223,.045);
}
#monthly-chart {
  touch-action: pan-y;
  user-select: none;
}

@media (max-width: 720px) {
  .trend-chart-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .chart-heading-tools {
    width: 100%;
    justify-content: space-between;
  }
  .month-pagination { flex: 1 1 auto; }
  .month-period-button { flex: 1 1 auto; min-width: 0; }
}

@media (max-width: 430px) {
  .month-period-button { padding-inline: 7px; font-size: 8px; }
  .chart-heading-tools { gap: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  .month-page-button, .month-period-button { transition: none; }
}


/* v1.7.4 clearer analytics and easier bulk selection */
.services-panel .data-table th:nth-child(1) { width: 48px; }
.select-column {
  width: 48px !important;
  min-width: 48px;
  padding: 0 !important;
}
.row-select-hitbox {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 43px;
  cursor: pointer;
  border-radius: 6px;
  transition: background-color .16s ease, box-shadow .16s ease;
}
.row-select-hitbox:hover {
  background: rgba(32, 199, 223, .09);
  box-shadow: inset 0 0 0 1px rgba(32, 199, 223, .16);
}
.header-select-hitbox { min-height: 37px; }
.row-select-hitbox input {
  width: 20px;
  height: 20px;
  margin: 0;
  padding: 0;
  accent-color: var(--cyan);
  cursor: pointer;
}
.service-row:has([data-service-select]:checked) {
  background: rgba(32, 199, 223, .055);
  box-shadow: inset 3px 0 0 rgba(32, 199, 223, .55);
}
.breakdown-panel .chart-heading span {
  max-width: 420px;
  line-height: 1.35;
}
@media (max-width: 620px) {
  .select-column { width: 44px !important; min-width: 44px; }
  .row-select-hitbox { min-height: 46px; }
}

/* v1.7.5 contextual bulk controls and redesigned system center */
.info-button.app-info-trigger {
  position: relative;
  width: 38px;
  height: 38px;
  border: 1px solid #28505b !important;
  border-radius: 10px;
  color: #8fe9f4;
  background: linear-gradient(145deg, #18252d, #132028) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035), 0 5px 18px rgba(0,0,0,.16);
}
.info-button.app-info-trigger::after {
  content: '';
  position: absolute;
  right: 6px;
  top: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 3px rgba(32,199,223,.10);
}
.info-button.app-info-trigger svg { width: 19px; height: 19px; }
.info-button.app-info-trigger:hover {
  color: #e7fcff;
  border-color: #1592aa !important;
  background: linear-gradient(145deg, #17333c, #122a32) !important;
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 8px 22px rgba(0,0,0,.22);
}

.service-panel-actions { min-width: 0; gap: 7px; }
.bulk-toolbar.bulk-icon-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 5px;
  min-height: 0;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  animation: bulkActionsIn .18s ease-out both;
}
.bulk-toolbar.bulk-icon-toolbar[hidden] { display: none; }
.bulk-icon-toolbar .bulk-count-badge {
  display: inline-grid;
  place-items: center;
  min-width: 25px;
  height: 25px;
  margin-right: 1px;
  padding: 0 6px;
  border: 1px solid #287b8b;
  border-radius: 999px;
  color: #bff8ff;
  background: #11313a;
  font-size: 10px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.bulk-icon-toolbar .bulk-action {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 8px;
  background: #182128;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
  transition: transform .14s ease, color .14s ease, border-color .14s ease, background .14s ease, box-shadow .14s ease;
}
.bulk-icon-toolbar .bulk-action:hover { transform: translateY(-1px); }
.bulk-icon-toolbar .bulk-action.paid { color: #5ce0b5; border-color: #226f5b; background: #11342b; }
.bulk-icon-toolbar .bulk-action.date { color: #6bdce9; border-color: #216f7c; background: #12323a; }
.bulk-icon-toolbar .bulk-action.currency { color: #b597f2; border-color: #5b477f; background: #251e35; }
.bulk-icon-toolbar .bulk-action.state { color: #f0b56e; border-color: #78572f; background: #342719; }
.bulk-icon-toolbar .bulk-action.state.resume { color: #64d8c0; border-color: #276d60; background: #153129; }
.bulk-icon-toolbar .bulk-action.delete { color: #ff8795; border-color: #79404a; background: #351e24; }
.bulk-icon-toolbar .bulk-action.clear { color: #9ba8b3; border-color: #39454f; background: #171e25; }
.bulk-icon-toolbar .bulk-action.paid:hover { border-color: #36ad88; background: #16483a; }
.bulk-icon-toolbar .bulk-action.date:hover { border-color: #2fa5b8; background: #17434c; }
.bulk-icon-toolbar .bulk-action.currency:hover { border-color: #8569b9; background: #312744; }
.bulk-icon-toolbar .bulk-action.state:hover { border-color: #a87942; background: #45331f; }
.bulk-icon-toolbar .bulk-action.delete:hover { border-color: #b55361; background: #48252d; }
.bulk-icon-toolbar .bulk-action.clear:hover { color: #d6dde3; border-color: #5b6872; background: #202932; }
@keyframes bulkActionsIn {
  from { opacity: 0; transform: translateX(8px) scale(.98); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

.redesigned-system-card {
  width: min(760px, calc(100vw - 28px));
  overflow: hidden;
  border-radius: 12px;
  background: #151c23;
}
.system-dialog-header {
  min-height: 84px;
  padding: 14px 18px;
  background:
    radial-gradient(circle at 10% 20%, rgba(32,199,223,.09), transparent 34%),
    linear-gradient(135deg, #1b252e, #182028 72%);
}
.system-brand { display: flex; align-items: center; gap: 13px; min-width: 0; }
.system-brand-icon {
  display: grid;
  place-items: center;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border: 1px solid #236f7d;
  border-radius: 13px;
  color: #7fe6f2;
  background: linear-gradient(145deg, #123843, #102a33);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045), 0 8px 24px rgba(0,0,0,.17);
}
.system-brand-icon svg { width: 24px; height: 24px; }
.system-brand h3 { font-size: 19px; }
.system-brand p { margin: 3px 0 0; color: #82909c; font-size: 10px; font-weight: 500; }
.system-overview { display: grid; gap: 10px; padding: 16px 18px 10px; }
.system-version-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 86px;
  overflow: hidden;
  padding: 15px 17px;
  border: 1px solid #32505b;
  border-radius: 10px;
  background:
    radial-gradient(circle at 92% 20%, rgba(32,199,223,.13), transparent 35%),
    linear-gradient(145deg, #17252d, #151e25);
}
.system-version-card > div { display: grid; gap: 2px; }
.system-version-card span { color: #9ba9b5; font-size: 10px; }
.system-version-card strong { color: #f0f6f8; font-size: 24px; line-height: 1.1; letter-spacing: -.025em; }
.system-version-card small { color: #657681; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.system-health-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 31px;
  padding: 0 11px;
  border: 1px solid #276d5a;
  border-radius: 999px;
  color: #91e7c8 !important;
  background: rgba(17,53,44,.88);
  white-space: nowrap;
  font-weight: 700;
}
.system-health-badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2bd59f;
  box-shadow: 0 0 0 4px rgba(43,213,159,.11);
}
.system-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}
.system-metric {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  min-height: 92px;
  padding: 12px 13px;
  border: 1px solid #303d47;
  border-radius: 9px;
  background: linear-gradient(145deg, #171f27, #141b22);
  transition: border-color .16s ease, transform .16s ease, background .16s ease;
}
.system-metric:hover { transform: translateY(-1px); border-color: #40515d; background: linear-gradient(145deg, #1a232c, #151d24); }
.system-metric.infrastructure-metric { grid-column: span 2; }
.system-metric-icon {
  display: grid;
  place-items: center;
  flex: 0 0 37px;
  width: 37px;
  height: 37px;
  border: 1px solid currentColor;
  border-radius: 10px;
  background: color-mix(in srgb, currentColor 10%, transparent);
}
.system-metric-icon svg { width: 19px; height: 19px; }
.system-metric-icon.cyan { color: var(--cyan); }
.system-metric-icon.blue { color: var(--blue); }
.system-metric-icon.green { color: var(--green); }
.system-metric-icon.violet { color: var(--violet); }
.system-metric > div { display: grid; min-width: 0; gap: 2px; }
.system-metric span:not(.system-metric-icon) { color: #8795a1; font-size: 9px; }
.system-metric strong { overflow: hidden; color: #e4eaef; font-size: 13px; white-space: nowrap; text-overflow: ellipsis; }
.system-metric strong b, .system-metric small b { color: inherit; font: inherit; }
.system-metric small { overflow: hidden; color: #65737e; font-size: 9px; white-space: nowrap; text-overflow: ellipsis; }
.system-metric small.error-text { color: #ff8997; }
.system-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  padding: 4px 18px 18px;
}
.system-action-card {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 64px;
  padding: 10px 12px;
  border: 1px solid #35434e;
  border-radius: 9px;
  color: #cfd8de;
  background: #182129;
  text-align: left;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.system-action-card > span {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border: 1px solid #2e6671;
  border-radius: 9px;
  color: #76dce8;
  background: #123039;
}
.system-action-card svg { width: 18px; height: 18px; }
.system-action-card > div { display: grid; min-width: 0; gap: 2px; }
.system-action-card strong { color: #dce5ea; font-size: 11px; }
.system-action-card small { color: #71808b; font-size: 9px; line-height: 1.35; }
.system-action-card:hover {
  transform: translateY(-1px);
  border-color: #3b6974;
  background: #1a2a32;
  box-shadow: 0 8px 20px rgba(0,0,0,.14);
}
.system-action-card:hover > span { color: #e0fbff; border-color: #2692a7; background: #153c46; }

@media (max-width: 760px) {
  .services-panel .panel-header { height: auto; min-height: 58px; padding-block: 8px; flex-wrap: wrap; }
  .service-panel-actions { width: 100%; justify-content: flex-end; }
  .bulk-icon-toolbar .bulk-count-badge { margin-right: auto; }
  .system-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .system-metric.infrastructure-metric { grid-column: span 2; }
}
@media (max-width: 520px) {
  .bulk-icon-toolbar { width: 100%; justify-content: flex-end; }
  .bulk-icon-toolbar .bulk-action { width: 32px; height: 32px; }
  .service-panel-actions { flex-wrap: wrap; }
  .system-version-card { align-items: flex-start; flex-direction: column; gap: 10px; }
  .system-metrics, .system-action-grid { grid-template-columns: 1fr; }
  .system-metric.infrastructure-metric { grid-column: auto; }
  .system-action-grid { padding-inline: 14px; }
  .system-overview { padding-inline: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .bulk-toolbar.bulk-icon-toolbar { animation: none; }
  .bulk-icon-toolbar .bulk-action, .system-metric, .system-action-card, .info-button.app-info-trigger { transition: none; }
}

/* v1.7.6 unified top-bar controls */
.appbar-actions {
  gap: 7px;
}

.appbar-actions .currency-switcher,
.appbar-actions .version-badge,
.appbar-actions .topbar-action {
  min-height: 36px;
  border: 1px solid #34414b;
  border-radius: 9px;
  background: linear-gradient(145deg, #182028, #151c23);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025), 0 3px 10px rgba(0,0,0,.08);
}

.appbar-actions .currency-switcher {
  height: 36px;
  padding: 0 8px 0 11px;
  gap: 8px;
  color: #8f9ca8;
}

.appbar-actions .currency-switcher select {
  height: 28px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #edf3f6;
  background-color: #141b22;
  transition: border-color .14s ease, background-color .14s ease, box-shadow .14s ease;
}

.appbar-actions .currency-switcher:hover {
  border-color: #465560;
  background: linear-gradient(145deg, #1b242d, #171f27);
}

.appbar-actions .currency-switcher:hover select {
  border-color: #2e3b45;
  background-color: #161e26;
}

.appbar-actions .rate-status {
  width: 8px;
  height: 8px;
}

.appbar-actions .version-badge {
  height: 36px;
  padding: 0 11px;
  border-radius: 9px;
  color: #93a0ab;
  background: linear-gradient(145deg, #171f27, #141b22);
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}

.header-action-cluster {
  gap: 6px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.appbar-actions .topbar-action,
.header-action-cluster .topbar-action {
  position: relative;
  width: 36px;
  height: 36px;
  border-right: 1px solid #34414b;
  color: #aab5bf;
  background: linear-gradient(145deg, #182028, #151c23);
  transition: transform .15s ease, color .15s ease, border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.appbar-actions .topbar-action svg,
.header-action-cluster .topbar-action svg {
  width: 18px;
  height: 18px;
}

.appbar-actions .topbar-action:hover,
.header-action-cluster .topbar-action:hover {
  transform: translateY(-1px);
  color: #eff7fa;
  border-color: #4b5b66;
  background: linear-gradient(145deg, #202b34, #19222a);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 7px 18px rgba(0,0,0,.17);
}

.appbar-actions .analytics-action {
  color: #78dbe7;
  border-color: #2b5f69;
  background: linear-gradient(145deg, #173039, #14252c);
}

.appbar-actions .analytics-action:hover {
  color: #dffbff;
  border-color: #238da1;
  background: linear-gradient(145deg, #19404a, #15313a);
}

.header-action-cluster .telegram-action {
  color: #61d9e8;
  border-color: #275f6a;
  border-radius: 9px;
  background: linear-gradient(145deg, #17313a, #14252c);
}

.header-action-cluster .telegram-action:hover {
  color: #e3fcff;
  border-color: #218da1;
  background: linear-gradient(145deg, #19414b, #15313a);
}

.header-action-cluster .reminders-action {
  color: #bac4cc;
  border-color: #3a4650;
  border-radius: 9px;
  background: linear-gradient(145deg, #1a222a, #161d24);
}

.header-action-cluster .reminders-action:hover {
  color: #f0f4f7;
  border-color: #596771;
  background: linear-gradient(145deg, #222c35, #1a232b);
}

.header-action-cluster .refresh-action {
  color: #52d4e3;
  border-color: #285f6a;
  border-radius: 9px;
  background: linear-gradient(145deg, #17313a, #14262d);
}

.header-action-cluster .refresh-action:hover {
  color: #ddfbff;
  border-color: #218da1;
  background: linear-gradient(145deg, #19414b, #15313a);
}

.appbar-actions .logout-button {
  color: #e38b97;
  border-color: #60404a;
  border-radius: 9px;
  background: linear-gradient(145deg, #2b2026, #211a20);
}

.appbar-actions .logout-button:hover {
  color: #ffdce1;
  border-color: #a64f5d;
  background: linear-gradient(145deg, #3b252d, #2b1e24);
}

@media (max-width: 620px) {
  .appbar-actions { gap: 5px; }
  .header-action-cluster { gap: 4px; }
  .appbar-actions .topbar-action,
  .header-action-cluster .topbar-action,
  .appbar-actions .logout-button { width: 34px; height: 34px; min-height: 34px; }
  .appbar-actions .currency-switcher { height: 34px; min-height: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  .appbar-actions .currency-switcher,
  .appbar-actions .currency-switcher select,
  .appbar-actions .topbar-action,
  .header-action-cluster .topbar-action { transition: none; }
}

/* v1.7.7 unified control-center visual system */
:root {
  --font-ui: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #10161c;
  --bar: #121920;
  --panel: #151c23;
  --panel-2: #182129;
  --field: #141b22;
  --line: #33414b;
  --line-soft: #2c3943;
  --text: #e4ebef;
  --muted: #94a2ad;
  --faint: #687783;
  --radius: 10px;
  --surface-gradient: linear-gradient(145deg, #182129, #141b22);
  --surface-gradient-hover: linear-gradient(145deg, #1b2630, #162028);
  --surface-highlight: inset 0 1px 0 rgba(255,255,255,.025);
  --surface-shadow: 0 8px 28px rgba(0,0,0,.12);
}

html, body, button, input, select, textarea {
  font-family: var(--font-ui);
}
body {
  font-weight: 500;
  letter-spacing: -.005em;
  background:
    radial-gradient(circle at 50% -16%, rgba(32,199,223,.045), transparent 34%),
    var(--bg);
}
strong, b, h1, h2, h3, h4 { font-family: var(--font-ui); }
h1, h2, h3, h4 { letter-spacing: -.018em; }

/* Shared surfaces: same language as the control center. */
.appbar {
  border-bottom-color: #2a3740;
  background: rgba(16,22,28,.94);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.panel,
.stat-card,
.dialog-card,
.chart-panel,
.forecast-card,
.login-field input,
.compact-input,
.compact-select,
.field input,
.field select,
.field textarea,
.combobox-trigger,
.money-input,
.payment-preview,
.toggle-field {
  border-color: var(--line);
  border-radius: var(--radius);
  background: var(--surface-gradient);
  box-shadow: var(--surface-highlight);
}
.panel,
.stat-card,
.dialog-card,
.chart-panel,
.forecast-card {
  box-shadow: var(--surface-highlight), var(--surface-shadow);
}
.panel { overflow: hidden; }
.panel-header,
.dialog-header {
  border-color: var(--line);
  background:
    radial-gradient(circle at 8% 18%, rgba(32,199,223,.055), transparent 32%),
    linear-gradient(135deg, #1b252e, #182028 72%);
}
.panel-title h2,
.dialog-header h3,
.chart-heading h4,
.forecast-card strong,
.stat-card strong {
  color: #edf3f6;
  font-weight: 720;
}
.panel-title h2 { font-size: 15px; }
.panel-icon,
.stat-icon,
.forecast-icon,
.system-brand-icon,
.system-metric-icon {
  border: 1px solid color-mix(in srgb, currentColor 52%, #26343e);
  border-radius: 11px;
  background: color-mix(in srgb, currentColor 10%, #13202a);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}
.panel-icon { color: #6fdce8; background: linear-gradient(145deg, #123842, #102b34); }

/* Typography hierarchy. */
.stat-card small,
.field > span,
.chart-heading span,
.secondary-text,
.system-metric span:not(.system-metric-icon) { font-weight: 560; }
.data-table th,
.panel-footer,
.version-badge,
.chart-badge { font-family: var(--font-ui); }
.data-table th { font-weight: 680; letter-spacing: .005em; }
.provider-name { color: #dbe3e8; font-weight: 620; }
.service-name { color: #f0f5f7; font-weight: 700; }
.amount, .due-cell, .numeric-cell { font-weight: 620; }

/* Tables. */
.table-scroll {
  background: #141b22;
  scrollbar-color: #44535e transparent;
}
.data-table thead {
  background: linear-gradient(180deg, #1a232c, #172028);
  box-shadow: 0 1px 0 rgba(255,255,255,.015);
}
.data-table th,
.data-table td { border-color: #34414b; }
.data-table th {
  color: #cbd5dc;
  background: rgba(25,34,43,.94);
}
.data-table tbody tr {
  background: linear-gradient(90deg, rgba(23,31,39,.98), rgba(20,27,34,.98));
  transition: background .16s ease, box-shadow .16s ease, color .16s ease;
}
.data-table tbody tr:hover {
  background: linear-gradient(90deg, rgba(27,42,50,.98), rgba(23,34,42,.98));
  box-shadow: inset 3px 0 0 rgba(32,199,223,.32);
}
.service-row:has([data-service-select]:checked) {
  background: linear-gradient(90deg, rgba(20,55,63,.88), rgba(19,42,49,.82));
  box-shadow: inset 3px 0 0 rgba(32,199,223,.72);
}
.column-heading {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  max-width: 100%;
  color: inherit;
  white-space: nowrap;
}
.column-heading.align-right { width: 100%; justify-content: flex-end; }
.column-heading svg {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  color: #70d8e5;
  stroke-width: 1.9;
  filter: drop-shadow(0 0 8px rgba(32,199,223,.08));
}
.panel-footer {
  border-color: var(--line);
  background: linear-gradient(180deg, #171f27, #151c23);
}
.pager button,
.pager span {
  border-radius: 7px;
  font-weight: 720;
}
.pager button { background: #171f27; }

/* Forms and dropdowns. */
.field > span { color: #cdd7de; }
.field input,
.field select,
.field textarea,
.compact-input,
.compact-select,
.combobox-trigger,
.money-input {
  color: #edf3f6;
  background: linear-gradient(145deg, #171f27, #141b22);
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.field input:hover,
.field select:hover,
.field textarea:hover,
.compact-input:hover,
.compact-select:hover,
.combobox-trigger:hover { border-color: #465761; }
.field input:focus,
.field select:focus,
.field textarea:focus,
.compact-input:focus,
.compact-select:focus,
.combobox-trigger:focus-within {
  border-color: #2a8293;
  background: linear-gradient(145deg, #192731, #152129);
  box-shadow: 0 0 0 3px rgba(32,199,223,.09), inset 0 1px 0 rgba(255,255,255,.03);
}
.combobox-menu,
.combo-options {
  border-color: #3a4853;
  border-radius: 10px;
  background: #182028;
  box-shadow: 0 18px 48px rgba(0,0,0,.34);
}

/* Buttons and icon motion. */
.icon-button,
.button,
.row-action,
.text-button,
.system-action-card,
.month-page-button,
.month-period-button,
.pager button,
.list-actions button,
.login-submit,
.login-password-toggle {
  font-family: var(--font-ui);
  transition:
    transform .15s ease,
    color .15s ease,
    border-color .15s ease,
    background .15s ease,
    box-shadow .15s ease;
}
.icon-button,
.row-action,
.pager button {
  border-color: #374650;
  background: linear-gradient(145deg, #19222a, #151c23);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}
.icon-button:hover,
.row-action:hover,
.pager button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: #4d616d;
  background: var(--surface-gradient-hover);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 7px 18px rgba(0,0,0,.16);
}
button svg,
a svg,
.system-action-card > span svg {
  transform-origin: center;
  transition: transform .16s cubic-bezier(.2,.7,.2,1), filter .16s ease;
}
button:hover svg,
a:hover svg,
.system-action-card:hover > span svg {
  transform: translateY(-1px) scale(1.06);
  filter: drop-shadow(0 3px 7px rgba(32,199,223,.12));
}
button:active svg,
a:active svg,
.system-action-card:active > span svg {
  transform: translateY(0) scale(.88);
  filter: none;
}
button:active,
.icon-button:active,
.row-action:active,
.system-action-card:active,
.pager button:active:not(:disabled) {
  transform: translateY(0) scale(.97);
}
#refresh-all:hover svg,
#refresh-services:hover svg,
#refresh-providers:hover svg,
#refresh-payments:hover svg,
#info-refresh-rates:hover svg { transform: rotate(18deg) scale(1.04); }
#add-service:hover svg,
#add-provider:hover svg,
#add-payment:hover svg { transform: rotate(8deg) scale(1.08); }

.button {
  border-radius: 9px;
  font-weight: 680;
}
.button.primary {
  border-color: #258b78;
  background: linear-gradient(145deg, #2dd6a8, #20bd91);
  box-shadow: 0 7px 18px rgba(24,176,134,.14);
}
.button.secondary { background: linear-gradient(145deg, #1b252e, #171f27); }
.button.danger { background: linear-gradient(145deg, #a54655, #813744); }

/* Dashboard and analytics. */
.stat-card,
.forecast-card,
.chart-panel,
.system-metric,
.system-action-card {
  transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.stat-card:hover,
.forecast-card:hover,
.chart-panel:hover {
  transform: translateY(-1px);
  border-color: #40515d;
  background: var(--surface-gradient-hover) !important;
}
.chart-heading h4 { font-weight: 720; }
.chart-badge,
.bulk-count-badge,
.system-health-badge { font-weight: 720; }

/* Dialog consistency without changing layout. */
dialog::backdrop {
  background: rgba(4,9,13,.78);
  backdrop-filter: blur(7px);
}
.dialog-card { overflow: hidden; }
.dialog-actions {
  border-color: var(--line);
  background: linear-gradient(180deg, #171f27, #151c23);
}
.management-list article {
  border-color: var(--line-soft);
  border-radius: 8px;
  transition: background .15s ease, border-color .15s ease;
}
.management-list article:hover { background: rgba(31,43,52,.7); }

/* Login follows the same visual system. */
.login-page {
  background:
    radial-gradient(circle at 50% 37%, rgba(32,199,223,.07), transparent 28%),
    #10161c;
}
.login-field input,
.login-submit {
  border-radius: 9px;
  background: var(--surface-gradient);
  box-shadow: var(--surface-highlight);
}
.login-submit { font-weight: 700; }
.login-brand { font-family: var(--font-ui); }

@media (prefers-reduced-motion: reduce) {
  button,
  a,
  button svg,
  a svg,
  .icon-button,
  .row-action,
  .stat-card,
  .forecast-card,
  .chart-panel,
  .system-action-card,
  .system-action-card > span svg,
  .data-table tbody tr { transition: none !important; animation: none !important; }
  button:hover svg,
  a:hover svg,
  button:active svg,
  a:active svg { transform: none !important; filter: none !important; }
}


/* v1.7.9 reference-inspired finance charts */
.analytics-card {
  --chart-coral: #ff5360;
  --chart-panel: #151b21;
  --chart-track: #252c33;
}
.analytics-body {
  background:
    radial-gradient(circle at 18% 15%, rgba(255,83,96,.025), transparent 26%),
    linear-gradient(180deg, #141b22, #13191f);
}
.chart-panel {
  border-color: #313a43;
  background: linear-gradient(155deg, #171d23, #141a20);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.014), 0 10px 28px rgba(0,0,0,.08);
}
.chart-panel:hover {
  border-color: #3b4650;
  background: linear-gradient(155deg, #192027, #151b21) !important;
}
.trend-chart-panel {
  position: relative;
}
.trend-chart-panel::after {
  content: "";
  position: absolute;
  inset: 50px 13px 13px;
  pointer-events: none;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(255,83,96,.012), transparent 48%);
}
.chart-heading h4 { color: #e8edf0; letter-spacing: -.01em; }
.chart-heading span { color: #74808b; }
.chart-badge {
  border-color: rgba(255,83,96,.38);
  color: #ff9ba4 !important;
  background: rgba(255,83,96,.08);
}
#monthly-chart, #provider-chart, #currency-chart {
  position: relative;
  z-index: 1;
}
#provider-chart, #currency-chart { cursor: default; }
.breakdown-panel {
  background:
    linear-gradient(155deg, rgba(255,255,255,.009), transparent 35%),
    #151b21;
}
@media (prefers-reduced-motion: reduce) {
  .chart-panel { transition: none !important; }
}

/* v1.8.1 minimal one-time super-admin setup */
.setup-page .login-shell { width: min(350px, calc(100vw - 36px)); }
.setup-page .login-card { gap: 13px; }
.setup-page .login-brand { margin-bottom: 6px; }
.setup-heading { display: grid; gap: 4px; margin: 0 0 3px; text-align: center; }
.setup-heading small { color: var(--cyan); text-transform: uppercase; letter-spacing: .12em; font-size: 10px; font-weight: 700; }
.setup-heading h1 { margin: 0; font-size: 18px; line-height: 1.25; }
.setup-heading p { margin: 0; color: #88959f; font-size: 12px; line-height: 1.4; }
.setup-page .login-submit { margin-top: 5px; }


/* Infra Billing brand artwork supplied for v1.8.1. */
.app-brand-mark {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}
.info-button.app-info-trigger::after { display: none; }
.info-button.app-info-trigger .app-brand-mark {
  width: 29px;
  height: 25px;
}
.login-wave {
  width: 44px;
  flex: 0 0 44px;
  justify-content: center;
}
.login-wave .app-brand-mark {
  width: 44px;
  height: 36px;
}
.system-brand-icon .app-brand-mark {
  width: 36px;
  height: 30px;
}
@media (max-width: 620px) {
  .login-wave {
    width: 40px;
    flex-basis: 40px;
  }
  .login-wave .app-brand-mark {
    width: 40px;
    height: 33px;
  }
}
