/* ============================================================
   Crypto15min PolyTrader — PORTAL THEME (v0.6.9)
   Inspired by modern "portal" dashboards (deep blue / purple)
   Keeps structural "15m SWING BOT" cues but changes look heavily.
   ============================================================ */

:root{
  --p-bg0:#070a14;
  --p-bg1:#0a1024;
  --p-bg2:#0b1535;
  --p-card:#0d1635cc;
  --p-card2:#0b1229cc;
  --p-border: rgba(120,155,255,.18);
  --p-border2: rgba(167,110,255,.18);
  --p-text: rgba(245,248,255,.90);
  --p-muted: rgba(245,248,255,.62);
  --p-accent: #7c3aed;      /* purple */
  --p-accent2:#2563eb;      /* blue */
  --p-accent3:#22c55e;      /* green */
  --p-warn:#f59e0b;         /* amber */
}

/* Base */
body.theme-15m{
  color: var(--p-text);
  background:
    radial-gradient(1200px 700px at 12% 8%, rgba(124,58,237,.18), transparent 60%),
    radial-gradient(900px 650px at 80% 5%, rgba(37,99,235,.18), transparent 62%),
    radial-gradient(900px 650px at 60% 92%, rgba(34,197,94,.08), transparent 62%),
    linear-gradient(180deg, var(--p-bg0), var(--p-bg1) 45%, var(--p-bg2));
}

/* Left rail (still visible, but portal styled) */
body.theme-15m::before{
  content:"";
  position: fixed;
  left:0; top:0; bottom:0;
  width:10px;
  background: linear-gradient(180deg, rgba(124,58,237,.9), rgba(37,99,235,.85));
  box-shadow: 0 0 30px rgba(124,58,237,.25);
  z-index: 9998;
  pointer-events:none;
}

/* Ribbon */
.theme-15m .bot-ribbon{
  position: sticky;
  top: 0;
  z-index: 9999;
  display:flex;
  align-items:center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(120,155,255,.20);
  background: linear-gradient(90deg, rgba(124,58,237,.22), rgba(37,99,235,.16) 45%, rgba(0,0,0,0));
  backdrop-filter: blur(10px);
}
.theme-15m .bot-ribbon .pill{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding: 8px 12px;
  border-radius: 14px;
  font-weight: 800;
  letter-spacing: .4px;
  color: rgba(255,255,255,.92);
  background: linear-gradient(135deg, rgba(124,58,237,.65), rgba(37,99,235,.55));
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 10px 40px rgba(124,58,237,.18);
}
.theme-15m .bot-ribbon .sub{
  color: rgba(245,248,255,.70);
  font-size: 12.5px;
}

/* Sidebar / nav (best-effort) */
body.theme-15m :is(aside, nav, .sidebar, .sidenav, .left, .panel-left){
  background:
    radial-gradient(600px 500px at 20% 10%, rgba(124,58,237,.20), transparent 60%),
    radial-gradient(700px 600px at 60% 70%, rgba(37,99,235,.18), transparent 65%),
    rgba(6,9,20,.72) !important;
  border-right: 1px solid rgba(120,155,255,.20) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}
.theme-15m .sidebar .brand-badge{
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(13,22,53,.65);
  border: 1px solid rgba(120,155,255,.20);
  color: rgba(245,248,255,.92);
}

/* Cards / panels */
body.theme-15m :is(.card, .panel, .box, .tile, section, article, .content-card){
  background: linear-gradient(180deg, var(--p-card), var(--p-card2)) !important;
  border: 1px solid rgba(120,155,255,.14) !important;
  box-shadow: 0 12px 60px rgba(0,0,0,.35);
  border-radius: 18px;
}
body.theme-15m :is(.card, .panel, .box, .tile, section, article, .content-card)::before{
  content:"";
  position:absolute;
  left:0; right:0; top:0;
  height:3px;
  background: linear-gradient(90deg, rgba(124,58,237,.85), rgba(37,99,235,.75), rgba(34,197,94,.45));
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  pointer-events:none;
}

/* Text */
body.theme-15m h1, body.theme-15m h2, body.theme-15m h3{
  color: rgba(245,248,255,.92);
}
body.theme-15m :is(.muted, .subtle, .hint){
  color: var(--p-muted) !important;
}

/* Tabs: portal active */
body.theme-15m :is(.tabs a, .tabs button, .tab, .nav a){
  color: rgba(245,248,255,.70) !important;
}
body.theme-15m :is(.tabs a.active, .tabs .active, .tab.active, .nav a.active, .nav .active){
  color: rgba(245,248,255,.95) !important;
}
body.theme-15m :is(.tabs a.active, .tab.active){
  position: relative;
}
body.theme-15m :is(.tabs a.active, .tab.active)::after{
  content:"";
  position:absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(124,58,237,.95), rgba(37,99,235,.85));
}

/* Buttons */
body.theme-15m :is(button, .btn){
  border-radius: 14px;
  border: 1px solid rgba(120,155,255,.22);
  background: rgba(13,22,53,.55);
  color: rgba(245,248,255,.90);
}
body.theme-15m :is(button:hover, .btn:hover){
  border-color: rgba(124,58,237,.40);
  box-shadow: 0 10px 35px rgba(124,58,237,.16);
}
body.theme-15m :is(.btn-primary, button.primary){
  border-color: rgba(124,58,237,.55) !important;
  background: linear-gradient(135deg, rgba(124,58,237,.65), rgba(37,99,235,.55)) !important;
}

/* Inputs */
body.theme-15m :is(input, select, textarea){
  background: rgba(6,9,20,.45) !important;
  color: rgba(245,248,255,.92) !important;
  border: 1px solid rgba(120,155,255,.18) !important;
  border-radius: 12px;
}
body.theme-15m :is(input:focus, select:focus, textarea:focus){
  outline:none;
  box-shadow: 0 0 0 3px rgba(124,58,237,.20);
  border-color: rgba(124,58,237,.50) !important;
}

/* Watermark */
body.theme-15m .main::before{
  content: "SWING 15m";
  position: fixed;
  right: 22px;
  bottom: 14px;
  font-size: 120px;
  font-weight: 900;
  letter-spacing: 2px;
  color: rgba(124,58,237,.055);
  pointer-events: none;
  z-index: 0;
}

/* Make "LIVE" style look different (best effort) */
body.theme-15m :is(.live, .badge-live, .pill-live, .badge){
  border-color: rgba(34,197,94,.45) !important;
  box-shadow: 0 0 18px rgba(34,197,94,.12);
}

/* Fill probability badge (Liquidity Heat -> Likely/Risky/Skip) */
body.theme-15m .fill-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: .2px;
  border: 1px solid rgba(120,155,255,.18);
  background: rgba(6,9,20,.35);
  color: rgba(245,248,255,.92);
}
body.theme-15m .fill-badge::before{
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(148,163,184,.75);
  box-shadow: 0 0 12px rgba(148,163,184,.25);
}
body.theme-15m .fill-good{border-color: rgba(34,197,94,.40); background: rgba(34,197,94,.10);}
body.theme-15m .fill-good::before{background: rgba(34,197,94,.95); box-shadow: 0 0 14px rgba(34,197,94,.35);}
body.theme-15m .fill-warn{border-color: rgba(245,158,11,.40); background: rgba(245,158,11,.10);}
body.theme-15m .fill-warn::before{background: rgba(245,158,11,.95); box-shadow: 0 0 14px rgba(245,158,11,.30);}
body.theme-15m .fill-bad{border-color: rgba(239,68,68,.40); background: rgba(239,68,68,.10);}
body.theme-15m .fill-bad::before{background: rgba(239,68,68,.95); box-shadow: 0 0 14px rgba(239,68,68,.30);}
body.theme-15m .fill-unk{opacity:.85;}

/* ============================================================
   v2.3.23 visual polish
   Keep the 15m identity, but make the dashboard read like a
   production trading app instead of a theme demo.
   ============================================================ */

:root{
  --sidebar-w: 236px;
  --radius: 10px;
  --radius-sm: 8px;
  --font-heading: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-ui: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

html,
body.theme-15m{
  font-family: var(--font-ui);
}

body.theme-15m{
  background:
    radial-gradient(980px 620px at 14% 2%, rgba(124,58,237,.12), transparent 60%),
    radial-gradient(820px 560px at 86% 0%, rgba(37,99,235,.14), transparent 62%),
    radial-gradient(760px 540px at 72% 94%, rgba(34,197,94,.06), transparent 64%),
    linear-gradient(180deg, #070a14, #091225 52%, #0a1730);
}

body.theme-15m::before{
  width: 4px;
  box-shadow: 0 0 18px rgba(37,99,235,.22);
}

body.theme-15m::after,
body.theme-15m .main::before{
  content: none !important;
  display: none !important;
}

body.theme-15m.page-loading .card{
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}

body.theme-15m h1,
body.theme-15m h2,
body.theme-15m h3,
body.theme-15m h4,
body.theme-15m h5,
body.theme-15m h6,
body.theme-15m .card-header,
body.theme-15m .sidebar-brand h2,
body.theme-15m .brand-badge,
body.theme-15m .bot-ribbon .pill{
  font-family: var(--font-ui);
  letter-spacing: 0;
}

body.theme-15m .bot-ribbon{
  min-height: 52px;
  padding: 10px 16px;
  background: linear-gradient(90deg, rgba(13,22,53,.92), rgba(11,24,54,.84) 48%, rgba(7,10,20,.64));
  border-bottom: 1px solid rgba(120,155,255,.16);
  box-shadow: 0 1px 0 rgba(255,255,255,.04);
}

body.theme-15m .bot-ribbon .pill{
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 750;
  background: linear-gradient(135deg, rgba(124,58,237,.62), rgba(37,99,235,.58));
  border-color: rgba(255,255,255,.16);
  box-shadow: none;
}

body.theme-15m .dashboard-layout{
  align-items: start;
}

body.theme-15m .main-content{
  max-width: 1320px;
  margin: 0 auto;
  padding: 1.25rem 1.45rem 2rem;
}

body.theme-15m .sidebar{
  gap: .62rem;
  padding: 1rem .9rem;
}

body.theme-15m .sidebar .brand-badge{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  margin-top: 4px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 750;
  background: rgba(13,22,53,.72);
}

body.theme-15m .brand-marker{
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: linear-gradient(135deg, #d7b25a, #f59e0b);
  flex: 0 0 auto;
}

body.theme-15m .sidebar-brand h2{
  font-size: .9rem;
  line-height: 1.15;
}

body.theme-15m .sidebar-section-header{
  letter-spacing: .06em;
  font-size: .68rem;
}

body.theme-15m .sidebar-status{
  padding: .58rem .62rem;
  line-height: 1.45;
  background: rgba(7,13,30,.72);
}

body.theme-15m :is(.card, .panel, .box, .tile, .content-card){
  background: linear-gradient(180deg, rgba(13,22,53,.88), rgba(9,17,39,.86)) !important;
  border-color: rgba(120,155,255,.15) !important;
  border-radius: var(--radius);
  box-shadow: 0 10px 34px rgba(0,0,0,.28);
}

body.theme-15m :is(.card, .panel, .box, .tile, .content-card)::before{
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}

body.theme-15m :is(section, article){
  border-radius: inherit;
  box-shadow: none;
}

body.theme-15m :is(button, .btn, input, select, textarea){
  border-radius: var(--radius-sm);
}

body.theme-15m .tab-bar{
  gap: .34rem;
  border-bottom-color: rgba(120,155,255,.14);
}

body.theme-15m .tab-bar button{
  min-height: 36px;
  padding: 8px 15px;
  border-radius: 10px 10px 0 0;
}

body.theme-15m .tab-bar button.active{
  background: rgba(37,99,235,.18);
  border-color: rgba(120,155,255,.28);
}

body.theme-15m .notice{
  border-radius: 10px;
  line-height: 1.45;
}

body.theme-15m #tab-settings .card{
  margin-bottom: 12px;
}

body.theme-15m #tab-settings .card-header{
  font-size: .78rem;
  letter-spacing: .01em;
  color: rgba(245,248,255,.78);
}

body.theme-15m #tab-settings .settings-grid{
  max-width: none;
  background: rgba(7,13,30,.42);
}

body.theme-15m #tab-settings .settings-card-header{
  padding: .82rem 1rem;
}

body.theme-15m #tab-settings .settings-card-header h4{
  font-size: .84rem;
}

body.theme-15m #tab-settings .settings-card-header .section-hint{
  max-width: 320px;
}

@media (max-width: 860px){
  body.theme-15m::before{
    width: 3px;
  }

  body.theme-15m .dashboard-layout{
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }

  body.theme-15m .main-content{
    order: 1;
    width: 100%;
    max-width: none;
    padding: .85rem;
  }

  body.theme-15m .sidebar{
    order: 2;
    width: 100%;
    height: auto;
    max-height: none;
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: .7rem;
    border-right: 0 !important;
    border-top: 1px solid rgba(120,155,255,.18);
    border-bottom: 0;
  }

  body.theme-15m .sidebar-brand,
  body.theme-15m .sidebar-footer{
    grid-column: 1 / -1;
  }

  body.theme-15m .sidebar-footer{
    position: relative;
  }

  body.theme-15m .notice{
    margin-bottom: .75rem;
  }

  body.theme-15m .tab-bar{
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    padding-bottom: .28rem;
    -webkit-overflow-scrolling: touch;
  }

  body.theme-15m .tab-bar button{
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

@media (max-width: 520px){
  body.theme-15m .bot-ribbon{
    min-height: 46px;
    padding: 8px 12px;
  }

  body.theme-15m .main-content{
    padding: .75rem .72rem 1.25rem;
  }

  body.theme-15m .sidebar{
    grid-template-columns: 1fr;
    padding: .75rem;
  }

  body.theme-15m .sidebar .brand-badge{
    display: none;
  }

  body.theme-15m .sidebar-status{
    font-size: .78rem;
  }

  body.theme-15m .notice{
    font-size: .82rem;
  }

  body.theme-15m .card{
    padding: 10px;
  }

  body.theme-15m #tab-settings .settings-header-bar,
  body.theme-15m #tab-settings .settings-card-header{
    align-items: flex-start;
    flex-direction: column;
  }

  body.theme-15m #tab-settings .settings-card-header .section-hint{
    max-width: 100%;
    white-space: normal;
  }
}
