:root {
  --bg: #030407;
  --card: rgba(17, 21, 39, 0.76);
  --card-strong: rgba(8, 12, 24, 0.92);
  --cyan: #4feaff;
  --purple: #8b5cf6;
  --text: #f0f0f5;
  --muted: #a1a1aa;
  --accent-glow: rgba(79, 234, 255, 0.15);
  --danger: #ef4444;
  --success: #22c55e;
  --warning: #f59e0b;
  --border: rgba(255, 255, 255, 0.1);
}

* {
  box-sizing: border-box;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 20% 30%, rgba(139, 92, 246, 0.1) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(79, 234, 255, 0.12) 0%, transparent 40%);
}

a {
  color: inherit;
}

.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

.panel {
  background: var(--card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.hidden {
  display: none !important;
}

.title {
  margin: 0;
  letter-spacing: 0.12em;
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  font-weight: 900;
  background: linear-gradient(to right, #fff, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle,
.helper-text,
.small-note,
.page-description,
.inline-note {
  color: var(--muted);
  line-height: 1.6;
}

.shell {
  display: grid;
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 1rem;
  padding: 1rem;
  background: var(--card-strong);
}

.sidebar h2,
.section-block h2,
.login-card h2,
.feature-card h3,
.summary-card h3,
.info-card h3,
.access-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.sidebar-nav,
.role-summary,
.credentials-list,
.feature-list,
.alert-list,
.feed-list {
  display: grid;
  gap: 0.75rem;
}

.sidebar-link {
  display: block;
  text-decoration: none;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.sidebar-link:hover {
  transform: translateY(-1px);
  border-color: rgba(79, 234, 255, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.sidebar-link.active {
  border-color: rgba(79, 234, 255, 0.5);
  background: rgba(79, 234, 255, 0.12);
}

.sidebar-link.locked {
  opacity: 0.58;
}

.sidebar-link strong,
.feature-card strong,
.info-card strong,
.summary-card strong {
  display: block;
  margin-bottom: 0.35rem;
}

.sidebar-link span,
.sidebar-note,
.permission-note,
.feature-meta,
.badge-note {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.content {
  display: grid;
  gap: 1rem;
}

.topbar,
.login-card,
.access-card,
.section-block,
.feature-card,
.summary-card,
.info-card {
  padding: 1.25rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.identity {
  display: grid;
  gap: 0.35rem;
}

.identity strong {
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.topbar-actions,
.chip-row,
.button-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid rgba(79, 234, 255, 0.35);
  background: rgba(79, 234, 255, 0.08);
  border-radius: 999px;
  color: var(--cyan);
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.role-chip.owner { color: #fde68a; border-color: rgba(253, 230, 138, 0.45); background: rgba(253, 230, 138, 0.12); }
.role-chip.head-admin { color: #c4b5fd; border-color: rgba(196, 181, 253, 0.45); background: rgba(139, 92, 246, 0.16); }
.role-chip.admin { color: #93c5fd; border-color: rgba(147, 197, 253, 0.45); background: rgba(59, 130, 246, 0.12); }
.role-chip.moderator { color: #86efac; border-color: rgba(134, 239, 172, 0.45); background: rgba(34, 197, 94, 0.12); }

.button,
.feature-button {
  border: 1px solid rgba(79, 234, 255, 0.5);
  border-radius: 999px;
  background: rgba(79, 234, 255, 0.08);
  color: var(--text);
  padding: 0.72rem 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
}

.button:hover,
.feature-button:hover {
  transform: translateY(-1px);
  border-color: var(--cyan);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.button.lock {
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.08);
}

.button.secondary,
.feature-button.secondary {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
}

.field-label {
  font-size: 0.9rem;
  color: var(--muted);
  display: block;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

input[type="password"],
input[type="text"],
select,
textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(10, 15, 30, 0.8);
  color: var(--text);
  padding: 0.85rem 0.9rem;
  border-radius: 12px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(79, 234, 255, 0.15);
}

.status-msg {
  min-height: 1.4rem;
  margin-top: 0.8rem;
  font-size: 0.92rem;
}

.status-msg.error { color: var(--danger); }
.status-msg.success { color: var(--success); }

.login-shell {
  max-width: 1120px;
  margin: 6vh auto 0;
  display: grid;
  grid-template-columns: minmax(320px, 460px) minmax(0, 1fr);
  gap: 1rem;
}

.login-card {
  display: grid;
  gap: 1rem;
}

.preview-card {
  padding: 1.25rem;
}

.preview-grid,
.dashboard-grid,
.card-grid,
.feature-grid,
.summary-grid,
.access-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.preview-grid {
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
}

.metric {
  margin: 0.35rem 0 0;
  color: var(--cyan);
  font-size: 1.6rem;
  font-weight: 800;
  text-shadow: 0 0 10px rgba(79, 234, 255, 0.2);
}

.info-card,
.summary-card,
.feature-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
}

.feature-list,
.feed-list,
.alert-list,
.role-summary,
.credentials-list {
  margin: 0;
  padding-left: 1rem;
  color: var(--muted);
  line-height: 1.75;
}

.feature-list li::marker,
.feed-list li::marker,
.alert-list li::marker,
.role-summary li::marker,
.credentials-list li::marker {
  color: var(--cyan);
}

.feature-actions {
  margin-top: 1rem;
}

.permission-state {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.9rem;
}

.permission-state.allowed {
  border-color: rgba(34, 197, 94, 0.24);
  background: rgba(34, 197, 94, 0.08);
  color: #bbf7d0;
}

.permission-state.locked {
  border-color: rgba(239, 68, 68, 0.24);
  background: rgba(239, 68, 68, 0.08);
  color: #fecaca;
}

.mono {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.88rem;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
}

th,
td {
  text-align: left;
  padding: 0.9rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.95rem;
}

th {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.03);
}

.notice-banner {
  padding: 1rem 1.1rem;
  border-radius: 16px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  background: rgba(245, 158, 11, 0.08);
}

.page-header {
  display: grid;
  gap: 0.75rem;
}

.page-layout {
  display: grid;
  gap: 1rem;
}

@media (max-width: 980px) {
  .shell,
  .login-shell,
  .preview-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }
}

@media (max-width: 720px) {
  .wrap {
    padding: 1rem 0.75rem 2rem;
  }

  .topbar,
  .login-card,
  .preview-card,
  .sidebar,
  .section-block,
  .feature-card,
  .summary-card,
  .info-card,
  .access-card {
    padding: 1rem;
  }
}
