:root{
  --os-bg:#061126;
  --os-surface:#0d1f3d;
  --os-surface-2:#11284d;
  --os-card:rgba(255,255,255,.08);
  --os-card-2:#ffffff;
  --os-line:rgba(255,255,255,.14);
  --os-line-soft:#dbe4ee;
  --os-text:#f4f8ff;
  --os-muted:#bdd0ef;
  --os-ink:#0f172a;
  --os-ink-muted:#58677d;
  --os-brand:#0a74d1;
  --os-brand-2:#36a3ff;
  --os-brand-3:#7ec8ff;
  --os-radius:28px;
  --os-shadow:0 28px 70px rgba(4,12,28,.35);
  --os-white-shadow:0 18px 38px rgba(15,23,42,.06);
}
*{box-sizing:border-box}
html,body{min-height:100%}
body{
  margin:0;
  font-family:'Inter',system-ui,sans-serif;
  background:linear-gradient(180deg,#071123 0%,#0a1630 30%,#edf3f8 30%,#edf3f8 100%);
  color:var(--os-text);
}
a{text-decoration:none;color:inherit}
.os-shell{min-height:100vh}
.os-container{width:100%;max-width:1480px;margin:0 auto;padding:0 22px;padding-left:max(22px,env(safe-area-inset-left));padding-right:max(22px,env(safe-area-inset-right))}
.os-top{
  position:sticky;
  top:0;
  z-index:40;
  background:linear-gradient(180deg,rgba(7,17,35,.94),rgba(7,17,35,.82) 72%,rgba(7,17,35,0));
  backdrop-filter:blur(12px);
}
.os-top__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:18px 0;
}
.os-brand{display:flex;align-items:center;gap:18px;min-width:0}
.os-brand img{height:42px;width:auto;display:block}
.os-brand__meta{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1 1 auto}
.os-kicker{font-size:12px;letter-spacing:.16em;text-transform:uppercase;font-weight:800;color:#90a8cc;line-height:1.35}
.os-sub{font-size:14px;color:#c0d3f0;line-height:1.5}
.os-top__actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.os-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:13px 18px;
  border-radius:999px;
  font-weight:800;
  border:1px solid var(--os-line);
  transition:.2s ease;
  cursor:pointer;
}
.os-btn:hover{transform:translateY(-1px)}
.os-btn[hidden]{display:none !important}
.os-btn--ghost{background:rgba(255,255,255,.07);color:#fff}
.os-btn--primary{background:linear-gradient(135deg,var(--os-brand),var(--os-brand-2));border-color:transparent;color:#fff;box-shadow:0 18px 36px rgba(14,127,193,.26)}
.os-btn--light{background:#fff;color:#0c1830;border-color:#dbe4ee}
.os-page{padding:0 0 64px 0;overflow-x:hidden}
.os-footer{padding:0 22px 24px;text-align:center;color:#7185a3;font-size:12px}
.os-messages{display:grid;gap:10px;margin:8px auto 20px;width:min(100%,1100px);padding:0 22px}
.os-msg{padding:16px 18px;border-radius:20px;background:#fff;color:#0f172a;border:1px solid #dce6f0;box-shadow:0 16px 34px rgba(15,23,42,.08)}
.os-msg strong{display:block;margin-bottom:4px}
.pill{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:8px 12px;border-radius:999px;background:#fff;border:1px solid #dbe7f2;font-size:12px;font-weight:800;color:#0f172a;white-space:normal;line-height:1.4;text-align:center}
.pill-success{background:#ecfdf5;border-color:#bbf7d0;color:#166534}
.pill-warning{background:#fff7ed;border-color:#fed7aa;color:#9a3412}
.pill-danger{background:#fef2f2;border-color:#fecaca;color:#991b1b}

.hub-shell{width:min(100%,1600px);margin:0 auto;padding:18px 20px 96px;color:var(--os-ink)}
.hub-top{display:flex;justify-content:space-between;gap:18px;align-items:center;flex-wrap:wrap;margin-bottom:18px}
.hub-brand{display:flex;gap:14px;align-items:center;text-decoration:none}
.hub-brand img{height:40px;width:auto;display:block}
.hub-brand-meta{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1 1 auto}
.hub-kicker{font-size:12px;letter-spacing:.16em;text-transform:uppercase;font-weight:800;color:#6c819f;line-height:1.35}
.hub-subtitle{color:#64748b;font-size:14px;line-height:1.5}
.hub-card{background:#fff;border:1px solid #e2e8f0;border-radius:28px;box-shadow:var(--os-white-shadow);padding:22px}
.hub-nav{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:18px;
  padding:14px;
  border-radius:24px;
  border:1px solid rgba(255,255,255,.14);
  background:linear-gradient(135deg,rgba(13,31,61,.86),rgba(17,40,77,.78));
  box-shadow:0 20px 40px rgba(7,17,35,.22);
}
.hub-nav__item{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:13px 16px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.08);
  color:#e8f0fb;
  font-weight:800;
  text-decoration:none;
  transition:.18s ease;
}
.hub-nav__item:hover{transform:translateY(-1px);background:rgba(255,255,255,.12);color:#fff}
.hub-nav__item.is-active{background:linear-gradient(135deg,var(--os-brand),var(--os-brand-2));color:#fff;border-color:transparent;box-shadow:0 16px 30px rgba(14,127,193,.22)}
.hub-messages{display:grid;gap:10px;margin-bottom:18px}.hub-msg{padding:14px 16px;border-radius:18px;border:1px solid #dbe4ee;background:#fff;color:var(--os-ink);box-shadow:0 12px 24px rgba(15,23,42,.04)}.hub-msg strong{display:block;color:#0f172a}
.hub-bottom-nav{display:none}
.hub-icon-link{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:46px;
  height:46px;
  border-radius:14px;
  border:1px solid var(--os-line);
  background:rgba(255,255,255,.08);
  color:#fff;
  text-decoration:none;
  transition:.18s ease;
}
.hub-icon-link:hover{transform:translateY(-1px);background:rgba(255,255,255,.14)}
.hub-badge{position:absolute;top:-5px;right:-5px;min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:#dc2626;color:#fff;font-size:11px;font-weight:800;display:flex;align-items:center;justify-content:center}.hub-badge--inline{position:static;margin-left:4px;min-width:20px;height:20px}
.hub-top-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.user-menu{position:relative}
.user-menu summary{
  list-style:none;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:12px;
  padding:8px 14px 8px 8px;
  border-radius:999px;
  background:rgba(255,255,255,.08);
  border:1px solid var(--os-line);
  color:#fff;
  font-weight:800;
  box-shadow:0 10px 24px rgba(7,17,35,.14)
}
.user-menu summary::-webkit-details-marker{display:none}
.user-menu[open] .user-menu__box{display:block}
.user-menu__box{display:none;position:absolute;right:0;top:calc(100% + 10px);min-width:336px;padding:12px;background:#fff;border:1px solid #dbe4ee;border-radius:24px;box-shadow:0 24px 44px rgba(15,23,42,.12);z-index:40}
.user-menu__box a,.user-menu__box button{width:100%;display:flex;align-items:center;gap:10px;padding:14px 16px;border-radius:16px;background:#fff;border:0;text-align:left;color:#0f172a;font-weight:700;box-sizing:border-box}
.user-menu__box a:hover,.user-menu__box button:hover{background:#f8fafc}
.user-menu__meta{display:grid;grid-template-columns:72px 1fr;gap:14px;align-items:center;padding:12px 14px 14px 14px;border-bottom:1px solid #e2e8f0;margin-bottom:8px}
.user-menu__meta strong{display:block}.user-menu__meta span{display:block;font-size:13px;color:#64748b;margin-top:4px}
.user-menu__name{display:flex;flex-direction:column;align-items:flex-start;line-height:1.1;min-width:0;flex:1 1 auto}.user-menu__name > span{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.user-menu__name small{font-size:11px;font-weight:700;color:#dbe6f7}
.profile-badge,.user-menu__hero{position:relative;border-radius:999px;overflow:hidden;background:linear-gradient(135deg,#dbeafe,#bfdbfe);border:1px solid #cbd5e1;display:flex;align-items:center;justify-content:center}
.profile-badge{width:42px;height:42px;flex-shrink:0}
.profile-badge img,.user-menu__hero img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}
.user-menu__hero{width:72px;height:72px}

@media (max-width: 900px){
  body{background:linear-gradient(180deg,#071123 0%,#0a1630 24%,#edf3f8 24%,#edf3f8 100%)}
  .os-container{padding:0 14px;padding-left:max(14px,env(safe-area-inset-left));padding-right:max(14px,env(safe-area-inset-right))}
  .os-top__inner{align-items:stretch;justify-content:flex-start;flex-direction:column;gap:12px;padding-top:12px;padding-top:calc(12px + env(safe-area-inset-top));padding-bottom:14px}
  .os-brand{width:100%;align-items:flex-start;gap:12px}
  .os-brand img{height:34px}
  .os-sub{font-size:13px}
  .os-top__actions{width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;align-items:stretch}
  .os-top__actions .os-btn{width:100%;min-width:0}
  .os-top__actions .os-btn:last-child:nth-child(odd){grid-column:1/-1}
  .hub-shell{padding:14px 14px 104px;padding-top:calc(14px + env(safe-area-inset-top))}
  .hub-top{align-items:stretch;justify-content:flex-start;flex-direction:column;gap:12px;margin-bottom:14px}
  .hub-bottom-nav{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;position:fixed;left:10px;right:10px;bottom:10px;padding:10px;background:rgba(15,23,42,.96);border-radius:22px;box-shadow:0 18px 34px rgba(15,23,42,.28)}
  .hub-bottom-nav a{display:flex;flex-direction:column;align-items:center;gap:4px;color:#fff;text-decoration:none;font-size:11px;padding:8px 4px}
  .hub-nav{display:none}
  .hub-brand{width:100%;gap:12px;align-items:flex-start;min-width:0}
  .hub-brand img{height:32px}
  .hub-subtitle{font-size:13px}
  .hub-top-actions{width:100%;justify-content:flex-start;flex-wrap:nowrap}
  .hub-icon-link{flex:0 0 46px}
  .user-menu{flex:1 1 auto;min-width:0}
  .user-menu summary{width:100%;justify-content:space-between;padding-right:12px}
  .user-menu__box{left:0;right:0;min-width:0;width:100%}
}
@media (max-width: 560px){
  .os-top__actions{grid-template-columns:1fr}
}
