/* assets/styles.css */
:root{
  --bg0:#07000d;
  --bg1:#120018;
  --ink:#f4ecff;
  --muted:#cdb7ef;
  --muted2:#a48cc9;
  --gold:#ffd35a;
  --gold2:#ffb800;
  --violet:#a855f7;
  --blue:#3b82f6;
  --cyan:#22d3ee;
  --danger:#ff4d6d;
  --glass: rgba(255,255,255,.06);
  --glass2: rgba(255,255,255,.10);
  --stroke: rgba(255,255,255,.14);
  --shadow: 0 20px 80px rgba(0,0,0,.55);
  --radius: 20px;
  --radius2: 28px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color:var(--ink);
  background: radial-gradient(1200px 800px at 12% 18%, rgba(168,85,247,.22), transparent 55%),
              radial-gradient(1100px 700px at 88% 18%, rgba(34,211,238,.16), transparent 60%),
              radial-gradient(1200px 800px at 70% 85%, rgba(255,211,90,.12), transparent 55%),
              linear-gradient(180deg, var(--bg0), var(--bg1));
  overflow:hidden;
}

/* Floating logo (no container) */
.floating-logo{
  position:fixed;
  top:18px;
  left:18px;
  width:66px;
  height:auto;
  z-index:50;
  filter: drop-shadow(0 0 12px rgba(255,211,90,.35)) drop-shadow(0 0 18px rgba(168,85,247,.30));
  animation: pulseGlow 2.8s ease-in-out infinite;
  pointer-events:none;
}
@keyframes pulseGlow{
  0%,100%{transform: translateY(0) scale(1); filter: drop-shadow(0 0 12px rgba(255,211,90,.30)) drop-shadow(0 0 18px rgba(168,85,247,.26));}
  50%{transform: translateY(-2px) scale(1.02); filter: drop-shadow(0 0 18px rgba(255,211,90,.45)) drop-shadow(0 0 26px rgba(168,85,247,.38));}
}

.bg-aurora{
  position:fixed; inset:-20%;
  background:
    conic-gradient(from 190deg at 50% 50%,
      rgba(168,85,247,.16),
      rgba(34,211,238,.12),
      rgba(255,211,90,.10),
      rgba(59,130,246,.10),
      rgba(168,85,247,.16));
  filter: blur(60px);
  opacity:.8;
  animation: drift 12s ease-in-out infinite;
  pointer-events:none;
}
@keyframes drift{
  0%,100%{transform: translate3d(-3%, -2%, 0) rotate(-4deg) scale(1.02);}
  50%{transform: translate3d(3%, 2%, 0) rotate(5deg) scale(1.05);}
}

.bg-grid{
  position:fixed; inset:0;
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 40% 25%, rgba(0,0,0,1), rgba(0,0,0,0) 68%);
  opacity:.22;
  pointer-events:none;
}

.topbar{
  position:fixed;
  left:0; right:0; top:0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:16px 18px 16px 98px;
  z-index:30;
  backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(0,0,0,.45), rgba(0,0,0,.18));
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand-title{font-weight:800; letter-spacing:.2px}
.brand-sub{color:var(--muted2); font-size:12px; margin-top:2px}

.topbar-right{display:flex; align-items:center; gap:10px; flex-wrap:wrap; justify-content:flex-end}
.chip{
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.05);
  padding:8px 10px;
  border-radius:999px;
  font-size:12px;
  color:var(--muted);
}
.chip-strong{color:var(--ink); font-weight:700}

.shell{
  position:fixed;
  inset:72px 0 0 0;
  display:grid;
  grid-template-columns: 300px 1fr;
  gap:14px;
  padding:16px;
}

.nav{
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  border-radius: var(--radius2);
  padding:16px;
  box-shadow: var(--shadow);
  overflow:auto;
}
.nav-section{margin-bottom:16px}
.nav-title{
  font-size:11px;
  color:var(--muted2);
  letter-spacing:.22em;
  text-transform:uppercase;
  margin:6px 0 10px;
}
.nav-item{
  width:100%;
  text-align:left;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  color:var(--ink);
  padding:10px 12px;
  border-radius:14px;
  cursor:pointer;
  margin-bottom:10px;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.nav-item:hover{transform: translateY(-1px); border-color: rgba(255,211,90,.26); background: rgba(255,255,255,.06)}
.nav-item.active{
  border-color: rgba(255,211,90,.44);
  box-shadow: 0 0 0 1px rgba(168,85,247,.18) inset, 0 10px 40px rgba(255,211,90,.10);
  background: linear-gradient(90deg, rgba(255,211,90,.14), rgba(168,85,247,.10));
}

.nav-foot{
  padding-top:10px;
  border-top:1px solid rgba(255,255,255,.10);
}
.month-picker .label{font-size:12px; color:var(--muted2); margin-bottom:6px}
.row{display:flex; align-items:center}
.gap{gap:10px}
.tiny{font-size:12px; color:var(--muted2); margin-top:10px; line-height:1.45}

.content{
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  border-radius: var(--radius2);
  padding:16px;
  box-shadow: var(--shadow);
  overflow:auto;
}

.view{display:none}
.view.active{display:block}

.view-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
  margin-bottom:14px;
  flex-wrap:wrap;
}
.view-title{font-size:18px; font-weight:850}
.view-sub{font-size:12px; color:var(--muted2); margin-top:4px; max-width:800px}

.card{
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.20);
  border-radius: var(--radius);
  padding:14px;
  margin-bottom:14px;
}
.card.glow{
  border-color: rgba(255,211,90,.22);
  box-shadow: 0 0 0 1px rgba(168,85,247,.14) inset, 0 20px 80px rgba(0,0,0,.55);
}
.card-title{font-weight:800; margin-bottom:10px}
.divider{height:1px; background: rgba(255,255,255,.10); margin:12px 0}
.muted{color:var(--muted); line-height:1.55}

.grid-2{display:grid; grid-template-columns: 1.2fr .8fr; gap:14px}
.grid-3{display:grid; grid-template-columns: 1fr 1fr 1fr; gap:14px}
@media (max-width: 1120px){
  body{overflow:auto}
  .shell{position:relative; inset:auto; grid-template-columns:1fr; padding-top:88px}
  .topbar{position:sticky}
  .nav{position:relative}
  .grid-2,.grid-3{grid-template-columns:1fr}
}

.btn{
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color:var(--ink);
  padding:10px 12px;
  border-radius:14px;
  cursor:pointer;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
  font-weight:700;
}
.btn:hover{transform: translateY(-1px); border-color: rgba(255,211,90,.22); background: rgba(255,255,255,.08)}
.btn:disabled{opacity:.45; cursor:not-allowed; transform:none}
.btn-gold{
  border-color: rgba(255,211,90,.35);
  background: linear-gradient(90deg, rgba(255,211,90,.24), rgba(168,85,247,.10));
  box-shadow: 0 10px 40px rgba(255,211,90,.12);
}
.btn-danger{
  border-color: rgba(255,77,109,.35);
  background: rgba(255,77,109,.16);
}
.btn-wide{width:100%}
.btn-mini{padding:8px 10px; border-radius:12px; font-size:12px}

.btn-file{position:relative; overflow:hidden}
.btn-file input{
  position:absolute; inset:0;
  opacity:0;
  cursor:pointer;
}

.input{
  width:100%;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color:var(--ink);
  padding:10px 12px;
  border-radius:14px;
  outline:none;
}
.input:focus{border-color: rgba(255,211,90,.30); box-shadow: 0 0 0 3px rgba(168,85,247,.10)}
.textarea{min-height:120px; resize:vertical}
.label{font-size:12px; color:var(--muted2); margin:10px 0 6px}
.form{display:flex; flex-direction:column}

.table-wrap{overflow:auto}
.table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  min-width: 980px;
}
.table th, .table td{
  padding:10px 10px;
  border-bottom:1px solid rgba(255,255,255,.10);
  font-size:12px;
  vertical-align:top;
}
.table th{color:var(--muted2); text-transform:uppercase; letter-spacing:.12em; font-size:10.5px}
.table td{color:var(--ink)}
.table tr:hover td{background: rgba(255,255,255,.03)}

.kpi-row{display:grid; grid-template-columns: repeat(3, 1fr); gap:12px; margin-top:6px}
.kpi{
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  border-radius:18px;
  padding:12px;
}
.kpi-label{font-size:11px; color:var(--muted2)}
.kpi-value{font-size:20px; font-weight:900; margin-top:6px}

.pill{
  flex:1;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  border-radius:18px;
  padding:12px;
}
.pill-label{font-size:11px; color:var(--muted2)}
.pill-value{font-size:16px; font-weight:900; margin-top:6px}

.mini-grid{display:grid; grid-template-columns:1fr 1fr; gap:12px}
.mini-card{
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  border-radius:18px;
  padding:12px;
}
.mini-label{font-size:11px; color:var(--muted2)}
.mini-value{font-size:16px; font-weight:900; margin-top:6px}

.stack{display:flex; flex-direction:column; gap:10px}

.list{display:flex; flex-direction:column; gap:10px}
.list-item{
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  border-radius:18px;
  padding:12px;
}
.list-item .title{font-weight:850}
.list-item .sub{color:var(--muted2); font-size:12px; margin-top:4px; line-height:1.4}
.badge{
  display:inline-block;
  border:1px solid rgba(255,255,255,.16);
  background: rgba(0,0,0,.25);
  padding:4px 8px;
  border-radius:999px;
  font-size:11px;
  color:var(--muted);
  margin-right:8px;
}
.badge.good{border-color: rgba(34,211,238,.28)}
.badge.warn{border-color: rgba(255,211,90,.32)}
.badge.bad{border-color: rgba(255,77,109,.34)}
.actions{margin-top:10px; display:flex; gap:10px; flex-wrap:wrap}

.pack-preview{
  white-space:pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size:12px;
}

.checklist{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
}
@media (max-width: 980px){ .checklist{grid-template-columns:1fr} }
.chk{
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  border-radius:18px;
  padding:12px;
  display:flex;
  gap:10px;
  align-items:flex-start;
}
.chk input{margin-top:3px}
.chk .t{font-weight:850}
.chk .d{color:var(--muted2); font-size:12px; margin-top:4px; line-height:1.4}

/* Modal */
.modal-backdrop{
  position:fixed; inset:0;
  background: rgba(0,0,0,.55);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:100;
  padding:16px;
}
.modal-backdrop.hidden{display:none}
.modal{
  width:min(880px, 96vw);
  border:1px solid rgba(255,255,255,.14);
  background: rgba(10,0,18,.88);
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}
.modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px;
  border-bottom:1px solid rgba(255,255,255,.10);
}
.modal-title{font-weight:900}
.modal-body{padding:14px; max-height:70vh; overflow:auto}
.modal-foot{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  padding:14px;
  border-top:1px solid rgba(255,255,255,.10);
}
