/* ═══════════════════════════════════════════════
   APP (SIDEBAR + MAIN)
   ═══════════════════════════════════════════════ */

/* Sidebar */
.app-sidebar{width:240px;background:var(--sidebar-bg);padding:1.3rem;display:flex;flex-direction:column;position:fixed;top:0;bottom:0;left:0;z-index:50;transition:transform .3s}
.app-sidebar .brand{font-size:1.2rem;color:#fff;margin-bottom:.35rem;padding-left:.3rem}
.app-sub{font-size:.65rem;color:rgba(255,255,255,.3);padding-left:.3rem;margin-bottom:1.8rem;letter-spacing:.5px;text-transform:uppercase}

.app-nav{list-style:none;flex:1}
.app-nav li{margin-bottom:2px}
.app-nav a{display:flex;align-items:center;gap:.7rem;text-decoration:none;color:rgba(255,255,255,.45);padding:.6rem .75rem;border-radius:var(--radius-sm);font-size:.83rem;font-weight:500;transition:all var(--tr)}
.app-nav a:hover{color:rgba(255,255,255,.8);background:rgba(255,255,255,.06)}
.app-nav a.active{color:#fff;background:rgba(39,174,96,.15);font-weight:600}
.app-nav .ni{font-size:1rem;width:20px;text-align:center}
.app-nav-sec{font-size:.62rem;font-weight:600;text-transform:uppercase;letter-spacing:1.5px;color:rgba(255,255,255,.18);padding:.8rem .75rem .3rem;margin-top:.3rem}

.app-plan{
  position:relative;overflow:hidden;
  background:linear-gradient(135deg,rgba(27,140,90,.22) 0%,rgba(27,140,90,.07) 100%);
  border:1px solid rgba(27,140,90,.28);
  border-radius:11px;padding:.9rem;margin-top:auto;
  animation:sidebarGlow 3.8s ease-in-out infinite;
  animation-delay:2s;
}
@keyframes sidebarGlow{
  0%,100%{box-shadow:none}
  50%{box-shadow:0 0 16px 2px rgba(27,140,90,.15)}
}
/* shimmer diagonal */
.app-plan::before{
  content:'';position:absolute;top:0;left:0;bottom:0;width:50%;
  background:linear-gradient(90deg,transparent 0%,rgba(255,255,255,.055) 50%,transparent 100%);
  transform:translateX(-100%) skewX(-12deg);
  pointer-events:none;
  animation:shimmerSlide 4s ease-in-out infinite;
  animation-delay:2.5s;
}
.app-plan p{color:rgba(255,255,255,.45);font-size:.7rem;margin-bottom:.15rem;position:relative;z-index:1}
.app-plan strong{
  display:flex;align-items:center;gap:.4rem;
  color:#fff;font-size:.82rem;position:relative;z-index:1;
}
/* dot vivo ao lado do label do plano */
.app-plan strong::before{
  content:'';display:inline-block;
  width:6px;height:6px;border-radius:50%;flex-shrink:0;
  background:#4ade80;box-shadow:0 0 5px rgba(74,222,128,.7);
  animation:dotPulseBanner 1.8s ease-in-out infinite;
}
/* quando plano é gratuito/não-trial, esconde o dot */
.app-plan.plan-free strong::before{display:none}
.app-plan-up{
  position:relative;overflow:hidden;
  display:flex;align-items:center;justify-content:center;gap:.35rem;
  margin-top:.55rem;
  background:linear-gradient(135deg,#c4720a 0%,#e8993e 60%,#f5b668 100%);
  color:#fff;text-align:center;
  padding:.42rem;border-radius:8px;
  font-size:.75rem;font-weight:700;text-decoration:none;
  box-shadow:0 2px 10px rgba(232,153,62,.3);
  transition:transform .15s ease,box-shadow .15s ease,filter .15s ease;
  z-index:1;
}
/* shimmer no botão */
.app-plan-up::before{
  content:'';position:absolute;top:0;left:-60%;bottom:0;width:40%;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.28),transparent);
  transform:skewX(-15deg);
  animation:shimmerSlide 2.6s ease-in-out infinite;
  animation-delay:.8s;
}
.app-plan-up:hover{transform:translateY(-1px);box-shadow:0 4px 16px rgba(232,153,62,.45);filter:brightness(1.08)}
.app-plan-up:active{transform:translateY(0);box-shadow:0 1px 6px rgba(232,153,62,.25)}

.app-main{margin-left:240px;flex:1;padding:1.4rem 1.8rem;min-height:100vh}

/* Page containers */
.page{display:none}
.page.active{display:block}

/* Greeting bar */
.greeting-bar{display:flex;justify-content:space-between;align-items:center;margin-bottom:1.1rem;padding:.1rem 0}
.g-name{font-size:1.2rem;font-weight:800;color:var(--text)}
.g-sub{font-size:.72rem;color:var(--text-muted);margin-top:.15rem}
.g-right{display:flex;align-items:center;gap:.45rem}
.g-icon-btn{width:36px;height:36px;border-radius:10px;border:1.5px solid var(--border);background:#fff;display:flex;align-items:center;justify-content:center;color:var(--text-muted);cursor:pointer;box-shadow:0 1px 3px rgba(0,0,0,.06);position:relative;padding:0;transition:border-color .15s,color .15s}
.g-icon-btn:hover{border-color:var(--primary);color:var(--primary)}
.g-icon-btn .notif-badge{position:absolute;top:5px;right:5px}
.g-new-btn{height:36px;padding:0 .85rem;font-size:.78rem;border-radius:10px;white-space:nowrap}
.desktop-only{display:flex}
/* Date selector panel — dropdown */
.date-panel-wrap{position:relative}
.date-panel{display:none;position:fixed;z-index:200;background:#fff;border:1.5px solid var(--border);border-radius:14px;padding:.85rem 1rem;box-shadow:0 8px 24px rgba(0,0,0,.12);width:260px}
.date-panel.open{display:block;animation:dpFadeIn .15s ease}
.date-panel-title{font-size:.7rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--text-muted);margin-bottom:.65rem}
.date-panel-row{display:flex;flex-direction:column;gap:.5rem}
.date-panel-label{font-size:.72rem;font-weight:600;color:var(--text-muted);margin-bottom:.15rem}
.date-panel-sel{width:100%;border:1.5px solid var(--border);border-radius:9px;padding:.45rem .65rem;font-family:inherit;font-size:.85rem;font-weight:600;color:var(--text);background:#fff;cursor:pointer;outline:none;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right .6rem center;padding-right:1.8rem}
.date-panel-sel:focus{border-color:var(--primary)}
.date-panel-close{display:none}
@keyframes dpFadeIn{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:translateY(0)}}
.app-avatar{width:34px;height:34px;border-radius:50%;background:var(--primary);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:.78rem;cursor:pointer}

/* Limit bar */
.limit-card{margin-bottom:1.1rem}
.limit-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:.7rem}
.limit-head h3{font-size:.88rem;font-weight:700;display:flex;align-items:center;gap:.35rem}
.limit-badge{font-size:.7rem;font-weight:600;padding:.18rem .55rem;border-radius:50px}
.limit-badge.safe{background:var(--primary-light);color:var(--primary)}
.limit-badge.warn{background:var(--accent-light);color:#B07520}
.limit-badge.danger{background:var(--danger-light);color:var(--danger)}
.limit-track{height:11px;background:var(--border-light);border-radius:10px;overflow:hidden}
.limit-fill{height:100%;border-radius:10px;transition:width .9s cubic-bezier(.4,0,.2,1),background .4s ease;background:linear-gradient(90deg,#27ae60,var(--primary))}
.limit-fill.warn{background:linear-gradient(90deg,#f0a830,#d48f20)}
.limit-fill.danger{background:linear-gradient(90deg,var(--danger),#b53a2e)}
.limit-marks{display:flex;justify-content:space-between;margin-top:.35rem}
.limit-marks span{font-size:.65rem;color:var(--text-muted)}
.limit-info{display:flex;gap:1.8rem;margin-top:.7rem;flex-wrap:wrap}
.limit-it{font-size:.72rem;color:var(--text-muted)}
.limit-it strong{color:var(--text);font-size:.9rem;display:block;margin-top:.08rem}

/* Footer do limit-card: banner inline + link */
.limit-card-footer{display:flex;align-items:center;justify-content:flex-end;gap:.6rem;margin-top:.7rem;flex-wrap:wrap}
.limit-card-footer .limit-projection{margin:0;flex:1}

/* Link "Analisar projeção completa →" */
.proj-link{
  background:none;border:none;padding:0;
  font-family:inherit;font-size:.78rem;font-weight:600;
  color:var(--primary);cursor:pointer;
  white-space:nowrap;
  transition:opacity .15s;
  text-decoration:none;
}
.proj-link:hover{opacity:.7}

/* ══ Modal de projeção — PREMIUM ══════════════════ */
.proj-modal-ov{
  display:none;
  position:fixed;inset:0;z-index:120;
  background:rgba(10,18,12,.5);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  align-items:center;justify-content:center;
  padding:1rem;
  overflow-y:auto;
}
.proj-modal-ov.active{display:flex}

.proj-modal{
  background:var(--card);
  border-radius:20px;
  width:100%;max-width:560px;
  box-shadow:0 32px 80px rgba(0,0,0,.22),0 4px 20px rgba(0,0,0,.1);
  animation:projModalIn .28s cubic-bezier(.34,1.2,.64,1);
  overflow:hidden;
  margin:auto;
}
@keyframes projModalIn{
  from{opacity:0;transform:translateY(16px) scale(.96)}
  to  {opacity:1;transform:translateY(0)   scale(1)}
}

/* ── Header ──────────────────────────────────────── */
.pm-head{
  display:flex;align-items:flex-start;justify-content:space-between;
  gap:.8rem;padding:1.5rem 1.5rem 0;
}
.pm-head-left{ display:flex;flex-direction:column;gap:.35rem; }
.pm-status-badge{
  display:inline-flex;align-items:center;gap:.35rem;
  font-size:.68rem;font-weight:700;letter-spacing:.04em;
  padding:.3rem .75rem;border-radius:50px;
  border:1px solid transparent;
  width:fit-content;
}
.pm-title{
  font-size:1.15rem;font-weight:800;color:var(--text);
  letter-spacing:-.02em;line-height:1.2;
}
.pm-year{ font-size:.8rem;font-weight:600;color:var(--text-muted); }
.pm-close{
  background:none;border:none;
  font-size:.9rem;color:var(--text-muted);cursor:pointer;
  padding:.35rem .45rem;border-radius:8px;line-height:1;
  transition:background .15s,color .15s;flex-shrink:0;margin-top:.1rem;
}
.pm-close:hover{background:var(--border-light);color:var(--text)}

/* ── Gauge (barra de limite) ─────────────────────── */
.pm-gauge-wrap{ padding:1.25rem 1.5rem 0; }
.pm-gauge-track{
  position:relative;height:12px;
  background:var(--border-light);border-radius:99px;overflow:visible;
}
.pm-gauge-fill{
  position:absolute;left:0;top:0;bottom:0;border-radius:99px;
  transition:width .7s cubic-bezier(.4,0,.2,1);
}
.pm-gauge-fill--safe  { background:linear-gradient(90deg,var(--primary-dark),var(--primary)); }
.pm-gauge-fill--warn  { background:linear-gradient(90deg,#c97b2a,var(--accent)); }
.pm-gauge-fill--danger{ background:linear-gradient(90deg,#b83226,var(--danger)); }
.pm-gauge-mark{
  position:absolute;top:-3px;bottom:-3px;width:2px;
  background:var(--text-muted);opacity:.4;border-radius:1px;
  display:flex;flex-direction:column;align-items:center;
}
.pm-gauge-mark span{
  position:absolute;top:-18px;
  font-size:.58rem;font-weight:700;color:var(--text-muted);white-space:nowrap;
  transform:translateX(-50%);
}
.pm-gauge-mark--warn{ background:var(--danger);opacity:.5; }
.pm-gauge-mark--warn span{ color:var(--danger); }
.pm-gauge-labels{
  display:flex;justify-content:space-between;align-items:center;
  margin-top:.55rem;
}
.pm-gauge-labels>span{ font-size:.7rem;font-weight:600;color:var(--text-muted); }
.pm-gauge-pct{ font-size:.78rem;font-weight:800; }
.pm-gauge-pct--safe  { color:var(--primary); }
.pm-gauge-pct--warn  { color:var(--accent); }
.pm-gauge-pct--danger{ color:var(--danger); }

/* ── Metrics grid ────────────────────────────────── */
.pm-metrics{
  display:grid;grid-template-columns:repeat(3,1fr);
  gap:.5rem;padding:1.25rem 1.5rem;
}
.pm-metric{
  background:var(--bg);border:1px solid var(--border-light);
  border-radius:var(--radius-sm);padding:.8rem .9rem;
}
.pm-metric-val{ font-size:.95rem;font-weight:800;color:var(--text);letter-spacing:-.01em; }
.pm-metric-label{ font-size:.68rem;font-weight:700;color:var(--text-sec);margin:.15rem 0 .1rem; }
.pm-metric-sub{ font-size:.62rem;color:var(--text-muted); }

/* ── Section ──────────────────────────────────────── */
.pm-section{
  padding:.1rem 1.5rem 1.25rem;
  border-top:1px solid var(--border-light);
}
.pm-section-title{
  font-size:.72rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;
  color:var(--text-muted);margin:.9rem 0 .75rem;
}

/* ── Timeline (bar chart meses) ──────────────────── */
.pm-timeline{
  display:flex;align-items:flex-end;gap:.3rem;height:52px;
  margin-bottom:.5rem;
}
.pm-tl-item{
  flex:1;display:flex;flex-direction:column;align-items:center;gap:.25rem;
  min-width:0;
}
.pm-tl-bar-wrap{
  flex:1;width:100%;display:flex;align-items:flex-end;
}
.pm-tl-bar{
  width:100%;min-height:3px;border-radius:3px 3px 0 0;
  background:var(--border);
  transition:height .4s ease;
}
.pm-tl-item--cur .pm-tl-bar{ background:var(--primary); }
.pm-tl-label{ font-size:.58rem;font-weight:600;color:var(--text-muted);white-space:nowrap; }
.pm-tl-item--cur .pm-tl-label{ color:var(--primary);font-weight:800; }
.pm-growth{
  display:inline-flex;align-items:center;gap:.25rem;
  font-size:.7rem;font-weight:700;padding:.2rem .6rem;border-radius:50px;
}
.pm-growth--up{ background:var(--primary-light);color:var(--primary-dark); }
.pm-growth--dn{ background:var(--danger-light);color:var(--danger); }

/* ── Tips ────────────────────────────────────────── */
.pm-tips{
  list-style:none;display:flex;flex-direction:column;gap:.45rem;
}
.pm-tip{
  display:flex;align-items:flex-start;gap:.6rem;
  font-size:.8rem;color:var(--text-sec);line-height:1.5;
}
.pm-tip::before{
  content:'→';font-weight:800;color:var(--primary);flex-shrink:0;margin-top:.05rem;
  font-size:.75rem;
}

/* ── Upsell ──────────────────────────────────────── */
.pm-upsell{
  margin:0 1.5rem 1.5rem;
  display:flex;align-items:center;gap:1rem;
  background:linear-gradient(135deg,#111916,#1e3025);
  border-radius:var(--radius-sm);padding:1rem 1.1rem;
}
.pm-upsell-left{ flex:1;min-width:0; }
.pm-upsell-title{ font-size:.82rem;font-weight:700;color:#fff;margin-bottom:.2rem; }
.pm-upsell-desc{ font-size:.72rem;color:rgba(255,255,255,.6);line-height:1.4; }
.pm-upsell-btn{
  flex-shrink:0;background:var(--accent);color:#111916;
  border:none;border-radius:8px;padding:.5rem .95rem;
  font-family:inherit;font-size:.78rem;font-weight:800;
  cursor:pointer;white-space:nowrap;
  transition:background .15s,transform .1s;
}
.pm-upsell-btn:hover{ background:#d48822; }
.pm-upsell-btn:active{ transform:scale(.97); }

/* ── Responsive ─────────────────────────────────── */
@media(max-width:600px){
  .proj-modal-ov{ padding:.5rem; }
  .proj-modal{ border-radius:16px; max-height:92vh; overflow-y:auto; }
  .pm-head{ padding:1.1rem 1.1rem 0; }
  .pm-gauge-wrap{ padding:1rem 1.1rem 0; }
  .pm-metrics{ grid-template-columns:repeat(2,1fr); padding:1rem 1.1rem; gap:.4rem; }
  .pm-metric{ padding:.65rem .75rem; }
  .pm-metric-val{ font-size:.88rem; }
  .pm-section{ padding:.1rem 1.1rem 1rem; }
  .pm-upsell{ margin:0 1.1rem 1.1rem; flex-direction:column; gap:.65rem; }
  .pm-upsell-btn{ width:100%; text-align:center; padding:.55rem; }
  .pm-title{ font-size:1rem; }
}

/* Stats — hero + mini row */
.stat-hero{
  background:linear-gradient(135deg,#126942 0%,#1B8C5A 100%);
  border-radius:var(--radius);border:none;
  padding:1.15rem 1.25rem;margin-bottom:.75rem;
  box-shadow:0 4px 20px rgba(27,140,90,.28);
  position:relative;overflow:hidden;
}
.stat-hero::before{content:'';position:absolute;top:-30px;right:-20px;width:100px;height:100px;border-radius:50%;background:rgba(255,255,255,.07)}
.stat-hero::after{content:'';position:absolute;bottom:-20px;right:30px;width:60px;height:60px;border-radius:50%;background:rgba(255,255,255,.05)}
.sh-label{font-size:.75rem;font-weight:500;color:rgba(255,255,255,.7);margin-bottom:.3rem}
.sh-val{font-size:2rem;font-weight:800;color:#fff;letter-spacing:-.02em;line-height:1.1;margin-bottom:.2rem}
.sh-chg{font-size:.75rem;color:rgba(255,255,255,.65);display:flex;align-items:center;gap:.3rem}
.sh-chg.up{color:#a7f3d0}.sh-chg.dn{color:#fca5a5}

.stats-mini-row{display:grid;grid-template-columns:repeat(3,1fr);gap:.75rem;margin-bottom:1.1rem}
.stat-mini-card{padding:.8rem .75rem}
.sm-icon{width:28px;height:28px;border-radius:8px;display:flex;align-items:center;justify-content:center;margin-bottom:.45rem}
.sm-icon.sm-r{background:var(--danger-light);color:var(--danger)}
.sm-icon.sm-r svg{stroke:var(--danger)}
.sm-icon.sm-b{background:#EFF6FF;color:#3B82F6}
.sm-icon.sm-b svg{stroke:#3B82F6}
.sm-icon.sm-p{background:#F3F0FF;color:#7C3AED}
.sm-icon.sm-p svg{stroke:#7C3AED}
.sm-label{font-size:.67rem;color:var(--text-muted);font-weight:500;margin-bottom:.18rem}
.sm-val{font-size:.95rem;font-weight:800;color:var(--text)}
.sm-val.sm-danger{color:var(--danger)}
.sm-val.sm-purple{color:#7C3AED}
.sm-chg{font-size:.62rem;font-weight:600;margin-top:.1rem}
.sm-chg.up{color:var(--primary)}.sm-chg.dn{color:var(--danger)}

/* Bottom grid */
.bot-grid{display:grid;grid-template-columns:1.3fr 1fr;gap:1.1rem}
.right-col{display:flex;flex-direction:column;gap:1.1rem}

/* Transaction list */
.tx-list{list-style:none}
.tx-item{display:flex;align-items:center;padding:.6rem 0;border-bottom:1px solid var(--border-light);gap:.6rem;transition:background .15s}
.tx-item:last-child{border-bottom:none}
.tx-item:hover{background:rgba(0,0,0,.01);border-radius:8px;margin:0 -.3rem;padding-left:.9rem;padding-right:.9rem}
.tx-ico{width:34px;height:34px;border-radius:var(--radius-sm);display:flex;align-items:center;justify-content:center;font-size:.85rem;flex-shrink:0}
.tx-ico.inc{background:var(--primary-light)}.tx-ico.exp{background:var(--danger-light)}
.tx-info{flex:1}.tx-name{font-size:.82rem;font-weight:600}.tx-cat{font-size:.68rem;color:var(--text-muted);margin-top:.05rem}
.tx-right{text-align:right}
.tx-val{font-size:.85rem;font-weight:700;min-width:80px}.tx-val.inc{color:var(--primary)}.tx-val.exp{color:var(--danger)}
.tx-date{font-size:.68rem;color:var(--text-muted)}
.tx-acts{display:flex;gap:.2rem;opacity:0;transition:opacity .2s}
.tx-item:hover .tx-acts{opacity:1}
.tx-ab{width:26px;height:26px;border-radius:6px;border:none;background:var(--bg);cursor:pointer;font-size:.72rem;display:flex;align-items:center;justify-content:center;transition:background .15s}
.tx-ab:hover{background:var(--danger-light)}

/* Chart */
.ch-bars{display:flex;align-items:flex-end;justify-content:space-around;height:140px;padding:0 .2rem}
.ch-col{display:flex;flex-direction:column;align-items:center;flex:1;height:100%;justify-content:flex-end}
.ch-pair{display:flex;gap:3px;align-items:flex-end}
.ch-bar{width:15px;border-radius:4px 4px 0 0;transition:height .5s ease-out;cursor:pointer}
.ch-bar.inc{background:var(--primary)}.ch-bar.exp{background:var(--danger);opacity:.5}
.ch-bar:hover{opacity:1!important}
.ch-lbl{font-size:.62rem;color:var(--text-muted);margin-top:.3rem;font-weight:500}
.ch-legend{display:flex;gap:1rem;margin-top:.7rem}
.ch-leg-i{display:flex;align-items:center;gap:.3rem;font-size:.68rem;color:var(--text-muted)}
.ch-dot{width:7px;height:7px;border-radius:50%}.ch-dot.inc{background:var(--primary)}.ch-dot.exp{background:var(--danger);opacity:.5}

/* Category list */
.cat-list{list-style:none}
.cat-item{display:flex;align-items:center;gap:.6rem;padding:.5rem 0;border-bottom:1px solid var(--border-light)}
.cat-item:last-child{border-bottom:none}
.cat-dot{width:7px;height:7px;border-radius:50%;flex-shrink:0}
.cat-nm{flex:1;font-size:.8rem;font-weight:500}
.cat-tk{width:50px;height:5px;background:var(--border-light);border-radius:3px;overflow:hidden}
.cat-fl{height:100%;border-radius:3px}
.cat-vl{font-size:.8rem;font-weight:700;min-width:60px;text-align:right}

/* Mobile */
.app-mob{display:none;position:fixed;top:0;left:0;right:0;background:var(--sidebar-bg);padding:.8rem 1.1rem;z-index:60;justify-content:space-between;align-items:center}
.app-mob .brand{color:#fff;font-size:1.1rem}
.app-mob-r{display:flex;align-items:center;gap:.5rem}
.app-hamb{background:none;border:none;color:#fff;font-size:1.3rem;cursor:pointer}

/* ─── Sino de notificações ─────────────────── */
.notif-bell{
  position:relative;background:none;border:none;color:#fff;
  font-size:1.2rem;cursor:pointer;padding:.2rem .3rem;line-height:1;
}
.notif-bell-desk{
  color:var(--text-muted);font-size:1.1rem;
  background:var(--bg);border:1px solid var(--border);
  border-radius:var(--radius-sm);padding:.38rem .5rem;
  display:flex;align-items:center;
}
.notif-bell-desk:hover{background:var(--border-light)}
@media(max-width:900px){.notif-bell-desk{display:none!important}}
.notif-badge{
  position:absolute;top:0;right:0;
  min-width:16px;height:16px;
  background:var(--danger);color:#fff;
  font-size:.58rem;font-weight:700;
  border-radius:99px;padding:0 4px;
  display:flex;align-items:center;justify-content:center;
  border:2px solid var(--sidebar-bg);
  line-height:1;
}

/* ─── Painel de Notificações ───────────────── */
.notif-backdrop{
  display:none;position:fixed;inset:0;z-index:200;
  background:rgba(0,0,0,.35);
  backdrop-filter:blur(4px);
  -webkit-backdrop-filter:blur(4px);
}
.notif-backdrop.open{display:block}

.notif-panel{
  position:fixed;top:0;right:0;bottom:0;
  width:320px;max-width:100vw;
  background:#fff;
  box-shadow:-4px 0 24px rgba(0,0,0,.12);
  z-index:210;
  display:flex;flex-direction:column;
  transform:translateX(100%);
  transition:transform .28s cubic-bezier(.4,0,.2,1);
}
.notif-panel.open{transform:translateX(0)}

.notif-panel-head{
  display:flex;align-items:center;justify-content:space-between;
  padding:.9rem 1rem .8rem;
  border-bottom:1px solid var(--border-light);
  background:var(--sidebar-bg);
}
.notif-panel-title{
  font-size:.88rem;font-weight:700;color:#fff;
}
.notif-mark-all{
  background:none;border:none;
  font-size:.7rem;font-weight:600;
  color:rgba(255,255,255,.5);cursor:pointer;
  padding:.2rem .4rem;border-radius:6px;
  transition:color .15s;
}
.notif-mark-all:hover{color:#fff}

.notif-list{
  flex:1;overflow-y:auto;padding:.5rem 0;
}
.notif-empty{
  text-align:center;padding:3rem 1rem;
  font-size:.82rem;color:var(--text-muted);
}

.notif-item{
  display:flex;gap:.75rem;
  padding:.75rem 1rem;
  border-bottom:1px solid var(--border-light);
  cursor:pointer;
  transition:background .15s;
  position:relative;
}
.notif-item:last-child{border-bottom:none}
.notif-item:hover{background:var(--bg)}
.notif-item.unread{background:#f8fffe}
.notif-item.unread::before{
  content:'';position:absolute;left:0;top:0;bottom:0;
  width:3px;border-radius:0 2px 2px 0;
}
.notif-item.unread.notif-red::before{background:var(--danger)}
.notif-item.unread.notif-yellow::before{background:var(--accent)}
.notif-item.unread.notif-green::before{background:var(--primary)}
.notif-item.unread.notif-blue::before{background:#3B82F6}

.notif-icon{
  width:34px;height:34px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  font-size:1rem;flex-shrink:0;margin-top:.1rem;
}
.notif-red   .notif-icon{background:#fef2f2}
.notif-yellow .notif-icon{background:var(--accent-light)}
.notif-green .notif-icon{background:var(--primary-light)}
.notif-blue  .notif-icon{background:#EFF6FF}

.notif-body{flex:1;min-width:0}
.notif-body-title{
  font-size:.8rem;font-weight:700;
  color:var(--text);margin-bottom:.15rem;
  line-height:1.3;
}
.notif-body-desc{
  font-size:.72rem;color:var(--text-muted);
  line-height:1.4;
}
.notif-time{
  font-size:.62rem;color:var(--text-muted);
  white-space:nowrap;margin-top:.15rem;
}
.side-ov{display:none;position:fixed;inset:0;background:rgba(0,0,0,.35);z-index:45}
