
  :root{
    /* تم روشن: عاج و طلایی */
    --bg:#F4F3FF; --bg-elevated:#FFFFFF; --bg-sidebar:#FFFFFF; --bg-hover:#E9E7FB;
    --border:rgba(91,75,219,.22); --text:#14122B; --text-2:#4F4C73; --text-3:#8280A6;
    --accent:#5B4BDB; --accent-strong:#4033B0; --accent-soft:rgba(139,124,255,.16); --on-accent:#FFFFFF;
    --gold-1:#7DD3FC; --gold-2:#8B7CFF; --gold-3:#5B4BDB;
    --warn:#C7811F; --warn-soft:#FBF0DE; --danger:#D64545; --danger-soft:#FBE7E7;
    --success:#1E9E6A; --success-soft:#E4F6EE;
    --radius-lg:22px; --radius-md:14px; --radius-sm:11px;
    --shadow:0 1px 2px rgba(30,20,80,.06), 0 4px 10px rgba(30,20,80,.05), 0 22px 44px -12px rgba(91,75,219,.28);
    --glass-sidebar:rgba(250,249,255,.76); --glass-topbar:rgba(250,249,255,.70); --glass-card:rgba(255,255,255,.80);
    --blob-1:rgba(139,124,255,.55); --blob-2:rgba(34,211,238,.42); --blob-3:rgba(109,74,224,.30);
    --blob-4:rgba(125,211,252,.55); --blob-5:rgba(91,75,219,.35); --blob-blend:multiply;
  }
  [data-theme="dark"]{
    /* تم تیره: مشکی و طلایی */
    --bg:#05060F; --bg-elevated:#0E0F1E; --bg-sidebar:#090A16; --bg-hover:#171934;
    --border:rgba(139,124,255,.20); --text:#EEF0FF; --text-2:#A9ACD0; --text-3:#6F7296;
    --accent:#8B7CFF; --accent-strong:#B7ACFF; --accent-soft:rgba(139,124,255,.13); --on-accent:#07060F;
    --warn:#E8B04A; --warn-soft:rgba(232,176,74,.13); --danger:#F0685F; --danger-soft:rgba(240,104,95,.13);
    --success:#3FCB8B; --success-soft:rgba(63,203,139,.13);
    --shadow:0 1px 2px rgba(0,0,0,.5), 0 6px 16px rgba(0,0,0,.45), 0 26px 54px -16px rgba(139,124,255,.28);
    --glass-sidebar:rgba(9,10,22,.66); --glass-topbar:rgba(12,13,30,.58); --glass-card:rgba(16,17,38,.70);
    --blob-1:rgba(139,124,255,.34); --blob-2:rgba(34,211,238,.20); --blob-3:rgba(76,56,190,.34);
    --blob-4:rgba(165,227,253,.15); --blob-5:rgba(60,40,160,.40); --blob-blend:screen;
  }
  *{box-sizing:border-box; margin:0; padding:0;}
  body{
    font-family:'Noto Sans Arabic','Vazirmatn',sans-serif; color:var(--text); transition:background .2s,color .2s;
    background-color:var(--bg);
    min-height:100vh;
    position:relative;
  }
  .bg-blobs{position:fixed; inset:0; z-index:0; overflow:hidden; pointer-events:none;}
  .bg-blobs span{position:absolute; border-radius:50%; filter:blur(70px); mix-blend-mode:var(--blob-blend, normal); will-change:transform;}
  .blob-1{width:46vw; height:46vw; top:-14%; right:-10%; background:var(--blob-1); animation:driftA 22s ease-in-out infinite;}
  .blob-2{width:38vw; height:38vw; bottom:-16%; left:-8%; background:var(--blob-2); animation:driftB 26s ease-in-out infinite;}
  .blob-3{width:30vw; height:30vw; top:36%; left:36%; background:var(--blob-3); animation:driftC 20s ease-in-out infinite;}
  .blob-4{width:26vw; height:26vw; top:6%; left:20%; background:var(--blob-4); animation:driftB 30s ease-in-out infinite reverse;}
  .blob-5{width:24vw; height:24vw; bottom:2%; right:14%; background:var(--blob-5); animation:driftA 24s ease-in-out infinite reverse;}
  @keyframes driftA{0%,100%{transform:translate(0,0) scale(1);} 50%{transform:translate(-4%,5%) scale(1.08);}}
  @keyframes driftB{0%,100%{transform:translate(0,0) scale(1);} 50%{transform:translate(5%,-4%) scale(1.06);}}
  @keyframes driftC{0%,100%{transform:translate(0,0) scale(1);} 50%{transform:translate(-3%,-6%) scale(1.1);}}
  button, input, textarea, select{font-family:inherit; font-size:inherit; color:inherit;}
  .app{display:flex; min-height:100vh; position:relative; z-index:1;}

  /* ---------- Sidebar ---------- */
  .sidebar{width:250px; flex-shrink:0; background:var(--glass-sidebar); backdrop-filter:blur(18px) saturate(160%); -webkit-backdrop-filter:blur(18px) saturate(160%); border-left:1px solid var(--border); display:flex; flex-direction:column; padding:20px 14px; gap:18px;}
  .brand{display:flex; align-items:center; gap:10px; padding:0 6px 16px; border-bottom:1px solid var(--border);}
  .brand-logo{width:38px; height:38px; flex-shrink:0;}
  .brand-name{font-weight:800; font-size:16px; line-height:1.3;}
  .brand-tag{font-size:11px; color:var(--text-3); font-weight:500;}
  nav.nav{display:flex; flex-direction:column; gap:2px; flex:1; overflow-y:auto;}
  .nav-item{display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:var(--radius-sm); cursor:pointer; color:var(--text-2); font-weight:600; font-size:14px; border:none; background:transparent; width:100%; text-align:right;}
  .nav-item svg{width:18px; height:18px; flex-shrink:0;}
  .nav-item:hover{background:var(--bg-hover); color:var(--text);}
  .nav-item.active{background:var(--accent-soft); color:var(--accent-strong);}
  .nav-group-label{font-size:11px; color:var(--text-3); font-weight:700; padding:14px 12px 4px;}
  .sidebar-footer{border-top:1px solid var(--border); padding-top:14px;}
  .plan-chip{display:flex; align-items:center; justify-content:space-between; background:var(--bg-hover); border-radius:var(--radius-sm); padding:10px 12px; font-size:12px; font-weight:600; color:var(--text-2); margin-bottom:10px;}
  .btn-plans{width:100%; padding:10px; border-radius:var(--radius-sm); border:none; background:var(--accent); color:#fff; font-weight:700; font-size:13px; cursor:pointer;}
  .btn-plans:hover{background:var(--accent-strong);}

  /* ---------- Topbar ---------- */
  .main{flex:1; display:flex; flex-direction:column; min-width:0;}
  .topbar{display:flex; align-items:center; justify-content:space-between; padding:14px 24px; border-bottom:1px solid var(--border); background:var(--glass-topbar); backdrop-filter:blur(18px) saturate(160%); -webkit-backdrop-filter:blur(18px) saturate(160%); gap:16px; flex-wrap:wrap;}
  .topbar-user{display:flex; align-items:center; gap:10px;}
  .avatar{width:38px; height:38px; border-radius:50%; background:var(--accent-soft); color:var(--accent-strong); display:flex; align-items:center; justify-content:center; font-weight:800;}
  .user-meta .name{font-weight:700; font-size:13px;}
  .user-meta .phone{font-size:11px; color:var(--text-3);}
  .topbar-right{display:flex; align-items:center; gap:14px;}
  .clock-box{text-align:left; font-size:12px; color:var(--text-2); line-height:1.5;}
  .clock-box b{font-size:15px; color:var(--text); font-weight:700; display:block;}
  .icon-btn{width:36px; height:36px; border-radius:50%; border:1px solid var(--border); background:var(--bg-elevated); display:flex; align-items:center; justify-content:center; cursor:pointer;}
  .icon-btn:hover{background:var(--bg-hover);}
  .icon-btn svg{width:16px; height:16px; color:var(--text-2);}
  .account-select{display:flex; align-items:center; gap:6px; border:1px solid var(--border); border-radius:var(--radius-sm); padding:8px 12px; font-size:12px; font-weight:600; cursor:pointer; background:var(--bg-elevated);}

  /* ---------- Content ---------- */
  .content{flex:1; padding:26px; overflow-y:auto;}
  .view{display:none;}
  .view.active{display:block;}
  .view-header{display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:20px; gap:12px; flex-wrap:wrap;}
  .view-title{font-size:20px; font-weight:800;}
  .view-sub{font-size:13px; color:var(--text-2); margin-top:4px;}
  .btn-primary{background:var(--accent); color:#fff; border:none; padding:11px 18px; border-radius:var(--radius-sm); font-weight:700; font-size:13px; cursor:pointer; display:inline-flex; align-items:center; gap:6px;}
  .btn-primary:hover{background:var(--accent-strong);}
  .btn-ghost{background:var(--bg-elevated); border:1px solid var(--border); padding:11px 16px; border-radius:var(--radius-sm); font-weight:700; font-size:13px; cursor:pointer; color:var(--text-2);}
  .btn-ghost:hover{background:var(--bg-hover);}

  .card{background:var(--glass-card); backdrop-filter:blur(16px) saturate(160%); -webkit-backdrop-filter:blur(16px) saturate(160%); border:1px solid var(--border); border-radius:var(--radius-lg); box-shadow:var(--shadow);}
  .stat-grid{display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-bottom:20px;}
  .stat-card{padding:18px; display:flex; flex-direction:column; gap:8px;}
  .stat-label{font-size:12px; color:var(--text-2); font-weight:600;}
  .stat-value{font-size:22px; font-weight:800;}
  .stat-value.up{color:var(--success);}
  .stat-value.down{color:var(--danger);}
  .stat-note{font-size:11px; color:var(--text-3);}

  /* Empty state */
  .empty{display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; padding:70px 20px; gap:14px;}
  .empty-icon{width:56px; height:56px; border-radius:50%; background:var(--accent-soft); display:flex; align-items:center; justify-content:center;}
  .empty-icon svg{width:26px; height:26px; color:var(--accent-strong);}
  .empty-title{font-weight:700; font-size:15px;}
  .empty-sub{font-size:13px; color:var(--text-3); max-width:340px;}

  /* Dashboard hero */
  .hero{text-align:center; padding:50px 20px 30px;}
  .hero-logo{width:56px; height:56px; margin:0 auto 16px;}
  .hero h1{font-size:24px; font-weight:800; margin-bottom:8px;}
  .hero p{color:var(--text-2); font-size:14px; margin-bottom:22px;}
  .hero-actions{display:flex; justify-content:center; gap:12px; flex-wrap:wrap;}

  /* Journals table */
  .table-toolbar{display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; gap:10px; flex-wrap:wrap;}
  .search-box{display:flex; align-items:center; gap:8px; border:1px solid var(--border); border-radius:var(--radius-sm); padding:9px 12px; background:var(--bg-elevated); min-width:220px;}
  .search-box input{border:none; outline:none; background:transparent; width:100%; font-size:13px;}
  .search-box svg{width:15px; height:15px; color:var(--text-3); flex-shrink:0;}
  table{width:100%; border-collapse:collapse; font-size:13px;}
  thead th{text-align:right; padding:12px 14px; color:var(--text-3); font-weight:600; font-size:11px; border-bottom:1px solid var(--border);}
  tbody td{padding:12px 14px; border-bottom:1px solid var(--border); vertical-align:middle;}
  tbody tr:last-child td{border-bottom:none;}
  tbody tr:hover{background:var(--bg-hover);}
  .tag-dir{display:inline-flex; align-items:center; gap:4px; padding:4px 10px; border-radius:999px; font-size:11px; font-weight:700;}
  .tag-dir.buy{background:var(--success-soft); color:var(--success);}
  .tag-dir.sell{background:var(--danger-soft); color:var(--danger);}
  .pnl.up{color:var(--success); font-weight:700;}
  .pnl.down{color:var(--danger); font-weight:700;}
  .row-del{background:none; border:none; color:var(--text-3); cursor:pointer; padding:6px;}
  .row-del:hover{color:var(--danger);}

  /* Checklist */
  .checklist-list{display:flex; flex-direction:column; gap:8px; padding:16px;}
  .check-item{display:flex; align-items:center; gap:12px; padding:12px 14px; border:1px solid var(--border); border-radius:var(--radius-md);}
  .check-item input[type=checkbox]{width:18px; height:18px; accent-color:var(--accent); cursor:pointer; flex-shrink:0;}
  .check-item span{flex:1; font-size:13.5px; font-weight:500;}
  .check-item.done span{color:var(--text-3); text-decoration:line-through;}
  .add-check-row{display:flex; gap:10px; padding:16px; border-top:1px solid var(--border);}
  .add-check-row input{flex:1; border:1px solid var(--border); border-radius:var(--radius-sm); padding:10px 12px; background:var(--bg);}

  /* Discipline */
  .badge-row{display:flex; gap:14px; margin-bottom:20px; flex-wrap:wrap;}
  .badge-card{flex:1; min-width:190px; padding:18px; display:flex; align-items:center; gap:12px;}
  .badge-icon{width:44px; height:44px; border-radius:12px; background:var(--warn-soft); display:flex; align-items:center; justify-content:center; flex-shrink:0;}
  .badge-icon svg{width:22px; height:22px; color:var(--warn);}
  .week-strip{display:flex; gap:8px; padding:18px;}
  .day-box{flex:1; aspect-ratio:1; border-radius:10px; display:flex; align-items:center; justify-content:center; flex-direction:column; gap:4px; font-size:11px; font-weight:700; color:var(--text-3); background:var(--bg-hover); border:1px solid var(--border);}
  .day-box.filled{background:var(--accent-soft); color:var(--accent-strong); border-color:transparent;}

  /* Backtest */
  .bt-grid{display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-bottom:18px;}

  /* Plans */
  .plan-tabs{display:flex; gap:6px; background:var(--bg-hover); border-radius:999px; padding:5px; width:fit-content; margin:0 auto 28px;}
  .plan-tab{padding:8px 18px; border-radius:999px; border:none; background:transparent; font-weight:700; font-size:13px; cursor:pointer; color:var(--text-2);}
  .plan-tab.active{background:var(--bg-elevated); color:var(--text); box-shadow:var(--shadow);}
  .plans-grid{display:grid; grid-template-columns:repeat(3,1fr); gap:18px;}
  .plan-card{padding:26px 22px; text-align:center; position:relative; display:flex; flex-direction:column; gap:14px;}
  .plan-card.highlight{border-color:var(--accent); box-shadow:0 0 0 2px var(--accent-soft), var(--shadow);}
  .plan-ribbon{position:absolute; top:14px; left:14px; background:var(--accent); color:#fff; font-size:11px; font-weight:700; padding:4px 10px; border-radius:999px;}
  .plan-icon{width:46px; height:46px; border-radius:12px; background:var(--accent-soft); display:flex; align-items:center; justify-content:center; margin:0 auto;}
  .plan-icon svg{width:22px; height:22px; color:var(--accent-strong);}
  .plan-name{font-weight:800; font-size:16px;}
  .plan-price{font-size:26px; font-weight:800;}
  .plan-price small{font-size:12px; font-weight:600; color:var(--text-3);}
  .plan-feats{list-style:none; text-align:right; font-size:12.5px; color:var(--text-2); display:flex; flex-direction:column; gap:8px; padding:0;}
  .plan-feats li{display:flex; align-items:center; gap:8px;}
  .plan-feats svg{width:14px; height:14px; color:var(--success); flex-shrink:0;}

  /* Modal */
  .overlay{position:fixed; inset:0; background:rgba(10,15,20,.5); display:none; align-items:center; justify-content:center; z-index:50; padding:16px;}
  .overlay.open{display:flex;}
  .modal{background:var(--bg-elevated); border-radius:var(--radius-lg); width:100%; max-width:460px; padding:22px; box-shadow:var(--shadow); max-height:90vh; overflow-y:auto;}
  .modal h3{font-size:16px; font-weight:800; margin-bottom:16px;}
  .form-row{display:flex; flex-direction:column; gap:6px; margin-bottom:12px;}
  .form-row label{font-size:12px; font-weight:700; color:var(--text-2);}
  .form-row input, .form-row select, .form-row textarea{border:1px solid var(--border); border-radius:var(--radius-sm); padding:10px 12px; background:var(--bg); width:100%;}
  .form-two{display:grid; grid-template-columns:1fr 1fr; gap:10px;}
  .modal-actions{display:flex; gap:10px; margin-top:16px;}
  .modal-actions button{flex:1; padding:11px; border-radius:var(--radius-sm); font-weight:700; cursor:pointer;}
  .modal-actions .cancel{background:var(--bg-hover); border:none; color:var(--text-2);}
  .modal-actions .save{background:var(--accent); border:none; color:#fff;}

  @media(max-width:900px){
    .stat-grid, .bt-grid{grid-template-columns:repeat(2,1fr);}
    .plans-grid{grid-template-columns:1fr;}
    .sidebar{position:fixed; right:0; top:0; bottom:0; z-index:40; transform:translateX(100%); transition:transform .2s;}
    .sidebar.open{transform:translateX(0);}
    .mobile-menu-btn{display:flex !important;}
  }
  .mobile-menu-btn{display:none;}

  /* ---------- Auth screen ---------- */
  #authScreen{position:fixed; inset:0; z-index:10; display:flex; align-items:center; justify-content:center; padding:20px;}
  .auth-card{width:100%; max-width:380px; background:var(--glass-sidebar); backdrop-filter:blur(20px) saturate(160%); -webkit-backdrop-filter:blur(20px) saturate(160%); border:1px solid var(--border); border-radius:var(--radius-lg); box-shadow:var(--shadow); padding:30px 26px;}
  .auth-logo{display:flex; flex-direction:column; align-items:center; gap:10px; margin-bottom:22px; text-align:center;}
  .auth-logo svg{width:46px; height:46px;}
  .auth-logo b{font-size:17px; font-weight:800;}
  .auth-logo span{font-size:12px; color:var(--text-3);}
  .auth-tabs{display:flex; background:var(--bg-hover); border-radius:999px; padding:4px; margin-bottom:20px;}
  .auth-tab{flex:1; text-align:center; padding:9px; border:none; background:transparent; border-radius:999px; font-weight:700; font-size:13px; color:var(--text-2); cursor:pointer;}
  .auth-tab.active{background:var(--bg-elevated); color:var(--text); box-shadow:var(--shadow);}
  .auth-form{display:none; flex-direction:column; gap:12px;}
  .auth-form.active{display:flex;}
  .auth-form input{border:1px solid var(--border); border-radius:var(--radius-sm); padding:11px 13px; background:var(--bg); width:100%;}
  .auth-error{display:none; background:var(--danger-soft); color:var(--danger); border-radius:var(--radius-sm); padding:9px 12px; font-size:12px;}
  .auth-submit{background:var(--accent); color:#fff; border:none; padding:12px; border-radius:var(--radius-sm); font-weight:700; font-size:13.5px; cursor:pointer; margin-top:4px;}
  .auth-submit:hover{background:var(--accent-strong);}
  .auth-hint{font-size:11.5px; color:var(--text-3); text-align:center; margin-top:14px; line-height:1.8;}
  /* ---------- Black & Gold polish ---------- */
  ::selection{background:var(--gold-2,#8B7CFF); color:#07060F;}
  .brand-logo path, .hero-logo path, .auth-logo svg path{stroke:var(--on-accent);}
  .brand-logo rect, .hero-logo rect, .auth-logo svg rect{fill:url(#goldGrad);}
  .brand-name, .hero h1, .auth-logo b, .view-title{
    background:linear-gradient(120deg,var(--accent-strong),var(--accent) 55%,var(--accent-strong));
    -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; color:transparent;
  }
  .btn-primary, .btn-plans, .auth-submit, .modal-actions .save{
    background:linear-gradient(135deg,#7DD3FC 0%,#8B7CFF 52%,#6D4AE0 100%);
    color:var(--on-accent); box-shadow:0 6px 18px -6px rgba(139,124,255,.65), inset 0 1px 0 rgba(255,255,255,.35);
    transition:transform .15s, box-shadow .15s, filter .15s;
  }
  .btn-primary:hover, .btn-plans:hover, .auth-submit:hover, .modal-actions .save:hover{
    background:linear-gradient(135deg,#A5E3FD 0%,#9C8FFF 52%,#7E5CF0 100%);
    transform:translateY(-1px); box-shadow:0 10px 24px -6px rgba(139,124,255,.8), inset 0 1px 0 rgba(255,255,255,.4);
  }
  .btn-ghost, .icon-btn, .account-select, .search-box{border-color:var(--border);}
  .btn-ghost:hover, .icon-btn:hover{border-color:var(--accent);}
  .card, .auth-card, .modal{border:1px solid var(--border);}
  .card{transition:border-color .2s, transform .2s;}
  .stat-card:hover{border-color:var(--accent); transform:translateY(-2px);}
  .stat-value{font-variant-numeric:tabular-nums; letter-spacing:-.2px;}
  .nav-item{position:relative; transition:background .15s, color .15s;}
  .nav-item.active{background:linear-gradient(90deg,transparent,var(--accent-soft)); color:var(--accent-strong);}
  .nav-item.active::after{content:""; position:absolute; right:-14px; top:20%; bottom:20%; width:3px; border-radius:3px; background:linear-gradient(var(--gold-1,#7DD3FC),var(--gold-2,#8B7CFF));}
  thead th{color:var(--accent); letter-spacing:.2px; border-bottom:1px solid var(--accent);}
  tbody tr{transition:background .15s;}
  .avatar{background:linear-gradient(135deg,#7DD3FC,#6D4AE0); color:var(--on-accent);}
  .plan-ribbon{background:linear-gradient(135deg,#7DD3FC,#7E5CF0); color:var(--on-accent);}
  .plan-tab.active, .auth-tab.active{border:1px solid var(--border);}
  input:focus, textarea:focus, select:focus,
  .form-row input:focus, .form-row select:focus, .form-row textarea:focus, .auth-form input:focus{
    outline:none; border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft);
  }
  .search-box:focus-within{border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft);}
  .empty-icon, .badge-icon{box-shadow:0 0 0 1px var(--border), 0 8px 22px -8px rgba(139,124,255,.45);}
  .overlay{background:rgba(0,0,0,.66); backdrop-filter:blur(4px); -webkit-backdrop-filter:blur(4px);}
  *{scrollbar-width:thin; scrollbar-color:rgba(139,124,255,.45) transparent;}
  ::-webkit-scrollbar{width:8px; height:8px;}
  ::-webkit-scrollbar-thumb{background:rgba(139,124,255,.4); border-radius:8px;}
  ::-webkit-scrollbar-thumb:hover{background:rgba(139,124,255,.65);}
  [data-theme="dark"] body, body[data-theme="dark"]{background-image:radial-gradient(1200px 600px at 85% -10%, rgba(139,124,255,.09), transparent 60%);}

  /* ---------- Midnight Violet details ---------- */
  .brand-name, .hero h1, .auth-logo b, .view-title, .stat-value, .plan-price{font-family:'Lalezar','Noto Sans Arabic',sans-serif; font-weight:400; letter-spacing:.2px;}
  .view-title{font-size:26px;} .hero h1{font-size:32px;} .brand-name{font-size:20px;}
  .stat-card{position:relative; overflow:hidden;}
  .stat-card::before{content:""; position:absolute; inset:0 0 auto 0; height:3px; background:linear-gradient(90deg,#7DD3FC,#8B7CFF,#6D4AE0); opacity:.9;}
  .stat-value{font-size:26px;}
  .nav-item{border-radius:999px;}
  .nav-item.active::after{display:none;}
  .nav-item.active{background:linear-gradient(135deg,var(--accent-soft),transparent); box-shadow:inset 0 0 0 1px var(--border);}
  .btn-primary, .btn-plans, .auth-submit, .modal-actions .save, .btn-ghost{border-radius:999px;}
  .tag-dir{box-shadow:inset 0 0 0 1px currentColor; box-shadow:inset 0 0 0 1px color-mix(in srgb,currentColor 35%,transparent);}
  thead th{text-transform:none; font-size:11.5px; background:var(--accent-soft);}
  thead th:first-child{border-top-right-radius:12px;} thead th:last-child{border-top-left-radius:12px;}
  tbody tr:nth-child(even){background:rgba(139,124,255,.04);}
  .avatar{box-shadow:0 0 0 3px var(--accent-soft);}
  .empty-icon, .badge-icon{border-radius:18px;}
  .card:hover{box-shadow:var(--shadow), 0 0 0 1px var(--accent-soft);}
  .notes-cell{cursor:pointer; min-width:190px; max-width:280px;}
  .notes-preview{color:var(--text-2); font-size:12.5px; line-height:1.8; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; white-space:pre-wrap; word-break:break-word;}
  .notes-add{color:var(--accent); font-size:12px; font-weight:700; padding:5px 11px; border-radius:999px; border:1px dashed var(--border); display:inline-block; transition:background .15s;}
  .notes-cell:hover .notes-add{background:var(--accent-soft);}
  .notes-cell:hover .notes-preview{color:var(--text);}
  .meta-line{display:flex; flex-wrap:wrap; gap:4px; margin-top:5px; max-width:200px; cursor:pointer; align-items:center;}
  .tag-chip{display:inline-block; padding:2px 8px; border-radius:999px; font-size:10.5px; font-weight:700; background:var(--accent-soft); color:var(--accent-strong); white-space:nowrap; direction:ltr; max-width:100%; overflow:hidden; text-overflow:ellipsis;}
  .emo-badge{display:inline-flex; align-items:center; gap:3px; padding:2px 8px; border-radius:999px; font-size:10.5px; font-weight:800; border:1px solid currentColor; white-space:nowrap;}
  .emo-badge.e1,.emo-badge.e2{color:var(--danger); background:var(--danger-soft);}
  .emo-badge.e3{color:var(--warn); background:var(--warn-soft);}
  .emo-badge.e4,.emo-badge.e5{color:var(--success); background:var(--success-soft);}
  .r-badge{display:block; font-size:11px; font-weight:800; direction:ltr; text-align:right; margin-top:2px;}
  .r-badge.up{color:var(--success);} .r-badge.down{color:var(--danger);}
  .meta-add{color:var(--text-3); font-size:10.5px; border:1px dashed var(--border); border-radius:999px; padding:1px 8px; cursor:pointer; display:inline-block; margin-top:5px;}
  .meta-add:hover{background:var(--accent-soft); color:var(--accent);}
  .meta-quick{display:flex; flex-wrap:wrap; gap:6px; margin-top:8px;}
  .meta-quick button{border:1px dashed var(--border); background:transparent; color:var(--accent); border-radius:999px; padding:3px 11px; font-size:12px; font-weight:700; cursor:pointer; font-family:inherit; direction:ltr;}
  .meta-quick button:hover{background:var(--accent-soft);}
  .emo-pick{display:flex; gap:8px;}
  .emo-pick button{flex:1; padding:9px 0; border-radius:var(--radius-sm); border:1px solid var(--border); background:var(--bg); color:var(--text-2); font-weight:800; font-size:15px; cursor:pointer; font-family:inherit;}
  .emo-pick button small{display:block; font-size:9.5px; font-weight:600; color:var(--text-3);}
  .emo-pick button.on{background:var(--accent); color:var(--on-accent); border-color:var(--accent);}
  .emo-pick button.on small{color:var(--on-accent);}
  .meta-stat-grid{display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:16px;}
  .meta-table{width:100%; border-collapse:collapse; font-size:12.5px;}
  .meta-table th{background:none; font-size:11px; padding:6px 6px; border-bottom:1px solid var(--border);}
  .meta-table td{padding:7px 6px; border-bottom:1px dashed var(--border); text-align:right; font-variant-numeric:tabular-nums;}
  .meta-table tbody tr:nth-child(even){background:none;}
  .meta-table td.n{direction:ltr; text-align:left;}
  @media(max-width:600px){ .meta-stat-grid{grid-template-columns:1fr 1fr;} .meta-line{max-width:150px;} }
  /* ---------- Stats page ---------- */
  .stats-toolbar{display:flex; justify-content:flex-start; margin-bottom:16px;}
  .seg{display:inline-flex; gap:4px; background:var(--bg-hover); border:1px solid var(--border); border-radius:999px; padding:4px;}
  .seg-btn{border:none; background:transparent; padding:7px 16px; border-radius:999px; font-weight:700; font-size:12.5px; color:var(--text-2); cursor:pointer;}
  .seg-btn.active{background:linear-gradient(135deg,#7DD3FC,#8B7CFF 55%,#6D4AE0); color:var(--on-accent);}
  .stats-kpis{grid-template-columns:repeat(4,1fr);}
  .stats-kpis .stat-value{font-size:22px;}
  .chart-card{padding:18px 20px; margin-bottom:16px;}
  .chart-title{font-weight:800; font-size:14px; margin-bottom:12px; color:var(--text);}
  .chart-title small{font-weight:500; color:var(--text-3); font-size:11.5px; margin-right:8px;}
  .stats-two{display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-bottom:16px;}
  .stats-two .chart-card{margin-bottom:0;}
  .hbar-row{display:grid; grid-template-columns:96px 1fr 84px; align-items:center; gap:10px; padding:7px 0;}
  .hbar-label{font-weight:700; font-size:13px; direction:ltr; text-align:right;}
  .hbar-label small{display:block; font-weight:500; color:var(--text-3); font-size:10.5px; direction:rtl;}
  .hbar-track{position:relative; height:14px; background:var(--bg-hover); border-radius:999px; direction:ltr; overflow:hidden;}
  .hbar-fill{position:absolute; top:0; bottom:0; border-radius:999px;}
  .hbar-zero{position:absolute; top:0; bottom:0; width:1px; background:var(--text-3); z-index:1;}
  .hbar-val{font-size:12.5px; text-align:left; direction:ltr; font-variant-numeric:tabular-nums;}
  .tips .tip{font-size:13px; padding:7px 0; color:var(--text-2); line-height:1.8; border-top:1px dashed var(--border);}
  .tips .tip:first-of-type{border-top:none;}
  .tips .tip b{color:var(--text);}
  .cal-head-row{display:flex; align-items:center; justify-content:space-between; margin-bottom:10px;}
  .cal-title{font-weight:800; font-size:14px; text-align:center;}
  .cal-title small{display:block; font-size:11.5px; font-weight:700; margin-top:2px;}
  .cal-grid{display:grid; grid-template-columns:repeat(7,1fr); gap:5px;}
  .cal-head{text-align:center; font-size:11px; font-weight:700; color:var(--text-3); padding-bottom:2px;}
  .cal-cell{min-height:52px; border-radius:10px; background:var(--bg-hover); padding:5px 6px; display:flex; flex-direction:column; justify-content:space-between; font-size:10.5px; border:1px solid transparent;}
  .cal-cell.empty{background:transparent;}
  .cal-cell.has{border-color:var(--border);}
  .cal-day{color:var(--text-3); font-weight:700; font-size:10.5px;}
  .cal-pnl{font-weight:800; font-size:11.5px; direction:ltr; text-align:center; color:var(--text);}
  .cal-cnt{color:var(--text-2); font-size:9.5px; text-align:center;}
  @media(max-width:900px){ .stats-kpis{grid-template-columns:repeat(2,1fr);} .stats-two{grid-template-columns:1fr;} .hbar-row{grid-template-columns:80px 1fr 70px;} }
  .account-wrap{display:flex; align-items:center; gap:8px;}
  select.account-select{appearance:none; -webkit-appearance:none; padding:8px 14px; max-width:220px; color:var(--text); background:var(--bg-elevated); font-family:inherit;}
  select.account-select option{background:var(--bg-elevated); color:var(--text);}
  .acc-row{display:grid; grid-template-columns:1.1fr 1.4fr 96px 34px; gap:10px; align-items:center; padding:10px 0; border-top:1px solid var(--border);}
  .acc-row:first-child{border-top:none;}
  .acc-meta b{display:block; font-size:13.5px; direction:ltr; text-align:right;}
  .acc-meta small{color:var(--text-3); font-size:11px;}
  .acc-row input, .acc-row select{border:1px solid var(--border); border-radius:var(--radius-sm); padding:9px 11px; background:var(--bg); width:100%;}
  .acc-chip{display:inline-block; padding:3px 10px; border-radius:999px; font-size:11px; font-weight:700; background:var(--accent-soft); color:var(--accent-strong); white-space:nowrap;}
  @media(max-width:700px){ .acc-row{grid-template-columns:1fr;} }
  .acc-add{border:1px dashed var(--border); border-radius:var(--radius-md); padding:14px; margin-bottom:14px; background:var(--accent-soft);}
  .acc-add-title{font-weight:800; font-size:13px; margin-bottom:10px;}
  .acc-add-grid{display:grid; grid-template-columns:1.4fr 100px 1fr; gap:8px; margin-bottom:10px;}
  .acc-add-grid input, .acc-add-grid select{border:1px solid var(--border); border-radius:var(--radius-sm); padding:9px 11px; background:var(--bg); width:100%;}
  .acc-add small{display:block; color:var(--text-3); font-size:11px; margin-top:8px; line-height:1.7;}
  .acc-del{background:none; border:none; color:var(--text-3); cursor:pointer; padding:6px; font-size:15px;}
  .acc-del:hover{color:var(--danger);}
  @media(max-width:600px){ .acc-add-grid{grid-template-columns:1fr;} .acc-row{grid-template-columns:1fr 1fr 34px;} .acc-row .acc-meta{grid-column:1 / -1;} }
  /* ---- تایم خبر ---- */
  .nw-bar{display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-bottom:12px;}
  .nw-chip{background:var(--bg-elevated); border:1px solid var(--border); color:var(--text-2); padding:7px 13px; border-radius:999px; font-size:12px; font-weight:700; cursor:pointer; font-family:inherit;}
  .nw-chip:hover{border-color:var(--accent);}
  .nw-chip.on{background:var(--accent); color:var(--on-accent); border-color:var(--accent);}
  .nw-sep{width:1px; height:22px; background:var(--border); margin:0 4px;}
  .nw-next{padding:14px 18px; display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:14px;}
  .nw-next b{font-size:14px;} .nw-next .cd{font-family:'Vazirmatn',monospace; font-size:20px; font-weight:800; color:var(--accent); direction:ltr;}
  .nw-bias{display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:10px; margin-bottom:16px;}
  .nw-bias .b{padding:12px 14px; border-radius:var(--radius-md); border:1px solid var(--border); background:var(--glass-card); font-size:12px; line-height:1.8;}
  .nw-bias .b b{font-size:14px;}
  .nw-up{color:var(--success);} .nw-dn{color:var(--danger);} .nw-nu{color:var(--text-3);}
  .nw-day{font-weight:800; font-size:14px; margin:18px 4px 8px; color:var(--text-2);}
  .nw-ev{padding:0; margin-bottom:8px; overflow:hidden;}
  .nw-head{display:grid; grid-template-columns:58px 52px 1fr auto; gap:10px; align-items:center; padding:12px 14px; cursor:pointer;}
  .nw-time{font-family:'Vazirmatn',sans-serif; font-weight:700; font-size:13px; direction:ltr; text-align:center;}
  .nw-ccy{font-weight:800; font-size:12px; display:flex; align-items:center; gap:6px; direction:ltr;}
  .nw-dot{width:9px; height:9px; border-radius:50%; flex-shrink:0;}
  .nw-dot.H{background:var(--danger);} .nw-dot.M{background:var(--warn);} .nw-dot.L{background:var(--text-3);}
  .nw-title{font-size:13px; font-weight:700; line-height:1.6;}
  .nw-nums{font-size:11.5px; color:var(--text-3); margin-top:2px; direction:ltr; text-align:right;}
  .nw-verdict{font-size:12px; font-weight:800; padding:5px 11px; border-radius:999px; white-space:nowrap;}
  .nw-verdict.up{background:var(--success-soft); color:var(--success);}
  .nw-verdict.dn{background:var(--danger-soft); color:var(--danger);}
  .nw-verdict.nu{background:var(--bg-hover); color:var(--text-3);}
  .nw-body{display:none; padding:2px 16px 14px; border-top:1px dashed var(--border); font-size:12.5px; line-height:2;}
  .nw-ev.open .nw-body{display:block;}
  .nw-body .row{display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin:10px 0 4px;}
  .nw-in{width:110px; padding:7px 10px; border-radius:var(--radius-sm); border:1px solid var(--border); background:var(--bg-elevated); color:var(--text); font-family:inherit; font-size:12px; direction:ltr; text-align:center;}
  .nw-note{font-size:11.5px; color:var(--text-3); margin-top:18px; line-height:1.9;}
  @media(max-width:640px){ .nw-head{grid-template-columns:50px 44px 1fr; } .nw-verdict{grid-column:1 / -1; justify-self:start;} }
  .wk-grid{margin:10px 0 8px; grid-template-columns:repeat(4,1fr);}
  @media(max-width:720px){ .wk-grid{grid-template-columns:repeat(2,1fr);} }
