@charset "utf-8";

/* CSS Resets */
html,
body,
div,
span,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
address,
cite,
code,
del,
dfn,
em,
img,
ins,
q,
small,
strong,
sub,
sup,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td {
    border: 0;
    margin: 0;
    padding: 0
}

article,
aside,
figure,
figure img,
figcaption,
hgroup,
footer,
header,
nav,
section,
video,
object {
    display: block
}

a img {
    border: 0
}

figure {
    position: relative
}

figure img {
    width: 100%
}

/* HTML5 display-role reset for older browsers */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
    display: block;
}

html {
    font-family: "Google Sans Flex", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
}

body {
    box-sizing: border-box;
}

ol,
ul {
    list-style: none;
}

blockquote,
q {
    quotes: none;
}

blockquote:before,
blockquote:after,
q:before,
q:after {
    content: '';
    content: none;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

html,
body,
div,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
    margin: 0;
    border: 0;
    padding: 0;
}

span {
    font-size: 100%;
    margin: 0;
    padding: 0;
    border: 0;
}

.clear {
    margin: 0px;
    padding: 0px;
    clear: both;
    float: none;
    height: 0px;
    width: 0px;
    font-size: 0px;
    line-height: 0px;

}

a,
input,
a:active,
a:focus {
    outline: none;
}

input,
textarea {
    background-color: #fff;
}

.uppercase {
    text-transform: uppercase;
}

body,
input,
textarea {
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 18px;
    color: #2e303c;
}

input,
textarea {
    font-family: monospace;
    font-weight: 300;
    font-style: normal;
}


.container {
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    box-sizing: border-box;
    display: block;
    padding-top: 0px;
}

@media only screen and (max-width: 1024px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
}

@media only screen and (max-width: 768px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
}

@media only screen and (max-width: 600px) {
    .container {
        padding-left: 5px;
        padding-right: 5px;
    }
}

.header .colwrap {
    display: table;
    width: 100%;
}

.header .colwrap .col {
    display: table-cell;
    vertical-align: top;
    width: 50%;
}

.header .colwrap .col:last-child {
    text-align: right;
}

.inlineform {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
    background: #f9f9f9;
    padding: 15px 20px;
    border-radius: 10px;
    border: 1px solid #ccc;
    max-width: 600px;
    margin-top: 20px;
}

.inlineform .form-group {
    display: flex;
    flex-direction: column;
    min-width: 150px;
}

.inlineform label {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 14px;
}

.inlineform select,
.inlineform input[type="number"] {
    padding: 8px 10px;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid #ccc;
    width: 100%;
    box-sizing: border-box;
}

.inlineform input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 6px;
}

h2 {
    font-size: 16px;
    margin-bottom: 15px;
}

/* Global dark mode */
body {
    background: #192232;
    color: #e5e7eb;
    max-width: 1750px;
    width: 100%;
    overflow: auto;
    margin-left: auto;
    margin-right: auto;
    font-family: "Google Sans Flex", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
}

.container,
.header,
.content {
    background: transparent;
    color: #e5e7eb;
}

h1,h2,h3,h4 {
    color: #f9fafb;
}

a {
    color: #60a5fa;
}

a:hover {
    color: #93c5fd;
}

.header {
    border-bottom: 1px #e3e3e3 solid;
    margin-bottom: 20px;
}

body.dashboard-page .dashboard-header-wrap {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1750px;
    z-index: 3500;
    backdrop-filter: blur(4px);
    border-bottom: 1px #e3e3e3 solid;
}

body.dashboard-page .dashboard-header-wrap .header {
    border-bottom: 0;
    margin-bottom: 0;
}

body.dashboard-page .dashboard-main-wrap {
    padding-top: 108px;
}

@media only screen and (max-width: 768px) {
    body.dashboard-page .dashboard-main-wrap {
        padding-top: 96px;
    }
}

h1 {
    text-indent: -9999px;
    background-image: url(/assets/logo.png);
    background-repeat: no-repeat;
    background-position: center;
    width: 200px;
    height: 80px;
    background-size: contain;
}

/* Toasts */
#toastContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    min-width: 260px;
    max-width: 340px;
    padding: 10px 14px;
    border-radius: 6px;
    background: #020617;
    border: 1px solid #2b2a2a;
    font-size: 13px;
    box-shadow: 0 10px 25px rgba(0,0,0,.35);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .18s ease, transform .18s ease;
}

.toast--visible {
    opacity: 1;
    transform: translateY(0);
}

.toast__text {
    margin-right: 10px;
}

.toast__close {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    color: #9ca3af;
}

.toast--success {
    border-color: #22c55e;
}

.toast--error {
    border-color: #f97373;
}

.toast--info {
    border-color: #3b82f6;
}

/* Ensure confirm overlay ALWAYS sits above other modals */
#confirmModal {
    position: fixed;
    z-index: 20000 !important;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
}

/* Optional: keep toasts above everything */
#toastContainer{
    z-index: 30000 !important;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(19,10,5, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-content {
    background: #301c0d;
    padding: 18px;
    max-width: 400px;
    width: 100%;
    border-radius: 6px;
    border: 1px solid #2b2a2a;
    color: #e5e7eb;
    text-align: left;
}

.modal-actions {
    margin-top: 30px;
    text-align: left;
}

#confirmModal .modal-content {
    text-align: center;
}

#confirmModal .modal-actions {
    text-align: center;
}

.modal-content .fieldwrapper {
    margin-bottom: 10px;
    display: block;
}

.modal-content .fieldwrapper label {
    font-size: 13px;
    width: 140px;
    display: inline-block;
    color: #e5e7eb;
}

.modal-content .field,
.modal-row input,
.modal-row select {
    border: 1px solid #472d19;
    font-size: 13px;
    margin: 0px;
    padding: 5px 8px;
    background: #301c0d;
    color: #e5e7eb;
    width: calc(100% - 150px);
    box-sizing: border-box;
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 16px;
    color: #f9fafb;
}

.modal-content .button {
    padding: 5px 16px;
    font-size: 14px;
    cursor: pointer;
    margin-left: 20px;
    background: #1e1006;
    color: #e5e7eb;
    border: 2px solid #775842;
    border-radius: 50px;
}

.modal-content .button:first-child {
    margin-left: 0px;
}

.modal-row {
    margin-bottom: 10px;
}

.modal-row label {
    font-size: 13px;
    width: 130px;
    display: inline-block;
    color: #e5e7eb;
}

@media only screen and (max-width: 768px) {

    .modal {
        overflow: auto;
        -webkit-overflow-scrolling: touch;
    }

    body.modalopen {
        /*position: fixed;*/
        overflow: hidden;
    }

    /* On small screens, make charts grid single column with horizontal scroll */
    .modal.fullscreen {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        overflow: auto;
        background: #000;
        align-items: flex-start;
    }

    .modal.fullscreen .modal-content, #sellRuleModal .modal-content, #buyRuleModal .modal-content, #autoModal .modal-content, #sellModal .modal-content, #buyModal .modal-content {
        border-radius: 0;
        border: none;
        max-height: 100vh;     /* fallback */
        max-height: 100svh;    /* stable on mobile */
        max-height: 100dvh;    /* best when supported */
    }

    #buyRuleModal .modal-content, #sellRuleModal .modal-content, #autoModal .modal-content, #sellModal .modal-content, #buyModal .modal-content  {
        width: 100vw;
        width: 100svw;
        width: 100dvw;
        max-width: none;
    }

    .modal.fullscreen .modal-content h3 {
        text-align: center;
    }

    .modal.fullscreen .modal-actions {
        margin-top: 30px;
        text-align: center;
    }

    body.confirm-modal-open {
        position: fixed;
    }

}

/* Toggle switches (checkbox -> toggle) */
input[type="checkbox"]{
    -webkit-appearance:none !important;
    appearance:none !important;
    width:38px;
    height:20px;
    border-radius:999px !important;
    background:#374151;
    border:1px solid #4b5563;
    position:relative !important;
    cursor:pointer !important;
    vertical-align:middle !important;
    transition:background-color .15s ease, border-color .15s ease, box-shadow .15s ease !important;
    flex:0 0 auto;
    box-sizing:border-box !important;
    background-image:none !important;
}
input[type="checkbox"]::before{
    content:"" !important;
    position:absolute !important;
    top:0px !important;
    left:0px !important;
    width:18px;
    height:18px;
    border-radius:50% !important;
    background:#e5e7eb;
    transition:transform .15s ease !important;
}
input[type="checkbox"]:checked{
    background: #3480e1;
    border-color: #3480e1;
}
input[type="checkbox"]:checked::before{
    transform:translateX(18px);
}
input[type="checkbox"]:disabled{
    opacity:.5 !important;
    cursor:not-allowed !important;
}
input[type="checkbox"]:focus-visible{
    outline:none !important;
    box-shadow:0 0 0 3px rgba(59,130,246,.45);
}

.modal-error {
    background-color: #7b2121;
    padding: 5px;
    font-size: 14px;
    padding-left: 18px;
    padding-right: 18px;
    margin-left: -18px;
    margin-right: -18px;
    border-left: none;
    border-right: none;
    margin-bottom: -10px;
}

@media only screen and (max-width: 768px) {
    .modal-error:not(#buyRuleModalError):not(#sellRuleModalError) {
        text-align: center;
    }
}

code {
    background: #d9d9d9;
    color: #000;
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 13px;
    white-space: nowrap;
}

.modal-content h4 {
    font-size: 15px;
    margin-bottom: 10px;
}

.modal-content .white {
    color: #fff!important;
}

.modal-actions-pad {
display: block;
height: 20px;
}

.greenbutton {
    background-color: #286c28 !important;
    border: 2px solid #3f8a3f !important;
}

.redbutton {
    background-color: #7b2121 !important;
    border: 2px solid #a43030 !important;
}

.modal-title {
    position: sticky;
    top: -18px;
    left: 0px;
    right: 0px;
    background-color: #301c0d;
    margin-top: -18px;
    padding-top: 18px;
    padding-bottom: 10px;
    z-index: 100;
    border-bottom: solid 1px #472d19;
    margin-left: -18px;
    margin-right: -18px;
    padding-left: 18px;
    padding-right: 18px;
    margin-bottom: 20px;
}

.modal-content .modal-title h3 {
    margin-bottom: 10px;
}

.modal-content input[type="text"], .modal-content input[type="number"], .modal-content select, .modal-content select.field {
    border: 1px solid #ececf2;
    font-size: 13px;
    padding: 6px 8px;
    background: #ececf2;
    color: #301c0d;
    box-sizing: border-box;
    border-radius: 2px;
}
