:root {
  --bg: #07101f;
  --bg-top: #0a1327;
  --ink: #f2f5ff;
  --muted: rgba(216, 226, 255, 0.7);
  --muted-soft: rgba(216, 226, 255, 0.48);
  --line: rgba(255, 255, 255, 0.1);
  --glass: rgba(255, 255, 255, 0.055);
  --glass-strong: rgba(255, 255, 255, 0.085);
  --shadow: 0 28px 80px rgba(2, 9, 23, 0.45);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --font-display: "Sora", sans-serif;
  --font-body: "IBM Plex Sans", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(ellipse 120% 70% at 15% 0%, rgba(234, 180, 48, 0.18) 0%, transparent 58%),
    radial-gradient(ellipse 90% 60% at 85% 100%, rgba(42, 112, 255, 0.2) 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 55% 45%, rgba(209, 54, 54, 0.09) 0%, transparent 60%),
    linear-gradient(160deg, #060b15 0%, #09101d 42%, #07101f 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.06) 0, transparent 2px),
    radial-gradient(circle at 72% 31%, rgba(255, 255, 255, 0.08) 0, transparent 1px),
    radial-gradient(circle at 81% 77%, rgba(255, 255, 255, 0.08) 0, transparent 2px),
    radial-gradient(circle at 33% 83%, rgba(255, 255, 255, 0.06) 0, transparent 1px);
  opacity: 0.75;
}

body::after {
  background: linear-gradient(180deg, rgba(4, 8, 17, 0.18), rgba(4, 8, 17, 0.36));
}

button,
input,
a {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.page-shell {
  position: relative;
  z-index: 1;
  max-width: 1640px;
  margin: 0 auto;
  padding: 32px 18px 70px;
}

.ambient {
  position: absolute;
  border-radius: 999px;
  filter: blur(34px);
  opacity: 0.45;
  pointer-events: none;
}

.ambient-a {
  width: 380px;
  height: 380px;
  top: -120px;
  right: -120px;
  background: rgba(232, 197, 71, 0.16);
}

.ambient-b {
  width: 280px;
  height: 280px;
  top: 36%;
  left: -100px;
  background: rgba(45, 120, 200, 0.16);
}

.ambient-c {
  width: 340px;
  height: 340px;
  bottom: -140px;
  right: 10%;
  background: rgba(204, 51, 63, 0.13);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.88fr);
  gap: 22px;
  align-items: stretch;
}

.hero-copy,
.hero-panel,
.admin-topbar,
.portal-card,
.admin-zone,
.modal-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 34px;
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(10, 18, 34, 0.7);
  backdrop-filter: blur(16px) saturate(140%);
}

.eyebrow,
.toolbar-label,
.panel-label,
.card-kicker,
.group-notes-label,
.stat-label,
.admin-stat-label {
  margin: 0 0 10px;
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 225, 143, 0.82);
}

.hero-copy h1,
.toolbar-copy h2,
.card-title,
.admin-card-title,
.modal-title {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: -0.05em;
}

.hero-copy h1 {
  max-width: 10ch;
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 0.94;
  background: linear-gradient(140deg, #ffffff 20%, #f7d77a 68%, #ffffff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-text,
.card-text,
.service-description,
.empty-text,
.panel-subtitle,
.admin-zone-text,
.modal-text,
.log-message,
.log-meta,
.user-meta,
.user-stats,
.admin-empty {
  color: var(--muted);
}

.hero-text {
  margin: 18px 0 0;
  max-width: 58ch;
  font-size: 1.02rem;
  line-height: 1.8;
}

.hero-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(6, 10, 19, 0.92), rgba(15, 25, 46, 0.9)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 42%);
  backdrop-filter: blur(18px) saturate(150%);
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 18px;
  padding: 14px 16px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(8, 14, 27, 0.88);
  backdrop-filter: blur(18px) saturate(150%);
}

.admin-topbar-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 250px;
}

.admin-topbar-title h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.18rem, 1.8vw, 1.72rem);
  letter-spacing: -0.05em;
  color: #f8fbff;
}

.admin-topbar-mark {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  background: linear-gradient(145deg, #c9961b, #f7df8b);
  box-shadow: 0 14px 30px rgba(232, 197, 71, 0.22);
}

.admin-topbar-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  color: rgba(226, 236, 255, 0.78);
  font-size: 0.86rem;
}

.admin-topbar-stats span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  gap: 6px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-topbar-stats strong {
  color: #f7df8b;
}

.admin-topbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.hero-panel-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.panel-label,
.panel-subtitle {
  color: rgba(229, 236, 255, 0.72);
}

.hero-pills,
.session-actions,
.admin-topbar-actions,
.toolbar-actions,
.card-tags,
.service-badges,
.user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-pill,
.card-tag,
.service-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
}

.hero-pill {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 247, 234, 0.95);
}

.hero-pill-soft {
  background: rgba(232, 197, 71, 0.14);
  color: #f7d77a;
}

.session-strip {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.session-strip-manage {
  min-height: 132px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.05)),
    rgba(255, 255, 255, 0.04);
}

.session-copy {
  min-width: 0;
}

.session-label {
  margin: 0 0 6px;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 218, 135, 0.8);
}

.session-text {
  margin: 0;
  color: rgba(255, 245, 236, 0.92);
  line-height: 1.5;
}

.session-button,
.ghost-button,
.service-link,
.detail-toggle,
.login-submit,
.mini-button,
.modal-close,
.card-trigger {
  transition: transform 0.18s ease, filter 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.session-button,
.ghost-button,
.service-link,
.login-submit {
  border: 0;
  cursor: pointer;
}

.session-button {
  padding: 11px 16px;
  border-radius: 999px;
  font-weight: 800;
  color: #170d00;
  background: linear-gradient(135deg, #c9961b 0%, #f0ca5d 52%, #f7df8b 100%);
  box-shadow: 0 10px 26px rgba(232, 197, 71, 0.24);
}

.session-button-secondary {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

.hidden-counter {
  margin: -2px 0 0;
  color: rgba(223, 232, 255, 0.72);
  font-size: 0.84rem;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-box:focus-within {
  border-color: rgba(240, 202, 93, 0.45);
  box-shadow: 0 0 0 4px rgba(240, 202, 93, 0.08);
}

.search-icon {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
}

.search-icon svg {
  width: 18px;
  height: 18px;
  stroke: #f6d881;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
}

.search-box input {
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: rgba(255, 249, 242, 0.96);
  outline: none;
}

.search-box input::placeholder {
  color: rgba(224, 232, 255, 0.48);
}

.stats-grid,
.admin-stats {
  display: grid;
  gap: 12px;
}

.stats-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat-card,
.admin-stat-card {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-label,
.admin-stat-label {
  margin-bottom: 8px;
  color: rgba(220, 230, 255, 0.54);
}

.stat-value,
.admin-stat-value {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.85rem;
  letter-spacing: -0.05em;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin: 36px 0 20px;
}

.toolbar-copy h2 {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  color: #f8fbff;
}

.ghost-button {
  padding: 11px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(247, 251, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.ghost-button-secondary {
  background: rgba(255, 255, 255, 0.03);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.portal-card {
  min-height: 0;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.03)),
    rgba(10, 18, 34, 0.78);
  backdrop-filter: blur(18px) saturate(150%);
  transition: min-height 0.24s ease, transform 0.2s ease, border-color 0.2s ease;
}

.portal-card-open {
  grid-column: 1 / -1;
  min-height: 560px;
  border-color: rgba(255, 255, 255, 0.18);
}

.portal-card[data-accent="music"] {
  --accent-start: #c9961b;
  --accent-end: #f1d16f;
  --accent-glow: rgba(233, 186, 52, 0.28);
}

.portal-card[data-accent="infra"] {
  --accent-start: #15778f;
  --accent-end: #57d0d2;
  --accent-glow: rgba(50, 196, 210, 0.24);
}

.portal-card[data-accent="comms"] {
  --accent-start: #274dd6;
  --accent-end: #69adff;
  --accent-glow: rgba(70, 118, 255, 0.22);
}

.portal-card[data-accent="storage"] {
  --accent-start: #6a3fdc;
  --accent-end: #b59bff;
  --accent-glow: rgba(128, 86, 255, 0.22);
}

.portal-card[data-accent="ops"] {
  --accent-start: #b8334d;
  --accent-end: #ff9a74;
  --accent-glow: rgba(232, 88, 88, 0.22);
}

.card-trigger {
  position: relative;
  width: 100%;
  min-height: 230px;
  padding: 18px;
  border: 0;
  text-align: left;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.portal-card-open .card-trigger {
  min-height: 260px;
  padding: 26px;
}

.card-trigger:hover,
.ghost-button:hover,
.service-link:hover,
.login-submit:hover,
.session-button:hover,
.mini-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.card-stage {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.card-orb {
  position: absolute;
  width: 230px;
  height: 230px;
  right: -80px;
  top: -80px;
  border-radius: 999px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  filter: blur(10px);
}

.card-gridline {
  position: absolute;
  inset: auto -6% 0 auto;
  width: 280px;
  height: 180px;
  background:
    linear-gradient(transparent 94%, rgba(255, 255, 255, 0.06) 95%),
    linear-gradient(90deg, transparent 94%, rgba(255, 255, 255, 0.05) 95%);
  background-size: 24px 24px;
  opacity: 0.3;
  transform: perspective(260px) rotateX(72deg);
}

.card-head {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}

.card-brand {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  min-width: 0;
}

.card-symbol {
  flex-shrink: 0;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.06em;
  color: #fff7ea;
  background:
    linear-gradient(145deg, var(--accent-start), var(--accent-end)),
    rgba(255, 255, 255, 0.08);
  box-shadow:
    0 16px 38px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.portal-card-open .card-symbol {
  width: 74px;
  height: 74px;
  border-radius: 23px;
  font-size: 1.48rem;
}

.card-copy {
  min-width: 0;
}

.card-kicker {
  color: rgba(255, 221, 140, 0.82);
}

.card-title {
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  line-height: 0.96;
  color: #ffffff;
}

.portal-card-open .card-title {
  font-size: clamp(2rem, 4vw, 3rem);
}

.card-text {
  margin: 10px 0 0;
  max-width: 42ch;
  font-size: 0.92rem;
  line-height: 1.55;
}

.portal-card-open .card-text {
  max-width: 72ch;
  font-size: 1rem;
  line-height: 1.72;
}

.card-meta {
  display: grid;
  justify-items: end;
  gap: 10px;
  text-align: right;
}

.card-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f7fbff;
  font-size: 0.8rem;
  font-weight: 700;
}

.card-toggle-label {
  color: rgba(255, 232, 171, 0.9);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-preview {
  position: relative;
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.card-tags {
  gap: 8px;
}

.card-tag {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(236, 243, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.card-preview-services {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.preview-service-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(248, 251, 255, 0.96);
  font-size: 0.78rem;
  font-weight: 600;
}

.preview-service-pill-muted {
  color: rgba(255, 219, 136, 0.9);
}

.card-panel {
  min-height: 280px;
  padding: 0 26px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.portal-card-open .card-panel {
  animation: panelReveal 0.24s ease;
}

.portal-card-open .card-preview {
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  align-items: start;
}

@keyframes panelReveal {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.service-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.service-item,
.admin-card,
.log-card,
.user-card {
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.service-item {
  padding: 16px;
}

.service-main {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.service-copy {
  min-width: 0;
}

.service-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.service-title,
.user-title,
.log-event {
  margin: 0;
  color: #f8fbff;
  font-size: 1rem;
  font-weight: 800;
}

.service-description,
.service-url,
.user-meta,
.user-stats,
.log-message,
.log-meta,
.admin-empty,
.group-notes-list,
.service-notes-list {
  margin: 8px 0 0;
  line-height: 1.6;
}

.service-url {
  font-size: 0.84rem;
  color: rgba(215, 226, 255, 0.58);
  word-break: break-word;
}

.service-link {
  flex-shrink: 0;
  padding: 12px 16px;
  border-radius: 14px;
  font-weight: 800;
  color: #09101f;
  background: linear-gradient(135deg, var(--accent-start, #c9961b), var(--accent-end, #f1d16f));
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
}

.service-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.detail-toggle {
  border: 0;
  padding: 0;
  background: transparent;
  color: rgba(255, 218, 136, 0.92);
  font-weight: 800;
  cursor: pointer;
}

.service-notes,
.group-notes {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
}

.service-notes-list,
.group-notes-list {
  padding-left: 18px;
  color: rgba(216, 226, 255, 0.8);
}

.group-notes {
  margin-top: 22px;
}

.group-notes-label {
  margin-bottom: 10px;
}

.badge-public {
  background: rgba(50, 191, 164, 0.12);
  color: #8ff4dd;
}

.badge-admin {
  background: rgba(81, 123, 255, 0.16);
  color: #c8d8ff;
}

.badge-private {
  background: rgba(201, 150, 27, 0.14);
  color: #ffd878;
}

.badge-status {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(232, 240, 255, 0.86);
}

.empty-state {
  margin-top: 24px;
  padding: 28px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.045);
  border: 1px dashed rgba(255, 255, 255, 0.14);
}

.empty-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

code {
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #f4f7ff;
  font-family: "IBM Plex Sans", sans-serif;
}

.admin-zone {
  margin-top: 36px;
  padding: 28px;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.03)),
    rgba(11, 18, 33, 0.8);
  backdrop-filter: blur(18px) saturate(140%);
}

.admin-zone-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-end;
}

.admin-zone-text {
  margin: 10px 0 0;
  max-width: 60ch;
  line-height: 1.7;
}

.admin-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 20px;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.admin-card {
  padding: 20px;
}

.admin-card-head {
  margin-bottom: 14px;
}

.admin-card-title,
.modal-title {
  color: #f8fbff;
  font-size: 1.45rem;
}

.admin-form {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(229, 236, 255, 0.88);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f8fbff;
  outline: none;
}

.field textarea {
  min-height: 110px;
  resize: vertical;
}

.field select {
  appearance: none;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: rgba(240, 202, 93, 0.4);
  box-shadow: 0 0 0 4px rgba(240, 202, 93, 0.08);
}

.admin-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(231, 239, 255, 0.88);
}

.admin-checkbox input {
  width: 18px;
  height: 18px;
}

.admin-flash {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 16px;
  line-height: 1.55;
}

.admin-flash-ok {
  background: rgba(50, 191, 164, 0.12);
  border: 1px solid rgba(50, 191, 164, 0.18);
  color: #8ff4dd;
}

.admin-flash-error,
.login-error {
  background: rgba(209, 54, 54, 0.12);
  border: 1px solid rgba(209, 54, 54, 0.2);
  color: #ffb1b1;
}

.users-list,
.logs-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.user-card,
.log-card {
  padding: 16px;
}

.user-card-top,
.log-card-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.user-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.mini-button {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: #f3f7ff;
  border-radius: 999px;
  padding: 9px 12px;
  cursor: pointer;
}

.mini-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.mini-button-danger {
  color: #ffb1b1;
  background: rgba(209, 54, 54, 0.08);
  border-color: rgba(209, 54, 54, 0.14);
}

.mini-badge-error {
  background: rgba(209, 54, 54, 0.12);
  color: #ffb1b1;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(4, 9, 18, 0.6);
  backdrop-filter: blur(12px);
}

.modal-card {
  width: min(500px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 28px;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(7, 12, 24, 0.96), rgba(14, 22, 40, 0.94)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 44%);
  backdrop-filter: blur(18px);
}

.modal-card-compact {
  width: min(540px, 100%);
}

.modal-card-wide {
  width: min(1040px, 100%);
}

.modal-card-editor {
  width: min(1320px, 100%);
}

.modal-form {
  margin-top: 18px;
}

.content-editor {
  display: grid;
  grid-template-columns: minmax(240px, 0.32fr) minmax(0, 1fr);
  gap: 18px;
  margin-top: 20px;
}

.content-sidebar,
.content-main,
.content-services {
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.content-sidebar,
.content-main {
  padding: 18px;
}

.content-sidebar-head,
  .content-form-head {
    display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.content-title-small {
  margin: 0;
  font-family: var(--font-display);
  color: #f8fbff;
  font-size: 1.18rem;
  letter-spacing: -0.04em;
}

.content-list {
  display: grid;
  gap: 10px;
}

.content-list-item {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 13px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: #f8fbff;
  text-align: left;
  cursor: pointer;
}

.content-list-item span {
  font-weight: 800;
}

.content-list-item small {
  color: rgba(216, 226, 255, 0.62);
}

.content-list-item-active {
  border-color: rgba(240, 202, 93, 0.46);
  background: rgba(240, 202, 93, 0.1);
}

.content-form,
.content-service-form {
  display: grid;
  gap: 14px;
}

.content-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.content-services {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 18px;
}

.content-service-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.modal-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.modal-text {
  margin: 12px 0 0;
  line-height: 1.65;
}

.modal-close {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #f8fbff;
  cursor: pointer;
}

.login-submit {
  margin-top: 4px;
  padding: 14px 18px;
  border-radius: 16px;
  font-weight: 800;
  color: #09101f;
  background: linear-gradient(135deg, #c9961b 0%, #f0ca5d 52%, #f7df8b 100%);
}

.login-hint {
  margin: 14px 0 0;
  color: rgba(214, 224, 255, 0.68);
  font-size: 0.86rem;
  line-height: 1.6;
}

.users-list-modal,
.logs-list-modal {
  max-height: min(64vh, 680px);
  overflow: auto;
  padding-right: 4px;
}

@media (max-width: 1100px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.86fr);
  }

  .admin-topbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .admin-topbar-stats {
    order: 3;
    width: 100%;
    justify-content: flex-start;
  }

  .card-grid,
  .admin-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-editor {
    grid-template-columns: 1fr;
  }

  .portal-card-open {
    grid-column: 1 / -1;
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    max-width: 12ch;
  }

  .admin-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .page-shell {
    padding: 20px 14px 48px;
  }

  .hero-copy,
  .hero-panel,
  .admin-topbar,
  .portal-card,
  .admin-zone,
  .modal-card {
    padding: 20px;
    border-radius: 24px;
  }

  .toolbar,
  .session-strip,
  .admin-topbar,
  .admin-topbar-title,
  .content-sidebar-head,
  .content-form-head,
  .admin-zone-head,
  .user-card-top,
  .log-card-top,
  .modal-top,
  .hero-panel-top,
  .card-head,
  .card-brand,
  .service-main {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-actions,
  .session-actions,
  .admin-topbar-actions {
    width: 100%;
  }

  .ghost-button,
  .session-button,
  .service-link {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .card-meta {
    justify-items: start;
    text-align: left;
  }

  .card-symbol {
    width: 62px;
    height: 62px;
    border-radius: 18px;
  }

  .card-trigger,
  .card-panel {
    padding-left: 20px;
    padding-right: 20px;
  }

  .card-panel {
    padding-bottom: 20px;
  }

  .service-list,
  .admin-stats,
  .card-grid,
  .content-form-grid,
  .content-service-list {
    grid-template-columns: 1fr;
  }

  .admin-topbar-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .user-actions {
    justify-content: flex-start;
  }
}
