/* General body styling */
        body {
            font-family: 'Inter', sans-serif; /* Using Inter font */
            background-color: #f3f4f6; /* bg-gray-100 */
            color: #1f2937; /* text-gray-800 */
            margin: 0; /* Remove default margin */
            line-height: 1.6; /* OLD MY General Styles */
        }

/* ----------------------START LOGIN SCREEN Styles ---------------------------------------------- */

        /* Login container styling */
        .login-container {
            background-color: #ffffff; /* White background for the form */
            padding: 40px; /* Padding inside the container */
            border-radius: 8px; /* Slightly rounded corners */
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); /* Subtle shadow */
            width: 100%; /* Full width on smaller screens */
            max-width: 400px; /* Max width for larger screens */
            box-sizing: border-box; /* Include padding in element's total width and height */
        }

        /* Heading styling */
        .login-container h2 {
            text-align: center; /* Center the heading text */
            color: #333333; /* Dark grey text color */
            margin-bottom: 30px; /* Space below the heading */
            font-weight: 500; /* Medium font weight */
            letter-spacing: 1px; /* Slight letter spacing */
            text-transform: uppercase; /* Uppercase text */
            font-size: 1.5em; /* Adjust font size for better readability */
        }

        /* Form group for labels and inputs */
        .form-group {
            margin-bottom: 20px; /* Space between form groups */
        }

        /* Label styling */
        .form-group label {
            display: block; /* Make label a block element */
            margin-bottom: 8px; /* Space between label and input */
            color: #555555; /* Medium grey text color */
            font-weight: 400; /* Regular font weight */
            font-size: 0.95em; /* Slightly smaller font size */
        }

        /* Input field styling */
        .form-group input[type="text"],
        .form-edit input[type="text"],
        .form-tradingview input[type="text"],
        .form-group input[type="password"],
        .form-group select,
        .form-edit select,
        .form-tradingview select {
            width: 100%; /* Full width of its container */
            padding: 12px; /* Padding inside the input */
            border: 1px solid #cccccc; /* Light grey border */
            border-radius: 4px; /* Slightly rounded corners */
            box-sizing: border-box; /* Include padding in element's total width and height */
            font-size: 1em; /* Standard font size */
            color: #333333; /* Dark text for input */
            transition: border-color 0.3s ease; /* Smooth transition for border color */

        }
        .form-group textarea,
        .form-edit textarea,
        .form-tradingview textarea {

            padding: 12px; /* Padding inside the input */
            border: 1px solid #cccccc; /* Light grey border */
            border-radius: 4px; /* Slightly rounded corners */
            box-sizing: border-box; /* Include padding in element's total width and height */
            font-size: 1em; /* Standard font size */
            color: #333333; /* Dark text for input */
            transition: border-color 0.3s ease; /* Smooth transition for border color */
        }

        .form-group select,
        .form-edit select,
        .form-tradingview select {
            /* Remove the default browser appearance */
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;

            /* Ensure the background is not transparent */
            background-color: white;
            /* Add a custom dropdown arrow icon */
            background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
            background-repeat: no-repeat;
            background-position: right 1rem center;
            background-size: 1em;
        }

        /* This is for older versions of Internet Explorer */
        .form-group select::-ms-expand,
        .form-edit select::-ms-expand,
        .form-tradingview select::-ms-expand {
            display: none;
        }

        /* Focus state for inputs */
        .form-group input[type="text"]:focus,
        .form-group input[type="password"]:focus,
        .form-group textarea:focus,
        .form-group select:focus,
        .form-edit input[type="text"]:focus,
        .form-edit textarea:focus,
        .form-edit select:focus,
        .form-tradingview input[type="text"]:focus,
        .form-tradingview textarea:focus,
        .form-tradingview select:focus {
            border-color: #555555; /* Gray border on focus */
            outline: none; /* Remove default outline */
        }

        /* Specific style for username input to match the image */
        .form-group.username-input input {
            border-color: #555555; /* Gray border for username input */
        }

        /* Password input container for eye icon */
        .password-input-container {
            position: relative; /* For positioning the eye icon */
        }

        .password-toggle {
            position: absolute; /* Position eye icon */
            right: 12px; /* Distance from the right */
            top: 50%; /* Vertically center */
            transform: translateY(-50%); /* Adjust for perfect centering */
            cursor: pointer; /* Indicate it's clickable */
            color: #aaaaaa; /* Light grey color for the eye icon */
            font-size: 1.1em; /* Adjust icon size */
        }

        /* Remember me and Forgot Password section */
        .options-group {
            display: flex; /* Use flexbox */
            justify-content: space-between; /* Space out items */
            align-items: center; /* Vertically align items */
            margin-bottom: 30px; /* Space below this group */
            font-size: 0.9em; /* Smaller font size */
        }

        .remember-me {
            display: flex; /* Flex for checkbox and text */
            align-items: center; /* Vertically align checkbox and text */
            color: #555555; /* Medium grey text */
        }

        .remember-me input[type="checkbox"] {
            margin-right: 8px; /* Space between checkbox and text */
            accent-color: #555555; /* Gray accent color for checkbox */
        }

        .forgot-password {
            color: #555555; /* Gray color for the link */
            text-decoration: none; /* Remove underline */
            transition: color 0.3s ease; /* Smooth color transition */
        }

        .forgot-password:hover {
            color: #222222; /* Darker Gray on hover */
        }

        /* Login button styling */
        .login-button {
            width: 100%; /* Full width */
            padding: 15px; /* Padding inside the button */
            background-color: #1f2937; /* Dark grey background */
            color: #ffffff; /* White text */
            border: none; /* No border */
            border-radius: 0.5em; /* More rounded corners */
            font-size: 1.1em; /* Larger font size */
            font-weight: 500; /* Medium font weight */
            cursor: pointer; /* Pointer on hover */
            transition: background-color 0.3s ease, transform 0.2s ease; /* Smooth transitions */
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); /* Subtle shadow */
        }

        .login-button:hover {
            background-color: #555555; /* Slightly lighter grey on hover */
            transform: translateY(-2px); /* Slight lift effect */
        }

        .login-button:active {
            background-color: #222222; /* Darker grey on active */
            transform: translateY(0); /* Reset lift effect */
        }

        .error-msg {
            color:#ff0000;
            font-size: 0.8em; /* Smaller font size */
        }
/* ----------------------END LOGIN SCREEN Styles ---------------------------------------------- */
/* ----------------------START NEW Styles FOR MAIN PAGES -------------------------------------- */

        /* Header Styles */
        .main-header {
            position: sticky; /* sticky */
            top: 0;
            z-index: 50;
            background-color: #1f2937;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
        }

        .header-container {
            max-width: 80rem; /* Equivalent to 1280px */
            margin-left: auto;
            margin-right: auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding-left: 1rem; /* 16px */
            padding-right: 1rem; /* 16px */
            padding-top: 0.5rem; /* 8px */
            padding-bottom: 0.5rem; /* 8px */
        }


        .material-symbols-outlined {
          font-variation-settings:
          'FILL' 0,
          'wght' 400,
          'GRAD' 0,
          'opsz' 24
        }

        .header-left-section,
        .header-right-section {
            display: flex;
            align-items: center;
            gap: 1rem; /* 16px between children */
        }

        .menu-button,
        .dropdown-toggle {
            color: #d1d5db;
            transition: color 0.15s ease-in-out; /* Add transition for hover effect */
            font-size: 1.5rem; /* 24px */
            cursor: pointer;
            background: none;
            border: none;
            padding: 0;
        }

        .menu-button:hover,
        .dropdown-toggle:hover {
            color: #ffffff;
        }

        .site-title {
            font-family: 'Audiowide', cursive;
            font-size: 1.5rem; /* 24px */
            font-weight: 700;
            color: #ffffff;
        }

        .4-title {
            color: #7bf1a8;
        }

        .user-name {
            color: #ffffff;
            font-weight: 500;
            display: none;
        }

        .options-dropdown {
            position: relative;
        }

        .dropdown-menu {
            position: absolute;
            right: 0;
            top: 100%;
            margin-top: 0.5rem; /* 8px */
            width: 12rem; /* 192px */
            background-color: #ffffff;
            border-radius: 0.375rem; /* 6px */
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
            padding-top: 0.25rem; /* 4px */
            padding-bottom: 0.25rem; /* 4px */
            outline: 1px solid rgba(0, 0, 0, 0.05);
            outline-offset: -1px; /* To prevent it from increasing box size */
        }

        .dropdown-item {
            display: block;
            padding-left: 1rem; /* 16px */
            padding-right: 1rem; /* 16px */
            padding-top: 0.5rem; /* 8px */
            padding-bottom: 0.5rem; /* 8px */
            font-size: 0.875rem; /* 14px */
            color: #374151;
            transition: background-color 0.15s ease-in-out; /* Add transition for hover effect */
            text-decoration: none; /* Remove default underline from links */
        }

        .dropdown-item:hover {
            background-color: #f3f4f6;
        }

        /* Custom styles for details/summary */
        summary::-webkit-details-marker {
            display: none;
        }
        summary {
            list-style: none;
            cursor: pointer;
        }
        summary:focus {
            outline: none;
        }

        /* --- STATUS BADGES --- */

        /* Active = Blue */
        .status-active {
            color: #2563EB; 
            background-color: #DBEAFE; 
            padding: 2px 8px;
            border-radius: 9999px;
            font-size: 0.8rem;
            font-weight: 500;
        }

        /* Pause = Dark Grey */
        .status-pause {
            color: #4B5563; 
            background-color: #E5E7EB; 
            padding: 2px 8px;
            border-radius: 9999px;
            font-size: 0.8rem;
            font-weight: 500;
        }

        /* Long = Green */
        .status-l {
            color: #10B981; 
            background-color: #D1FAE5; 
            padding: 2px 8px;
            border-radius: 9999px;
            font-size: 0.8rem;
            font-weight: 500;
        }

        /* Short = Red */
        .status-s {
            color: #DC2626; 
            background-color: #FEE2E2; 
            padding: 2px 8px;
            border-radius: 9999px;
            font-size: 0.8rem;
            font-weight: 500;
        }

        /* Notice the backslash before the ampersand here! */
        .status-l\&s {
            color: #2563EB; /* Blue color for L&S status */
            background-color: #DBEAFE; /* Light blue background */
            padding: 2px 8px;
            border-radius: 9999px;
            font-size: 0.8rem;
            font-weight: 500;
        }

        .action-icon {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 28px;
            height: 28px;
            border: 1px solid #e5e7eb;
            border-radius: 6px;
            color: #6b7280;
        }

          /* Portfolio Performance */
              /* Layout Containers */
        .page-wrapper {
            padding: 1rem;
        }
        .content-container {
            max-width: 80rem;
            margin-left: auto;
            margin-right: auto;
        }
                /* Card Styles */
        .card {
            background-color: #ffffff;
            border-radius: 0.75rem;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1); /* shadow */
            padding: 1.5rem;
            margin-bottom: 1.5rem;
        }
        .card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1rem;
        }
         .card-bottom {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 1rem;
        }

        .card-title {
            font-size: 1.125rem;
            line-height: 1.75rem;
            font-weight: 600;
            color: #111827;
        }
        .card-subtitle {
            font-size: 1.125rem;
            line-height: 1.75rem;
            font-weight: 600;
            color: #6b7280;
            margin-bottom: 0.5rem;
        }

        /* Performance Section */
        .performance-summary {
            display: flex;
            align-items: baseline;
            margin-bottom: 0.25rem;
        }
        .performance-value {
            font-size: 2.25rem;
            line-height: 2.5rem;
            font-weight: 700;
            color: #111827;
            margin-right: 0.5rem;
        }
        .performance-change {
            font-size: 0.875rem;
            line-height: 1.25rem;
            color: #10b981;
            font-weight: 500;
            display: flex;
            align-items: center;
        }
        .performance-change .fas {
            margin-right: 0.25rem;
        }

        /* Graph Styles */
        .graph-container {
            position: relative;
            height: 200px;
            margin-top: 1.5rem;
        }
        .graph-svg {
            position: absolute;
            inset: 0;
        }
        .axis-labels {
            font-size: 0.75rem;
            line-height: 1rem;
            color: #9ca3af;
            font-family: 'Inter', sans-serif;
        }
        .grid-line-dashed {
            stroke: #e5e7eb;
            stroke-width: 1;
            stroke-dasharray: 2,2;
        }
        .grid-line-solid {
            stroke: #e5e7eb;
            stroke-width: 1;
        }

        /* Buttons & Tabs */
        .tabs-container {
            margin-top: 1.5rem;
            border-bottom: 1px solid #e5e7eb;
        }
        .tabs-nav {
            display: flex;
            gap: 0.25rem;
        }
        .btn {
            cursor: pointer;
            text-decoration: none;
            transition: all 0.2s ease-in-out;
        }
        .tab-button {
            color: #6b7280;
            padding: 0.5rem 0.75rem;
            font-weight: 500;
            font-size: 0.875rem;
            line-height: 1.25rem;
            border-radius: 0.375rem;
            border: none;
            background: none;
        }
        .tab-button:hover {
            color: #4b5563;
        }
        .tab-button.active {
            background-color: #f3f4f6;
            color: #374151;
        }

        .diff-positive {
            color: #10b981; /* green */
        }

        .diff-positive-ai {
            color: #3b82f6; /* blue */
        }

        .diff-negative {
            color: #dc2626; /* red-600 */
        }

        /* --- UPDATED: Container for the card title and toggle switch --- */
        .card-header-flex {
            display: flex;
            justify-content: space-between;
            align-items: flex-start; /* Aligns items to the top in case the text wraps to 2 lines */
            margin-bottom: 0.75rem; /* 12px */
        }

        /* Removes default margin from the title when it's in a flex container */
        .card-header-flex .card-subtitle {
            margin-bottom: 0;
            flex-grow: 1; /* Allows the title to take up available space */
            padding-right: 1rem; /* Ensures the text never touches the toggle switch */
        }

        /* --- UPDATED: The container creates the seamless pill shape --- */
        .toggle-container {
            display: inline-flex;
            background-color: #e5e7eb;
            border-radius: 0.5rem; /* Use a consistent radius */
            /* Padding is removed */
            overflow: hidden; /* This is key: it clips the buttons to the container's shape */
            flex-shrink: 0; /* Prevents the toggle from ever shrinking on mobile */
        }

        /* Styling for the individual TW and AI buttons */
        .graph-toggle-btn {
            /* Sizing is the same */
            padding: 0.5rem 1.063rem;
            font-size: 0.875rem;
            font-weight: 700;

            /* Buttons themselves have no rounding; the container handles it */
            border-radius: 0.5rem;
            border: none;

            /* Inactive state is transparent */
            background-color: transparent;
            color: #374151;
            cursor: pointer;
            font-family: 'Inter', sans-serif;
            transition: background-color 0.2s, color 0.2s;
        }

        /* The active button gets the dark background and white text */
        .graph-toggle-btn.active {
            background-color: #1f2937;
            color: white;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        }

 /* Custom scrollbar for a cleaner look */
        ::-webkit-scrollbar {
            width: 6px;
            height: 6px;
        }
        ::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 10px;
        }
        ::-webkit-scrollbar-thumb {
            background: #d1d5db;
            border-radius: 10px;
        }
        ::-webkit-scrollbar-thumb:hover {
            background: #9ca3af;
        }

 /* Table Styles */
        .table-wrapper-logs {
            overflow-x: auto;
        }
        .data-table,
        .data-table-logs,
        .data-table-edit,
        .data-table-tradingview {
            width: 100%; /* min-w-full */
            border-collapse: collapse;
            border-spacing: 0;
            color: #6b7280; /* text-gray-500 */

        }
        .data-table thead,
        .data-table-logs thead,
        .data-table-edit thead,
        .data-table-tradingview thead{
            background-color: #1f2937; /* bg-gray-800 */
        }
        .data-table th,
        .data-table-logs th,
        .data-table-edit th,
        .data-table-tradingview th {
            padding: 0.625rem 1.5rem; /* px-6 py-3 */
            text-align: left;
            font-size: 0.85rem; /* text-xs */
            line-height: 1rem;
            font-weight: 500; /* font-medium */
            color: #d1d5db; /* text-gray-300 */
            text-transform: uppercase;
            letter-spacing: 0.05em; /* tracking-wider */
            white-space: nowrap;
        }
        .data-table tbody,
        .data-table-logs tbody,
        .data-table-edit tbody,
        .data-table-tradingview tbody {
            background-color: #ffffff; /* bg-white */
            border-top: 1px solid #e5e7eb; /* divide-y divide-gray-200 */
        }
        .data-table tr:not(:last-child),
        .data-table-logs tr:not(:last-child),
        .data-table-edit tr:not(:last-child),
        .data-table-tradingview tr:not(:last-child) {
            border-bottom: 1px solid #e5e7eb;
        }

        .data-table tbody tr:hover,
        .data-table-logs tbody tr:hover,
        .data-table-edit tbody tr:hover,
        .data-table-tradingview tbody tr:hover {
            background-color: #f9fafb; /* hover:bg-gray-50 */
            transition-property: background-color;
            transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
            transition-duration: 200ms;
        }
        .data-table td,
        .data-table-logs td,
        .data-table-edit td,
        .data-table-tradingview td {
            padding: 0.375rem 1.5rem; /* px-6 py-3 */
            white-space: nowrap;
            font-size: 0.85rem; /* text-sm */
            line-height: 1.25rem;
        }

        .signal_error {
            color: #ff0000;
            background-color: #FEE2E2;
            padding: 2px 8px;
            font-size: 0.8rem;
            font-weight: 500;
        }

        /* Action Buttons */
        .action-buttons {
            display: flex;
            align-items: center;
            gap: 0.5rem; /* space-x-2 */
        }

        /* Details Button */
        .details-button {
            background-color: #1f2937;; /* bg-gray-600 */
            color: #ffffff; /* text-white */
            font-weight: 700; /* font-bold */
            padding: 0.5rem 1rem; /* py-2 px-4 */
            border-radius: 0.5rem; /* rounded-lg */
            font-size: 0.875rem; /* text-sm */
            line-height: 1.25rem;
            border: none;
            cursor: pointer;
        }
        .details-button:hover {
            background-color: #374151; /* hover:bg-gray-700 */
        }
        /* --- Dropdown Confirmation Styles --- */
        .action-dropdown {
            position: relative;
            display: inline-block;
        }

        .action-dropdown .dropdown-toggle,
        .action-dropdown .action-icon {
            list-style: none; /* Hide the default arrow */
            cursor: pointer;
        }

        .action-dropdown .dropdown-icon-delete {
            font-size: 2.5rem; /* You can adjust this value (e.g., 3rem, 40px) */
            color: #DC2626; /* This is a strong red color */
            margin-bottom: 10px; /* This adds space below the icon */
        }

        /* For Webkit browsers like Chrome/Safari */
        .action-dropdown .action-icon::-webkit-details-marker {
            display: none;
        }

        .action-dropdown .dropdown-menu {
            position: absolute;
            right: 0;
            top: 100%;
            margin-top: 5px;
            background-color: #fff;
            border: 1px solid #e5e7eb;
            border-radius: 8px;
            box-shadow: 0 4px 8px rgba(0,0,0,0.1);
            padding: 10px;
            width: 180px;
            z-index: 10;
            text-align: center;
        }

        .action-dropdown .dropdown-menu p {
            margin: 0 0 10px 0;
            font-size: 0.9rem;
            color: #374151;
        }

        .button-delete-confirm {
            width: 100%;
            border: none;
            background-color: #DC2626;
            color: white;
            padding: 8px;
            border-radius: 6px;
            font-weight: 500;
            cursor: pointer;
            transition: background-color 0.2s;
        }
        .button-delete-confirm:hover {
            background-color: #b91c1c;
        }

        /* UPDATED DROPDOWN STYLES */
        .inline-dropdown {
          /* Inherited text styles */
          font-family: inherit;
          font-size: inherit;
          font-weight: inherit;
          color: inherit;

          /* Reset browser defaults */
          background-color: transparent;
          border: none;
          outline: none;
          cursor: pointer;
          padding: 0;
          margin: 0;

          /* NEW: Fixes the alignment and arrow position */
          display: inline-block;
          width: auto;
          vertical-align: baseline;
        }

        /* Removes the outline that appears when you click the dropdown */
        .inline-dropdown:focus {
          outline: none;
        }

        /* Optional styling for the dropdown options menu itself */
        .inline-dropdown option {
          color: #333; /* Standard dark text for the opened menu */
          background: #fff; /* White background for the opened menu */
          font-size: 16px; /* A standard readable size for the options */
        }

/* --- Responsive Styles --- */

    /* Desktop and larger screens */
        @media (min-width: 640px) {
            .user-name {
                display: block;
            }
            .header-container {
                padding-left: 1.5rem;
                padding-right: 1.5rem;
            }
            .page-wrapper {
                padding: 1.5rem;
            }
            .username {
                display: block; /* Show username on larger screens */
            }

            .long-title,
            .long-value {
                display: inline;
              }
            .short-title,
            .short-value {
                display: none;
              }

        }
        @media (max-width: 840px) { /* screens */

            .long-title {
                display: none;
              }
            .short-title {
                display: inline;
              }
        }
        
        /* Widescreen Mobile / Tablets (up to 768px) */
        @media (max-width: 768px) {
            /* Bring all table elements closer to each other */
            .data-table th, .data-table td,
            .futures-table th, .futures-table td {
                padding: 0.5rem 0.35rem; /* Shrink horizontal padding */
                font-size: 0.85rem; /* Slightly reduce text size to prevent wrapping */
            }

            /* Tighten the gap between the Edit and Delete buttons */
            .action-buttons {
                display: flex;
                gap: 0.25rem;
            }
        }

        @media (max-width: 639px) { /* sm screens */

            .header-container {
                padding-left: 1.5rem; /* 24px */
                padding-right: 1.5rem; /* 24px */
            }
            .page-wrapper {
                padding: 1rem;
            }
            .card {
                padding: 1rem;
                margin-bottom: 1rem;
            }
            .performance-value {
                font-size: 1.875rem;
            }
            .graph-container {
                height: 150px;
            }

            .data-table th, .data-table td {
                padding: 0.5rem 0.65rem;
            }

            .futures-table th, .futures-table td {
                padding: 0.5rem 0.5rem;
            }

            .data-table-logs th, .data-table-logs td {
                padding: 0.5rem 0.75rem;

            }
            /* 1. Hide the original "Trading Pair" and "Exchange" table headers */
            .data-table thead tr th:nth-child(2),
            .data-table thead tr th:nth-child(4) {
                display: none;
            }

            /* 2. Hide the original "Exchange" data cells */
            .data-table tbody tr td:nth-child(4) {
                display: none;
            }

            /* 3. Make the new "Trading Pair" text visible and style it */
            .data-table tbody tr td:nth-child(1){
                display: block;
                padding: 0rem;
                /* Limit to roughly 7 characters and add ... */
                max-width: 7ch;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;

            }

            .data-table tbody tr td:nth-child(2) {
                all: unset; /* Remove default styles */
                display: block;
                border-spacing: 0;
                font-size: 0.6em; /* Slightly bumped up for readability */
                padding: 0rem;
                /* Limit long pairs like 1000000CHEEMSUSDT */
                max-width: 15ch;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }

            .data-table-edit thead th:nth-child(2),
            .data-table-edit thead th:nth-child(3),
            .data-table-edit thead th:nth-child(4),
            .data-table-edit thead th:nth-child(5),
            .data-table-edit tbody tr td:nth-child(6),
            .data-table-tradingview thead th:nth-child(2),
            .data-table-tradingview tbody tr td:nth-child(2) {
                display: none;
            }

            .data-table-edit thead th:nth-child(1) {
                height: 2.28rem;
            }

            .title {
                display: none;
            }
            .no-title {
                display: inline;
            }

            .data-table-edit tbody tr td {
                display: grid;
                gap:0.5rem;
                grid-template-columns:10ch auto;
                padding: 0.5rem 0.75rem;
                justify-items: start;
                align-items: center;

            }

            .data-table-edit tbody td::before {
                content: attr(data-cell) ": ";
                padding: 0.5rem 0.75rem;
                text-align: right;
                font-size: 0.85rem; /* text-xs */
                line-height: 1rem;
                font-weight: 500; /* font-medium */
                text-transform: uppercase;
                letter-spacing: 0.05em; /* tracking-wider */
            }

           .form-edit input[type="text"],
           .form-edit select {
                width: 95%; /* Full width of its container */
                padding: 12px; /* Padding inside the input */
                box-sizing: border-box; /* Include padding in element's total width and height */
                float: right;

            }
           .form-tradingview input[type="text"],
           .form-tradingview textarea {
                width: 100%; /* Full width of its container */
                padding: 12px; /* Padding inside the input */
                box-sizing: border-box; /* Include padding in element's total width and height */
                float: center;

            }
            .details-button {
                padding: 0.375rem 0.75rem;
                font-size: 0.8rem;
            }

            .graph-toggle-btn {
                padding: 0.375rem 0.75rem;
                font-size: 0.8rem;
            }
            .tabs-nav {
                gap: 2px; /* Keeps them right next to each other */
                justify-content: space-between;
                display: flex;
                width: 100%; /* Ensures the row takes up the full card width */
            }

            .tab-button {
                padding: 0.3rem; /* Equal gray space on top, bottom, and sides */
                font-size: 0.75rem;
                text-align: center; /* Centers the text perfectly */
                flex: 1; /* Magic trick: Makes every button the exact same size! */
                border-radius: 0.375rem; /* Keeps the rounded corners nice */
            }

            .long-value {
                display: none;
              }
            .short-value {
                display: inline;
              }

        }

        @media (min-width: 1024px) { /* lg screens */
            .header-container {
                padding-left: 2rem; /* 32px */
                padding-right: 2rem; /* 32px */
            }
            .page-wrapper {
                padding: 2rem;
            }
        }

/* ----------------------END NEW Styles FOR MAIN PAGES ---------------------------------------- */


/* OLD MY General Styles */

        input[type="text"],
        select {
            width: 100%;;
            padding: 1px;
            border: 1px solid #ddd;
            border-radius: 4px;
        }

        input[type="tabledata"] {
            border: none; /* Remove border around input */
            background-color: transparent; /* Remove background */
            outline: none; /* Remove focus outline */
            width: 100%;
            font-size: 1em;
            padding: 1px;
        }

        input[type="tabledatahidden"] {
            overflow: hidden;
            font-size: 0.0001px;
            border: none; /* Remove border around input */
            background-color: transparent; /* Remove background */
            outline: none; /* Remove focus outline */
            width: 100%;
            padding: 1px;
        }

        form {
            gap: 5px; /* Add space between the groups */
        }
        .button {
            margin: 0;
            display: flex;
            align-items: center;
            justify-content:  space-evenly;
        }
        .small button{
            margin: 0;
            padding-left: 1px;
            padding-right: 1px;
            height: 26px;
        }
        .small button td{
            display: flex; /* Arrange elements in a line */
        }
        .button-cell-left  {
            display: flex;
            justify-content: space-between;
            flex-direction: row;
        }

        .button-cell-right  {
            display: flex;
            justify-content: space-between;
            flex-direction: row-reverse;
        }

        .hidden-column {
        overflow: hidden;
        font-size: 0.0001px;

        }

        /* Header Styles */
        .header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            background-color: #343a40;
            padding: 10px 10px;
            color: white;
            width: 80%;
            margin: 20px auto;
            font-size: 0.9em;
            min-width: 400px;
            border-radius: 5px 5px 0px 0px;
            overflow: hidden;
            box-shadow: 0 0px 20px rgba(0, 0, 0, 0.2);

        }

        .header .logo {
            display: flex;
            align-items: center;
        }

        .header .logo img {
            height: 40px;
            margin-right: 10px;
        }

        .header .logo span {
            font-size: 20px;
            font-weight: bold;
        }

        .header .nav {
            display: flex;
            gap: 20px;

        }

        .header .nav a {
            text-decoration: none;
            color: white;
            font-size: 16px;
            transition: color 0.3s;
        }

        .header .nav a:hover {
            color: #FFD700; /* Gold highlight for hover */
        }

        .header .icons {
            display: flex;
            gap: 20px;
        }

        .header .icons img {
            height: 40px;
            cursor: pointer;
        }
         .signal_error {
            color:#ff0000;
        }
        /* NEW Container Styles */
         .bot-container  {
            width: 80%;
            min-width: 350px;
            margin: 20px auto;
            border-radius: 5px 5px 5px 5px;
            box-shadow: 0 0px 20px rgba(0, 0, 0, 0.2);
            overflow-y: auto;
         }
         .log-container  {
            height: 500px;
            width: 80%;
            min-width: 350px;
            margin: 20px auto;
            border-radius: 5px 5px 5px 5px;
            box-shadow: 0 0px 20px rgba(0, 0, 0, 0.2);
            scroll-snap-type: y mandatory;
            overflow-y: auto;
         }
         .log-container h2,
         .bot-container h2 {
            padding: 0px 15px;

        }
        /* Total Value Table Styles */
        .value-nav {
            all: unset; /* Remove default button styles */
            border-collapse: collapse;
            border-spacing: 0;
            font-size: 0.7em;
            padding: 0px;
        }

        .value-nav th,
        .value-nav td{
            padding: 0;
            border-spacing: 0;
            background: #f3f3f3;
            width: 25px; /* Set square size */
            height: 25px; /* Set square size */
            text-align: center;
        }

        .value-nav  td:first-child {
            background:transparent; /* Remove background */
        }

        .value-nav  td:nth-child(2) {
            padding-left: 1px;
            border-radius: 5px 0px 0px 5px;
        }
        .value-nav td:last-child {
            padding-right: 1px;
            border-radius: 0px 5px 5px 0px;
        }
        .value-nav td button {
            all: unset; /* Remove default button styles */
            display: block;
            width: 100%;
            height: 100%;
            text-align: center;
        }

        /* Apply hover effect only when clicked */
        .value-nav td button:focus {
            font-weight:bold;
            background: #e3e3e3;
            color: #000;
            border-radius: 5px; /* Rounded corners */
        }


        /* NEW Table Styles */
        .log-table,
        .bot-table {
            border-collapse: collapse;
            width: 100%;
            min-width: 100px;
            font-size: 0.9em;
        }
        .log-table thead tr,
        .bot-table thead tr {
            background-color:#343a40;
            color:#ffffff;
            text-align: left;
            font-weight: bold;
            position: sticky;
            top: 0; /* Keeps the element stuck at the top of the container */

        }

        .log-table th,
        .log-table td{
            padding: 1px 20px;
            white-space: nowrap; /* Prevent text wrapping */
        }

        .bot-table th,
        .bot-table td{
            padding: 1px 20px;
        }

        .log-table tbody tr:hover td,
        .bot-table tbody tr:hover td {
            background: #e3e3e3;
            color: #000;
        }
        .log-table tbody tr,
        .bot-table tbody tr, {
            border-bottom: 1px solid #dddddd;
        }

         .log-table tbody tr:nth-of-type(even),
         .bot-table tbody tr:nth-of-type(even) {
            background-color:#f3f3f3;
        }
         .log-table tbody tr:last-of-type,
         .bot-table tbody tr:last-of-type {
            border-bottom: 2px solid #343a40;
        }
         .log-table tbody tr:active-row,
         .bot-table tbody tr:active-row {
            font-weight:bold;
            color:#ff0000;
        }