:root{
  --mx-bg:#0b0711;
  --mx-bg-2:#120c1d;
  --mx-panel:rgba(20,12,31,.88);
  --mx-panel-2:rgba(28,17,42,.92);
  --mx-border:rgba(255,224,160,.12);
  --mx-text:#f6f1ff;
  --mx-muted:#c8b8df;
  --mx-gold:#ffd98a;
  --mx-gold-2:#ffb65c;
  --mx-crimson:#e05a7a;
  --mx-purple:#8c5cff;
  --mx-green:#79d6b8;
  --mx-red:#ff8c9f;
  --mx-shadow:0 18px 55px rgba(0,0,0,.34);
}
body.page-systems,
body.page-dashboard,
body.page-profile,
body.page-store-pro,
body.page-forum,
body.page-henesys{
  color:var(--mx-text);
}
body.page-systems::before,
body.page-dashboard::before,
body.page-profile::before,
body.page-store-pro::before,
body.page-forum::before,
body.page-henesys::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(circle at 18% 14%, rgba(232,113,150,.17), transparent 18%),
    radial-gradient(circle at 82% 12%, rgba(164,102,255,.18), transparent 20%),
    radial-gradient(circle at 52% 40%, rgba(255,212,124,.08), transparent 28%),
    linear-gradient(180deg, rgba(6,4,10,.45), rgba(7,4,10,.72));
  z-index:-1;
}
.storybook-scene{opacity:.28 !important; filter:saturate(.6) brightness(.6) contrast(1.1);}
.portal,.container,.store-shell,.henesys-shell,.forum-shell{
  background:linear-gradient(180deg, rgba(17,11,26,.88), rgba(25,17,39,.94)) !important;
  border:1px solid var(--mx-border) !important;
  box-shadow:var(--mx-shadow) !important;
  color:var(--mx-text) !important;
}
.portal h1,.portal h2,.portal h3,
.container h1,.container h2,.container h3,
.store-shell h1,.store-shell h2,.store-shell h3,
.panel h1,.panel h2,.panel h3,
.section-title h2,
.mini-title,
.kicker,
.logged-strip,
.profile-subtitle,
.topic-summary,
.topic-actions,
.user-link,
.user-sub,
.balance-title,
.balance-value,
.badge,
.card-actions,
.stat-note,
.profile-stat,
.meta-note,
.small,
.muted,
label,
.back,
.back-link-row a,
.table-wrap table,
.table-wrap th,
.table-wrap td,
.message-body,
.chat,
textarea,
input,
select,
option,
button,
a[role="button"]{
  color:var(--mx-text) !important;
}
.logged-strip,.badge,.price-pill,.flag,.stat-chip,.kicker,.pagebtn{
  background:linear-gradient(180deg, rgba(255,226,165,.12), rgba(141,82,255,.09)) !important;
  border:1px solid rgba(255,221,160,.16);
}
.balance-card,.store-card,.panel,.ledger-row,.voucher-row,.dashboard-card,.soft-card,.post,.reply-box,.topic-box,.edit-box,.report-box,.user-link,.chat{
  background:linear-gradient(180deg, rgba(25,16,37,.9), rgba(18,11,28,.94)) !important;
  border:1px solid rgba(255,221,160,.1) !important;
  box-shadow:0 14px 34px rgba(0,0,0,.24) !important;
}
input,textarea,select{
  background:rgba(8,5,13,.72) !important;
  border:1px solid rgba(255,218,151,.18) !important;
  color:#fff !important;
}
input::placeholder,textarea::placeholder{color:#bea8d5 !important;}
button,a[role="button"],.store-actions a,.store-actions button,.card-actions button,.card-actions a[role="button"],.admin-form button,.pagebtn{
  background:linear-gradient(135deg, rgba(255,227,155,.16), rgba(230,89,126,.22) 58%, rgba(133,98,255,.22)) !important;
  border:1px solid rgba(255,221,160,.22) !important;
  color:#fff8e8 !important;
  box-shadow:0 10px 25px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.07) !important;
}
button:hover,a[role="button"]:hover,.store-actions a:hover,.store-actions button:hover,.card-actions button:hover,.card-actions a[role="button"]:hover,.pagebtn:hover{
  transform:translateY(-1px);
  filter:brightness(1.08);
}
.alt-btn{background:linear-gradient(135deg, rgba(113,201,255,.18), rgba(125,82,255,.22)) !important;}
.danger{background:linear-gradient(135deg, rgba(255,112,152,.24), rgba(162,38,68,.28)) !important;}
.system-shell{
  width:min(1240px,95%);
  margin:24px auto;
  padding:22px;
  border-radius:30px;
  background:linear-gradient(180deg, rgba(17,11,26,.92), rgba(25,17,39,.96));
  border:1px solid var(--mx-border);
  box-shadow:var(--mx-shadow);
}
.system-topbar,.system-actions,.system-grid,.stats-grid,.summary-grid,.ticket-thread,.gallery-grid,.event-grid,.search-grid,.leader-grid,.notice-list,.two-col,.metric-grid,.hero-grid{
  display:grid;
  gap:16px;
}
.system-topbar{grid-template-columns:1fr auto;align-items:center;margin-bottom:18px;}
.system-actions{grid-auto-flow:column;grid-auto-columns:max-content;justify-content:start;align-items:center;overflow:auto;padding-bottom:4px;}
.system-actions a,.system-actions button{white-space:nowrap;}
.stats-grid{grid-template-columns:repeat(auto-fit,minmax(180px,1fr));}
.summary-grid{grid-template-columns:repeat(auto-fit,minmax(260px,1fr));}
.two-col{grid-template-columns:1.1fr .9fr;align-items:start;}
.hero-grid{grid-template-columns:1.3fr .7fr;align-items:start;}
.metric-grid{grid-template-columns:repeat(auto-fit,minmax(150px,1fr));}
.system-card,.metric-card,.ticket-card,.notice-card,.result-card,.gallery-card,.event-card,.leader-card,.thread-card,.settings-card{
  background:linear-gradient(180deg, rgba(25,16,37,.9), rgba(18,11,28,.94));
  border:1px solid rgba(255,221,160,.1);
  border-radius:24px;
  padding:18px;
  box-shadow:0 14px 34px rgba(0,0,0,.24);
}
.system-title{margin:0;font-size:2rem;color:#fff7e4;}
.system-copy,.system-sub,.table-wrap,.system-card p,.notice-card p,.result-card p,.event-card p,.gallery-card p,.leader-card p,.thread-card p{color:var(--mx-muted);}
.metric-value{font-size:2rem;font-weight:900;color:#fff8dd;}
.metric-label{font-size:.82rem;text-transform:uppercase;letter-spacing:.08em;color:#d5c1ef;}
.status-pill{display:inline-flex;align-items:center;gap:8px;padding:8px 12px;border-radius:999px;background:rgba(121,214,184,.12);border:1px solid rgba(121,214,184,.2);font-weight:800;}
.status-online{color:#a6ffd9;}
.status-maintenance,.status-pending{color:#ffe19d;}
.status-offline,.status-closed,.status-resolved{color:#ffb2c4;}
.topline{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;align-items:center;margin-bottom:12px;}
.stack{display:grid;gap:10px;}
.form-grid-v15{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
.form-grid-v15 .full{grid-column:1/-1;}
.notice-list{grid-template-columns:1fr;}
.notice-card.unread{border-color:rgba(255,217,138,.25);box-shadow:0 0 0 1px rgba(255,217,138,.08),0 14px 34px rgba(0,0,0,.24);}
.notice-meta,.thread-meta,.event-meta,.gallery-meta,.leader-meta{font-size:.85rem;color:#d0bde7;}
.ticket-thread{grid-template-columns:1fr;}
.thread-card.staff{border-left:4px solid rgba(255,217,138,.55);}
.thread-card.self{border-left:4px solid rgba(121,214,184,.55);}
.ticket-badge,.severity-badge,.event-type,.search-type,.leader-pill{display:inline-flex;padding:6px 10px;border-radius:999px;background:rgba(255,217,138,.12);font-weight:800;font-size:.83rem;}
.gallery-grid{grid-template-columns:repeat(auto-fit,minmax(240px,1fr));}
.gallery-card img,.gallery-card video{width:100%;aspect-ratio:16/10;object-fit:cover;border-radius:18px;border:1px solid rgba(255,221,160,.12);background:#0a0710;}
.event-grid{grid-template-columns:repeat(auto-fit,minmax(280px,1fr));}
.search-grid{grid-template-columns:repeat(auto-fit,minmax(250px,1fr));}
.leader-grid{grid-template-columns:repeat(auto-fit,minmax(280px,1fr));}
.leader-list{display:grid;gap:10px;margin-top:12px;}
.leader-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border-radius:16px;background:rgba(255,255,255,.03);}
.leader-row .name{font-weight:800;color:#fff7e4;}
.rank-no{display:inline-grid;place-items:center;width:32px;height:32px;border-radius:50%;background:linear-gradient(135deg, rgba(255,217,138,.18), rgba(228,94,132,.22));font-weight:900;color:#fff7e4;}
.table-wrap{overflow:auto;}
.table-wrap table{width:100%;border-collapse:collapse;}
.table-wrap th,.table-wrap td{padding:11px 12px;border-bottom:1px solid rgba(255,255,255,.06);white-space:nowrap;}
.info-list{display:grid;gap:10px;margin:0;padding:0;list-style:none;}
.info-list li{display:flex;justify-content:space-between;gap:10px;padding:10px 0;border-bottom:1px solid rgba(255,255,255,.05);}
.empty-state{padding:18px;border-radius:20px;background:rgba(255,255,255,.03);color:var(--mx-muted);text-align:center;}
.profile-badges{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;}
.profile-highlight{font-size:1.05rem;font-weight:700;color:#fff7e4;}
.system-footer-note{margin-top:8px;color:#cebce4;font-size:.88rem;}
@media (max-width:960px){
  .two-col,.hero-grid{grid-template-columns:1fr;}
}
@media (max-width:720px){
  .system-topbar{grid-template-columns:1fr;}
  .system-actions{grid-auto-flow:row;grid-auto-columns:auto;}
  .form-grid-v15{grid-template-columns:1fr;}
  .system-shell{padding:16px;border-radius:24px;}
  .system-title{font-size:1.55rem;}
}
