/* File: staticfiles/css/styles.css */

/* Custom Fonts */
@font-face {
    font-family: 'Avenir Next';
    src: url('/terminal/static/fonts/AvenirNextLTPro-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'Avenir Next';
    src: url('/terminal/static/fonts/AvenirNextLTPro-It.otf') format('opentype');
    font-weight: normal;
    font-style: italic;
}
@font-face {
    font-family: 'Avenir Next';
    src: url('/terminal/static/fonts/AvenirNextLTPro-Demi.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
}
@font-face {
    font-family: 'Avenir Next';
    src: url('/terminal/static/fonts/AvenirNextLTPro-Bold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
}
@font-face {
    font-family: 'SFMono';
    src: url('/terminal/static/fonts/SFMonoRegular.woff') format('woff'),
         url('/terminal/static/fonts/SFMonoRegularItalic.woff') format('woff'),
         url('/terminal/static/fonts/SFMonoBold.woff') format('woff'),
         url('/terminal/static/fonts/SFMonoBoldItalic.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'SFMono';
    src: url('/terminal/static/fonts/SFMonoRegularItalic.woff') format('woff');
    font-weight: normal;
    font-style: italic;
}
@font-face {
    font-family: 'SFMono';
    src: url('/terminal/static/fonts/SFMonoBold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
}
@font-face {
    font-family: 'SFMono';
    src: url('/terminal/static/fonts/SFMonoBoldItalic.woff') format('woff');
    font-weight: bold;
    font-style: italic;
}
@font-face {
    font-family: 'Rancho';
    src: url('/terminal/static/fonts/Rancho-Regular.ttf') format('truetype');
}
@font-face {
    font-family: 'IBM Plex Sans';
    src: url('/terminal/static/fonts/IBMPlexSans-VariableFont_wdth_wght.woff') format('woff');
    font-weight: 100 900;
    font-style: normal;
}
@font-face {
    font-family: 'IBM Plex Sans';
    src: url('/terminal/static/fonts/IBMPlexSans-Italic-VariableFont_wdth_wght.woff') format('woff');
    font-weight: 100 900;
    font-style: italic;
}

/* =========================================================
   DARK THEME — slate palette matching the login page
   #0f172a  deep navy    (page bg)
   #1a1f35  mid navy     (content bg)
   #1e293b  card/panel   (surface)
   #334155  borders
   #475569  muted borders
   #64748b  placeholder/subtle text
   #94a3b8  secondary text
   #cbd5e1  body text
   #e2e8f0  heading text
   #0FFF50  brand green
   #3b82f6  accent blue
   ========================================================= */

/* Global Body Styling */
body {
    font-family: 'Avenir Next', sans-serif;
    font-size: 16px;
    background-color: #0f172a;
    color: #cbd5e1;
    margin: 0;
    padding: 0;
}

.content {
    min-height: 100vh;
}

/* Heading Styles */
h1 {
    font-family: 'Avenir Next', sans-serif;
    font-size: 32px;
    font-weight: bold;
    margin: 0.5em 0;
    color: #e2e8f0;
}

h2 {
    font-family: 'Avenir Next', sans-serif;
    font-size: 28px;
    font-weight: bold;
    margin: 0.5em 0;
    color: #e2e8f0;
}

h3 {
    font-family: 'Avenir Next', sans-serif;
    font-size: 18px;
    font-weight: bold;
    margin: 0.5em 0;
    color: #e2e8f0;
}

h4 {
    font-family: 'Avenir Next', sans-serif;
    font-size: 16px;
    font-weight: 600;
    margin: 0.5em 0;
    color: #e2e8f0;
}

h5 {
    font-family: 'Avenir Next', sans-serif;
    font-size: 14px;
    font-weight: 600;
    margin: 0.5em 0;
    color: #e2e8f0;
}

.small-text {
    font-size: 0.75rem;
    color: #94a3b8;
    line-height: 1.4;
    font-weight: normal;
}

/* Input Styles */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="search"],
textarea,
select {
    font-family: 'Avenir Next', sans-serif;
    font-size: 16px;
    padding: 10px 12px;
    background-color: #1e293b;
    color: #e2e8f0;
    border: 2px solid #334155;
    border-radius: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
}

/* Focus State */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15), 0 4px 12px rgba(59, 130, 246, 0.2);
    background-color: #1e3a5f;
}

/* Hover State */
input[type="text"]:hover:not(:focus),
input[type="email"]:hover:not(:focus),
input[type="password"]:hover:not(:focus),
input[type="number"]:hover:not(:focus),
input[type="date"]:hover:not(:focus),
input[type="search"]:hover:not(:focus),
textarea:hover:not(:focus),
select:hover:not(:focus) {
    border-color: #475569;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Disabled State */
input:disabled,
textarea:disabled,
select:disabled {
    background-color: #0f172a;
    color: #475569;
    cursor: not-allowed;
    border-color: #1e293b;
}

/* Placeholder Styling */
input::placeholder,
textarea::placeholder {
    color: #475569;
    font-style: italic;
}

/* TextArea specific */
textarea {
    resize: vertical;
    min-height: 100px;
    font-family: 'SFMono', monospace;
}

/* Select/Dropdown */
select {
    border-radius: 20px;
    background-color: #1e293b;
    border: 2px solid #334155;
    padding: 10px 12px;
    cursor: pointer;
    color: #e2e8f0;
}
select::after {
    content: '▼';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

/* Brand - Rancho Font */
.brand {
    font-family: 'Rancho', sans-serif;
    color: #0FFF50;
    font-size: 2em;
    font-weight: bolder;
}

.brand sup {
    font-size: 0.6em;
    vertical-align: super;
    line-height: 0;
}

/* Placeholder container with background image */
#image_container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 70vh;
}

/* Placeholder with text overlay */
#placeholder_div {
    width: 33%;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
    text-align: center;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    min-height: clamp(300px, 30vh, 600px);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

#placeholder_div::before {
    content: attr(data-text);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #94a3b8;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    padding: 20px;
    line-height: 1.6;
    max-width: 90%;
}

#placeholder_div.hidden {
    display: none;
}

/* =========================================================
   iMaxTable — Clean dark card, no borders, CodePen-style
   Same bg for thead + tbody, rgba(0,0,0,0.2) for even rows,
   blue hover as complement, zero grid lines
   ========================================================= */

/* Wrapper: rounded card with shadow */
#imaxTable_wrapper {
    background-color: #1e293b;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
    padding: 16px 20px 12px;
}

/* Table base */
#imaxTable {
    width: 100%;
    border-collapse: collapse;
    font-family: 'SFMono', monospace;
    font-size: 13px;
    background-color: #1e293b;
}

/* Header — same bg as body, tiny muted uppercase labels */
#imaxTable thead {
    background-color: #1e293b;
}

#imaxTable thead th {
    font-family: 'Avenir Next', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    background-color: #1e293b;
    color: #cbd5e1;
    text-align: left;
    padding: 10px 24px;
    border: none !important;
    white-space: nowrap;
    background-image: none !important;
    cursor: pointer;
}

/* Sort state */
#imaxTable thead th.sorting_asc  { color: #60a5fa; }
#imaxTable thead th.sorting_desc { color: #60a5fa; }
#imaxTable thead th.sorting      { color: #cbd5e1; }

#imaxTable thead th.sorting_asc::after  { content: ' ↑'; color: #0FFF50; font-size: 10px; }
#imaxTable thead th.sorting_desc::after { content: ' ↓'; color: #0FFF50; font-size: 10px; }
#imaxTable thead th.sorting::after      { content: ' ↕'; color: #475569; font-size: 10px; }

/* Body */
#imaxTable tbody {
    background-color: #1e293b;
}

#imaxTable tbody td {
    font-family: 'SFMono', monospace;
    font-size: 13px;
    padding: 14px 24px;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
    text-align: left;
    color: #94a3b8;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* Solid bg on both row types — essential for smooth transitions */
#imaxTable tbody tr:nth-child(odd) td {
    background-color: #1e293b;
}

#imaxTable tbody tr:nth-child(even) td {
    background-color: #18212f;
}

/* Kill DataTables sorted-column highlight — match DT's own .odd/.even classes */
#imaxTable tbody tr.odd > td.sorting_1,
#imaxTable tbody tr.odd > td.sorting_2,
#imaxTable tbody tr.odd > td.sorting_3,
#imaxTable tbody tr:nth-child(odd) td.sorting_1,
#imaxTable tbody tr:nth-child(odd) td.sorting_2,
#imaxTable tbody tr:nth-child(odd) td.sorting_3 {
    background-color: #1e293b !important;
}

#imaxTable tbody tr.even > td.sorting_1,
#imaxTable tbody tr.even > td.sorting_2,
#imaxTable tbody tr.even > td.sorting_3,
#imaxTable tbody tr:nth-child(even) td.sorting_1,
#imaxTable tbody tr:nth-child(even) td.sorting_2,
#imaxTable tbody tr:nth-child(even) td.sorting_3 {
    background-color: #18212f !important;
}

#imaxTable tbody tr:hover > td.sorting_1,
#imaxTable tbody tr:hover > td.sorting_2,
#imaxTable tbody tr:hover > td.sorting_3 {
    background-color: #0f172a !important;
}

/* Hover — solid dark navy + blue text, no transparency surprises */
#imaxTable tbody tr:hover td {
    background-color: #0f172a !important;
    color: #60a5fa !important;
    cursor: pointer;
}

/* Links */
#imaxTable a {
    color: #60a5fa;
    text-decoration: none;
    font-family: 'SFMono', monospace;
    font-size: 13px;
}

#imaxTable a:hover {
    color: #93c5fd;
    text-decoration: underline;
}

/* =========================================================
   DataTables UI — length, filter, info, pagination
   All styled to sit cleanly on the dark card
   ========================================================= */

.dataTables_wrapper {
    font-family: 'Avenir Next', sans-serif;
    font-size: 12px;
    color: #64748b;
}

/* Top controls row */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    padding-bottom: 14px;
}

.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    font-size: 12px;
}

/* Length select + search input */
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    font-family: 'SFMono', monospace;
    font-size: 12px;
    background-color: rgba(0, 0, 0, 0.25);
    color: #cbd5e1;
    border: 1px solid #334155;
    border-radius: 6px;
    padding: 5px 10px;
    text-transform: none;
    box-shadow: none;
    outline: none;
    transition: border-color 0.2s;
}

.dataTables_wrapper .dataTables_length select:focus,
.dataTables_wrapper .dataTables_filter input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

/* Bottom info + pagination */
.dataTables_wrapper .dataTables_info {
    padding-top: 14px;
    color: #94a3b8;
    font-size: 11px;
}

.dataTables_wrapper .dataTables_paginate {
    padding-top: 10px;
}

/* Pagination buttons */
.dataTables_wrapper .dataTables_paginate .paginate_button {
    font-family: 'SFMono', monospace;
    font-size: 11px;
    background: none !important;
    border: 1px solid #334155 !important;
    border-radius: 5px;
    color: #94a3b8 !important;
    padding: 4px 10px;
    margin: 0 2px;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: none !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: rgba(59, 130, 246, 0.1) !important;
    border-color: #3b82f6 !important;
    color: #93c5fd !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: rgba(59, 130, 246, 0.18) !important;
    border-color: #3b82f6 !important;
    color: #60a5fa !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    background: none !important;
    border-color: #1e293b !important;
    color: #334155 !important;
    cursor: default;
}

/* Processing overlay */
.dataTables_wrapper .dataTables_processing {
    background: #1e293b;
    color: #60a5fa;
    border: 1px solid #334155;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

/* Selected row */
#imaxTable tbody tr.selected td {
    background-color: rgba(59, 130, 246, 0.15) !important;
    color: #e2e8f0 !important;
}

/* AI Response Pane */
#ta_response {
    flex: 2;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

#ta_response h3 {
    color: #0FFF50;
    margin-bottom: 12px;
    font-size: 20px;
}

/* AI Status indicator */
#ai_status {
    margin-bottom: 12px;
    font-size: 0.9em;
    color: #94a3b8;
    padding: 8px;
    border-left: 3px solid #0FFF50;
    padding-left: 12px;
    font-style: italic;
}

/* AI Output container */
#ai_output {
    flex: 1;
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    letter-spacing: 0.3px;
    color: #cbd5e1;
    background: linear-gradient(to bottom, #1a1f35 0%, #1e293b 100%);
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 16px;
    min-height: 300px;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-y: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) inset;
}

/* Scrollbar styling */
#ai_output::-webkit-scrollbar {
    width: 8px;
}

#ai_output::-webkit-scrollbar-track {
    background: #0f172a;
    border-radius: 4px;
}

#ai_output::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}

#ai_output::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

#ai_output strong {
    color: #60a5fa;
    font-weight: 600;
}

#ai_output em {
    color: #34d399;
    font-style: italic;
}

#ai_output code {
    background-color: #0f172a;
    color: #fb923c;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'SFMono', monospace;
    font-size: 14px;
}

/* AI Provider Selection */
.ai-provider-section {
    margin-top: 15px;
}

.ai-provider-fieldset {
    border: 1px solid #334155;
    border-radius: 6px;
    padding: 16px;
    background-color: #1e293b;
}

.ai-provider-fieldset legend {
    font-weight: 600;
    color: #0FFF50;
    padding: 0 8px;
}

.ai-provider-group {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.ai-provider-group:last-child {
    margin-bottom: 0;
}

.ai-provider-group input[type="radio"] {
    margin-right: 12px;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.ai-provider-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #cbd5e1;
    font-weight: 500;
}

.ai-provider-group img {
    height: 16px;
    margin-right: 10px;
    object-fit: contain;
}

/* OTC Dashboard Layout */
#dash_parent {
    display: flex;
    flex-direction: row;
    gap: 16px;
    height: 100vh;
    padding: 20px;
    box-sizing: border-box;
}

#dash_left {
    flex: 1;
    padding: 20px;
    border-right: 1px solid #334155;
    background-color: #1a1f35;
    overflow-y: auto;
}

#dash_right {
    flex: 1.5;
    padding: 20px;
    background-color: #0f172a;
    overflow-y: auto;
}

#ta_checkdiv {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 6px 12px;
    font-size: 14px;
    margin-top: 10px;
}

#json_output {
    width: 100%;
    height: 70vh;
    font-family: 'SFMono', monospace;
    font-size: 13px;
    background-color: #0f172a;
    border: 1px solid #334155;
    border-radius: 6px;
    padding: 10px;
    overflow-y: auto;
    color: #cbd5e1;
}

/* Dashboard page welcome tab */
#dashboard-welcome h1 {
    color: #e2e8f0 !important;
}

#dashboard-welcome p {
    color: #cbd5e1 !important;
}

#id-mode {
    background-color: #1e293b;
    padding: 20px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
    border: 1px solid #334155;
}

#eod-mode {
    background-color: #162032;
    padding: 20px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
    border: 1px solid #334155;
}

#research-mode {
    background-color: #111827;
    padding: 20px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
    border: 1px solid #334155;
}

/* Tab content text */
#id-mode,
#eod-mode,
#research-mode {
    color: #e2e8f0;
}

#id-mode p,
#eod-mode p,
#research-mode p {
    color: #cbd5e1;
}

#id-mode ol,
#eod-mode ol,
#research-mode ol {
    color: #cbd5e1;
}

#id-mode li,
#eod-mode li,
#research-mode li {
    color: #cbd5e1;
}

hr {
    border: none;
    border-top: 1px solid #334155;
    margin: 16px 0;
    opacity: 0.5;
}

/* Button Styles */
button {
    background-color: #2563eb;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 14px;
    cursor: pointer;
    font-weight: 600;
}

button:hover {
    background-color: #1d4ed8;
}

.btn-disabled {
    background-color: #334155 !important;
    color: #64748b !important;
    cursor: not-allowed !important;
    opacity: 0.6;
}

.btn-track {
    background-color: #2563eb;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 14px;
    cursor: pointer;
    font-weight: 600;
}

.btn-track:hover {
    background-color: #1d4ed8;
}

.btn-abort {
    background-color: #d97706;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 14px;
    cursor: pointer;
    font-weight: 600;
}

.btn-abort:hover {
    background-color: #b45309;
}

.btn-drop-disabled {
    background-color: #ef4444;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 14px;
    cursor: pointer;
    font-weight: 600;
}

.btn-drop-disabled:hover {
    background-color: #f87171;
    color: #450a0a;
}

.btn-drop {
    background-color: #475569;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 14px;
    cursor: pointer;
    font-weight: 600;
}

.btn-drop:hover {
    background-color: #334155;
}

.btn-upstox {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #542087;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 14px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
}

.btn-upstox img {
    width: 80px;
    height: 20px;
    margin-left: 8px;
}

.btn-upstox:hover {
    background-color: #3d1866;
}

.btn-control {
    background-color: #1e293b;
    color: #94a3b8;
    border: 1px solid #334155;
    border-radius: 8px;
    min-width: 50px;
    height: 44px;
    font-size: 1.5em;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-control:hover {
    background-color: #334155;
    color: #e2e8f0;
}

.btn-control:active {
    transform: scale(0.95);
}

/* Glyph colours — semantic, not garish */
[id$="_start"]   { color: #22c55e; }
[id$="_stop"]    { color: #ef4444; }
[id$="_restart"] { color: #f59e0b; }
[id$="_status"]  { color: #60a5fa; }

[id$="_start"]:hover   { color: #4ade80; }
[id$="_stop"]:hover    { color: #f87171; }
[id$="_restart"]:hover { color: #fcd34d; }
[id$="_status"]:hover  { color: #93c5fd; }

/* Text Utilities */
#ra_symbol {
    text-transform: uppercase;
}

/* Responsive */
@media (max-width: 900px) {
    #dash_parent {
        flex-direction: column;
        height: auto;
    }
    #dash_left {
        border-right: none;
        border-bottom: 1px solid #334155;
    }
}

/* =========================================================
   UPTRADE — Tables, Cards, Buttons, Status badges
   ========================================================= */

/* Uptrade table */
/* Uptrade DataTable wrapper — no card (already inside .uptrade-card) */
.dataTables_wrapper:has(.uptrade-table) {
    background-color: #1e293b;
}

.uptrade-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'SFMono', monospace;
    font-size: 13px;
    background-color: #1e293b;
}

.uptrade-table thead {
    background-color: #1e293b;
}

.uptrade-table thead th {
    font-family: 'Avenir Next', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    background-color: #1e293b;
    color: #cbd5e1;
    text-align: left;
    padding: 10px 24px;
    border: none !important;
    white-space: nowrap;
    background-image: none !important;
    cursor: pointer;
}

.uptrade-table thead th.sorting_asc  { color: #60a5fa; }
.uptrade-table thead th.sorting_desc { color: #60a5fa; }
.uptrade-table thead th.sorting      { color: #cbd5e1; }

.uptrade-table thead th.sorting_asc::after  { content: ' ↑'; color: #0FFF50; font-size: 10px; }
.uptrade-table thead th.sorting_desc::after { content: ' ↓'; color: #0FFF50; font-size: 10px; }
.uptrade-table thead th.sorting::after      { content: ' ↕'; color: #475569; font-size: 10px; }

.uptrade-table tbody {
    background-color: #1e293b;
}

.uptrade-table tbody td {
    font-family: 'SFMono', monospace;
    font-size: 13px;
    padding: 14px 24px;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
    text-align: left;
    color: #94a3b8;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.uptrade-table tbody tr:nth-child(odd) td {
    background-color: #1e293b;
}

.uptrade-table tbody tr:nth-child(even) td {
    background-color: #18212f;
}

/* Kill DataTables sorted-column highlight — match DT's own .odd/.even classes */
.uptrade-table tbody tr.odd > td.sorting_1,
.uptrade-table tbody tr.odd > td.sorting_2,
.uptrade-table tbody tr.odd > td.sorting_3,
.uptrade-table tbody tr:nth-child(odd) td.sorting_1,
.uptrade-table tbody tr:nth-child(odd) td.sorting_2,
.uptrade-table tbody tr:nth-child(odd) td.sorting_3 {
    background-color: #1e293b !important;
}

.uptrade-table tbody tr.even > td.sorting_1,
.uptrade-table tbody tr.even > td.sorting_2,
.uptrade-table tbody tr.even > td.sorting_3,
.uptrade-table tbody tr:nth-child(even) td.sorting_1,
.uptrade-table tbody tr:nth-child(even) td.sorting_2,
.uptrade-table tbody tr:nth-child(even) td.sorting_3 {
    background-color: #18212f !important;
}

.uptrade-table tbody tr:hover > td.sorting_1,
.uptrade-table tbody tr:hover > td.sorting_2,
.uptrade-table tbody tr:hover > td.sorting_3 {
    background-color: #0f172a !important;
}

.uptrade-table tbody tr:hover td {
    background-color: #0f172a !important;
    color: #60a5fa !important;
    cursor: pointer;
}

/* Uptrade card container */
.uptrade-card {
    background-color: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.uptrade-card h3 {
    color: #e2e8f0;
    margin-top: 0;
}

.uptrade-card p {
    color: #94a3b8;
}

.uptrade-card label {
    color: #94a3b8;
    font-size: 14px;
}

/* Section heading */
.uptrade-heading {
    font-family: 'Avenir Next', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #e2e8f0;
    margin: 0 0 12px 0;
}

.uptrade-subheading {
    font-family: 'Avenir Next', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #cbd5e1;
    margin: 0 0 8px 0;
}

/* Status badges */
.uptrade-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Avenir Next', sans-serif;
}

.uptrade-badge-enabled  { background-color: #052e16; color: #4ade80; border: 1px solid #166534; }
.uptrade-badge-disabled { background-color: #1e293b; color: #64748b; border: 1px solid #334155; }
.uptrade-badge-stop     { background-color: #450a0a; color: #f87171; border: 1px solid #991b1b; }
.uptrade-badge-warn     { background-color: #422006; color: #fbbf24; border: 1px solid #92400e; }
.uptrade-badge-scanning { background-color: #052e16; color: #4ade80; border: 1px solid #166534;
                          animation: autoscan-pulse 1.8s ease-in-out infinite; }

/* Control bar toggle (ON/OFF knob) */
.ctrl-toggle-label {
    font-size: 0.875rem;
    color: #cbd5e1;
    white-space: nowrap;
    vertical-align: middle;
}
.ctrl-divider {
    display: inline-block;
    width: 1.5rem;
}
.ctrl-toggle {
    position: relative;
    display: inline-block;
    width: 3rem;
    height: 1.375rem;
    cursor: pointer;
    vertical-align: middle;
    flex-shrink: 0;
}
.ctrl-toggle-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.ctrl-toggle-track {
    position: absolute;
    inset: 0;
    border-radius: 9999px;
    background-color: #ef4444;
    transition: background-color 0.2s ease;
}
.ctrl-toggle-input:checked ~ .ctrl-toggle-track {
    background-color: #22c55e;
}
.ctrl-toggle-thumb {
    position: absolute;
    top: 0;
    right: 1.625rem;
    width: 1.375rem;
    height: 1.375rem;
    border-radius: 9999px;
    background: #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.35);
    transition: transform 0.2s ease;
    z-index: 2;
}
.ctrl-toggle-input:checked ~ .ctrl-toggle-thumb {
    transform: translateX(1.625rem);
}
.ctrl-toggle-on,
.ctrl-toggle-off {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.55rem;
    font-weight: 700;
    color: #fff;
    z-index: 1;
    pointer-events: none;
    letter-spacing: 0.05em;
}
.ctrl-toggle-on  { right: 1.75rem; }
.ctrl-toggle-off { right: 0.15rem; }

/* Direction labels */
.uptrade-buy  { color: #4ade80; font-weight: 700; }
.uptrade-sell { color: #f87171; font-weight: 700; }

/* Status labels */
.uptrade-status-pending  { color: #fbbf24; }
.uptrade-status-approved { color: #4ade80; }
.uptrade-status-rejected { color: #f87171; }
.uptrade-status-expired  { color: #475569; }
.uptrade-status-executed { color: #60a5fa; }
.uptrade-status-failed   { color: #f87171; }

/* Action buttons in tables */
.uptrade-btn {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    margin-right: 4px;
    transition: background-color 0.15s ease, transform 0.1s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.uptrade-btn:active { transform: scale(0.96); }

.uptrade-btn-approve  { background-color: #22c55e; }
.uptrade-btn-approve:hover { background-color: #4ade80; color: #052e16; }
.uptrade-btn-reject   { background-color: #ef4444; }
.uptrade-btn-reject:hover  { background-color: #f87171; color: #450a0a; }
.uptrade-btn-json     { background-color: #64748b; }
.uptrade-btn-json:hover    { background-color: #94a3b8; color: #0f172a; }
.uptrade-btn-ai       { background-color: #8b5cf6; }
.uptrade-btn-ai:hover      { background-color: #a78bfa; color: #1e0a3c; }
.uptrade-btn-evaluate { background-color: #3b82f6; }
.uptrade-btn-evaluate:hover { background-color: #60a5fa; color: #0c1a2e; }
.uptrade-btn-planexit { background-color: #14b8a6; }
.uptrade-btn-planexit:hover { background-color: #2dd4bf; color: #042f2e; }

/* Profile selector buttons */
.profile-btn {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    border: 2px solid #334155;
    background-color: #1e293b;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.15s ease;
}

.profile-btn:hover {
    border-color: #475569;
    background-color: #1a1f35;
    color: #cbd5e1;
}

.profile-btn.active {
    border-color: #3b82f6;
    background-color: #1e3a5f;
    color: #60a5fa;
}

/* R:R badge */
.uptrade-rr-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background-color: #052e16;
    color: #4ade80;
    border: 1px solid #166534;
}

/* Shared dim-label class — radio labels + reasoning text */
.pane-dim-text {
    color: #94a3b8;
    font-size: 12px;
}

/* Reasoning section */
.uptrade-reasoning summary {
    font-size: 13px;
    cursor: pointer;
}

.uptrade-reasoning summary:hover {
    color: #cbd5e1;
}

.uptrade-reasoning ul {
    margin-top: 6px;
    font-size: 12px;
    list-style-type: disc;
    padding-left: 20px;
}

.uptrade-reasoning li {
    margin-bottom: 2px;
}

/* Kill Switch */
.btn-kill {
    background-color: #991b1b;
    color: #fff;
    margin-left: 8px;
}

.btn-kill:hover {
    background-color: #b91c1c;
}

/* Trading toggle button */
.btn-trade-toggle {
    background-color: #1d4ed8;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    margin-right: 4px;
    transition: background-color 0.2s;
}

.btn-trade-toggle:hover {
    background-color: #2563eb;
}

/* Square-off toggle */
.sqoff-toggle {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 22px;
}
.sqoff-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.sqoff-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #334155;
    border-radius: 22px;
    transition: background 0.2s;
}
.sqoff-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background: #94a3b8;
    border-radius: 50%;
    transition: transform 0.2s;
}
.sqoff-toggle input:checked + .sqoff-slider {
    background: #dc2626;
}
.sqoff-toggle input:checked + .sqoff-slider:before {
    transform: translateX(24px);
    background: #fff;
}

/* Breakout Finder button */
.btn-autoscan {
    background-color: #d97706;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    margin-right: 4px;
    transition: background-color 0.2s;
}

.btn-autoscan:hover {
    background-color: #b45309;
}

.btn-autoscan.active {
    background-color: #16a34a;
    animation: autoscan-pulse 1.8s ease-in-out infinite;
}

@keyframes autoscan-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.65; }
}

/* Breakout alert popup */
.breakout-alert {
    display: none;
    position: fixed;
    top: 72px;
    right: 24px;
    width: 340px;
    background: #1e293b;
    border: 2px solid #16a34a;
    border-radius: 8px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.5);
    z-index: 9998;
    padding: 14px 16px;
}

.breakout-alert-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.breakout-alert-title {
    font-weight: 700;
    font-size: 14px;
    color: #4ade80;
}

.breakout-alert ul {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
    color: #cbd5e1;
    line-height: 1.7;
}

.breakout-alert-footer {
    margin-top: 10px;
    font-size: 11px;
    color: #475569;
}

/* Order placement two-column pane */
.uptrade-order-pane {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 24px;
    margin-top: 16px;
    align-items: start;
}

.uptrade-order-left {
    border-right: 1px solid #334155;
    padding-right: 20px;
}

.uptrade-order-left .profile-label {
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

@media (max-width: 768px) {
    .uptrade-order-pane {
        grid-template-columns: 1fr;
    }
    .uptrade-order-left {
        border-right: none;
        border-bottom: 1px solid #334155;
        padding-right: 0;
        padding-bottom: 16px;
    }
}

/* JSON modal — dark */
.uptrade-json-modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
}

.uptrade-json-modal {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    width: 75%;
    max-height: 80vh;
    overflow-y: auto;
    background: #1e293b;
    border: 1px solid #475569;
    border-radius: 8px;
    padding: 20px;
}

.uptrade-json-modal h3 {
    color: #e2e8f0;
    margin-top: 0;
}

.uptrade-json-modal pre {
    font-size: 12px;
    color: #cbd5e1;
    background: #0f172a;
    padding: 12px;
    border-radius: 6px;
    overflow-x: auto;
    white-space: pre-wrap;
}

.uptrade-json-close {
    color: #94a3b8;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.uptrade-json-close:hover {
    color: #e2e8f0;
}

/* Text Utilities */
#ra_symbol {
    text-transform: uppercase;
}

/* Responsive */
@media (max-width: 900px) {
    #dash_parent {
        flex-direction: column;
        height: auto;
    }
    #dash_left {
        border-right: none;
        border-bottom: 1px solid #334155;
    }
}

/* ========= LOGIN PAGE ========= */

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1a1f35 100%);
    padding: 20px;
}

.login-card {
    background: linear-gradient(to bottom, #1e293b 0%, #0f172a 100%);
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(59, 130, 246, 0.05);
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-header h1 {
    font-family: 'Rancho', sans-serif;
    font-size: 36px;
    color: #0FFF50;
    margin: 0;
    margin-bottom: 8px;
    font-weight: bold;
    text-shadow: 0 0 20px rgba(15, 255, 80, 0.3);
}

.login-header p {
    color: #94a3b8;
    font-size: 14px;
    margin: 0;
    font-style: italic;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input {
    background-color: #ffffff;
    color: #333;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    padding: 12px 14px;
    font-size: 16px;
    font-family: 'Avenir Next', sans-serif;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1), 0 4px 12px rgba(59, 130, 246, 0.15);
    background-color: #fafbff;
}

.form-group input::placeholder {
    color: #94a3b8;
}

.submit-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.submit-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

.submit-btn:active {
    transform: translateY(0);
}

.hidden-input {
    display: none;
}

/* ── Output Pill: missing Tailwind utilities ─────────────────────── */
.inline-flex        { display: inline-flex; }
.select-none        { user-select: none; -webkit-user-select: none; }
.align-middle       { vertical-align: middle; }
.whitespace-nowrap  { white-space: nowrap; }
.wrap-text          { white-space: normal !important; word-break: break-word; }
.border-l           { border-left-width: 1px; border-left-style: solid; }
.px-3               { padding-left: 0.75rem; padding-right: 0.75rem; }
.bg-blue-600        { background-color: #2563eb; }
.cursor-not-allowed { cursor: not-allowed; }
.opacity-50         { opacity: 0.5; }
.scale-125          { transform: scale(1.25); }

/* ── Mode Segmented Control ──────────────────────────────────────── */
.mode-label-text {
    font-size: 1rem;
    color: #cbd5e1;
    white-space: nowrap;
    vertical-align: middle;
    margin-right: 0.25rem;
}
.mode-toggle-seg {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    vertical-align: middle;
    margin-right: 0.5rem;
    border-radius: 0.375rem;
    overflow: hidden;
}
.mode-toggle-cb {
    display: none;
}
.mode-seg-research {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    background-color: #2563eb;      /* active = blue */
    transition: background-color 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}
.mode-seg-analyse {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    background-color: #1e293b;      /* inactive = dim */
    transition: background-color 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}
/* Checked: Research → dim, Analyse → green */
.mode-toggle-cb:checked ~ .mode-seg-research {
    background-color: #1e293b;
    color: #64748b;
}
.mode-toggle-cb:checked ~ .mode-seg-analyse {
    background-color: #22c55e;
    color: #fff;
}
.mode-seg-disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

/* ── Guardian Agent alert cards ─────────────────────────────────── */
.guardian-bar {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.guardian-card {
    border-radius: 8px;
    padding: 12px 14px;
    border-left: 4px solid #7c3aed;
    background-color: #1a1035;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.guardian-card-exit     { border-left-color: #ef4444; background-color: #1c0a0a; }
.guardian-card-sl       { border-left-color: #f59e0b; background-color: #1c1200; }
.guardian-card-body     { flex: 1; }
.guardian-card-hdr      { font-size: 12px; font-weight: 700; color: #94a3b8;
                           text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.guardian-card-action   { font-size: 14px; font-weight: 700; color: #f1f5f9; margin-bottom: 4px; }
.guardian-card-action-exit { color: #f87171; }
.guardian-card-action-sl   { color: #fbbf24; }
.guardian-card-meta     { font-size: 11px; color: #64748b; margin-bottom: 6px; }
.guardian-card-reason   { font-size: 12px; color: #94a3b8; font-style: italic; }
.guardian-card-btns     { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.guardian-btn-exec      { padding: 5px 12px; font-size: 12px; font-weight: 600;
                           border: none; border-radius: 4px; cursor: pointer;
                           background-color: #ef4444; color: #fff; }
.guardian-btn-exec-sl   { background-color: #d97706; }
.guardian-btn-exec:hover    { background-color: #dc2626; }
.guardian-btn-exec-sl:hover { background-color: #b45309; }
.guardian-btn-dismiss   { padding: 5px 12px; font-size: 12px; font-weight: 600;
                           border: none; border-radius: 4px; cursor: pointer;
                           background-color: #1e293b; color: #64748b; }
.guardian-btn-dismiss:hover { background-color: #334155; color: #94a3b8; }

/* ── Orders page: confluence scan bar ───────────────────────────── */
.scan-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    padding: 6px 0 2px;
    border-top: 1px solid #1e293b;
    min-height: 32px;
    align-items: center;
}
.scan-bar-label {
    font-size: 11px;
    color: #475569;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}
.scan-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    background-color: #1e293b;
    border: 1px solid #334155;
    color: #94a3b8;
    transition: background-color 0.2s, color 0.2s;
}
.scan-pill-buy  { background-color: #052e16; border-color: #166534; color: #4ade80; }
.scan-pill-sell { background-color: #450a0a; border-color: #991b1b; color: #f87171; }
.scan-pill-hold { background-color: #1e293b; border-color: #334155; color: #64748b; }
.scan-pill-sym  { font-weight: 700; }
.scan-pill-meta { font-size: 10px; opacity: 0.75; font-weight: 500; }

/* ── Mega-Menu Nav ───────────────────────────────────────────────── */
.mega-nav {
    background-color: #0f172a;
    position: relative;
    z-index: 200;
    box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

/* Tab buttons */
.mega-tab-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #f1f5f9;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0 1rem;
    height: 52px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    position: relative;
    letter-spacing: 0.02em;
    transition: color 0.15s ease;
}
.mega-tab-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 3px;
    background-color: #FACC15;
    border-radius: 2px 2px 0 0;
    transform: scaleX(0);
    transition: transform 0.25s cubic-bezier(.47,1.64,.38,.87);
}
.mega-group.open .mega-tab-btn {
    color: #FACC15;
}
.mega-group.open .mega-tab-btn::after {
    transform: scaleX(1);
}

/* Click group container */
.mega-group {
    position: static;
    display: inline-block;
}

/* Full-width dropdown panel — same bg as page, gold top border */
.mega-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background-color: #0f172a;
    border-top: 2px solid #FACC15;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    display: flex;
    padding: 0.75rem 1.5rem 1rem;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, visibility 0.18s ease;
}
.mega-group.open .mega-dropdown {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

/* Blue card wrapping the columns */
.mega-card {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0;
    background-color: #1d4ed8;
    border-radius: 10px;
    padding: 1rem 1.25rem 1.1rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    transform: translateY(6px) scale(0.97);
    opacity: 0;
    transition: transform 0.28s cubic-bezier(.47,1.64,.38,.87),
                opacity   0.18s ease;
}
.mega-group.open .mega-card {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Columns */
.mega-col {
    min-width: 170px;
    padding: 0 1.25rem;
    border-right: 1px solid rgba(255,255,255,0.12);
}
.mega-col:last-child {
    border-right: none;
}

/* Column header */
.mega-col-hdr {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #93c5fd;
    margin-bottom: 0.6rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}

/* Links */
.mega-link {
    display: block;
    position: relative;
    overflow: hidden;
    color: #e2e8f0;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.3rem 0.5rem;
    margin: 0 -0.5rem;
    border-radius: 4px;
    text-decoration: none;
    transition: color 0.15s ease;
}
.mega-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(250,204,21,0.18) 0%, transparent 80%);
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    border-radius: 4px;
}
.mega-link:hover {
    color: #FACC15;
}
.mega-link:hover::before {
    transform: translateX(0);
}
