:root {
  --glass: rgba(10, 19, 34, 0.62);
  --shadow: 0 14px 30px rgba(0, 0, 0, 0.26);
  --shadow-soft: 0 10px 22px rgba(0, 0, 0, 0.2);
}

body {
  background:
    radial-gradient(680px 320px at 20% -10%, rgba(47, 137, 255, 0.12), transparent 58%),
    radial-gradient(680px 320px at 85% 0%, rgba(67, 176, 255, 0.08), transparent 55%),
    linear-gradient(180deg, #06101d, #091522 46%, #06101d);
}

.page-shell {
  padding-top: 22px;
}

.topbar-clean,
.card-clean {
  background: rgba(8, 16, 29, 0.68);
  border-color: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.brand-link {
  color: inherit;
  text-decoration: none;
}

.brand-link:hover {
  text-decoration: none;
}

.brand-cap-clean {
  font-size: clamp(24px, 4vw, 38px);
}

.hero-minimal {
  display: grid;
  gap: 10px;
  margin: 26px 0 18px;
  max-width: 860px;
}

.hero-minimal-inline {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  max-width: none;
}

.hero-minimal h1,
.page-title {
  margin: 8px 0 0;
  font-size: clamp(28px, 4.6vw, 48px);
  line-height: 1;
  letter-spacing: -0.03em;
}

.page-title code {
  font-family: var(--mono);
  color: #98cfff;
}

.page-copy {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.7;
}

.card-header h2,
.tools-title span,
.tool-h,
.page-copy strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.filters-clean {
  display: grid;
  gap: 14px;
}

.analytics-grid-compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.compact-actions {
  align-items: center;
}

.soft-badge {
  border-color: rgba(67, 176, 255, 0.24);
  background: rgba(67, 176, 255, 0.12);
}

.input-shell,
.select-shell {
  min-height: 48px;
}

.filter-shell {
  min-height: 58px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(140px 60px at 100% 0%, rgba(67, 176, 255, 0.12), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}

.filter-shell:hover {
  border-color: rgba(67, 176, 255, 0.28);
  background:
    radial-gradient(140px 60px at 100% 0%, rgba(67, 176, 255, 0.18), transparent 72%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03));
}

.filter-shell:focus-within {
  border-color: rgba(67, 176, 255, 0.46);
  box-shadow:
    0 0 0 4px rgba(67, 176, 255, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.filter-shell-label {
  position: absolute;
  top: 10px;
  left: 42px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.46);
  pointer-events: none;
  z-index: 1;
}

.filter-shell .input {
  min-height: 58px;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding-top: 23px;
  padding-bottom: 11px;
  color: rgba(255, 255, 255, 0.96);
  font-weight: 700;
}

.filter-shell .input option {
  color: #eef6ff;
  background: #0a1628;
}

.filter-shell::after {
  right: 16px;
  color: rgba(255, 255, 255, 0.62);
}

.filter-search-shell {
  min-height: 58px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(220px 90px at 100% 0%, rgba(67, 176, 255, 0.1), transparent 72%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
  z-index: 40;
}

.filter-search-shell:hover {
  border-color: rgba(67, 176, 255, 0.24);
}

.filter-search-shell:focus-within {
  border-color: rgba(67, 176, 255, 0.46);
  box-shadow:
    0 0 0 4px rgba(67, 176, 255, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.filter-search-shell .input {
  min-height: 58px;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-weight: 600;
}

.filter-search-shell .input::placeholder {
  color: rgba(255, 255, 255, 0.54);
}

.filters-select-row-home {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 0.95fr) auto;
  align-items: stretch;
  position: relative;
  z-index: 1;
}

.filters-actions-home {
  justify-content: flex-end;
}

.sort-toggle-wide {
  min-width: 220px;
  justify-content: stretch;
}

.sort-toggle-wide .sort-btn {
  flex: 1 1 0;
  min-width: 0;
}

.tag-composer {
  align-items: flex-start;
  padding-top: 10px;
  padding-bottom: 10px;
}

.tag-composer .suggest {
  left: 0;
  right: 0;
  top: calc(100% + 8px);
}

.tag-composer .draft-chips {
  gap: 8px;
}

.tag-composer input {
  min-height: 24px;
}

.suggest-item strong {
  color: rgba(255, 255, 255, 0.92);
}

.suggest-item .suggest-left {
  min-width: 0;
}

.suggest-item .suggest-muted {
  text-align: right;
}

.auth-shell {
  min-height: 100svh;
}

.auth-page-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-top: 20px;
}

.auth-page-grid-single {
  grid-template-columns: 1fr;
}

.auth-page-grid-centered {
  min-height: calc(100svh - 140px);
  place-items: center;
}

.auth-copy-card,
.auth-card {
  min-height: 100%;
}

.auth-card-compact {
  width: min(560px, 100%);
  min-height: 0;
}

.auth-card-full {
  min-height: calc(100svh - 160px);
  max-width: 1160px;
  margin: 0 auto;
  background:
    radial-gradient(520px 260px at 0% 0%, rgba(67, 176, 255, 0.12), transparent 62%),
    linear-gradient(180deg, rgba(8, 16, 29, 0.82), rgba(5, 11, 22, 0.86));
}

.auth-card-full .card-body {
  display: grid;
  gap: 20px;
}

.auth-stage {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(360px, 0.9fr);
  gap: 24px;
  align-items: stretch;
}

.auth-copy-pane {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 8px 4px 8px 0;
}

.auth-display {
  margin: 0;
  font-size: clamp(34px, 4.8vw, 58px);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.auth-bullet-list {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.auth-bullet {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.82);
}

.auth-form-shell {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03)),
    rgba(4, 9, 17, 0.46);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.28);
}

.auth-form-shell-standalone {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.auth-stack {
  width: min(760px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.auth-intro {
  display: grid;
  gap: 10px;
}

.auth-link-row {
  display: flex;
  justify-content: flex-end;
  margin-top: -2px;
}

.auth-quiet-link {
  color: rgba(152, 207, 255, 0.92);
  font-size: 13px;
  font-weight: 600;
}

.auth-form-elevated {
  gap: 14px;
}

.auth-form-elevated .tool-field {
  gap: 8px;
}

.auth-form-elevated .tool-field > span {
  font-size: 12px;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.82);
}

.auth-form-elevated input {
  min-height: 52px;
  border-radius: 16px;
  background: rgba(2, 8, 18, 0.5);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 56px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.password-toggle:hover {
  background: rgba(67, 176, 255, 0.14);
  border-color: rgba(67, 176, 255, 0.34);
  color: rgba(233, 245, 255, 0.96);
}

.password-toggle[aria-pressed="true"] {
  background: rgba(67, 176, 255, 0.18);
  border-color: rgba(67, 176, 255, 0.42);
  color: rgba(233, 245, 255, 0.98);
}

.password-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(67, 176, 255, 0.18);
}

.auth-tab-row {
  margin: 0;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.auth-tab-row .sort-btn {
  min-width: 0;
  flex: 1 1 0;
}

.password-rules {
  display: grid;
  gap: 8px;
  margin-top: -2px;
}

.password-rule {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  padding: 9px 12px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
}

.password-rule.is-ok {
  border-color: rgba(100, 216, 155, 0.3);
  background: rgba(100, 216, 155, 0.14);
  color: rgba(225, 255, 238, 0.94);
}

.copy-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.copy-item {
  display: grid;
  gap: 4px;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.copy-item strong {
  font-family: var(--mono);
  color: #b9ddff;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
}

.status-approved {
  border-color: rgba(100, 216, 155, 0.34);
  background: rgba(100, 216, 155, 0.18);
}

.status-pending {
  border-color: rgba(255, 176, 82, 0.34);
  background: rgba(255, 176, 82, 0.18);
}

.status-rejected {
  border-color: rgba(255, 95, 109, 0.34);
  background: rgba(255, 95, 109, 0.16);
}

.role-admin {
  border-color: rgba(67, 176, 255, 0.35);
  background: rgba(67, 176, 255, 0.18);
}

.role-user {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

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

.admin-card {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(4, 9, 17, 0.24);
  padding: 14px;
  display: grid;
  gap: 10px;
}

.admin-card-head,
.admin-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.notice-card {
  margin-bottom: 18px;
}

.notice-content {
  display: grid;
  gap: 6px;
}

.notice-approved {
  border-color: rgba(100, 216, 155, 0.32);
}

.notice-pending {
  border-color: rgba(255, 176, 82, 0.36);
}

.notice-rejected {
  border-color: rgba(255, 95, 109, 0.4);
}

.danger-btn {
  border-color: rgba(255, 95, 109, 0.4);
  background: rgba(255, 95, 109, 0.14);
}

.danger-btn:hover {
  border-color: rgba(255, 95, 109, 0.62);
  background: rgba(255, 95, 109, 0.2);
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.88fr) minmax(0, 1.12fr);
  gap: 18px;
  align-items: start;
}

.profile-side-card {
  position: sticky;
  top: 18px;
}

.profile-side-body,
.profile-main-card .card-body {
  display: grid;
  gap: 14px;
}

.profile-avatar-panel {
  display: grid;
  gap: 14px;
}

.profile-avatar-preview {
  display: grid;
  place-items: center;
  min-height: 188px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(240px 140px at 0% 0%, rgba(67, 176, 255, 0.16), transparent 62%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(0, 0, 0, 0.18));
}

.profile-avatar-media {
  width: 126px;
  height: 126px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(180deg, rgba(67, 176, 255, 0.34), rgba(10, 19, 34, 0.96));
  color: rgba(255, 255, 255, 0.96);
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.profile-avatar-media.has-image {
  background: rgba(255, 255, 255, 0.06);
}

.profile-avatar-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.profile-avatar-meta {
  display: grid;
  gap: 4px;
}

.profile-preview-box,
.profile-chip-preview {
  display: grid;
  gap: 10px;
}

.profile-author-chip {
  max-width: 100%;
}

.profile-readonly-grid {
  display: grid;
  gap: 10px;
}

.profile-readonly-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.16);
}

.profile-readonly-item strong {
  color: rgba(255, 255, 255, 0.96);
}

.profile-form-actions {
  align-items: center;
}

@media (max-width: 1120px) {
  .auth-stage {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .filters-select-row-home {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filters-actions-home {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .filters-clean,
  .auth-page-grid,
  .analytics-grid-compact,
  .hero-minimal-inline,
  .profile-layout {
    grid-template-columns: 1fr;
  }

  .profile-side-card {
    position: static;
  }
}

@media (max-width: 640px) {
  .page-shell {
    padding-top: 14px;
  }

  .session-actions,
  .admin-card-head,
  .admin-actions {
    width: 100%;
  }

  .filters-select-row-home {
    grid-template-columns: 1fr;
  }

  .filters-actions-home,
  .sort-toggle-wide {
    width: 100%;
  }

  .auth-form-shell {
    padding: 14px;
    border-radius: 20px;
  }

  .auth-tab-row {
    width: 100%;
    flex-direction: column;
    border-radius: 18px;
  }

  .profile-avatar-preview {
    min-height: 156px;
  }

  .profile-avatar-media {
    width: 104px;
    height: 104px;
    font-size: 24px;
  }
}
