

:root {
    --main-gradient: linear-gradient(to right, #6366f1, #22c55e);
    /* --main-gradient: linear-gradient(to right, #f97316, #3de4dc); */

    --tab-back: #4b4f5a22;


    --accent: #3de4dc;
    --accent-smoked: color-mix(in srgb, var(--accent) 5%, transparent);
    --accent-semi: color-mix(in srgb, var(--accent) 80%, transparent);



    --accent2: #f97316;
    --accent2-smoked: color-mix(in srgb, var(--accent2) 41%, transparent);
    --accent2-semi: color-mix(in srgb, var(--accent2) 80%, transparent);


    

    --my-yellow: #fbbf24;
    --my-red: #ff4f4f;

    --orderbook-red-back-col: #2c1c1c44;
    --orderbook-green-back-col: #1c2c1c44;

    --orderbook-red-back-col-hover: #2c1c1c;
    --orderbook-green-back-col-hover: #1c2c1c;

    --price-red: #f5a5a5;
    --price-green: #a5f5a5;

    --high: #f97316;
    --low: #3de4dc;

    --toast-red: #ff4f4f;
    --toast-green: #00ff1a;

    --dark-back: rgba(47, 48, 58, 0.99);

}



html,
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #050816;
    color: #f9fafb;
    overflow-x: hidden;
}


/* .layout-main-content {
    flex: 1;
    display: grid;
    grid-template-columns: fit-content(60px) minmax(0, 1fr);
    gap: 16px;
    padding: 16px;
    min-height: 0;
} */



a:link,
a:visited {
    color: inherit;
    text-decoration: none;
}

a:hover,
a:active {
    color: inherit;
    text-decoration: underline;
}

.deco-link{
    text-decoration: underline !important;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    z-index: 9999;
}

.topbar__tagline {
    margin-left: 12px;
    font-size: 0.85rem;
    color: #9ca3af;
}

.topbar__left {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

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


.topbar__user {
    font-size: 0.9rem;
    color: #e5e7eb;
}



.account-menu{
    position: absolute;
    z-index: 9999;
    background-color: var(--dark-back);
    padding: 15px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    top: 45px;
    right: 10px;
}





.dropdown-backdrop{
    position: fixed;
    inset: 0;
    z-index: 5000;
    background: transparent;
}

.dropdown-menu{
    position: fixed;
    z-index: 6000;
    background: var(--dark-back);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 14px;
    padding: 10px;
    box-shadow: 0 18px 50px rgba(0,0,0,0.45);
    transform: translateY(4px);
    opacity: 1;
}

.dropdown-menu--up{
    transform: translateY(-4px);
}

.dropdown-menu.hidden,
.dropdown-backdrop.hidden{
    display: none;
}

.dropdown-menu__user{
    padding: 8px 10px;
    font-size: 0.9rem;
    color: #e5e7eb;
}

.dropdown-menu__sep{
    height: 1px;
    margin: 6px 0;
    background: rgba(148, 163, 184, 0.18);
}

.dropdown-menu__item{
    width: 100%;
    text-align: left;
    padding: 10px 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #e5e7eb;
    cursor: pointer;
    font-size: 0.9rem;
}

.dropdown-menu__item:hover{
    background: rgba(148, 163, 184, 0.12);
}

.dropdown-menu__item--danger{
    color: rgba(248, 113, 113, 1);
}

.account-btn{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(2, 6, 23, 0.6);
    color: #e5e7eb;
    cursor: pointer;
}

.account-btn:hover{
    background: rgba(2, 6, 23, 0.85);
}

.account-btn__chev{
    opacity: 0.8;
}

.footer {
    padding: 16px 16px 16px 16px;
    border-top: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(15, 23, 42, 0.9);
    font-size: 0.75rem;
    color: #9ca3af;
    text-align: center;
}

.footer__text {
    opacity: 0.8;
}


.modal{
    position: fixed;
    inset: 0;
    z-index: 7000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal.hidden{
    display: none;
}

.modal__overlay{
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
}

.modal__panel{
    position: relative;
    z-index: 1;

    width: min(520px, calc(100vw - 32px));
    background: #020617;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 16px;
    box-shadow: 0 18px 50px rgba(0,0,0,0.55);
    padding: 16px;
}

.modal__title{
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: #e5e7eb;
}

.modal__buttons{
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 12px;
}

/* Help-specific sizing */
.modal__panel--help{
    width: min(720px, calc(100vw - 32px));
    max-height: min(70vh, 680px);
    overflow: auto;
    padding: 14px;
}


/* Help content */
.help__header{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    position: sticky;
    top: 0;

    padding: 6px 6px 10px;
    background: #020617;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.help__topic{
    color: var(--accent);
    font-weight: 650;
}



.help__close{
    width: 34px;
    height: 34px;
    border-radius: 10px;

    border: 2px solid var(--accent2-smoked);

    background: rgba(2, 6, 23, 0.55);

    color: var(--accent2);
    font-size: 20px;
    line-height: 1;
}



.help__body{
    padding: 12px 6px 4px;
    color: rgba(226, 232, 240, 0.92);
    font-size: 0.92rem;
    line-height: 1.45;
}

.help__body p{
    margin: 0 0 10px;
}

.help__body p:last-child{
    margin-bottom: 0;
}

.help__body strong{
    color: #e5e7eb;
}






/* Toast */
.toast {
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translateX(-50%) translateY(-16px);
    opacity: 0;
    pointer-events: none;
    background: #020617;
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 0.8rem;
    color: #e5e7eb;
    border: 1px solid rgba(248, 113, 113, 0.7);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.9);
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 1000;
}

.toast--visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.toast--green {
    border-color: var(--toast-green);
}
.toast.toast--red {
    border-color: var(--toast-red);
}



.login-form {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 16px;

}

/* Form */

.form__label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.75rem;
    width: -webkit-fill-available;
}

.form__label--inline {
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.calc-form__label--inline {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.form__input {
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    padding: 4px 8px;
    background: rgba(15, 23, 42, 0.9);
    color: #f9fafb;
    font-size: 0.8rem;
}

.form__input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 1px #6366f1;
}

.form__input--small {
    max-width: 120px;
}

/* убрать стрелки у number-инпутов (Chrome / Edge / Safari) */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* убрать стрелки у number-инпутов (Firefox) */
input[type="number"] {
    -moz-appearance: textfield;
}

#min-spread,
#max-spread {
    text-align: center;
}


.form__error {
    margin: 0;
    color: #f87171;
    font-size: 0.85rem;
}

/* Buttons */

button:hover {
    opacity: 0.9;
}

a:hover {
    opacity: 0.9;
}

/* .btn {
    border: none;
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 0.9rem;
    cursor: pointer;
} */

.btn--primary {
    background: var(--main-gradient);
    color: #f9fafb;
    font-weight: 600;
}


.btn--ghost {
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.7);
    color: #e5e7eb;
}




.user-text {
    text-decoration: underline;
    font-style: italic;
}


