﻿:root {
  --bg: #080d10;
  --panel: rgba(255, 255, 255, 0.088);
  --panel-strong: rgba(255, 255, 255, 0.14);
  --text: #edf7f6;
  --muted: #91a6a2;
  --line: rgba(255, 255, 255, 0.14);
  --accent: #2dd4bf;
  --accent-2: #ef233c;
  --gold: #f4b860;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 14% 12%, rgba(45, 212, 191, 0.22), transparent 28%),
    radial-gradient(circle at 86% 18%, rgba(239, 35, 60, 0.18), transparent 30%),
    linear-gradient(135deg, #071012 0%, #101414 50%, #06090d 100%);
}
button, input, select { font: inherit; }
button { cursor: pointer; border: 0; }
button:disabled { opacity: .5; cursor: not-allowed; }
input, select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 14px;
  color: var(--text);
  background: rgba(255,255,255,.08);
  outline: none;
}
input:focus, select:focus { border-color: rgba(45,212,191,.7); box-shadow: 0 0 0 4px rgba(45,212,191,.12); }
label { display: grid; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 800; }

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 520px) minmax(260px, 1fr);
  gap: 34px;
  align-items: center;
  padding: clamp(20px, 5vw, 72px);
}
.login-card, .panel, .hero-panel, .product-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.11), rgba(255,255,255,.065));
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow);
}
.login-card { display: grid; gap: 26px; padding: 30px; border-radius: 34px; }
.brand-row { display: flex; align-items: center; gap: 12px; }
.brand-row strong { display: block; font-size: 18px; }
.brand-row span { display: block; color: var(--muted); font-size: 13px; }
.brand-mark { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 16px; color: #fff; background: linear-gradient(135deg, var(--accent-2), #ff6b6b); font-weight: 950; }
.login-copy span, .eyebrow, .hero-panel span { color: var(--accent); font-size: 12px; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; }
h1 { margin: 8px 0 0; font-size: clamp(42px, 6vw, 74px); line-height: .94; letter-spacing: -.05em; }
h2 { margin: 0; font-size: 24px; letter-spacing: -.03em; }
h3 { margin: 0; }
p { color: var(--muted); line-height: 1.6; }
.login-form { display: grid; gap: 14px; }
.primary, .product-footer button, .panel-head button, .card-actions button {
  min-height: 46px;
  border-radius: 16px;
  padding: 0 16px;
  color: #05100e;
  background: var(--accent);
  font-weight: 950;
}
.security-note { color: var(--muted); line-height: 1.55; }
.alert { margin-bottom: 18px; padding: 14px; border: 1px solid rgba(239,35,60,.35); border-radius: 18px; color: #ffd4d9; background: rgba(239,35,60,.12); font-weight: 800; }
.ambient-panel { min-height: 560px; position: relative; border-radius: 40px; overflow: hidden; }
.ambient-panel div { position: absolute; border-radius: 999px; filter: blur(8px); background: rgba(45,212,191,.24); }
.ambient-panel div:nth-child(1) { width: 420px; height: 420px; left: 10%; top: 7%; }
.ambient-panel div:nth-child(2) { width: 260px; height: 260px; right: 12%; bottom: 10%; background: rgba(239,35,60,.24); }
.ambient-panel div:nth-child(3) { width: 180px; height: 180px; right: 38%; top: 38%; background: rgba(244,184,96,.20); }
.login-products {
  display: grid;
  gap: 18px;
  align-content: center;
}
.login-products-head {
  max-width: 620px;
}
.login-products-head span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.login-products-head h2 {
  margin-top: 8px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: .96;
}
.login-products-head p {
  max-width: 560px;
}
.login-products-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.login-product-card {
  min-height: 170px;
  display: grid;
  align-content: space-between;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,.105), rgba(255,255,255,.06));
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow);
}
.login-product-card h3 {
  font-size: 18px;
}
.login-product-card p {
  margin-bottom: 0;
  font-size: 14px;
}

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 280px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 12px; padding: 22px; border-right: 1px solid var(--line); background: rgba(3, 9, 10, .72); backdrop-filter: blur(22px); }
.sidebar .brand-row { margin-bottom: 24px; }
.nav { min-height: 46px; border-radius: 16px; padding: 0 14px; color: var(--muted); background: transparent; text-align: left; font-weight: 900; }
.nav.active, .nav:hover { color: var(--text); background: rgba(255,255,255,.09); }
.nav.muted { margin-top: auto; color: #ffb3bc; }
.workspace { min-width: 0; padding: clamp(18px, 4vw, 42px); }
.hero-panel { display: flex; justify-content: space-between; gap: 18px; align-items: flex-end; padding: 32px; border-radius: 34px; margin-bottom: 18px; }
.hero-panel h1 { max-width: 720px; }
.hero-chip { padding: 12px 16px; border: 1px solid rgba(45,212,191,.35); border-radius: 999px; color: var(--accent); background: rgba(45,212,191,.1); font-weight: 950; white-space: nowrap; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.product-card { min-height: 260px; display: grid; align-content: space-between; gap: 22px; padding: 22px; border-radius: 28px; }
.product-icon { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 18px; background: rgba(45,212,191,.14); color: var(--accent); font-weight: 950; font-size: 22px; }
.product-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.product-footer span { padding: 8px 10px; border-radius: 999px; color: var(--gold); background: rgba(244,184,96,.12); font-size: 12px; font-weight: 950; text-transform: uppercase; }
.split-layout { display: grid; grid-template-columns: minmax(360px, .85fr) minmax(0, 1.2fr); gap: 18px; align-items: start; }
.panel { padding: 22px; border-radius: 28px; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.metrics-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.metrics-grid article { padding: 16px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,255,.065); }
.metrics-grid span, .result-row, .api-meta span, .user-meta span, .endpoint-list span { color: var(--muted); font-size: 12px; font-weight: 800; }
.metrics-grid strong { display: block; margin-top: 8px; font-size: 28px; }
.user-form { display: grid; gap: 14px; }
.two-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.toolbar { display: grid; grid-template-columns: minmax(180px, 1.2fr) repeat(3, minmax(130px, .7fr)); gap: 10px; margin-bottom: 14px; }
.result-row { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.access-grid { display: grid; gap: 10px; }
.access-tile { display: grid; grid-template-columns: auto minmax(120px, 1fr); gap: 10px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.06); }
.access-tile input { width: 18px; min-height: 18px; }
.access-tile select { grid-column: 1 / -1; }
.user-list, .audit-list { display: grid; gap: 12px; }
.user-card, .audit-list article { display: grid; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,255,.065); }
.user-card-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.user-card small, .audit-list span { color: var(--muted); }
.user-meta { display: flex; flex-wrap: wrap; gap: 10px; }
.status { justify-self: start; padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 950; }
.status.active { color: var(--accent); background: rgba(45,212,191,.12); }
.status.suspended { color: #ffbd7a; background: rgba(244,184,96,.12); }
.status.waiting { color: #b9c8ff; background: rgba(142,166,255,.12); }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.card-actions button, .panel-head button { color: var(--text); background: rgba(255,255,255,.10); }
.inline-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.mini-button {
  min-height: 34px;
  border-radius: 12px;
  padding: 0 10px;
  color: var(--text);
  background: rgba(255,255,255,.10);
  font-size: 12px;
  font-weight: 900;
}
.panel-button {
  min-height: 46px;
  border-radius: 16px;
  padding: 0 16px;
  color: var(--text);
  background: rgba(255,255,255,.10);
  font-weight: 950;
}
.panel-button.active {
  color: #05100e;
  background: var(--accent);
}
.pagination { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.password-meter { display: grid; gap: 6px; }
.password-meter span { height: 8px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.10); }
.password-meter i { display: block; height: 100%; border-radius: inherit; background: var(--gold); transition: width .18s ease; }
.password-meter small { color: var(--muted); font-weight: 800; }
.password-meter.weak i { background: var(--accent-2); }
.password-meter.medium i { background: var(--gold); }
.password-meter.strong i { background: var(--accent); }
.audit-list code { white-space: pre-wrap; color: #bfece6; font-size: 12px; }
.empty { padding: 24px; border: 1px dashed var(--line); border-radius: 22px; color: var(--muted); }
.api-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.api-card { display: grid; gap: 14px; padding: 20px; border: 1px solid var(--line); border-radius: 24px; background: rgba(255,255,255,.065); }
.api-card-head { display: flex; gap: 12px; align-items: flex-start; }
.api-card h2 { font-size: 20px; }
.api-card p { margin: 6px 0 0; }
.api-meta, .endpoint-list { display: grid; gap: 8px; }
.endpoint-list div { display: grid; gap: 4px; padding: 10px; border-radius: 14px; background: rgba(255,255,255,.06); }
.security-panel { margin-top: 18px; }
.mfa-secret { display: grid; gap: 8px; padding: 14px; border: 1px solid rgba(45,212,191,.28); border-radius: 18px; background: rgba(45,212,191,.08); overflow-wrap: anywhere; }
.mfa-secret strong { color: var(--accent); letter-spacing: .08em; }
.mfa-secret small { color: var(--muted); }
.inline-form { display: grid; grid-template-columns: minmax(180px, 1fr) auto; gap: 10px; align-items: end; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0,0,0,.62);
}
.modal-card {
  width: min(460px, 100%);
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 28px;
  color: var(--text);
  background: #0d1517;
  box-shadow: var(--shadow);
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.user-management-v2 {
  display: grid;
  grid-template-columns: minmax(340px, .82fr) minmax(520px, 1.18fr);
  gap: 18px;
  align-items: start;
}
.user-directory, .permission-workbench { min-width: 0; }
.workspace-tabs {
  display: flex;
  gap: 8px;
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.workspace-tabs button {
  min-height: 42px;
  border-radius: 14px;
  padding: 0 14px;
  color: var(--muted);
  background: rgba(255,255,255,.08);
  font-weight: 950;
}
.workspace-tabs button.active {
  color: #05100e;
  background: var(--accent);
}
.user-toolbar-v2 { grid-template-columns: minmax(180px, 1fr) repeat(3, minmax(112px, .72fr)); }
.directory-list { display: grid; gap: 8px; }
.directory-row {
  width: 100%;
  display: grid;
  gap: 8px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--text);
  background: rgba(255,255,255,.055);
  text-align: left;
}
.directory-row:hover, .directory-row.active {
  border-color: rgba(45,212,191,.56);
  background: rgba(45,212,191,.095);
}
.directory-main { display: grid; gap: 3px; min-width: 0; }
.directory-main strong, .detail-hero h2 { overflow-wrap: anywhere; }
.directory-main small {
  color: var(--muted);
  overflow-wrap: anywhere;
}
.directory-tags, .detail-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.directory-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}
.create-user-form {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.permission-workbench .create-user-form {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.create-user-workbench .access-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.create-actions {
  justify-content: flex-end;
  margin-top: 0;
}
.form-row-title { display: grid; gap: 4px; }
.detail-hero {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.detail-hero p {
  margin: 6px 0 0;
  overflow-wrap: anywhere;
}
.permission-form { display: grid; gap: 18px; }
.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.permission-section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
}
.permission-grid-v2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.permission-product {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255,255,255,.055);
}
.permission-product.enabled {
  border-color: rgba(45,212,191,.42);
  background: rgba(45,212,191,.07);
}
.permission-product-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 152px;
  gap: 12px;
  align-items: end;
}
.product-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--text);
}
.product-toggle input {
  width: 18px;
  min-height: 18px;
  flex: 0 0 auto;
}
.product-toggle .product-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-size: 16px;
  flex: 0 0 auto;
}
.product-toggle span:last-child { min-width: 0; }
.product-toggle small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}
.compact-field { min-width: 0; }
.module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.module-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: rgba(255,255,255,.06);
  font-size: 12px;
  font-weight: 900;
}
.module-pill input {
  width: 16px;
  min-height: 16px;
  flex: 0 0 auto;
}
.module-pill span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.detail-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 18px;
  margin-top: 18px;
  border-top: 1px solid var(--line);
}

@media (max-width: 1060px) {
  .login-shell, .app-shell, .split-layout, .user-management-v2 { grid-template-columns: 1fr; }
  .ambient-panel { display: none; }
  .login-products { align-content: start; }
  .sidebar { position: static; height: auto; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metrics-grid, .api-grid, .profile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .permission-grid-v2, .create-user-workbench .access-grid { grid-template-columns: 1fr; }
  .toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .product-grid, .login-products-grid, .two-fields, .metrics-grid, .api-grid, .toolbar, .profile-grid, .permission-product-top, .module-grid { grid-template-columns: 1fr; }
  .login-shell { padding: 16px; }
  .login-card { border-radius: 24px; padding: 22px; }
  .login-product-card { min-height: auto; border-radius: 20px; }
  .hero-panel { display: grid; }
  .detail-hero, .permission-section-head { display: grid; }
  .permission-section-head .primary { width: 100%; }
}
