/* MIND — styles.css (clean black + pro) */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Space+Grotesk:wght@500;600;700&display=swap');

:root{
  --bg: #000000;
  --bg2: #000000;

  --surface: rgba(255,255,255,0.04);
  --surface2: rgba(255,255,255,0.06);
  --border: rgba(255,255,255,0.10);
  --border2: rgba(255,255,255,0.14);

  --text: #EAF0FF;
  --muted: rgba(234,240,255,0.68);
  --muted2: rgba(234,240,255,0.52);

  --brand: #22D3EE;
  --brand2: #ff676c; /* secondary requested */
  --danger: #FF5C7A;
  --ok: #34D399;

  --radius: 16px;
  --radius-sm: 12px;
  --radius-lg: 22px;
  --shadow: 0 18px 55px rgba(0,0,0,0.55);

  --max: 1200px;
  --header-h: 72px;

  --font: Inter, ui-sans-serif, -apple-system, Segoe UI, Roboto, system-ui, Arial;
  --font-display: "Space Grotesk", Inter, ui-sans-serif, system-ui;
}

*{ box-sizing: border-box; }
html,body{ height:100%; }

body{
  margin:0;
  color: var(--text);
  font: 14px/1.6 var(--font);
  background: #000;
}

a{ color: inherit; text-decoration: none; }
.hidden{ display:none !important; }

.main{ padding: 28px 0 34px; }

.card{
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-pad{ padding: 18px; }

.h2{
  font-family: var(--font-display);
  font-size: 28px;
  margin: 0 0 10px;
  letter-spacing: -0.4px;
}
.p{ margin: 0; color: var(--muted); font-size: 15px; }

.badge{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  font-weight: 700;
}
.dot{
  width: 8px; height: 8px; border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  box-shadow: 0 0 14px rgba(255,103,108,.28);
}

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid var(--border2);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  font-weight: 750;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
}
.btn:hover{
  transform: translateY(-1px);
  border-color: rgba(34,211,238,0.45);
  box-shadow: 0 16px 40px rgba(34,211,238,0.10);
}
.btn-primary{
  border: 1px solid rgba(255,103,108,0.50);
  background: linear-gradient(135deg, rgba(34,211,238,0.92), rgba(255,103,108,0.86));
  color: #07101A;
}
.btn-primary:hover{
  border-color: rgba(255,103,108,0.70);
  box-shadow: 0 18px 55px rgba(255,103,108,0.10);
}
.btn-mini{
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 850;
  border-color: rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.04);
}
.btn-mini:hover{
  border-color: rgba(34,211,238,0.45);
  box-shadow: 0 14px 34px rgba(34,211,238,0.10);
}

/* Inputs */
.input{
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  outline: none;
}
.input::placeholder{ color: rgba(234,240,255,0.40); }
.input:focus{
  border-color: rgba(34,211,238,0.55);
  box-shadow: 0 0 0 4px rgba(34,211,238,0.10);
}

/* Tables */
.table-wrap{
  background: rgba(255,255,255,0.03);
  border:1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}
.table-head{
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:space-between;
  background: rgba(255,255,255,0.03);
}
table{ width:100%; border-collapse: collapse; }
thead th{
  text-align:left;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--muted);
  border-bottom:1px solid var(--border);
  white-space: nowrap;
}
tbody td{
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  vertical-align: middle;
}
tbody tr:hover{ background: rgba(34,211,238,0.06); }

/* Shell */
.app-shell{
  min-height: 100vh;
  display: grid;
  grid-template-columns: 270px 1fr;
}

.app-sidebar{
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px 14px;
  border-right: 1px solid var(--border);
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(12px);
}

.app-brand{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 10px 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 12px;
}
.app-brand a{
  display:flex;
  align-items:center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.6px;
  font-family: var(--font-display);
}
.app-mark{
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  box-shadow: 0 0 26px rgba(255,103,108,0.14);
  position: relative;
}
.app-mark:after{
  content:"";
  position:absolute;
  inset: 9px;
  border-radius: 9px;
  background: rgba(0,0,0,0.78);
  border: 1px solid rgba(255,255,255,0.10);
}

.sidebar-section{ margin-top: 12px; }
.sidebar-label{
  padding: 10px 10px 8px;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(234,240,255,0.45);
}

.app-nav{
  display:flex;
  flex-direction:column;
  gap: 8px;
  padding: 0 6px;
}

.tab{
  appearance:none;
  background: transparent;
  border: 0;
  margin: 0;
  cursor: pointer;
}
.app-nav .tab{
  width: 100%;
  text-align:left;
  border-radius: 14px;
  padding: 12px 12px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.03);
  color: rgba(234,240,255,0.78);
  display:flex;
  align-items:center;
  justify-content:space-between;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.app-nav .tab:hover{
  background: rgba(255,255,255,0.05);
  transform: translateY(-1px);
}
.app-nav .tab.active{
  color: #07101A;
  border-color: rgba(255,103,108,0.45);
  background: linear-gradient(135deg, rgba(34,211,238,0.92), rgba(255,103,108,0.86));
  box-shadow: 0 18px 44px rgba(255,103,108,0.10);
}

.nav-left{
  display:flex;
  align-items:center;
  gap: 10px;
  font-weight: 800;
}
.nav-ic{
  width: 28px;
  height: 28px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.12);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size: 13px;
}

.app-main{ min-width: 0; }

.app-topbar{
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(12px);
}
.app-topbar-inner{
  padding: 14px 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
}
.app-search{
  display:flex;
  align-items:center;
  gap: 10px;
  min-width: min(620px, 100%);
}
.app-main .main{
  padding: 22px 18px 34px;
  max-width: 1100px;
}

/* Sidebar status */
.status-panel{
  margin: 10px 6px 0;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
}
.status-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.status-title .t{
  font-weight: 900;
  letter-spacing: -0.2px;
}
.pill{
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  font-size: 12px;
}
.status-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.status-kpi{
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.20);
  padding: 10px;
}
.status-kpi .k{
  color: rgba(234,240,255,0.55);
  font-size: 11.5px;
  font-weight: 700;
}
.status-kpi .v{
  margin-top: 6px;
  font-weight: 950;
  font-size: 14px;
}
.status-row{
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  flex-wrap: wrap;
  color: rgba(234,240,255,0.60);
  font-size: 12px;
}

/* ---------- Pro KPI/Feature cards (Overview / generic) ---------- */
.grid-4{
  display:grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 14px;
}
@media (max-width: 980px){
  .grid-4{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px){
  .grid-4{ grid-template-columns: 1fr; }
}

.grid-3{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 14px;
}
@media (max-width: 980px){
  .grid-3{ grid-template-columns: 1fr; }
}

.feature{
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.10);
  background:
    radial-gradient(900px 240px at 20% 0%, rgba(34,211,238,0.10), transparent 55%),
    radial-gradient(900px 240px at 90% 20%, rgba(255,103,108,0.08), transparent 55%),
    rgba(255,255,255,0.03);
  box-shadow: 0 18px 55px rgba(0,0,0,0.45);
  padding: 14px;
  overflow:hidden;
}
.feature .t{
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(234,240,255,0.55);
  font-weight: 850;
}
.feature .d{
  margin-top: 8px;
  font-weight: 950;
  font-size: 26px;
  letter-spacing: -0.5px;
  line-height: 1.15;
  color: rgba(234,240,255,0.95);
}
.feature .sub{
  margin-top: 8px;
  color: rgba(234,240,255,0.55);
  font-size: 12.5px;
}

/* Signals */
.signal-filters{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.chip{
  appearance:none;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: rgba(234,240,255,0.78);
  padding: 10px 12px;
  border-radius: 999px;
  font-weight: 850;
  cursor:pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.chip:hover{ transform: translateY(-1px); border-color: rgba(34,211,238,0.35); }
.chip.active{
  color:#07101A;
  border-color: rgba(255,103,108,0.55);
  background: linear-gradient(135deg, rgba(34,211,238,0.86), rgba(255,103,108,0.82));
}
.chip-spike{ border-color: rgba(34,211,238,0.28); }
.chip-trade{ border-color: rgba(255,103,108,0.30); }

.signals-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 980px){
  .signals-grid{ grid-template-columns: 1fr; }
}

/* Entities top cards */
.entity-topgrid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 14px;
}
@media (max-width: 980px){
  .entity-topgrid{ grid-template-columns: 1fr; }
}
.entity-card{
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  box-shadow: var(--shadow);
  padding: 14px;
}
.entity-card-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 10px;
}
.entity-card-head .t{ font-weight: 950; letter-spacing:-0.2px; }
.entity-card-head .s{ color: rgba(234,240,255,0.55); font-size: 12px; }
.entity-card-body{
  color: rgba(234,240,255,0.78);
  font-size: 13px;
  line-height: 1.55;
  min-height: 72px;
}

/* ---------- Detail modal (centered + compact + pro) ---------- */
#detail-backdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,0.58);
  backdrop-filter: blur(6px);
}

.detail-modal{
  position:absolute;
  left: 50%;
  top: 6vh;
  transform: translateX(-50%);
  width: min(980px, 94vw);
  max-height: 88vh;
  overflow:auto;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(11,18,36,.72);
  box-shadow: 0 20px 80px rgba(0,0,0,.55);
}
@media (max-width: 980px){
  .detail-modal{ top: 3vh; width: 96vw; max-height: 92vh; }
}

.detail-head{
  padding: 14px 14px;
  border-bottom: 1px solid rgba(255,255,255,.10);
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 14px;
  flex-wrap:wrap;
}
.detail-left{
  display:flex;
  align-items:flex-start;
  gap: 12px;
  min-width: 280px;
  flex: 1 1 auto;
}
.detail-icon{
  width: 44px; height: 44px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.25);
  object-fit: cover;
  flex: 0 0 auto;
}
.detail-title{
  font-weight: 950;
  letter-spacing: -0.3px;
  font-size: 18px;
  line-height: 1.25;
  margin-top: 6px;
  max-width: 76ch;
}
.detail-sub{
  margin-top: 4px;
  color: rgba(234,240,255,0.65);
  font-size: 12.5px;
  line-height: 1.5;
  max-width: 76ch;
}
.detail-actions{
  display:flex;
  gap: 10px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-end;
  flex: 0 0 auto;
}

/* IMPORTANT: stack everything (no side-by-side) */
.detail-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
}

/* compact canvases */
#detail-odds-sparkline,
#detail-sparkline{
  width: 100% !important;
  max-width: 100% !important;
  height: 72px !important;
  border-radius: 14px !important;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.22) !important;
}

#detail-odds{
  margin-top: 6px;
  color: rgba(234,240,255,0.90);
  font-weight: 900;
  letter-spacing: -0.2px;
}

.wallet-list{
  display:flex;
  flex-direction:column;
  gap: 10px;
  margin-top: 10px;
}
.wallet-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.18);
}
.wallet-left{ min-width: 0; }
.wallet-name{
  font-weight: 950;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 44ch;
}
.wallet-addr{
  color: rgba(234,240,255,0.55);
  font-size: 12px;
  margin-top: 2px;
}
.wallet-right{
  text-align:right;
  flex: 0 0 auto;
}
.wallet-vol{
  font-weight: 950;
  letter-spacing: -0.2px;
}
.wallet-trades{
  color: rgba(234,240,255,0.55);
  font-size: 12px;
  margin-top: 2px;
}

.pre{ white-space: pre-line; }

.trade-buy{ color: rgba(34,211,238,0.95); font-weight: 950; }
.trade-sell{ color: rgba(255,103,108,0.95); font-weight: 950; }
.trade-amount{ font-weight: 950; letter-spacing: -0.2px; }

.bubble-canvas{
  height: 420px;
  border-radius: 18px;
  border: 1px dashed rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.02);
  display:flex;
  align-items:center;
  justify-content:center;
  color: rgba(234,240,255,0.50);
  font-weight: 850;
}

/* Responsive shell */
@media (max-width: 980px){
  .app-shell{ grid-template-columns: 1fr; }
  .app-sidebar{
    position: relative;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
}

/* ==========================================
   Windows-like "remote desktop" shell
   ========================================== */

body.win-mode{
  background: radial-gradient(1200px 800px at 20% 20%, rgba(77,124,255,.18), transparent 55%),
              radial-gradient(900px 650px at 85% 35%, rgba(0,255,180,.10), transparent 60%),
              linear-gradient(180deg, #030611 0%, #000 60%, #000 100%);
  overflow: hidden;
}

/* Desktop layer */
.win-desktop{
  position: fixed;
  inset: 0;
  pointer-events: none;
}

/* Desktop icons grid (bigger on PC) */
.desktop-icons{
  position: fixed;
  left: 18px;
  top: 18px;
  display: grid;
  gap: 16px;
  pointer-events: auto;
  align-content: start;

  /* Default (PC): 3 columns of 112px */
  grid-template-columns: repeat(3, 112px);
  grid-auto-rows: 112px;
  width: fit-content;
}

@media (max-width: 1100px){
  .desktop-icons{
    grid-template-columns: repeat(2, 112px);
  }
}

/* Icon tile */
.desktop-icon{
  width: 112px;
  height: 112px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 16px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(234,240,255,.92);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  pointer-events: auto;

  position: relative;

  /* drag offsets */
  transform: translate(var(--dx, 0px), var(--dy, 0px));
  will-change: transform;
  transition: background .12s ease, border-color .12s ease, transform .12s ease;
}

.desktop-icon.link{ text-decoration:none; }
.desktop-icon.link:visited{ color: inherit; }

.desktop-icon .ico{
  font-size: 34px;
  width: 52px;
  height: 52px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius: 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 10px 28px rgba(0,0,0,.45);
}
.desktop-icon .lbl{
  font-size: 13px;
  line-height: 1.1;
  text-align: center;
  color: rgba(234,240,255,.86);
  text-shadow: 0 2px 10px rgba(0,0,0,.65);
}

.desktop-icon:hover{
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.12);
}

/* ✅ FIX: preserve drag translate on active press */
.desktop-icon:active{
  transform: translate(var(--dx, 0px), var(--dy, 0px)) translateY(1px);
}

.desktop-icon.dragging-icon{
  cursor: grabbing;
  z-index: 200;
  background: rgba(255,255,255,0.06);
  border-color: rgba(77,124,255,.35);
  box-shadow: 0 26px 90px rgba(0,0,0,.65);
  transition: none;
}

/* Desktop status panel */
.desktop-panel{
  position: fixed;
  right: 18px;
  top: 86px;
  width: min(360px, calc(100vw - 36px));
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.58);
  backdrop-filter: blur(14px);
  box-shadow: 0 22px 70px rgba(0,0,0,.55);
  padding: 12px 12px;
  z-index: 20;
}
.dp-head{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.dp-title{
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.2px;
  font-size: 13px;
  color: rgba(234,240,255,.92);
}
.dp-pill{
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: rgba(234,240,255,.88);
}
.dp-grid{ display:grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.dp-kpi{
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  border-radius: 14px;
  padding: 10px 10px;
}
.dp-kpi .k{ color: rgba(234,240,255,.70); font-size: 12px; }
.dp-kpi .v{ color: rgba(234,240,255,.96); font-weight: 950; margin-top: 2px; }
@media (max-width: 900px){
  .desktop-panel{ top: 68px; right: 10px; }
}

/* Hide old sidebar (still in DOM for existing JS) */
.app-sidebar.win-hidden{ display:none !important; }

/* Window */
.app-main.win-window{
  position: fixed;
  left: 120px;
  top: 86px;
  right: 18px;
  bottom: 64px;
  max-width: 1200px;
  margin: 0 auto;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(14px);
  box-shadow: 0 30px 95px rgba(0,0,0,.65);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 50;

  transform-origin: center bottom;
  transition: transform .18s ease, opacity .18s ease, filter .18s ease;
}
.app-main.win-hidden{ display:none !important; }
.app-main.win-window.maximized{
  left: 8px !important;
  top: 8px !important;
  right: 8px !important;
  bottom: 56px !important;
  max-width: none !important;
  border-radius: 14px;
}

/* Window scrolling */
.app-main.win-window .app-topbar{ flex: 0 0 auto; }
.app-main.win-window .main{
  flex: 1 1 auto;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: 84px;
}

/* Loader overlay (6s on first open) */
.win-loader{
  position: absolute;
  inset: 0;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(10px);
  z-index: 80;
}
.win-loader.hidden{ display:none; }
.win-loader-inner{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap: 12px;
  padding: 18px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  box-shadow: 0 18px 65px rgba(0,0,0,.55);
}
.win-loader-logo{
  width: 64px; height: 64px;
  border-radius: 999px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.14);
  image-rendering: auto;
  animation: spinLogo 1.05s linear infinite;
}
@keyframes spinLogo{ from{ transform: rotate(0deg); } to{ transform: rotate(360deg); } }
.win-loader-text{ color: rgba(234,240,255,.86); font-weight: 850; font-size: 13px; letter-spacing: .2px; }
.app-main.win-window.loading .main{ filter: blur(2px); }
.app-main.win-window.loading{ pointer-events: none; }
.app-main.win-window.loading .win-loader{ pointer-events: auto; }

/* Window chrome */
.win-chrome{
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(180deg, rgba(18,22,36,.92), rgba(10,12,18,.55));
  border-bottom: 1px solid rgba(255,255,255,0.10);
}
.win-titlebar{
  height: 44px;
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 0 10px 0 14px;
  user-select: none;
}
.win-title{
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.2px;
  color: rgba(234,240,255,.92);
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.win-controls{
  display:flex;
  align-items:center;
  gap: 6px;
}
.win-btn{
  width: 34px;
  height: 28px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  color: rgba(234,240,255,.92);
  cursor: pointer;
}
.win-btn:hover{ background: rgba(255,255,255,0.07); }
.win-btn.close:hover{
  background: rgba(255,84,84,0.18);
  border-color: rgba(255,84,84,0.25);
}

/* App toolbar inside window */
.app-topbar{
  position: sticky;
  top: 44px;
  z-index: 15;
  background: rgba(0,0,0,0.32);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* Taskbar */
.taskbar{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 48px;
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 0 10px;
  background: rgba(8,10,16,0.78);
  border-top: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(14px);
  z-index: 80;
  pointer-events: auto;
}
.taskbar-start{
  width: 44px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: rgba(234,240,255,.92);
  font-size: 16px;
  cursor: pointer;
}
.taskbar-start:hover{ background: rgba(255,255,255,0.09); }

.taskbar-apps{
  flex: 1;
  display:flex;
  align-items:center;
  gap: 8px;
  overflow: hidden;
}
.taskbar-app{
  height: 34px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
  color: rgba(234,240,255,.86);
  cursor: pointer;
  white-space: nowrap;
}
.taskbar-app.active{
  background: rgba(77,124,255,.16);
  border-color: rgba(77,124,255,.28);
  color: rgba(234,240,255,.95);
}

.taskbar-tray{
  display:flex;
  align-items:center;
  gap: 10px;
}
.tray-pill{
  font-size: 11px;
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  color: rgba(234,240,255,.75);
}
.tray-clock{
  min-width: 54px;
  text-align: right;
  font-feature-settings: "tnum" 1, "ss01" 1;
  color: rgba(234,240,255,.88);
}

/* Mobile: icons as a dock + full screen window */
@media (max-width: 820px){
  body.win-mode{ overflow: hidden; }

  .desktop-icons{
    left: 12px;
    right: 12px;
    top: auto;
    bottom: 60px;
    inset: auto;
    width: auto;

    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 78px;
    gap: 10px;
    pointer-events: auto;
  }

  .desktop-icon{
    transform: none !important;
    width: auto;
    height: 78px;
    border-radius: 16px;
    background: rgba(255,255,255,0.03);
    border-color: rgba(255,255,255,0.08);
  }

  .desktop-icon:active{
    transform: translateY(1px) !important;
  }

  .app-main.win-window{
    left: 8px;
    right: 8px;
    top: 8px;
    bottom: 56px;
    max-width: none;
    border-radius: 14px;
  }
}

/* Prevent old responsive rules from un-hiding the sidebar in win-mode */
@media (max-width: 980px){
  body.win-mode .app-shell{ grid-template-columns: 1fr; }
  body.win-mode .app-sidebar{ display:none !important; }
}

/* Warning / Soon toast */
.win-toast{
  position: fixed;
  left: 50%;
  bottom: 74px;
  transform: translateX(-50%);
  z-index: 200;
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(12px);
  box-shadow: 0 26px 90px rgba(0,0,0,.65);
  color: rgba(234,240,255,.92);
  font-weight: 850;
  opacity: 1;
  transition: opacity .18s ease, transform .18s ease;
}
.win-toast .ic{
  width: 30px; height: 30px;
  border-radius: 12px;
  display:flex; align-items:center; justify-content:center;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
}
.win-toast.hide{
  opacity:0;
  transform: translateX(-50%) translateY(8px);
}
/* ---- Custom user background (win-mode) ---- */
body.win-mode{
  /* tu imagen encima, el resto debajo */
  background-image:
    var(--mind-bg-url, none),
    radial-gradient(1200px 800px at 20% 20%, rgba(77,124,255,.18), transparent 55%),
    radial-gradient(900px 650px at 85% 35%, rgba(0,255,180,.10), transparent 60%),
    linear-gradient(180deg, #030611 0%, #000 60%, #000 100%);

  background-size:
    cover,
    auto,
    auto,
    auto;

  background-position:
    center,
    center,
    center,
    center;

  background-repeat:
    no-repeat,
    no-repeat,
    no-repeat,
    no-repeat;
}
