/*!***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ../../node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[12].oneOf[2].use[1]!../../node_modules/next/dist/build/webpack/loaders/next-font-loader/index.js??ruleSet[1].rules[12].oneOf[2].use[2]!../../node_modules/next/font/google/target.css?{"path":"app/layout.tsx","import":"Inter","arguments":[{"subsets":["latin"],"variable":"--font-inter","display":"swap"}],"variableName":"inter"} ***!
  \***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/* cyrillic-ext */
@font-face {
  font-family: '__Inter_f367f3';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/_next/static/media/ba9851c3c22cd980-s.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: '__Inter_f367f3';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/_next/static/media/21350d82a1f187e9-s.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
  font-family: '__Inter_f367f3';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/_next/static/media/c5fe6dc8356a8c31-s.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
  font-family: '__Inter_f367f3';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/_next/static/media/19cfc7226ec3afaa-s.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: '__Inter_f367f3';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/_next/static/media/df0a9ae256c0569c-s.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: '__Inter_f367f3';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/_next/static/media/8e9860b6e62d6359-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: '__Inter_f367f3';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/_next/static/media/e4af272ccee01ff0-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}@font-face {font-family: '__Inter_Fallback_f367f3';src: local("Arial");ascent-override: 90.20%;descent-override: 22.48%;line-gap-override: 0.00%;size-adjust: 107.40%
}.__className_f367f3 {font-family: '__Inter_f367f3', '__Inter_Fallback_f367f3';font-style: normal
}.__variable_f367f3 {--font-inter: '__Inter_f367f3', '__Inter_Fallback_f367f3'
}

/*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ../../node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[12].oneOf[2].use[1]!../../node_modules/next/dist/build/webpack/loaders/next-font-loader/index.js??ruleSet[1].rules[12].oneOf[2].use[2]!../../node_modules/next/font/google/target.css?{"path":"app/layout.tsx","import":"JetBrains_Mono","arguments":[{"subsets":["latin"],"variable":"--font-mono","display":"swap"}],"variableName":"jetbrainsMono"} ***!
  \***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/* cyrillic-ext */
@font-face {
  font-family: '__JetBrains_Mono_3c557b';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url(/_next/static/media/886030b0b59bc5a7-s.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: '__JetBrains_Mono_3c557b';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url(/_next/static/media/0aa834ed78bf6d07-s.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
  font-family: '__JetBrains_Mono_3c557b';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url(/_next/static/media/67957d42bae0796d-s.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: '__JetBrains_Mono_3c557b';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url(/_next/static/media/f911b923c6adde36-s.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: '__JetBrains_Mono_3c557b';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url(/_next/static/media/939c4f875ee75fbb-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: '__JetBrains_Mono_3c557b';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url(/_next/static/media/bb3ef058b751a6ad-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}@font-face {font-family: '__JetBrains_Mono_Fallback_3c557b';src: local("Arial");ascent-override: 75.04%;descent-override: 22.07%;line-gap-override: 0.00%;size-adjust: 135.93%
}.__className_3c557b {font-family: '__JetBrains_Mono_3c557b', '__JetBrains_Mono_Fallback_3c557b';font-style: normal
}.__variable_3c557b {--font-mono: '__JetBrains_Mono_3c557b', '__JetBrains_Mono_Fallback_3c557b'
}

/*!*********************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ../../node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[12].oneOf[12].use[2]!../../node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[12].oneOf[12].use[3]!./app/globals.css ***!
  \*********************************************************************************************************************************************************************************************************************************************************************/
*, ::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.18 | 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;
}
.visible {
  visibility: visible;
}
.collapse {
  visibility: collapse;
}
.fixed {
  position: fixed;
}
.absolute {
  position: absolute;
}
.relative {
  position: relative;
}
.inset-0 {
  inset: 0px;
}
.z-50 {
  z-index: 50;
}
.mx-auto {
  margin-left: auto;
  margin-right: auto;
}
.mb-1 {
  margin-bottom: 0.25rem;
}
.mb-2 {
  margin-bottom: 0.5rem;
}
.mb-4 {
  margin-bottom: 1rem;
}
.mb-6 {
  margin-bottom: 1.5rem;
}
.mb-8 {
  margin-bottom: 2rem;
}
.mr-2 {
  margin-right: 0.5rem;
}
.mt-1 {
  margin-top: 0.25rem;
}
.mt-2 {
  margin-top: 0.5rem;
}
.mt-6 {
  margin-top: 1.5rem;
}
.block {
  display: block;
}
.flex {
  display: flex;
}
.inline-flex {
  display: inline-flex;
}
.table {
  display: table;
}
.grid {
  display: grid;
}
.h-10 {
  height: 2.5rem;
}
.h-12 {
  height: 3rem;
}
.h-2 {
  height: 0.5rem;
}
.h-3 {
  height: 0.75rem;
}
.h-4 {
  height: 1rem;
}
.h-64 {
  height: 16rem;
}
.h-8 {
  height: 2rem;
}
.h-full {
  height: 100%;
}
.max-h-\[80vh\] {
  max-height: 80vh;
}
.\!min-h-0 {
  min-height: 0px !important;
}
.min-h-screen {
  min-height: 100vh;
}
.w-2 {
  width: 0.5rem;
}
.w-3 {
  width: 0.75rem;
}
.w-4 {
  width: 1rem;
}
.w-8 {
  width: 2rem;
}
.w-\[700px\] {
  width: 700px;
}
.w-full {
  width: 100%;
}
.max-w-4xl {
  max-width: 56rem;
}
.max-w-md {
  max-width: 28rem;
}
.flex-1 {
  flex: 1 1 0%;
}
.border-collapse {
  border-collapse: collapse;
}
@keyframes pulse {

  50% {
    opacity: .5;
  }
}
.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes spin {

  to {
    transform: rotate(360deg);
  }
}
.animate-spin {
  animation: spin 1s linear infinite;
}
.cursor-not-allowed {
  cursor: not-allowed;
}
.cursor-pointer {
  cursor: pointer;
}
.resize-none {
  resize: none;
}
.resize {
  resize: both;
}
.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.flex-col {
  flex-direction: column;
}
.items-center {
  align-items: center;
}
.justify-end {
  justify-content: flex-end;
}
.justify-center {
  justify-content: center;
}
.justify-between {
  justify-content: space-between;
}
.gap-1 {
  gap: 0.25rem;
}
.gap-2 {
  gap: 0.5rem;
}
.gap-3 {
  gap: 0.75rem;
}
.gap-4 {
  gap: 1rem;
}
.space-x-2 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-x-reverse: 0;
  margin-right: calc(0.5rem * var(--tw-space-x-reverse));
  margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));
}
.space-y-1 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-y-reverse: 0;
  margin-top: calc(0.25rem * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(0.25rem * var(--tw-space-y-reverse));
}
.space-y-2 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-y-reverse: 0;
  margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(0.5rem * var(--tw-space-y-reverse));
}
.space-y-3 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-y-reverse: 0;
  margin-top: calc(0.75rem * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(0.75rem * var(--tw-space-y-reverse));
}
.space-y-6 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-y-reverse: 0;
  margin-top: calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(1.5rem * var(--tw-space-y-reverse));
}
.divide-y > :not([hidden]) ~ :not([hidden]) {
  --tw-divide-y-reverse: 0;
  border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse)));
  border-bottom-width: calc(1px * var(--tw-divide-y-reverse));
}
.divide-\[\#333\] > :not([hidden]) ~ :not([hidden]) {
  --tw-divide-opacity: 1;
  border-color: rgb(51 51 51 / var(--tw-divide-opacity, 1));
}
.overflow-auto {
  overflow: auto;
}
.overflow-hidden {
  overflow: hidden;
}
.overflow-x-auto {
  overflow-x: auto;
}
.overflow-y-auto {
  overflow-y: auto;
}
.rounded {
  border-radius: 0.25rem;
}
.rounded-full {
  border-radius: 9999px;
}
.rounded-lg {
  border-radius: 0.5rem;
}
.rounded-md {
  border-radius: 0.375rem;
}
.border {
  border-width: 1px;
}
.border-2 {
  border-width: 2px;
}
.border-b {
  border-bottom-width: 1px;
}
.border-t {
  border-top-width: 1px;
}
.border-\[\#333\] {
  --tw-border-opacity: 1;
  border-color: rgb(51 51 51 / var(--tw-border-opacity, 1));
}
.border-blue-500 {
  --tw-border-opacity: 1;
  border-color: rgb(59 130 246 / var(--tw-border-opacity, 1));
}
.border-blue-600 {
  --tw-border-opacity: 1;
  border-color: rgb(37 99 235 / var(--tw-border-opacity, 1));
}
.border-gray-300 {
  --tw-border-opacity: 1;
  border-color: rgb(209 213 219 / var(--tw-border-opacity, 1));
}
.border-gray-600 {
  --tw-border-opacity: 1;
  border-color: rgb(75 85 99 / var(--tw-border-opacity, 1));
}
.border-gray-700 {
  --tw-border-opacity: 1;
  border-color: rgb(55 65 81 / var(--tw-border-opacity, 1));
}
.border-gray-800 {
  --tw-border-opacity: 1;
  border-color: rgb(31 41 55 / var(--tw-border-opacity, 1));
}
.border-green-600 {
  --tw-border-opacity: 1;
  border-color: rgb(22 163 74 / var(--tw-border-opacity, 1));
}
.border-red-500 {
  --tw-border-opacity: 1;
  border-color: rgb(239 68 68 / var(--tw-border-opacity, 1));
}
.border-red-500\/20 {
  border-color: rgb(239 68 68 / 0.2);
}
.border-red-600 {
  --tw-border-opacity: 1;
  border-color: rgb(220 38 38 / var(--tw-border-opacity, 1));
}
.border-yellow-600 {
  --tw-border-opacity: 1;
  border-color: rgb(202 138 4 / var(--tw-border-opacity, 1));
}
.border-t-white {
  --tw-border-opacity: 1;
  border-top-color: rgb(255 255 255 / var(--tw-border-opacity, 1));
}
.bg-\[\#0a0a0a\] {
  --tw-bg-opacity: 1;
  background-color: rgb(10 10 10 / var(--tw-bg-opacity, 1));
}
.bg-\[\#111\] {
  --tw-bg-opacity: 1;
  background-color: rgb(17 17 17 / var(--tw-bg-opacity, 1));
}
.bg-\[\#1a1a1a\] {
  --tw-bg-opacity: 1;
  background-color: rgb(26 26 26 / var(--tw-bg-opacity, 1));
}
.bg-\[\#1e1e1e\] {
  --tw-bg-opacity: 1;
  background-color: rgb(30 30 30 / var(--tw-bg-opacity, 1));
}
.bg-\[\#252525\] {
  --tw-bg-opacity: 1;
  background-color: rgb(37 37 37 / var(--tw-bg-opacity, 1));
}
.bg-\[\#2a2a2a\] {
  --tw-bg-opacity: 1;
  background-color: rgb(42 42 42 / var(--tw-bg-opacity, 1));
}
.bg-\[\#333\] {
  --tw-bg-opacity: 1;
  background-color: rgb(51 51 51 / var(--tw-bg-opacity, 1));
}
.bg-black {
  --tw-bg-opacity: 1;
  background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1));
}
.bg-black\/70 {
  background-color: rgb(0 0 0 / 0.7);
}
.bg-blue-500 {
  --tw-bg-opacity: 1;
  background-color: rgb(59 130 246 / var(--tw-bg-opacity, 1));
}
.bg-blue-600 {
  --tw-bg-opacity: 1;
  background-color: rgb(37 99 235 / var(--tw-bg-opacity, 1));
}
.bg-blue-900 {
  --tw-bg-opacity: 1;
  background-color: rgb(30 58 138 / var(--tw-bg-opacity, 1));
}
.bg-gray-500 {
  --tw-bg-opacity: 1;
  background-color: rgb(107 114 128 / var(--tw-bg-opacity, 1));
}
.bg-gray-600 {
  --tw-bg-opacity: 1;
  background-color: rgb(75 85 99 / var(--tw-bg-opacity, 1));
}
.bg-gray-700 {
  --tw-bg-opacity: 1;
  background-color: rgb(55 65 81 / var(--tw-bg-opacity, 1));
}
.bg-gray-800 {
  --tw-bg-opacity: 1;
  background-color: rgb(31 41 55 / var(--tw-bg-opacity, 1));
}
.bg-gray-900 {
  --tw-bg-opacity: 1;
  background-color: rgb(17 24 39 / var(--tw-bg-opacity, 1));
}
.bg-green-500 {
  --tw-bg-opacity: 1;
  background-color: rgb(34 197 94 / var(--tw-bg-opacity, 1));
}
.bg-green-600 {
  --tw-bg-opacity: 1;
  background-color: rgb(22 163 74 / var(--tw-bg-opacity, 1));
}
.bg-green-900 {
  --tw-bg-opacity: 1;
  background-color: rgb(20 83 45 / var(--tw-bg-opacity, 1));
}
.bg-indigo-600 {
  --tw-bg-opacity: 1;
  background-color: rgb(79 70 229 / var(--tw-bg-opacity, 1));
}
.bg-purple-600 {
  --tw-bg-opacity: 1;
  background-color: rgb(147 51 234 / var(--tw-bg-opacity, 1));
}
.bg-red-500 {
  --tw-bg-opacity: 1;
  background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1));
}
.bg-red-500\/10 {
  background-color: rgb(239 68 68 / 0.1);
}
.bg-red-900 {
  --tw-bg-opacity: 1;
  background-color: rgb(127 29 29 / var(--tw-bg-opacity, 1));
}
.bg-transparent {
  background-color: transparent;
}
.bg-yellow-500 {
  --tw-bg-opacity: 1;
  background-color: rgb(234 179 8 / var(--tw-bg-opacity, 1));
}
.bg-yellow-600 {
  --tw-bg-opacity: 1;
  background-color: rgb(202 138 4 / var(--tw-bg-opacity, 1));
}
.bg-yellow-900 {
  --tw-bg-opacity: 1;
  background-color: rgb(113 63 18 / var(--tw-bg-opacity, 1));
}
.bg-opacity-20 {
  --tw-bg-opacity: 0.2;
}
.bg-opacity-50 {
  --tw-bg-opacity: 0.5;
}
.p-2 {
  padding: 0.5rem;
}
.p-3 {
  padding: 0.75rem;
}
.p-4 {
  padding: 1rem;
}
.p-6 {
  padding: 1.5rem;
}
.p-8 {
  padding: 2rem;
}
.\!py-2 {
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}
.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-6 {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}
.px-8 {
  padding-left: 2rem;
  padding-right: 2rem;
}
.py-1 {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}
.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}
.py-3 {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.py-4 {
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.py-8 {
  padding-top: 2rem;
  padding-bottom: 2rem;
}
.pt-6 {
  padding-top: 1.5rem;
}
.text-left {
  text-align: left;
}
.text-center {
  text-align: center;
}
.text-right {
  text-align: right;
}
.text-2xl {
  font-size: 1.5rem;
  line-height: 2rem;
}
.text-3xl {
  font-size: 1.875rem;
  line-height: 2.25rem;
}
.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;
}
.leading-relaxed {
  line-height: 1.625;
}
.tracking-wider {
  letter-spacing: 0.05em;
}
.text-blue-200 {
  --tw-text-opacity: 1;
  color: rgb(191 219 254 / var(--tw-text-opacity, 1));
}
.text-blue-300 {
  --tw-text-opacity: 1;
  color: rgb(147 197 253 / var(--tw-text-opacity, 1));
}
.text-blue-400 {
  --tw-text-opacity: 1;
  color: rgb(96 165 250 / var(--tw-text-opacity, 1));
}
.text-gray-200 {
  --tw-text-opacity: 1;
  color: rgb(229 231 235 / var(--tw-text-opacity, 1));
}
.text-gray-300 {
  --tw-text-opacity: 1;
  color: rgb(209 213 219 / var(--tw-text-opacity, 1));
}
.text-gray-400 {
  --tw-text-opacity: 1;
  color: rgb(156 163 175 / var(--tw-text-opacity, 1));
}
.text-gray-500 {
  --tw-text-opacity: 1;
  color: rgb(107 114 128 / var(--tw-text-opacity, 1));
}
.text-green-200 {
  --tw-text-opacity: 1;
  color: rgb(187 247 208 / var(--tw-text-opacity, 1));
}
.text-green-300 {
  --tw-text-opacity: 1;
  color: rgb(134 239 172 / var(--tw-text-opacity, 1));
}
.text-green-400 {
  --tw-text-opacity: 1;
  color: rgb(74 222 128 / var(--tw-text-opacity, 1));
}
.text-green-500 {
  --tw-text-opacity: 1;
  color: rgb(34 197 94 / var(--tw-text-opacity, 1));
}
.text-purple-400 {
  --tw-text-opacity: 1;
  color: rgb(192 132 252 / var(--tw-text-opacity, 1));
}
.text-red-200 {
  --tw-text-opacity: 1;
  color: rgb(254 202 202 / var(--tw-text-opacity, 1));
}
.text-red-300 {
  --tw-text-opacity: 1;
  color: rgb(252 165 165 / var(--tw-text-opacity, 1));
}
.text-red-400 {
  --tw-text-opacity: 1;
  color: rgb(248 113 113 / var(--tw-text-opacity, 1));
}
.text-red-500 {
  --tw-text-opacity: 1;
  color: rgb(239 68 68 / var(--tw-text-opacity, 1));
}
.text-white {
  --tw-text-opacity: 1;
  color: rgb(255 255 255 / var(--tw-text-opacity, 1));
}
.text-yellow-500 {
  --tw-text-opacity: 1;
  color: rgb(234 179 8 / var(--tw-text-opacity, 1));
}
.underline {
  text-decoration-line: underline;
}
.shadow-2xl {
  --tw-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  --tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}
.outline {
  outline-style: solid;
}
.ring-1 {
  --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(1px + 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);
}
.ring-blue-500 {
  --tw-ring-opacity: 1;
  --tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity, 1));
}
.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);
}
.backdrop-blur-sm {
  --tw-backdrop-blur: blur(4px);
  backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
}
.transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.transition-colors {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.duration-200 {
  transition-duration: 200ms;
}

/* Institutional Trading Terminal Styles - Premium Professional Design */
:root {
  /* Base Colors - Enhanced with subtle warmth */
  --terminal-bg: #0a0a0a;
  --terminal-surface: #1a1a1a;
  --terminal-surface-elevated: #1f1f1f;
  --terminal-border: #2a2a2a;
  --terminal-border-light: #353535;
  --terminal-accent: #333333;

  /* Text Colors - Improved hierarchy */
  --text-primary: #ffffff;
  --text-secondary: #d4d4d4;
  --text-muted: #999999;
  --text-dim: #666666;

  /* Accent Colors - Enhanced with gradients */
  --green: #00ff88;
  --green-dark: #00cc6a;
  --green-glow: rgba(0, 255, 136, 0.3);
  --red: #ff4466;
  --red-dark: #cc3355;
  --red-glow: rgba(255, 68, 102, 0.3);
  --yellow: #ffaa00;
  --blue: #4488ff;
  --blue-glow: rgba(68, 136, 255, 0.3);

  /* Shadows - Multi-layer for depth */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
  --shadow-glow-green: 0 0 20px rgba(0, 255, 136, 0.15), 0 0 40px rgba(0, 255, 136, 0.08);
  --shadow-glow-red: 0 0 20px rgba(255, 68, 102, 0.15), 0 0 40px rgba(255, 68, 102, 0.08);

  /* Glassmorphism */
  --glass-bg: rgba(26, 26, 26, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-highlight: rgba(255, 255, 255, 0.03);

  /* Layout */
  --sidebar-width: 320px;
  --upper-bar-height: 60px;
  --lower-bar-height: 32px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-inter), -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--terminal-bg);
  color: var(--text-primary);
  line-height: 1.4;
  overflow: hidden;
  font-size: 13px;
  /* Professional financial terminal density */
  letter-spacing: -0.01em;
  font-feature-settings: "tnum" 1, "cv11" 1;
  /* Tabular numbers, clean variants */
  -webkit-font-smoothing: antialiased;
}

.font-mono,
.metric-value,
.order-book-price,
.order-book-size,
.widget-table td,
.allocation-value {
  font-family: var(--font-mono), monospace;
}

/* Main Terminal Layout */
.institutional-terminal {
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--terminal-bg);
  /* Reserve space at the bottom for the fixed lower ticker bar */
  padding-bottom: var(--lower-bar-height);
}

/* Upper Horizontal Bar */
.upper-bar {
  height: var(--upper-bar-height);
  background: var(--terminal-surface);
  /* Make draggable in Electron */
  -webkit-app-region: drag;
  border-bottom: 1px solid var(--terminal-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  font-size: 11px;
  font-weight: 500;
  z-index: 20;
}

.upper-bar-left {
  display: flex;
  align-items: center;
  gap: 30px;
}

/* Main Navigation */
.main-navigation {
  display: flex;
  gap: 8px;
}

.nav-item {
  padding: 8px 16px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
  border-radius: 6px;
  position: relative;
  /* Prevent dragging on buttons in Electron */
  -webkit-app-region: no-drag;
}

.nav-item::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--glass-highlight), transparent);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.nav-item:hover {
  color: var(--text-primary);
  background: var(--terminal-accent);
  transform: translateY(-1px);
}

.nav-item:hover::before {
  opacity: 1;
}

.nav-item.active {
  color: var(--text-primary);
  background: var(--terminal-accent);
  box-shadow: inset 0 -2px 0 0 var(--blue), var(--shadow-sm);
}

/* WebSocket Status Indicator */
.ws-status-indicator {
  position: fixed;
  top: 70px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  font-size: 11px;
  z-index: 1000;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
}

.ws-status-indicator:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.ws-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
  position: relative;
}

.ws-dot::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: inherit;
  opacity: 0.3;
  filter: blur(4px);
}

.ws-connected .ws-dot {
  background: var(--green);
  box-shadow: 0 0 12px var(--green-glow), 0 0 24px var(--green-glow);
}

.ws-connecting .ws-dot {
  background: var(--yellow);
  box-shadow: 0 0 12px rgba(255, 170, 0, 0.4), 0 0 24px rgba(255, 170, 0, 0.2);
}

.ws-text {
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

/* Invarianz Logo in Upper Bar */
.invarianz-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  -webkit-app-region: no-drag;
}

.invarianz-text {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-family: 'Space Grotesk', 'Unica One', 'Avenir Next', 'IBM Plex Mono', sans-serif;
}

.asset-selector {
  display: flex;
  align-items: center;
  gap: 8px;
}

.asset-name {
  color: var(--text-primary);
  font-weight: 600;
}

.current-price-label {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 14px;
  margin-left: 4px;
}

.timeframe-selector {
  display: flex;
  align-items: center;
  gap: 8px;
}

.timeframe-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
  border-radius: 3px;
}

.timeframe-btn.active,
.timeframe-btn:hover {
  background: var(--terminal-accent);
  color: var(--text-primary);
}

.upper-bar-center {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

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

.price-info .label {
  color: var(--text-muted);
  font-size: 10px;
  margin-bottom: 2px;
}

.price-display {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.current-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  /* Smooth transitions for price updates */
  transition: color 0.3s ease, transform 0.2s ease;
  display: inline-block;
}

/* Flash effect when price updates */
@keyframes priceFlash {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.02);
    opacity: 0.8;
  }
}

/* Optional: Add this class via JavaScript when price changes */
.current-price.updating {
  animation: priceFlash 0.3s ease;
}

.price-range {
  font-size: 11px;
  color: var(--text-muted);
}

.upper-bar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.trading-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sell-btn,
.buy-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.sell-btn::before,
.buy-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), transparent);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.sell-btn:hover::before,
.buy-btn:hover::before {
  opacity: 1;
}

.sell-btn {
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: white;
  box-shadow: 0 2px 8px var(--red-glow), var(--shadow-sm);
}

.sell-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--red-glow), var(--shadow-md);
}

.sell-btn:active {
  transform: translateY(0);
}

.buy-btn {
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: #000;
  box-shadow: 0 2px 8px var(--green-glow), var(--shadow-sm);
}

.buy-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--green-glow), var(--shadow-md);
}

.buy-btn:active {
  transform: translateY(0);
}

.spread-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.spread-label {
  font-size: 9px;
  color: var(--text-muted);
}

.spread-value {
  font-size: 11px;
  color: var(--text-secondary);
}

.current-price-large {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.amount-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.amount-label {
  font-size: 9px;
  color: var(--text-muted);
}

.amount-value {
  font-size: 11px;
  color: var(--text-secondary);
}

/* Main Layout */
.main-layout {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.holdings-layout {
  background: var(--terminal-surface);
}

/* Center Content Wrapper - Contains trading content and loading overlay */
.center-content-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  overflow: hidden;
}

/* Market Sidebar */
/* Market Sidebar */
.market-sidebar {
  width: var(--sidebar-width);
  background: var(--terminal-surface);
  border-right: 1px solid var(--terminal-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  min-width: 200px;
  height: 100%;
}

.resize-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  right: -2px;
  width: 8px;
  cursor: col-resize;
  z-index: 10;
  transition: background 0.2s;
}

.resize-handle:hover,
.resize-handle:active {
  background: rgba(68, 136, 255, 0.5);
}

/* Sidebar container wrapper to keep toggle button visible */
.sidebar-container {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.sidebar-toggle-button {
  position: absolute;
  top: 8px;
  right: -4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--terminal-surface);
  border: 1px solid var(--terminal-border);
  color: var(--text-secondary);
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  z-index: 11;
  box-shadow: var(--shadow-sm);
}

.sidebar-toggle-button:hover {
  background: var(--terminal-accent);
  border-color: var(--blue);
  color: var(--text-primary);
  box-shadow: 0 0 8px var(--blue-glow), var(--shadow-md);
  transform: scale(1.1);
}

.sidebar-toggle-button:active {
  transform: scale(0.95);
}

/* When collapsed, position the button at the left edge */
.sidebar-container:has(.holdings-sidebar.collapsed) .sidebar-toggle-button {
  right: auto;
  left: 0;
}

.holdings-sidebar .table-headers {
  border-top: 1px solid var(--terminal-border);
}

.holdings-headers {
  background: var(--terminal-bg);
}

.holdings-list {
  flex: 1;
  overflow-y: auto;
}

.holdings-row .index-meta {
  font-size: 10px;
  color: var(--text-muted);
}

.holdings-state {
  padding: 24px 12px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.holdings-state.error {
  color: var(--accent-warning);
}

.holdings-state .spinner.small {
  width: 16px;
  height: 16px;
  border-width: 2px;
}

.settings-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: linear-gradient(135deg, var(--terminal-surface), var(--terminal-surface-elevated));
  border: 1px solid var(--terminal-border-light);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.settings-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  padding: 1px;
  background: linear-gradient(135deg, var(--glass-border), transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.settings-section {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(0, 0, 0, 0.2);
  transition: all var(--transition-base);
}

.settings-section:hover {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.3);
}

.settings-section h3 {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-weight: 600;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.settings-input {
  background: var(--terminal-bg);
  border: 1px solid var(--terminal-border);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--text-primary);
  min-width: 100px;
  font-size: 13px;
  transition: all var(--transition-base);
}

.settings-input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-glow);
}

.settings-input:hover {
  border-color: var(--terminal-border-light);
}

.settings-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  cursor: pointer;
  transition: color var(--transition-base);
}

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

.holdings-content-wrapper {
  flex: 1;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  background: var(--terminal-bg);
  border-left: 1px solid var(--terminal-border);
  position: relative;
  padding: 24px;
  min-height: 0;
}

.holdings-empty-state {
  text-align: center;
  background: var(--terminal-surface);
  border: 1px dashed var(--terminal-border);
  border-radius: 12px;
  padding: 48px 32px;
  width: 100%;
  max-width: 640px;
  margin: auto;
  box-shadow: var(--card-shadow);
}

.holdings-empty-state h2 {
  margin-bottom: 12px;
  font-size: 20px;
  color: var(--text-primary);
}

.holdings-empty-state p {
  margin: 4px 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.positions-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
}

.positions-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: var(--terminal-surface);
  border: 1px solid var(--terminal-border);
  border-radius: 12px;
  padding: 20px 24px;
  box-shadow: var(--card-shadow);
  gap: 24px;
  flex-wrap: wrap;
  width: 100%;
  box-sizing: border-box;
}

.positions-header h2 {
  margin: 0;
  font-size: 22px;
  color: var(--text-primary);
}

.positions-header p {
  margin: 4px 0 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.positions-summary {
  flex: 1 1 300px;
  min-width: 260px;
}

.positions-date-picker {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  min-width: 200px;
  flex: 0 0 auto;
}

.positions-date-picker label {
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.positions-date-field {
  position: relative;
  width: 220px;
}

.positions-date-field .react-datepicker-wrapper,
.positions-date-field .react-datepicker__input-container {
  width: 100%;
}

.positions-date-input {
  width: 100%;
  background: #1b1c20;
  border: 1px solid #35363b;
  border-radius: 10px;
  padding: 10px 36px 10px 12px;
  color: var(--text-primary);
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.positions-date-input:focus {
  outline: none;
  border-color: var(--accent-green);
  box-shadow: 0 0 0 2px rgba(0, 255, 136, 0.25);
}

.positions-date-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 14px;
  color: var(--text-secondary);
}

.positions-datepicker-popper {
  z-index: 5000 !important;
}

.positions-datepicker {
  background: #111216 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.65) !important;
  color: rgba(255, 255, 255, 0.93) !important;
  font-size: 12px;
  border-radius: 12px;
  overflow: hidden;
  padding: 8px;
}

.positions-datepicker:after,
.positions-datepicker:before {
  display: none;
}

.positions-datepicker .react-datepicker__header {
  background: #1b1c21 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.positions-datepicker .react-datepicker__current-month {
  color: rgba(255, 255, 255, 0.96) !important;
  font-weight: 600;
}

.positions-datepicker .react-datepicker__day-name,
.positions-datepicker .react-datepicker__day {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 500;
}

.positions-datepicker .react-datepicker__day--outside-month {
  color: rgba(255, 255, 255, 0.4) !important;
}

.positions-datepicker-day {
  background: transparent !important;
  border-radius: 6px;
  color: inherit !important;
  transition: background 0.15s, color 0.15s;
}

.positions-datepicker-day.is-available:hover {
  background: rgba(0, 255, 136, 0.2);
}

.positions-datepicker .react-datepicker__day--selected,
.positions-datepicker .react-datepicker__day--keyboard-selected,
.positions-datepicker-day.is-available.react-datepicker__day--selected {
  background: linear-gradient(135deg, #39ffb2, #17d88a) !important;
  color: #05120d !important;
  font-weight: 600;
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.45);
}

.positions-datepicker-day.is-disabled {
  color: rgba(255, 255, 255, 0.25) !important;
  opacity: 0.35;
}

.positions-datepicker .react-datepicker__day--outside-month.is-disabled {
  opacity: 0.2;
}

.positions-table-wrapper {
  flex: 1;
  background: var(--terminal-surface);
  border: 1px solid var(--terminal-border-light);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.positions-table-scroll {
  flex: 1;
  overflow: auto;
  min-height: 0;
  scroll-behavior: smooth;
}

.positions-table-scroll::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.positions-table-scroll::-webkit-scrollbar-track {
  background: var(--terminal-bg);
}

.positions-table-scroll::-webkit-scrollbar-thumb {
  background: var(--terminal-accent);
  border-radius: 4px;
}

.positions-table-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--terminal-border-light);
}

.positions-table {
  width: auto;
  border-collapse: collapse;
  font-size: 12px;
  table-layout: auto;
}

.positions-table thead {
  background: var(--terminal-bg);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.positions-table th,
.positions-table td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--terminal-border);
  text-align: left;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  line-height: 1.3;
  white-space: nowrap;
}

.positions-table th {
  position: sticky;
  top: 0;
  background: var(--terminal-bg);
  z-index: 2;
  box-shadow: 0 1px 0 0 var(--terminal-border);
  color: var(--text-muted);
  padding: 8px 10px;
  font-weight: 700;
}

.positions-table tbody tr {
  transition: all var(--transition-fast);
  height: 32px;
}

.positions-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.01);
}

.positions-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
  transform: scale(1.001);
}

.positions-table tbody tr:hover td {
  color: var(--text-primary);
}

.positions-table tbody tr:last-child td {
  border-bottom: none;
}

.positions-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
  color: var(--text-secondary);
  gap: 12px;
  background: var(--terminal-surface);
  border: 1px dashed var(--terminal-border);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
}

.positions-state.error {
  color: var(--accent-warning);
}

.positions-state.empty {
  font-style: italic;
}

/* React Grid Layout Styles */
.react-grid-layout {
  position: relative;
  transition: height 100ms ease;
}

.react-grid-item {
  transition: all 100ms ease;
  transition-property: left, top;
}

.react-grid-item.cssTransforms {
  transition-property: transform;
}

.react-grid-item.resizing {
  z-index: 100;
  box-shadow: var(--shadow-lg);
}

.react-grid-item.react-grid-placeholder {
  background: rgba(255, 255, 255, 0.05) !important;
  border-radius: 8px;
  opacity: 0.5;
  z-index: 2;
}

.react-resizable-handle {
  position: absolute;
  width: 20px;
  height: 20px;
  bottom: 0;
  right: 0;
  cursor: se-resize;
  z-index: 10;
}

.react-resizable-handle::after {
  content: "";
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
}

/* Backtester Dashboard Styles */
.backtester-page {
  padding: 24px;
  height: 100%;
  overflow-y: auto;
  background: var(--terminal-bg);
}

.backtester-container {
  max-width: 1600px;
  margin: 0 auto;
}




.dashboard-widget {
  background: var(--terminal-surface);
  border: 1px solid var(--terminal-border);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* Clip children to radius */
  height: 100%;
  box-shadow: var(--shadow-md);
  gap: 0;
  /* No gap, unified window */
}

.widget-header {
  padding: 6px 8px;
  background: #111111;
  /* Very dark header */
  border-bottom: 1px solid var(--terminal-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: grab;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  height: 32px;
  flex-shrink: 0;
}

.widget-header:active {
  cursor: grabbing;
}

.widget-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.widget-badge {
  background: var(--blue);
  color: white;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.widget-title {
  font-size: 11px;
  font-weight: 600;
  color: #e0e0e0;
  letter-spacing: 0.02em;
}

.widget-header-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.widget-control-btn {
  background: transparent;
  border: none;
  color: #ffffff !important;
  /* Force white for maximum visibility */
  cursor: pointer;
  padding: 4px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  width: 24px;
  height: 24px;
  opacity: 0.8;
  /* Slight transparency by default */
  z-index: 10;
  /* Ensure it's on top */
}

.widget-control-btn:hover {
  color: #ffffff !important;
  opacity: 1;
  background: rgba(255, 255, 255, 0.15);
}

.widget-control-btn.close:hover {
  color: var(--red);
  background: rgba(255, 59, 48, 0.1);
}

.widget-content {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  min-height: 0;
  background: var(--terminal-surface);
  /* No border/radius/shadow for content, it's inside the widget */
}

/* Widget Specific Styles */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}

.metric-card {
  background: var(--terminal-bg);
  padding: 12px;
  border-radius: 6px;
  border: 1px solid var(--terminal-border);
}

.metric-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
}

.metric-value {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.metric-sub {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
}

.parameter-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.parameter-list li {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--terminal-border);
  font-size: 13px;
}

.parameter-list li:last-child {
  border-bottom: none;
}

.parameter-key {
  color: var(--text-secondary);
}

.parameter-value {
  color: var(--text-primary);
  font-weight: 500;
}

.widget-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.widget-table th,
.widget-table td {
  padding: 8px;
  text-align: left;
  border-bottom: 1px solid var(--terminal-border);
}

.widget-table th {
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 10px;
}

.widget-table td {
  color: var(--text-secondary);
}

.positive {
  color: var(--green);
}

.negative {
  color: var(--red);
}

.allocation-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.allocation-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}

.allocation-label {
  width: 80px;
  color: var(--text-secondary);
}

.allocation-bar {
  flex: 1;
  height: 6px;
  background: var(--terminal-bg);
  border-radius: 3px;
  overflow: hidden;
}

.allocation-fill {
  height: 100%;
  background: var(--blue);
  border-radius: 3px;
}

.allocation-fill.secondary {
  background: var(--green);
}

.allocation-fill.tertiary {
  background: var(--yellow);
}

.allocation-fill.muted {
  background: var(--text-muted);
}

.allocation-value {
  width: 40px;
  text-align: right;
  color: var(--text-primary);
  font-weight: 500;
}

.notes-list {
  padding-left: 20px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

.notes-list li {
  margin-bottom: 8px;
}

.sidebar-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--terminal-border);
}

.sidebar-header.tabs {
  display: flex;
  gap: 8px;
  padding: 8px 16px;
}

.sidebar-tab {
  flex: 1;
  padding: 8px 0;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.sidebar-tab.active {
  color: var(--text-primary);
  border-bottom-color: var(--accent-green);
}

.sidebar-tabs {
  display: flex;
  gap: 20px;
}

.markets-label,
.history-label {
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.markets-label {
  color: var(--text-primary);
}

.history-label {
  color: var(--text-muted);
}

.search-container {
  padding: 12px 16px;
  border-bottom: 1px solid var(--terminal-border);
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.search-input {
  width: 100%;
  background: var(--terminal-bg);
  border: 1px solid var(--terminal-border);
  border-radius: 4px;
  padding: 6px 8px 6px 28px;
  font-size: 11px;
  color: var(--text-primary);
  outline: none;
}

.search-input::-moz-placeholder {
  color: var(--text-muted);
  font-size: 10px;
}

.search-input::placeholder {
  color: var(--text-muted);
  font-size: 10px;
}

.filter-tabs {
  display: flex;
  padding: 8px 16px;
  gap: 8px;
  border-bottom: 1px solid var(--terminal-border);
  flex-wrap: wrap;
}

.filter-tab {
  background: none;
  border: 1px solid var(--terminal-border);
  color: var(--text-secondary);
  padding: 4px 8px;
  font-size: 10px;
  border-radius: 3px;
  cursor: pointer;
  min-width: 32px;
  text-align: center;
}

.filter-tab.active,
.filter-tab:hover {
  background: var(--terminal-accent);
  color: var(--text-primary);
  border-color: var(--terminal-accent);
}

.table-headers {
  padding: 8px 16px;
  border-bottom: 1px solid var(--terminal-border);
}

.header-row,
.subheader-row {
  display: grid;
  grid-template-columns: 12px 1fr 60px 50px 50px;
  gap: 8px;
  font-size: 9px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

.subheader-row {
  margin-top: 4px;
  grid-template-columns: 1fr auto auto auto auto;
}

.market-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 16px;
}

.market-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) 60px 50px 50px;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  align-items: center;
  font-size: 11px;
  position: relative;
  padding-right: 40px;
}

.market-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.market-row.selected {
  background: rgba(68, 136, 255, 0.1);
  border-left: 2px solid var(--blue);
  margin-left: -2px;
}

.star-icon {
  font-size: 10px;
  color: var(--text-muted);
  opacity: 0.5;
}

.market-info {
  display: flex;
  flex-direction: column;
}

.row-actions {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
}

.settings-button {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.settings-button:hover {
  color: var(--text-primary);
  border-color: var(--terminal-border);
}

.market-pair {
  display: flex;
  gap: 2px;
}

.base-symbol {
  font-weight: 600;
  color: var(--text-primary);
}

.quote-symbol {
  color: var(--text-muted);
}

.price-col .price {
  font-family: 'SF Mono', monospace;
  font-weight: 500;
  color: var(--text-primary);
}

.change-col {
  font-family: 'SF Mono', monospace;
  font-weight: 500;
}

.change-col.positive {
  color: var(--green);
}

.change-col.negative {
  color: var(--red);
}

.change-col.neutral {
  color: var(--text-muted);
}

.volume-col .volume {
  font-family: 'SF Mono', monospace;
  font-size: 10px;
  color: var(--text-secondary);
}

/* Trading Main Content */
.trading-main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--terminal-bg);
}

/* Asset Info Bar - Above Chart */
.asset-info-bar {
  height: 50px;
  background: var(--terminal-surface);
  border-bottom: 1px solid var(--terminal-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  font-size: 11px;
  font-weight: 500;
  gap: 20px;
}

.asset-info-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.asset-info-center {
  display: flex;
  align-items: center;
  gap: 20px;
}

.asset-info-right {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

/* Chart and Ladder Container - Horizontal Layout */
.chart-and-ladder-container {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* Chart Column - Contains chart and order book stacked */
.chart-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Order Book Component */
.order-book {
  height: 300px;
  background: var(--terminal-surface);
  border-top: 1px solid var(--terminal-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.order-book-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--terminal-border);
}

.order-book-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.order-book-spread {
  display: flex;
  gap: 8px;
  font-size: 11px;
}

.spread-label {
  color: var(--text-secondary);
}

.spread-value {
  color: var(--text-primary);
  font-weight: 600;
}

.order-book-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* Smooth opacity transition */
  opacity: 1;
  transition: opacity 0.2s ease-in-out;
}

/* Fade out briefly when transitioning between symbols */
.order-book-content.transitioning {
  opacity: 0;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.order-book-section {
  flex: 1;
  overflow-y: auto;
}

.asks-section {
  border-bottom: 1px solid var(--terminal-border);
}

.order-book-table-header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  padding: 8px 16px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  background: var(--terminal-bg);
  position: sticky;
  top: 0;
  z-index: 1;
}

.order-book-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  padding: 4px 16px;
  font-size: 11px;
  font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
  position: relative;
  cursor: pointer;
  transition: background 0.1s ease;
}

/* Smooth transitions for all text content */
.order-book-row span {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.order-book-row:hover {
  background: var(--terminal-accent);
}

.row-background {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  opacity: 0.15;
  pointer-events: none;
  /* Smooth width transitions for depth bars */
  transition: width 0.3s ease-out;
}

.bid-background {
  background: var(--green);
}

.ask-background {
  background: var(--red);
}

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

.col-size {
  text-align: center;
  color: var(--text-secondary);
}

.col-total {
  text-align: right;
  color: var(--text-muted);
}

.bid-price {
  color: var(--green);
  font-weight: 500;
}

.ask-price {
  color: var(--red);
  font-weight: 500;
}

.order-book-spread-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: var(--terminal-accent);
  border: 1px solid var(--terminal-border);
  font-size: 12px;
  font-weight: 600;
}

.spread-price {
  color: var(--text-primary);
}

.spread-arrow {
  color: var(--text-secondary);
  font-size: 14px;
}

.spread-diff {
  color: var(--yellow);
}

/* Connection Error in Main Content */
.connection-error-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--terminal-bg);
  padding: 40px;
}

.error-display {
  text-align: center;
  max-width: 500px;
  padding: 40px;
  border: 1px solid var(--terminal-border);
  border-radius: 8px;
  background: var(--terminal-surface);
}

.error-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.error-message {
  color: var(--red);
  font-size: 14px;
  margin-bottom: 24px;
  padding: 12px;
  background: rgba(255, 68, 68, 0.1);
  border: 1px solid rgba(255, 68, 68, 0.3);
  border-radius: 4px;
}

.retry-button {
  background: var(--blue);
  color: var(--text-primary);
  border: none;
  padding: 12px 24px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
  margin-bottom: 24px;
}

.retry-button:hover:not(:disabled) {
  background: #3377ee;
}

.retry-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.error-details {
  border-top: 1px solid var(--terminal-border);
  padding-top: 20px;
  margin-top: 20px;
}

.error-details p {
  color: var(--text-secondary);
  font-size: 12px;
  margin: 4px 0;
  text-align: left;
}

.chart-container {
  flex: 1;
  position: relative;
  border-right: 1px solid var(--terminal-border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.chart-placeholder {
  height: 100%;
  position: relative;
  background: var(--terminal-bg);
}

.chart-grid {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.grid-line {
  position: absolute;
  background: rgba(255, 255, 255, 0.05);
}

.grid-line.vertical {
  width: 1px;
  height: 100%;
}

.grid-line.horizontal {
  height: 1px;
  width: 100%;
}

.candlestick-container {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.chart-svg {
  width: 100%;
  height: 100%;
}

.price-levels {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 3;
  pointer-events: none;
}

.price-level {
  position: absolute;
  right: 8px;
  display: flex;
  align-items: center;
  height: 20px;
}

.price-label {
  font-size: 11px;
  font-family: 'SF Mono', monospace;
  color: var(--text-muted);
  background: var(--terminal-bg);
  padding: 2px 4px;
}

.price-label.current {
  color: var(--text-primary);
  font-weight: 600;
}

.volume-scale {
  position: absolute;
  right: 8px;
  bottom: 20px;
  z-index: 3;
  pointer-events: none;
}

.volume-label {
  position: absolute;
  right: 0;
  font-size: 10px;
  font-family: 'SF Mono', monospace;
  color: var(--text-muted);
  background: var(--terminal-bg);
  padding: 1px 3px;
}

.time-scale {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  z-index: 3;
  pointer-events: none;
}

.time-label {
  font-size: 10px;
  font-family: 'SF Mono', monospace;
  color: var(--text-muted);
}

/* Price Ladder */
.price-ladder {
  width: 200px;
  background: var(--terminal-surface);
  display: flex;
  flex-direction: column;
}

.ladder-header {
  padding: 12px;
  border-bottom: 1px solid var(--terminal-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ladder-tab {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.ladder-menu {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
}

.ladder-content {
  flex: 1;
  overflow-y: auto;
}

.section-header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  padding: 8px 12px;
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  text-align: center;
  border-bottom: 1px solid var(--terminal-border);
}

.ladder-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  padding: 4px 12px;
  font-size: 11px;
  font-family: 'SF Mono', monospace;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.ladder-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.ladder-row.current-price {
  background: rgba(68, 136, 255, 0.1);
  font-weight: 600;
}

.bid-size {
  color: var(--green);
}

.ask-size {
  color: var(--red);
}

.price-value {
  color: var(--text-primary);
}

/* Lower Horizontal Bar - Scrolling Ticker */
.lower-bar {
  height: var(--lower-bar-height);
  background: var(--terminal-surface);
  border-top: 1px solid var(--terminal-border);
  display: flex;
  align-items: center;
  overflow: hidden;
  /* Keep ticker visible at the bottom of the viewport */
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  z-index: 9999;
}

.ticker-container {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.ticker-track {
  display: flex;
  gap: 2px;
  animation: scroll-ticker 120s linear infinite;
  white-space: nowrap;
  will-change: transform;
}

@keyframes scroll-ticker {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.ticker-item {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 8px;
  border-right: 1px solid var(--terminal-border);
}

.ticker-symbol {
  font-weight: 600;
  font-size: 12px;
  color: var(--text-primary);
  min-width: auto;
  padding-right: 2px;
}

.ticker-price {
  font-family: 'SF Mono', monospace;
  font-size: 12px;
  color: var(--text-secondary);
  min-width: auto;
  padding-right: 2px;
}

.ticker-change {
  font-family: 'SF Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  min-width: auto;
}

.ticker-change.positive {
  color: var(--green);
}

.ticker-change.negative {
  color: var(--red);
}

/* Hover to pause animation */
.ticker-track:hover {
  animation-play-state: paused;
}

/* Loading States */
.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  color: var(--text-primary);
}

.spinner {
  width: 32px;
  height: 32px;
  border: 2px solid var(--terminal-border);
  border-top: 2px solid var(--blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--terminal-surface);
}

::-webkit-scrollbar-thumb {
  background: var(--terminal-accent);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #444444;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .price-ladder {
    width: 150px;
  }
}

@media (max-width: 768px) {
  :root {
    --sidebar-width: 280px;
  }

  .upper-bar,
  .lower-bar {
    padding: 0 8px;
  }

  .trading-section {
    gap: 8px;
  }

  .timeframe-controls {
    gap: 4px;
  }
}

/* Backtester Page Styles */
/* Legacy backtester styles removed */

.dashboard-slot {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.dashboard-slot.terminal-slot {
  min-height: 0;
}

/* Legacy styles removed */

.dashboard-drop-zone {
  width: 100%;
  height: 0;
  margin: 0;
  border-radius: 12px;
  border: 1px dashed transparent;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
}

.dashboard-drop-zone.is-active {
  opacity: 1;
  height: 12px;
  margin: 4px 0 2px;
  pointer-events: auto;
  border-color: rgba(148, 163, 184, 0.2);
}

.dashboard-drop-zone.is-hovered {
  height: 34px;
  margin: 6px 0;
  border-color: rgba(59, 130, 246, 0.45);
  background: rgba(59, 130, 246, 0.14);
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.2);
}

.widget-handle {
  position: absolute;
  top: 16px;
  right: 20px;
  color: var(--text-muted);
  font-size: 18px;
  letter-spacing: 2px;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  pointer-events: none;
}

/* Legacy widget styles removed */

/* Maximized Widget Overlay */
.maximized-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  /* Dimmed background */
  backdrop-filter: blur(4px);
  z-index: 9999;
  /* Highest priority */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.2s ease-out;
}

.dashboard-widget.maximized {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  animation: scaleIn 0.2s ease-out;
  border: 1px solid var(--terminal-border);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* AI Chat Sidebar */
.ai-chat-sidebar {
  position: fixed;
  top: var(--upper-bar-height);
  right: -400px;
  /* Hidden by default */
  width: 380px;
  bottom: var(--lower-bar-height);
  background: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(12px);
  border-left: 1px solid var(--terminal-border);
  z-index: 50;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -5px 0 25px rgba(0, 0, 0, 0.3);
}

.ai-chat-sidebar.open {
  right: 0;
}

.ai-chat-header {
  height: 50px;
  border-bottom: 1px solid var(--terminal-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.02);
}

.ai-chat-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
}

.ai-chat-title svg {
  color: var(--blue);
}

.ai-chat-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.ai-chat-close:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ai-message {
  display: flex;
  gap: 12px;
  max-width: 90%;
}

.ai-message.system {
  align-self: flex-start;
}

.ai-message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.ai-avatar {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--blue), #8844ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.message-content {
  background: var(--terminal-surface-elevated);
  padding: 10px 14px;
  border-radius: 0 12px 12px 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
  border: 1px solid var(--terminal-border-light);
}

.message-content.user-content {
  background: var(--blue);
  color: white;
  border: none;
  border-radius: 12px 0 12px 12px;
}

.message-content.typing {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  align-items: center;
  min-height: 40px;
}

.dot {
  width: 4px;
  height: 4px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typing 1.4s infinite ease-in-out both;
}

.dot:nth-child(1) {
  animation-delay: -0.32s;
}

.dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes typing {

  0%,
  80%,
  100% {
    transform: scale(0);
  }

  40% {
    transform: scale(1);
  }
}

.ai-chat-input-area {
  padding: 16px;
  border-top: 1px solid var(--terminal-border);
  background: var(--terminal-surface);
}

.ai-input-wrapper {
  display: flex;
  gap: 8px;
  background: var(--terminal-bg);
  border: 1px solid var(--terminal-border);
  border-radius: 8px;
  padding: 4px;
  transition: border-color 0.2s;
}

.ai-input-wrapper:focus-within {
  border-color: var(--blue);
}

.ai-chat-input {
  flex: 1;
  background: none;
  border: none;
  padding: 8px 12px;
  color: var(--text-primary);
  font-family: var(--font-inter);
  font-size: 13px;
  outline: none;
}

.ai-chat-input::-moz-placeholder {
  color: var(--text-dim);
}

.ai-chat-input::placeholder {
  color: var(--text-dim);
}

.ai-send-btn {
  background: var(--blue);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: background 0.2s;
}

.ai-send-btn:hover {
  background: var(--blue-glow);
}

/* Upper Bar Right Section */
.upper-bar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.icon-button {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.icon-button:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.icon-button.active {
  color: var(--blue);
  background: rgba(68, 136, 255, 0.1);
}

@media (min-width: 980px) {
  .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.metric-card {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metric-value {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
}

.metric-sub {
  font-size: 12px;
  color: var(--text-secondary);
}

.parameter-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.parameter-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.parameter-key {
  font-size: 13px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.parameter-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.widget-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.widget-table thead {
  background: rgba(148, 163, 184, 0.1);
}

.widget-table th,
.widget-table td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.widget-table th {
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-size: 12px;
}

.widget-table td {
  color: var(--text-primary);
}

.widget-table td.positive {
  color: #22c55e;
  font-weight: 600;
}

.widget-table td.negative {
  color: #ef4444;
  font-weight: 600;
}

.allocation-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.allocation-row {
  display: grid;
  grid-template-columns: 80px 1fr 60px;
  align-items: center;
  gap: 12px;
}

.allocation-label {
  color: var(--text-secondary);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.allocation-bar {
  position: relative;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  height: 10px;
  overflow: hidden;
}

.allocation-fill {
  position: absolute;
  height: 100%;
  left: 0;
  top: 0;
  background: rgba(59, 130, 246, 0.7);
  border-radius: inherit;
  transition: width 0.3s ease;
}

.allocation-fill.secondary {
  background: rgba(34, 197, 94, 0.7);
}

.allocation-fill.tertiary {
  background: rgba(249, 115, 22, 0.7);
}

.allocation-fill.muted {
  background: rgba(148, 163, 184, 0.7);
}

.allocation-value {
  text-align: right;
  font-weight: 600;
  color: var(--text-primary);
}

.notes-list {
  list-style: disc;
  padding-left: 20px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notes-list li {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.4;
}

/* Balance Page Styles */
.balance-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  padding: 20px;
  overflow-y: auto;
}

.balance-container {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.balance-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.balance-header h1 {
  color: var(--text-primary);
  font-size: 32px;
  font-weight: 600;
  margin: 0;
}

.balance-info {
  display: flex;
  gap: 10px;
  align-items: center;
}

.exchange-badge,
.testnet-badge {
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.exchange-badge {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.testnet-badge {
  background: rgba(234, 179, 8, 0.1);
  color: #eab308;
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.balance-table-container {
  margin-top: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  overflow: hidden;
}

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

.balance-table thead {
  background: var(--bg-primary);
}

.balance-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border-primary);
}

.balance-table tbody tr {
  border-bottom: 1px solid var(--border-primary);
  transition: background-color 0.2s ease;
}

.balance-table tbody tr:last-child {
  border-bottom: none;
}

.balance-table tbody tr:hover {
  background: var(--bg-primary);
}

.balance-table td {
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-primary);
}

.currency-cell {
  font-weight: 600;
  font-size: 14px;
}

.amount-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.amount-cell.free {
  color: #10b981;
}

.amount-cell.used {
  color: #ef4444;
}

/* Remove old card styles */
.balance-grid,
.balance-card,
.balance-card-header,
.balance-card-body,
.balance-row,
.balance-label,
.balance-value,
.currency-symbol {
  display: none;
}

.loading-state,
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.loading-state p,
.error-state p {
  margin-top: 16px;
  font-size: 14px;
}

.error-state h3 {
  color: var(--text-primary);
  margin-bottom: 8px;
}

/* Trading Form Styles */
.trading-form-container {
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-primary);
  display: flex;
  flex-direction: column;
  width: 320px;
}

.trading-form-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-primary);
  background: var(--bg-primary);
}

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

.form-tab {
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  border-radius: 4px;
  transition: all 0.2s;
}

.form-tab:hover {
  background: rgba(255, 255, 255, 0.05);
}

.form-tab.active {
  color: white;
}

.form-tab.active.buy {
  background: #10b981;
}

.form-tab.active.sell {
  background: #ef4444;
}

.trading-form {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  overflow-y: auto;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.current-price-hint {
  font-size: 10px;
  color: var(--text-tertiary);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

.form-input {
  padding: 10px 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.2s;
}

.form-input:hover {
  border-color: var(--border-hover);
}

.form-input:focus {
  outline: none;
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.05);
}

.form-input::-moz-placeholder {
  color: var(--text-tertiary);
}

.form-input::placeholder {
  color: var(--text-tertiary);
}

.order-type-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--bg-primary);
  padding: 3px;
  border-radius: 6px;
}

.order-type-btn {
  padding: 8px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px;
  transition: all 0.2s;
}

.order-type-btn:hover {
  color: var(--text-primary);
}

.order-type-btn.active {
  background: var(--bg-secondary);
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.form-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-primary);
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  border: 1px solid var(--border-primary);
}

.summary-value {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 13px;
}

.form-message {
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}

.form-message.error {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.form-message.success {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.submit-btn {
  padding: 12px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  color: white;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: auto;
}

.submit-btn.buy {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.submit-btn.buy:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.submit-btn.sell {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.submit-btn.sell:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.submit-btn:active:not(:disabled) {
  transform: translateY(0);
}

/* Orders and Trades Panel */
.orders-trades-panel {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-primary);
  display: flex;
  flex-direction: column;
  max-height: 280px;
}

.panel-header {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-primary);
  background: var(--bg-primary);
}

.panel-tabs {
  display: flex;
  gap: 4px;
}

.panel-tab {
  padding: 8px 16px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  border-radius: 4px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-tab:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.panel-tab.active {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.tab-badge {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

.panel-content {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.orders-table-wrapper,
.trades-table-wrapper {
  height: 100%;
}

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

.data-table thead {
  position: sticky;
  top: 0;
  background: var(--bg-primary);
  z-index: 1;
}

.data-table th {
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-primary);
}

.data-table tbody tr {
  border-bottom: 1px solid var(--border-primary);
  transition: background-color 0.2s;
}

.data-table tbody tr:hover {
  background: var(--bg-primary);
}

.data-table td {
  padding: 10px 16px;
  font-size: 12px;
  color: var(--text-primary);
}

.time-cell .time-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.time-cell .time {
  font-size: 12px;
  color: var(--text-primary);
}

.time-cell .date {
  font-size: 10px;
  color: var(--text-tertiary);
}

.symbol-cell {
  font-weight: 600;
  font-size: 13px;
}

.side-cell {
  font-weight: 600;
  text-transform: uppercase;
}

.side-cell.buy {
  color: #10b981;
}

.side-cell.sell {
  color: #ef4444;
}

.type-cell {
  text-transform: capitalize;
  color: var(--text-secondary);
}

.price-cell,
.amount-cell,
.filled-cell,
.total-cell {
  font-variant-numeric: tabular-nums;
}

.status-cell {
  text-transform: capitalize;
  font-weight: 500;
  font-size: 11px;
}

.status-open {
  color: #3b82f6;
}

.status-filled {
  color: #10b981;
}

.status-cancelled {
  color: #ef4444;
}

.status-partial {
  color: #eab308;
}

.cancel-btn {
  padding: 4px 12px;
  background: transparent;
  border: 1px solid var(--border-primary);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  border-radius: 4px;
  transition: all 0.2s;
}

.cancel-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
  color: #ef4444;
}

.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--text-tertiary);
  font-size: 13px;
}

/* Timeseries Page Styles */
.timeseries-page {
  padding: 24px;
  overflow-y: auto;
  height: calc(100vh - var(--upper-bar-height) - var(--lower-bar-height));
}

.timeseries-container {
  max-width: 1400px;
  margin: 0 auto;
}

.timeseries-header {
  margin-bottom: 24px;
}

.timeseries-header h1 {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.timeseries-header p {
  font-size: 14px;
  color: var(--text-secondary);
}

.timeseries-controls {
  margin-bottom: 24px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.control-group label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

/* Underlyings Selector Styles */
.underlyings-selector {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.selected-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 32px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--terminal-surface);
  border: 1px solid var(--terminal-border);
  border-radius: 16px;
  font-size: 13px;
  color: var(--text-primary);
}

.chip-remove {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0;
  margin-left: 4px;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.chip-remove:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.underlyings-dropdown-container {
  position: relative;
  width: 100%;
}

.underlyings-search-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--terminal-surface);
  border: 1px solid var(--terminal-border);
  border-radius: 6px;
  padding: 0;
  overflow: hidden;
}

.underlyings-search-input {
  flex: 1;
  padding: 10px 12px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
}

.underlyings-search-input::-moz-placeholder {
  color: var(--text-muted);
}

.underlyings-search-input::placeholder {
  color: var(--text-muted);
}

.dropdown-toggle {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 10px 12px;
  font-size: 12px;
  transition: color 0.2s;
}

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

.underlyings-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: var(--terminal-surface);
  border: 1px solid var(--terminal-border);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  max-height: 400px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--terminal-border);
  background: var(--terminal-accent);
}

.dropdown-count {
  font-size: 12px;
  color: var(--text-secondary);
}

.select-all-btn {
  background: transparent;
  border: 1px solid var(--terminal-border);
  color: var(--text-secondary);
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
}

.select-all-btn:hover {
  background: var(--terminal-bg);
  color: var(--text-primary);
}

.underlyings-list {
  overflow-y: auto;
  max-height: 320px;
  padding: 4px;
}

.underlying-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.2s;
  font-size: 14px;
  color: var(--text-primary);
}

.underlying-option:hover {
  background: var(--terminal-accent);
}

.underlying-option input[type="checkbox"] {
  cursor: pointer;
  width: 16px;
  height: 16px;
}

.no-results {
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.timeseries-result {
  margin-top: 24px;
  padding: 24px;
  background: var(--terminal-surface);
  border: 1px solid var(--terminal-border);
  border-radius: 8px;
}

.timeseries-info {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--terminal-border);
}

.timeseries-info p {
  font-size: 14px;
  color: var(--text-secondary);
}

.timeseries-info strong {
  color: var(--text-primary);
  margin-right: 4px;
}

.timeseries-chart {
  margin-bottom: 24px;
}

.timeseries-chart h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.chart-container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  background: var(--terminal-bg);
  border: 1px solid var(--terminal-border);
  border-radius: 6px;
  padding: 12px;
  overflow: hidden;
}

.chart-svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 300px;
}

.timeseries-raw-data {
  margin-top: 24px;
}

.timeseries-raw-data summary {
  cursor: pointer;
  padding: 8px 12px;
  background: var(--terminal-accent);
  border: 1px solid var(--terminal-border);
  border-radius: 4px;
  font-size: 13px;
  color: var(--text-secondary);
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.timeseries-raw-data summary:hover {
  background: var(--terminal-surface);
  color: var(--text-primary);
}

.timeseries-data {
  margin-top: 12px;
  padding: 16px;
  background: var(--terminal-bg);
  border: 1px solid var(--terminal-border);
  border-radius: 4px;
  overflow-x: auto;
  font-size: 12px;
  font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
  color: var(--text-secondary);
  line-height: 1.6;
}

.loading-select {
  padding: 12px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
}

.hover\:border-gray-500:hover {
  --tw-border-opacity: 1;
  border-color: rgb(107 114 128 / var(--tw-border-opacity, 1));
}

.hover\:bg-\[\#1a1a1a\]:hover {
  --tw-bg-opacity: 1;
  background-color: rgb(26 26 26 / var(--tw-bg-opacity, 1));
}

.hover\:bg-\[\#1a1a1a\]\/50:hover {
  background-color: rgb(26 26 26 / 0.5);
}

.hover\:bg-\[\#444\]:hover {
  --tw-bg-opacity: 1;
  background-color: rgb(68 68 68 / var(--tw-bg-opacity, 1));
}

.hover\:bg-blue-500:hover {
  --tw-bg-opacity: 1;
  background-color: rgb(59 130 246 / var(--tw-bg-opacity, 1));
}

.hover\:bg-blue-700:hover {
  --tw-bg-opacity: 1;
  background-color: rgb(29 78 216 / var(--tw-bg-opacity, 1));
}

.hover\:bg-gray-100:hover {
  --tw-bg-opacity: 1;
  background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1));
}

.hover\:bg-gray-700:hover {
  --tw-bg-opacity: 1;
  background-color: rgb(55 65 81 / var(--tw-bg-opacity, 1));
}

.hover\:bg-gray-900:hover {
  --tw-bg-opacity: 1;
  background-color: rgb(17 24 39 / var(--tw-bg-opacity, 1));
}

.hover\:bg-green-700:hover {
  --tw-bg-opacity: 1;
  background-color: rgb(21 128 61 / var(--tw-bg-opacity, 1));
}

.hover\:bg-indigo-700:hover {
  --tw-bg-opacity: 1;
  background-color: rgb(67 56 202 / var(--tw-bg-opacity, 1));
}

.hover\:bg-purple-700:hover {
  --tw-bg-opacity: 1;
  background-color: rgb(126 34 206 / var(--tw-bg-opacity, 1));
}

.hover\:bg-yellow-700:hover {
  --tw-bg-opacity: 1;
  background-color: rgb(161 98 7 / var(--tw-bg-opacity, 1));
}

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

.focus\:border-blue-500:focus {
  --tw-border-opacity: 1;
  border-color: rgb(59 130 246 / var(--tw-border-opacity, 1));
}

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

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

.focus-visible\:ring-2:focus-visible {
  --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);
}

.focus-visible\:ring-offset-2:focus-visible {
  --tw-ring-offset-width: 2px;
}

.disabled\:pointer-events-none:disabled {
  pointer-events: none;
}

.disabled\:cursor-not-allowed:disabled {
  cursor: not-allowed;
}

.disabled\:opacity-50:disabled {
  opacity: 0.5;
}
