@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap");

:root {
  --bg0: #050b16;
  --bg1: #071022;
  --bg2: #0a1a33;
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.68);
  --line: rgba(255, 255, 255, 0.1);
  --glass: rgba(12, 26, 51, 0.74);
  --glass-2: rgba(12, 26, 51, 0.56);
  --panel: rgba(255, 255, 255, 0.05);
  --blue: #2f89ff;
  --blue2: #43b0ff;
  --orange: #ff8a28;
  --green: #64d89b;
  --danger: #ff5f6d;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.42);
  --shadow-soft: 0 10px 24px rgba(0, 0, 0, 0.28);
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 520px at 18% -10%, rgba(47, 137, 255, 0.2), transparent 55%),
    radial-gradient(900px 520px at 85% 0%, rgba(67, 176, 255, 0.12), transparent 55%),
    radial-gradient(1100px 680px at 50% 115%, rgba(10, 26, 51, 0.9), transparent 55%),
    linear-gradient(180deg, var(--bg0), var(--bg1) 45%, var(--bg0));
  background-attachment: fixed;
  overflow-x: hidden;
}

body.scroll-lock {
  overflow: hidden;
}

a,
button,
input,
textarea,
select {
  font: inherit;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.24) inset;
  box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.24) inset;
  transition: background-color 9999s ease-out;
}

a {
  color: #68a9ff;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0 32px;
}

.user-layout,
.user-main {
  width: 100%;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border-radius: var(--r-lg);
  background: var(--glass);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 72px;
}

.brand-mark {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(67, 176, 255, 0.35), rgba(14, 33, 65, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.36);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 0.08em;
}

.brand-mark-logo {
  overflow: hidden;
}

.brand-mark-logo img {
  display: block;
  width: 44px;
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.22));
}

.brand-divider {
  width: 1px;
  align-self: stretch;
  background: rgba(255, 255, 255, 0.22);
}

.brand-cap {
  font-weight: 900;
  letter-spacing: 0.01em;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 0.95;
  color: rgba(255, 255, 255, 0.96);
  text-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}

.small {
  font-size: 12px;
}

.muted {
  color: var(--muted);
}

.actions,
.filters,
.chips,
.post-meta-right,
.tools-actions,
.tool-row,
.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.stack {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.card {
  border-radius: var(--r-lg);
  background: var(--glass);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.card-body {
  padding: 16px;
  overflow: visible;
}

.quick-links-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.quick-links-title,
.tools-title,
.tool-h,
.dd-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
}

.quick-links-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.quick-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.1s ease, background 0.2s ease;
}

.quick-link:hover {
  transform: translateY(-1px);
  border-color: rgba(67, 176, 255, 0.44);
  background: rgba(255, 255, 255, 0.08);
}

.badge-new {
  position: absolute;
  right: 8px;
  top: 8px;
  font-size: 10px;
  font-weight: 900;
  padding: 3px 7px;
  border-radius: 999px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: linear-gradient(135deg, #52b8ff, #2f89ff);
  box-shadow: 0 0 20px rgba(47, 137, 255, 0.5);
}

.filters-v2 {
  display: grid;
  gap: 10px;
}

.filters-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
  position: relative;
  z-index: 24;
}

.filters-actions {
  display: inline-flex;
  align-items: stretch;
  gap: 10px;
  flex-wrap: nowrap;
}

.sort-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
}

.filters-select-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.search-wrap,
.smart-input-wrap {
  position: relative;
}

.btn,
.dd-btn,
.input,
textarea,
.tool-field input,
.tool-field select,
.composer input {
  font: inherit;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.94);
  padding: 10px 13px;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover,
.dd-btn:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn:active {
  transform: translateY(1px);
}

.btn.primary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, rgba(47, 137, 255, 0.95), rgba(67, 176, 255, 0.92));
  box-shadow: 0 12px 28px rgba(47, 137, 255, 0.24);
}

.btn.small {
  padding: 8px 11px;
  font-size: 12px;
}

.sort-btn {
  min-width: 96px;
  padding: 9px 12px;
}

.sort-btn.is-active {
  border-color: rgba(67, 176, 255, 0.52);
  background: rgba(67, 176, 255, 0.24);
  color: #e9f5ff;
}

.btn-refresh-search {
  min-width: 146px;
}

.input,
textarea,
.tool-field input,
.tool-field select,
.composer input {
  width: 100%;
  border-radius: 14px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.24);
  color: var(--text);
  outline: none;
}

textarea {
  min-height: 130px;
  resize: vertical;
}

.input:focus,
textarea:focus,
.tool-field input:focus,
.tool-field select:focus,
.composer:focus-within,
.dd-btn:focus {
  border-color: rgba(67, 176, 255, 0.62);
  box-shadow: 0 0 0 4px rgba(67, 176, 255, 0.18);
}

.input-shell,
.select-shell {
  position: relative;
}

.input-shell > i,
.select-shell > i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.54);
  pointer-events: none;
  z-index: 1;
}

.input-with-icon,
.select-shell .input,
.tool-field select {
  padding-left: 42px;
}

.select-shell .input,
.tool-field select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 42px;
}

.select-shell::after,
.tool-field.select-field::after {
  content: "\f107";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: rgba(255, 255, 255, 0.54);
  pointer-events: none;
}

.dd {
  position: relative;
  min-width: 220px;
}

.dd-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 11px 12px;
  cursor: pointer;
}

.dd-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 60;
  display: none;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(5, 11, 22, 0.98);
  box-shadow: var(--shadow);
  max-height: min(46vh, 380px);
  overflow: auto;
}

.dd.open .dd-menu {
  display: block;
}

.dd-search {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(5, 11, 22, 0.98);
}

.dd-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.dd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.dd-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.dd-item.active {
  background: rgba(47, 137, 255, 0.16);
  border-color: rgba(67, 176, 255, 0.28);
}

.suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 10px);
  z-index: 55;
  display: none;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #07111d;
  box-shadow: var(--shadow);
  max-height: 280px;
  overflow: auto;
}

.suggest.show {
  display: block;
}

.inline-suggest {
  top: calc(100% + 8px);
}

.suggest-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.suggest-item:hover,
.suggest-item.active {
  background: rgba(47, 137, 255, 0.14);
}

.suggest-item.active {
  border-color: rgba(67, 176, 255, 0.58);
  background: rgba(47, 137, 255, 0.24);
  box-shadow: inset 0 0 0 1px rgba(67, 176, 255, 0.34);
}

.suggest-left {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.search-suggest {
  top: calc(100% + 8px);
  z-index: 140;
  border-color: rgba(67, 176, 255, 0.26);
  background:
    radial-gradient(240px 110px at 0% 0%, rgba(67, 176, 255, 0.08), transparent 60%),
    linear-gradient(180deg, #091321, #07101a);
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.44),
    0 0 0 1px rgba(67, 176, 255, 0.08);
  isolation: isolate;
}

.search-suggest-item {
  align-items: flex-start;
}

.search-suggest-main {
  min-width: 0;
  display: grid;
  gap: 5px;
  flex: 1 1 auto;
}

.search-suggest-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.search-suggest-title strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-suggest-excerpt {
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-suggest-arrow {
  color: rgba(255, 255, 255, 0.42);
  padding-top: 2px;
}

.suggest-tag {
  font-size: 11px;
  border-radius: 999px;
  padding: 4px 8px;
  border: 1px solid rgba(67, 176, 255, 0.35);
  background: rgba(67, 176, 255, 0.16);
  color: #cce6ff;
}

.suggest-muted {
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
}

.badge,
.chip,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.94);
}

.chip {
  cursor: pointer;
}

.chip.active,
.badge.ai-badge,
.pill.ok {
  border-color: rgba(47, 137, 255, 0.34);
  background: rgba(47, 137, 255, 0.16);
}

.active-filters {
  margin-top: 12px;
}

.sort-info {
  margin-top: 10px;
}

.analytics-wrap {
  margin-top: 12px;
}

.analytics-grid {
  width: 100%;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.analytics-card {
  min-width: 0;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.18);
  padding: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.analytics-card:hover {
  border-color: rgba(67, 176, 255, 0.45);
}

.a-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.a-ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
}

.a-title {
  font-size: 13px;
  font-weight: 700;
}

.a-value {
  margin-top: 8px;
  font-size: 22px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.a-sub {
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
}

.hr {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 14px 0;
}

.posts-list {
  display: grid;
  gap: 12px;
}

.post {
  border-radius: var(--r-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(12, 26, 51, 0.82), rgba(8, 18, 36, 0.86));
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.34);
  padding: 16px;
  display: grid;
  gap: 14px;
}

.post-title {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.08;
}

.post-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}

.post-summary {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.68;
  overflow-wrap: anywhere;
}

.post-taxonomy {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
}

.taxonomy-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.taxonomy-group-label,
.post-section-label,
.post-author-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.taxonomy-group-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.taxonomy-group .taxonomy-group-chips {
  display: contents;
}

.taxonomy-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 31px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.94);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.taxonomy-chip-category {
  border-color: rgba(67, 176, 255, 0.32);
  background: rgba(67, 176, 255, 0.14);
}

.taxonomy-chip-section {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
}

.taxonomy-chip-empty {
  color: rgba(255, 255, 255, 0.68);
}

.taxonomy-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 31px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px dashed rgba(67, 176, 255, 0.44);
  background: rgba(67, 176, 255, 0.08);
  color: #d9ecff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.12s ease;
}

.taxonomy-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(67, 176, 255, 0.62);
  background: rgba(67, 176, 255, 0.16);
}

.post-card,
.post-detail,
.post-preview {
  align-content: start;
}

.post-card {
  padding: 18px;
  gap: 16px;
}

.post-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.post-card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.taxonomy-group-compact {
  gap: 0;
}

.taxonomy-group-compact .taxonomy-group-label {
  display: none;
}

.post-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
}

.post-card-pill {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
}

.post-card-pill-accent {
  border-color: rgba(67, 176, 255, 0.34);
  background: rgba(67, 176, 255, 0.16);
}

.post-layout {
  display: grid;
  gap: 14px;
  align-items: start;
}

.post-layout-card,
.post-layout-detail,
.post-layout-preview {
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
}

.post-detail .post-title {
  font-size: clamp(26px, 3vw, 38px);
}

.post-card .post-title {
  font-size: clamp(24px, 2.6vw, 38px);
}

.post-section {
  display: grid;
  gap: 8px;
}

.post-copy-panel {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.02));
}

.post-section-soft {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 12px;
}

.post-summary-soft {
  color: rgba(255, 255, 255, 0.72);
}

.post-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.post-sql-panel {
  gap: 10px;
}

.post-code-panel {
  min-width: 0;
}

.post-card-stage {
  display: grid;
  gap: 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  padding: 14px;
}

.post-card-stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.post-stage-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
}

.post-stage-pill {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
}

.post-stage-pill-accent {
  border-color: rgba(67, 176, 255, 0.34);
  background: rgba(67, 176, 255, 0.16);
}

.post-card-stage-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.94);
}

.post-card-stage-hint {
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  line-height: 1.4;
  text-align: right;
  max-width: 440px;
}

.post-card-stage-item {
  display: grid;
  gap: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(0, 0, 0, 0.12));
  padding: 14px;
}

.post-card-stage-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.post-card-stage-name {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.96);
}

.post-card-inline-action {
  padding-inline: 12px;
}

.post-card-stage-text,
.post-card-purpose p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.62;
  overflow-wrap: anywhere;
}

.post-card-stage-code {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(6, 13, 25, 0.96), rgba(8, 16, 29, 0.94)),
    rgba(0, 0, 0, 0.22);
  padding: 14px;
  overflow: auto;
}

.post-card-stage-code code {
  display: block;
  color: rgba(234, 244, 255, 0.92);
  font-size: 13px;
  line-height: 1.58;
  white-space: pre-wrap;
  word-break: break-word;
}

.post-card-purpose {
  display: grid;
  gap: 6px;
}

.post-card-purpose-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.post-sql-inline {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(6, 13, 25, 0.95), rgba(9, 16, 30, 0.92)),
    rgba(0, 0, 0, 0.18);
  padding: 14px;
  overflow: auto;
}

.post-sql-inline code {
  display: block;
  color: rgba(234, 244, 255, 0.92);
  font-size: 13px;
  line-height: 1.58;
  white-space: pre-wrap;
  word-break: break-word;
}

.post-summary-clamped {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-sql-preview {
  padding: 0;
  background: transparent;
  border: 0;
  overflow: visible;
}

.post-sql-preview .code-wrap {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(280px 120px at 0% 0%, rgba(67, 176, 255, 0.08), transparent 60%),
    linear-gradient(180deg, rgba(6, 13, 25, 0.98), rgba(8, 16, 29, 0.96));
  overflow: hidden;
}

.post-sql-preview pre {
  margin: 0;
  padding: 16px 18px;
  border: 0;
  background: transparent;
}

.post-sql-preview pre code {
  font-size: 13px;
  line-height: 1.68;
}

.post-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding-top: 6px;
}

.post-footer-left {
  display: grid;
  gap: 10px;
  min-height: 0;
}

.post-footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.post-footer-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.post-footer-actions .actions {
  justify-content: flex-start;
}

.post-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.reaction-button {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
  color: rgba(255, 255, 255, 0.92);
  border-radius: 18px;
  padding: 8px 12px 8px 8px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease;
}

.reaction-button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
}

.reaction-button:disabled {
  opacity: 0.68;
  cursor: not-allowed;
}

.reaction-button.is-active {
  border-color: rgba(255, 255, 255, 0.22);
}

.reaction-icon-wrap {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 10px 18px rgba(0, 0, 0, 0.24);
}

.reaction-icon-svg {
  width: 20px;
  height: 20px;
  display: block;
}

.reaction-copy {
  display: grid;
  gap: 2px;
  text-align: left;
}

.reaction-copy strong {
  font-size: 13px;
  line-height: 1.1;
  color: rgba(255, 255, 255, 0.97);
}

.reaction-copy span {
  font-size: 11px;
  line-height: 1.1;
  color: rgba(255, 255, 255, 0.58);
}

.reaction-like .reaction-icon-wrap {
  background: linear-gradient(180deg, rgba(70, 155, 255, 0.34), rgba(14, 64, 138, 0.9));
  color: #dff1ff;
}

.reaction-like.is-active {
  border-color: rgba(88, 176, 255, 0.42);
  background: linear-gradient(180deg, rgba(65, 148, 255, 0.16), rgba(255, 255, 255, 0.04));
}

.reaction-love .reaction-icon-wrap {
  background: linear-gradient(180deg, rgba(255, 116, 154, 0.34), rgba(161, 26, 77, 0.9));
  color: #ffe8ef;
}

.reaction-love.is-active {
  border-color: rgba(255, 111, 152, 0.4);
  background: linear-gradient(180deg, rgba(255, 111, 152, 0.16), rgba(255, 255, 255, 0.04));
}

.post-author {
  display: grid;
  gap: 8px;
  justify-items: end;
  text-align: right;
}

.identity-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  padding: 8px 12px 8px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.04));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.identity-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  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.3), rgba(9, 18, 34, 0.96));
  color: rgba(255, 255, 255, 0.96);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

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

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

.identity-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
  text-align: left;
}

.identity-copy strong {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.96);
  line-height: 1.2;
}

.identity-copy span {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.58);
  line-height: 1.2;
}

.post-author-chip {
  justify-content: flex-end;
  max-width: min(320px, 100%);
}

.preview {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
  padding: 12px;
  overflow: auto;
}

.post .preview {
  min-height: 0;
  overflow: hidden;
}

.preview h1,
.preview h2,
.preview h3,
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
  margin: 0.55em 0;
}

.preview p,
.markdown-body p {
  margin: 0.55em 0;
  line-height: 1.58;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.preview li,
.markdown-body li,
.detail-summary,
.comment-card,
.copy-item span,
.notice-content div {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.preview blockquote,
.markdown-body blockquote {
  margin: 0.8em 0;
  padding: 10px 12px;
  border-left: 3px solid rgba(67, 176, 255, 0.75);
  border-radius: 10px;
  background: rgba(67, 176, 255, 0.12);
}

.preview pre,
.markdown-body pre {
  border-radius: 12px;
  padding: 10px;
  overflow: auto;
  background: rgba(0, 0, 0, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.preview code,
.markdown-body code,
.tool-out {
  font-family: var(--mono);
}

.preview code,
.markdown-body :not(pre) > code {
  padding: 2px 6px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
}

.empty-state-block {
  padding: 12px;
}

.btn-more-posts {
  width: 100%;
  justify-content: center;
  margin-top: 12px;
}

.ai-badge {
  position: relative;
  overflow: hidden;
  animation: aiGlow 2.3s ease-in-out infinite;
}

.ai-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(67, 176, 255, 1);
  box-shadow: 0 0 16px rgba(67, 176, 255, 0.65);
  animation: aiPulse 1.6s ease-in-out infinite;
}

.ai-badge::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 34%, rgba(255, 255, 255, 0.3) 50%, transparent 66%);
  transform: translateX(-80%);
  animation: aiSweep 2.8s linear infinite;
}

.ai-badge > * {
  position: relative;
  z-index: 1;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
}

.modal.open {
  display: block;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 8, 18, 0.62);
  backdrop-filter: blur(4px);
}

.modal-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(1100px, calc(100% - 28px));
  max-height: calc(100% - 28px);
  overflow: auto;
  transform: translate(-50%, -50%);
  border-radius: 18px;
  border: 1px solid rgba(67, 176, 255, 0.3);
  background:
    radial-gradient(520px 260px at 0% 0%, rgba(67, 176, 255, 0.15), transparent 62%),
    linear-gradient(180deg, rgba(7, 16, 34, 0.99), rgba(5, 11, 22, 0.99));
  box-shadow: var(--shadow);
  padding: 14px;
}

.detail-modal-panel {
  width: min(980px, calc(100% - 28px));
}

.publish-modal-panel {
  width: min(1180px, calc(100% - 28px));
}

.confirm-modal-panel {
  width: min(680px, calc(100% - 28px));
}

.tools-panel {
  width: min(860px, calc(100% - 28px));
}

.tools-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tool-box {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  padding: 12px;
  margin-top: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.publish-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.95fr);
  gap: 14px;
}

.publish-grid-single {
  grid-template-columns: minmax(0, 1fr);
}

.publish-form {
  margin-top: 0;
}

.preview-box {
  margin-top: 0;
}

.preview-surface {
  min-height: 320px;
}

.confirm-delete-card {
  display: grid;
  gap: 12px;
}

.confirm-delete-kicker {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.52);
}

.confirm-delete-title {
  margin: 0;
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.confirm-delete-copy {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.65;
}

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

.confirm-delete-item {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 95, 109, 0.24);
  background: rgba(255, 95, 109, 0.08);
  color: rgba(255, 255, 255, 0.9);
}

.field-grid {
  display: grid;
  gap: 10px;
}

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

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

.tool-field {
  display: grid;
  gap: 6px;
}

.tool-field > span {
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  font-weight: 700;
}

.composer {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-height: 46px;
  border-radius: 14px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.24);
}

.composer input {
  min-width: 160px;
  flex: 1;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.draft-chips {
  gap: 8px;
}

.draft-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  background: rgba(47, 137, 255, 0.16);
  border: 1px solid rgba(47, 137, 255, 0.34);
}

.draft-chip button {
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  display: grid;
  gap: 14px;
}

.detail-header {
  display: grid;
  gap: 14px;
}

.detail-summary {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.65;
}

.markdown-body {
  color: rgba(255, 255, 255, 0.84);
}

.comments-grid {
  display: grid;
  gap: 10px;
}

.comment-card {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.18);
  padding: 12px;
}

.comment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.comment-author-chip {
  max-width: min(100%, 380px);
}

.code-wrap {
  position: relative;
}

.copy-chip {
  position: absolute;
  top: 10px;
  right: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.94);
  padding: 6px 10px;
  font-size: 11px;
  cursor: pointer;
}

.copy-chip:hover {
  background: rgba(255, 255, 255, 0.12);
}

.sql-keyword {
  color: #74beff;
  font-weight: 700;
}

.sql-string {
  color: #9de4bb;
}

.sql-comment {
  color: #92a1bd;
  font-style: italic;
}

.sql-number {
  color: #ffcf82;
}

.sql-function {
  color: #ff9cc4;
}

.sql-identifier {
  color: #cedcff;
}

.tool-out {
  margin-top: 10px;
  border-radius: 12px;
  border: 1px dashed rgba(67, 176, 255, 0.28);
  background: rgba(0, 0, 0, 0.3);
  padding: 12px;
  white-space: pre-wrap;
  min-height: 44px;
  color: rgba(255, 255, 255, 0.9);
}

.tools-fab,
.top-fab {
  position: fixed;
  right: 18px;
  border-radius: 999px;
  border: 1px solid rgba(67, 176, 255, 0.34);
  background: rgba(5, 11, 22, 0.88);
  color: #d6ebff;
  padding: 10px 13px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.42);
  display: inline-flex;
  gap: 8px;
  align-items: center;
  cursor: pointer;
  z-index: 80;
}

.tools-fab {
  bottom: 18px;
}

.top-fab {
  bottom: 82px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.top-fab.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.toast {
  position: fixed;
  left: 50%;
  top: 14px;
  width: min(92vw, 430px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(13, 22, 40, 0.86);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.38);
  color: #eaf4ff;
  backdrop-filter: blur(12px) saturate(1.15);
  transform: translateX(-50%) translateY(-14px) scale(0.97);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s ease, opacity 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  z-index: 95;
}

.toast.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(1);
}

.toast-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
}

.toast-icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.14);
  font-size: 12px;
}

.toast-text {
  font-size: 13px;
  line-height: 1.25;
  font-weight: 700;
}

.toast-close {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}

.toast.toast-success {
  border-color: rgba(79, 209, 144, 0.5);
}

.toast.toast-error {
  border-color: rgba(255, 95, 109, 0.56);
}

.toast.toast-warning {
  border-color: rgba(255, 176, 82, 0.56);
}

.toast.toast-info {
  border-color: rgba(67, 176, 255, 0.56);
}

.session-actions {
  justify-content: flex-end;
}

.session-bubble {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 88;
  display: grid;
  gap: 12px;
  justify-items: end;
}

.session-bubble-menu {
  width: min(320px, calc(100vw - 24px));
  border-radius: 22px;
  border: 1px solid rgba(67, 176, 255, 0.24);
  background:
    radial-gradient(260px 160px at 100% 0%, rgba(67, 176, 255, 0.14), transparent 60%),
    linear-gradient(180deg, rgba(8, 16, 29, 0.98), rgba(5, 11, 22, 0.98));
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.42);
  padding: 14px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(0.98);
  transform-origin: bottom right;
  transition: opacity 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.session-bubble.is-open .session-bubble-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.session-bubble-toggle {
  min-width: 0;
  max-width: min(360px, calc(100vw - 24px));
  padding: 9px 12px 9px 10px;
  border-radius: 999px;
  border: 1px solid rgba(67, 176, 255, 0.32);
  background: rgba(5, 11, 22, 0.88);
  color: #eef7ff;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.38);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.18s ease, background 0.18s ease;
}

.session-bubble-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(67, 176, 255, 0.5);
  background: rgba(8, 16, 29, 0.94);
}

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

.session-bubble-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #eff7ff;
  background: linear-gradient(180deg, rgba(67, 176, 255, 0.46), rgba(14, 33, 65, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

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

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

.session-bubble-meta {
  min-width: 0;
  display: grid;
  gap: 2px;
  text-align: left;
}

.session-bubble-name {
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.session-bubble-context,
.session-bubble-email {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.62);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.session-bubble-caret {
  color: rgba(255, 255, 255, 0.74);
  transition: transform 0.18s ease;
}

.session-bubble.is-open .session-bubble-caret {
  transform: rotate(180deg);
}

.session-bubble-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.session-bubble-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.session-bubble-links {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.session-bubble-link {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.94);
  font-weight: 700;
  text-decoration: none;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.12s ease;
}

.session-bubble-link:hover {
  text-decoration: none;
  transform: translateY(-1px);
  border-color: rgba(67, 176, 255, 0.34);
  background: rgba(67, 176, 255, 0.12);
}

.session-bubble-link.logout {
  border-color: rgba(255, 95, 109, 0.26);
  background: rgba(255, 95, 109, 0.12);
}

.session-bubble-link.logout:hover {
  border-color: rgba(255, 95, 109, 0.44);
  background: rgba(255, 95, 109, 0.18);
}

.session-bubble-link-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.session-bubble-link-right {
  color: rgba(255, 255, 255, 0.52);
}

.hero-card,
.workspace-card,
.notice-card {
  margin-top: 16px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.85fr);
  gap: 18px;
  align-items: center;
}

.hero-title {
  margin: 14px 0 10px;
  font-size: clamp(28px, 4.4vw, 52px);
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.hero-title code {
  font-family: var(--mono);
  font-size: 0.9em;
  color: #9fd1ff;
}

.hero-text {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
  max-width: 68ch;
}

.hero-stats {
  grid-template-columns: 1fr;
}

.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);
}

.tab-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0 14px;
}

.workspace-panel {
  display: grid;
  gap: 12px;
}

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

.panel-title {
  margin: 0;
  font-size: 18px;
}

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

.admin-card {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.18);
  padding: 14px;
  display: grid;
  gap: 10px;
}

.admin-card h4 {
  margin: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  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);
}

.tools-grid-page {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.auth-modal-panel {
  width: min(700px, calc(100% - 28px));
}

.auth-form {
  margin-top: 0;
  display: grid;
  gap: 10px;
}

.auth-panel {
  margin-top: 6px;
}

.filter-select {
  min-width: 180px;
}

.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);
}

@keyframes aiPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.9;
  }

  50% {
    transform: scale(1.5);
    opacity: 1;
  }
}

@keyframes aiGlow {
  0%,
  100% {
    filter: saturate(1);
  }

  50% {
    filter: saturate(1.2);
  }
}

@keyframes aiSweep {
  from {
    transform: translateX(-80%) skewX(-10deg);
  }

  to {
    transform: translateX(80%) skewX(-10deg);
  }
}

@media (max-width: 980px) {
  body {
    background-attachment: scroll;
  }

  .topbar,
  .card-header,
  .tools-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .quick-links-grid,
  .analytics-grid,
  .tool-grid,
  .publish-grid,
  .hero-grid,
  .tools-grid-page {
    grid-template-columns: 1fr;
  }

  .filters-search-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .filters-actions {
    width: 100%;
  }

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

@media (max-width: 640px) {
  .container {
    width: calc(100% - 24px);
    padding-top: 12px;
  }

  .brand-divider {
    display: none;
  }

  .brand-lockup {
    width: 100%;
    min-height: 56px;
    gap: 10px;
  }

  .brand-cap {
    font-size: clamp(18px, 5.4vw, 28px);
  }

  .filters-search-row,
  .filters-select-row,
  .field-grid.two {
    grid-template-columns: 1fr;
  }

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

  .filter-select {
    min-width: 0;
    width: 100%;
  }

  .filters-actions {
    flex-direction: column;
  }

  .sort-toggle {
    width: 100%;
    justify-content: stretch;
  }

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

  .btn-refresh-search {
    width: 100%;
    min-width: 0;
  }

  .post-meta {
    display: grid;
    grid-template-columns: 1fr;
  }

  .post-meta-right {
    justify-content: flex-start;
  }

  .post-footer {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .post-author {
    justify-items: start;
    text-align: left;
  }

  .post-card-head,
  .post-card-stage-head,
  .post-card-stage-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .post-card-meta {
    margin-left: 0;
    justify-content: flex-start;
  }

  .post-card-stage-hint {
    text-align: left;
  }

  .post-stage-meta {
    margin-left: 0;
    justify-content: flex-start;
  }

  .post-layout-card,
  .post-layout-detail,
  .post-layout-preview {
    grid-template-columns: 1fr;
  }

  .tools-fab-label,
  .top-fab-label {
    display: none;
  }

  .tools-fab,
  .top-fab {
    width: 44px;
    height: 44px;
    justify-content: center;
    padding: 0;
  }

  .session-bubble {
    right: 12px;
    bottom: 12px;
  }

  .session-bubble-toggle {
    width: min(100%, calc(100vw - 24px));
    padding-right: 10px;
  }

  .session-bubble-name {
    max-width: 110px;
  }

  .modal-panel {
    width: calc(100% - 20px);
    max-height: 88svh;
    padding: 12px;
  }

  .toast {
    width: min(96vw, 420px);
    border-radius: 14px;
  }
}
