*, ::before, ::after {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}

::backdrop {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}

/*
! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com
*/

/*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
*/

*,
::before,
::after {
  box-sizing: border-box;
  /* 1 */
  border-width: 0;
  /* 2 */
  border-style: solid;
  /* 2 */
  border-color: #e5e7eb;
  /* 2 */
}

::before,
::after {
  --tw-content: '';
}

/*
1. Use a consistent sensible line-height in all browsers.
2. Prevent adjustments of font size after orientation changes in iOS.
3. Use a more readable tab size.
4. Use the user's configured `sans` font-family by default.
5. Use the user's configured `sans` font-feature-settings by default.
6. Use the user's configured `sans` font-variation-settings by default.
7. Disable tap highlights on iOS
*/

html,
:host {
  line-height: 1.5;
  /* 1 */
  -webkit-text-size-adjust: 100%;
  /* 2 */
  -moz-tab-size: 4;
  /* 3 */
  -o-tab-size: 4;
  tab-size: 4;
  /* 3 */
  font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  /* 4 */
  font-feature-settings: normal;
  /* 5 */
  font-variation-settings: normal;
  /* 6 */
  -webkit-tap-highlight-color: transparent;
  /* 7 */
}

/*
1. Remove the margin in all browsers.
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
*/

body {
  margin: 0;
  /* 1 */
  line-height: inherit;
  /* 2 */
}

/*
1. Add the correct height in Firefox.
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
3. Ensure horizontal rules are visible by default.
*/

hr {
  height: 0;
  /* 1 */
  color: inherit;
  /* 2 */
  border-top-width: 1px;
  /* 3 */
}

/*
Add the correct text decoration in Chrome, Edge, and Safari.
*/

abbr:where([title]) {
  -webkit-text-decoration: underline dotted;
  text-decoration: underline dotted;
}

/*
Remove the default font size and weight for headings.
*/

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}

/*
Reset links to optimize for opt-in styling instead of opt-out.
*/

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

/*
Add the correct font weight in Edge and Safari.
*/

b,
strong {
  font-weight: bolder;
}

/*
1. Use the user's configured `mono` font-family by default.
2. Use the user's configured `mono` font-feature-settings by default.
3. Use the user's configured `mono` font-variation-settings by default.
4. Correct the odd `em` font sizing in all browsers.
*/

code,
kbd,
samp,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  /* 1 */
  font-feature-settings: normal;
  /* 2 */
  font-variation-settings: normal;
  /* 3 */
  font-size: 1em;
  /* 4 */
}

/*
Add the correct font size in all browsers.
*/

small {
  font-size: 80%;
}

/*
Prevent `sub` and `sup` elements from affecting the line height in all browsers.
*/

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

/*
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
3. Remove gaps between table borders by default.
*/

table {
  text-indent: 0;
  /* 1 */
  border-color: inherit;
  /* 2 */
  border-collapse: collapse;
  /* 3 */
}

/*
1. Change the font styles in all browsers.
2. Remove the margin in Firefox and Safari.
3. Remove default padding in all browsers.
*/

button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  /* 1 */
  font-feature-settings: inherit;
  /* 1 */
  font-variation-settings: inherit;
  /* 1 */
  font-size: 100%;
  /* 1 */
  font-weight: inherit;
  /* 1 */
  line-height: inherit;
  /* 1 */
  letter-spacing: inherit;
  /* 1 */
  color: inherit;
  /* 1 */
  margin: 0;
  /* 2 */
  padding: 0;
  /* 3 */
}

/*
Remove the inheritance of text transform in Edge and Firefox.
*/

button,
select {
  text-transform: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Remove default button styles.
*/

button,
input:where([type='button']),
input:where([type='reset']),
input:where([type='submit']) {
  -webkit-appearance: button;
  /* 1 */
  background-color: transparent;
  /* 2 */
  background-image: none;
  /* 2 */
}

/*
Use the modern Firefox focus style for all focusable elements.
*/

:-moz-focusring {
  outline: auto;
}

/*
Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
*/

:-moz-ui-invalid {
  box-shadow: none;
}

/*
Add the correct vertical alignment in Chrome and Firefox.
*/

progress {
  vertical-align: baseline;
}

/*
Correct the cursor style of increment and decrement buttons in Safari.
*/

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
  height: auto;
}

/*
1. Correct the odd appearance in Chrome and Safari.
2. Correct the outline style in Safari.
*/

[type='search'] {
  -webkit-appearance: textfield;
  /* 1 */
  outline-offset: -2px;
  /* 2 */
}

/*
Remove the inner padding in Chrome and Safari on macOS.
*/

::-webkit-search-decoration {
  -webkit-appearance: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Change font properties to `inherit` in Safari.
*/

::-webkit-file-upload-button {
  -webkit-appearance: button;
  /* 1 */
  font: inherit;
  /* 2 */
}

/*
Add the correct display in Chrome and Safari.
*/

summary {
  display: list-item;
}

/*
Removes the default spacing and border for appropriate elements.
*/

blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
  margin: 0;
}

fieldset {
  margin: 0;
  padding: 0;
}

legend {
  padding: 0;
}

ol,
ul,
menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

/*
Reset default styling for dialogs.
*/

dialog {
  padding: 0;
}

/*
Prevent resizing textareas horizontally by default.
*/

textarea {
  resize: vertical;
}

/*
1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
2. Set the default placeholder color to the user's configured gray 400 color.
*/

input::-moz-placeholder, textarea::-moz-placeholder {
  opacity: 1;
  /* 1 */
  color: #9ca3af;
  /* 2 */
}

input::placeholder,
textarea::placeholder {
  opacity: 1;
  /* 1 */
  color: #9ca3af;
  /* 2 */
}

/*
Set the default cursor for buttons.
*/

button,
[role="button"] {
  cursor: pointer;
}

/*
Make sure disabled buttons don't get the pointer cursor.
*/

:disabled {
  cursor: default;
}

/*
1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
   This can trigger a poorly considered lint error in some tools but is included by design.
*/

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block;
  /* 1 */
  vertical-align: middle;
  /* 2 */
}

/*
Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
*/

img,
video {
  max-width: 100%;
  height: auto;
}

/* Make elements with the HTML hidden attribute stay hidden by default */

[hidden]:where(:not([hidden="until-found"])) {
  display: none;
}

html, body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  margin: 0;
}

.container {
  width: 100%;
}

@media (min-width: 640px) {
  .container {
    max-width: 640px;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 768px;
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: 1024px;
  }
}

@media (min-width: 1280px) {
  .container {
    max-width: 1280px;
  }
}

@media (min-width: 1536px) {
  .container {
    max-width: 1536px;
  }
}

.nav-link.active {
  --tw-bg-opacity: 1;
  background-color: rgb(63 18 25 / var(--tw-bg-opacity, 1));
  --tw-text-opacity: 1;
  color: rgb(236 236 239 / var(--tw-text-opacity, 1));
}

.visible {
  visibility: visible;
}

.collapse {
  visibility: collapse;
}

.static {
  position: static;
}

.fixed {
  position: fixed;
}

.absolute {
  position: absolute;
}

.relative {
  position: relative;
}

.inset-0 {
  inset: 0px;
}

.inset-y-0 {
  top: 0px;
  bottom: 0px;
}

.left-0 {
  left: 0px;
}

.right-0 {
  right: 0px;
}

.top-0 {
  top: 0px;
}

.z-30 {
  z-index: 30;
}

.z-40 {
  z-index: 40;
}

.z-50 {
  z-index: 50;
}

.mb-1\.5 {
  margin-bottom: 0.375rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-5 {
  margin-bottom: 1.25rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.mt-1 {
  margin-top: 0.25rem;
}

.mt-6 {
  margin-top: 1.5rem;
}

.block {
  display: block;
}

.flex {
  display: flex;
}

.table {
  display: table;
}

.grid {
  display: grid;
}

.hidden {
  display: none;
}

.h-14 {
  height: 3.5rem;
}

.h-9 {
  height: 2.25rem;
}

.w-64 {
  width: 16rem;
}

.w-9 {
  width: 2.25rem;
}

.w-full {
  width: 100%;
}

.-translate-x-full {
  --tw-translate-x: -100%;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}

.translate-x-0 {
  --tw-translate-x: 0px;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}

.transform {
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

.resize {
  resize: both;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-1 {
  gap: 0.25rem;
}

.gap-1\.5 {
  gap: 0.375rem;
}

.gap-3 {
  gap: 0.75rem;
}

.gap-4 {
  gap: 1rem;
}

.overflow-hidden {
  overflow: hidden;
}

.overflow-x-auto {
  overflow-x: auto;
}

.rounded-full {
  border-radius: 9999px;
}

.rounded-lg {
  border-radius: 0.5rem;
}

.rounded-md {
  border-radius: 0.375rem;
}

.rounded-xl {
  border-radius: 0.75rem;
}

.border {
  border-width: 1px;
}

.border-\[3px\] {
  border-width: 3px;
}

.border-b {
  border-bottom-width: 1px;
}

.border-r {
  border-right-width: 1px;
}

.border-t {
  border-top-width: 1px;
}

.border-border {
  --tw-border-opacity: 1;
  border-color: rgb(42 42 50 / var(--tw-border-opacity, 1));
}

.border-brand {
  --tw-border-opacity: 1;
  border-color: rgb(225 29 72 / var(--tw-border-opacity, 1));
}

.border-t-brand {
  --tw-border-opacity: 1;
  border-top-color: rgb(225 29 72 / var(--tw-border-opacity, 1));
}

.bg-bg {
  --tw-bg-opacity: 1;
  background-color: rgb(13 13 15 / var(--tw-bg-opacity, 1));
}

.bg-black\/55 {
  background-color: rgb(0 0 0 / 0.55);
}

.bg-brand {
  --tw-bg-opacity: 1;
  background-color: rgb(225 29 72 / var(--tw-bg-opacity, 1));
}

.bg-surface {
  --tw-bg-opacity: 1;
  background-color: rgb(22 22 26 / var(--tw-bg-opacity, 1));
}

.bg-surface-2 {
  --tw-bg-opacity: 1;
  background-color: rgb(30 30 36 / var(--tw-bg-opacity, 1));
}

.bg-white {
  --tw-bg-opacity: 1;
  background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
}

.p-2 {
  padding: 0.5rem;
}

.p-5 {
  padding: 1.25rem;
}

.p-6 {
  padding: 1.5rem;
}

.px-2 {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.px-3 {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.px-5 {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.py-1\.5 {
  padding-top: 0.375rem;
  padding-bottom: 0.375rem;
}

.py-12 {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.py-2\.5 {
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
}

.py-3 {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.py-3\.5 {
  padding-top: 0.875rem;
  padding-bottom: 0.875rem;
}

.py-4 {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.text-left {
  text-align: left;
}

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

.text-right {
  text-align: right;
}

.text-end {
  text-align: end;
}

.font-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.text-2xl {
  font-size: 1.5rem;
  line-height: 2rem;
}

.text-base {
  font-size: 1rem;
  line-height: 1.5rem;
}

.text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
}

.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.text-xl {
  font-size: 1.25rem;
  line-height: 1.75rem;
}

.text-xs {
  font-size: 0.75rem;
  line-height: 1rem;
}

.font-bold {
  font-weight: 700;
}

.font-medium {
  font-weight: 500;
}

.font-semibold {
  font-weight: 600;
}

.uppercase {
  text-transform: uppercase;
}

.tracking-wider {
  letter-spacing: 0.05em;
}

.text-brand {
  --tw-text-opacity: 1;
  color: rgb(225 29 72 / var(--tw-text-opacity, 1));
}

.text-foreground {
  --tw-text-opacity: 1;
  color: rgb(236 236 239 / var(--tw-text-opacity, 1));
}

.text-foreground-muted {
  --tw-text-opacity: 1;
  color: rgb(139 139 150 / var(--tw-text-opacity, 1));
}

.text-success {
  --tw-text-opacity: 1;
  color: rgb(34 197 94 / var(--tw-text-opacity, 1));
}

.text-white {
  --tw-text-opacity: 1;
  color: rgb(255 255 255 / var(--tw-text-opacity, 1));
}

.no-underline {
  text-decoration-line: none;
}

.shadow {
  --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}

.blur {
  --tw-blur: blur(8px);
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}

.filter {
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}

.transition {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.transition-transform {
  transition-property: transform;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

/* =========================================================
   Previous OpenClaw dark theme + layout (restored)
   ========================================================= */

:root {
  --bg: #0d0d0f;
  --surface: #16161a;
  --surface-2: #1e1e24;
  --surface-3: #25252c;
  --border: #2a2a32;
  --text: #ececef;
  --text-muted: #8b8b96;
  /* Aliases used by utility / toast / empty-state rules */
  --foreground: var(--text);
  --foreground-muted: var(--text-muted);
  --primary: #e11d48;
  --primary-hover: #be123c;
  --primary-muted: #3f1219;
  --success: #22c55e;
  --brand: var(--primary);
  --brand-hover: var(--primary-hover);
  --success: #22c55e;
  --radius: 12px;
}

/* Layout */

.page {
  display: flex;
  min-height: 100vh;
  position: relative;
}

.main-content {
  flex: 1;
  min-width: 0;
}

.content {
  padding: 1.5rem;
}

/* Mobile header */

.mobile-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 1050;
}

.mobile-title {
  font-weight: 600;
  color: var(--text);
}

.nav-toggle {
  background: none;
  border: none;
  color: var(--text);
  padding: 0.5rem;
  cursor: pointer;
  line-height: 1;
}

.nav-toggle:hover {
  color: var(--primary);
}

/* Sidebar */

.sidebar {
  width: 260px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  z-index: 1040;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.nav-brand {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.navbar-brand {
  color: var(--text) !important;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
}

/* Nav links */

.nav-link {
  color: var(--text-muted) !important;
  border-radius: 8px;
  padding: 0.6rem 0.9rem !important;
  margin: 2px 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.95rem;
}

.nav-link:hover {
  color: var(--text) !important;
  background: var(--surface-2);
}

.nav-link.active {
  color: var(--text) !important;
  background: var(--primary-muted);
}

/* Overlay */

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1035;
}

/* Typography */

h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.5rem;
}

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

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

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

/* Cards */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  overflow: hidden;
}

.card-body {
  padding: 1.25rem 1.5rem;
}

/* Tables */

.table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--text);
  --bs-table-border-color: var(--border);
  --bs-table-hover-bg: var(--surface-2);
  color: var(--text);
  border-color: var(--border);
  margin-bottom: 0;
}

.table thead th {
  background: var(--surface-2) !important;
  color: var(--text-muted) !important;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-color: var(--border) !important;
  font-weight: 600;
  padding: 0.85rem 1.25rem;
}

.table td,
.table th {
  background: var(--surface) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
  vertical-align: middle;
  padding: 0.95rem 1.25rem;
}

.table-hover tbody tr:hover td {
  background: var(--surface-2) !important;
}

/* Buttons */

.btn {
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.45rem 0.95rem;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  line-height: 1.25;
}

.btn-primary {
  background: var(--primary);
  border: 1px solid var(--primary);
  color: #fff;
}

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

.btn-outline-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.btn-outline-secondary:hover {
  background: var(--surface-2);
  border-color: #3a3a44;
  color: var(--text);
}

.btn-outline-danger {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
}

.btn-outline-danger:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.btn-sm {
  font-size: 0.8rem;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
}

.table-actions {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: stretch;
  min-width: 76px;
}

.table-actions .btn {
  width: 100%;
  margin: 0;
}

/* Forms */

.form-control,
.form-select {
  background: #121216 !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  border-radius: 9px;
  padding: 0.55rem 0.9rem;
}

.form-control:focus,
.form-select:focus {
  background: #121216 !important;
  border-color: var(--primary) !important;
  color: var(--text) !important;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.18) !important;
}

.form-label {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
}

/* Loading spinner */

.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  gap: 1rem;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== Responsive ===== */

@media (max-width: 991.98px) {
  .page {
    display: block;
  }

  .sidebar {
    position: fixed !important;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px !important;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    background: var(--surface) !important;
  }

  .sidebar.open {
    transform: translateX(0) !important;
  }

  .main-content {
    width: 100% !important;
    padding-top: 3.5rem;
  }

  .sidebar .nav-link,
  .sidebar .nav-link:link,
  .sidebar .nav-link:visited {
    color: var(--text-muted) !important;
    background: transparent !important;
  }

  .sidebar .nav-link:hover {
    color: var(--text) !important;
    background: var(--surface-2) !important;
  }

  .sidebar .nav-link.active {
    color: var(--text) !important;
    background: var(--primary-muted) !important;
  }
}

@media (min-width: 576px) {
  .table-actions {
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    min-width: auto;
  }

  .table-actions .btn {
    width: auto;
  }
}

@media (min-width: 992px) {
  .mobile-header {
    display: none !important;
  }

  .nav-overlay {
    display: none !important;
  }

  .content {
    padding: 2rem 2.25rem;
  }
}

.hover\:bg-brand:hover {
  --tw-bg-opacity: 1;
  background-color: rgb(225 29 72 / var(--tw-bg-opacity, 1));
}

.hover\:bg-brand-hover:hover {
  --tw-bg-opacity: 1;
  background-color: rgb(190 18 60 / var(--tw-bg-opacity, 1));
}

.hover\:bg-surface-2:hover {
  --tw-bg-opacity: 1;
  background-color: rgb(30 30 36 / var(--tw-bg-opacity, 1));
}

.hover\:text-brand:hover {
  --tw-text-opacity: 1;
  color: rgb(225 29 72 / var(--tw-text-opacity, 1));
}

.hover\:text-foreground:hover {
  --tw-text-opacity: 1;
  color: rgb(236 236 239 / var(--tw-text-opacity, 1));
}

.hover\:text-white:hover {
  --tw-text-opacity: 1;
  color: rgb(255 255 255 / var(--tw-text-opacity, 1));
}

.focus\:border-brand:focus {
  --tw-border-opacity: 1;
  border-color: rgb(225 29 72 / var(--tw-border-opacity, 1));
}

.focus\:outline-none:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.focus\:ring-2:focus {
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}

@media (min-width: 640px) {
  .sm\:col-span-2 {
    grid-column: span 2 / span 2;
  }

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

  .sm\:flex-row {
    flex-direction: row;
  }

  .sm\:justify-end {
    justify-content: flex-end;
  }

  .sm\:gap-2 {
    gap: 0.5rem;
  }
}

@media (min-width: 768px) {
  .md\:table-cell {
    display: table-cell;
  }
}

@media (min-width: 1024px) {
  .lg\:static {
    position: static;
  }

  .lg\:block {
    display: block;
  }

  .lg\:hidden {
    display: none;
  }

  .lg\:translate-x-0 {
    --tw-translate-x: 0px;
    transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
  }

  .lg\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Toast notifications — pf-* avoids Bootstrap .toast { display:none } conflict */
.pf-toast-host {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: min(24rem, calc(100vw - 2rem));
  pointer-events: none;
}
.pf-toast {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border, #333);
  background: var(--surface, #1a1a1a);
  color: var(--foreground, #f5f5f5);
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
  font-size: 0.9rem;
  pointer-events: auto;
  animation: pf-toast-in 0.2s ease-out;
}
@keyframes pf-toast-in {
  from { opacity: 0; transform: translateY(0.5rem); }
  to { opacity: 1; transform: translateY(0); }
}
.pf-toast-success { border-color: rgba(34, 197, 94, 0.65); background: #14261a; }
.pf-toast-error { border-color: rgba(239, 68, 68, 0.65); background: #2a1515; }
.pf-toast-warning { border-color: rgba(234, 179, 8, 0.55); background: #2a2410; }
.pf-toast-info { border-color: rgba(59, 130, 246, 0.5); background: #152033; }
.pf-toast-close {
  background: transparent;
  border: 0;
  color: inherit;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
}
.pf-toast-close:hover { opacity: 1; }

/* Empty states — always centered in table cells / cards */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
  text-align: center;
  color: var(--foreground-muted, #9ca3af);
  box-sizing: border-box;
}
.empty-state-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  line-height: 1;
}
.empty-state-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--foreground, #f5f5f5);
}
.empty-state-message {
  margin: 0.4rem 0 0;
  font-size: 0.9rem;
  line-height: 1.4;
  max-width: 16rem;
}

/* Table empty row: full width + center */
table td.table-empty {
  text-align: center !important;
  vertical-align: middle;
}
table td.table-empty .empty-state {
  margin-left: auto;
  margin-right: auto;
}

@keyframes pf-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
.animate-pulse { animation: pf-pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
.bg-success { background-color: rgb(34 197 94); }




/* Validation under fields (dropdowns + inputs) */
.field-error,
.validation-message,
.text-danger.validation-message {
  display: block;
  margin-top: 0.35rem;
  margin-bottom: 0.15rem;
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--primary, #e11d48);
}

.form-group .field-error,
.form-group .validation-message {
  margin-top: 0.4rem;
}

.form-group {
  margin-bottom: 1rem;
}

/* Consistent primary action buttons (page headers) */
.page-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25;
  background: var(--primary, #e11d48);
  color: #fff;
  border: 1px solid transparent;
}
.page-action-btn:hover {
  background: var(--primary-hover, #be123c);
  color: #fff;
}
.page-action-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.page-action-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25;
  background: transparent;
  color: var(--text, #f5f5f5);
  border: 1px solid var(--border, #333);
}
.page-action-btn-secondary:hover {
  background: var(--surface-2, #1a1a1a);
}


/* ── Mobile-first page toolbar ─────────────────────────── */
.page-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.page-toolbar h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text, #f5f5f5);
}
.page-toolbar-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}
.page-toolbar-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  width: 100%;
}
.page-toolbar-actions .page-action-btn,
.page-toolbar-actions .page-action-btn-secondary {
  width: 100%;
}

@media (min-width: 640px) {
  .page-toolbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }
  .page-toolbar-actions {
    flex-direction: row;
    align-items: center;
    width: auto;
    flex-wrap: wrap;
  }
  .page-toolbar-filters {
    width: auto;
    display: flex;
    flex-wrap: wrap;
  }
  .page-toolbar-actions .page-action-btn,
  .page-toolbar-actions .page-action-btn-secondary {
    width: auto;
  }
}

/* ── Custom select (hide native arrow, consistent dark UI) ─ */
.pf-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  color-scheme: dark;
  width: 100%;
  min-height: 2.25rem;
  padding: 0.5rem 2.25rem 0.5rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border, #333) !important;
  background-color: #121216 !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.75rem center !important;
  background-size: 0.75rem !important;
  color: #f5f5f5 !important;
  font-size: 0.875rem;
  line-height: 1.25;
  cursor: pointer;
}
.pf-select option {
  background-color: #121216;
  color: #f5f5f5;
}
.pf-select:focus {
  outline: none;
  border-color: var(--primary, #e11d48);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.18);
}
.pf-select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
/* IE/old edge */
.pf-select::-ms-expand {
  display: none;
}

@media (min-width: 640px) {
  .pf-select {
    width: auto;
    min-width: 7.5rem;
  }
}

/* Mobile content padding */
@media (max-width: 639px) {
  .content {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .main-content {
    padding-top: 3.5rem; /* space under fixed mobile header */
  }
}


/* form-select shares pf-select look */
select.form-select,
.form-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 0.75rem;
  padding-right: 2.25rem;
}
select.form-select::-ms-expand { display: none; }


/* ── Import page (mobile-first) ─────────────────────────── */
.import-panel {
  width: 100%;
  max-width: 36rem;
  margin: 0 auto;
  border: 1px solid var(--border, #333);
  border-radius: 0.75rem;
  background: var(--surface, #141414);
  padding: 1rem;
  box-sizing: border-box;
}
.import-fields {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.import-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}
.import-field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.import-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted, #9ca3af);
}
.pf-select-block {
  width: 100% !important;
  min-width: 0 !important;
}
.file-drop {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.75rem 1rem;
  border: 1px dashed var(--border, #444);
  border-radius: 0.5rem;
  background: var(--bg, #0a0a0a);
  cursor: pointer;
  text-align: center;
}
.file-drop-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.file-drop-text {
  font-size: 0.875rem;
  color: var(--text-muted, #9ca3af);
  pointer-events: none;
  word-break: break-word;
}
.file-drop-name {
  color: var(--text, #f5f5f5);
  font-weight: 500;
}
.import-submit {
  width: 100%;
  min-height: 2.75rem;
}
.import-result {
  border: 1px solid var(--border, #333);
  border-radius: 0.5rem;
  background: var(--bg, #0a0a0a);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  line-height: 1.45;
}
.import-errors {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  color: var(--primary, #e11d48);
  font-size: 0.8rem;
  word-break: break-word;
}

@media (min-width: 640px) {
  .import-panel {
    padding: 1.25rem 1.5rem;
  }
  .import-field-row {
    grid-template-columns: 1fr 1fr;
  }
  .import-submit {
    width: auto;
    align-self: flex-start;
    min-width: 10rem;
  }
}


/* ── Auth pages (login / register) ───────────────────────── */
.auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: var(--bg, #0a0a0a);
  box-sizing: border-box;
}

.auth-card {
  width: 100%;
  max-width: 24rem;
  margin: 0 auto;
  padding: 1.75rem 1.5rem;
  border-radius: 1rem;
  border: 1px solid var(--border, #2a2a32);
  background: var(--surface, #141418);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  box-sizing: border-box;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text, #f5f5f5);
}

.auth-card h1 {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text, #f5f5f5);
  line-height: 1.25;
}

.auth-card h1:focus {
  outline: none;
}

.auth-card .subtitle {
  margin: 0 0 1.25rem;
  font-size: 0.875rem;
  color: var(--text-muted, #9ca3af);
  line-height: 1.4;
}

.auth-card .form-group {
  margin-bottom: 1rem;
}

.auth-card .form-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted, #9ca3af);
}

.auth-card .form-control {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 2.5rem;
  padding: 0.55rem 0.85rem;
  border-radius: 0.55rem;
  border: 1px solid var(--border, #2a2a32);
  background: var(--bg, #0a0a0a) !important;
  color: var(--text, #f5f5f5) !important;
  font-size: 0.9rem;
}

.auth-card .form-control:focus {
  border-color: var(--primary, #e11d48) !important;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.18) !important;
  outline: none;
}

.auth-error {
  margin-bottom: 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(225, 29, 72, 0.35);
  background: rgba(225, 29, 72, 0.1);
  color: #fda4af;
  font-size: 0.85rem;
  line-height: 1.4;
}

.auth-card .btn-block {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  min-height: 2.5rem;
  border-radius: 0.55rem;
  font-weight: 600;
}

.auth-footer {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted, #9ca3af);
}

.auth-footer a {
  color: var(--primary, #e11d48);
  text-decoration: none;
  font-weight: 500;
}

.auth-footer a:hover {
  text-decoration: underline;
}

@media (min-width: 480px) {
  .auth-card {
    padding: 2rem 1.75rem;
  }
}


/* ── Money input ($ prefix, no spinner) ─────────────────── */
.money-input {
  display: flex;
  align-items: center;
  width: 100%;
  border: 1px solid var(--border, #2a2a32);
  border-radius: 0.55rem;
  background: var(--bg, #0a0a0a);
  overflow: hidden;
}
.money-input:focus-within {
  border-color: var(--primary, #e11d48);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.18);
}
.money-prefix {
  flex: 0 0 auto;
  padding: 0 0 0 0.85rem;
  color: var(--text-muted, #8b8b96);
  font-weight: 500;
  font-size: 0.9rem;
  user-select: none;
}
.money-field {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  border: none !important;
  background: transparent !important;
  color: var(--text, #ececef) !important;
  padding: 0.55rem 0.85rem 0.55rem 0.35rem;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  outline: none !important;
  box-shadow: none !important;
}
.money-field::placeholder {
  color: var(--text-muted, #8b8b96);
  opacity: 0.7;
}

/* Hide native number spinners everywhere */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}


/* Remember me */
.remember-row {
  margin: 0.25rem 0 1rem;
}
.remember-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted, #8b8b96);
  cursor: pointer;
  user-select: none;
}
.remember-check {
  width: 1rem;
  height: 1rem;
  accent-color: var(--primary, #e11d48);
  cursor: pointer;
}


/* Category icon / color pickers */
.icon-picker {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0.4rem;
}
@media (max-width: 480px) {
  .icon-picker { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
.icon-picker-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  border-radius: 0.5rem;
  border: 1px solid var(--border, #2a2a32);
  background: var(--bg, #0a0a0a);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.icon-picker-btn:hover {
  border-color: var(--primary, #e11d48);
  background: var(--surface-2, #1e1e24);
}
.icon-picker-btn-active {
  border-color: var(--primary, #e11d48);
  box-shadow: 0 0 0 2px rgba(225, 29, 72, 0.25);
  background: var(--surface-2, #1e1e24);
}
.color-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.color-picker-btn {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
}
.color-picker-btn-active {
  border-color: #fff;
  box-shadow: 0 0 0 2px var(--primary, #e11d48);
}


/* Banks — pending save (mobile first) */
.page-lede {
  margin: 0 0 1.25rem;
  max-width: 40rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-muted, #a3a3a3);
}
.bank-pending {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding: 1rem;
  border: 1px solid var(--border, #333);
  border-radius: 0.75rem;
  background: var(--surface, #141414);
}
.bank-pending-title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text, #f5f5f5);
}
.bank-pending-copy {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text-muted, #a3a3a3);
}
.bank-pending-btn {
  width: 100%;
}

@media (min-width: 640px) {
  .bank-pending-btn {
    width: auto;
    align-self: flex-start;
  }
}



/* Transactions list — mobile first */
.txn-cards {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}
.txn-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.1rem 1rem;
  border: 1px solid var(--border, #2a2a2a);
  border-radius: 0.75rem;
  background: var(--surface, #141414);
}
.txn-card-main {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.txn-card-copy {
  min-width: 0;
}
.txn-card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text, #f5f5f5);
  overflow-wrap: anywhere;
}
.txn-card-meta {
  margin: 0.35rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.4rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-muted, #a3a3a3);
}
.txn-dot { opacity: 0.55; }
.txn-card-amount {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
}
.txn-card-amount.is-income,
.txn-table .is-income { color: var(--success, #4ade80); }
.txn-card-amount.is-expense,
.txn-table .is-expense { color: var(--brand, #fb7185); }
.txn-card-actions {
  display: flex;
  gap: 0.5rem;
}
.txn-card-actions-inline { justify-content: flex-end; }
.txn-btn {
  flex: 1;
  min-height: 2.75rem;
  padding: 0.55rem 0.9rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border, #333);
  background: transparent;
  color: var(--text-muted, #a3a3a3);
  font-size: 0.875rem;
  font-weight: 500;
}
.txn-btn-danger {
  border-color: color-mix(in srgb, var(--brand, #e11d48) 55%, #333);
  color: var(--brand, #fb7185);
}
.txn-table-wrap { display: none; }
.txn-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}
.txn-table th {
  padding: 0.85rem 1.15rem;
  background: var(--surface-2, #1a1a1a);
  color: var(--text-muted, #a3a3a3);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.txn-table td {
  padding: 1rem 1.15rem;
  border-top: 1px solid var(--border, #2a2a2a);
  vertical-align: middle;
  color: var(--text, #f5f5f5);
}
.txn-table tbody tr:hover td { background: var(--surface-2, #1a1a1a); }
.txn-num { text-align: right; }
.txn-nowrap { white-space: nowrap; }
.txn-muted { color: var(--text-muted, #a3a3a3); }
.txn-col-category { display: none; }

@media (min-width: 480px) {
  .txn-card { padding: 1.15rem 1.2rem; }
  .txn-card-main {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
  }
  .txn-card-amount { flex-shrink: 0; }
}

@media (min-width: 768px) {
  .txn-cards { display: none; }
  .txn-table-wrap {
    display: block;
    overflow-x: auto;
    border: 1px solid var(--border, #2a2a2a);
    border-radius: 0.75rem;
    background: var(--surface, #141414);
  }
  .txn-btn { flex: 0 0 auto; min-height: 2.25rem; }
}

@media (min-width: 1024px) {
  .txn-col-category { display: table-cell; }
}


.txn-pager {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
  margin-top: 1.1rem;
}
.txn-pager-status {
  margin: 0;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted, #a3a3a3);
}
.txn-pager-count { opacity: 0.8; }
.txn-pager .txn-btn { width: 100%; }
@media (min-width: 640px) {
  .txn-pager {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .txn-pager .txn-btn { width: auto; min-width: 7.5rem; }
}
