:root {
  --bg: #020a0c;
  --panel: rgba(5, 24, 27, .76);
  --panel-strong: rgba(4, 18, 21, .94);
  --cyan: #18f4e6;
  --cyan-soft: #80fff7;
  --orange: #ff9418;
  --text: #ecffff;
  --muted: #79a3a7;
  --line: rgba(24, 244, 230, .22);
  --orange-line: rgba(255, 148, 24, .36);
  --shadow: 0 0 42px rgba(24, 244, 230, .1);
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--bg); }

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -20%, rgba(14, 115, 111, .22), transparent 42%),
    radial-gradient(circle at 88% 72%, rgba(255, 148, 24, .08), transparent 28%),
    #020a0c;
  font-family: Inter, Arial, sans-serif;
}

button, input { font: inherit; }

a { color: inherit; }

.scanlines,
.grid-floor,
.pointer-halo { position: fixed; inset: 0; pointer-events: none; }

.scanlines {
  z-index: 20;
  opacity: .18;
  background: repeating-linear-gradient(180deg, transparent 0 3px, rgba(111, 255, 247, .055) 4px);
  mix-blend-mode: screen;
}

.grid-floor {
  z-index: -1;
  opacity: .3;
  background-image:
    linear-gradient(rgba(24, 244, 230, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 244, 230, .05) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, transparent, black 30%, black 76%, transparent);
}

.pointer-halo {
  z-index: 1;
  width: 320px;
  height: 320px;
  inset: auto;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(24, 244, 230, .085), transparent 68%);
  opacity: 0;
  transition: opacity .25s ease;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
}

.access-panel {
  width: min(560px, 100%);
  padding: 30px clamp(24px, 5vw, 50px) 22px;
  position: relative;
  text-align: center;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(5, 29, 32, .9), rgba(2, 11, 13, .94));
  box-shadow: 0 30px 100px rgba(0, 0, 0, .6), inset 0 0 52px rgba(24, 244, 230, .025);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px));
}

.access-panel::before,
.access-panel::after {
  content: '';
  position: absolute;
  width: 92px;
  height: 1px;
  background: var(--orange);
  box-shadow: 0 0 14px rgba(255, 148, 24, .65);
}

.access-panel::before { top: 0; left: 28px; }
.access-panel::after { bottom: 0; right: 28px; }

.access-orbit {
  width: 154px;
  height: 154px;
  margin: 0 auto 18px;
  position: relative;
  display: grid;
  place-items: center;
}

.orbit { position: absolute; border-radius: 50%; }

.orbit-one {
  inset: 0;
  border: 1px solid rgba(24, 244, 230, .38);
  border-top-color: var(--cyan);
  border-right-color: transparent;
  animation: spin 10s linear infinite;
}

.orbit-two {
  inset: 14px;
  border: 2px dashed rgba(24, 244, 230, .42);
  animation: spin-reverse 18s linear infinite;
}

.orbit-three {
  inset: 30px;
  border: 2px solid transparent;
  border-top-color: var(--orange);
  border-right-color: var(--orange);
  animation: spin 7s linear infinite;
}

.access-mark {
  width: 78px;
  height: 78px;
  display: grid;
  align-content: center;
  border-radius: 50%;
  border: 1px solid var(--cyan);
  background: #031416;
  box-shadow: 0 0 30px rgba(24, 244, 230, .22), inset 0 0 22px rgba(24, 244, 230, .08);
}

.access-mark strong {
  font: 700 1rem/1 Rajdhani, sans-serif;
  letter-spacing: .06em;
}

.access-mark small { margin-top: 4px; color: var(--orange); font-size: .62rem; font-weight: 700; letter-spacing: .12em; }

.eyebrow {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .28em;
}

.access-panel h1 {
  margin: 0;
  font: 700 clamp(1.9rem, 6vw, 2.55rem)/.98 Rajdhani, sans-serif;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.access-copy { margin: 10px 0 18px; color: var(--muted); font-size: .9rem; }

.access-form { display: grid; gap: 12px; text-align: left; }

.access-form label span {
  display: block;
  margin: 0 0 7px;
  color: #aac7ca;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.access-form input {
  width: 100%;
  min-height: 46px;
  padding: 0 16px;
  outline: none;
  color: var(--text);
  border: 1px solid rgba(24, 244, 230, .22);
  background: rgba(0, 8, 10, .76);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.access-form input:focus {
  border-color: var(--cyan);
  background: rgba(2, 20, 22, .9);
  box-shadow: 0 0 0 3px rgba(24, 244, 230, .08), 0 0 18px rgba(24, 244, 230, .08);
}

.form-error { margin: -3px 0 0; color: #ffb15c; font-size: .85rem; }

.access-button {
  min-height: 50px;
  margin-top: 4px;
  color: var(--orange);
  border: 1px solid var(--orange);
  background: linear-gradient(90deg, rgba(255, 148, 24, .045), rgba(24, 244, 230, .035));
  font: 700 .82rem/1 Inter, sans-serif;
  letter-spacing: .18em;
  cursor: pointer;
  transition: color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease;
}

.access-button:hover,
.access-button:focus-visible {
  color: #061012;
  background: var(--orange);
  box-shadow: 0 0 32px rgba(255, 148, 24, .28);
  transform: translateY(-2px);
}

.access-button i { margin-left: 12px; font-style: normal; }

.secure-note { margin: 17px 0 0; color: #688b8f; font-size: .6rem; letter-spacing: .17em; }
.secure-note span { display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 9px var(--cyan); }

.portal-shell { min-height: 100vh; display: flex; flex-direction: column; position: relative; z-index: 2; }

.portal-header {
  min-height: 92px;
  padding: 18px clamp(20px, 4vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 12, 14, .82);
  backdrop-filter: blur(18px);
}

.brand-lockup { display: flex; align-items: center; gap: 15px; }

.mini-orbit {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  position: relative;
  border: 1px solid var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 22px rgba(24, 244, 230, .13);
}

.mini-orbit::after {
  content: '';
  position: absolute;
  inset: -6px;
  border: 1px dashed rgba(255, 148, 24, .65);
  border-radius: 50%;
  animation: spin 10s linear infinite;
}

.mini-orbit span { font: 700 1rem Rajdhani, sans-serif; color: var(--cyan-soft); }
.brand-lockup p { margin: 0 0 3px; color: var(--orange); font-size: .64rem; font-weight: 700; letter-spacing: .24em; }
.brand-lockup h1 { margin: 0; font: 700 clamp(1.05rem, 2.2vw, 1.55rem)/1 Rajdhani, sans-serif; letter-spacing: .08em; }

.session-tools { display: flex; align-items: center; gap: 12px; }
.welcome { display: grid; justify-items: end; margin-right: 8px; }
.welcome small { color: var(--muted); font-size: .58rem; letter-spacing: .2em; }
.welcome strong { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }

.icon-button,
.logout-button {
  min-height: 38px;
  color: #9dc5c8;
  border: 1px solid var(--line);
  background: rgba(5, 30, 32, .58);
  cursor: pointer;
  transition: color .2s, border-color .2s, box-shadow .2s;
}

.icon-button { width: 42px; font-size: .8rem; }
.logout-button { padding: 0 14px; font-size: .62rem; font-weight: 700; letter-spacing: .13em; }
.icon-button:hover, .logout-button:hover { color: var(--orange); border-color: var(--orange); box-shadow: 0 0 18px rgba(255, 148, 24, .1); }

.command-center {
  width: min(1540px, 100%);
  margin: auto;
  padding: clamp(34px, 5vw, 76px) clamp(20px, 4vw, 64px) 52px;
}

.section-heading { text-align: center; }
.section-heading p { margin: 0 0 9px; color: var(--cyan); font-size: .67rem; font-weight: 700; letter-spacing: .25em; }
.section-heading h2 { margin: 0; font: 700 clamp(2rem, 4vw, 3.5rem)/1 Rajdhani, sans-serif; text-transform: uppercase; letter-spacing: .035em; }
.section-heading span { display: block; margin-top: 12px; color: var(--muted); font-size: .9rem; }

.brand-grid {
  margin-top: clamp(42px, 6vw, 72px);
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(10px, 1.35vw, 22px);
  justify-items: center;
}

.brand-node {
  --accent: var(--cyan);
  grid-column: span 1;
  width: min(190px, 100%);
  aspect-ratio: 1;
  position: relative;
  display: grid;
  place-items: center;
  color: var(--text);
  text-decoration: none;
  border-radius: 50%;
  outline: none;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .45));
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), filter .35s ease;
}

.brand-node::before,
.brand-node::after {
  content: '';
  position: absolute;
  border-radius: 50%;
}

.brand-node::before {
  inset: 10px;
  background: radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--accent) 10%, transparent), rgba(2, 12, 14, .96) 67%);
  border: 1px solid color-mix(in srgb, var(--accent) 44%, transparent);
  box-shadow: inset 0 0 28px color-mix(in srgb, var(--accent) 8%, transparent), 0 0 26px color-mix(in srgb, var(--accent) 8%, transparent);
}

.brand-node::after {
  inset: -5px;
  border: 1px dotted color-mix(in srgb, var(--accent) 58%, transparent);
  animation: spin 24s linear infinite;
}

.node-rings {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 25deg, transparent 0 10%, var(--accent) 10% 22%, transparent 22% 52%, var(--orange) 52% 61%, transparent 61% 88%, var(--accent) 88% 92%, transparent 92%);
  mask: radial-gradient(circle, transparent 67%, black 68% 72%, transparent 73%);
  animation: spin 9s linear infinite;
  opacity: .82;
}

.node-core { position: relative; z-index: 2; width: 72%; text-align: center; display: grid; gap: 5px; }
.node-core b { color: var(--accent); font: 700 clamp(1rem, 1.75vw, 1.32rem)/1 Rajdhani, sans-serif; letter-spacing: .045em; text-shadow: 0 0 14px color-mix(in srgb, var(--accent) 26%, transparent); }
.node-core small { color: #f1ffff; font-size: clamp(.48rem, .8vw, .65rem); font-weight: 700; line-height: 1.25; letter-spacing: .13em; }

.node-status {
  position: absolute;
  z-index: 3;
  bottom: 19px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #75999c;
  font-size: .5rem;
  font-weight: 700;
  letter-spacing: .12em;
}

.node-status i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 7px var(--accent); }

.brand-node:hover,
.brand-node:focus-visible {
  transform: translateY(-10px) scale(1.045);
  filter: drop-shadow(0 24px 38px color-mix(in srgb, var(--accent) 16%, rgba(0,0,0,.5)));
}

.brand-node:hover .node-rings,
.brand-node:focus-visible .node-rings { animation-duration: 3.4s; opacity: 1; }
.brand-node:hover .node-core b,
.brand-node:focus-visible .node-core b { color: var(--accent); text-shadow: 0 0 20px color-mix(in srgb, var(--accent) 58%, transparent); }

.cafe { --accent: #ff9418; }
.family { --accent: #ffb321; }
.gambary { --accent: #ff6f35; }
.green { --accent: #6bff87; }
.rehab { --accent: #55bfff; }

footer {
  min-height: 55px;
  padding: 15px clamp(20px, 4vw, 64px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  color: #5f8084;
  border-top: 1px solid var(--line);
  font-size: .57rem;
  letter-spacing: .15em;
}

footer a { color: var(--orange); text-decoration: none; }

.toast {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: 22px;
  padding: 11px 18px;
  color: #dffffc;
  border: 1px solid var(--line);
  background: rgba(2, 17, 19, .95);
  box-shadow: var(--shadow);
  font-size: .72rem;
  letter-spacing: .08em;
  opacity: 0;
  transform: translate(-50%, 18px);
  transition: opacity .2s, transform .2s;
  pointer-events: none;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spin-reverse { to { transform: rotate(-360deg); } }

@media (max-width: 1100px) {
  .brand-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .brand-node { grid-column: span 1; width: min(210px, 100%); }
}

@media (max-width: 720px) {
  .portal-header { align-items: flex-start; }
  .welcome, .logout-button { display: none; }
  .brand-lockup h1 { font-size: 1rem; }
  .brand-lockup p { font-size: .55rem; }
  .brand-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
  .brand-node { grid-column: span 1; width: min(180px, 100%); }
  .node-status { bottom: 13px; font-size: .42rem; }
  footer { flex-direction: column; text-align: center; }
}

@media (max-width: 420px) {
  .access-panel { padding-inline: 20px; }
  .access-orbit { width: 142px; height: 142px; }
  .brand-grid { gap: 18px 8px; }
  .node-core b { font-size: .96rem; }
  .node-core small { font-size: .43rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
