/* GLOBAL */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&family=Montserrat:wght@500;700&display=swap');

body {
    margin: 0;
    background: #26292C !important;
    font-family: Arial !important;
    overflow: hidden !important;
    font-size: 11px;
    letter-spacing: 1px;
}

.app-container {
    height: 100vh;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: 40px 1fr 25px;
    grid-template-areas:
        "sidebar header"
        "sidebar content"
        "sidebar footer";
}

/* SIDEBAR */
.sidebar {
    grid-area: sidebar;
    width: 45px;
    background: #26292C;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: width 0.2s ease;
    z-index: 100;
}

.sidebar.expanded {
    width: 240px;
}

.sidebar-top,
.sidebar-bottom {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 7px 0;
}

.icon-btn {
    display: flex;
    align-items: center;
    color: #DDD;
    font-size: 15px;
    padding: 8px 14px;
    cursor: pointer;
}

.menu-icon {
    width: 17px;
    height: 17px;
}

.icon-btn.active {
    background-color: #28a745; /* nice green */
    color: #fff;
}

.icon-btn:hover {
    background: #2F3236;
}
/* text label beside icons */
.item-label {
    opacity: 0;
    margin-left: 12px;
    white-space: nowrap;
    color: #DDD;
    font-size: 12px;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

/* when sidebar is expanded, show labels */
.sidebar.expanded .item-label {
    opacity: 1;
}


/* HEADER */
.header {
    grid-area: header;
    background: #26292C;
    display: flex;
    align-items: center;
    padding: 0 10px;
    color: #fff;
    font-size: 18px;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 6px;
}

.logo-icon {
    width: 25px;
    height: 25px;
}

.logo-text {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 2px;
    color: #ffffff;
    font-weight: bold;
    margin-left: 5px;
}

.account-info {
    margin-left: auto;
    display: flex;
    gap: 10px;
}

.auth-btn {
    background: none;
    border: 1px solid #888;
    padding: 5px 12px;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
}

.auth-btn.signup {
    border-color: #00C853;
}

/* Account Panel Hidden by Default */
.account-panel {
    display: none;
    margin-left: auto;
    color: #fff;
    position: relative;
    cursor: pointer;
    user-select: none;
}

.account-panel .account-main {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 0px;
    background: #2E2E2E;
    border-radius: 6px;
}

.account-panel i {
    font-size: 14px;
}

/* Dropdown */
.account-dropdown {
    position: absolute;
    top: 45px;
    right: 0;
    background: #2E2E2E;
    width: 160px;
    border-radius: 6px;
    overflow: hidden;
    display: none;
    flex-direction: column;
    box-shadow: 0 4px 14px rgba(0,0,0,0.4);
}

.acc-item {
    display: flex;
    justify-content: space-between;
    padding: 5px;
    font-size: 13px;
    color: #fff;
}

.acc-item:hover {
    background: #3A3A3A;
}

.acc-balance {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
}
.balance-icon {
    width: 20px;
    height: 20px;
}

/* CONTENT */
.content-area {
    background: #1A1A1A;
    grid-area: content;
    border-radius: 5px;
    overflow: hidden;

    padding-bottom: 5px;
    height: 100%;         /* or any fixed height you want */
    min-height: 100%;     /* prevents shrinking */
    max-height: 100%;     /* prevents growing */
}

/* FOOTER */
.footer {
    grid-area: footer;
    color: #fff;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    align-items: center;
    z-index: 100;
    margin-top: 5px;
}

.server-status {
    display: flex;
    align-items: center;  /* vertical center */
    gap: 5px;
}

#status-circle {
    font-size: 20px;
    color: red; /* default offline */
}

#status-text {
    font-weight: bold;
    font-size: 10px;
}

#toastContainer {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    pointer-events: none;
}

.toast {
    min-width: 250px;
    max-width: 350px;
    background: #1A1A1A;
    padding: 10px 15px;
    margin-top: 10px;
    border-radius: 6px;
    color: #EEE;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    font-size: 14px;
    border-left: 4px solid;
}

/* COLORS */
.toast.info {
    border-color: #00aaff; /* blue */
}

.toast.warning {
    border-color: #ffaa00; /* yellow/orange */
}

.toast.error {
    border-color: #ff4444; /* red */
}

/* ICONS */
.toast i {
    font-style: normal;
    opacity: 0.8;
}

/* SHOW ANIMATION */
.toast.show {
    opacity: 1;
    transform: translateY(0);
}


/* TOOLTIP (floating popup like cTrader) */
.tooltip {
    position: fixed;
    padding: 6px 10px;
    background: rgba(0,0,0,0.9);
    color: #fff;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
    opacity: 0;
    transform: translateX(10px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 9999;
}

/*risk dialog*/
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    opacity: 1;
    transition: opacity 0.25s ease;
}

.dialog-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.dialog-box {
    width: 350px;
    background: #1A1A1A;
    border-radius: 8px;
    padding: 15px;
    color: #EEE;
    box-shadow: 0 0 20px rgba(0,0,0,0.4);
    animation: dialogPop 0.25s ease;
}

@keyframes dialogPop {
    0%   { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
.dialog-header {
    font-size: 16px;
    font-weight: bold;
    background: #26292C;
    padding: 10px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dialog-close {
    cursor: pointer;
    font-size: 14px;
    opacity: 0.7;
}
.dialog-close:hover {
    opacity: 1;
}

.dialog-notes {
    font-size: 12px;
    color: #CCC;
    background: #26292C;
    padding: 10px;
    border-radius: 6px;
    margin-top: 10px;
    line-height: 1.5;
}

.dialog-proceed {
    margin-top: 15px;
    width: auto;
    padding: 5px;
    background: red;
    border: none;
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    color: white;
}

.dialog-proceed:hover {
    background: #10d060;
}


/* Dialog shared overlay */
.dialog-overlay2 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.65);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* Box styling */
.dialog-box2 {
    width: 340px;
    background: #1A1A1A;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 0 25px rgba(0,0,0,0.45);
    animation: pop 0.2s ease;
}

/* Header */
.dialog-header2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #e5e5e5;
}

/* Close button */
.close-btn2 {
    cursor: pointer;
    font-size: 20px;
    color: #ccc;
}

/* Input box */
.disconnect-input {
    width: 100%;
    padding: 12px;
    background: #111;
    border: 1px solid #333;
    border-radius: 6px;
    color: #eee;
    font-size: 15px;
    outline: none;
    margin-bottom: 12px;
}

/* Button */
.disconnect-btn {
    width: 100%;
    padding: 12px;
    background: #b30000;
    border-radius: 6px;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: 0.2s ease;
}

.disconnect-btn:hover {
    background: #cc0000;
}

/* Animation */
@keyframes pop {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
