/* =========================================================
   RESET & BASE
   ========================================================= */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
    background: #f4f6f8;
    color: #111827;
    line-height: 1.4;
}

/* =========================================================
   NAVBAR
   ========================================================= */
.navbar {
    background: #1f2937;
    color: #ffffff;
    padding: 14px 20px;
    font-size: 18px;
    font-weight: 600;

    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-logo {
    height: 40px;   /* Adjust as needed */
    cursor: pointer;
}

.navbar-logo:hover {
    opacity: 0.8;
}

nav a i {
    margin-right: 8px;
}

/* =========================================================
   LAYOUT
   ========================================================= */
.container {
    padding: 20px;
}

.dashboard-container {
    margin: 0 auto;
}

.card {
    background: #ffffff;
    border-radius: 10px;
    padding: 20px;
    margin: 16px auto;
    width: 100%;
    max-width: 1400px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
}

/* =========================================================
   DASHBOARD HEADER
   ========================================================= */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.page-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
}

.page-subtitle {
    font-size: 13px;
    color: #6b7280;
    margin-top: 4px;
}

/* =========================================================
   INPUTS / SELECTS / BUTTONS
   ========================================================= */
input,

button {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    border-radius: 6px;
}

select,
input {
    border: 1px solid #d1d5db;
    background: #ffffff;
}

select:focus,
input:focus {
    outline: none;
    border-color: #2563eb;
}

button {
    background: #2563eb;
    color: #ffffff;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

button:hover {
    background: #1d4ed8;
}

.account-selector {
    display: flex;
    flex-direction: row;

}

.account-selector label {
    font-size: 10px;
    font-weight: 600;
    color: #6b7280;
}

/* =========================================================
   TOP SUMMARY / MTM
   ========================================================= */
.dashboard-top {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.mtm-card {
    background: linear-gradient(135deg, #ffffff, #f3f4f6);
    border-radius: 12px;
    padding: 18px 20px;
    min-width: 260px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.mtm-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mtm-title {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.mtm-value-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mtm-value {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin: 10px 0 6px;
}

.mtm-value.positive {
    color: #16a34a;
}

.mtm-value.negative {
    color: #dc2626;
}

.mtm-updated {
    font-size: 12px;
    color: #6b7280;
}

/* MTM loader */
.mtm-loader {
    width: 14px;
    height: 14px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #2563eb;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.mtm-loader.hidden {
    display: none;
}

/* =========================================================
   SECTIONS
   ========================================================= */
.section-header {
    margin: 20px 0 12px;
}

.section-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

/* =========================================================
   TABLES
   ========================================================= */
.table-scroll {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 700px;
}

thead th {
    background: #312e81;
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    padding: 10px;
    text-align: left;
}

thead th:first-child {
    border-top-left-radius: 6px;
}

thead th:last-child {
    border-top-right-radius: 6px;
}

tbody td {
    padding: 10px;
    font-size: 14px;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

tbody tr:hover {
    background: #f9fafb;
}

/* =========================================================
   BADGES / SIGNALS
   ========================================================= */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
}

.badge-buy {
    background: #16a34a;
}

.badge-sell {
    background: #dc2626;
}

.signal-buy {
    color: #16a34a;
    font-weight: 700;
}

.signal-sell {
    color: #dc2626;
    font-weight: 700;
}

/* =========================================================
   COLLAPSIBLE
   ========================================================= */
.collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f3f4f6;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.collapsible-header:hover {
    background: #e5e7eb;
}

.collapsible-content {
    display: none;
    margin-top: 10px;
}

/* =========================================================
   DIVIDERS
   ========================================================= */
hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 24px 0;
}

/* =========================================================
   GLOBAL LOADER
   ========================================================= */
.global-loader {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.global-loader.hidden {
    display: none;
}

.spinner {
    width: 44px;
    height: 44px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #2563eb;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

/* =========================================================
   LINKS
   ========================================================= */
a {
    color: #2563eb;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* =========================================================
   ANIMATIONS
   ========================================================= */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 768px) {

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-top {
        flex-direction: column;
    }

    table {
        min-width: 600px;
    }
}

@media (max-width: 480px) {

    .page-title {
        font-size: 18px;
    }

    .mtm-value {
        font-size: 30px;
    }

    table {
        min-width: 520px;
    }
}

/* ================= NAVBAR MENU FIX ================= */

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative; /* VERY IMPORTANT */
}

.navbar-title {
    font-size: 18px;
    font-weight: 700;
}

.navbar-right {
    position: relative;
}

/* Hamburger */
.hamburger {
    font-size: 22px;
    cursor: pointer;
    user-select: none;
}

/* Dropdown menu */
.menu-dropdown {
    display: none;
    position: absolute;
    top: 38px;
    right: 0;
    background: #ffffff;
    border-radius: 8px;
    min-width: 180px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    z-index: 2000;
    overflow: hidden;
}

.menu-dropdown a {
    display: block;
    padding: 12px 16px;
    font-size: 14px;
    color: #111827;
    text-decoration: none;
}

.menu-dropdown a:hover {
    background: #f3f4f6;
}

/* ================= LEGS / BADGES FIX ================= */

.leg-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    margin-bottom: 10px;
}

/* Buy / Sell badge */
.leg-badge {
    min-width: 34px;
    height: 22px;
    padding: 0 6px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    line-height: 22px;
    text-align: center;
    color: #ffffff;
    flex-shrink: 0;
}

/* SELL */
.leg-badge.sell {
    background-color: #dc2626; /* calm red */
}

/* BUY */
.leg-badge.buy {
    background-color: #16a34a; /* calm green */
}

/* Leg text */
.leg-text {
    font-size: 13px;
    color: #111827;
    font-family: "Segoe UI", Arial, sans-serif;
    white-space: nowrap;
}

/* Strike / price */
.leg-strike {
    font-family: monospace;
    color: #374151;
}

/* ================= SIGNAL STATUS BADGES ================= */
.position-time,
.status-received,
.status-processing,
.status-processed,
.status-partial,
.status-failed {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #ffffff !important;
    white-space: nowrap;
    white-space: nowrap;
    width: fit-content;
}

.status-partial {
    background: #f59e0b;
    color: #111827;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}


/* Colors */
.status-received {
    background-color: #f59e0b; /* amber */
}

.status-processing {
    background-color: #2563eb; /* blue */
}

.status-processed {
    background-color: #16a34a; /* green */
}

.status-failed {
    background-color: #dc2626; /* red */
}

/* Accounts page button refinement */
.dashboard-header button {
    width: auto;
    padding: 10px 18px;
    font-size: 14px;
    border-radius: 8px;
    white-space: nowrap;
}

/* ===== Account Mode Badges ===== */

.badge-mode {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
}

.badge-live {
    background-color: #16a34a; /* green */
}

.badge-paper {
    background-color: #64748b; /* slate */
}

/* ===== FORMS ===== */

.form-group {
    margin-bottom: 16px;
    max-width: 420px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.form-actions {
    margin-top: 24px;
}

.form-actions button {
    width: auto;
    padding: 10px 22px;
    font-size: 14px;
    border-radius: 8px;
}

/* Error message */
.form-error {
    margin-top: 12px;
    color: #dc2626;
    font-size: 13px;
    font-weight: 600;
}

/* ===== LOGIN PAGE ===== */
.login-logo {
    height: 60px;
    margin-bottom: 15px;
    filter: drop-shadow(0px 2px 4px rgba(0,0,0,0.3));
}


.login-card {
    max-width: 420px;
    margin: 80px auto;
}

.login-header {
    margin-bottom: 20px;
}

.login-footer {
    margin-top: 16px;
    font-size: 13px;
    color: #6b7280;
}

.login-footer a {
    font-weight: 600;
}

.positions-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.position-card {
    background: #fff;
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.position-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.symbol {
    font-size: 16px;
    font-weight: 700;
}

.direction {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    margin-left: 4px;
}

.direction.buy {
    background: #e8f7ef;
    color: #2ecc71;
}

.direction.sell {
    background: #fdecea;
    color: #e74c3c;
}

.entry-time {
    font-size: 12px;
    color: #777;
    margin: 6px 0 10px;
}

.legs-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.position-card {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
    background: #fff;
}

.position-header {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    margin-bottom: 6px;
}

.position-time {
    font-size: 11px;
    color: #666;
    margin-top:2px;
    background-color: #1e90ff;
    text-transform: math-auto !important

}

.legs {
    margin-top: 8px;
}

.closed-pnl {
    margin-top: 10px;
    font-weight: bold;
    font-size: small;
}

.pnl-positive {
    color: #198754;
}

.pnl-negative {
    color: #dc3545;
}

.empty-text {
    text-align: center;
    color: #888;
    padding: 12px;
}

.leg-price{
    font-size: 11px;
    margin-left: 5px;
}

.leg-qty{
    font-size: 10px;
    margin-left: 5px;
}

.position-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.right-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.position-menu-wrapper {
    position: relative;
}

.position-menu-dots {
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.position-menu-dots:hover {
    background: #f1f1f1;
}

.position-menu-dropdown {
    position: absolute;
    right: 0;
    top: 28px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
    min-width: 160px;
    display: none;
    z-index: 100;
}

.position-menu-dropdown div {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 14px;
}

.position-menu-dropdown div:hover {
    background: #f5f5f5;
}

.position-menu-dropdown.show {
    display: block;
}

/* ===== MODAL ===== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-overlay.hidden {
    display: none;
}

.modal-box {
    background: #ffffff;
    width: 90%;
    max-width: 400px;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    animation: fadeIn 0.2s ease;
}

.modal-box h3 {
    margin-bottom: 10px;
}

.modal-box p {
    font-size: 14px;
    color: #555;
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-cancel {
    background: #afa1a1;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
}

.modal-confirm {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.modal-confirm:hover {
    opacity: 0.9;
}

@keyframes fadeIn {
    from { transform: translateY(10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Source badges */
.badge-source-tv {
    background: #6f42c1;
    color: white;
}

.badge-source-user {
    background: #0d6efd;
    color: white;
}

/* Action badge */
.badge-action {
    background: #ffc107;
    color: #000;
    font-weight: 600;
}

.table-scroll {
    max-height: 420px;       /* control height */
    overflow-y: auto;
    border-radius: 8px;
    border: 1px solid #eee;
}
.signals-table thead th {
    position: sticky;
    top: 0;

    color: white;
    z-index: 2;
}

@media (max-width: 768px) {
    .table-scroll {
        max-height: 60vh;
    }
}

.closed-scroll-wrapper {
    max-height: 420px;   /* desktop height */
    overflow-y: auto;
    padding-right: 4px;
}

@media (max-width: 768px) {
    .closed-scroll-wrapper {
        max-height: 60vh;
    }
}

.closed-scroll-wrapper {
    position: relative;
}

.closed-scroll-wrapper::after {
    content: "";
    position: sticky;
    bottom: 0;
    display: block;
    height: 16px;
    background: linear-gradient(to top, rgba(255,255,255,0.9), transparent);
}

.timeline {
    position: relative;
    padding-left: 24px;
    margin-top: 20px;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e0e0e0;
}

.timeline-item {
    position: relative;
    margin-bottom: 18px;
    padding-left: 20px;
}

.timeline-dot {
    position: absolute;
    left: -1px;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

.timeline-info {
    background: #f8f9fa;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.timeline-time {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 4px;
}

/* Levels */
.level-INFO .timeline-dot {
    background: #2f80ed;
}

.level-WARNING .timeline-dot {
    background: #ffc107;
}

.level-ERROR .timeline-dot {
    background: #dc3545;
}

.level-ERROR .timeline-info {
    background: #fdecea;
    color: #c82333;
}

.position-metrics {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
}

.metric-item {
    text-align: right;
}

.metric-label {
    display: block;
    font-size: 12px;
    color: #777;
}

.metric-value {
    font-size: 12px;
    font-weight: 600;
}

.metric-profit .metric-value {
    color: #777;
}

.closed-metrics {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #eee;

    display: flex;
    justify-content: space-between;
    align-items: center;

    font-size: 12px;
    font-weight: 500;
}

.metric-left {
    display: flex;
    gap: 6px;
}

.metric-right {
    display: flex;
    gap: 6px;
    color: #6c757d;
}

.execution-container {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    margin-top: 5px;
}

.execution-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 4px;
    font-size: 13px;
    border-bottom: 1px solid #eee;
}

.execution-row:last-child {
    border-bottom: none;
}

.exec-success {
    color: #28a745;
    font-weight: 500;
}

.exec-failed {
    color: #dc3545;
    font-weight: 500;
}

.exec-processing {
    color: #ffc107;
    font-weight: 500;
}

.exec-pending {
    color: #6c757d;
    font-weight: 500;
}

.signals-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.signal-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    transition: 0.2s ease;
}

.signal-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.signal-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.signal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #555;
    margin-bottom: 12px;
}

.signal-symbol {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.signal-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.signal-meta {
    font-size: 13px;
    color: #777;
}

/* Status Colors */
.badge-status-processed {
    background: #28a745;
    color: white;
}

.badge-status-failed {
    background: #dc3545;
    color: white;
}

.badge-status-processing {
    background: #ffc107;
    color: black;
}

.signal-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    transition: 0.2s ease;
}

.signal-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.signal-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.signal-left {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.signal-details {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.signal-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #555;
    margin-bottom: 12px;
}

.signal-executions {
    margin-top: 10px;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

.execution-success {
    background: #f1f8f4;
    padding: 8px 10px;
    border-radius: 6px;
    margin-bottom: 6px;
}

.execution-failed {
    background: #fff5f5;
    padding: 8px 10px;
    border-radius: 6px;
    margin-bottom: 6px;
}

.exec-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.exec-account {
    flex: 1;
    font-weight: 500;
}

.exec-status {
    min-width: 100px;
    text-align: center;
    font-weight: 600;
}

.exec-retry {
    min-width: 80px;
    text-align: right;
    font-size: 12px;
    color: #666;
}


.exec-error {
    margin-top: 5px;
    font-size: 13px;
    color: #c62828;
}

.signal-right{
    margin-top: 10px;
}

/* GRID */
.accounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

/* CARD */
.account-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: 0.2s ease;
}

.account-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

/* HEADER */
.account-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.account-name {
    font-size: 16px;
    font-weight: 600;
}

.account-meta {
    font-size: 13px;
    color: #6b7280;
    margin-top: 4px;
}

/* BODY */
.account-body {
    margin-top: 16px;
}

.account-info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
}

.account-info-row .label {
    color: #6b7280;
}

.lot-value {
    font-weight: 600;
}

/* MENU */
.account-menu-wrapper {
    position: relative;
}

.account-menu-dots {
    cursor: pointer;
    font-size: 18px;
    padding: 4px 8px;
}

.account-menu-dropdown {
    position: absolute;
    right: 0;
    top: 28px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
    min-width: 120px;
    display: none;
    z-index: 20;
}

.account-menu-dropdown div {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 14px;
}

.account-menu-dropdown div:hover {
    background: #f3f4f6;
}

.primary-btn {
    width: 100%;
    max-width: 500px;
    margin: 30px auto 0 auto;
 }

 .form-hint {
    display: block;
    font-size: 12px;
    color: #777;
    margin-top: 4px;
}

.signal-execution-wrapper {
    margin-top: 10px;
}

.execution-toggle {
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #888;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
}



.signal-executions {
    overflow: hidden;
    transition: all 0.25s ease;
}

.signal-executions.collapsed {
    display: none;
}

.toggle-arrow {
    font-size: 18px;
}

.signal-meta {
    display: flex;
    flex-direction: column;
    margin-right: 16px;
}

.signal-time,
.signal-processed-time {
    font-size: 14px;
    font-weight: 500;
}

.signal-header-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 40px;
    align-items: start;
}

.signal-main {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.signal-cell {
    display: flex;
    flex-direction: column;
}

.meta-label {
    font-size: 11px;
    color: #8c8c8c;
    font-weight: 600;
    letter-spacing: 0.6px;
    margin-bottom: 4px;
}

.signalTags{
    margin-left: 5px;
}

.signallabels{
    margin-left: 6px;
}

@media (max-width: 768px) {

    .signal-header-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px 16px;
    }

    /* Make Status and Processed stay on right side */
    .signal-header-grid .signal-cell:nth-child(2),
    .signal-header-grid .signal-cell:nth-child(4) {
        text-align: right;
        align-items: flex-end;
    }

}

.execution-actions {
    margin: 8px 0;
    text-align: right;
}

.retry-btn {
    background: #ff9800;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    width:auto;
}

.retry-btn:hover {
    background: #e68900;
}

.date-filter-bar {
    display: flex;
    align-items: flex-end;
    gap: 15px;
    margin-bottom: 20px;
}

.date-group {
    display: flex;
    flex-direction: column;
    font-size: 13px;
}

.date-group input {
    padding: 6px 8px;
}

.btnApplyClosedFilter{
    max-width: fit-content;
    margin: initial;
    padding: 10px 18px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.metric-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    font-size: 14px;
}

.metric-card strong {
    display: block;
    margin-top: 8px;
    font-size: 18px;
}

#mtmGap {
   margin: revert;
}

/* 🔥 Mobile: force 2 cards per row */
@media (max-width: 600px) {
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .metric-card {
        padding: 14px;
        font-size: 12px;
    }

    .metric-card strong {
        font-size: 16px;
    }
}

#accountSelect {
    width: fit-content;
    height: 40px;
    margin-left: 10px;
    border-radius: 6px
}

.refreshBtn {
    margin-left: 10px;
    margin-block: auto;
}

.selectAc {
    margin-block:auto;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.hidden {
    display: none;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    padding: 20px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.modal-close {
    cursor: pointer;
    font-size: 20px;
}

.leg-detail-row {
    display: flex;
    flex-direction: column;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}
















