/* NxtGen Team Hub. Locked nxtgennetwork.com theme. */
:root {
  --bg: #0D0D0D;
  --card: #141414;
  --card-2: #1B1B1B;
  --line: #262626;
  --text: #CCCCCC;
  --muted: #8C8C8C;
  --white: #FFFFFF;
  --accent: #F05A28;
  --accent-hover: #C94820;
  --ok: #CCCCCC;
  --radius: 10px;
  --head: "Montserrat", system-ui, sans-serif;
  --body: "Open Sans", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 15px/1.55 var(--body); min-height: 100vh; }
h1, h2, h3 { font-family: var(--head); color: var(--white); margin: 0; letter-spacing: -0.01em; }
a { color: var(--accent); }
img { display: block; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* top bar */
.bar { display: flex; align-items: center; gap: 28px; padding: 14px clamp(16px, 4vw, 40px); border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand img { height: 34px; width: auto; }
.brand-tag { font: 700 12px/1 var(--head); color: var(--accent); text-transform: uppercase; letter-spacing: 0.14em; padding-left: 14px; border-left: 1px solid var(--line); }
.topnav { display: flex; gap: 6px; margin-left: 8px; }
.topnav a { color: var(--text); text-decoration: none; font: 600 14px/1 var(--head); padding: 10px 14px; border-radius: 8px; }
.topnav a:hover { color: var(--white); background: var(--card); }
.topnav a.on { color: var(--white); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.me { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.me form { margin: 0; }

main { max-width: 1180px; margin: 0 auto; padding: clamp(24px, 4vw, 48px) clamp(16px, 4vw, 40px) 64px; }

/* avatars */
.avatar { border-radius: 50%; object-fit: cover; background: var(--card-2); flex: none; }
.avatar-empty { display: inline-flex; align-items: center; justify-content: center; color: var(--muted); border: 1px solid var(--line); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font: 700 14px/1 var(--head); text-decoration: none; border: 0; border-radius: 8px; padding: 13px 22px; cursor: pointer; transition: background-color .15s ease; }
.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: transparent; color: var(--white); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--accent); }
.link-btn { background: none; border: 0; color: var(--muted); font: 600 13px/1 var(--body); cursor: pointer; padding: 6px 0; }
.link-btn:hover { color: var(--white); text-decoration: underline; }

.notice { background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 8px; padding: 12px 14px; color: var(--white); margin: 0 0 20px; }
.notice-ok { border-left-color: var(--text); }

/* sign in */
.login { min-height: calc(100vh - 160px); display: grid; place-items: center; }
.login-card { width: min(440px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 40px 36px; text-align: center; }
.login-mark { margin: 0 auto 18px; border-radius: 12px; }
.login-card h1 { font-size: 26px; margin-bottom: 10px; }
.login-card .muted { margin: 0 0 26px; }
.btn-google { width: 100%; padding: 15px 22px; }
.dev { margin-top: 22px; padding-top: 20px; border-top: 1px dashed var(--line); display: grid; gap: 10px; text-align: left; }
.fine { margin: 24px 0 0; font-size: 13px; color: var(--muted); }

/* forms */
label { display: grid; gap: 6px; font: 600 12px/1.2 var(--head); color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
input[type="email"], input:not([type]), select {
  font: 400 15px/1.3 var(--body); color: var(--white); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; width: 100%; text-transform: none; letter-spacing: 0;
}
input:focus, select:focus { border-color: var(--accent); outline: none; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%238C8C8C' stroke-width='1.6'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; cursor: pointer; }
select:disabled { opacity: .45; cursor: not-allowed; }
input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--accent); cursor: pointer; }

/* home */
.hello { display: flex; align-items: center; gap: 18px; margin-bottom: 32px; }
.hello h1 { font-size: clamp(26px, 3.4vw, 36px); }
.hello p { margin: 4px 0 0; }
.tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.tool { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; gap: 10px; transition: border-color .15s ease; }
.tool:hover { border-color: #3a3a3a; }
.tool-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.tool-icon { color: var(--accent); }
.role { font: 700 11px/1 var(--head); text-transform: uppercase; letter-spacing: 0.1em; color: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 7px 11px; }
.tool h2 { font-size: 21px; }
.tool p { margin: 0; flex: 1; }
.tool-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--line); }
.sso { font-size: 13px; color: var(--muted); }
.sso-on { color: var(--white); }
.sso-on::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: 1px; }
.empty { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px; text-align: center; grid-column: 1 / -1; }
.empty h1, .empty h2 { font-size: 22px; margin-bottom: 8px; }
.empty .btn { margin-top: 18px; }

/* team */
.page-head { margin-bottom: 24px; }
.page-head h1 { font-size: clamp(26px, 3.4vw, 34px); margin-bottom: 6px; }
.page-head p { margin: 0; max-width: 640px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.panel-title { font-size: 17px; margin-bottom: 16px; }
.add { display: grid; grid-template-columns: 1fr 1.3fr auto; gap: 14px; align-items: end; }
.matrix-wrap { overflow-x: auto; margin: -4px -4px 0; padding: 4px; }
.matrix { width: 100%; border-collapse: collapse; min-width: 900px; }
.matrix th, .matrix td { text-align: left; padding: 14px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.matrix thead th { font: 700 11px/1.2 var(--head); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); border-bottom-color: #333; }
.matrix td select { min-width: 150px; }
main.wide { max-width: 1320px; }
.matrix tr.off .who-text strong { color: var(--muted); }
.center { text-align: center !important; }
.who { display: flex; align-items: center; gap: 12px; min-width: 250px; font-weight: 400; }
.who-text { display: grid; gap: 2px; }
.who-text strong { color: var(--white); font: 600 15px/1.3 var(--head); }
.you { font: 700 10px/1 var(--head); color: var(--accent); text-transform: uppercase; letter-spacing: 0.1em; margin-left: 6px; }
.row-actions { text-align: right; white-space: nowrap; }
.save-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; }
.save-row p { margin: 0; }
.activity { list-style: none; margin: 0; padding: 0; display: grid; }
.activity li { display: grid; grid-template-columns: 150px 1fr; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.activity li:last-child { border-bottom: 0; }
.activity strong { color: var(--white); font-weight: 600; }
.when { color: var(--muted); font-size: 13px; }

@media (max-width: 760px) {
  .bar { flex-wrap: wrap; gap: 10px 16px; }
  .brand img { height: 28px; }
  .topnav { order: 3; width: 100%; margin: 0; overflow-x: auto; }
  .tools { grid-template-columns: 1fr; }
  .add { grid-template-columns: 1fr; }
  .add .btn { width: 100%; }
  .matrix { min-width: 0; }
  .matrix thead { display: none; }
  .matrix, .matrix tbody, .matrix tr, .matrix th, .matrix td { display: block; width: 100%; }
  .matrix tr { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 14px; margin-bottom: 14px; background: var(--bg); }
  .matrix th, .matrix td { border: 0; padding: 8px 0; }
  .matrix th.who { display: flex; }
  .matrix td[data-label] { display: grid; grid-template-columns: 1fr 1.3fr; align-items: center; gap: 12px; }
  .matrix td[data-label]::before { content: attr(data-label); font: 600 13px/1.2 var(--head); color: var(--text); }
  .matrix td.center { text-align: left !important; }
  .row-actions { text-align: left; }
  .save-row { flex-direction: column; align-items: stretch; }
  .activity li { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- Tools page: tools on a glowing ring around the spinning NxtGen symbol ---------- */
.hello-center { flex-direction: column; text-align: center; gap: 12px; margin-bottom: 8px; }
.hello-center .avatar { margin: 0 auto; }
.orbit { position: relative; width: min(600px, 100%); aspect-ratio: 1; margin: 8px auto 0; }
.ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ring circle { fill: none; }
.ring-base { stroke: var(--accent); stroke-width: .5; opacity: .55; }
.ring-glow { stroke: var(--accent); stroke-width: 1.4; opacity: .35; filter: blur(1.2px); animation: ringPulse 3.2s ease-in-out infinite; }
.ring-run { stroke: #FF8A5C; stroke-width: 1.1; stroke-linecap: round; stroke-dasharray: 14 205.9; transform-origin: 50% 50%; animation: ringRun 7s linear infinite; filter: drop-shadow(0 0 1.6px var(--accent)); }
.ring-run.r2 { animation-delay: -3.5s; }
.spoke { stroke: var(--accent); stroke-width: .35; stroke-dasharray: 1.2 1.6; opacity: .6; animation: spokeFlow 1.8s linear infinite; }
@keyframes ringPulse { 0%, 100% { opacity: .2; } 50% { opacity: .65; } }
@keyframes ringRun { to { transform: rotate(360deg); } }
@keyframes spokeFlow { to { stroke-dashoffset: -5.6; } }

/* light rippling out from the center */
.ripple { position: absolute; left: 50%; top: 50%; width: 26%; aspect-ratio: 1; margin: -13% 0 0 -13%; border-radius: 50%; border: 1px solid var(--accent); opacity: 0; animation: ripple 4.8s ease-out infinite; pointer-events: none; }
.ripple.r2 { animation-delay: -2.4s; }
@keyframes ripple { 0% { transform: scale(.85); opacity: .55; } 100% { transform: scale(2.7); opacity: 0; } }

/* center: the NxtGen symbol turning on its vertical axis */
.core { position: absolute; left: 50%; top: 50%; width: 24%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, #1E1410 0%, #0D0D0D 70%); border: 1px solid #3A2418; box-shadow: 0 0 40px rgba(240, 90, 40, .28), inset 0 0 24px rgba(240, 90, 40, .12); display: grid; place-items: center; perspective: 600px; }
.spin { width: 62%; aspect-ratio: 1; animation: spinY 6s linear infinite; transform-style: preserve-3d; }
.spin img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0 10px rgba(240, 90, 40, .45)); }
@keyframes spinY { to { transform: rotateY(360deg); } }

/* the tool pucks: centers sit exactly on the ring (radius 35% of the box) */
.puck { position: absolute; width: 30%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; text-align: center; text-decoration: none; background: radial-gradient(circle at 50% 35%, #1D1D1D 0%, #141414 65%); border: 1px solid #3A3A3A; box-shadow: 0 10px 30px rgba(0, 0, 0, .55), 0 0 0 4px #0D0D0D; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; z-index: 2; }
.p0 { left: 35%; top: 0; } .p1 { left: 70%; top: 35%; } .p2 { left: 35%; top: 70%; } .p3 { left: 0; top: 35%; }
.puck-in { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0 12%; }
.puck .tool-icon { width: 28px; height: 28px; color: var(--accent); }
.puck-name { font: 700 clamp(13px, 2.4vw, 17px)/1.2 var(--head); color: var(--white); }
.puck-role { font: 600 10.5px/1 var(--head); letter-spacing: .08em; text-transform: uppercase; color: var(--text); border: 1px solid #3A3A3A; border-radius: 999px; padding: 5px 9px; white-space: nowrap; }
a.puck:hover, a.puck:focus-visible { transform: scale(1.06); border-color: var(--accent); box-shadow: 0 10px 30px rgba(0, 0, 0, .55), 0 0 0 4px #0D0D0D, 0 0 28px rgba(240, 90, 40, .45); outline: none; }
a.puck:hover .puck-role, a.puck:focus-visible .puck-role { border-color: var(--accent); color: var(--white); }
.puck-off { opacity: .42; cursor: default; }
.puck-off .tool-icon { color: var(--muted); }

@media (max-width: 560px) {
  .orbit { width: min(400px, 100%); }
  .puck { width: 33%; left: auto; top: auto; }
  .p0 { left: 33.5%; top: -1.5%; } .p1 { left: 68.5%; top: 33.5%; } .p2 { left: 33.5%; top: 68.5%; } .p3 { left: -1.5%; top: 33.5%; }
  .puck-in { gap: 4px; padding: 0 9%; }
  .puck .tool-icon { width: 22px; height: 22px; }
  .puck-name { font-size: 12.5px; }
  .puck-role { font-size: 9px; padding: 4px 7px; letter-spacing: .06em; }
}
@media (prefers-reduced-motion: reduce) {
  .spin, .ring-run, .ring-glow, .spoke, .ripple { animation: none; }
  .ripple { display: none; }
}
