
  :root {
    --panel: #0f0f0f;
    --sidebar: #0a0a0a;
    --border: #222; 
    --text-main: #e5e5e5;
    --text-dim: #888;
    --accent: #00ff9d; 
    --accent-dim: rgba(0, 255, 157, 0.08);
    --error: #ff4444; 
    --error-dim: rgba(255, 68, 68, 0.1);
    --font-mono: 'Roboto Mono', monospace; 
  }

  * { box-sizing: border-box; outline: none; }

  body { margin: 0; padding: 0; overflow: hidden; background: #000; }

  /* =========================================
     AUTOCOMPLETE SEARCH STYLES
     ========================================= */
  .search-wrap { position: relative; width: 100%; }
  .search-results { 
      position: absolute; top: 100%; left: 0; width: 100%; 
      background: #0a0a0a; border: 1px solid var(--accent); border-top: none;
      max-height: 150px; overflow-y: auto; z-index: 5000; display: none;
  }
  .search-item { 
      padding: 8px 12px; cursor: pointer; font-size: 11px; 
      color: #888; border-bottom: 1px solid #222; font-family: var(--font-mono); 
      display: flex; justify-content: space-between;
  }
  .search-item:hover { background: var(--accent-dim); color: #fff; }
  .search-item span.meta { font-size: 9px; color: #444; }
  .search-item:hover span.meta { color: var(--accent); }
  
  /* =========================================
     STRAT INTEL & PLAYBOOK STYLES
     ========================================= */
  .strat-section-header { 
      font-family: var(--font-mono); 
      font-weight: bold; 
      color: var(--accent); 
      background: rgba(0,255,157,0.05); 
      padding: 8px 12px; 
      border-left: 3px solid var(--accent);
      margin: 25px 0 15px 0; 
      font-size: 11px; 
      letter-spacing: 1px; 
      text-transform: uppercase;
  }
  
  .strat-grid { 
      display: grid; 
      grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
      gap: 15px; 
  }
  
  .strat-card { 
      background: #0e0e0e; 
      border: 1px solid #2a2a2a; 
      padding: 15px; 
      border-radius: 6px; 
      display: flex; 
      flex-direction: column; 
      gap: 10px; 
      transition: 0.2s; 
      position: relative; 
  }
  .strat-card:hover { 
      border-color: #555; 
      background: #131313; 
      transform: translateY(-2px); 
  }
  
  .strat-title { 
      color: #fff; 
      font-weight: bold; 
      font-size: 12px; 
      display: flex; 
      justify-content: space-between; 
      align-items:center; 
  }

  .strat-desc { 
      color: #999; 
      font-size: 11px; 
      line-height: 1.5; 
      white-space: pre-wrap; 
      font-family: 'Inter', sans-serif; 
  }
  
  .strat-meta { 
      font-size: 9px; 
      color: #555; 
      font-family: var(--font-mono); 
      border-top: 1px solid #222; 
      padding-top: 8px; 
      margin-top: auto; 
      display: flex; 
      justify-content: space-between; 
      align-items: center; 
  }
  
  .strat-img-box { 
      width: 100%; height: 140px; 
      background: #050505; 
      border: 1px solid #222; overflow: hidden; 
      border-radius: 4px; cursor: zoom-in; position: relative; margin-top: 5px; 
      display: flex; align-items: center; justify-content: center;
  }
  .strat-img { 
      width: 100%; height: 100%; 
      object-fit: contain; 
      opacity: 0.9; transition: 0.3s; 
  }
  .strat-img-box:hover .strat-img { opacity: 1; transform: scale(1.02); }
  .strat-img-box::after { 
      content: "🔍 ZOOM"; 
      position: absolute; bottom: 5px; right: 5px; 
      background: rgba(0,0,0,0.8); color: #fff; 
      font-size: 9px; padding: 3px 6px; 
      font-family: var(--font-mono); pointer-events: none; 
      border-radius: 2px; 
  }
  
  .img-zoom-overlay { 
      position: fixed; inset: 0; z-index: 200000; 
      background: rgba(0,0,0,0.95); 
      display: flex; align-items: center; justify-content: center; 
      cursor: zoom-out; animation: fadeIn 0.2s; 
  }
  .img-zoom-content { 
      max-width: 90%; max-height: 90%; 
      border: 1px solid var(--accent); 
      box-shadow: 0 0 30px rgba(0,255,157,0.2); 
      cursor: zoom-out; 
  }
  
  .strat-del-btn { color: var(--error); cursor: pointer; font-weight: bold; opacity: 0.5; font-family: var(--font-mono); font-size:10px; }
  .strat-del-btn:hover { opacity: 1; }

  .chk-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 5px; margin-top: 5px; max-height: 100px; overflow-y: auto; padding: 5px; border: 1px solid #222; background: #050505; }
  .chk-option { display: flex; align-items: center; gap: 5px; font-size: 10px; color: #888; cursor: pointer; }
  .chk-option input { cursor: pointer; }

  /* =========================================
     ROOT & LAYOUT
     ========================================= */
  #trading-os-root {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: #050505; color: #d4d4d4;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px; z-index: 99999;
    display: flex; flex-direction: column; isolation: isolate;
    overflow: hidden;
  }

  /* FX LAYERS */
  .background-grid {
    position: absolute; inset: 0;
    background-image: 
      linear-gradient(var(--border) 1px, transparent 1px),
      linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 50px 50px; opacity: 0.1; z-index: -1; pointer-events: none;
  }
  .scanlines {
    position: absolute; inset: 0; pointer-events: none; z-index: 5000;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.05) 50%);
    background-size: 100% 3px; opacity: 0.5;
  }
  .crt-overlay {
    position: fixed; inset: 0; background: #000; z-index: 999999;
    animation: turnOn 0.6s ease-in-out forwards; pointer-events: none;
  }
  @keyframes turnOn {
    0% { transform: scale(1, 0.005) translate3d(0, 0, 0); }
    30% { transform: scale(1, 0.005) translate3d(0, 0, 0); opacity: 1; }
    35% { transform: scale(1, 0.005) translate3d(0, 0, 0); opacity: 0; }
    36% { transform: scale(1, 1) translate3d(0, 0, 0); opacity: 1; background: #fff;}
    40% { transform: scale(1, 1) translate3d(0, 0, 0); opacity: 1; background: #000;}
    100% { transform: scale(1, 1) translate3d(0, 0, 0); opacity: 0; }
  }

  .auth-overlay { 
    position: fixed; inset: 0; z-index: 6000; 
    background: rgba(0,0,0,0.85); backdrop-filter: blur(8px); 
    display: flex; align-items: center; justify-content: center; 
  }

  #boot-screen {
      position: fixed; inset: 0; z-index: 999999;
      background: #000;
      display: none;
      align-items: center;     
      justify-content: center; 
      padding: 40px;
      font-family: var(--font-mono);
      color: var(--accent);
      font-size: 14px;         
  }
  .boot-line { margin-bottom: 8px; opacity: 0; animation: lineType 0.1s forwards; text-shadow: 0 0 10px var(--accent-dim); }
  @keyframes lineType { to { opacity: 1; } }

  .port-list { display: flex; flex-direction: column; gap: 8px; max-height: 200px; overflow-y: auto; margin-bottom: 20px; border: 1px solid #222; padding: 5px; background: #050505; }
  .port-item { padding: 12px; background: #111; border: 1px solid #333; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: 0.2s; }
  .port-item:hover { border-color: var(--accent); background: var(--accent-dim); }
  .port-name { font-family: var(--font-mono); color: #fff; font-size: 11px; font-weight: bold; }
  .port-meta { font-size: 9px; color: #666; display:flex; gap:10px; align-items:center; }
  .port-del { color: var(--error); font-weight: bold; cursor: pointer; padding: 4px 8px; border-radius: 4px; opacity: 0.6; transition: 0.2s; }
  .port-del:hover { opacity: 1; background: rgba(255, 68, 68, 0.1); }

  #toast-container { position: fixed; top: 20px; right: 20px; z-index: 100000; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
  .sys-toast { background: #111; border: 1px solid #333; border-left: 3px solid var(--accent); padding: 12px 18px; min-width: 260px; color: #eee; font-family: var(--font-mono); font-size: 11px; box-shadow: 0 5px 20px rgba(0,0,0,0.5); transform: translateX(100%); animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards; pointer-events: auto; display: flex; align-items: center; justify-content: space-between; }
  .sys-toast.error { border-left-color: var(--error); }
  @keyframes toastSlideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
  @keyframes toastSlideOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } }

  .sys-modal-overlay { position: fixed; inset: 0; z-index: 100001; background: rgba(0, 255, 157, 0.05); /* Green tint */
backdrop-filter: blur(8px); /* Stronger blur */ display: flex; align-items: center; justify-content: center; opacity: 0; animation: fadeIn 0.2s forwards; }
  .sys-modal { background: #0a0a0a; border: 1px solid var(--border); width: 400px; padding: 1px; box-shadow: 0 10px 40px rgba(0,0,0,0.8); transform: scale(0.95); animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards; border-radius: 4px; overflow:hidden; display: flex; flex-direction: column;}
  .sys-modal.wide { width: 600px; }
  .modal-inner { padding: 30px; background: #0a0a0a; display:flex; flex-direction:column; max-height: 85vh; width: 100%; }
  .modal-title { color: #fff; font-family: var(--font-mono); font-size: 14px; margin-bottom: 20px; letter-spacing: 1px; display:flex; align-items:center; gap:12px; padding-bottom:15px; border-bottom:1px solid #222; font-weight: 700; }
  .modal-body { color: #999; font-size: 12px; margin-bottom: 30px; line-height: 1.6; overflow-y: auto; flex:1; }
  .modal-actions { display: flex; gap: 15px; margin-top: auto; }
  .btn-modal { flex: 1; padding: 14px; border: 1px solid rgba(0, 255, 157, 0.3); background: transparent; color: #888; cursor: pointer; font-family: var(--font-mono); font-size: 11px; font-weight: bold; transition: 0.2s; border-radius: 4px; text-transform: uppercase; }
  .btn-modal:hover { color: #fff; border-color: #555; background: #1a1a1a; }
.btn-modal.primary { 
    background: transparent; /* Changed */
    border-color: var(--accent); /* Brighter border */
    color: var(--accent); 
}
.btn-modal.primary:hover {
    background: rgba(0, 255, 157, 0.1); /* Subtle hover */
}  .btn-modal.primary:hover { background: var(--accent); color: #000; }
  .btn-modal.danger { background: rgba(255, 68, 68, 0.08); border-color: var(--error); color: var(--error); }
  .btn-modal.danger:hover { background: var(--error); color: #fff; }
  @keyframes fadeIn { to { opacity: 1; } } @keyframes modalPop { to { transform: scale(1); } }

  .terminal-box { width: 100%; max-width: 400px; background: #0a0a0a; border: 1px solid var(--border); position: relative; overflow: hidden; margin: auto; border-radius: 6px; }
  .term-header { background: #0f0f0f; padding: 15px 25px; border-bottom: 1px solid var(--border); display:flex; justify-content:space-between; align-items:center; }
  .term-title { color: #fff; font-family: var(--font-mono); font-weight: 700; letter-spacing: -0.5px; }
  .tag-pro { background: var(--accent); color: #000; font-size: 9px; padding: 2px 6px; font-weight: 800; border-radius: 2px; margin-left: 8px; font-family: var(--font-mono); }
  .term-body { padding: 35px; }
  .input-group { margin-bottom: 20px; }
  .input-group label { display: block; font-size: 10px; color: var(--accent); margin-bottom: 8px; font-family: var(--font-mono); letter-spacing: 1px; opacity: 0.8; }
  .input-group input { width: 100%; background: #111; border: 1px solid #333; color: #fff; padding: 12px; font-family: var(--font-mono); transition: 0.2s; border-radius: 4px; }
  .input-group input:focus { border-color: var(--accent); background: #000; box-shadow: 0 0 0 1px var(--accent-dim); }
  .btn-main { width: 100%; background: var(--accent); color: #000; border: none; padding: 14px; font-weight: 700; font-family: var(--font-mono); letter-spacing: 0.5px; cursor: pointer; transition: 0.2s; border-radius: 4px; margin-top: 10px; }
  .btn-main:hover { filter: brightness(1.1); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,255,157,0.2); }
  .btn-link { background: none; border: none; color: var(--text-dim); font-size: 11px; cursor: pointer; text-decoration: underline; font-family: var(--font-mono); }
  .link-row { display: flex; justify-content: space-between; margin-top: 20px; }
  .feedback { margin-top: 15px; font-size: 11px; text-align: center; color: var(--error); font-family: var(--font-mono); min-height: 20px; text-transform: uppercase; }

  .app-layout { display: flex; width: 100%; height: 100%; }
  .sidebar { width: 250px; background: var(--sidebar); border-right: 1px solid var(--border); display: flex; flex-direction: column; flex-shrink: 0; z-index: 10; }
  .brand-area { padding: 30px; border-bottom: 1px solid var(--border); }
  .brand-logo { font-family: var(--font-mono); font-weight: 800; font-size: 24px; color: #fff; letter-spacing: -1px; }
  .nav-menu { padding: 20px 15px; display: flex; flex-direction: column; gap: 5px; }
  .nav-btn { background: transparent; border: 1px solid transparent; color: #888; padding: 10px 15px; text-align: left; font-size: 12px; font-weight: 500; cursor: pointer; transition: 0.2s; border-radius: 4px; }
  .nav-btn:hover { color: #fff; background: rgba(255,255,255,0.03); }
  .nav-btn.active { background: var(--accent-dim); color: var(--accent); font-weight: 600; }
  .nav-bottom { margin-top: auto; padding: 20px; border-top: 1px solid var(--border); }
  .user-badge { font-size: 10px; color: #666; margin-bottom: 10px; font-family: var(--font-mono); text-align: center; letter-spacing: 1px; }
  .btn-logout { background: #111; border: 1px solid #333; color: #aaa; font-size: 10px; padding: 8px; width: 100%; cursor: pointer; transition: 0.2s; border-radius: 4px; text-align:center; }
  .btn-logout:hover { border-color: var(--error); color: var(--error); background: var(--error-dim); }
  
  .content-area { flex: 1; display: flex; flex-direction: column; background: transparent; position: relative; }
  .top-bar { height: 60px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 30px; background: rgba(10,10,10,0.8); backdrop-filter: blur(10px); }
  .status-led { font-size: 10px; color: #666; display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 1px; }
  .led-light { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 8px var(--accent); animation: pulse 2s infinite; }
  @keyframes pulse { 0% { opacity: 0.5; } 50% { opacity: 1; } 100% { opacity: 0.5; } }
  
  .date-display { font-size: 12px; color: #888; font-family: var(--font-mono); font-weight: bold; }
  .view-section { display: none; padding: 30px; height: 100%; overflow-y: auto; }
  .view-section.active { display: block; animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
  @keyframes slideIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
  
  .term-panel { background: var(--panel); border: 1px solid var(--border); padding: 25px; border-radius: 6px; position: relative; }
  .panel-head { font-family: var(--font-mono); font-size: 11px; color: var(--accent); font-weight: 700; border-bottom: 1px solid #222; padding-bottom: 15px; margin-bottom: 20px; letter-spacing: 1px; display: flex; justify-content: space-between; text-transform: uppercase; align-items: center; }
  .full-height { height: 100%; overflow: hidden; display: flex; flex-direction: column; }
  
  /* KPI GRID & TOOLTIPS */
  .kpi-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 15px; margin-bottom: 25px; } 
  .kpi-card { background: #0e0e0e; border: 1px solid var(--border); padding: 15px; border-radius: 6px; transition: 0.3s; position: relative; overflow: visible; }
  .kpi-card:hover { transform: translateY(-2px); border-color: var(--accent); background: #111; }
  
  /* Tooltip Style */
  .kpi-card[data-tooltip]:hover::after {
      content: attr(data-tooltip);
      position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
      background: #000; border: 1px solid var(--accent); color: #fff;
      padding: 6px 10px; font-size: 10px; font-family: var(--font-mono);
      white-space: nowrap; z-index: 100; border-radius: 4px; pointer-events: none;
      margin-bottom: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.8);
  }

  .kpi-lbl { font-size: 10px; color: #666; margin-bottom: 5px; font-weight: 600; letter-spacing: 0.5px; display:flex; align-items:center; gap:5px; }
  .kpi-val { font-family: var(--font-mono); font-size: 20px; color: #fff; font-weight: 700; }
  
  /* Frequency Bar */
  .freq-bar { height: 3px; width: 100%; background: #222; margin-top: 8px; border-radius: 2px; overflow: hidden; }
  .freq-fill { height: 100%; background: var(--accent); width: 0%; transition: 0.5s; }

  .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  .form-stack { display: flex; flex-direction: column; gap: 20px; }
  .f-group label { display: block; font-size: 10px; color: #777; margin-bottom: 6px; font-weight: 700; text-transform: uppercase; }
  .inp-std, .inp-area, select { width: 100%; background: #050505; border: 1px solid #333; color: #eee; padding: 10px; font-family: var(--font-mono); font-size: 12px; transition: 0.2s; border-radius: 4px; }
  .inp-std:focus, .inp-area:focus, select:focus { border-color: var(--accent); }
  .inp-std:disabled { background: #111; color: #444; border-color: #222; cursor: not-allowed; }
  .inp-area { min-height: 80px; resize: vertical; }
  .full-width { width: 100%; } .mt-20 { margin-top: 20px; }
  
  .checklist-stack { display: flex; flex-direction: column; gap: 10px; margin-bottom: 15px; }
  .chk-item { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #1a1a1a; padding: 8px 0; }
  .chk-label { font-size: 12px; color: #ccc; font-weight: 500; }
  .toggle-wrap { display: flex; background: #050505; border: 1px solid #333; border-radius: 4px; padding: 2px; }
  .tgl-btn { background: transparent; border: none; color: #555; font-size: 10px; padding: 4px 10px; cursor: pointer; font-weight: bold; transition: 0.2s; border-radius: 3px; font-family: var(--font-mono); }
  .status-bar { text-align: center; font-size: 10px; font-weight: bold; padding: 12px; letter-spacing: 2px; margin-bottom: 15px; border-radius: 4px; font-family: var(--font-mono); }
  .bar-wait { background: rgba(255,255,255,0.02); border: 1px solid #333; color: #666; }
  .bar-ok { background: var(--accent-dim); border: 1px solid var(--accent); color: var(--accent); }
  
  /* New Progress Bar */
  .progress-track { width: 100%; height: 4px; background: #222; border-radius: 2px; margin-bottom: 20px; overflow: hidden; }
  .progress-fill { height: 100%; background: var(--accent); width: 0%; transition: width 0.3s ease; box-shadow: 0 0 10px var(--accent); }

  .btn-outline { width: 100%; background: transparent; border: 1px solid #444; color: #aaa; padding: 10px; font-size: 10px; cursor: pointer; font-weight: 600; font-family: var(--font-mono); border-radius: 4px; }
  .btn-outline:hover { border-color: #fff; color: #fff; }
  
  /* ENHANCED TABLE */
  .table-container { flex: 1; overflow-y: auto; }
  .data-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12px; }
  .data-table th { text-align: left; color: #666; padding: 12px 15px; border-bottom: 1px solid #333; position: sticky; top: 0; background: #0f0f0f; font-weight: 600; font-size: 10px; font-family: var(--font-mono); }
  .data-table td { padding: 12px 15px; border-bottom: 1px solid #1a1a1a; color: #ccc; transition: 0.2s; }
  .data-table tr:hover td { background: #1a1a1a; cursor: pointer; }
  .data-table tr:last-child td { border-bottom: none; }
  
  /* STATUS PILLS */
  .badge { padding: 3px 8px; border-radius: 12px; font-size: 10px; font-weight: 700; font-family: var(--font-mono); text-transform: uppercase; }
  .badge.win { background: rgba(0,255,157,0.15); color: #00ff9d; border: 1px solid rgba(0,255,157,0.3); }
  .badge.loss { background: rgba(255,68,68,0.15); color: #ff4444; border: 1px solid rgba(255,68,68,0.3); }
  .badge.be { background: rgba(255,255,255,0.1); color: #aaa; border: 1px solid #444; }

  /* CHART INTERACTION */
  .chart-container { height: 350px; width: 100%; position: relative; border: 1px solid #222; background: rgba(0,0,0,0.2); overflow: hidden; border-radius: 4px; }
  #chart-tooltip { position: absolute; pointer-events: none; background: rgba(0,0,0,0.9); border: 1px solid #444; padding: 6px 10px; border-radius: 4px; font-size: 10px; font-family: var(--font-mono); display: none; z-index: 100; white-space: nowrap; box-shadow: 0 4px 10px rgba(0,0,0,0.5); }
  #chart-crosshair { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(255,255,255,0.2); display: none; pointer-events: none; z-index: 90; border-left: 1px dashed #666; }

  .dashboard-split { display: grid; grid-template-columns: 2fr 1fr; gap: 25px; } 
  .focus-banner { background: linear-gradient(90deg, rgba(0,255,157,0.05) 0%, rgba(0,0,0,0) 100%); border-left: 3px solid var(--accent); padding: 20px; margin-bottom: 25px; border-radius: 0 4px 4px 0; }
  .focus-label { font-family: var(--font-mono); font-size: 10px; color: var(--accent); letter-spacing: 2px; margin-bottom: 8px; font-weight: bold; }
  .focus-text { font-family: 'Inter', sans-serif; font-weight: 300; font-size: 18px; color: #eee; }
  
  /* =========================================
     PREMIUM LOCK OVERLAY (CRYO-STASIS UI)
     ========================================= */
  .lock-overlay {
      position: absolute; inset: 0; z-index: 50;
      /* Glassmorphism with slight red tint */
      background: rgba(10, 5, 5, 0.7);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      display: flex; align-items: center; justify-content: center;
      /* Hazard Pattern */
      background-image: repeating-linear-gradient(
          45deg,
          rgba(0, 0, 0, 0) 0px,
          rgba(0, 0, 0, 0) 10px,
          rgba(255, 68, 68, 0.03) 10px,
          rgba(255, 68, 68, 0.03) 20px
      );
  }
  
  .lock-box {
      text-align: center;
      border: 1px solid #331111;
      padding: 40px;
      background: rgba(0, 0, 0, 0.8);
      box-shadow: 0 0 40px rgba(0,0,0,0.8), inset 0 0 20px rgba(255, 68, 68, 0.05);
      border-radius: 8px;
      position: relative;
      transition: all 0.1s;
      cursor: not-allowed;
      min-width: 250px;
  }
  
  /* Reactive Effect: Access Denied */
  .lock-box.access-denied {
      animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
      border-color: var(--error);
      box-shadow: 0 0 30px rgba(255, 68, 68, 0.2);
  }
  
  @keyframes shake {
      10%, 90% { transform: translate3d(-1px, 0, 0); }
      20%, 80% { transform: translate3d(2px, 0, 0); }
      30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
      40%, 60% { transform: translate3d(4px, 0, 0); }
  }

  .lock-icon-container {
      width: 50px; height: 50px; margin: 0 auto 20px auto;
      display: flex; align-items: center; justify-content: center;
      color: var(--error);
      filter: drop-shadow(0 0 5px var(--error-dim));
  }
  
  /* Pulsing Icon Animation */
  .lock-svg {
      width: 40px; height: 40px;
      fill: none; stroke: currentColor; stroke-width: 1.5;
      animation: pulse-border 2s infinite;
  }
  
  .lock-box h2 {
      color: #884444;
      margin: 0 0 10px 0;
      font-size: 14px;
      letter-spacing: 2px;
      font-family: var(--font-mono);
      font-weight: bold;
      text-transform: uppercase;
  }
  
  /* VISUAL COOLDOWN BAR */
  .cooldown-wrapper {
      width: 100%;
      height: 4px;
      background: #221111;
      margin-top: 15px;
      border-radius: 2px;
      overflow: hidden;
      position: relative;
  }
  
  .cooldown-fill {
      height: 100%;
      background: var(--error);
      width: 0%;
      box-shadow: 0 0 10px var(--error);
      transition: width 1s linear;
  }
  
  .cooldown-text {
      margin-top: 8px;
      font-family: var(--font-mono);
      font-size: 9px;
      color: #664444;
      letter-spacing: 1px;
  }

  .lock-inner { position: absolute; inset: 0; background: rgba(0,0,0,0.85); z-index: 10; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px dashed #444; border-radius: 4px; }
  .status-tag { font-size: 9px; padding: 3px 6px; background: #222; color: #666; border-radius: 2px; cursor: pointer; font-family: var(--font-mono); }
  .status-tag.locked { color: #aaa; border: 1px solid #444; background: #1a1a1a; }
  .loader { position: fixed; bottom: 30px; right: 30px; background: #000; padding: 8px 15px; font-size: 11px; color: var(--accent); border: 1px solid var(--accent); font-family: var(--font-mono); font-weight: bold; z-index:99999; border-radius: 20px; }
  
  /* ARCHIVE LIST */
  .archive-list { max-height: 200px; overflow-y: auto; border: 1px solid #222; margin-top: 10px; }
  .archive-item { padding: 10px; border-bottom: 1px solid #222; font-size: 11px; color: #888; }
  .archive-item strong { color: var(--accent); font-family: var(--font-mono); font-size: 10px; }

  /* ARCHIVE GRID */
  .archive-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; padding-bottom:50px; }
  .review-card { background: #0e0e0e; border: 1px solid var(--border); padding: 20px; border-radius: 6px; transition: 0.2s; display: flex; flex-direction: column; gap: 10px; }
  .review-card:hover { border-color: var(--accent); transform: translateY(-2px); }
  .review-date { font-family: var(--font-mono); color: var(--accent); font-size: 11px; border-bottom: 1px solid #222; padding-bottom: 8px; margin-bottom: 5px; font-weight: bold; }
  .review-sect { font-size: 11px; color: #888; line-height: 1.4; }
  .review-sect strong { color: #ccc; display: block; margin-bottom: 4px; font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; }

  /* FILTER BAR */
  .filter-bar { display:flex; gap:10px; margin-bottom:15px; background:#0f0f0f; padding:10px; border-bottom:1px solid #222; flex-wrap:wrap; align-items:center; border-radius: 4px; }
  .filter-group { display:flex; gap:5px; align-items:center; }
  .filter-label { color:#555; font-size:9px; font-weight:bold; font-family: var(--font-mono); }
  .inp-sm { background:#050505; border:1px solid #333; color:#ccc; padding:5px 8px; font-size:10px; font-family:var(--font-mono); border-radius:3px; }
  .btn-sm { background:#151515; border:1px solid #333; color:#888; padding:5px 10px; font-size:9px; font-weight:bold; cursor:pointer; font-family:var(--font-mono); border-radius: 3px; }
  .btn-sm.active { background:var(--accent-dim); color:var(--accent); border-color:var(--accent); }

  /* CALENDAR VIEW */
  #log-calendar-view { display:none; padding:10px; }
  .log-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
  .log-cal-day { min-height:80px; background:#0f0f0f; border:1px solid #222; padding:8px; display:flex; flex-direction:column; justify-content:space-between; cursor:pointer; transition:0.2s; border-radius: 4px; }
  .log-cal-day:hover { border-color:#555; background:#1a1a1a; }
  .log-cal-date { font-size:10px; color:#555; font-weight:bold; font-family: var(--font-mono); }
  .log-cal-pl { font-size:12px; font-weight:bold; text-align:right; font-family: var(--font-mono); }
  .pl-pos { color:var(--accent); }
  .pl-neg { color:var(--error); }
  .log-cal-count { font-size:9px; color:#444; }

  /* MODAL EXTRAS */
  .cal-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:15px; }
  .cal-btn { background:none; border:1px solid #333; color:var(--accent); cursor:pointer; padding:5px 10px; font-family:var(--font-mono); font-weight:bold; border-radius: 3px; }
  .cal-btn:hover { background:var(--accent); color:#000; }
  .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
  .cal-day-header { text-align:center; color:#666; font-size:10px; font-weight:bold; padding:5px; font-family: var(--font-mono); }
  .cal-day { text-align:center; padding:8px; border:1px solid #1a1a1a; color:#aaa; cursor:pointer; font-size:11px; transition:0.2s; border-radius: 3px; }
  .cal-day:hover:not(.empty) { border-color:var(--accent); color:#fff; background: rgba(0,255,157,0.1); }
  .cal-day.active { background:var(--accent); color:#000; font-weight:bold; }
  .cal-day.empty { border:none; cursor:default; }
  .inp-date-trigger { cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2300ff9d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; }
  
  .detail-row { display:flex; margin-bottom:12px; border-bottom:1px solid #1a1a1a; padding-bottom:8px; }
  .detail-lbl { width:100px; color:var(--accent); font-weight:bold; font-size: 11px; font-family: var(--font-mono); opacity: 0.8; }
  .detail-val { flex:1; color:#eee; font-size: 13px; }
  .detail-img { width:100%; height:auto; border:1px solid #333; margin-top:15px; display:block; border-radius: 4px; }
  .empty-img { padding:40px; text-align:center; border:1px dashed #333; color:#444; margin-top:15px; border-radius: 4px; }

  .session-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 20px; }
  .sess-box { background: #0a0a0a; border: 1px solid #222; padding: 10px; text-align: center; border-radius: 4px; opacity: 0.5; transition: 0.3s; position: relative; overflow: hidden; }
  .sess-box.active { border-color: var(--accent); opacity: 1; background: rgba(0, 255, 157, 0.05); box-shadow: 0 0 15px rgba(0, 255, 157, 0.05); }
  .sess-box.active .sess-title { color: #fff; text-shadow: 0 0 5px var(--accent); }
  .sess-title { font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: #888; margin-bottom: 2px; letter-spacing: 1px; }
  .sess-time { font-family: var(--font-mono); font-size: 9px; color: #555; }
  .sess-status { font-size: 8px; color: var(--accent); position: absolute; top: 5px; right: 5px; opacity: 0; }
  .sess-box.active .sess-status { opacity: 1; animation: pulse 1s infinite; }

  .analytics-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
  .ana-card { background: #0e0e0e; border: 1px solid #222; padding: 20px; border-radius: 6px; position: relative; }
  .ana-head { font-family: var(--font-mono); font-size: 10px; color: var(--accent); font-weight: bold; margin-bottom: 15px; text-transform: uppercase; letter-spacing: 1px; display: flex; justify-content: space-between; }
  
  .dow-grid { display: flex; justify-content: space-between; align-items: flex-end; height: 60px; gap: 5px; }
  .dow-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; flex: 1; height: 100%; cursor: help; }
  .dow-val { font-family: var(--font-mono); font-size: 9px; margin-bottom: 5px; font-weight: bold; }
  .dow-bar { width: 100%; background: #222; border-radius: 2px; position: relative; min-height: 2px; transition: 0.3s; }
  .dow-lbl { margin-top: 8px; font-family: var(--font-mono); font-size: 9px; color: #666; }
  .dow-col.best .dow-bar { background: var(--accent); box-shadow: 0 0 8px var(--accent-dim); }
  .dow-col.best .dow-lbl { color: #fff; font-weight: bold; }
  .dow-col.neg .dow-bar { background: var(--error); }

  .form-ticker { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 5px; }
  .form-pill { flex: 1; height: 35px; background: #111; border: 1px solid #333; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 10px; font-weight: bold; border-radius: 3px; color: #666; transition: 0.2s; min-width: 30px; cursor: pointer; }
  .form-pill.W { background: rgba(0, 255, 157, 0.1); border-color: rgba(0, 255, 157, 0.3); color: var(--accent); }
  .form-pill.L { background: rgba(255, 68, 68, 0.1); border-color: rgba(255, 68, 68, 0.3); color: var(--error); }
  .form-pill:hover { transform: translateY(-2px); border-color:#fff; }

  #ticker-tooltip { 
      position: fixed; pointer-events: none; z-index: 10000;
      background: rgba(0,0,0,0.95); border: 1px solid var(--accent);
      padding: 12px; border-radius: 4px; display: none;
      box-shadow: 0 5px 20px rgba(0,0,0,0.8);
      min-width: 160px;
  }
  .tt-row { display: flex; justify-content: space-between; font-size: 10px; color: #888; margin-bottom: 4px; font-family: var(--font-mono); }
  .tt-val { color: #eee; font-weight: bold; }

  .disc-wrapper { position: relative; width: 100px; height: 100px; margin: 0 auto; border-radius: 50%; background: #0a0a0a; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 20px rgba(0,0,0,0.5); }
  .disc-ring {
      position: absolute; inset: 0; border-radius: 50%;
      background: conic-gradient(var(--accent) 0%, var(--border) 0%);
      mask: radial-gradient(closest-side, transparent 80%, black 0%);
      -webkit-mask: radial-gradient(closest-side, transparent 80%, black 0%);
      transition: background 1s ease-out;
  }
  .disc-value { font-family: var(--font-mono); font-size: 20px; font-weight: bold; color: #fff; z-index: 2; }
  .disc-label { position: absolute; bottom: -25px; width: 100%; text-align: center; font-size: 9px; color: #666; font-family: var(--font-mono); letter-spacing: 2px; font-weight: bold; }
  .analytics-row.three-col { grid-template-columns: 1fr 1fr 1fr; }

  @media (max-width: 900px) {
      .analytics-row.three-col { grid-template-columns: 1fr; }
  }

  /* =========================================
     MOBILE COMPATIBILITY (STRICT)
     ========================================= */
  @media (max-width: 768px) {
    /* Layout */
    .app-layout { flex-direction: column; }
    .sidebar { width: 100%; height: auto; border-right: none; border-bottom: 1px solid var(--border); flex-shrink: 0; }
    .brand-area { display: none; } /* Save space */
    .nav-menu { flex-direction: row; overflow-x: auto; padding: 10px; -webkit-overflow-scrolling: touch; }
    .nav-btn { white-space: nowrap; flex-shrink: 0; }
    .nav-bottom { display: none; } /* Hide footer items on mobile to maximize screen */
    
    /* Content */
    .content-area { height: calc(100% - 60px); }
    .dashboard-split { grid-template-columns: 1fr; }
    .kpi-grid { grid-template-columns: 1fr 1fr; }
    .analytics-row { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    
    /* Risk Engine Overrides */
    .risk-container > div:nth-child(2) { grid-template-columns: 1fr !important; }
    .risk-container > div:nth-child(3) { grid-template-columns: 1fr !important; }
    .risk-container > div:nth-child(3) > div { text-align: left !important; display: flex; justify-content: space-between; width: 100%; margin-bottom: 5px; }

    /* Modals */
    .sys-modal, .sys-modal.wide { width: 95% !important; margin: 10px; }
    .modal-inner { padding: 15px; max-height: 80vh; }
    
    /* Strat Grid */
    .strat-grid { grid-template-columns: 1fr; }
    
    /* Checklist */
    .chk-item { flex-direction: column; align-items: flex-start; gap: 5px; }
    .toggle-wrap { width: 100%; justify-content: center; }
    .tgl-btn { flex: 1; }

    /* Table */
    .data-table th, .data-table td { padding: 8px 5px; font-size: 11px; }
    .table-container { overflow-x: auto; }
  }
  
  /* --- NEW PREMIUM UI STYLES --- */

/* 1. GLOW BUTTONS (Replaces standard flat buttons) */
.btn-glow {
    background: rgba(0, 255, 157, 0.05);
    border: 1px solid rgba(0, 255, 157, 0.3);
    color: var(--accent);
    padding: 12px 20px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-glow:hover {
    background: var(--accent);
    color: #000;
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.4);
    transform: translateY(-2px);
    border-color: var(--accent);
}

.btn-glow:active {
    transform: translateY(0);
}

/* Secondary Button Style */
.btn-ghost {
    background: transparent;
    border: 1px solid #333;
    color: #888;
    padding: 10px 16px;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    border-radius: 4px;
    text-transform: uppercase;
}
.btn-ghost:hover {
    border-color: #666;
    color: #fff;
    background: rgba(255,255,255,0.05);
}

/* 2. SYSTEM CARDS (For Parameters & Weekly) */
.sys-grid-split {
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 25px; 
    margin-bottom: 25px;
}

.sys-card {
    background: #0b0b0b;
    border: 1px solid #222;
    border-radius: 8px;
    position: relative;
    overflow: hidden; /* Keeps overlay contained */
    display: flex;
    flex-direction: column;
    height: 100%;
}

.sys-card-header {
    background: rgba(255,255,255,0.02);
    padding: 15px 20px;
    border-bottom: 1px solid #222;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sys-card-title {
    font-family: var(--font-mono);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sys-icon {
    color: var(--accent);
    opacity: 0.8;
}

.sys-card-body {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 3. INPUT UPGRADES */
.input-label-tech {
    display: block;
    font-size: 9px;
    color: #666;
    font-family: var(--font-mono);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sys-inp-styled {
    width: 100%;
    background: #050505;
    border: 1px solid #2a2a2a;
    color: #eee;
    padding: 14px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    border-radius: 4px;
    transition: 0.3s;
}

.sys-inp-styled:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent-dim);
    background: #080808;
}

.sys-inp-styled:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #111;
}

textarea.sys-inp-styled {
    min-height: 100px;
    resize: vertical;
    line-height: 1.5;
}

/* Mobile Fix for Grid */
@media (max-width: 900px) {
    .sys-grid-split { grid-template-columns: 1fr; }
}

/* --- PREMIUM "NO-EMOJI" UI KIT --- */

/* 1. TECH BUTTONS */
.btn-tech {
    background: linear-gradient(180deg, rgba(0, 255, 157, 0.08) 0%, rgba(0, 255, 157, 0.02) 100%);
    border: 1px solid rgba(0, 255, 157, 0.3);
    color: var(--accent);
    padding: 12px 24px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 2px; /* Sharper corners for tech feel */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.btn-tech:hover {
    background: rgba(0, 255, 157, 0.15);
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(0, 255, 157, 0.15);
    color: #fff;
    text-shadow: 0 0 5px var(--accent);
}

.btn-tech:active {
    transform: translateY(1px);
}

/* Secondary/Ghost Button */
.btn-tech-ghost {
    background: transparent;
    border: 1px solid #333;
    color: #666;
    padding: 10px 16px;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-tech-ghost:hover {
    border-color: #555;
    color: #eee;
    background: rgba(255,255,255,0.02);
}

/* 2. SVG ICONS CONFIG */
.icon-svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.9;
}

.icon-svg.large {
    width: 16px;
    height: 16px;
}

/* 3. PREMIUM SYSTEM CARDS */
.sys-grid-split {
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 20px; 
    margin-bottom: 25px;
}

.sys-card {
    background: #080808; /* Darker technical background */
    border: 1px solid #1f1f1f;
    border-radius: 4px;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Tech Header Line */
.sys-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px;
    height: 100%;
    background: #1f1f1f; /* Default inactive border */
    transition: 0.3s;
}

.sys-card:hover::before {
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

.sys-card-header {
    padding: 18px 25px;
    border-bottom: 1px solid #1f1f1f;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg, rgba(255,255,255,0.02) 0%, transparent 100%);
}

.sys-card-title {
    font-family: var(--font-mono);
    color: #eee;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sys-card-body {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* 4. PREMIUM INPUTS */
.input-label-tech {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 9px;
    color: #555; /* Muted label */
    font-family: var(--font-mono);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.sys-inp-tech {
    width: 100%;
    background: #030303;
    border: 1px solid #222;
    color: #fff;
    padding: 12px 15px;
    font-family: 'Inter', sans-serif; /* Clean sans-serif for reading */
    font-size: 13px;
    border-radius: 2px;
    transition: all 0.2s ease;
}

.sys-inp-tech::placeholder { color: #333; }

.sys-inp-tech:focus {
    border-color: var(--accent);
    background: #050505;
    box-shadow: 0 0 0 1px rgba(0, 255, 157, 0.1);
}

.sys-inp-tech:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-style: dashed;
}

textarea.sys-inp-tech {
    min-height: 80px;
    resize: vertical;
    line-height: 1.6;
}

/* Status Badge Tech Style */
.status-badge {
    font-size: 9px;
    font-family: var(--font-mono);
    padding: 4px 8px;
    background: #111;
    border: 1px solid #333;
    color: #666;
    border-radius: 2px;
    letter-spacing: 1px;
}

.status-badge.locked {
    color: #888;
    background: rgba(255,255,255,0.02);
}

.status-badge.locked::before {
    content: "●";
    color: var(--error);
    margin-right: 6px;
}

/* Mobile Fix */
@media (max-width: 900px) {
    .sys-grid-split { grid-template-columns: 1fr; }
}

/* ------- System Parameter Visual Polish ------- */

.trade-capacity-title {
  margin-top: 35px;
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #00ff9d;
  opacity: 0.9;
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-top: 20px;
}

/* Align input rows cleanly */
.capacity-row {
  display: flex;
  gap: 40px;
  justify-content: center;
  margin-top: 25px;
}

.capacity-item {
  text-align: center;
  width: 220px;
}

/* Inputs consistent width and style */
.capacity-item input[type="number"] {
  width: 100%;
  padding: 12px;
  font-size: 1.1rem;
  text-align: center;
}

/* Notes readable but clean */
.capacity-note {
  margin-top: 10px;
  font-size: 0.7rem;
  opacity: 0.55;
  line-height: 1.4;
}


/* Match capacity number inputs to system input style */
.capacity-item input[type="number"] {
    background: #0a0a0a;
    border: 1px solid #2b2b2b;
    color: #ffffff;
    font-family: var(--font-mono);
    padding: 12px;
    outline: none;
    text-align: center;
    border-radius: 3px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.capacity-item input[type="number"]:focus {
    border-color: #00ff9d;
    background: #111;
}

/* Center the update button block */
.update-wrap {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.update-wrap button {
    width: auto;
    padding: 12px 30px;
}

/* Center Weekly Review button */
.review-btn-wrap {
    width: 100%;
    margin-top: 20px;
}
.review-btn-center {
    width: 100%;
}
/* Match style with Parameters button */
.review-btn-center {
    width: auto !important;
    padding: 14px 32px;
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Premium hover aesthetic */
.review-btn-center:hover {
    transform: translateY(-1px);
    transition: 0.2s ease;
}
/* ============================================
   CUSTOM NUMBER INPUT SPINNER STYLING
   ============================================ */

/* Hide default browser spinners */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    appearance: textfield;
}

/* Custom spin container */
input[type=number] {
    position: relative;
    padding-right: 30px; /* space for custom arrows */
}

/* Custom spinner buttons */
input[type=number]::after,
input[type=number]::before {
    content: "";
    position: absolute;
    right: 8px;
    width: 10px;
    height: 6px;
    pointer-events: none;
    opacity: 0.4;
    transition: opacity 0.2s ease, filter 0.2s ease;
}

/* Up arrow */
input[type=number]::before {
    top: 6px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 6px solid #00ff9d; /* neon green */
}

/* Down arrow */
input[type=number]::after {
    bottom: 6px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #00ff9d;
}

/* Hover & Focus Glow */
input[type=number]:hover::before,
input[type=number]:hover::after,
input[type=number]:focus::before,
input[type=number]:focus::after {
    opacity: 1;
    filter: drop-shadow(0 0 6px #00ff9d);
}
/* ============================================
   SYSTEM + WEEKLY REVIEW GRID FIX
   ============================================ */

.system-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

/* Ensure both sections end same line visually */
.system-section,
.weekly-review-section {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Reduce excessive gap above bottom buttons */
.trade-capacity-block {
    margin-bottom: 20px !important;
}

/* Button alignment fix */
.btn-tech,
.btn-archive-review {
    margin-top: 20px;
}

/* ============================
   WEEKLY REVIEW LAYOUT POLISH
   ============================ */

/* Spacing consistency between fields */
.sys-card-body > div {
    margin-bottom: 22px;
}

/* Center align the save button cleanly */
.review-btn-wrap {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

/* Make button width visually proportional */
.review-btn-center {
    width: 100%;
    max-width: 420px;
}

/* Match input styling theme */
.wk-inp {
    background: var(--terminal-bg);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 10px;
    font-size: 14px;
    color: var(--text);
    resize: none;
    transition: .2s ease;
}

.wk-inp:focus {
    border-color: var(--accent);
    box-shadow: 0 0 6px var(--accent);
}

/* Optional: rounded edges for consistency */
.review-btn-center, .wk-inp {
    border-radius: 4px;
}
#global-config, #weekly-review {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Allow card body to grow and push button to bottom */
.sys-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Center the button and add top spacing */
.review-btn-wrap {
    margin-top: 25px;
    width: 100%;
    display: flex;
    justify-content: center;
}
/* ====== PLANNING MODAL FRAME ====== */
#plan-modal {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 255, 157, 0.05);
    backdrop-filter: blur(6px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999; /* raised higher */
}

#plan-modal.hidden {
    display: none;
}


.sys-modal-content {
    background: #0d0d0d;
    border: 1px solid var(--accent);
    width: 900px;
    max-height: 90vh;
    overflow: auto;
    padding: 25px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 0 25px rgba(0,255,157,0.3);
}

/* Close button */
.modal-close-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 14px;
}
.plan-modal-wrapper {
    display: flex;
    flex-direction: column;
    height: 85vh;
    overflow: hidden;
}

.plan-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--accent);
    padding-bottom: 8px;
}

.plan-tab {
    background: transparent;
    border: 1px solid #333;
    color: #888;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 11px;
    text-transform: uppercase;
    transition: 0.2s;
}

.plan-tab.active {
    border-color: var(--accent);
    color: var(--accent);
}

.plan-content-area {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
    border-top: 1px solid #111;
}

.plan-section {
    display: none;
}

.plan-section.active {
    display: block;
}
.sys-modal-content {
    background: #0d0d0d;
    border: 1px solid var(--accent);
    width: 900px;
    max-width: 95vw;
    max-height: 85vh;
    overflow: hidden;
    border-radius: 8px;
    position: relative;
    padding: 20px;
    box-shadow: 0 0 25px rgba(0,255,157,0.3);
}
#tab-checklist #checklist-module {
    width: 100%;
    margin-top: 10px;
}
.trade-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0px 6px;
}
.frm-label {
    font-size: 9px;
    font-family: var(--font-mono);
    color: var(--accent-dim);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: -4px;
    opacity: 0.8;
}
/* Center and size form */
.intel-form {
    width: 460px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* Each input group */
.intel-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Labels */
.frm-label {
    font-size: 10px;
    font-family: var(--font-mono);
    letter-spacing: 1px;
    color: var(--accent);
    opacity: 0.75;
}

/* Larger text area */
.txt-area {
    height: 90px;
    resize: none;
}

/* Position and size button cleaner */
.intel-action {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.intel-action .btn-tech {
    width: 240px;
    text-align: center;
}
/* Clean CIA-style autocomplete override */

#entry-pair-results {
    max-height: auto !important;
    height: auto !important;
    overflow: hidden !important; 
    background: #0c0c0c !important;
    border: 1px solid var(--accent-dim) !important;
    border-radius: 4px !important;
    padding: 4px 0 !important;
    position: absolute !important;
    z-index: 999 !important;
    width: 100% !important;
}

/* Remove fat list item style */
#entry-pair-results div {
    padding: 6px 12px !important;
    font-size: 11px !important;
    font-family: var(--font-mono);
    text-transform: uppercase;
    border-bottom: 1px solid #111 !important;
    cursor: pointer;
    color: var(--text);
}

/* Remove scroll bar */
#entry-pair-results::-webkit-scrollbar {
    display: none !important;
}

/* Hover effect (controlled, not bright) */
#entry-pair-results div:hover {
    background: rgba(0,255,157,0.05) !important;
    color: var(--accent) !important;
}

/* Ensure only max visible rows without scrolling UI */
#entry-pair-results {
    max-height: 140px !important; /* fits around 5 rows */
}
/* Disabled state for plan button */
.btn-tech:disabled,
.btn-glow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(1);
}

/* ===== Planned Trade Styling ===== */

/* Each row item */
.planned-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-panel);
    transition: 0.2s ease;
}

.planned-item:hover {
    border-color: var(--accent);
}

/* Left info block */
.planned-info {
    display: flex;
    flex-direction: column;
}

.planned-info .pair {
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--text);
}

.planned-info .meta {
    font-size: 11px;
    opacity: .45;
    letter-spacing: .5px;
    margin-top: 2px;
}

/* Right action buttons */
.planned-actions {
    display: flex;
    gap: 6px;
}

.planned-actions .small {
    padding: 6px 10px;
    font-size: 11px !important;
    letter-spacing: .7px;
    text-transform: uppercase;
}

/* Soft empty state */
.empty-msg {
    opacity: .35;
    font-size: 12px;
    padding: 10px 3px;
    font-style: italic;
    text-align: left;
}
/* ================================
   PLANNED TRADE LIST — T/OS STYLE
=================================== */

/* card row */
.planned-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: transparent;
    border-left: 2px solid var(--accent);
    border-right: none;
    border-top: none;
    border-bottom: 1px solid var(--border);
    transition: 0.2s ease;
}

.planned-item:hover {
    background: rgba(0,255,157,0.05);
}

/* text block */
.planned-info .pair {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--text);
}

.planned-info .meta {
    font-size: 11px;
    opacity: .45;
    margin-top: 1px;
}

/* CTA block */
.planned-actions {
    display: flex;
    gap: 6px;
}

.planned-actions button {
    font-size: 10px !important;
    padding: 5px 8px;
    letter-spacing: .7px;
}

/* empty state */
.empty-msg {
    opacity: .35;
    font-size: 11px;
    margin-top: 4px;
}
/* =============================
   CARD DISPLAY FOR TRADE PLANS
============================= */

/* Individual Card */

.planned-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    background: rgba(0,255,157,0.05);
}


.planned-card .pair {
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
}

.planned-card .meta {
    font-size: 11px;
    opacity: .5;
    margin-top: 3px;
}

/* Chart thumbnail */

/* Notes preview */
.plan-notes {
    font-size: 11px;
    opacity: .65;
    margin-top: 8px;
    text-align: left;
    line-height: 1.4;
    word-wrap: break-word;
    white-space: normal; /* Changed from pre-wrap */
    overflow: hidden; /* NEW - Hides overflow */
    text-overflow: ellipsis; /* NEW - Adds "..." */
    display: -webkit-box; /* NEW - Required for line clamping */
    -webkit-line-clamp: 3; /* NEW - Limits to 3 lines */
    -webkit-box-orient: vertical; /* NEW - Required */
    max-height: 60px; /* NEW - Backup height limit */
}
/* Actions group */

.btn-plan {
    padding: 8px 14px;
    font-size: 11px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: transparent;
    cursor: pointer;
    transition: 0.2s;
    font-family: var(--font-mono);
}

.btn-plan:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Unique Action Colors */
.btn-execute {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
    font-weight: 700;
}

.btn-abort {
    border-color: red;
    color: red;
}

.btn-abort:hover {
    background: red;
    color: #000;
}
.plan-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(0,255,157,0.15);
    border: 1px solid rgba(0,255,157,0.4);
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-family: var(--font-mono);
    color: var(--accent);
    text-align: center;
}
/* ========== PREPARED TRADE PLANS LAYOUT ========== */


.plans-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
}

.plans-title {
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.7;
}

/* Initiate Trade Plan button (transparent/ghost) */

.btn-plan-ghost {
    padding: 6px 14px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 3px;
    border: 1px solid var(--accent);
    background: transparent;
    color: var(--accent);
    font-family: var(--font-mono);
    cursor: pointer;
    transition: 0.2s;
}

.btn-plan-ghost:hover {
    background: rgba(0,255,157,0.08);
}

/* ========== CARD GRID ========== */

/* Planned Trade Grid Layout */

.planned-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

.planned-card:hover {
    border-color: var(--accent);
    background: rgba(0,255,157,0.05);
}

/* Protocol adherence badge */


/* Pair + meta */

.planned-card .pair {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .6px;
}

.planned-card .meta {
    font-size: 11px;
    opacity: 0.5;
    margin-top: 3px;
}

/* Screenshot */

.plan-thumb {
    object-fit: contain;
}

/* Notes snippet */

/* ========== BUTTON ROW ========== */

/* FINAL PLAN ACTION BUTTON LAYOUT (LOCKED) */


/* Base style for all three */

.btn-plan {
    padding: 7px 0;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.9px;
    font-family: var(--font-mono);
    border-radius: 3px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    cursor: pointer;
    transition: 0.2s ease;
}

/* EXECUTE: strong accent */

.btn-plan.btn-execute {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
    font-weight: 700;
}

/* RENEW: subtle ghost */

.btn-plan.btn-renew:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ABORT: danger outline */

.btn-plan.btn-abort {
    border-color: #ff3b3b;
    color: #ff3b3b;
}

.btn-plan.btn-abort:hover {
    background: #ff3b3b;
    color: #000;
}
.planned-card.active {
    border-color: var(--accent);
    box-shadow: 0 0 12px rgba(0,255,157,0.12);
}
.sys-modal:not(.hidden) .sys-modal-body {
    animation: zoomFade .25s ease;
}

@keyframes zoomFade {
    from { transform: scale(.85); opacity:0; }
    to   { transform: scale(1); opacity:1; }
}
/* --- UNIVERSAL IMAGE ZOOM MODAL --- */

.zoom-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 255, 157, 0.05);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999999;
  animation: fadeIn 0.15s ease;
}

.zoom-modal.hidden {
  display: none;
}

.zoom-content {
  max-width: 90vw;
  max-height: 90vh;
  border: 1px solid var(--accent);
  border-radius: 6px;
  box-shadow: 0 0 25px rgba(0,255,157,0.2);
  cursor: zoom-out;
  object-fit: contain;
}
/* ----- IMAGE ZOOM MODAL FIX ----- */

.img-zoom-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,255,157,0.06);  /* Slight OS green tint overlay */
    backdrop-filter: blur(12px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    cursor: zoom-out;
    transition: 0.2s ease;
}

.img-zoom-overlay.hidden {
    display: none !important;
}

.zoom-content {
    max-width: 85vw;
    max-height: 85vh;
    border: 1px solid var(--accent);
    border-radius: 6px;
    cursor: zoom-out;
    transition: 0.2s ease;
    box-shadow: 0 0 25px rgba(0,255,157,0.15);
}
#imgPreviewModal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    justify-content: center;
    align-items: center;
}

#imgPreviewModal.hidden {
    display: none !important;
}

/* Dimmed green OS background */
.imgPreview-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 255, 157, 0.06);
    backdrop-filter: blur(8px);
}

/* Container for image */
.imgPreview-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

/* Image styling */
#imgPreviewTarget {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 6px;
    cursor: zoom-out;
    box-shadow: 0 0 20px rgba(0,255,157,0.25);
    transition: transform .25s ease;
}

/* Footer text */
.imgPreview-footer {
    opacity: 0.6;
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--accent);
}
#imgPreviewModal {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 999999 !important;
}
#imgPreviewModal {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    position: fixed !important;
    inset: 0 !important;
    width: 100vw;
    height: 100vh;
    background: rgba(0,255,157,0.05);
    backdrop-filter: blur(10px);
    z-index: 999999;
    overflow: hidden;
}

#imgPreviewTarget {
    cursor: grab;
    transition: transform .25s ease;
    max-height: 85vh;
    border-radius: 8px;
}
#imgPreviewModal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999999;
    cursor: zoom-out;
}

#imgPreviewModal.hidden {
    display: none !important;
}

#imgPreviewTarget {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border: 1px solid #00ff9d;
    box-shadow: 0 0 20px rgba(0,255,157,0.3);
    cursor: default;
}

/* "Scroll to zoom" text positioning */
#imgPreviewModal .modal-footer {
    position: absolute;
    bottom: 30px;
    text-align: center;
    width: 100%;
    font-family: var(--font-mono);
    color: #888;
}
#plannedTradesSection {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 22px;
    width: 100%;
    padding: 10px 20px;
    justify-items: center;
}

#terminal-content {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    padding: 20px;
}
#terminal {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
    width: 100%;
    padding: 10px 20px;
    justify-items: center;
}

.plan-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin-top: 10px;
}

.plan-actions button {
    flex: 1;
    white-space: nowrap;
    text-align: center;
}
.planned-card {
    background: #0d0d0d;
    border: 1px solid #222;
    border-radius: 6px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 220px;
    min-height: 280px;
    overflow: hidden;
    position: relative;   /* <-- REQUIRED FIX */
}
.planned-card .trade-notes {
    display: block;
    max-height: 80px; /* Controls how many lines appear */
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4em;
    white-space: normal;
    word-wrap: break-word;
}
#plannedTradeList {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    width: 100%;
    justify-items: center;
    margin-top: 20px;
}

#plannedTradeList {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    width: 100%;
    justify-items: center;
    padding: 20px 0;
}

#plannedTradeList .planned-card {
    width: 100%;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.plan-thumb.trade-img {
    cursor: zoom-in;
}
.plan-thumb.trade-img:hover {
    filter: brightness(1.1);
    transform: scale(1.02);
    transition: 0.2s ease;
}
#btn-init-plan {
    display: block;
    margin: 30px auto;
}
#init-plan-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 40px;
}
#plannedTradesSection {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-left: 80px; /* adjusts position relative to sidebar */
}

#plannedTradeList {
    width: 100%;
    max-width: 1200px; /* slightly tighter than before */
    margin: 0 auto;
}

#plannedTradesSection .no-chart-placeholder {
    width: 100%;
    height: 140px !important;
    background: url("https://upload.wikimedia.org/wikipedia/commons/3/3f/TV_Static_Noise.gif") !important;
    background-size: cover !important;
    background-position: center !important;
    border: 1px solid rgba(0,255,0,0.18) !important;
    filter: grayscale(100%) contrast(160%) brightness(55%) !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    color: rgba(0,255,0,0.50) !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;

    border-radius: 5px !important;
    margin-top: 12px !important;

    box-shadow:
        0 0 10px rgba(0,255,0,0.05) inset,
        0 0 5px rgba(0,255,0,0.04) !important;
}
}
.plan-thumb {
    height: 140px;
    object-fit: contain;
    margin-top: 12px;
}
#plannedTradesSection .plan-notes {
    width: 100%;
    text-align: center;
    color: rgba(0,255,0,0.55);
    font-size: 0.82rem;
    margin: 10px 0 14px;
    padding: 6px 4px;

    /* make the text readable + limit length */
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
    letter-spacing: 0.5px;

    /* clean styling to match your UI */
    opacity: 0.8;
    border-radius: 4px;
}
#plannedTradesSection .sys-subtitle,
.sys-subtitle {
    width: 100%;
    text-align: center;
    font-size: 1rem;
    letter-spacing: 1px;
    margin: 25px 0 20px;
    padding: 0;
    color: rgba(0,255,157,0.7);
    display: block;
}
#plannedTradesSection .sys-subtitle {
    text-shadow: 0 0 6px rgba(0,255,157,0.15);
}
#plannedTradesHeader {
    width: fit-content;
    margin: 0 auto 18px auto;
    padding: 0;
    font-size: 1rem;
    color: rgba(0,255,157,0.72);
    letter-spacing: 1px;
    text-align: center;
    display: block;
}

#plannedTradesSection {
    margin-top: 10px;
}
#plannedTradesHeader {
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1.5px;
    font-size: 14px;
    margin-top: 20px;
    margin-bottom: 18px;
    color: rgba(0,255,157,0.9);
    text-align: center;
    width: 100%;
    max-width: 1400px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(0,255,157,0.18);
    opacity: 0.85;
    transition: 0.25s ease;
}

#plannedTradesHeader:hover {
    opacity: 1;
    text-shadow: 0 0 6px rgba(0,255,157,0.25);
}
/* ===== T/OS Cyber Scrollbar - Rounded Auto Hide ===== */

html, body {
    scrollbar-width: thin;
    scrollbar-color: rgba(0,255,157,0.35) transparent;
}

/* ===== CUSTOM SYSTEM SCROLLBAR ===== */
html, body {
    scrollbar-width: thin;
    scrollbar-color: #00ff9d #0b0b0b;
}

/* Chrome, Edge, Brave, Opera */
::-webkit-scrollbar {
    width: 8px;
    background: #0b0b0b;
}

::-webkit-scrollbar-thumb {
    background: #00ff9d;
    border-radius: 10px;
    border: 2px solid #0b0b0b;
}

::-webkit-scrollbar-thumb:hover {
    background: #00ffaa;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}
/* ============================
   RESPONSIVE TRADE PLAN GRID
============================ */

#plannedTradeList {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

/* --- Tablet Layout (2 cards per row if space allows) --- */
@media(max-width: 1100px) {
    #plannedTradeList {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 22px;
    }
}

/* --- Mobile Layout (1 card per row) --- */
@media(max-width: 650px) {
    #plannedTradeList {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    #plannedTradesHeader {
        font-size: 14px !important;
    }
}

/* Keep INIT button centered under all breakpoints */
#init-plan-container {
    width: 100%;
    display: flex;
    justify-content: center;
}
/* Center cards when only 1 or 2 items exist */
#plannedTradeList {
    justify-items: center;
    justify-content: center;
}
/* Force grid to center properly depending on item count */
#plannedTradeList {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    justify-items: center;
}

/* NEW RULE: If 1 or 2 cards exist, shrink grid to fit them tightly instead of stretching */
#plannedTradeList:has(.plan-card:nth-child(2):last-child),
#plannedTradeList:has(.plan-card:nth-child(1):last-child) {
    max-width: 650px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    justify-content: center;
}
/* NORMAL COMPACT VIEW (carousel style) */
#plannedTradeList.compact {
    display: flex;
    gap: 25px;
    overflow-x: auto;
    padding-bottom: 10px;
    scroll-snap-type: x mandatory;
}

/* Make cards snap cleanly while scrolling */
#plannedTradeList.compact .planned-card {
    scroll-snap-align: center;
    min-width: 300px;
}
/* EXPANDED VIEW (grid mode) */
#plannedTradeList.expanded {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    width: 100%;
}
/* Compact carousel mode */
#plannedTradeList.compact {
    display: flex;
    gap: 25px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 0;
    white-space: nowrap;
}

/* Prevent wrapping */
#plannedTradeList.compact .trade-card {
    flex: 0 0 320px;
    white-space: normal;
    height: 100%;
}

/* Force equal height */
#plannedTradeList.compact .planned-card {
    display: flex;
    flex-direction: column;
}

/* Optional scrollbars off (clean UI) */
#plannedTradeList.compact::-webkit-scrollbar {
    height: 6px;
    background: transparent;
}
/* --- FORCE CAROUSEL MODE FOR TRADE PLANS --- */
#plannedTradeList.compact {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    gap: 25px;
    scroll-behavior: smooth;
    padding: 10px 0;
}

/* Ensure each card has a fixed width and never wraps */
#plannedTradeList.compact .planned-card {
    flex: 0 0 320px !important; 
    height: 100% !important;
    display: flex;
    flex-direction: column;
}

/* Hide scrollbar but keep scrolling behavior */
#plannedTradeList.compact::-webkit-scrollbar {
    height: 0px;
}
/* Hide scrollbar visually but keep scroll logic alive */
#plannedTradeList.compact::-webkit-scrollbar {
    display: none;
}
#plannedTradeList.compact {
    scrollbar-width: none; /* Firefox */
}
/* ---- BUTTON STYLE FIXES ---- */
#carouselNav button,
#toggle-view,
#btn-init-plan {
    font-size: 11px;
    padding: 6px 14px;
    border-radius: 4px;
    letter-spacing: 1px;
}


/* ---- ARROW BUTTON VISUALS ---- */
#carouselNav {
    margin-top: 10px !important;
}

#carouselNav button {
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}


/* ---- EXPANDED VIEW ALIGNMENT ---- */
#toggle-view {
    margin-top: 10px;
    margin-right: 15px;
}


/* ---- INITIATE PLAN BUTTON SPACING ---- */
#init-plan-container {
    margin-top: 20px !important;
}


/* ---- GENERAL SPACING CLEANUP ---- */
#plannedTradesSection {
    gap: 10px;
}
/* Move arrow controls closer to carousel */
#plannedControls,
#carouselNav {
    margin-top: 5px !important;
    position: relative;
    top: -10px;
}

/* Size cleanup for arrow buttons */
#carouselPrev, #carouselNext {
    width: 24px;
    height: 24px;
    background: transparent;
    border: 1px solid rgba(0,255,157,0.35);
    color: rgba(0,255,157,0.75);
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: 0.25s ease;
    backdrop-filter: blur(2px);
}

/* Hover state (subtle glow) */
#carouselPrev:hover, #carouselNext:hover {
    border-color: rgba(0,255,157,0.75);
    color: rgba(0,255,157,1);
    box-shadow: 0px 0px 6px rgba(0,255,157,0.35);
}

/* Active press animation */
#carouselPrev:active, #carouselNext:active {
    transform: scale(0.90);
}

/* Expanded View aligned bottom-right cleanly */
#toggle-view {
    position: relative;
    right: 0;
    margin-left: auto;
    margin-top: 5px;
}

/* Make spacing under controls consistent */
#init-plan-container {
    margin-top: 30px !important;
}
/* ---- CENTER AND LIFT THE ARROWS CLOSER TO THE CARDS ---- */
#carouselNav, #plannedControls {
    top: -15px !important;  /* was -25 earlier */
}



/* ---- ARROW BUTTON SIZE MATCH UI ---- */
#carouselPrev, 
#carouselNext {
    width: 30px !important;
    height: 30px !important;
    padding: 0 !important;
    font-size: 12px !important;
    display: flex;
    justify-content: center;
    align-items: center;
}


/* ---- EXPANDED VIEW BUTTON FIX: BOTTOM RIGHT CLEAN ALIGNMENT ---- */
#toggle-view {
    margin-top: -10px !important;
    margin-right: 10px !important;
}
#init-plan-container {
    margin-top: 35px !important;
}
/* Smooth scrolling + snap alignment */
#plannedTradeList {
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    overflow-x: auto !important;
    overflow-y: hidden;
}

/* Each card becomes a snap target */
#plannedTradeList .planned-card {
    scroll-snap-align: center;
}
#carouselPrev, #carouselNext {
    width: 24px;
    height: 24px;
    background: transparent;
    border: 1px solid rgba(0,255,157,0.35);
    color: rgba(0,255,157,0.75);
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: 0.25s ease;
    backdrop-filter: blur(2px);
}

/* Hover state (subtle glow) */
#carouselPrev:hover, #carouselNext:hover {
    border-color: rgba(0,255,157,0.75);
    color: rgba(0,255,157,1);
    box-shadow: 0px 0px 6px rgba(0,255,157,0.35);
}

/* Active press animation */
#carouselPrev:active, #carouselNext:active {
    transform: scale(0.90);
}
/* --- MATCH RANGE LOOK TO SYSTEM --- */
.sys-range {
  -webkit-appearance: none;
  height: 4px;
  background: var(--border);
  outline: none;
  border-radius: 2px;
}

.sys-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 16px;
  width: 16px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
}
/* --- MATCH EXECUTION BUTTON TO EXISTING STYLE --- */
.btn-green {
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  padding: 12px;
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}

.btn-green:hover {
  background: var(--accent);
  color: black;
}
#tradeInputs_execution {
  position: fixed;
  inset: 0;
  background: rgba(0, 255, 157, 0.04);
  backdrop-filter: blur(12px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 100001;
}

#tradeInputs_execution .sys-modal {
  width: 520px;
  max-width: 92vw;
  background: #0a0a0a;
  border: 1px solid rgba(0,255,157,0.2);
  box-shadow: 0 0 35px rgba(0,255,157,0.1);
  border-radius: 6px;
}

#tradeInputs_execution .modal-inner {
  padding: 24px 28px 28px 28px;
  max-height: 86vh;
  overflow-y: auto;
}

/* Match OPEN section buttons exactly to PREPARED TRADE PLAN styling */

#btn-open-trade {
    width: 215px !important;
    height: 38px !important;
    padding: 10px 22px !important;
    font-size: 12px !important;
    letter-spacing: 1px !important;
    text-align: center !important;
}

/* Navigation arrows styling for Open Trades (match upper carousel) */
#openNavControls button {
    width: 45px !important;
    height: 38px !important;
    font-size: 14px !important;
    padding: 0 !important;
}
/* FORCE Open Trade button to match Initiate Trade Plan button */

#btn-open-trade {
    font-family: var(--font-mono) !important;
    font-size: 11px !important;
    text-transform: uppercase !important;
    letter-spacing: 1.4px !important;
    padding: 6px 18px !important;
    border-radius: 3px !important;
    border: 1px solid var(--accent) !important;
    background: transparent !important;
    color: var(--accent) !important;
    cursor: pointer !important;
    transition: 0.2s !important;
}

#btn-open-trade:hover {
    background: rgba(0,255,157,0.08) !important;
}
/* === UNIFY BUTTON STYLE ACROSS PAGE === */


button.btn-tech:hover {
    background: rgba(0,255,157,0.12);
}

/* glow effect standardization */
button.btn-glow {
    box-shadow: 0 0 6px rgba(0,255,157,0.6);
}

button.btn-glow:hover {
    box-shadow: 0 0 12px rgba(0,255,157,0.9);
}
/* === FORCE INITIATE + OPEN TRADE BUTTONS TO MATCH EXACTLY === */

#btn-init-plan,
#btn-open-trade {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 6px 14px;
    min-width: 190px;

    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;

    border-radius: 3px;
    border: 1px solid var(--accent);
    background: transparent;
    color: var(--accent);

    cursor: pointer;
    transition: 0.2s;
}

#btn-init-plan:hover,
#btn-open-trade:hover {
    background: rgba(0,255,157,0.08);
}

/* === Make both sets of nav arrows match too === */

#carouselPrev,
#carouselNext,
#openPrev,
#openNext {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 45px;
    padding: 4px 0;

    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 1px;

    border-radius: 3px;
    border: 1px solid var(--accent);
    background: transparent;
    color: var(--accent);

    cursor: pointer;
    transition: 0.2s;
}

#carouselPrev:hover,
#carouselNext:hover,
#openPrev:hover,
#openNext:hover {
    background: rgba(0,255,157,0.08);
}
#openTradeModal {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 255, 157, 0.05);
    backdrop-filter: blur(6px);
    display: flex;  /* Changed from 'none' to 'flex' */
    justify-content: center;
    align-items: center;
    z-index: 999999;
}

#openTradeModal.hidden {
    display: none;  /* Hide when has 'hidden' class */
}

#openTradeModal.hidden {
    display: none !important;
}

#openTradeList .port-item {
    margin-bottom: 10px;
}

#openTradeList .port-item:hover {
    transform: translateY(-2px);
}

.select-plan-item {
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid rgba(0,255,157,0.2);
    border-radius: 4px;
    cursor: pointer;
    background: rgba(0,255,157,0.03);
    transition: 0.2s;
    font-size: 11px;
    letter-spacing: .5px;
}

.select-plan-item:hover {
    background: rgba(0,255,157,0.08);
}

.select-plan-item.active {
    border-color: var(--accent);
    background: rgba(0,255,157,0.15);
}

.select-plan-item .plan-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text);
}
/* === NEW SELECTION CARD STYLES === */
.select-plan-card {
    display: flex;
    align-items: center; /* Vertically center */
    gap: 12px;
    background: #0e0e0e;
    border: 1px solid #333;
    padding: 8px;
    margin-bottom: 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.select-plan-card:hover {
    background: #151515;
    border-color: #666;
    transform: translateX(4px);
}

.select-plan-card.active {
    border-color: var(--accent);
    background: rgba(0, 255, 157, 0.08);
    box-shadow: 0 0 10px rgba(0, 255, 157, 0.05);
}

/* Image styling */
.select-plan-thumb {
    width: 80px;
    height: 50px;
    object-fit: cover; /* Keeps aspect ratio clean */
    border: 1px solid #222;
    border-radius: 2px;
    background: #000;
}

.select-plan-no-img {
    width: 80px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #080808;
    border: 1px dashed #333;
    font-size: 8px;
    color: #555;
    font-family: var(--font-mono);
}

/* Text Container */
.select-plan-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.select-plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 11px;
    color: #fff;
    font-weight: bold;
}

.select-plan-meta {
    font-size: 10px;
    color: #888;
}
/* 1. FORCE THE LIST CONTAINER TO HIDE HORIZONTAL SCROLL */
#openTradeList {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    padding-right: 5px; /* Space for vertical scrollbar */
}

/* 2. UPDATE THE CARD CONTAINER */
.select-plan-card {
    display: flex;
    align-items: center;
    gap: 15px; /* Increased gap slightly */
    background: #0e0e0e;
    border: 1px solid #333;
    padding: 10px; /* More breathing room */
    margin-bottom: 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;       /* Force full width */
    box-sizing: border-box; /* Include padding in width calculation */
    overflow: hidden;  /* CUT OFF anything that sticks out */
    position: relative;
}

/* 3. FIX THE TEXT CONTAINER (Crucial for removing scrollbar) */
.select-plan-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0; /* CRITICAL: Allows text to truncate in flexbox */
    text-align: left; /* Fixes the centered text in your screenshot */
}

/* 4. IMAGE TWEAK */
.select-plan-thumb {
    width: 70px;
    height: 70px; /* Square looks more modern for lists */
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #222;
    flex-shrink: 0; /* Prevent image from getting squashed */
}

.select-plan-no-img {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111;
    border: 1px dashed #333;
    font-size: 9px;
    color: #444;
    border-radius: 4px;
    flex-shrink: 0;
}
/* ===========================
   EXECUTION MODAL POLISH
   (Safe version - no layout locking)
=========================== */

/* Smooth fade appearance */
#tradeInputs_execution {
    opacity: 0;
    animation: execFadeIn 0.18s ease-out forwards;
}

@keyframes execFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Modal container feel */
#tradeInputs_execution .sys-modal {
    border: 1px solid rgba(255,255,255,0.05);
    background: #0f0f0f;
    box-shadow: 0px 0px 22px rgba(0,255,140,0.05);
}

/* Preview card subtle polish */
#exec-plan-preview {
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255,255,255,0.03);
    transition: 0.2s ease;
}

/* Micro hover tone (no shadow heavy GPU load) */
#exec-plan-preview:hover {
    border-color: rgba(0,255,155,0.18);
}

/* Direction badge polish */
#exec-plan-direction {
    font-weight: 600;
    letter-spacing: 0.4px;
    transition: 0.18s ease;
}

#exec-plan-direction:hover {
    opacity: 0.9;
}

/* Inputs improvement */
.sys-inp-tech:focus {
    border-color: var(--accent);
    outline: none;
}

/* Buttons */
#btn-save-execution:hover {
    filter: brightness(1.15);
}

#btn-cancel-execution:hover {
    background: rgba(255,255,255,0.05);
}
/* Execution modal button polish */
.execution-btn {
    flex:1;
    min-height:46px;
    border-radius:6px;
    font-size:13px;
    letter-spacing:0.6px;
    transition:0.18s ease;
}

/* Cancel button */
#btn-cancel-execution {
    background:rgba(255,255,255,0.04);
    border:1px solid rgba(255,255,255,0.05);
}

#btn-cancel-execution:hover {
    background:rgba(255,255,255,0.08);
}

/* Confirm button styled like your dashboard green button */
#btn-save-execution.primary {
    background:rgba(0,255,133,0.08);
    border:1px solid rgba(0,255,133,0.35);
    color:var(--accent);
}

#btn-save-execution.primary:hover {
    background:rgba(0,255,133,0.18);
    box-shadow:0 0 10px rgba(0,255,133,0.25);
}

/* --- FINAL EXECUTION MODAL LAYOUT POLISH --- */

/* Add breathing room between preview card and form */
#exec-plan-preview {
    margin-bottom: 26px !important;
}

/* More consistent spacing between grouped elements */
#tradeInputs_execution .f-group {
    margin-bottom: 22px !important;
}

/* Adjust section headers so they aren't tight */
#tradeInputs_execution label.input-label-tech {
    margin-bottom: 6px;
    letter-spacing: 0.5px;
    opacity: 0.85;
}

/* Equalize spacing between rows inside grid */
#tradeInputs_execution .form-grid {
    gap: 24px !important;
    margin-bottom: 14px;
}

/* Make fields feel calmer visually */
#tradeInputs_execution .sys-inp-tech,
#tradeInputs_execution textarea {
    padding: 10px 12px;
}

/* Section divider line subtle spacing */
#tradeInputs_execution .modal-body {
    padding-top: 6px;
}

/* Push the final button row further down so it feels intentional */
#tradeInputs_execution .modal-actions {
    margin-top: 32px !important;
}

/* Make the cancel button visually balanced */
#btn-cancel-execution {
    opacity: 0.65;
}
#btn-cancel-execution:hover {
    opacity: 0.9;
}

/* Slight softening to overall modal spacing */
#tradeInputs_execution .sys-modal {
    padding-bottom: 26px;
}

/* Slightly reduce input height so layout breathes more */
#tradeInputs_execution select,
#tradeInputs_execution input {
    height: 38px;
}

/* -------- BUTTON MATCHING THEME -------- */

#btn-save-execution {
  background: var(--accent);
  color: black;
  border: none;
  font-weight: 600;
  transition: 0.15s ease;
}

#btn-save-execution:hover {
  filter: brightness(1.15);
}

/* Cancel button subtle but visible */
#btn-cancel-execution {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.75);
  transition: 0.15s ease;
}

#btn-cancel-execution:hover {
  background: rgba(255,255,255,0.12);
  color: white;
  border-color: rgba(255,255,255,0.25);
}
/* -------- CONFIDENCE SLIDER THEME MATCH -------- */

#execution_confidence {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  cursor: pointer;
}

/* Track */
#execution_confidence::-webkit-slider-runnable-track {
  background: rgba(255,255,255,0.12);
  height: 6px;
  border-radius: 4px;
}

/* Thumb */
#execution_confidence::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 16px;
  width: 16px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(0,255,140,0.35);
  cursor: pointer;
  transition: 0.15s;
}

#execution_confidence::-webkit-slider-thumb:hover {
  box-shadow: 0 0 12px rgba(0,255,140,0.45);
}

#execution_conf_value {
  font-family: var(--font-mono);
  font-size: 11px;
  text-align: right;
  margin-top: 6px;
  color: var(--accent);
}
/* --------- NEON ACTION BUTTON (MATCH EXACT BUTTON STYLE) --------- */

#btn-save-execution {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    padding: 14px 18px;
    transition: 0.18s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 6px rgba(0,255,133,0.25);
    border-radius: 6px;
}

#btn-save-execution:hover {
    box-shadow: 0 0 12px rgba(0,255,133,0.5);
    transform: translateY(-1px);
    filter: brightness(1.25);
    cursor: pointer;
}

/* SMALLER ARROW FEEL */
#btn-save-execution span:first-child {
    opacity: 0.8;
    font-size: 11px !important;
}


/* --------- CANCEL BUTTON STYLE (SECONDARY VERSION) --------- */

#btn-cancel-execution {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.65);
    font-family: var(--font-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 6px;
    transition: 0.18s ease-in-out;
}

#btn-cancel-execution:hover {
    border-color: rgba(255,255,255,0.4);
    color: white;
    cursor: pointer;
}
/* ---- MATCH SYSTEM SLIDER ---- */
#execution_confidence {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.12);
  border-radius: 2px;
  margin-top: 6px;
}

/* Track */
#execution_confidence::-webkit-slider-runnable-track {
  height: 4px;
  background: rgba(255,255,255,0.12);
  border-radius: 2px;
}

/* Thumb */
#execution_confidence::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 2px;
  background: var(--accent);
  cursor: pointer;
  margin-top: -5px;
  box-shadow: 0 0 6px rgba(0,255,133,0.4);
}

#btn-cancel-execution {
  color: rgba(255,255,255,0.5);
  background: transparent;
  border: none;
  font-size: 12px;
  font-family: var(--font-mono);
  letter-spacing: 0.8px;
}

#btn-cancel-execution:hover {
  color: white;
  cursor: pointer;
}
#tradeInputs_execution .modal-inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}
#tradeInputs_execution .modal-actions {
  margin-top: 24px;
  width: 100%;
}
#btn-save-execution {
  font-family: var(--font-mono);
  letter-spacing: 1.2px;
  font-size: 12px;
}

#btn-cancel-execution.small {
  font-size: 11px;
  opacity: 0.6;
}
#btn-cancel-execution.small:hover {
  opacity: 1;
  cursor: pointer;
}
/* --- Execution Modal Final UI Fix --- */

/* Make main execute button align and size predictably */
#btn-save-execution {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
}

/* Ensure cancel button aligns under execute button */
#btn-cancel-execution {
    display: block;
    text-align: center;
    margin-top: 10px;
    width: 100%;
}

/* Give breathing room so button isn't glued to bottom */
.modal-actions {
    margin-top: 32px !important;
    padding-bottom: 12px;
}

/* ---- Slider Polish (final alignment) ---- */
#execution_confidence {
    margin-top: 8px;
}

#execution_confidence::-webkit-slider-thumb {
    margin-top: -5px; /* centers thumb in track visually */
}

/* Confidence number alignment */
#execution_conf_value {
    text-align: right;
    margin-top: 4px;
    padding-right: 4px;
}
/* --- PREMIUM MODAL FOOTER & BUTTONS --- */

.modal-footer-tech {
    padding: 20px 25px;
    border-top: 1px solid #1f1f1f;
    background: #050505; /* Matches body */
    display: flex;
    gap: 15px;
}

/* Base Tech Button Structure */
.btn-tech-xl {
    flex: 1;
    height: 44px; /* Taller for better hit area */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px; /* Sharp tech corners */
    position: relative;
    overflow: hidden;
}

/* 1. CANCEL BUTTON (Stealth Mode) */
.btn-cancel-tech {
    background: transparent;
    border: 1px solid #333;
    color: #555;
}

.btn-cancel-tech:hover {
    border-color: #666;
    color: #ccc;
    background: rgba(255, 255, 255, 0.03);
    transform: translateY(-1px);
}

/* 2. CONFIRM BUTTON (Neon Activation) */
.btn-confirm-tech {
    background: rgba(0, 255, 157, 0.05);
    border: 1px solid var(--accent);
    color: var(--accent);
    box-shadow: 0 0 15px rgba(0, 255, 157, 0.1); /* Subtle glow */
}

.btn-confirm-tech:hover {
    background: var(--accent);
    color: #000; /* Contrast text on hover */
    box-shadow: 0 0 25px rgba(0, 255, 157, 0.4); /* Strong glow */
    transform: translateY(-1px);
    font-weight: 800;
}

.btn-confirm-tech:active {
    transform: translateY(1px);
    box-shadow: 0 0 10px rgba(0, 255, 157, 0.2);
}

/* SVG Icon alignment inside button */
.btn-tech-xl svg {
    width: 14px;
    height: 14px;
    stroke-width: 2.5;
}
/* --- PREMIUM MODAL STYLING --- */
.modal-footer-tech {
    padding: 15px 20px;
    border-top: 1px solid #1f1f1f;
    background: #080808;
    display: flex;
    gap: 15px;
}

/* Taller, sleeker buttons for modals */
.btn-tech-xl {
    flex: 1;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

.btn-cancel-tech {
    background: transparent;
    border: 1px solid #333;
    color: #555;
}
.btn-cancel-tech:hover {
    border-color: #666;
    color: #ccc;
    background: rgba(255,255,255,0.03);
}

.btn-confirm-tech {
    background: rgba(0, 255, 157, 0.08);
    border: 1px solid var(--accent);
    color: var(--accent);
}
.btn-confirm-tech:hover {
    background: var(--accent);
    color: #000;
    box-shadow: 0 0 15px rgba(0, 255, 157, 0.3);
}
/* --- INPUTS LOCK OVERLAY --- */
.inputs-locked-overlay {
    position: absolute;
    inset: 0;
    background: rgba(5, 5, 5, 0.85); /* Dark semi-transparent */
    backdrop-filter: blur(4px);      /* Blur effect */
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1px dashed var(--error);
    border-radius: 4px;
    animation: fadeIn 0.2s ease;
}

.lock-icon-container {
    color: var(--error);
    margin-bottom: 15px;
    filter: drop-shadow(0 0 10px rgba(255, 68, 68, 0.2));
}

.lock-msg-title {
    color: #fff;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 8px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.lock-msg-sub {
    color: #888;
    font-size: 11px;
    max-width: 280px;
    line-height: 1.5;
    font-family: 'Inter', sans-serif;
}

/* 3-WAY TOGGLE VISUALS */
.toggle-wrap {
    display: grid;
    grid-template-columns: 1fr 40px 1fr; /* YES | / | NO */
    gap: 2px;
    background: #000;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 2px;
}

.tgl-btn {
    background: transparent;
    border: none;
    color: #444;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 2px;
    font-family: var(--font-mono);
    transition: 0.15s ease;
}

/* State Colors */
.tgl-btn[data-val="yes"].active { background: var(--accent); color: #000; }
.tgl-btn[data-val="no"].active { background: var(--error); color: #fff; }
.tgl-btn[data-val="neutral"].active { background: #222; color: #888; border: 1px solid #444; }

/* =========================================
   INBOX NOTIFICATION SYSTEM
   ========================================= */

/* Badge on nav button */
.inbox-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--error);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    font-family: var(--font-mono);
    animation: pulse 2s infinite;
}

/* Inbox Item Cards */
.inbox-item {
    background: #0e0e0e;
    border: 1px solid var(--border);
    border-left: 3px solid var(--error);
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.2s;
}

.inbox-item:hover {
    border-color: var(--accent);
    background: #131313;
}

.inbox-item.warning {
    border-left-color: #f4d35e;
}

.inbox-item.expired {
    border-left-color: var(--error);
}

.inbox-info {
    flex: 1;
}

.inbox-title {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.inbox-meta {
    font-size: 10px;
    color: #666;
    font-family: var(--font-mono);
}

.inbox-actions {
    display: flex;
    gap: 10px;
}

.countdown-timer {
    font-size: 11px;
    color: var(--error);
    font-family: var(--font-mono);
    padding: 4px 8px;
    background: rgba(255, 68, 68, 0.1);
    border-radius: 3px;
    margin-top: 5px;
}

.empty-inbox {
    text-align: center;
    padding: 40px;
    color: #444;
    font-size: 12px;
}

/* =========================================
   PREMIUM EXECUTION MODAL OVERRIDES
   ========================================= */

/* 1. Modal Container: Tighter padding, darker background */
#tradeInputs_execution .modal-inner {
    padding: 0; /* Remove default padding, we will manage it internally */
    background: #050505;
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 600px; /* Limit height for compact feel */
}

/* 2. The Header: Distinct, tech-border */
.exec-header {
    background: #0a0a0a;
    border-bottom: 1px solid #1f1f1f;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.exec-header-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.exec-label {
    font-size: 9px;
    color: #555;
    letter-spacing: 1.5px;
    font-weight: 700;
}

.exec-asset {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 3. The Body: Scrolling area with tighter spacing */
.exec-body {
    padding: 20px 25px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px; /* Reduced from 20px+ */
}

/* 4. Grid System for Session/Direction */
.exec-grid-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* 5. Inputs: Premium look */
.exec-group label {
    font-size: 9px;
    color: var(--accent);
    opacity: 0.7;
    letter-spacing: 1px;
    margin-bottom: 6px;
    display: block;
    text-transform: uppercase;
}

.exec-input {
    background: #080808;
    border: 1px solid #222;
    color: #fff;
    font-family: var(--font-mono);
    font-size: 12px;
    padding: 10px;
    width: 100%;
    border-radius: 2px;
    transition: 0.2s;
}

.exec-input:focus {
    border-color: var(--accent);
    background: #0b0b0b;
    box-shadow: 0 0 10px rgba(0,255,157,0.05);
}

textarea.exec-input {
    min-height: 80px;
    resize: none;
    line-height: 1.5;
}

/* 6. The Confidence Module (The "Weird Space" Fix) */
.conf-module {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid #1a1a1a;
    padding: 12px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.conf-header {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: #666;
    font-family: var(--font-mono);
}

/* Custom Slider Style */
input[type=range].tech-slider {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
}

input[type=range].tech-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 14px;
    width: 6px;
    border-radius: 1px;
    background: var(--accent);
    cursor: pointer;
    margin-top: -5px; /* Centers thumb */
    box-shadow: 0 0 8px var(--accent);
}

input[type=range].tech-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: #222;
    border-radius: 2px;
}

/* 7. Footer Actions */
.exec-footer {
    padding: 20px 25px;
    border-top: 1px solid #1f1f1f;
    background: #080808;
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-exec-primary {
    flex: 2;
    background: var(--accent);
    color: #000;
    border: none;
    padding: 12px;
    font-weight: 800;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: 0.2s;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-exec-primary:hover {
    box-shadow: 0 0 15px rgba(0, 255, 157, 0.4);
    transform: translateY(-1px);
}

.btn-exec-cancel {
    flex: 1;
    background: transparent;
    border: 1px solid #333;
    color: #666;
    padding: 12px;
    font-weight: 600;
    font-family: var(--font-mono);
    font-size: 10px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-exec-cancel:hover {
    border-color: #666;
    color: #fff;
}

/* =======================================================
   UNIFIED CARD LAYOUT FIX (Open + Planned)
   ======================================================= */

/* 1. Force both lists to use the same scrolling layout */
#plannedTradeList.compact,
#openTradesList.compact {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    justify-content: flex-start !important;
    gap: 25px;
    padding: 10px 0;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Hide scrollbar Firefox */
}

/* Hide scrollbar Webkit */
#plannedTradeList.compact::-webkit-scrollbar,
#openTradesList.compact::-webkit-scrollbar {
    display: none;
}

/* 2. Force Card Width (This fixes the "Tight/Crowded" look) */
#plannedTradeList.compact .planned-card,
#openTradesList.compact .planned-card {
    flex: 0 0 320px !important; /* Fixed width, never shrink */
    width: 320px !important;
    min-width: 320px !important;
    height: 100% !important;
    scroll-snap-align: center;
}

/* 3. Fix the "NO CHART" Box (Make it global, not scoped) */
.no-chart-placeholder {
    width: 100% !important;
    height: 140px !important;
    min-height: 140px !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px dashed #333 !important;
    border-radius: 4px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #555 !important;
    font-family: var(--font-mono) !important;
    font-size: 10px !important;
    letter-spacing: 2px !important;
    margin: 10px 0 !important;
    text-transform: uppercase !important;
    box-shadow: none !important;
}

/* 4. Ensure Bottom Buttons share width equally */
.plan-actions {
    display: flex;
    gap: 10px;
    margin-top: auto; /* Push to bottom */
}

.plan-actions button {
    flex: 1; /* Stretch to fill space */
}

/* CLOSE MODAL SUMMARY CARD */
.close-summary-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid #222;
    border-left: 2px solid var(--accent);
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 20px;
}

.close-stat-label {
    font-size: 9px;
    color: #666;
    letter-spacing: 1px;
    margin-bottom: 4px;
    font-family: var(--font-mono);
    text-transform: uppercase;
}

.close-stat-val {
    font-size: 13px;
    color: #fff;
    font-weight: 700;
    font-family: var(--font-mono);
    letter-spacing: 0.5px;
}
/* =========================================
   COMPACT MODAL UPGRADE KIT
   ========================================= */

/* --- GENERAL FORM RESET --- */
/* Remove excessive margins from groups inside the modal */
#plan-modal-body .f-group {
    margin-bottom: 0 !important; /* Let the grid handle spacing */
}

#plan-modal-body .input-group {
    margin-bottom: 0 !important;
}

/* --- TAB 1: RISK ENGINE COMPACTING --- */
#risk-module {
    /* Remove the outer margin to fit flush */
    margin-bottom: 0 !important; 
    border: none !important; 
    background: transparent !important;
}

/* Make the inputs a tight 2x2 grid */
#risk-module > div:nth-child(2) {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 15px !important; /* Reduced from default */
    padding: 15px 0 !important;
}

/* Align the Bottom Bar (Button + Results) */
#risk-module > div:nth-child(3) {
    background: rgba(255,255,255,0.02) !important;
    border: 1px solid #222 !important;
    border-radius: 4px;
    padding: 10px 15px !important;
    margin-top: 10px;
}

/* Make inputs slightly shorter */
#risk-module input.inp-std {
    padding: 8px 10px !important;
    height: 36px !important;
    font-size: 13px !important;
}

/* --- TAB 2: CHECKLIST COMPACTING --- */
/* Reduce vertical height of each row */
#checklist-module .chk-item {
    padding: 6px 0 !important; /* Reduced from 10px */
    border-bottom: 1px dashed #222 !important;
}

#checklist-module .chk-label {
    font-size: 11px !important;
}

#checklist-module .tgl-btn {
    padding: 2px 8px !important;
    font-size: 9px !important;
}

/* --- TAB 3: TRADE INPUTS COMPACTING (The Big One) --- */
#tradeInputs_plan {
    margin-top: 10px !important;
}

/* Create a 3-column Grid for the top inputs */
#tradeInputs_plan .form-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr !important; /* 3 Columns instead of 2 */
    gap: 15px !important;
    margin-bottom: 15px;
}

/* Span the Notes across all 3 columns */
#tradeInputs_plan .form-grid .full-row {
    grid-column: span 3;
}

/* Make inputs shorter and tighter */
#tradeInputs_plan .inp-std,
#tradeInputs_plan select {
    height: 36px !important;
    padding: 6px 10px !important;
    font-size: 12px !important;
    background: #080808 !important;
}

#tradeInputs_plan textarea {
    min-height: 60px !important; /* Reduce height */
    background: #080808 !important;
}

/* Tighten the "Save" button area */
#btn-save-plan {
    margin-top: 15px !important;
    padding: 10px !important;
    font-size: 12px !important;
    letter-spacing: 2px !important;
}

/* =========================================
   COMPACT MODAL UPGRADE KIT
   ========================================= */

/* --- GENERAL FORM RESET --- */
/* Remove excessive margins from groups inside the modal */
#plan-modal-body .f-group {
    margin-bottom: 0 !important; /* Let the grid handle spacing */
}

#plan-modal-body .input-group {
    margin-bottom: 0 !important;
}

/* --- TAB 1: RISK ENGINE COMPACTING --- */
#risk-module {
    /* Remove the outer margin to fit flush */
    margin-bottom: 0 !important; 
    border: none !important; 
    background: transparent !important;
}

/* Make the inputs a tight 2x2 grid */
#risk-module > div:nth-child(2) {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 15px !important; /* Reduced from default */
    padding: 15px 0 !important;
}

/* Align the Bottom Bar (Button + Results) */
#risk-module > div:nth-child(3) {
    background: rgba(255,255,255,0.02) !important;
    border: 1px solid #222 !important;
    border-radius: 4px;
    padding: 10px 15px !important;
    margin-top: 10px;
}

/* Make inputs slightly shorter */
#risk-module input.inp-std {
    padding: 8px 10px !important;
    height: 36px !important;
    font-size: 13px !important;
}

/* --- TAB 2: CHECKLIST COMPACTING --- */
/* Reduce vertical height of each row */
#checklist-module .chk-item {
    padding: 6px 0 !important; /* Reduced from 10px */
    border-bottom: 1px dashed #222 !important;
}

#checklist-module .chk-label {
    font-size: 11px !important;
}

#checklist-module .tgl-btn {
    padding: 2px 8px !important;
    font-size: 9px !important;
}

/* --- TAB 3: TRADE INPUTS COMPACTING (The Big One) --- */
#tradeInputs_plan {
    margin-top: 10px !important;
}

/* Create a 3-column Grid for the top inputs */
#tradeInputs_plan .form-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr !important; /* 3 Columns instead of 2 */
    gap: 10px !important;
    margin-bottom: 10px;
}

/* Span the Notes across all 3 columns */
#tradeInputs_plan .form-grid .full-row {
    grid-column: span 3;
}

/* Make inputs shorter and tighter */
#tradeInputs_plan .inp-std,
#tradeInputs_plan select {
    height: 32px !important;
    padding: 4px 8px !important;
    font-size: 11px !important;
    background: #080808 !important;
}

#tradeInputs_plan textarea {
    min-height: 60px !important; /* Reduce height */
    background: #080808 !important;
    font-size: 11px !important;
}

/* Tighten the "Save" button area */
#btn-save-plan {
    margin-top: 10px !important;
    padding: 10px !important;
    font-size: 11px !important;
    letter-spacing: 2px !important;
}

/* ============================================================
   ⚠️ FORCE COMPACT MODAL STYLES (Paste at bottom of CSS)
   ============================================================ */

/* --- 1. RISK ENGINE (Tab 1) --- */
/* Target the input container specifically */
#risk-module > div:nth-of-type(2) {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important; /* Force 2 columns */
    gap: 10px !important;
    padding: 10px 0 !important;
}

/* Hide the spacer labels if they exist */
#risk-module label {
    font-size: 9px !important;
    margin-bottom: 2px !important;
}

/* Compact Inputs */
#risk-module input.inp-std {
    height: 30px !important;
    padding: 4px 8px !important;
    font-size: 11px !important;
    background: #050505 !important;
}

/* Compact Result Bar */
#risk-module > div:nth-of-type(3) {
    padding: 8px 12px !important;
    margin-top: 5px !important;
    background: #0a0a0a !important;
    border: 1px solid #222 !important;
}

#re-lots {
    font-size: 18px !important; /* Smaller big number */
}

/* --- 2. CHECKLIST (Tab 2) --- */
#checklist-module .checklist-stack {
    gap: 0px !important; /* Remove gap between rows */
}

#checklist-module .chk-item {
    padding: 6px 0 !important; /* Tighter rows */
    border-bottom: 1px dashed #1a1a1a !important;
}

#checklist-module .chk-label {
    font-size: 10px !important;
}

#checklist-module .tgl-btn {
    padding: 2px 8px !important;
    font-size: 9px !important;
    height: 24px !important;
}

#checklist-module .progress-track {
    margin-bottom: 10px !important;
    height: 2px !important;
}

/* --- 3. TRADE INPUTS (Tab 3) --- */
/* This ensures the grid applies even if HTML classes are missing */
#tradeInputs_plan .form-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 10px !important;
}

#tradeInputs_plan .f-group {
    margin-bottom: 0 !important;
}

#tradeInputs_plan label {
    font-size: 9px !important;
    margin-bottom: 3px !important;
}

#tradeInputs_plan input, 
#tradeInputs_plan select {
    height: 30px !important;
    font-size: 11px !important;
    background: #050505 !important;
}

#tradeInputs_plan textarea {
    min-height: 50px !important;
    font-size: 11px !important;
    background: #050505 !important;
}

/* ============================================================
   PLANNING MODAL COMPACT UPGRADE (Paste at bottom of CSS)
   ============================================================ */

/* --- 1. GENERAL MODAL RESET --- */
#plan-modal-body {
    padding: 0 !important;
    overflow-y: auto;
}

/* Remove default spacing from groups inside modal */
#plan-modal-body .f-group {
    margin-bottom: 0 !important;
}

/* --- 2. RISK ENGINE (Tab 1) - COMPACT --- */
#risk-module {
    margin-bottom: 0 !important; 
    border: none !important; 
    background: transparent !important;
    padding: 10px 0 !important;
}

/* Force 2-Column Grid for Risk Inputs */
#risk-module > div:nth-child(2) {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    padding: 0 !important;
    margin-bottom: 15px !important;
}

/* Tighten Risk Inputs */
#risk-module input.inp-std {
    height: 34px !important;
    padding: 4px 10px !important;
    font-size: 12px !important;
    background: #050505 !important;
}

/* Compact Result Bar */
#risk-module > div:nth-child(3) {
    padding: 10px 15px !important;
    margin-top: 5px !important;
    background: #090909 !important;
    border: 1px solid #222 !important;
}

/* --- 3. CHECKLIST (Tab 2) - COMPACT --- */
#checklist-module .chk-item {
    padding: 8px 0 !important; /* Reduced height */
    border-bottom: 1px dashed #1a1a1a !important;
}

#checklist-module .tgl-btn {
    padding: 3px 10px !important;
    font-size: 9px !important;
}

/* --- 4. TRADE INPUTS (Tab 3) - THE 3-COLUMN GRID --- */
/* This targets the specific ID you will paste in HTML below */
#tradeInputs_plan {
    margin-top: 10px !important;
}

/* Force 3 Columns */
#tradeInputs_plan .compact-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 12px !important;
    margin-bottom: 12px !important;
}

/* Input Styling */
#tradeInputs_plan label {
    font-size: 9px !important;
    margin-bottom: 4px !important;
    color: #666 !important;
    letter-spacing: 1px !important;
}

#tradeInputs_plan .inp-std,
#tradeInputs_plan select {
    height: 34px !important;
    font-size: 11px !important;
    background: #050505 !important;
    border: 1px solid #222 !important;
}

#tradeInputs_plan .inp-std:focus,
#tradeInputs_plan select:focus {
    border-color: var(--accent) !important;
}

#tradeInputs_plan textarea {
    min-height: 60px !important;
    height: 60px !important;
    background: #050505 !important;
    font-size: 11px !important;
    resize: none !important;
}

/* Save Button Position */
#btn-save-plan {
    margin-top: 10px !important;
    padding: 12px !important;
    font-size: 11px !important;
    letter-spacing: 2px !important;
}

/* --- WEEKLY AUDIT WIZARD (PREMIUM TECH) --- */

.review-wizard-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
    background: #0b0b0b;
    border-radius: 2px;
}

.review-step {
    display: none;
    animation: fadeIn 0.4s ease;
    height: 100%;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.review-step.active {
    display: flex;
}

/* ARCHETYPE IDENTITY CARD */
.archetype-card {
    background: radial-gradient(circle at center, rgba(0, 255, 157, 0.08) 0%, #050505 80%);
    border: 1px solid var(--accent);
    padding: 30px;
    border-radius: 2px;
    margin-bottom: 25px;
    box-shadow: 0 0 40px rgba(0, 255, 157, 0.05);
    position: relative;
    width: 100%;
    max-width: 380px;
}

.archetype-title {
    font-family: var(--font-mono);
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 0 15px rgba(0, 255, 157, 0.5);
    letter-spacing: 4px;
    margin: 15px 0;
    text-transform: uppercase;
}

.archetype-sub {
    color: var(--accent);
    font-size: 9px;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0.9;
    font-weight: bold;
    border-bottom: 1px solid rgba(0, 255, 157, 0.2);
    padding-bottom: 5px;
    display: inline-block;
}

.archetype-stats {
    font-size: 10px;
    color: #666;
    font-family: var(--font-mono);
    margin-top: 15px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* AUDIT INTERFACE */
.audit-box {
    background: #080808;
    border: 1px solid #222;
    padding: 20px;
    border-radius: 2px;
    max-width: 450px; /* Wider for images */
    width: 100%;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.audit-question {
    color: #ccc;
    font-size: 11px;
    line-height: 1.5;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
    border-left: 2px solid var(--accent);
    padding-left: 12px;
}

/* CHART CONTAINER INSIDE WIZARD */
.wizard-chart-box {
    width: 100%;
    height: 160px; /* Fixed height */
    background: #000;
    border: 1px solid #333;
    margin: 5px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.wizard-chart-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    transition: 0.2s;
    cursor: zoom-in;
}

.wizard-chart-img:hover {
    opacity: 1;
    transform: scale(1.02);
}

.wizard-no-chart {
    color: #333;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 2px;
    font-weight: bold;
}

/* REFLECTION INPUT */
.wizard-reflection {
    background: rgba(255,255,255,0.03);
    border: 1px solid #333;
    color: #eee;
    width: 100%;
    min-height: 70px;
    padding: 12px;
    font-family: var(--font-mono);
    font-size: 11px;
    border-radius: 2px;
    resize: none;
    transition: 0.2s;
}

.wizard-reflection:focus {
    border-color: var(--accent);
    background: #000;
    box-shadow: 0 0 10px rgba(0, 255, 157, 0.05);
}

.wizard-reflection::placeholder {
    color: #444;
    text-transform: uppercase;
    font-size: 10px;
}

/* HIDE LEGACY FORM */
#legacy-review-form { display:none; }

/* --- WIZARD LOADING STATE --- */
.wiz-loader {
    width: 40px; 
    height: 40px; 
    border: 3px solid #111; 
    border-top: 3px solid var(--accent); 
    border-radius: 50%; 
    animation: spin 0.8s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin { 
    0% { transform: rotate(0deg); } 
    100% { transform: rotate(360deg); } 
}

/* Ensure Wizard container handles absolute positioning if needed, 
   but Flex is better for centering steps */
.review-wizard-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* --- CONFIG WIZARD STYLES --- */

/* The Container */
.config-wizard-container {
    height: 100%;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

/* Progress Bar at Top */
.wiz-progress-track {
    display: flex;
    gap: 5px;
    margin-bottom: 30px;
}
.wiz-step-dot {
    flex: 1;
    height: 4px;
    background: #222;
    border-radius: 2px;
    transition: 0.3s;
}
.wiz-step-dot.active { background: var(--accent); box-shadow: 0 0 10px var(--accent-dim); }
.wiz-step-dot.passed { background: #005533; }

/* The Steps (Slides) */
.config-step {
    display: none;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    animation: slideFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.config-step.active { display: flex; }

@keyframes slideFadeIn {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Big Typography for Focus */
.step-header {
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 11px;
    letter-spacing: 2px;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.step-desc {
    font-size: 13px;
    color: #888;
    margin-bottom: 25px;
    max-width: 400px;
    line-height: 1.5;
}

/* Large Inputs for Focus */
.inp-hero {
    background: transparent;
    border: none;
    border-bottom: 2px solid #333;
    font-size: 24px;
    color: #fff;
    font-family: var(--font-mono);
    width: 100%;
    padding: 10px 0;
    transition: 0.3s;
}
.inp-hero:focus {
    border-bottom-color: var(--accent);
    outline: none;
}

/* Step Navigation (Bottom) */
.wiz-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    border-top: 1px solid #222;
    padding-top: 20px;
}

.btn-nav {
    background: transparent;
    border: 1px solid #333;
    color: #666;
    padding: 10px 20px;
    font-family: var(--font-mono);
    font-size: 11px;
    cursor: pointer;
    transition: 0.2s;
    border-radius: 2px;
}
.btn-nav:hover { color: #fff; border-color: #666; }

.btn-nav.next {
    background: var(--accent-dim);
    border-color: var(--accent);
    color: var(--accent);
}
.btn-nav.next:hover { background: var(--accent); color: #000; }

/* =========================================
   GAMIFIED ARSENAL (PLAYBOOK OVERHAUL)
   ========================================= */

/* 1. XP HEADER & PROGRESS */
.xp-container {
    background: #080808; border-bottom: 1px solid #222; padding: 15px 20px;
    display: flex; align-items: center; gap: 20px;
}
.level-badge {
    width: 50px; height: 50px; background: radial-gradient(circle at top left, #222, #000);
    border: 2px solid var(--accent); border-radius: 50%; display: flex; align-items: center;
    justify-content: center; font-family: var(--font-mono); font-weight: 800; font-size: 20px; color: #fff;
    box-shadow: 0 0 15px rgba(0,255,157,0.2); position: relative;
}
.level-badge::after {
    content: 'TIER'; position: absolute; bottom: -5px; background: #000; color: var(--accent);
    font-size: 8px; padding: 0 4px; font-weight: bold;
}
.xp-track-wrapper { flex: 1; }
.xp-meta { display: flex; justify-content: space-between; font-size: 10px; color: #888; font-family: var(--font-mono); margin-bottom: 5px; }
.xp-bar-bg { width: 100%; height: 6px; background: #1a1a1a; border-radius: 3px; overflow: hidden; }
.xp-bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), #00ccff); width: 0%; transition: width 1s ease; box-shadow: 0 0 10px var(--accent); }

/* 2. ENERGY / STAMINA SYSTEM */
.stamina-container { display: flex; gap: 4px; align-items: center; margin-right: 15px; }
.stamina-pip { width: 8px; height: 16px; background: #1a1a1a; border: 1px solid #333; transform: skewX(-15deg); transition: 0.3s; }
.stamina-pip.active { background: var(--accent); box-shadow: 0 0 8px var(--accent); border-color: #fff; }
.stamina-label { font-size: 9px; color: #666; margin-right: 5px; font-family: var(--font-mono); }

/* 3. WEEKLY BOUNTY BOX */
.bounty-box {
    margin: 15px 20px;
    background: linear-gradient(45deg, rgba(255, 68, 68, 0.05) 0%, rgba(0, 0, 0, 0) 100%);
    border: 1px dashed var(--error); border-radius: 4px; padding: 15px;
    display: flex; justify-content: space-between; align-items: center;
}
.bounty-info h3 { margin: 0; color: var(--error); font-size: 11px; letter-spacing: 2px; font-family: var(--font-mono); }
.bounty-info p { margin: 5px 0 0 0; color: #ccc; font-size: 12px; font-weight: bold; }
.xp-tag { background: var(--error); color: #000; font-weight: bold; padding: 4px 8px; border-radius: 2px; font-size: 10px; font-family: var(--font-mono); }

/* 4. HOLOGRAPHIC CARDS */
.arsenal-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 15px; padding: 0 20px 20px 20px;
}
.codex-card {
    background: #0a0a0a; border: 1px solid #222; border-radius: 6px; overflow: hidden;
    position: relative; transition: 0.2s; cursor: pointer; display: flex; flex-direction: column; height: 220px;
}
.codex-card:hover { transform: translateY(-4px) scale(1.02); z-index: 2; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }

/* Rarities */
.codex-card.common { border-color: #444; }
.codex-card.rare { border-color: #00ccff; box-shadow: 0 0 5px rgba(0,204,255,0.1); }
.codex-card.epic { border-color: #bc13fe; box-shadow: 0 0 10px rgba(188,19,254,0.15); }
.codex-card.legendary { 
    border-color: #ffd700; box-shadow: 0 0 15px rgba(255,215,0,0.2); 
    background: linear-gradient(135deg, rgba(255,215,0,0.02), #0a0a0a);
}

.codex-img { height: 100px; width: 100%; object-fit: cover; background: #000; opacity: 0.8; border-bottom: 1px solid #222; }
.codex-content { padding: 12px; flex: 1; display: flex; flex-direction: column; }
.codex-type { font-size: 9px; text-transform: uppercase; font-family: var(--font-mono); letter-spacing: 1px; margin-bottom: 4px; display: flex; justify-content: space-between; }
.codex-title { font-size: 12px; font-weight: bold; color: #fff; margin-bottom: 6px; line-height: 1.3; }
.codex-desc { font-size: 10px; color: #777; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.codex-footer { padding: 8px 12px; background: #0e0e0e; border-top: 1px solid #1a1a1a; display: flex; justify-content: space-between; align-items: center; }
.rarity-pill { font-size: 8px; font-weight: bold; text-transform: uppercase; padding: 2px 6px; border-radius: 2px; font-family: var(--font-mono); }
.codex-card.common .rarity-pill { color: #888; background: #222; }
.codex-card.rare .rarity-pill { color: #000; background: #00ccff; }
.codex-card.epic .rarity-pill { color: #fff; background: #bc13fe; }
.codex-card.legendary .rarity-pill { color: #000; background: #ffd700; }

/* 5. IMAGE SCANNER */
.preview-box { margin-top: 8px; background: #000; border: 1px dashed #333; border-radius: 4px; min-height: 40px; display: none; position: relative; overflow: hidden; transition: 0.3s ease; }
.preview-box.valid { border-style: solid; border-color: var(--accent); box-shadow: 0 0 15px rgba(0, 255, 157, 0.1); }
.preview-box.invalid { border-style: solid; border-color: var(--error); }
.preview-img { width: 100%; height: auto; display: block; opacity: 0; transition: opacity 0.5s ease; }
.scan-line { position: absolute; top: 0; left: 0; width: 100%; height: 2px; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: scanDown 1.5s infinite linear; display: none; z-index: 10; }
.preview-status { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 10px; color: #666; background: rgba(0,0,0,0.8); z-index: 5; }
@keyframes scanDown { 0% { top: 0%; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { top: 100%; opacity: 0; } }

/* 6. CRITICAL HIT ANIMATION */
@keyframes critShake { 0% { transform: translate(1px, 1px) rotate(0deg); } 10% { transform: translate(-1px, -2px) rotate(-1deg); } 30% { transform: translate(3px, 2px) rotate(0deg); } 50% { transform: translate(-1px, 2px) rotate(-1deg); } 100% { transform: translate(0, 0) rotate(0deg); } }
.crit-overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255,215,0,0.2), transparent); border: 2px solid gold; animation: critShake 0.5s; pointer-events: none; z-index: 50; display: none; }
.crit-overlay.active { display: block; }

.reward-overlay { position: fixed; inset: 0; z-index: 9999999; background: rgba(0,0,0,0.9); display: flex; flex-direction: column; align-items: center; justify-content: center; animation: fadeIn 0.3s; pointer-events: none; opacity: 0; }
.reward-overlay.active { pointer-events: auto; opacity: 1; }
.reward-title { font-size: 40px; font-weight: 900; color: #ffd700; text-transform: uppercase; text-shadow: 0 0 30px rgba(255,215,0,0.6); letter-spacing: 5px; margin-bottom: 10px; animation: scaleUp 0.5s; }
.reward-sub { font-family: var(--font-mono); color: #fff; font-size: 12px; letter-spacing: 2px; }
@keyframes scaleUp { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* BOUNTY TOGGLE */
.bounty-toggle-wrapper { background: rgba(255, 68, 68, 0.1); border: 1px solid var(--error); padding: 10px; border-radius: 4px; display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.bounty-toggle-label { font-size: 10px; color: #ff8888; font-weight: bold; font-family: var(--font-mono); }

/* FORGE WIZARD STYLES */
.forge-step {
    display: none;
    animation: fadeIn 0.3s ease;
}
.forge-step.active {
    display: block;
}

.forge-progress {
    display: flex; gap: 4px; margin-bottom: 20px;
}
.forge-dot {
    height: 4px; flex: 1; background: #222; border-radius: 2px; transition: 0.3s;
}
.forge-dot.active {
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent-dim);
}

/* Make the Back button look subtle */
#btn-forge-back {
    background: transparent; border: 1px solid #333; color: #666;
}
#btn-forge-back:hover { border-color: #555; color: #fff; }

/* --- BOUNTY VERIFICATION UI --- */
.bounty-verify-box {
    background: rgba(0, 255, 157, 0.03);
    border: 1px solid var(--accent);
    border-radius: 4px;
    padding: 12px;
    margin-top: 10px;
}
.verify-input {
    width: 100%; background: #000; border: 1px solid #333; 
    color: #fff; font-family: var(--font-mono); font-size: 10px; 
    padding: 8px; margin-top: 8px; resize: vertical;
}
.verify-btn {
    width: 100%; background: var(--accent-dim); color: var(--accent);
    border: 1px solid var(--accent); font-size: 9px; font-weight: bold;
    padding: 6px; margin-top: 8px; cursor: pointer;
}
.verify-btn:hover { background: var(--accent); color: #000; }
.verify-success {
    display: none; color: var(--accent); font-size: 10px; 
    align-items: center; gap: 5px; margin-top: 5px; font-weight: bold;
}

/* --- SHARE CARD GENERATOR (Hidden off-screen) --- */
#share-card-stage {
    position: fixed; top: -9999px; left: -9999px;
    width: 600px; height: 337px; /* 16:9 Aspect Ratio */
    background: #050505;
    border: 2px solid var(--accent);
    display: flex; flex-direction: column;
    padding: 30px;
    font-family: 'Inter', sans-serif;
    background-image: 
      linear-gradient(rgba(0,255,157,0.03) 1px, transparent 1px),
      linear-gradient(90deg, rgba(0,255,157,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

.share-header {
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid #333; padding-bottom: 15px; margin-bottom: 20px;
}
.share-brand { font-family: 'Roboto Mono'; font-weight: 800; color: #fff; font-size: 18px; letter-spacing: -1px; }
.share-rank { background: var(--accent); color: #000; padding: 4px 8px; font-weight: bold; font-size: 10px; border-radius: 2px; font-family: 'Roboto Mono'; }

.share-body { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.share-type { color: var(--accent); font-family: 'Roboto Mono'; font-size: 12px; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 10px; }
.share-title { color: #fff; font-size: 32px; font-weight: 800; line-height: 1.1; margin-bottom: 15px; text-transform: uppercase; }
.share-desc { color: #888; font-size: 14px; line-height: 1.4; border-left: 3px solid #333; padding-left: 15px; }

.share-footer { margin-top: auto; display: flex; justify-content: space-between; align-items: flex-end; }
.share-stat { font-family: 'Roboto Mono'; font-size: 10px; color: #555; }
.share-stat strong { color: #fff; font-size: 14px; display: block; margin-top: 4px; }

/* --- SHARE CARD GENERATOR (Hidden but Structured) --- */
#share-card-stage {
    position: fixed; top: -9999px; left: -9999px;
    width: 600px; height: 400px; /* Taller to fit image */
    background: #050505;
    border: 2px solid var(--accent);
    display: flex; flex-direction: column;
    padding: 25px;
    font-family: 'Inter', sans-serif;
    /* Grid Pattern Background */
    background-image: 
      linear-gradient(rgba(0,255,157,0.03) 1px, transparent 1px),
      linear-gradient(90deg, rgba(0,255,157,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    box-sizing: border-box;
}

.share-header {
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid #333; padding-bottom: 10px; margin-bottom: 15px;
}
.share-brand { font-family: 'Roboto Mono'; font-weight: 800; color: #fff; font-size: 16px; letter-spacing: -1px; }
.share-rank { background: var(--accent); color: #000; padding: 3px 8px; font-weight: bold; font-size: 10px; border-radius: 2px; font-family: 'Roboto Mono'; text-transform: uppercase; }

/* LAYOUT FOR IMAGE + CONTENT */
.share-body { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    gap: 10px;
    overflow: hidden; /* Prevent spill */
}

/* The missing piece: The Image Container */
.share-img-container {
    height: 180px;
    width: 100%;
    background: #000;
    border: 1px solid #333;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    position: relative;
}

#sc-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
}

.share-type { color: var(--accent); font-family: 'Roboto Mono'; font-size: 10px; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 2px; }
.share-title { color: #fff; font-size: 24px; font-weight: 800; line-height: 1.1; margin-bottom: 5px; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.share-desc { color: #888; font-size: 12px; line-height: 1.4; border-left: 2px solid #333; padding-left: 10px; max-height: 50px; overflow: hidden; }

.share-footer { margin-top: auto; display: flex; justify-content: space-between; align-items: flex-end; border-top: 1px solid #333; padding-top: 10px; }
.share-stat { font-family: 'Roboto Mono'; font-size: 9px; color: #555; }
.share-stat strong { color: #fff; font-size: 12px; display: block; margin-top: 3px; }

/* --- INTEL PREVIEW MODAL --- */
.intel-modal-content {
    background: transparent; /* Wrapper is transparent */
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 20px;
    animation: zoomFade 0.2s ease-out;
}

/* THE ACTUAL CARD (What gets downloaded) */
#intel-card-visual {
    width: 600px; 
    height: 340px; 
    background: #050505;
    border: 2px solid var(--accent);
    display: flex; 
    flex-direction: column;
    padding: 25px;
    font-family: 'Inter', sans-serif;
    position: relative;
    /* Grid Pattern Background */
    background-image: 
      linear-gradient(rgba(0,255,157,0.03) 1px, transparent 1px),
      linear-gradient(90deg, rgba(0,255,157,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
}

#intel-card-visual.legendary { border-color: #ffd700; box-shadow: 0 0 40px rgba(255,215,0,0.15); }
#intel-card-visual.epic { border-color: #bc13fe; }

/* Card Internals */
.intel-header {
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid #333; padding-bottom: 10px; margin-bottom: 15px;
}
.intel-brand { font-family: 'Roboto Mono'; font-weight: 800; color: #fff; font-size: 16px; letter-spacing: -1px; }
.intel-rank { background: var(--accent); color: #000; padding: 3px 8px; font-weight: bold; font-size: 10px; border-radius: 2px; font-family: 'Roboto Mono'; text-transform: uppercase; }

.intel-body { flex: 1; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }

.intel-img-box {
    flex: 1; /* Takes available space */
    background: #000; border: 1px solid #333;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
#intel-img-target { width: 100%; height: 100%; object-fit: cover; opacity: 0.9; }

.intel-text-group { display: flex; flex-direction: column; gap: 2px; }
.intel-type { color: var(--accent); font-family: 'Roboto Mono'; font-size: 10px; letter-spacing: 2px; text-transform: uppercase; }
.intel-title { color: #fff; font-size: 20px; font-weight: 800; text-transform: uppercase; line-height: 1; }
.intel-desc { font-size: 11px; color: #888; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.intel-footer { margin-top: 10px; border-top: 1px solid #333; padding-top: 8px; display: flex; justify-content: space-between; }
.intel-stat { font-family: 'Roboto Mono'; font-size: 9px; color: #555; }
.intel-stat strong { color: #fff; font-size: 12px; display: block; margin-top: 2px; }

/* Actions below the card */
.intel-actions {
    display: flex; gap: 15px; width: 100%;
}
/* --- INTEL PREVIEW MODAL (HIGH RES) --- */
.intel-modal-content {
    background: transparent;
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 20px;
    animation: zoomFade 0.2s ease-out;
    transform-origin: center;
}

/* THE CARD (Target for Download) */
#intel-card-visual {
    width: 850px;           /* INCREASED SIZE */
    min-height: 520px;      /* INCREASED SIZE */
    background: #050505;
    border: 2px solid var(--accent);
    display: flex; 
    flex-direction: column;
    padding: 30px;          /* MORE PADDING */
    font-family: 'Inter', sans-serif;
    position: relative;
    
    /* Cyberpunk Grid Background */
    background-image: 
      linear-gradient(rgba(0,255,157,0.03) 1px, transparent 1px),
      linear-gradient(90deg, rgba(0,255,157,0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    box-shadow: 0 0 60px rgba(0,0,0,0.9);
}

/* Rarity Colors */
#intel-card-visual.legendary { border-color: #ffd700; box-shadow: 0 0 50px rgba(255,215,0,0.2); }
#intel-card-visual.epic { border-color: #bc13fe; box-shadow: 0 0 50px rgba(188,19,254,0.2); }
#intel-card-visual.rare { border-color: #00ccff; box-shadow: 0 0 50px rgba(0,204,255,0.2); }

/* Header */
.intel-header {
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 2px solid #222; padding-bottom: 15px; margin-bottom: 20px;
}
.intel-brand { font-family: 'Roboto Mono'; font-weight: 800; color: #fff; font-size: 20px; letter-spacing: -1px; }
.intel-rank { 
    background: var(--accent); color: #000; padding: 4px 10px; 
    font-weight: 800; font-size: 11px; border-radius: 2px; 
    font-family: 'Roboto Mono'; text-transform: uppercase; 
}

/* Body */
.intel-body { flex: 1; display: flex; flex-direction: column; gap: 15px; overflow: hidden; }

.intel-img-box {
    flex: 1; 
    background: #000; 
    border: 1px solid #222;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    min-height: 250px; /* Ensure image area is substantial */
    position: relative;
}

/* FIX: Image will no longer clip */
#intel-img-target { 
    width: 100%; 
    height: 100%; 
    object-fit: contain; /* SHOWS WHOLE IMAGE */
    opacity: 1; 
}

/* Text */
.intel-text-group { display: flex; flex-direction: column; gap: 4px; }
.intel-type { color: var(--accent); font-family: 'Roboto Mono'; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; font-weight: bold; opacity: 0.8; }
.intel-title { color: #fff; font-size: 28px; font-weight: 800; text-transform: uppercase; line-height: 1; letter-spacing: -0.5px; }
.intel-desc { 
    font-size: 13px; color: #999; line-height: 1.5; 
    border-left: 2px solid #333; padding-left: 12px; margin-top: 5px;
    max-height: 60px; overflow: hidden;
}

/* Footer */
.intel-footer { margin-top: 20px; border-top: 2px solid #222; padding-top: 15px; display: flex; justify-content: space-between; }
.intel-stat { font-family: 'Roboto Mono'; font-size: 10px; color: #555; letter-spacing: 1px; }
.intel-stat strong { color: #fff; font-size: 14px; display: block; margin-top: 4px; }

/* Buttons */
.intel-actions {
    display: flex; gap: 15px; width: 100%; max-width: 850px;
}

/* --- PASSWORD RESET WIZARD --- */
.auth-step { 
    display: none; 
    animation: fadeIn 0.3s ease; 
}
.auth-step.active { 
    display: block; 
}

/* Secure Terminal Look */
.secure-terminal {
    border: 1px solid var(--accent);
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.1);
}

/* QUEST DECRYPTION ANIMATION */
.quest-reveal-container {
    text-align: center;
    padding: 30px;
    background: #080808;
    border: 1px solid var(--accent);
    display: none; /* Hidden by default */
}

.quest-glitch-text {
    font-family: var(--font-mono);
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 4px;
    animation: glitch-anim 0.3s infinite;
}

.quest-sub {
    font-size: 10px; 
    color: var(--accent); 
    margin-top: 10px; 
    letter-spacing: 2px;
}

@keyframes glitch-anim {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

/* MISSION BOX IN MODAL */
.mission-box {
    background: rgba(0, 255, 157, 0.05);
    border: 1px solid var(--accent);
    border-left: 4px solid var(--accent);
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mission-label {
    font-size: 9px;
    color: var(--accent);
    letter-spacing: 2px;
    font-weight: bold;
    margin-bottom: 4px;
}

.mission-target {
    font-size: 18px;
    color: #fff;
    font-weight: 800;
    font-family: var(--font-mono);
    text-transform: uppercase;
}

.mission-xp {
    background: #000;
    border: 1px solid #333;
    padding: 5px 10px;
    font-size: 10px;
    color: #fff;
    font-family: var(--font-mono);
}

/* RADAR ANIMATION */
.radar-scanner {
    width: 60px;
    height: 60px;
    border: 2px solid var(--accent); /* Green Border */
    border-radius: 50%;
    position: relative;
    margin: 0 auto 25px auto; /* Centered */
    background: 
        radial-gradient(circle, rgba(0, 255, 157, 0.1) 0%, transparent 70%),
        repeating-radial-gradient(transparent 0, transparent 9px, rgba(0, 255, 157, 0.2) 10px);
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.2), inset 0 0 10px rgba(0, 255, 157, 0.1);
    overflow: hidden;
}

.radar-sweep {
    width: 50%;
    height: 50%;
    position: absolute;
    top: 0;
    left: 50%;
    background: linear-gradient(90deg, transparent 50%, rgba(0, 255, 157, 0.8));
    transform-origin: bottom left;
    animation: radar-spin 1.5s infinite linear;
    border-right: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 10px var(--accent);
}

/* Blip animation (optional dot appearing) */
.radar-blip {
    width: 4px; 
    height: 4px; 
    background: #fff; 
    border-radius: 50%; 
    position: absolute; 
    top: 20%; 
    right: 30%; 
    opacity: 0; 
    animation: blip-pulse 1.5s infinite;
    box-shadow: 0 0 5px #fff;
}

@keyframes radar-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes blip-pulse {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

.flux-container {
    display: flex; 
    gap: 3px; /* Tight gap for 8 bars */
    align-items: center; 
    border-left: 1px solid #333; 
    padding-left: 15px; 
    margin-left: 15px;
}

.flux-pip { 
    width: 6px; 
    height: 14px; 
    background: #1a1a1a; 
    border: 1px solid #333; 
    transform: skewX(-15deg); 
    transition: 0.3s; 
}

.flux-pip.active { 
    background: #00ccff; /* Cyan Glow */
    box-shadow: 0 0 6px #00ccff; 
    border-color: #fff; 
}

.flux-label { 
    font-size: 9px; color: #00ccff; 
    margin-right: 5px; font-family: var(--font-mono); font-weight:bold;
}

/* REROLL BUTTON STYLE */
.btn-reroll {
    background: rgba(0, 204, 255, 0.1);
    border: 1px solid #00ccff;
    color: #00ccff;
    font-size: 9px;
    padding: 6px 12px;
    cursor: pointer;
    font-family: var(--font-mono);
    text-transform: uppercase;
    font-weight: bold;
    display: flex; align-items: center; gap: 6px;
    transition: 0.2s;
    margin-top: 5px;
    border-radius: 2px;
}
.btn-reroll:hover {
    background: #00ccff;
    color: #000;
    box-shadow: 0 0 15px rgba(0, 204, 255, 0.4);
}
.btn-reroll:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    filter: grayscale(100%);
    border-color: #444;
    color: #666;
    background: transparent;
}

/* RADAR ANIMATION (Green Theme) */
.radar-scanner {
    width: 60px;
    height: 60px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    position: relative;
    margin: 0 auto 25px auto;
    background: 
        radial-gradient(circle, rgba(0, 255, 157, 0.1) 0%, transparent 70%),
        repeating-radial-gradient(transparent 0, transparent 9px, rgba(0, 255, 157, 0.2) 10px);
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.2), inset 0 0 10px rgba(0, 255, 157, 0.1);
    overflow: hidden;
}

.radar-sweep {
    width: 50%;
    height: 50%;
    position: absolute;
    top: 0;
    left: 50%;
    background: linear-gradient(90deg, transparent 50%, rgba(0, 255, 157, 0.8));
    transform-origin: bottom left;
    animation: radar-spin 1.5s infinite linear;
    border-right: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 10px var(--accent);
}

@keyframes radar-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* NO EMOJI - CLEAN TEXT STYLES */
.clean-tag {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* WEEKLY BOUNTY SPECIFIC STYLES */
.bounty-btn-trigger {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid #ffd700;
    color: #ffd700;
    font-size: 10px;
    font-weight: 800;
    padding: 6px 12px;
    cursor: pointer;
    font-family: var(--font-mono);
    text-transform: uppercase;
    transition: 0.2s;
    letter-spacing: 1px;
}
.bounty-btn-trigger:hover {
    background: #ffd700;
    color: #000;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

/* Modal Theme Overrides for Weekly */
.modal-weekly-theme {
    border-color: #ffd700 !important;
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.1) !important;
}
.text-gold { color: #ffd700 !important; }
.border-gold { border-color: #ffd700 !important; }
.bg-gold-dim { background: rgba(255, 215, 0, 0.05) !important; }

/* CLASSIFIED / LOCKED STATE */
.bounty-locked {
    background: repeating-linear-gradient(
        45deg,
        rgba(0, 0, 0, 0.8),
        rgba(0, 0, 0, 0.8) 10px,
        rgba(20, 20, 20, 0.8) 10px,
        rgba(20, 20, 20, 0.8) 20px
    );
    border-color: #333 !important;
    position: relative;
    overflow: hidden;
}

/* DECRYPT BUTTON (RED/DANGER) */
.btn-decrypt {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid var(--error);
    color: var(--error);
    font-size: 10px;
    font-weight: 800;
    padding: 6px 12px;
    cursor: pointer;
    font-family: var(--font-mono);
    text-transform: uppercase;
    transition: 0.2s;
    letter-spacing: 1px;
    animation: pulse-red 2s infinite;
}
.btn-decrypt:hover {
    background: var(--error);
    color: #000;
    box-shadow: 0 0 15px var(--error);
}

@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(255, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 68, 68, 0); }
}

/* --- GOLDEN RADAR (HIGHER LEVEL ANIMATION) --- */
.gold-radar {
    width: 80px; /* Bigger than standard */
    height: 80px;
    border: 2px solid #ffd700;
    border-radius: 50%;
    margin: 0 auto 20px auto;
    position: relative;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, #000 80%);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.2), inset 0 0 15px rgba(255, 215, 0, 0.1);
    overflow: hidden;
}

.gold-sweep {
    width: 50%; height: 50%;
    position: absolute; top: 0; left: 50%;
    background: linear-gradient(90deg, transparent 50%, rgba(255, 215, 0, 0.9));
    transform-origin: bottom left;
    animation: radar-spin 0.8s infinite linear; /* Faster spin */
    border-right: 2px solid #fff;
    box-shadow: 0 0 15px #ffd700;
}

.cipher-text {
    font-family: var(--font-mono);
    color: #ffd700;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 4px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* =========================================
   GLOBAL PROCESSING OVERLAY (PREVENTS DUPES)
   ========================================= */
.processing-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999999; /* Highest priority */
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: none; /* Hidden by default */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: wait;
}

.processing-box {
    border: 1px solid var(--accent);
    background: #050505;
    padding: 30px 50px;
    text-align: center;
    box-shadow: 0 0 50px rgba(0, 255, 157, 0.1);
    border-radius: 4px;
}

.processing-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #111;
    border-top: 3px solid var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px auto;
}

.processing-text {
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 14px;
    letter-spacing: 2px;
    font-weight: bold;
    animation: pulse 1.5s infinite;
}

.processing-sub {
    font-family: var(--font-mono);
    color: #666;
    font-size: 10px;
    margin-top: 10px;
}

/* =========================================
   ADVANCED INTERACTIVE CHART
   ========================================= */
.chart-container {
    background: #080808; /* Darker background for contrast */
    border: 1px solid #222;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    cursor: crosshair; /* Tech cursor */
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
}

/* The Floating HUD Tooltip */
.chart-hud {
    position: absolute;
    pointer-events: none; /* Let mouse pass through */
    background: rgba(10, 10, 10, 0.95);
    border: 1px solid var(--accent);
    padding: 10px;
    border-radius: 4px;
    font-family: var(--font-mono);
    z-index: 100;
    display: none; /* Hidden by default */
    box-shadow: 0 0 15px rgba(0, 255, 157, 0.15);
    min-width: 140px;
    backdrop-filter: blur(4px);
    transform: translate(15px, 15px); /* Offset from mouse */
}

.hud-row {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #888;
    margin-bottom: 4px;
    letter-spacing: 1px;
}

.hud-val {
    color: #fff;
    font-weight: bold;
}

.hud-val.pos { color: var(--accent); }
.hud-val.neg { color: var(--error); }

/* SVG Elements */
svg.tech-chart {
    overflow: visible;
}

/* The Main Line */
path.line-path {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
    filter: drop-shadow(0 0 4px var(--accent)); /* Neon Glow */
}

/* The Area Fill */
path.area-path {
    stroke: none;
    fill: url(#chartGradient);
    opacity: 0.3;
}

/* Grid Lines */
line.grid-line {
    stroke: #222;
    stroke-width: 1;
    stroke-dasharray: 4 4; /* Dashed */
}

line.zero-line {
    stroke: #444;
    stroke-width: 1;
}

/* Interactive Elements */
circle.hover-point {
    fill: #000;
    stroke: #fff;
    stroke-width: 2;
    r: 4;
    transition: all 0.1s ease;
    display: none;
}

line.crosshair-x {
    stroke: #555;
    stroke-width: 1;
    stroke-dasharray: 4 4;
    display: none;
}

/* Pulsing Current Dot */
circle.pulse-dot {
    fill: var(--accent);
    animation: chartPulse 2s infinite;
}

@keyframes chartPulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 255, 157, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(0, 255, 157, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 255, 157, 0); }
}

/* =========================================
   INTERACTIVE CHART FIXES
   ========================================= */
.chart-container {
    background: #080808; 
    border: 1px solid #222;
    border-radius: 4px;
    position: relative;
    /* overflow: hidden;  <-- REMOVED THIS so tooltip can float freely */
    cursor: crosshair; 
    box-shadow: inset 0 0 40px rgba(0,0,0,0.5); /* Inner shadow for depth */
}

/* The Floating HUD Tooltip */
.chart-hud {
    position: absolute;
    top: 0; left: 0; /* Reset coords */
    pointer-events: none; 
    background: rgba(5, 5, 5, 0.95); /* Nearly opaque */
    border: 1px solid var(--accent);
    padding: 12px;
    border-radius: 4px;
    font-family: var(--font-mono);
    z-index: 999; /* Higher than everything */
    display: none; 
    box-shadow: 0 4px 20px rgba(0, 255, 157, 0.2);
    min-width: 150px;
    backdrop-filter: blur(5px);
    transition: opacity 0.1s ease; /* Smooth fade in/out */
}

.hud-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px; /* Slightly larger text */
    color: #888;
    margin-bottom: 5px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hud-val {
    color: #eee;
    font-weight: 700;
    text-align: right;
}

.hud-val.pos { color: var(--accent); text-shadow: 0 0 5px rgba(0,255,157,0.3); }
.hud-val.neg { color: var(--error); }

/* SVG Enhancements */
path.line-path {
    stroke-width: 3; /* Thicker line */
    filter: drop-shadow(0 0 6px var(--accent)); 
}

/* Axis Labels (New) */
.chart-axis-label {
    position: absolute;
    font-size: 9px;
    color: #444;
    font-family: var(--font-mono);
    pointer-events: none;
}

/* =========================================
   SYSTEM ID CARD GENERATOR (PREMIUM)
   ========================================= */

/* THE HIDDEN STAGE (Positoned absolutely off-screen to avoid layout bugs) */
#system-card-stage {
    position: absolute; 
    top: 0; 
    left: -9999px; /* Hides it off-screen */
    z-index: -9999;
    
    width: 450px; 
    height: 700px; /* Portrait Format */
    background: #050505;
    border: 2px solid var(--accent);
    display: flex; flex-direction: column;
    padding: 35px;
    font-family: 'Inter', sans-serif;
    
    /* Tech Background Pattern */
    background-image: 
      linear-gradient(rgba(0, 255, 157, 0.03) 1px, transparent 1px),
      linear-gradient(90deg, rgba(0, 255, 157, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    box-sizing: border-box;
}

/* Watermark Effect */
#system-card-stage::before {
    content: "OFFICIAL PROTOCOL";
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    font-size: 40px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.02);
    white-space: nowrap;
    pointer-events: none;
    font-family: var(--font-mono);
}

/* Header Section */
.sys-id-header {
    border-bottom: 2px solid var(--accent);
    padding-bottom: 20px;
    margin-bottom: 25px;
    display: flex; justify-content: space-between; align-items: flex-end;
}

.sys-id-brand {
    font-family: var(--font-mono);
    font-size: 10px; color: var(--accent); letter-spacing: 3px;
    margin-bottom: 5px; opacity: 0.8;
}

.sys-id-title {
    font-size: 26px; font-weight: 900; color: #fff;
    text-transform: uppercase; line-height: 1; letter-spacing: -0.5px;
    text-shadow: 0 0 15px rgba(0,255,157,0.2);
}

.sys-id-rank {
    text-align: right;
}
.sys-id-rank-lbl { font-size: 8px; color: #666; font-family: var(--font-mono); letter-spacing: 1px; }
.sys-id-rank-val { font-size: 14px; font-weight: bold; color: var(--accent); font-family: var(--font-mono); background: rgba(0,255,157,0.1); padding: 2px 6px; border-radius: 2px; }

/* Grid Stats */
.sys-id-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 15px;
    margin-bottom: 30px;
}

.sys-id-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid #222;
    padding: 15px;
    border-radius: 4px;
}

.sys-id-label {
    font-size: 9px; color: #666; font-family: var(--font-mono);
    margin-bottom: 5px; display: block; text-transform: uppercase; letter-spacing: 1px;
}

.sys-id-val {
    font-size: 18px; color: #fff; font-weight: 700; font-family: var(--font-mono);
}

/* Strategy List */
.sys-id-list {
    flex: 1;
    border: 1px dashed #333;
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.sys-id-list-title {
    font-size: 10px; color: var(--accent); font-family: var(--font-mono);
    border-bottom: 1px solid #333; padding-bottom: 8px; margin-bottom: 15px;
    font-weight: bold; letter-spacing: 1px; display: flex; justify-content: space-between;
}

.sys-id-item {
    font-size: 12px; color: #ccc; margin-bottom: 8px;
    display: flex; align-items: center; gap: 10px; font-family: 'Inter', sans-serif; font-weight: 500;
}
.sys-id-item::before { content: "►"; color: var(--accent); font-size: 8px; opacity: 0.7; }

/* Footer */
.sys-id-footer {
    margin-top: auto;
    border-top: 1px solid #333;
    padding-top: 15px;
    display: flex; justify-content: space-between; align-items: center;
}

.sys-id-barcode {
    height: 35px; width: 120px;
    background: repeating-linear-gradient(
      90deg,
      #444,
      #444 2px,
      transparent 2px,
      transparent 4px
    );
    opacity: 0.6;
}

.sys-id-meta {
    text-align: right;
    font-family: var(--font-mono);
    font-size: 8px; color: #444; letter-spacing: 1px;
}
.sys-id-meta strong { color: #888; font-size: 10px; display: block; margin-top: 2px; }

/* PREVIEW MODAL IMAGE */
#sys-card-preview-img {
    box-shadow: 0 0 30px rgba(0, 255, 157, 0.15);
    border: 1px solid #333;
    margin-bottom: 20px;
    max-height: 60vh;
    object-fit: contain;
}

/* =========================================
   TACTICAL DEBRIEF (ARCHIVE) STYLES
   ========================================= */

/* The Grid Container */
.debrief-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding-bottom: 50px;
}

/* Individual Card */
.debrief-card {
    background: #0b0b0b;
    border: 1px solid #222;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.debrief-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 255, 157, 0.05);
}

/* Card Header */
.debrief-header {
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid #222;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.debrief-date {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--accent);
    font-weight: 700;
    letter-spacing: 1px;
}

.debrief-id {
    font-family: var(--font-mono);
    font-size: 9px;
    color: #444;
}

/* Card Body */
.debrief-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 1;
}

/* Sections (Win/Error) */
.debrief-section {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.debrief-label {
    font-size: 9px;
    font-family: var(--font-mono);
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Green icon for success */
.icon-success {
    width: 6px; height: 6px; background: var(--accent);
    border-radius: 50%; box-shadow: 0 0 5px var(--accent);
}

/* Red icon for error */
.icon-fail {
    width: 6px; height: 6px; background: var(--error);
    border-radius: 50%; box-shadow: 0 0 5px var(--error);
}

.debrief-text {
    font-size: 11px;
    color: #ccc;
    line-height: 1.5;
    background: #050505;
    border: 1px solid #1a1a1a;
    padding: 10px;
    border-radius: 2px;
    min-height: 40px;
}

/* Focus Directive (Footer) */
.debrief-footer {
    background: rgba(0, 255, 157, 0.02);
    border-top: 1px solid #222;
    padding: 12px 15px;
}

.debrief-focus-label {
    font-size: 8px;
    color: var(--accent);
    font-family: var(--font-mono);
    margin-bottom: 4px;
    opacity: 0.7;
}

.debrief-focus-val {
    font-size: 11px;
    color: #fff;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Empty State */
.empty-archive {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px;
    color: #444;
    border: 1px dashed #222;
    border-radius: 6px;
}

/* --- DEBRIEF CARD EVIDENCE STYLES --- */
.debrief-evidence {
    margin-top: 8px;
    border: 1px dashed #333;
    background: #000;
    height: 80px; /* Compact height */
    position: relative;
    overflow: hidden;
    cursor: zoom-in;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.debrief-evidence img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
    transition: 0.2s;
}

.debrief-evidence:hover img {
    opacity: 1;
    transform: scale(1.05);
}

.debrief-evidence::after {
    content: "EVIDENCE";
    position: absolute;
    bottom: 0; right: 0;
    background: rgba(0,0,0,0.8);
    color: #fff;
    font-size: 8px;
    padding: 2px 5px;
    font-family: var(--font-mono);
}

/* Specific border colors for win/loss images */
.debrief-section.win .debrief-evidence { border-color: rgba(0, 255, 157, 0.3); }
.debrief-section.loss .debrief-evidence { border-color: rgba(255, 68, 68, 0.3); }

/* --- DEBRIEF EVIDENCE (CHART CARDS) --- */
.debrief-evidence {
    margin-top: 8px;
    border: 1px dashed #333;
    background: #000;
    height: 90px; /* Cinematic letterbox feel */
    position: relative;
    overflow: hidden;
    cursor: zoom-in;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s all;
}

.debrief-evidence img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures it fills the box nicely */
    opacity: 0.6;
    transition: 0.3s;
    filter: grayscale(40%);
}

.debrief-evidence:hover {
    border-color: var(--accent);
}

.debrief-evidence:hover img {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.05);
}

/* Watermark label on the image */
.debrief-evidence::after {
    content: "INTEL_IMG";
    position: absolute;
    bottom: 0; right: 0;
    background: rgba(0,0,0,0.8);
    color: #fff;
    font-size: 7px;
    padding: 2px 5px;
    font-family: var(--font-mono);
    border-top-left-radius: 2px;
}

/* Specific colors */
.debrief-section.win .debrief-evidence:hover { border-color: var(--accent); }
.debrief-section.loss .debrief-evidence:hover { border-color: var(--error); }

/* OPTIMIZED EMPTY STATE (TECH WIREFRAME) */
.empty-slot-container {
    width: 100%;
    height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px dashed rgba(255, 255, 255, 0.1); /* Subtle dashed line */
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.2); /* Darker background */
    color: #444;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 2px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

/* SVG styling inside the empty box */
.empty-slot-container svg {
    width: 32px;
    height: 32px;
    margin-bottom: 12px;
    stroke: #333; /* Dark grey tech color */
    stroke-width: 1.5;
    opacity: 0.8;
}

/* FORCE HIDE ARROW CONTAINERS BY DEFAULT */
#carouselNav, 
#openNavControls {
    display: none; /* Javascript will turn this to 'flex' ONLY if needed */
    gap: 30px;
    justify-content: center;
    margin-top: 5px;
}

/* OPTIMIZED EMPTY STATE (NO EMOJIS) */
.empty-slot-container {
    width: 100%;
    height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.2);
    color: #444;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 2px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.empty-slot-container svg {
    width: 32px; height: 32px; margin-bottom: 12px;
    stroke: #333; stroke-width: 1.5; opacity: 0.8;
}

/* FORCE HIDE ARROWS BY DEFAULT */
#carouselNav, #openNavControls {
    display: none !important; /* JS will change this to 'flex' only when needed */
    gap: 30px;
    justify-content: center;
    margin-top: 10px;
}

/* =========================================
   CALCULATOR UI OVERHAUL (TACTICAL DEVICE)
   ========================================= */

/* The Main Wrapper (Centers the device) */
.calc-wrapper {
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #111 0%, #000 70%); /* Subtle spotlight */
}

/* The Device Body */
.calc-device {
    width: 100%;
    max-width: 420px; /* Tighter width for better proportions */
    background: #080808;
    border: 1px solid #333;
    border-radius: 12px;
    box-shadow: 0 0 50px rgba(0,0,0,0.8), 0 0 0 1px #222;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Decorative Top Bar */
.calc-header-bar {
    background: #111;
    padding: 12px 20px;
    border-bottom: 1px solid #222;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calc-title {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    color: #666;
    letter-spacing: 2px;
}

/* The "Screen" (Results Display) */
.calc-screen {
    background: rgba(0, 255, 157, 0.05);
    border-bottom: 1px solid #222;
    padding: 30px 20px;
    text-align: center;
    position: relative;
}

/* The Big Number */
.calc-lot-display {
    font-family: var(--font-mono);
    font-size: 48px; /* MASSIVE */
    font-weight: 700;
    color: var(--accent);
    text-shadow: 0 0 20px rgba(0, 255, 157, 0.4);
    line-height: 1;
    margin-bottom: 5px;
}

.calc-lot-label {
    font-size: 10px;
    color: var(--accent);
    opacity: 0.7;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Secondary Stats (Cash Risk) */
.calc-sub-screen {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}

.calc-stat-pill {
    background: #000;
    border: 1px solid #333;
    padding: 6px 12px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: #888;
}

.calc-stat-pill strong {
    color: #fff;
    margin-left: 5px;
}

/* The Input Form Area */
.calc-body {
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Inputs */
.calc-input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.calc-group label {
    font-size: 9px;
    color: #555;
    font-family: var(--font-mono);
    font-weight: 700;
    margin-bottom: 6px;
    display: block;
    letter-spacing: 1px;
}

.calc-input {
    width: 100%;
    background: #0a0a0a;
    border: 1px solid #2a2a2a;
    color: #fff;
    padding: 14px;
    font-family: var(--font-mono);
    font-size: 14px;
    border-radius: 4px;
    transition: 0.2s;
    text-align: center; /* Center text for better focus */
}

.calc-input:focus {
    border-color: var(--accent);
    background: #0f0f0f;
    box-shadow: 0 0 15px rgba(0, 255, 157, 0.05);
}

.calc-input::placeholder {
    color: #333;
    text-transform: uppercase;
}

/* The Action Button */
.calc-action-btn {
    width: 100%;
    background: var(--accent);
    color: #000;
    border: none;
    padding: 16px;
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 12px;
    letter-spacing: 1px;
    cursor: pointer;
    margin-top: 10px;
    border-radius: 4px;
    transition: 0.2s;
    text-transform: uppercase;
}

.calc-action-btn:hover {
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.4);
    transform: translateY(-1px);
}

/* Footer Info */
.calc-footer {
    text-align: center;
    padding: 15px;
    font-size: 9px;
    color: #444;
    font-family: var(--font-mono);
    border-top: 1px solid #1a1a1a;
    background: #050505;
}

/* REGEN TIMER STYLES */
.regen-timer {
    font-family: var(--font-mono);
    font-size: 9px;
    margin-left: 6px;
    font-weight: normal;
    opacity: 0.7;
    letter-spacing: 0.5px;
}

.regen-timer.energy { color: var(--accent); }
.regen-timer.flux { color: #00ccff; }

/* CONTRACT BADGE ON CARD */
.contract-badge {
    position: absolute;
    top: 25px;
    right: 25px;
    border: 1px solid #ffd700;
    background: rgba(255, 215, 0, 0.1);
    color: #ffd700;
    font-family: var(--font-mono);
    font-size: 10px;
    padding: 6px 10px;
    letter-spacing: 1px;
    font-weight: 800;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.15);
    text-transform: uppercase;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 6px;
}

.contract-badge::before {
    content: "★";
    font-size: 12px;
}

/* CONTRACT BADGE (FIXED POSITION - CENTERED) */
.contract-badge {
    position: absolute;
    top: 22px; /* Aligns with header text */
    left: 50%;
    transform: translateX(-50%); /* Perfectly centers it */
    
    border: 1px solid #ffd700;
    background: rgba(255, 215, 0, 0.1);
    color: #ffd700;
    font-family: var(--font-mono);
    font-size: 10px;
    padding: 6px 12px;
    letter-spacing: 2px;
    font-weight: 800;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.15);
    text-transform: uppercase;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap; /* Prevents wrapping */
    border-radius: 2px;
}

.contract-badge::before {
    content: "★";
    font-size: 10px;
}

/* CONTRACT BADGE (Fixed: Aligned Right next to Rank) */
.contract-badge {
    position: absolute;
    top: 24px;       /* Aligns vertically with the header text/rank */
    right: 160px;    /* Pushes it to the left of the Rank Badge (approx 120px wide) */
    transform: none; /* Removes the centering transform */
    
    border: 1px solid #ffd700;
    background: rgba(255, 215, 0, 0.1);
    color: #ffd700;
    font-family: var(--font-mono);
    font-size: 9px;
    padding: 5px 10px;
    letter-spacing: 1px;
    font-weight: 800;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.1);
    text-transform: uppercase;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 6px;
    border-radius: 2px;
    white-space: nowrap;
}

.contract-badge::before {
    content: "★";
    font-size: 10px;
}

/* BOUNTY COOLDOWN STATE */
.bounty-box.cooldown {
    border-color: #333 !important;
    background: repeating-linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.02),
        rgba(255, 255, 255, 0.02) 10px,
        rgba(0, 0, 0, 0.2) 10px,
        rgba(0, 0, 0, 0.2) 20px
    ) !important;
    color: #888;
}

.cooldown-timer-text {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: bold;
    color: #00ccff; /* Cyan for Standby */
    text-shadow: 0 0 10px rgba(0, 204, 255, 0.3);
    letter-spacing: 1px;
}

.cooldown-sub {
    font-size: 9px;
    color: #555;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- BOUNTY COOLDOWN STATE (FIXED) --- */
.bounty-box.cooldown {
    border-color: #333 !important;
    /* Dark diagonal stripes for standby look */
    background: repeating-linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.02),
        rgba(255, 255, 255, 0.02) 10px,
        rgba(0, 0, 0, 0.4) 10px,
        rgba(0, 0, 0, 0.4) 20px
    ) !important;
}

/* Force the Title to be Cyan/Grey in cooldown mode */
.bounty-box.cooldown h3 {
    color: #00ccff !important; /* Cyan */
    opacity: 0.8;
    font-size: 10px !important;
    letter-spacing: 2px !important;
}

/* Hero Timer */
.cooldown-timer-text {
    font-family: var(--font-mono);
    font-size: 24px; /* Much Bigger */
    font-weight: 800;
    color: #fff;
    text-shadow: 0 0 15px rgba(0, 204, 255, 0.3);
    letter-spacing: 2px;
    line-height: 1.2;
    margin-top: 4px;
}

/* Subtitle */
.cooldown-sub {
    font-size: 9px;
    color: #666;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Ensure the container stretches */
.bounty-info {
    width: 100%;
}

/* --- BOUNTY LOCKED STATE (FIXED) --- */
.bounty-box.bounty-locked {
    border-color: var(--error) !important;
    /* Red diagonal stripes for danger/locked look */
    background: repeating-linear-gradient(
        45deg,
        rgba(255, 68, 68, 0.05),
        rgba(255, 68, 68, 0.05) 10px,
        rgba(0, 0, 0, 0.4) 10px,
        rgba(0, 0, 0, 0.4) 20px
    ) !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Locked Title */
.bounty-locked h3 {
    color: var(--error) !important;
    font-size: 11px !important;
    letter-spacing: 2px !important;
    margin: 0 0 4px 0;
    display: flex; 
    align-items: center; 
    gap: 8px;
}

/* Locked Subtext (The censored part) */
.locked-text {
    font-family: var(--font-mono);
    color: #666;
    font-size: 14px;
    letter-spacing: 3px;
    background: #111;
    padding: 2px 6px;
    border-radius: 2px;
}

/* Action Group (Right Side) */
.locked-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* --- SESSION TIMER UPGRADE --- */
.sess-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 60px; /* Ensure consistent height */
}

/* The Status (Open/Closed) Text */
.sess-timer {
    font-family: var(--font-mono);
    font-size: 9px;
    margin-top: 4px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Colors for specific states */
.sess-box.active .sess-timer { color: var(--accent); } /* OPEN */
.sess-box:not(.active) .sess-timer { color: #555; }    /* CLOSED */

/* "Opening Soon" Highlight (Optional) */
.sess-box.opening-soon {
    border-color: #f4d35e; /* Yellow */
    background: rgba(244, 211, 94, 0.05);
}
.sess-box.opening-soon .sess-timer {
    color: #f4d35e;
    animation: pulse 1s infinite;
}

/* --- HAZARD WARNING BOX --- */
.hazard-box {
    background: rgba(244, 211, 94, 0.05);
    border: 1px dashed #f4d35e; /* Yellow */
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.hazard-icon {
    font-size: 20px;
    color: #f4d35e;
}

.hazard-content h4 {
    margin: 0 0 5px 0;
    color: #f4d35e;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hazard-content p {
    margin: 0;
    color: #ccc;
    font-size: 11px;
    line-height: 1.5;
}

/* --- STRATEGY BUILDER UI --- */
.strat-builder-row {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.strat-builder-input {
    flex: 1;
    background: #0a0a0a;
    border: 1px solid #333;
    color: #fff;
    padding: 12px;
    font-family: var(--font-mono);
    font-size: 12px;
    border-radius: 4px;
}
.strat-builder-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(0, 255, 157, 0.1);
}

.btn-add-strat {
    background: rgba(0, 255, 157, 0.1);
    border: 1px solid var(--accent);
    color: var(--accent);
    font-weight: 800;
    font-size: 16px;
    width: 50px;
    cursor: pointer;
    border-radius: 4px;
    transition: 0.2s;
}
.btn-add-strat:hover {
    background: var(--accent);
    color: #000;
}

/* THE TAGS CONTAINER */
.strat-tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 100px;
    background: #080808;
    border: 1px dashed #333;
    padding: 15px;
    border-radius: 4px;
    align-content: flex-start;
}

.strat-tag {
    background: #151515;
    border: 1px solid #333;
    padding: 6px 12px;
    font-family: var(--font-mono);
    font-size: 10px;
    color: #ccc;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: fadeIn 0.2s;
}

.strat-tag span {
    color: var(--accent);
    font-weight: bold;
}

.strat-tag-del {
    color: #666;
    cursor: pointer;
    font-weight: bold;
    font-size: 10px;
    padding: 2px 4px;
}
.strat-tag-del:hover {
    color: var(--error);
}



