:root {
  --app-outer-gap: 22px;
  --brand-green: #01a482;
  --brand-green-dark: #007d63;
  --brand-green-soft: rgba(1, 164, 130, 0.12);
}

[hidden] {
  display: none !important;
}

body {
  background-image: url("../../../img/bg.webp");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.app-bg {
  background-image: url("../../../img/bg.webp");
  background-size: cover;
  background-position: center;
}

.app-shell {
  width: calc(100vw - (var(--app-outer-gap) * 2));
  height: calc(100dvh - (var(--app-outer-gap) * 2));
  margin: var(--app-outer-gap);
  display: flex;
  overflow: hidden;
  border-radius: 24px;
}

.glass-panel {
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.58);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
}

.custom-scrollbar::-webkit-scrollbar {
  width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.18);
  border-radius: 999px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border-radius: 12px;
  padding: 13px 16px;
  color: #444;
  font-size: 16px;
  font-weight: 800;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link .material-symbols-outlined {
  color: var(--brand-green);
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.45);
  color: #000;
}

.nav-link.is-active {
  background: #000;
  color: #fff;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.22);
}

.nav-link.is-active .material-symbols-outlined {
  color: var(--brand-green);
}

.nav-group {
  display: grid;
  gap: 10px;
}

.nav-link-with-toggle {
  justify-content: space-between;
  padding: 0;
  overflow: hidden;
}

.nav-link-main {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 12px;
  padding: 13px 0 13px 16px;
}

.nav-link-main span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-toggle {
  display: grid;
  width: 42px;
  min-height: 48px;
  flex: 0 0 42px;
  place-items: center;
  color: inherit;
}

.nav-toggle .material-symbols-outlined {
  color: currentColor;
  font-size: 20px;
  transition: transform 0.2s ease;
}

.nav-toggle[aria-expanded="false"] .material-symbols-outlined {
  transform: rotate(180deg);
}

.nav-submenu {
  margin: 0 0 4px 34px;
  display: grid;
  gap: 8px;
  border-left: 1px solid rgba(1, 164, 130, 0.24);
  padding: 2px 0 2px 13px;
}

.nav-submenu a {
  display: flex;
  min-height: 32px;
  align-items: center;
  gap: 8px;
  border-radius: 10px;
  padding: 7px 9px;
  color: #4b5563;
  font-size: 12px;
  font-weight: 850;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-submenu a:hover {
  background: rgba(255, 255, 255, 0.55);
  color: #000;
  transform: translateX(2px);
}

.nav-submenu a.is-active {
  background: rgba(1, 164, 130, 0.12);
  color: #111;
}

.nav-submenu .material-symbols-outlined {
  color: var(--brand-green);
  font-size: 17px;
}

.nav-submenu[hidden] {
  display: none;
}

.app-header {
  display: flex;
  flex-shrink: 0;
  flex-direction: column;
  gap: 14px;
  padding: 34px 40px 22px;
}

.app-header > div:first-child,
.app-header-title {
  min-width: 0;
}

.app-header {
  position: relative;
}

.app-header > .app-header-title,
.app-header > .app-header-actions {
  position: relative;
}

@media (min-width: 1024px) {
  .app-header {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }
}

.app-header-title h1 {
  color: #111;
  font-size: clamp(30px, 2.7vw, 44px);
  line-height: 1;
  font-weight: 900;
}

.app-header-title p {
  margin-top: 8px;
  color: #525861;
  font-size: 13px;
  font-weight: 700;
}

.app-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

@media (min-width: 1024px) {
  .app-header-actions {
    justify-content: flex-end;
  }
}

.profile-switcher-form {
  min-width: 0;
}

.profile-select-control {
  position: relative;
  min-width: 0;
}

.profile-select-control > img {
  position: absolute;
  left: 12px;
  top: 50%;
  z-index: 2;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  background: #fff;
  object-fit: cover;
  transform: translateY(-50%);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1);
  pointer-events: none;
}

.profile-switcher {
  min-width: 140px;
  max-width: min(280px, 100%);
  min-height: 48px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  padding: 0 16px 0 52px;
  color: #111;
  font-size: 14px;
  font-weight: 800;
  outline: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.analysis-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.8);
  padding: 8px 18px;
  color: #111;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}

.analysis-pill span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--brand-green);
}

.header-import-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
  padding: 0 16px;
  color: #111;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.header-import-button .material-symbols-outlined {
  font-size: 18px;
}

.mobile-nav {
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 8px 12px;
  color: #333;
  font-size: 12px;
  font-weight: 900;
}

.mobile-nav.is-active {
  background: #000;
  color: #fff;
}

.form-label {
  display: block;
  margin-bottom: 6px;
  color: #555;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.form-input,
.select-compact {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 14px !important;
  background: rgba(255, 255, 255, 0.78);
  padding: 12px 14px;
  color: #111827;
  font-size: 14px;
  font-weight: 750;
  outline: none;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.035);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input.form-input,
select.form-input,
textarea.form-input,
input.select-compact,
select.select-compact {
  border-radius: 14px !important;
}

textarea.form-input {
  min-height: 96px;
  resize: vertical;
  line-height: 1.45;
}

select.form-input,
select.select-compact,
.profile-switcher {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #6b7280 50%),
    linear-gradient(135deg, #6b7280 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 38px;
}

.select-compact {
  min-width: min(320px, 100%);
}

.form-input:focus,
.select-compact:focus,
.profile-switcher:focus {
  border-color: rgba(1, 164, 130, 0.55);
  background-color: rgba(255, 255, 255, 0.94);
  box-shadow: 0 0 0 3px rgba(1, 164, 130, 0.12), 0 10px 24px rgba(0, 0, 0, 0.04);
}

input[type="file"].form-input {
  display: flex;
  align-items: center;
  padding: 8px;
  color: #4b5563;
  cursor: pointer;
  overflow: hidden;
}

input[type="file"].form-input::file-selector-button {
  min-height: 34px;
  margin-right: 12px;
  border: 1px solid rgba(1, 164, 130, 0.28);
  border-radius: 10px;
  background: rgba(1, 164, 130, 0.1);
  padding: 0 12px;
  color: #111827;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

input[type="file"].form-input::file-selector-button:hover {
  border-color: rgba(1, 164, 130, 0.45);
  background: rgba(1, 164, 130, 0.16);
}

input[type="file"].form-input::-webkit-file-upload-button {
  min-height: 34px;
  margin-right: 12px;
  border: 1px solid rgba(1, 164, 130, 0.28);
  border-radius: 10px;
  background: rgba(1, 164, 130, 0.1);
  padding: 0 12px;
  color: #111827;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.btn-primary,
.btn-secondary,
.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border-radius: 14px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 900;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: #000;
  color: #fff;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.72);
  color: #111;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.btn-danger {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-danger:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.filter-panel {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.07);
  padding: 18px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.filter-panel .form-input {
  min-height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 15px;
}

.filter-submit {
  min-height: 48px;
  border-radius: 14px;
}

.posts-filter-panel {
  padding: 16px;
}

.posts-filter-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto minmax(210px, 0.55fr) minmax(210px, 0.55fr) auto;
  gap: 12px;
  align-items: center;
}

.type-filter-group {
  display: inline-grid;
  grid-template-columns: repeat(3, 56px);
  gap: 8px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.045);
  padding: 4px;
}

.type-filter-option {
  position: relative;
  display: grid;
  width: 56px;
  height: 48px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.type-filter-option:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.9);
}

.type-filter-option.is-active {
  border-color: rgba(0, 0, 0, 0.18);
  background: #fff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.type-filter-option input {
  position: absolute;
  pointer-events: none;
  opacity: 0;
}

.type-filter-option img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.type-filter-option span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.filter-active-row {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.filter-active-row a {
  color: #4b5563;
  font-size: 12px;
  font-weight: 900;
  text-decoration: underline;
}

.compare-panel {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.07);
  padding: 20px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.admin-panel {
  margin-bottom: 20px;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-tabs a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 10px 14px;
  color: #374151;
  font-size: 13px;
  font-weight: 900;
}

.admin-tabs a.is-active {
  background: #000;
  color: #fff;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18);
}

.admin-tabs .material-symbols-outlined {
  color: var(--brand-green);
  font-size: 19px;
}

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

.compare-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.compare-form {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.compare-field {
  min-width: 0;
}

.compare-field > span {
  display: block;
  margin-bottom: 7px;
  color: #5d626b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.compare-select-wrap {
  position: relative;
}

.compare-select-wrap > .material-symbols-outlined {
  position: absolute;
  left: 15px;
  top: 50%;
  z-index: 1;
  color: var(--brand-green);
  font-size: 21px;
  transform: translateY(-50%);
  pointer-events: none;
}

.compare-select-wrap select {
  width: 100%;
  min-height: 54px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  padding: 0 42px 0 58px;
  color: #111827;
  font-size: 14px;
  font-weight: 850;
  outline: none;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.compare-select-wrap select:focus {
  border-color: rgba(1, 164, 130, 0.55);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 0 0 3px rgba(1, 164, 130, 0.12), 0 10px 24px rgba(0, 0, 0, 0.04);
}

.compare-submit {
  min-height: 54px;
  border-radius: 14px;
  padding-inline: 22px;
}

.compare-submit .material-symbols-outlined {
  color: var(--brand-green);
  font-size: 20px;
}

.import-profile-select select {
  padding-left: 56px;
}

.glass-panel form .form-input,
.glass-panel form select.form-input,
.glass-panel form textarea.form-input,
.import-profile-select,
.profile-select-control select {
  border-radius: 14px !important;
}

.profile-select-control select {
  overflow: hidden;
}

.replace-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-radius: 14px;
  background: rgba(1, 164, 130, 0.08);
  border: 1px solid rgba(1, 164, 130, 0.16);
  padding: 14px;
  cursor: pointer;
}

.replace-option input {
  appearance: none;
  margin-top: 4px;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border: 1px solid rgba(1, 164, 130, 0.55);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--brand-green);
  display: grid;
  place-items: center;
}

.replace-option input:checked {
  background: var(--brand-green);
  border-color: var(--brand-green);
}

.replace-option input:checked::after {
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  content: "";
  transform: rotate(45deg) translate(-1px, -1px);
}

.replace-option strong {
  display: block;
  color: #111827;
  font-size: 13px;
  font-weight: 900;
}

.replace-option small {
  display: block;
  margin-top: 3px;
  color: #5d626b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.import-list-panel {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.07);
  padding: 20px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.collapsible-section-head,
.collapsible-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.collapsible-card-head {
  min-height: 44px;
}

.collapse-toggle {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #111827;
  transition: background 0.2s ease, transform 0.2s ease;
}

.collapse-toggle:hover {
  background: rgba(1, 164, 130, 0.1);
  transform: translateY(-1px);
}

.collapse-toggle.compact {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
}

.collapse-toggle .material-symbols-outlined {
  color: var(--brand-green);
  font-size: 20px;
}

[id^="collapse-"][hidden] {
  display: none !important;
}

.import-profile-list {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

.import-profile-card {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, auto) auto;
  align-items: center;
  gap: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.72);
  padding: 14px;
}

.import-profile-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.import-profile-main img {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 14px;
  object-fit: cover;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.import-profile-main h3 {
  overflow: hidden;
  color: #111827;
  font-size: 15px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.import-profile-main p {
  margin-top: 2px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 800;
}

.import-profile-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.import-profile-stats span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.05);
  padding: 6px 10px;
  color: #4b5563;
  font-size: 11px;
  font-weight: 800;
}

.import-profile-stats strong {
  color: #111827;
  font-weight: 900;
}

.import-profile-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.import-profile-actions form {
  display: contents;
}

.ai-panel {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.07);
  padding: 24px 28px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.ai-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #111;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 900;
}

.ai-title .material-symbols-outlined {
  color: var(--brand-green);
}

.ai-copy {
  margin-top: 10px;
  color: #606671;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
}

.ai-access-strip {
  margin-top: 16px;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  background: rgba(1, 164, 130, 0.08);
  border: 1px solid rgba(1, 164, 130, 0.14);
  padding: 8px 12px;
  color: #374151;
  font-size: 12px;
  font-weight: 800;
}

.ai-access-strip .material-symbols-outlined {
  color: var(--brand-green);
  font-size: 18px;
}

.ai-access-strip small {
  color: #6b7280;
  font-weight: 800;
}

.ai-access-separator {
  color: var(--brand-green);
  font-weight: 900;
}

.ai-quick-title {
  margin-top: 22px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.ai-quick-title .material-symbols-outlined {
  color: #f59e0b;
  font-size: 16px;
}

.ai-quick-list {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ai-quick-list button {
  min-height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.62);
  padding: 7px 15px;
  color: #4b5563;
  font-size: 12px;
  font-weight: 800;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.ai-quick-list button:hover {
  border-color: rgba(1, 164, 130, 0.28);
  background: rgba(1, 164, 130, 0.08);
  transform: translateY(-1px);
}

.ai-question-form {
  margin-top: 22px;
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr auto;
  gap: 14px;
  align-items: end;
}

.ai-compare-field > span {
  display: block;
  margin-bottom: 7px;
  color: #5d626b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.ai-compare-select select {
  padding-left: 56px;
}

.ai-question-input {
  min-height: 82px;
}

.ai-submit {
  min-height: 54px;
  padding-inline: 22px;
}

.ai-submit .material-symbols-outlined {
  color: var(--brand-green);
}

.ai-sentiment-bar {
  margin-top: 18px;
  display: flex;
  min-height: 34px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
}

.ai-sentiment-bar div {
  display: grid;
  min-width: 58px;
  place-items: center;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.ai-sentiment-bar .positive {
  background: #059669;
}

.ai-sentiment-bar .neutral {
  background: #f59e0b;
  color: #111827;
}

.ai-sentiment-bar .critical {
  background: #e11d48;
}

.ai-sentiment-note {
  margin-top: 14px;
  color: #606671;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
}

.ai-answer-list {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.ai-answer-list div {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid rgba(255, 255, 255, 0.72);
  padding: 12px 14px;
  color: #374151;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}

.ai-answer-list .material-symbols-outlined {
  color: var(--brand-green);
  font-size: 19px;
}

.ai-gemini-output {
  margin-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding-top: 16px;
  color: #1f2937;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.7;
}

.ai-gemini-output h3,
.ai-gemini-output h4 {
  margin: 18px 0 8px;
  color: #3730a3;
  font-weight: 900;
  line-height: 1.3;
}

.ai-gemini-output h3 {
  font-size: 16px;
}

.ai-gemini-output h4 {
  font-size: 14px;
}

.ai-gemini-output strong {
  color: #111827;
  font-weight: 900;
}

.ai-gemini-output li {
  margin: 5px 0 5px 18px;
  list-style: disc;
}

.ai-recommendation {
  margin-top: 14px;
  border-radius: 16px;
  background: rgba(1, 164, 130, 0.08);
  border: 1px solid rgba(1, 164, 130, 0.14);
  padding: 14px 16px;
}

.ai-recommendation strong {
  color: #111827;
  font-size: 13px;
  font-weight: 900;
}

.ai-recommendation p {
  margin-top: 5px;
  color: #4b5563;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}

.access-profile-box {
  display: grid;
  gap: 8px;
  border-radius: 16px;
  background: rgba(1, 164, 130, 0.06);
  border: 1px solid rgba(1, 164, 130, 0.14);
  padding: 14px;
}

.access-profile-box > strong {
  grid-column: 1 / -1;
  color: #111827;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.access-profile-box > span {
  grid-column: 1 / -1;
}

.access-profile-box label {
  display: flex;
  align-items: center;
  justify-self: start;
  gap: 9px;
  color: #4b5563;
  font-size: 13px;
  font-weight: 800;
}

.access-profile-box label.is-disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.access-profile-box input {
  appearance: none;
  display: grid;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  place-items: center;
  border: 1px solid rgba(1, 164, 130, 0.55);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.86);
}

.access-profile-box input:checked {
  background: var(--brand-green);
  border-color: var(--brand-green);
}

.access-profile-box input:checked::after {
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  content: "";
  transform: rotate(45deg) translate(-1px, -1px);
}

.access-profile-box.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  justify-items: start;
  margin: 12px 0;
}

.user-access-list {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.user-access-card {
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid rgba(255, 255, 255, 0.72);
  padding: 14px;
}

.user-access-card > [id^="collapse-"] {
  margin-top: 12px;
}

.user-access-card h3 {
  color: #111827;
  font-size: 15px;
  font-weight: 900;
}

.user-access-card p {
  margin-top: 3px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 800;
}

.access-profile-summary {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.access-profile-summary span {
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  padding: 6px 10px;
  color: #4b5563;
  font-size: 11px;
  font-weight: 900;
}

.profile-edit-form {
  grid-column: 1 / -1;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(1, 164, 130, 0.14);
  padding: 16px;
}

.profile-edit-form[hidden] {
  display: none;
}

.profile-edit-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.profile-edit-head img {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  object-fit: cover;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.profile-edit-head h3 {
  color: #111827;
  font-size: 15px;
  font-weight: 900;
}

.profile-edit-head p {
  margin-top: 2px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 800;
}

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

.profile-edit-description {
  grid-column: 1 / -1;
}

.profile-edit-actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.metric-card {
  min-height: 128px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 12px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(20px);
}

.metric-card-icon,
.overview-metric-icon,
.city-metric-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: var(--brand-green-soft);
  color: var(--brand-green);
}

.metric-card-icon .material-symbols-outlined,
.overview-metric-icon .material-symbols-outlined,
.city-metric-icon .material-symbols-outlined {
  font-size: 20px;
}

.metric-card-heading,
.overview-metric-heading,
.city-metric-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.metric-card > span,
.metric-card-heading > span {
  color: #666;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.metric-card strong {
  color: #000;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1;
  font-weight: 900;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #111;
  font-size: 16px;
  font-weight: 900;
}

.section-title .material-symbols-outlined,
.overview-title .material-symbols-outlined,
.city-title .material-symbols-outlined,
.header-import-button .material-symbols-outlined,
.icon-button .material-symbols-outlined {
  color: var(--brand-green);
}

.bar,
.timeline-row div,
.ranking-row div {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
}

.bar i,
.timeline-row i,
.ranking-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-green), var(--brand-green-dark));
}

.timeline-row,
.ranking-row,
.list-row {
  display: grid;
  align-items: center;
  gap: 12px;
}

.timeline-row {
  grid-template-columns: 96px 1fr 42px;
}

.ranking-row {
  grid-template-columns: 34px minmax(120px, 1fr) 1.4fr 38px;
}

.list-row {
  grid-template-columns: 92px 1fr 38px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding: 10px 0;
}

.timeline-row span,
.list-row span {
  color: #666;
  font-size: 11px;
  font-weight: 800;
}

.ranking-row b {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.08);
  font-size: 12px;
}

.ranking-row span,
.list-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 900;
}

.ranking-row em,
.list-row em,
.timeline-row b {
  color: #555;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.post-card {
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.62);
  overflow: hidden;
  backdrop-filter: blur(22px);
}

.post-card-button {
  display: flex;
  gap: 14px;
  width: 100%;
  padding: 14px;
}

.post-thumb {
  width: 92px;
  height: 92px;
  flex: 0 0 92px;
  border-radius: 10px;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.08);
}

.post-type-thumb {
  object-fit: contain;
  padding: 12px;
  background: #f0f0f0;
}

.post-thumb-empty {
  display: grid;
  place-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  padding: 4px 8px;
  color: #111;
  font-size: 11px;
  font-weight: 900;
}

.badge-with-icon img {
  width: 15px;
  height: 15px;
  object-fit: contain;
}

.quick-prompt {
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 12px;
  text-align: left;
  color: #333;
  font-size: 13px;
  font-weight: 800;
}

.icon-button {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #111;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(8px);
}

.modal-overlay[hidden] {
  display: none;
}

.modal-panel {
  width: min(720px, 100%);
  max-height: 90vh;
  overflow: auto;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
}

.code-pill {
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.08);
  padding: 2px 6px;
  font-size: 12px;
  font-weight: 800;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.overview-metric,
.overview-panel {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.07);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.overview-metric {
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px 24px;
}

.overview-metric > span,
.overview-metric-heading > span {
  color: #5d626b;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.overview-metric strong {
  color: #000;
  font-size: 34px;
  line-height: 1;
  font-weight: 900;
}

.overview-metric small {
  color: #737780;
  font-size: 11px;
  font-weight: 700;
}

.overview-panel {
  padding: 24px 28px;
}

.overview-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #111;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 800;
}

.overview-timeline {
  margin-top: 18px;
  display: grid;
  gap: 8px;
}

.overview-week {
  display: grid;
  grid-template-columns: 132px 1fr 34px;
  align-items: center;
  gap: 12px;
}

.overview-week span {
  color: #686d75;
  font-size: 11px;
  font-weight: 800;
  text-align: right;
}

.overview-week div {
  height: 20px;
  overflow: hidden;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.06);
}

.overview-week i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-green), var(--brand-green-dark));
}

.overview-week b {
  color: #585d66;
  font-size: 11px;
  font-weight: 900;
}

.overview-content-types {
  margin-top: 22px;
  display: grid;
  gap: 17px;
}

.overview-type-row > div:first-child {
  margin-bottom: 7px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #111;
  font-size: 14px;
  font-weight: 800;
}

.overview-type-row b {
  white-space: nowrap;
  color: #111;
  font-size: 12px;
  font-weight: 900;
}

.overview-type-bar {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.05);
}

.overview-type-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.type-video i {
  background: linear-gradient(90deg, var(--brand-green), var(--brand-green-dark));
}

.type-sidecar i {
  background: linear-gradient(90deg, var(--brand-green), var(--brand-green-dark));
}

.type-image i {
  background: linear-gradient(90deg, var(--brand-green), var(--brand-green-dark));
}

.theme-cloud {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.theme-cloud span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid currentColor;
}

.theme-cloud span b {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: currentColor;
  font-size: 11px;
  font-weight: 900;
}

.theme-red {
  background: #fee2e2;
  color: #b91c1c;
}

.theme-indigo {
  background: #e0e7ff;
  color: #3730a3;
}

.theme-blue {
  background: #dbeafe;
  color: #1d4ed8;
}

.theme-green {
  background: #dcfce7;
  color: #047857;
}

.theme-amber {
  background: #fef3c7;
  color: #b45309;
}

.theme-pink {
  background: #fce7f3;
  color: #be185d;
}

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

.overview-top-post {
  min-height: 126px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: none;
}

.overview-top-post button {
  display: grid;
  width: 100%;
  grid-template-columns: 76px 1fr;
  align-items: center;
  gap: 18px;
  padding: 16px;
  text-align: left;
}

.overview-thumb {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 10px;
  background: #f0f0f0;
  color: #6d5bd0;
}

.overview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 9px;
}

.overview-top-body {
  min-width: 0;
}

.overview-top-meta {
  margin-bottom: 7px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.overview-top-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 6px;
  background: #fee2e2;
  padding: 4px 9px;
  color: #ef4444;
  font-size: 10px;
  font-weight: 900;
}

.overview-top-meta span img {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

.overview-top-meta small {
  color: #69707a;
  font-size: 10px;
  font-weight: 800;
}

.overview-top-body p {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.45;
}

.overview-post-stats {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: #4b5563;
  font-size: 10px;
  font-weight: 800;
}

.overview-post-stats span::before {
  margin-right: 4px;
  color: #ec4899;
  content: "♥";
}

.overview-post-stats span:nth-child(2)::before {
  color: #8b5cf6;
  content: "◒";
}

.overview-post-stats span:nth-child(3)::before {
  color: #111;
  content: "◉";
}

.cities-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.city-metric,
.city-panel,
.region-card {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.07);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.city-metric {
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px 24px;
}

.city-metric > span,
.city-metric-heading > span {
  color: #5d626b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.city-metric strong {
  color: #000;
  font-size: 34px;
  line-height: 1;
  font-weight: 900;
}

.city-metric small {
  color: #737780;
  font-size: 11px;
  font-weight: 700;
}

.city-top-name {
  overflow: hidden;
  color: #d97706 !important;
  font-size: 24px !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.city-panel {
  padding: 24px 28px;
}

.city-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #111;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 800;
}

.city-ranking-list,
.city-location-list {
  margin-top: 22px;
  max-height: 390px;
  overflow-y: auto;
  padding-right: 8px;
}

.city-ranking-list::-webkit-scrollbar,
.city-location-list::-webkit-scrollbar {
  width: 6px;
}

.city-ranking-list::-webkit-scrollbar-thumb,
.city-location-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
}

.city-ranking-row {
  display: grid;
  grid-template-columns: 32px minmax(170px, 1fr) 1.5fr 28px;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  padding: 11px 0;
}

.city-ranking-row b {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: #f3f4f6;
  color: #4b5563;
  font-size: 12px;
  font-weight: 900;
}

.city-ranking-row:nth-child(1) b {
  background: #fef3c7;
  color: #b45309;
}

.city-ranking-row:nth-child(2) b {
  background: #e5e7eb;
  color: #475569;
}

.city-ranking-row:nth-child(3) b {
  background: #f3e8d8;
  color: #92400e;
}

.city-ranking-name {
  min-width: 0;
}

.city-ranking-name strong {
  display: block;
  overflow: hidden;
  color: #111827;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.city-ranking-name small {
  display: block;
  margin-top: 3px;
  color: #6b7280;
  font-size: 10px;
  font-weight: 700;
}

.city-ranking-bar {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
}

.city-ranking-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-green), var(--brand-green-dark));
}

.city-ranking-row em {
  color: #4b5563;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.city-location-row {
  display: grid;
  grid-template-columns: 94px 1fr 32px;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  padding: 12px 0;
}

.city-location-row span {
  color: #4b5563;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10px;
  font-weight: 900;
}

.city-location-row strong {
  min-width: 0;
  overflow: hidden;
  color: #111827;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.city-location-row strong::before {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 999px;
  background: var(--brand-green);
  vertical-align: middle;
  content: "";
}

.city-location-row em {
  color: #6b7280;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

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

.region-card {
  min-height: 210px;
  padding: 22px 24px;
}

.region-card h3 {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding-bottom: 12px;
  font-size: 14px;
  font-weight: 900;
}

.region-card div {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.region-card span {
  color: #4b5563;
  font-size: 12px;
  font-weight: 700;
}

.region-indigo {
  color: #4f46e5;
}

.region-green {
  color: #059669;
}

.region-emerald {
  color: #047857;
}

.region-orange {
  color: #ea580c;
}

.region-blue {
  color: #2563eb;
}

.region-purple {
  color: #9333ea;
}

.region-red {
  color: #dc2626;
}

.region-slate {
  color: #334155;
}

.territory-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.territory-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
  width: 100%;
  overflow: hidden;
}

.territory-layout > * {
  min-width: 0;
}

.territory-map-panel,
.territory-posts-panel,
.territory-rank-panel,
.territory-coverage-panel {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.07);
  padding: 22px 24px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.territory-map-panel,
.territory-posts-panel,
.territory-rank-panel {
  min-height: 620px;
}

.territory-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

.territory-panel-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.territory-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.territory-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #5d626b;
  font-size: 11px;
  font-weight: 850;
}

.territory-legend i {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: #e5e7eb;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.territory-legend i.is-covered {
  background: var(--brand-green);
}

.territory-clear-filter {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(1, 132, 112, 0.22);
  background: rgba(1, 164, 130, 0.1);
  padding: 0 12px;
  color: var(--brand-green-dark);
  font-size: 11px;
  font-weight: 950;
}

.territory-clear-filter .material-symbols-outlined {
  font-size: 17px;
}

.territory-filter-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.07);
  padding: 8px 11px;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
}

.territory-filter-status .material-symbols-outlined {
  color: var(--brand-green-dark);
  font-size: 18px;
}

.territory-map-canvas {
  position: relative;
  margin-top: 18px;
  width: 100%;
  min-width: 0;
  height: 548px;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(1, 164, 130, 0.05);
  border: 1px solid rgba(1, 164, 130, 0.13);
}

.territory-map-canvas svg {
  width: 100%;
  height: 100%;
  display: block;
}

.territory-map-city {
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 0.9;
  transition: fill 0.18s ease, stroke 0.18s ease, opacity 0.18s ease;
  outline: none;
}

.territory-map-city:hover,
.territory-map-city:focus-visible {
  opacity: 0.86;
  stroke: #111827;
  stroke-width: 1.3;
}

.territory-map-city.is-muted {
  opacity: 0.18;
}

.territory-map-city.is-active {
  opacity: 1;
  stroke: #111827;
  stroke-width: 2.2;
}

.territory-map-balloon {
  position: absolute;
  z-index: 5;
  width: min(240px, calc(100% - 28px));
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  padding: 13px 14px;
  color: #111827;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  pointer-events: none;
}

.territory-map-balloon::after {
  content: "";
  position: absolute;
  left: 22px;
  bottom: -7px;
  width: 14px;
  height: 14px;
  border-right: 1px solid rgba(17, 24, 39, 0.12);
  border-bottom: 1px solid rgba(17, 24, 39, 0.12);
  background: rgba(255, 255, 255, 0.94);
  transform: rotate(45deg);
}

.territory-map-balloon[hidden] {
  display: none;
}

.territory-map-balloon strong {
  display: block;
  color: #0f172a;
  font-size: 15px;
  font-weight: 950;
  line-height: 1.15;
}

.territory-map-balloon span {
  display: block;
  margin-top: 5px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.territory-map-balloon div {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.territory-map-balloon em {
  border-radius: 10px;
  background: rgba(1, 164, 130, 0.1);
  padding: 7px 8px;
  color: #334155;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.territory-map-balloon b {
  display: block;
  color: var(--brand-green-dark);
  font-size: 15px;
  font-weight: 950;
}

.territory-methodology {
  margin-top: 14px;
  border: 1px solid rgba(1, 164, 130, 0.14);
  border-radius: 14px;
  background: rgba(1, 164, 130, 0.06);
  padding: 13px 14px;
}

.territory-methodology strong {
  display: block;
  color: #111827;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.territory-methodology p {
  margin-top: 5px;
  color: #5b6472;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.territory-bars {
  margin-top: 20px;
  display: grid;
  gap: 14px;
  max-height: 548px;
  overflow-y: auto;
  padding-right: 4px;
}

.territory-bar-row {
  display: grid;
  grid-template-columns: minmax(90px, 0.8fr) minmax(110px, 1fr) 64px;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: transparent;
  padding: 8px;
  text-align: left;
  transition: background 0.18s ease, opacity 0.18s ease;
}

.territory-bar-row:hover,
.territory-bar-row.is-active {
  background: rgba(1, 164, 130, 0.09);
}

.territory-bar-row.is-muted {
  opacity: 0.36;
}

.territory-bar-info strong {
  display: block;
  color: #111827;
  font-size: 13px;
  font-weight: 900;
}

.territory-bar-info span,
.territory-bar-row em {
  color: #6b7280;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.territory-bar-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.07);
}

.territory-bar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-green), var(--brand-green-dark));
}

.territory-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 28px;
  border-radius: 999px;
  background: rgba(1, 164, 130, 0.1);
  color: var(--brand-green-dark);
  font-size: 12px;
  font-weight: 950;
}

.territory-post-list {
  margin-top: 20px;
  display: grid;
  gap: 12px;
  max-height: 548px;
  overflow-y: auto;
  padding-right: 4px;
}

.territory-post-card {
  background: rgba(255, 255, 255, 0.68);
  transition: opacity 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.territory-post-card.is-active {
  border-color: rgba(1, 132, 112, 0.28);
  transform: translateY(-1px);
}

.territory-post-card .territory-post-button {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 11px;
  width: 100%;
  padding: 12px;
  text-align: left;
}

.territory-post-card .territory-post-thumb {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 10px;
  background: #f0f0f0;
  object-fit: contain;
  padding: 8px;
}

.territory-post-card .territory-post-body {
  display: block;
  min-width: 0;
}

.territory-post-card .territory-post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
}

.territory-post-card .territory-post-meta em {
  color: var(--brand-green-dark);
  font-style: normal;
}

.territory-post-card .territory-post-body strong {
  display: -webkit-box;
  margin-top: 5px;
  overflow: hidden;
  color: #111827;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.territory-post-card .territory-post-body small {
  display: block;
  margin-top: 7px;
  overflow: hidden;
  color: #6b7280;
  font-size: 10px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.territory-empty-state {
  border-radius: 12px;
  background: rgba(17, 24, 39, 0.05);
  padding: 14px;
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.45;
}

.territory-city-list {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.territory-city-list div {
  border-radius: 12px;
  background: rgba(1, 164, 130, 0.07);
  border: 1px solid rgba(1, 164, 130, 0.13);
  padding: 12px;
}

.territory-city-list strong {
  display: block;
  overflow: hidden;
  color: #111827;
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.territory-city-list span {
  display: block;
  margin-top: 4px;
  color: #6b7280;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

@media (max-width: 767px) {
  .app-shell {
    width: 100vw;
    height: 100dvh;
    margin: 0;
    border-radius: 0;
  }

  .timeline-row,
  .ranking-row,
  .list-row {
    grid-template-columns: 1fr;
  }

  .post-card-button {
    flex-direction: column;
  }

  .post-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    flex-basis: auto;
  }

  .overview-grid,
  .overview-top-grid,
  .cities-grid,
  .region-grid,
  .territory-metrics,
  .territory-layout,
  .territory-city-list {
    grid-template-columns: 1fr;
  }

  .overview-panel,
  .overview-metric,
  .city-panel,
  .city-metric,
  .region-card,
  .territory-map-panel,
  .territory-posts-panel,
  .territory-rank-panel,
  .territory-coverage-panel {
    padding: 18px;
  }

  .territory-map-panel,
  .territory-posts-panel,
  .territory-rank-panel {
    min-height: auto;
  }

  .territory-map-canvas {
    height: 430px;
  }

  .territory-bar-row {
    grid-template-columns: 1fr;
  }

  .overview-week {
    grid-template-columns: 1fr;
  }

  .overview-week span {
    text-align: left;
  }

  .overview-top-post button {
    grid-template-columns: 58px 1fr;
    gap: 14px;
  }

  .city-ranking-row,
  .city-location-row {
    grid-template-columns: 1fr;
  }

  .posts-filter-grid {
    grid-template-columns: 1fr;
  }

  .compare-form {
    grid-template-columns: 1fr;
  }

  .import-profile-card {
    grid-template-columns: 1fr;
  }

  .import-profile-stats,
  .import-profile-actions {
    justify-content: flex-start;
  }

  .profile-edit-grid {
    grid-template-columns: 1fr;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .ai-question-form {
    grid-template-columns: 1fr;
  }

  .ai-panel {
    padding: 18px;
  }

  .ai-sentiment-bar {
    border-radius: 14px;
    flex-direction: column;
  }

  .ai-sentiment-bar div {
    width: 100% !important;
    min-height: 32px;
  }

  .access-profile-box.compact {
    grid-template-columns: 1fr;
  }

  .type-filter-group {
    width: 100%;
    grid-template-columns: repeat(3, 1fr);
  }

  .type-filter-option {
    width: 100%;
  }
}

@media (min-width: 768px) and (max-width: 1279px) {
  .territory-metrics,
  .territory-city-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .posts-filter-grid {
    grid-template-columns: 1fr auto 1fr;
  }

  .posts-filter-grid .filter-submit {
    grid-column: 3;
  }

  .compare-form {
    grid-template-columns: 1fr 1fr;
  }

  .compare-submit {
    grid-column: 1 / -1;
  }

  .import-profile-card {
    grid-template-columns: 1fr;
  }

  .import-profile-stats,
  .import-profile-actions {
    justify-content: flex-start;
  }

  .profile-edit-grid {
    grid-template-columns: 1fr;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .ai-question-form {
    grid-template-columns: 1fr;
  }
}
