/* =============================== */
/*           Index Page          */
/* =============================== */

.index-body {
    font: 20px Montserrat, sans-serif;
    line-height: 1.8;
    color: #000;
}

.index-container-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 20px;
}

.index-content-box {
    width: 80%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.index-panel-box {
    width: 100%;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background: white;
    text-align: center;
}

.index-login-section-wrapper {
    width: 50%;
}

.index-social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
}

.index-social-icons img {
    width: 40px;
    height: 40px;
    cursor: pointer;
    opacity: 0.8;
}

.index-social-icons img:hover {
    opacity: 1;
}

.index-form-control {
    width: 80%;
    margin: auto;
}

.index-btn-login {
    width: 50%;
    margin-top: 10px;
}

/* =============================== */
/*        Dashboard & Layout       */
/* =============================== */

.dash-body {
    font-size: 12px;
    color: #333;
    overflow-x: hidden !important;
}

.dash-container-fluid {
    width: 100%;
    padding: 20px;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.dash-header-title {
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 5px;
}

.dash-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

/* Navigation Tabs */
.dash-nav-tabs {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    overflow-x: auto;
    list-style: none;
    padding: 0;
    margin: 0;
}

.dash-nav-tabs li {
    list-style: none;
}

.dash-nav-tabs .dash-nav-link,
.dash-nav-tabs .nav-link {
    font-size: 12px !important;
    padding: 6px 10px !important;
    white-space: nowrap;
}

.dash-nav-tabs .dash-nav-link.active {
    color: #064635 !important;
    font-weight: bold;
}

/* Table Container */
.dash-table-container {
    width: 100%;
    flex-grow: 1;
    overflow: auto;
    border: 1px solid #ddd;
    padding: 5px;
    box-sizing: border-box;
}

.dash-tab-content {
    display: none;
}

.dash-active-tab {
    display: block;
}

/* =============================== */
/*           Modal Tables          */
/* =============================== */

.dash-modal-table th,
.dash-modal-table td {
    padding: 6px 12px;
    border: 1px solid #ddd;
    text-align: center;
    font-size: 14px;
    width: 25%;
}

.dash-modal-table tr:nth-child(1) th,
.dash-modal-table tr:nth-child(1) td,
.dash-modal-table tr:nth-child(2) th,
.dash-modal-table tr:nth-child(2) td {
    width: 20%;
}

.dash-modal-table tr:nth-child(1) th:nth-child(3),
.dash-modal-table tr:nth-child(1) td:nth-child(3),
.dash-modal-table tr:nth-child(1) th:nth-child(4),
.dash-modal-table tr:nth-child(1) td:nth-child(4),
.dash-modal-table tr:nth-child(2) th:nth-child(3),
.dash-modal-table tr:nth-child(2) td:nth-child(3),
.dash-modal-table tr:nth-child(2) th:nth-child(4),
.dash-modal-table tr:nth-child(2) td:nth-child(4) {
    width: 30%;
}

.dash-modal-table tr:nth-child(3),
.dash-modal-table tr:nth-child(4),
.dash-modal-table tr:nth-child(5),
.dash-modal-table tr:nth-child(6),
.dash-modal-table tr:nth-child(7) {
    width: 25%;
}

.dash-modal-table tr:nth-child(3) th:nth-child(3),
.dash-modal-table tr:nth-child(3) td:nth-child(3),
.dash-modal-table tr:nth-child(4) th:nth-child(3),
.dash-modal-table tr:nth-child(4) td:nth-child(3),
.dash-modal-table tr:nth-child(5) th:nth-child(3),
.dash-modal-table tr:nth-child(5) td:nth-child(3),
.dash-modal-table tr:nth-child(6) th:nth-child(3),
.dash-modal-table tr:nth-child(6) td:nth-child(3),
.dash-modal-table tr:nth-child(7) th:nth-child(3),
.dash-modal-table tr:nth-child(7) td:nth-child(3) {
    width: 50%;
}

.dash-text-success {
    color: green !important;
    font-weight: bold;
}

.dash-text-danger {
    color: red !important;
    font-weight: bold;
}

/* =============================== */
/*         Mobile Overrides        */
/* =============================== */

@media (max-width: 768px) {
    .dash-container-fluid,
    .dash-table-container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto;
        padding: 0 5px;
    }

    .dash-nav-tabs {
        justify-content: flex-start;
    }

    .dash-nav-tabs .dash-nav-link,
    .dash-nav-tabs .nav-link {
        white-space: normal !important;
        padding: 4px 8px !important;
        font-size: 10px !important;
        text-align: left;
    }
}

/* =============================== */
/*         Common Styling          */
/* =============================== */

p {
    font-size: 16px;
}

/* Traffic Lights */
.traffic-light {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    vertical-align: middle;
}

.traffic-light-green1,
.traffic-light-green2,
.traffic-light-green3 {
    background-color: #66e066 !important;
}

.traffic-light-red1,
.traffic-light-red2,
.traffic-light-red3 {
    background-color: #cc0000 !important;
}

.traffic-light-grey {
    background-color: #555 !important;
}

/* =============================== */
/*  Dashboard Tables: Signals, Trades, positions, Performance  */
/* =============================== */

/* Watchlist Table (mirrors Signals table styling) */

/* =============================== */
/*   Derivatives Modal Tables      */
/* =============================== */

#tab-derivatives table {
  font-size: 0.875rem;
}
#tab-derivatives table th,
#tab-derivatives table td {
  font-weight: normal;
}
#tab-derivatives table th:first-child,
#tab-derivatives table td:first-child {
  font-weight: bold;
}


.dash-watchlist-table {
    width: 100% !important;
    table-layout: auto;
  }
  .dash-watchlist-table th,
  .dash-watchlist-table td {
    padding: 6px !important;
    line-height: 1.1 !important;
    font-size: 12px !important;
    white-space: nowrap;
    border: 1px solid #ddd;
  }
  
  /* Watchlist Modal – use same width as Signals modal */
  .dash-modal-lg {
    max-width: 900px;
  }
  
  /* Ensure modal tables have proper styling (similar to Signals snapshot tables) */
  #detailsModal .modal-body table {
    width: 100%;
    font-size: 12px;
  }
  #detailsModal .modal-body th, 
  #detailsModal .modal-body td {
    padding: 4px;
    border: 1px solid #ddd;
    text-align: center;
  }
  

/* Signals Table */
.dash-signals-table {
    width: 100% !important;
    table-layout: auto;
}

.dash-signals-table td,
.dash-signals-table th {
    padding: 6px !important;
    line-height: 1.1 !important;
    font-size: 12px !important;
    white-space: nowrap;
    border: 1px solid #ddd;
}

/* Trades Table */
.dash-trades-table {
    width: 100% !important;
    table-layout: auto;
}

.dash-trades-table td,
.dash-trades-table th {
    padding: 6px !important;
    line-height: 1.1 !important;
    font-size: 12px !important;
    white-space: nowrap;
    border: 1px solid #ddd;
}

/* positions Table */
.dash-positions-table {
    width: 100% !important;
    table-layout: auto;
}

.dash-positions-table td,
.dash-positions-table th {
    padding: 6px !important;
    line-height: 1.1 !important;
    font-size: 12px !important;
    white-space: nowrap;
    border: 1px solid #ddd;
}

/* Performance Table */
.dash-performance-table td,
.dash-performance-table th {
    padding: 6px !important;
    line-height: 1.1 !important;
    font-size: 12px !important;
    white-space: nowrap;
    border: 1px solid #ddd;
}

/* =============================== */
/* Global DataTables Overrides   */
/* =============================== */
.dataTables_wrapper {
    font-size: 12px !important;
}
