* {
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  background: #07080e;
  color: #e1e3ec;
  margin: 0;
  padding: 20px;
  overflow-x: hidden;
  min-height: 100vh;
}

.box {
  background: rgba(18, 20, 32, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 14px;
  padding: 24px;
  max-width: 1120px;
  margin: 0 auto 20px;
  border: 1px solid rgba(250, 204, 21, 0.18);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: relative;
  z-index: 5;
}

input, select, button {
  padding: 8px 12px;
  border-radius: 7px;
  border: 1px solid #383c54;
  background: #151726;
  color: white;
  margin: 4px 0;
  font-size: 13px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}


/* Unified The Order dropdown styling */
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 34px;
  background-color: #0d1220;
  background-image: linear-gradient(45deg, transparent 50%, #8e9ab7 50%), linear-gradient(135deg, #8e9ab7 50%, transparent 50%);
  background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  border-color: #303a52;
  color: #e8edf8;
  cursor: pointer;
}
select:hover { border-color: #596681; background-color: #111827; }
select:disabled { opacity: .5; cursor: not-allowed; }
select option, select optgroup { background: #0b101c; color: #e8edf8; }

input:focus, select:focus {
  outline: none;
  border-color: #facc15;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.35);
  background: #1c1f33;
}

button {
  cursor: pointer;
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  border: none;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
}

button:hover {
  background: linear-gradient(135deg, #5b52f5 0%, #7579ff 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.5);
}

button:active {
  transform: translateY(0);
}

button:disabled {
  background: #23263b;
  color: #595e7d;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn-danger {
  background: #dc2626 !important;
}

.btn-danger:hover {
  background: #ef4444 !important;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4) !important;
}

.top-user-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(250, 204, 21, 0.2);
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.top-user-bar strong {
  color: #facc15;
  font-size: 15px;
}

.top-user-bar span {
  color: #aaa;
}

.global-nav {
  display: flex;
  gap: 12px;
  margin-bottom: 22px;
  border-bottom: 1px solid rgba(250, 204, 21, 0.25);
  padding-bottom: 14px;
  flex-wrap: wrap;
}

.global-tab {
  padding: 11px 20px;
  border-radius: 8px;
  background: rgba(22, 25, 39, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #9aa0c2;
  font-weight: 700;
  letter-spacing: 0.8px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.global-tab:hover {
  color: #fff;
  background: rgba(32, 36, 56, 0.9);
  border-color: rgba(250, 204, 21, 0.4);
  transform: translateY(-2px);
}

.global-tab.active {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  border-color: #facc15;
  color: #fff;
  box-shadow: 0 0 20px rgba(79, 70, 229, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.dev-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 70px 20px;
  text-align: center;
  background: linear-gradient(180deg, rgba(16, 18, 30, 0.7) 0%, rgba(10, 12, 20, 0.85) 100%);
  border: 1px dashed rgba(250, 204, 21, 0.35);
  border-radius: 12px;
  margin-top: 10px;
}

.dev-icon {
  font-size: 46px;
  margin-bottom: 14px;
  filter: drop-shadow(0 0 15px rgba(250, 204, 21, 0.6));
}

.dev-title {
  font-size: 24px;
  font-weight: 800;
  color: #facc15;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 0 0 6px;
}

.dev-desc {
  color: #8f95b2;
  font-size: 14px;
  max-width: 480px;
  line-height: 1.5;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.modal-card {
  background: #151724;
  padding: 22px;
  border-radius: 10px;
  max-width: 500px;
  width: 90%;
  border: 1px solid #3c4059;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.modal-card h3 {
  margin-top: 0;
  color: #facc15;
}

.modal-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.badge {
  background: #facc15;
  color: #111;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
}

.tag {
  font-size: 11px;
  padding: 3px 7px;
  border-radius: 4px;
  font-weight: bold;
  letter-spacing: 0.3px;
}

.tag.approved {
  background: #22c55e;
  color: #000;
}

.tag.pending {
  background: #eab308;
  color: #000;
}

.lvl-badge {
  background: #6366f1;
  color: white;
  font-size: 12px;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: bold;
}

.diff-badge {
  background: #1c1f30;
  border: 1px solid #3a3f5a;
  border-radius: 4px;
  padding: 3px 7px;
  margin-right: 4px;
  display: inline-block;
  font-size: 12px;
  margin-top: 3px;
}

.gm-char-card {
  background: rgba(16, 18, 30, 0.9);
  border: 1px solid #282b3d;
  padding: 14px;
  border-radius: 8px;
  margin-bottom: 12px;
}
/* THE ORDER scrollbars */
* { scrollbar-width: thin; scrollbar-color: #39405c #0a0d18; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-track { background: #090c16; border-left: 1px solid rgba(99,102,241,.12); }
*::-webkit-scrollbar-thumb { background: linear-gradient(180deg,#3d4665,#242a40); border: 2px solid #090c16; border-radius: 10px; }
*::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg,#596586,#343c59); }
*::-webkit-scrollbar-corner { background:#090c16; }

/* THE ORDER confirmation / input dialogs */
.order-dialog-overlay { position:fixed; inset:0; z-index:10050; display:flex; align-items:center; justify-content:center; padding:22px; background:rgba(2,4,12,.78); backdrop-filter:blur(5px); }
.order-dialog-overlay[hidden] { display:none !important; }
.order-dialog-card { width:min(460px,94vw); padding:24px; border-radius:12px; border:1px solid #3b4261; background:linear-gradient(145deg,#121625,#0b0e19 72%); box-shadow:0 28px 80px rgba(0,0,0,.65), inset 0 1px rgba(255,255,255,.04); position:relative; overflow:hidden; }
.order-dialog-card::before { content:""; position:absolute; left:0; right:0; top:0; height:2px; background:linear-gradient(90deg,transparent,#facc15,transparent); }
.order-dialog-kicker { color:#747d9f; font-size:10px; font-weight:800; letter-spacing:2px; margin-bottom:10px; }
.order-dialog-card h3 { color:#facc15; margin:0 0 10px; font-size:20px; }
.order-dialog-card p { color:#c7cbe0; line-height:1.55; margin:0 0 20px; white-space:pre-line; }
.order-dialog-input { box-sizing:border-box; width:100%; margin:0 0 20px; padding:12px 13px; border:1px solid #3a405c; border-radius:7px; background:#080b14; color:#f3f4ff; outline:none; }
.order-dialog-input:focus { border-color:#facc15; box-shadow:0 0 0 2px rgba(250,204,21,.1); }
.order-dialog-actions { display:flex; justify-content:flex-end; gap:9px; }
.order-dialog-actions button { min-width:108px; padding:10px 15px; border-radius:7px; font-weight:800; cursor:pointer; }
.order-dialog-cancel { background:#252a3e; color:#cbd0e5; border:1px solid #3a405b; }
.order-dialog-ok { background:#facc15; color:#11131b; border:1px solid #facc15; }
.order-dialog-ok.danger { background:#dc2626; color:#fff; border-color:#ef4444; }
.order-dialog-actions button:hover { filter:brightness(1.08); transform:translateY(-1px); }

/* v8: registration + GM controls, preserving the original THE ORDER visual language */
.auth-secondary { width:100%; margin-top:9px; background:#252a3e !important; color:#cbd0e5 !important; border:1px solid #3a405b !important; box-shadow:none !important; }
.auth-secondary:hover { border-color:#facc15 !important; color:#fff !important; }
.auth-kicker { color:#8c95b3; font-size:10px; font-weight:800; letter-spacing:1.8px; margin-bottom:12px; }
.pending-card { text-align:center; }
.pending-card h2 { color:#facc15; margin:12px 0 8px; }
.pending-card p { color:#aeb5ce; line-height:1.6; }
.pending-icon { font-size:34px; margin-bottom:8px; }
.section-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:12px; margin:18px 0 10px; padding-bottom:8px; border-bottom:1px solid #2b3046; }
.section-heading:first-child { margin-top:0; }
.section-heading h3 { margin:2px 0 0; color:#facc15; }
.eyebrow { color:#7f89a7; font-size:9px; font-weight:800; letter-spacing:1.6px; }
.section-count { min-width:28px; height:28px; display:inline-flex; align-items:center; justify-content:center; border:1px solid #3a405b; border-radius:6px; color:#facc15; background:#121625; font-weight:800; }
.request-stack { display:grid; gap:8px; }
.empty-state { padding:12px 14px; border:1px dashed #343a55; border-radius:7px; background:#0c0f1b; color:#7f89a7; }
.muted { color:#7f89a7; font-size:12px; }
.manual-points { display:inline-flex; align-items:center; gap:6px; margin-left:6px; }
.manual-points input { width:90px; margin:0; padding:7px 8px; }
.manual-points button { margin:0; }

/* =========================================================
   THE ORDER UI v9 — shell refinement
   Keeps the established palette and module visuals intact.
   ========================================================= */
:root {
  --order-gold: #facc15;
  --order-bg: #07080e;
  --order-panel: rgba(15, 17, 28, .92);
  --order-panel-2: rgba(20, 23, 37, .86);
  --order-line: rgba(139, 147, 181, .18);
  --order-line-gold: rgba(250, 204, 21, .24);
  --order-text: #e6e8f2;
  --order-muted: #858da9;
  --sidebar-width: 252px;
}

body { padding: 0; }

.app-shell.box {
  max-width: none;
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  position: relative;
}

.app-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 40;
  display: flex;
  flex-direction: column;
  padding: 20px 14px 16px;
  background: linear-gradient(180deg, rgba(14,16,27,.98), rgba(8,10,18,.98));
  border-right: 1px solid var(--order-line-gold);
  box-shadow: 12px 0 36px rgba(0,0,0,.24);
  overflow: hidden auto;
}

.sidebar-brand { display:flex; align-items:center; gap:11px; min-height:58px; padding:2px 8px 18px; border-bottom:1px solid var(--order-line); }
.sidebar-brand-mark { width:36px; height:36px; flex:0 0 36px; display:grid; place-items:center; border:1px solid rgba(250,204,21,.42); border-radius:8px; color:var(--order-gold); font-size:11px; font-weight:900; letter-spacing:1px; background:rgba(250,204,21,.04); box-shadow:inset 0 0 16px rgba(250,204,21,.035); }
.sidebar-brand-title { color:#f4f5fb; font-size:15px; line-height:1; font-weight:850; letter-spacing:1.8px; }
.sidebar-brand-sub { color:#68708d; margin-top:6px; font-size:8px; font-weight:750; letter-spacing:1.15px; white-space:nowrap; }
.sidebar-nav { padding-top:16px; flex:1; }
.sidebar-group { margin-bottom:20px; }
.sidebar-group-title { padding:0 11px 7px; color:#626b89; font-size:9px; font-weight:850; letter-spacing:1.7px; }
.sidebar-item { width:100%; min-height:42px; margin:2px 0; padding:0 11px; display:flex; align-items:center; gap:11px; text-align:left; border:1px solid transparent; border-radius:6px; background:transparent; color:#969db7; box-shadow:none; font-size:12px; font-weight:650; letter-spacing:.15px; position:relative; }
.sidebar-item:hover { transform:none; color:#eef0f8; background:rgba(255,255,255,.035); border-color:rgba(255,255,255,.045); box-shadow:none; }
.sidebar-item::before { content:""; position:absolute; left:-1px; top:9px; bottom:9px; width:2px; border-radius:2px; background:transparent; box-shadow:none; }
.sidebar-item.active { color:#fff5bd; background:linear-gradient(90deg,rgba(250,204,21,.09),rgba(250,204,21,.018)); border-color:rgba(250,204,21,.12); box-shadow:none; }
.sidebar-item.active::before { background:var(--order-gold); box-shadow:0 0 10px rgba(250,204,21,.38); }
.sidebar-icon { width:18px; flex:0 0 18px; color:#747d9d; text-align:center; font-size:17px; line-height:1; }
.sidebar-item.active .sidebar-icon { color:var(--order-gold); }

.sidebar-user { padding:15px 9px 4px; border-top:1px solid var(--order-line); }
.sidebar-user-kicker { color:#5f6782; font-size:8px; font-weight:850; letter-spacing:1.45px; margin-bottom:7px; }
.sidebar-user-name { color:#f3f4fa; font-size:13px; overflow:hidden; text-overflow:ellipsis; }
.sidebar-user-name strong { color:#f3f4fa; }
.sidebar-user-role { margin-top:3px; color:#7e87a5; font-size:10px; }
.sidebar-user-actions { display:grid; grid-template-columns:1fr 1fr; gap:5px; margin-top:11px; }
.sidebar-user-actions button { margin:0; padding:7px 5px; border:1px solid #30364d; background:#151927; color:#9ca4c0; box-shadow:none; font-size:10px; }
.sidebar-user-actions button:hover { transform:none; background:#1d2233; border-color:#4a526e; color:#fff; box-shadow:none; }
.sidebar-user-actions .sidebar-logout { grid-column:1/-1; background:transparent !important; border-color:rgba(220,38,38,.35) !important; color:#c77980 !important; }
.sidebar-user-actions .sidebar-logout:hover { background:rgba(220,38,38,.08) !important; color:#ff9ca3 !important; }

.app-workspace { min-width:0; min-height:100vh; padding:18px 24px 30px; }
.system-bar { min-height:58px; display:flex; align-items:center; gap:14px; margin:0 0 13px; padding:0 4px 13px; border-bottom:1px solid var(--order-line); }
.sidebar-collapse { width:34px; height:34px; margin:0; padding:0; display:grid; place-items:center; border:1px solid #30364c; background:#111522; color:#8992ae; box-shadow:none; font-size:15px; }
.sidebar-collapse:hover { transform:none; background:#1a1f30; color:#fff; border-color:#4a526e; box-shadow:none; }
.system-heading { min-width:0; }
.system-breadcrumb { color:#626b88; font-size:8px; font-weight:800; letter-spacing:1.45px; margin-bottom:4px; }
.system-title { color:#f0f1f7; font-size:16px; font-weight:820; letter-spacing:1.35px; }
.system-connection { margin-left:auto; display:flex; align-items:center; gap:7px; color:#707994; font-size:9px; font-weight:750; letter-spacing:1px; }
.connection-dot { width:6px; height:6px; border-radius:50%; background:#22c55e; box-shadow:0 0 8px rgba(34,197,94,.6); }
.sync-status { margin:0 0 12px; }
.module-stage { min-width:0; animation:order-stage-in .22s ease-out; }
.module-view { min-width:0; }
.page-heading { display:flex; align-items:end; justify-content:space-between; gap:16px; margin:2px 0 16px; padding-bottom:12px; border-bottom:1px solid var(--order-line); }
.page-heading h2 { margin:4px 0 0; color:var(--order-gold); font-size:20px; letter-spacing:.3px; }

/* quieter shared controls; existing functional colors can still override these */
input, select { transition:border-color .16s ease, box-shadow .16s ease, background .16s ease; }
button { transition:background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease; }
.gm-char-card, .modal-card, .dev-placeholder { box-shadow:0 8px 24px rgba(0,0,0,.16); }

@keyframes order-stage-in { from { opacity:.72; transform:translateY(3px); } to { opacity:1; transform:none; } }

body.sidebar-collapsed .app-shell.box { grid-template-columns:72px minmax(0,1fr); }
body.sidebar-collapsed .app-sidebar { padding-left:10px; padding-right:10px; }
body.sidebar-collapsed .sidebar-brand { justify-content:center; padding-left:0; padding-right:0; }
body.sidebar-collapsed .sidebar-brand > div:last-child,
body.sidebar-collapsed .sidebar-group-title,
body.sidebar-collapsed .sidebar-item span:last-child,
body.sidebar-collapsed .sidebar-user-kicker,
body.sidebar-collapsed .sidebar-user-name,
body.sidebar-collapsed .sidebar-user-role,
body.sidebar-collapsed .sidebar-user-actions { display:none; }
body.sidebar-collapsed .sidebar-item { justify-content:center; padding:0; }
body.sidebar-collapsed .sidebar-icon { width:auto; flex:0 0 auto; }

@media (max-width: 860px) {
  .app-shell.box { display:block; }
  .app-sidebar { position:fixed; left:0; top:0; width:min(280px,86vw); transform:translateX(-105%); transition:transform .2s ease; box-shadow:20px 0 55px rgba(0,0,0,.55); }
  body.sidebar-open .app-sidebar { transform:translateX(0); }
  body.sidebar-open::after { content:""; position:fixed; inset:0; z-index:35; background:rgba(0,0,0,.58); backdrop-filter:blur(2px); }
  .app-workspace { padding:12px 12px 24px; }
  .system-connection span:last-child { display:none; }
  .system-bar { min-height:52px; }
}

@media (min-width: 861px) {
  .module-view:not(.module-view-wide) { max-width:1500px; margin:0 auto; }
  .module-view-wide { width:100%; }
}

/* v9.1 hotfix: application code sets #main-box to display:block after login.
   Keep the auth hidden state intact, but force the authenticated shell back to grid. */
#main-box.app-shell:not([style*="display:none"]):not([style*="display: none"]) {
  display: grid !important;
}

@media (max-width: 860px) {
  #main-box.app-shell:not([style*="display:none"]):not([style*="display: none"]) {
    display: block !important;
  }
}

/* v10 polish */
.sidebar-brand-mark{overflow:hidden;padding:4px;background:rgba(250,204,21,.025)}
.sidebar-brand-mark img{display:block;width:100%;height:100%;object-fit:contain}
.sidebar-settings-link{padding:12px 0 2px;border-top:1px solid var(--order-line)}
.sidebar-settings-link .sidebar-item{margin:0}
.notice.success{background:#10271d!important;border-color:#2e8b57!important;color:#bdf4d0!important;box-shadow:0 12px 34px rgba(0,0,0,.35),inset 3px 0 0 #22c55e!important}
.notice.info{background:#101827!important;border-color:#31547d!important;color:#c8dcf4!important}
.settings-page{max-width:980px;margin:0 auto;padding:8px 0 30px}
.settings-page .page-heading p{margin:7px 0 0;color:#7f89a7;font-size:12px}
.settings-card{margin-top:18px;border:1px solid #293147;border-radius:12px;background:linear-gradient(145deg,#111522,#0b0e18);padding:20px}
.settings-profile{display:flex;align-items:center;gap:15px;padding-bottom:18px;border-bottom:1px solid #252c3e}
.settings-avatar{width:54px;height:54px;border:1px solid rgba(250,204,21,.35);border-radius:11px;padding:7px;background:#090c14}
.settings-avatar img{width:100%;height:100%}
.settings-profile span,.settings-profile small{display:block;color:#68728f;font-size:9px;letter-spacing:1.3px}.settings-profile strong{display:block;color:#f2f4fb;font-size:18px;margin:4px 0}
.settings-actions{display:grid;gap:9px;margin-top:18px}.settings-actions button{margin:0;padding:14px 16px;display:flex;align-items:center;gap:13px;text-align:left;background:#0b0f19;border:1px solid #293147;box-shadow:none}.settings-actions button:hover{transform:none;background:#111725;border-color:#414b67;box-shadow:none}.settings-actions button>b{width:26px;color:#facc15;font-size:18px;text-align:center}.settings-actions button span{display:flex;flex-direction:column;gap:3px}.settings-actions button strong{color:#e7eaf3;font-size:12px}.settings-actions button small{color:#747e9b;font-size:10px}.settings-actions .settings-logout{border-color:rgba(220,38,38,.28)}.settings-actions .settings-logout>b,.settings-actions .settings-logout strong{color:#e58b93}

/* v10.3 quick logout */
.sidebar-settings-link{display:grid;gap:4px}
.sidebar-settings-link .sidebar-logout{color:#b9c0d3}
.sidebar-settings-link .sidebar-logout .sidebar-icon{color:#e58b93}
.sidebar-settings-link .sidebar-logout:hover{color:#f0a0a7;background:rgba(127,29,29,.10);border-color:rgba(220,38,38,.22)}


/* v10.4 — planet navigation + supplied Order emblem */
.sidebar-brand-mark{padding:3px;background:rgba(255,255,255,.015)}
.sidebar-brand-mark img{width:100%;height:100%;object-fit:contain}
.sidebar-subnav{position:relative;margin:1px 0 7px 29px;padding:2px 0 3px 13px;border-left:1px solid rgba(126,139,173,.20)}
.sidebar-subitem{width:100%;min-height:31px;margin:1px 0;padding:0 9px;display:flex;align-items:center;justify-content:space-between;gap:8px;border:0;border-radius:5px;background:transparent;color:#737d99;box-shadow:none;text-align:left;font-size:11px;font-weight:650}
.sidebar-subitem:hover{transform:none;background:rgba(255,255,255,.028);color:#cbd1df;box-shadow:none}
.sidebar-subitem.active{background:rgba(250,204,21,.055);color:#f5e8a7}
.sidebar-subitem.active::before{content:"";position:absolute;left:-1px;width:1px;height:18px;background:#facc15;box-shadow:0 0 7px rgba(250,204,21,.35)}
.sidebar-subcount{min-width:19px;height:18px;padding:0 5px;display:inline-flex;align-items:center;justify-content:center;border:1px solid rgba(250,204,21,.18);border-radius:9px;color:#c9b967;font-size:9px}
body.sidebar-collapsed .sidebar-subnav{display:none}
\n\n/* v10.5 — brand emblem refinement */\n.sidebar-brand-mark{\n  width:40px;\n  height:40px;\n  flex:0 0 40px;\n  padding:2px;\n  border:0 !important;\n  border-radius:0 !important;\n  background:transparent !important;\n  box-shadow:none !important;\n  overflow:visible;\n}\n.sidebar-brand-mark img{\n  width:100%;\n  height:100%;\n  display:block;\n  object-fit:contain;\n  /* Preserve the emblem geometry, but harmonise its original blue with the site's gold UI. */\n  filter: grayscale(1) sepia(1) saturate(7) hue-rotate(2deg) brightness(1.18) contrast(1.12) drop-shadow(0 0 7px rgba(250,204,21,.14));\n  opacity:.92;\n}\n.sidebar-brand:hover .sidebar-brand-mark img{\n  opacity:1;\n  filter: grayscale(1) sepia(1) saturate(7) hue-rotate(2deg) brightness(1.28) contrast(1.12) drop-shadow(0 0 9px rgba(250,204,21,.22));\n}\n
/* v5 custom navigation icons */
.sidebar-icon img{display:block;width:18px;height:18px;object-fit:contain;opacity:.72;filter:grayscale(1) brightness(1.45);transition:opacity .16s ease,filter .16s ease,transform .16s ease}.sidebar-item:hover .sidebar-icon img{opacity:.95;filter:grayscale(1) brightness(1.85)}.sidebar-item.active .sidebar-icon img{opacity:1;filter:sepia(1) saturate(2.2) hue-rotate(350deg) brightness(1.25)}

/* v5.1 — custom menu icon palette */
.sidebar-icon img{
  opacity:.88;
  filter:brightness(0) saturate(100%) invert(57%) sepia(13%) saturate(788%) hue-rotate(190deg) brightness(92%) contrast(91%);
  transition:opacity .16s ease,filter .16s ease,transform .16s ease,drop-shadow .16s ease;
}
.sidebar-item:hover .sidebar-icon img{
  opacity:1;
  filter:brightness(0) saturate(100%) invert(84%) sepia(9%) saturate(452%) hue-rotate(190deg) brightness(101%) contrast(94%);
}
.sidebar-item.active .sidebar-icon img{
  opacity:1;
  filter:brightness(0) saturate(100%) invert(85%) sepia(65%) saturate(832%) hue-rotate(352deg) brightness(101%) contrast(96%) drop-shadow(0 0 4px rgba(232,202,72,.28));
}

/* V0.3 feedback patch */
.gm-skills-editor{background:#11121d;border:1px solid #282b3d;border-radius:8px;padding:14px}.gm-skill-grid{display:grid;grid-template-columns:repeat(3,minmax(150px,1fr));gap:8px}.gm-skill-grid textarea{grid-column:1/-1;min-height:86px}.gm-skill-list-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:18px 0 8px}.gm-skill-list-head input{max-width:280px}.gm-skill-row{display:flex;justify-content:space-between;gap:14px;padding:10px 12px;border-top:1px solid #292c3e}.gm-skill-row small{display:block;color:#d6b94d;margin-top:3px}.gm-skill-row p{color:#9ba2b8;font-size:12px;margin:5px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gm-skill-row>div:last-child{display:flex;gap:6px;align-items:center}.slot-card select[size]{background:#0c0e17;border-color:#34384d}.slot-card select[size] option{padding:5px 7px}@media(max-width:800px){.gm-skill-grid{grid-template-columns:1fr}.gm-skill-row{flex-direction:column}}

/* V0.4 Planetary Economy & Exchange */
.exchange-create,.exchange-card,.economy-log{background:#11131f;border:1px solid #292d43;border-radius:10px;padding:16px;margin-bottom:14px}.exchange-create h3,.exchange-head h3,.economy-log h3{margin:0 0 12px;color:#e7d37b}.exchange-form{display:grid;grid-template-columns:1.3fr 1.2fr .8fr 1fr auto;gap:8px}.exchange-head{display:flex;justify-content:space-between;align-items:center;margin:18px 0 10px}.exchange-head span{color:#7f87a5;font-size:12px}.exchange-card{display:grid;grid-template-columns:1fr auto;gap:12px;position:relative}.exchange-resource{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:#54c8e8}.exchange-card h3{margin:4px 0 8px}.exchange-numbers{margin-top:9px;color:#c8ccda}.exchange-actions{display:flex;gap:7px;align-items:center}.exchange-counters{grid-column:1/-1;border-top:1px solid #292d43;padding-top:10px}.exchange-counters>div{padding:6px 0;color:#aeb4ca}.economy-log>div{display:grid;grid-template-columns:170px 150px 1fr;gap:10px;padding:6px 0;border-top:1px solid #25283a;font-size:12px}.economy-log span{color:#707895}.gm-trade-adjust{display:flex;gap:6px;align-items:end;margin-top:16px}.gm-trade-adjust input{width:90px}@media(max-width:900px){.exchange-form{grid-template-columns:1fr 1fr}.exchange-card{grid-template-columns:1fr}.exchange-actions{justify-content:flex-start}.economy-log>div{grid-template-columns:1fr}.gm-trade-adjust{flex-wrap:wrap}}

/* V0.4.3 strategic resources */
.strategic-resources-title{margin:18px 0 9px;color:#8f95b2;font-size:12px;text-transform:uppercase;letter-spacing:.02em}
.strategic-resources-grid{margin-bottom:20px}
.strategic-resource-cell strong{color:#facc15}

/* V0.5 Diplomacy */
.dip-hero{display:flex;justify-content:space-between;align-items:center;border:1px solid #5a4b12;background:#11131d;padding:18px;border-radius:10px;margin-bottom:16px}.dip-hero small{color:#77809f;letter-spacing:.15em}.dip-hero h2{color:#facc15;margin:5px 0}.dip-section{margin:16px 0}.dip-section>h3{color:#e8d576;margin:0 0 10px}.dip-card{display:grid;grid-template-columns:minmax(220px,.7fr) 1.3fr;gap:16px;background:#131522;border:1px solid #2b2f44;border-radius:9px;padding:14px;margin-bottom:9px}.dip-card h3{margin:0 0 7px}.dip-status{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}.dip-status span{background:#1d493f;color:#78e4bd;border:1px solid #2c6a5c;border-radius:20px;padding:4px 8px;font-size:11px}.dip-status .neutral{background:#202331;color:#949bb2;border-color:#33374b}.dip-actions{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end;align-content:center}.dip-actions button:disabled,.corp-offer button:disabled{opacity:.38;cursor:not-allowed}.dip-request,.corp-offer,.corp-admin{display:flex;gap:12px;justify-content:space-between;align-items:center;background:#151827;border:1px solid #30344b;padding:11px 13px;border-radius:8px;margin-bottom:7px}.dip-request span,.corp-offer>div{display:flex;gap:8px;align-items:center}.corp-offer>div{flex-direction:column;align-items:flex-start}.locked-tag{font-size:10px;color:#ff7b86;margin-left:8px}.gm-corporations{border-top:1px solid #3b3213;padding-top:16px}.corp-create{display:grid;grid-template-columns:1fr 2fr auto;gap:8px;margin-bottom:10px}.corp-admin{display:grid;grid-template-columns:1fr 1.5fr .7fr 1fr .7fr .7fr auto}.corp-admin span{color:#8f96ae;font-size:12px}@media(max-width:950px){.dip-card{grid-template-columns:1fr}.dip-actions{justify-content:flex-start}.corp-admin,.corp-create{grid-template-columns:1fr 1fr}}

/* V0.5.3 Colony basic data */
.colony-section-title{margin:12px 0 8px;color:#8f95b2;font-size:12px;text-transform:uppercase}
.colony-main-data{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:18px}
.colony-data-row{background:#141624;border:1px solid #2b3045;border-radius:8px;padding:13px 14px;min-height:62px;display:flex;flex-direction:column;gap:7px}
.colony-data-row span{font-size:10px;text-transform:uppercase;color:#8f95b2}
.colony-data-row strong{color:#e8eaf2;font-size:14px}
.gm-economic-focus{grid-column:1/-1;display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:10px}
.gm-economic-focus>label{color:#9aa1b9;font-size:12px}.gm-focus-options{display:flex;gap:10px;flex-wrap:wrap}.gm-focus-options label{font-size:12px;color:#d0d4e1}
@media(max-width:1000px){.colony-main-data{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:650px){.colony-main-data{grid-template-columns:1fr}}

/* V0.5.5 Allied aid */
.allied-aid-btn{border-color:#4b5d8f!important;background:#1a2440!important;color:#cbd8ff!important}

.exchange-planet-modal{position:fixed;inset:0;z-index:12000;background:rgba(2,5,12,.78);backdrop-filter:blur(6px);display:grid;place-items:center;padding:20px}.exchange-planet-dialog{width:min(460px,94vw);background:linear-gradient(160deg,#121827,#090d17);border:1px solid #35415c;border-radius:12px;padding:22px;box-shadow:0 24px 70px #000b}.exchange-planet-dialog h3{margin:6px 0 8px;color:#eef2ff}.exchange-planet-dialog p{color:#8490aa;font-size:12px}.exchange-planet-dialog select{width:100%;min-height:44px;margin:10px 0 18px}.exchange-planet-dialog>div:last-child{display:flex;justify-content:flex-end;gap:8px}.news-channel-tabs{display:flex;gap:8px;margin:0 0 18px;border-bottom:1px solid rgba(115,132,174,.2);padding-bottom:10px}.news-channel-tabs button{background:#0b101c;border:1px solid #29334a;color:#8490aa}.news-channel-tabs button.active{border-color:#b89535;color:#efd86d;background:rgba(184,149,53,.1);box-shadow:inset 0 -2px 0 #b89535}.tree-action-buttons{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.gm-tree-rollback{white-space:nowrap}.corp-market-note{margin-top:10px;color:#8f95b2;font-size:11px}.exchange-corporate-market{margin-top:22px}

/* V0.5.7.1 diplomacy multi-colony polish */
.gallery-head-compact{margin-top:0}.gallery-head-compact p{margin-top:0}.dip-planet-selector{display:flex;flex-direction:column;gap:6px;margin-top:12px;max-width:360px}.dip-planet-selector span{font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:#8e96b1}.dip-planet-selector select{width:100%}

/* V0.5.8 — exchange transfers, taxes and transaction confirmation */
.internal-transfer .exchange-head p,.exchange-tax-panel .exchange-head p{margin:5px 0 0;color:#8f96b5;font-size:13px}.tax-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:10px;margin:14px 0}.tax-grid label{display:flex;align-items:center;gap:8px;padding:11px 12px;border:1px solid #303650;border-radius:8px;background:#111522}.tax-grid label span{flex:1;color:#c8cce0}.tax-grid input{width:72px}.tax-grid strong{color:#f0d65b;font-size:16px}.transaction-confirm{width:min(620px,calc(100vw - 32px))}.transaction-parties{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:14px 0}.transaction-parties>div,.transaction-lines>div{padding:10px 12px;border:1px solid #303650;border-radius:7px;background:#101421}.transaction-parties span,.transaction-lines span{display:block;color:#858daa;font-size:11px;text-transform:uppercase;letter-spacing:.08em;margin-bottom:4px}.transaction-lines{display:grid;gap:7px;margin-bottom:16px}.transaction-lines>div{display:flex;justify-content:space-between;align-items:center}.transaction-lines>div span{margin:0}.transaction-lines .total{border-color:#78641b}.transaction-lines .total b{color:#f0d65b}

/* V0.5.9.3 — compact exchange actions */
.exchange-toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:4px 0 16px;padding-bottom:14px;border-bottom:1px solid rgba(117,129,165,.18)}
.exchange-toolbar button{min-height:40px;padding:0 16px}.exchange-toolbar .exchange-primary-action{border-color:#9d7e18;background:linear-gradient(180deg,rgba(157,126,24,.22),rgba(157,126,24,.08));color:#f1d96b}
.exchange-action-dialog{width:min(570px,calc(100vw - 32px))}.exchange-action-dialog>p{margin:0 0 16px}.exchange-modal-form{display:grid;gap:12px;margin:14px 0 18px}.exchange-modal-form label{display:grid;gap:6px}.exchange-modal-form label>span{font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:#8e96b1}.exchange-modal-form select,.exchange-modal-form input{width:100%;min-height:44px;margin:0}.exchange-modal-two{display:grid;grid-template-columns:1fr 1fr;gap:10px}.exchange-availability{padding:9px 11px;border:1px solid #2e3850;border-radius:7px;background:#0c111d;color:#8f98b4;font-size:12px}.exchange-availability b{color:#dce2f2}.exchange-lot-summary{display:flex;justify-content:space-between;align-items:center;padding:12px 13px;border:1px solid #756116;border-radius:8px;background:rgba(117,97,22,.08)}.exchange-lot-summary span{color:#9ca4bb;font-size:12px}.exchange-lot-summary b{color:#f0d65b;font-size:17px}.exchange-modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:4px}@media(max-width:600px){.exchange-modal-two{grid-template-columns:1fr}.exchange-toolbar{align-items:stretch}.exchange-toolbar button{flex:1 1 100%}}

/* UI 0.7.1: account profile in settings */
.settings-avatar{padding:0;overflow:hidden;border-radius:50%;flex:0 0 58px;width:58px;height:58px}
.settings-avatar img{width:100%;height:100%;object-fit:cover;display:block}
.settings-profile-identity{min-width:0}
.settings-profile-edit{margin-left:auto!important;width:auto!important;padding:10px 14px!important;display:flex!important;align-items:center;gap:10px;text-align:left;background:#0b0f19!important;border:1px solid #343b52!important;box-shadow:none!important}
.settings-profile-edit:hover{background:#14192a!important;border-color:#555de5!important}
.settings-profile-edit>b{color:#facc15;font-size:16px}.settings-profile-edit span{display:grid;gap:2px}.settings-profile-edit strong{font-size:11px!important;margin:0!important}.settings-profile-edit small{font-size:9px!important;letter-spacing:0!important}
@media(max-width:650px){.settings-profile{flex-wrap:wrap}.settings-profile-edit{width:100%!important;margin-left:0!important}}
.character-create-button{margin:0 0 14px 8px;border-color:#756116!important;background:rgba(117,97,22,.12)!important;color:#efd86d!important}.character-create-dialog{width:min(720px,94vw)}.character-create-dialog h2{margin:7px 0 20px;color:#eef2ff}.character-create-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.character-create-grid label{display:grid;gap:6px}.character-create-grid label.wide{grid-column:1/-1}.character-create-grid label>span{font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:#8e96b1}.character-create-grid input,.character-create-grid select{width:100%;box-sizing:border-box;min-height:44px;margin:0}.character-rank-preview{margin-top:16px;padding:13px 15px;border:1px solid #6e5a1b;border-radius:8px;background:rgba(110,90,27,.1);display:grid;grid-template-columns:1fr auto auto;gap:18px;align-items:center;color:#aab1c8}.character-rank-preview strong{color:#efd86d}.character-rank-preview b{color:#eef2ff}.character-create-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:18px}@media(max-width:650px){.character-create-grid{grid-template-columns:1fr}.character-create-grid label.wide{grid-column:auto}.character-rank-preview{grid-template-columns:1fr}}
.learnability-tag{display:inline-block;margin-left:4px;color:#ffd84d;font-weight:800}.gm-skill-tools,.gm-skill-bulk{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.gm-skill-bulk{padding:10px 12px;border:1px solid #2b3043;background:#0c0f19;margin-bottom:8px}.gm-skill-bulk span{min-width:95px;color:#aeb6ce}.gm-skill-row{align-items:center}.gm-skill-check{flex:0 0 auto}.gm-skill-check input{width:16px;height:16px}.gm-skill-main{flex:1;min-width:220px}.gm-skill-actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.gm-skill-actions select{min-width:150px}.gm-skill-modal{width:min(760px,94vw)}.gm-skill-modal label{display:flex;flex-direction:column;gap:6px;color:#9fb1d6;font-size:12px;text-transform:uppercase;letter-spacing:.05em;margin-top:12px}.gm-skill-modal input,.gm-skill-modal select,.gm-skill-modal textarea{margin-top:0;text-transform:none;letter-spacing:normal}.gm-skill-modal textarea{min-height:140px}.gm-skill-modal-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.gm-skill-modal .modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}@media(max-width:800px){.gm-skill-modal-grid{grid-template-columns:1fr}.gm-skill-actions{width:100%}}

/* 0.8.3.4.1 — rank editing in character update modal */
.rank-edit-note{font-size:11px;line-height:1.35;color:#8f95b2;border:1px solid #303449;background:#141624;border-radius:6px;padding:8px 10px}
