:root {
  --bg: #ffffff;
  --fg: #0c1116;
  --muted: rgba(12, 17, 22, 0.62);
  --line: rgba(12, 17, 22, 0.12);
  --panel: #ffffff;
  --sidebar: #0b0f14;
  --sidebar-fg: #eef3f7;
  --sidebar-muted: rgba(238, 243, 247, 0.62);
  --accent: #0ea5ff;
  --btn: rgba(12, 17, 22, 0.04);
  --btn-border: rgba(12, 17, 22, 0.14);
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.impersonation-banner {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(245, 158, 11, 0.12);
  border-bottom: 1px solid rgba(245, 158, 11, 0.25);
}
.impersonation-banner.hidden { display: none; }
.impersonation-banner__text { font-size: 13px; color: rgba(12, 17, 22, 0.82); }
.impersonation-banner__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.28);
  color: rgba(12, 17, 22, 0.92);
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
}

.layout {
  height: 100%;
  display: grid;
  grid-template-columns: 260px 1fr;
  position: relative;
}

.sidebar {
  background: var(--sidebar);
  color: var(--sidebar-fg);
  display: flex;
  flex-direction: column;
  padding: 12px;
  gap: 12px;
}

.sidebar-backdrop {
  display: none;
}

body.menu-mobile-locked {
  overflow: hidden;
}

body.menu-mobile-locked .main {
  overflow: hidden;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
}

.brand__mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(14, 165, 255, 0.16);
  border: 1px solid rgba(14, 165, 255, 0.35);
  color: var(--sidebar-fg);
  font-weight: 750;
}

.brand__name {
  font-weight: 700;
  letter-spacing: 0.2px;
}

.teamcard {
  border-radius: 12px;
  padding: 10px;
  background: linear-gradient(180deg, rgba(84, 86, 255, 0.14), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.teamcard__avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(14, 165, 255, 0.16);
  border: 1px solid rgba(14, 165, 255, 0.35);
  font-weight: 800;
  color: var(--sidebar-fg);
}

.teamcard__meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.teamcard__name {
  font-weight: 750;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.teamcard__sub {
  font-size: 12px;
  color: var(--sidebar-muted);
}

.teamcard__btn {
  margin-top: 10px;
  width: 100%;
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--sidebar-fg);
  border: 1px solid rgba(255, 255, 255, 0.14);
  cursor: pointer;
  font-weight: 650;
}

.teamcard__btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.teamcard__logout {
  margin-top: 8px;
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(238, 243, 247, 0.72);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
}

.teamcard__logout:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(238, 243, 247, 0.92);
}

.spacebanner {
  border-radius: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  display: grid;
  gap: 8px;
}

.spacebanner.hidden {
  display: none;
}

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

.spacebanner__badge {
  font-size: 11px;
  font-weight: 850;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(14, 165, 255, 0.16);
  border: 1px solid rgba(14, 165, 255, 0.25);
  color: rgba(238, 243, 247, 0.92);
}

.spacebanner__title {
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
  color: rgba(238, 243, 247, 0.92);
}

.spacebanner__sub {
  font-size: 12px;
  color: rgba(238, 243, 247, 0.72);
  font-weight: 650;
}

.spacebanner__select {
  height: 36px;
  border-radius: 10px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(238, 243, 247, 0.92);
  font-weight: 650;
}

.spacebanner__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.spacebanner__btn {
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  font-weight: 750;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(238, 243, 247, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.spacebanner__btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.spacebanner__btn--danger {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.28);
}

.spacebanner__btn--danger:hover {
  background: rgba(239, 68, 68, 0.22);
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 2px;
  flex: 1 1 auto;
}

.nav__item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  color: rgba(238, 243, 247, 0.9);
  text-decoration: none;
  background: transparent;
  border: 1px solid transparent;
}

.nav__icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(238, 243, 247, 0.76);
}

.nav__label {
  font-size: 13px;
  font-weight: 650;
}

.nav__item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.nav__item--active {
  background: rgba(14, 165, 255, 0.16);
  border-color: rgba(14, 165, 255, 0.25);
}

.nav__item--active .nav__icon {
  color: rgba(14, 165, 255, 0.95);
}

.nav__item--disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.nav__item--disabled:hover {
  background: transparent;
}

.upgradecard {
  margin-top: auto;
  border-radius: 14px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.92), rgba(17, 24, 39, 0.88));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.35);
  display: grid;
  gap: 10px;
}

.upgradecard__title {
  font-weight: 780;
  font-size: 14px;
  color: rgba(238, 243, 247, 0.96);
}

.upgradecard__sub {
  font-size: 12px;
  line-height: 1.35;
  color: rgba(238, 243, 247, 0.72);
}

.upgradecard__btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: max-content;
  padding: 7px 10px;
  border-radius: 9px;
  text-decoration: none;
  background: rgba(37, 99, 235, 0.95);
  color: rgba(255, 255, 255, 0.98);
  font-weight: 800;
  border: 1px solid rgba(37, 99, 235, 0.55);
}

.upgradecard__btn:hover {
  background: rgba(37, 99, 235, 1);
}

.main {
  background: var(--bg);
  padding: 28px 28px 18px;
  overflow: auto;
}

.main__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.main__titlewrap {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.main__titlecopy {
  min-width: 0;
}

.sidebar-toggle {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  border: 1px solid rgba(12, 17, 22, 0.14);
  background: rgba(255, 255, 255, 0.95);
  color: rgba(12, 17, 22, 0.76);
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(2, 6, 23, 0.07);
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.sidebar-toggle:hover {
  border-color: rgba(14, 165, 255, 0.34);
  color: rgba(14, 165, 255, 0.95);
}

.sidebar-toggle:active {
  transform: translateY(1px);
}

.title {
  margin: 0;
  font-size: 20px;
  font-weight: 750;
}

.subtitle {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.breadcrumb {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.breadcrumb__link {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  font: inherit;
  color: rgba(12, 17, 22, 0.62);
  cursor: pointer;
  text-decoration: none;
  font-weight: 700;
}

.breadcrumb__link:hover {
  color: rgba(12, 17, 22, 0.92);
  text-decoration: underline;
}

.breadcrumb__link:visited {
  color: rgba(12, 17, 22, 0.62);
}

.breadcrumb__sep {
  color: rgba(12, 17, 22, 0.42);
}

.breadcrumb__cur {
  color: rgba(12, 17, 22, 0.92);
  font-weight: 800;
}

.nav__badge {
  margin-left: auto;
  font-size: 12px;
  font-weight: 800;
  color: rgba(238, 243, 247, 0.72);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 2px 8px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.share__row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.share__row .input {
  flex: 1 1 220px;
  min-width: 220px;
}

.share__row .select {
  width: 160px;
}

.share__info {
  font-size: 13px;
  color: rgba(12, 17, 22, 0.7);
  margin-bottom: 10px;
}

.share__list {
  display: grid;
  gap: 8px;
}

.share__item {
  border: 1px solid rgba(12, 17, 22, 0.12);
  border-radius: 14px;
  padding: 10px 12px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.share__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #1e293b;
  font-weight: 700;
  font-size: 14px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.share__who {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.share__who-title {
  font-weight: 780;
  color: rgba(12, 17, 22, 0.9);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share__who-sub {
  font-size: 12px;
  color: rgba(12, 17, 22, 0.6);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share__actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.share__remove {
  appearance: none;
  border: 1px solid rgba(220, 38, 38, 0.25);
  background: rgba(220, 38, 38, 0.08);
  color: rgba(127, 29, 29, 0.95);
  border-radius: 10px;
  padding: 7px 10px;
  cursor: pointer;
  font-weight: 750;
  font-size: 12px;
}

.share__remove:hover {
  background: rgba(220, 38, 38, 0.12);
}

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

.header-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.btn {
  appearance: none;
  border: 1px solid var(--btn-border);
  background: var(--btn);
  color: var(--fg);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
}

.btn:hover {
  border-color: rgba(12, 17, 22, 0.22);
}

.btn--geo {
  border-radius: 14px;
  border: 1px solid rgba(12, 17, 22, 0.14);
  background:
    radial-gradient(220px 90px at 20% -30%, rgba(14, 165, 255, 0.18), transparent 60%),
    radial-gradient(220px 90px at 120% 0%, rgba(168, 85, 247, 0.14), transparent 60%),
    rgba(12, 17, 22, 0.03);
  font-weight: 850;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  transition: transform 80ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.btn--geo:hover {
  border-color: rgba(14, 165, 255, 0.35);
  box-shadow: 0 10px 26px rgba(2, 6, 23, 0.12);
  transform: translateY(-1px);
}

.btn--geo:active {
  transform: translateY(0px);
}

.btn--geo svg {
  color: rgba(12, 17, 22, 0.72);
}

.btn--geo-primary {
  border: none;
  color: #ffffff;
  background: linear-gradient(135deg, #0ea5ff, #7c3aed);
  box-shadow: 0 10px 26px rgba(2, 6, 23, 0.14);
}

.btn--geo-primary:hover {
  box-shadow: 0 14px 34px rgba(2, 6, 23, 0.18);
}

.btn--geo-primary svg {
  color: rgba(255, 255, 255, 0.96);
}

.btn--primary {
  background: rgba(14, 165, 255, 0.14);
  border-color: rgba(14, 165, 255, 0.35);
}

#btnCreate.btn--primary {
  background: #0a95ff;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 200ms ease, box-shadow 200ms ease, transform 60ms ease;
}

#btnCreate.btn--primary:hover {
  background: #0788f0;
  box-shadow: 0 8px 18px rgba(2, 6, 23, 0.18);
}

#btnCreate.btn--primary:active {
  transform: translateY(1px);
}

#btnCreate.btn--primary:focus-visible {
  outline: 2px solid #bfe2ff;
  outline-offset: 2px;
}

#btnDeleteSelected.btn {
  border-color: rgba(220, 38, 38, 0.35);
  background: rgba(220, 38, 38, 0.06);
  color: rgba(185, 28, 28, 0.95);
  font-weight: 750;
}

#btnDeleteSelected.btn:hover {
  border-color: rgba(220, 38, 38, 0.55);
  background: rgba(220, 38, 38, 0.10);
}

.btn--primary:hover {
  background: rgba(14, 165, 255, 0.2);
  border-color: rgba(14, 165, 255, 0.5);
}

.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 240px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
  z-index: 50;
}

.menu__item {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  padding: 12px 14px;
  font-size: 14px;
  cursor: pointer;
}

.menu__item:hover {
  background: rgba(12, 17, 22, 0.04);
}

.menu__sep {
  height: 1px;
  background: rgba(12, 17, 22, 0.08);
  margin: 8px 0;
}

.createstrip {
  margin-bottom: 14px;
  overflow: visible !important;
}

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

.createstrip__title {
  font-weight: 750;
  color: rgba(12, 17, 22, 0.86);
}

.createstrip__import {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid rgba(2, 6, 23, 0.10);
  box-shadow: 0 10px 22px rgba(2, 6, 23, 0.06);
  color: rgba(2, 6, 23, 0.86);
  font-weight: 700;
}

.createstrip__import:hover {
  border-color: rgba(10, 149, 255, 0.40);
  box-shadow: 0 12px 26px rgba(2, 6, 23, 0.08);
}

.createstrip__import svg {
  color: rgba(10, 149, 255, 0.95);
}

.quicktemplates {
  display: flex;
  gap: 12px;
  overflow-x: visible;
  overflow-y: visible;
  padding: 14px 10px;
  width: 100%;
  justify-content: space-between;
}

.quicktemplates-shell {
  position: relative;
}

.quicktemplates-nav {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 44px;
  border: 1px solid rgba(12, 17, 22, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  color: rgba(15, 23, 42, 0.7);
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 18px rgba(2, 6, 23, 0.08);
  cursor: pointer;
  z-index: 4;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.quicktemplates-nav:hover {
  border-color: rgba(14, 165, 255, 0.34);
  color: rgba(14, 165, 255, 0.95);
}

.quicktemplates-nav:disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.quicktemplates-nav--prev {
  left: 4px;
}

.quicktemplates-nav--next {
  right: 4px;
}

.quicktemplate {
  border: 1px solid rgba(12, 17, 22, 0.08);
  border-radius: 16px;
  background: #f7faff;
  padding: 8px 8px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  position: relative;
  transition: all 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: visible;
  min-height: 126px;
  flex: 1 1 0;
  min-width: 90px;
  max-width: 130px;
}

.quicktemplate:hover {
  background: #f1f6ff;
  border-color: rgba(14, 165, 255, 0.25);
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(14, 165, 255, 0.1);
  transform: translateY(-2px) scale(1.02);
}

.quicktemplate--blank {
  background: linear-gradient(135deg, #0ea5ff, #0788f0);
  border: none;
  box-shadow: 0 4px 12px rgba(14, 165, 255, 0.3);
}

.quicktemplate--blank:hover {
  background: linear-gradient(135deg, #0788f0, #0670d9);
  box-shadow: 0 6px 16px rgba(14, 165, 255, 0.4);
  transform: translateY(-2px) scale(1.03);
}

.quicktemplate--blank .quicktemplate__thumb {
  background: transparent;
  border: none;
}

.quicktemplate--blank:hover .quicktemplate__thumb {
  background: transparent;
  border: none;
}

.quicktemplate--blank .quicktemplate__thumb svg {
  color: #ffffff;
}

.quicktemplate--blank .quicktemplate__label {
  color: #ffffff;
  font-weight: 700;
}

.quicktemplate--blank:hover .quicktemplate__label {
  color: #ffffff;
}

.quicktemplate--blank .quicktemplate__actions {
  display: none !important;
}

.quicktemplate__thumb {
  width: 100%;
  height: 74px;
  border-radius: 14px;
  background: transparent;
  border: none;
  display: grid;
  place-items: center;
  color: rgba(12, 17, 22, 0.55);
  position: relative;
  overflow: hidden;
  transition: all 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
  margin-top: 0;
}

.quicktemplate:hover .quicktemplate__thumb {
  background: transparent;
  border: none;
  transform: scale(1.05);
}

.quicktemplate__thumb--explore {
  background: transparent;
  border: none;
}

.quicktemplate__thumb svg {
  width: 100%;
  height: 100%;
  transition: transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
  color: #3b82f6;
}

.quicktemplate__thumb--explore svg {
  color: #0ea5ff;
}

.quicktemplate:hover .quicktemplate__thumb svg {
  transform: scale(1.1);
}

.quicktemplate__label {
  font-weight: 600;
  font-size: 11.5px;
  color: rgba(12, 17, 22, 0.75);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  max-width: 100%;
  padding: 0 6px;
  transition: color 200ms ease;
  line-height: 1.2;
}

.template-preview-thumb {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.quicktemplate:hover .quicktemplate__label {
  color: rgba(12, 17, 22, 0.95);
}

.quicktemplate__actions {
  display: none;
  position: absolute;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  border: 1px solid rgba(12, 17, 22, 0.12);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 100;
  flex-direction: column;
  gap: 6px;
  min-width: 140px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease;
}

.quicktemplate:hover .quicktemplate__actions {
  display: flex;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.quicktemplate.quicktemplate--actions-open .quicktemplate__actions {
  display: flex;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.quicktemplate__actions::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid #ffffff;
}

.quicktemplate__btn {
  width: 100%;
  border: 1px solid rgba(12, 17, 22, 0.14);
  background: rgba(12, 17, 22, 0.02);
  color: rgba(12, 17, 22, 0.78);
  border-radius: 8px;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: all 160ms ease;
  text-align: center;
}

.quicktemplate__btn:hover {
  border-color: rgba(12, 17, 22, 0.22);
  background: rgba(12, 17, 22, 0.04);
}

.quicktemplate__btn--primary {
  background: #0ea5ff;
  border-color: #0ea5ff;
  color: #ffffff;
}

.quicktemplate__btn--primary:hover {
  background: #0788f0;
  border-color: #0788f0;
}

.toolbar {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.toolbar__left {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.bulkgrid {
  display: grid;
  grid-template-columns: max-content max-content 1fr;
  grid-template-areas:
    "sort sort search"
    "check move trash";
  column-gap: 10px;
  row-gap: 10px;
  align-items: center;
}

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

#sortSelect {
  grid-area: sort;
}

#sortSelect.sortselect-native--enhanced {
  display: none;
}

.sortmenu {
  grid-area: sort;
  position: relative;
  display: none;
  align-items: center;
  width: max-content;
  z-index: 70;
}

.sortmenu--ready {
  display: inline-flex;
}

.sortmenu__button {
  appearance: none;
  min-width: 142px;
  min-height: 38px;
  border: 1px solid var(--btn-border);
  background: #ffffff;
  color: var(--fg);
  border-radius: 12px;
  padding: 9px 10px;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sortmenu__button:hover,
.sortmenu__button[aria-expanded="true"] {
  border-color: rgba(12, 17, 22, 0.22);
  background: rgba(12, 17, 22, 0.02);
}

.sortmenu__button:focus-visible {
  outline: none;
  border-color: rgba(14, 165, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(14, 165, 255, 0.14);
}

.sortmenu__panel,
.sortmenu__submenu {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.sortmenu__panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 238px;
  padding: 6px;
  overflow: visible;
  z-index: 180;
}

.sortmenu__item,
.sortmenu__subitem {
  width: 100%;
  min-height: 36px;
  border: 0;
  background: transparent;
  color: rgba(12, 17, 22, 0.82);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 9px;
}

.sortmenu__item:hover,
.sortmenu__item--active,
.sortmenu__subitem:hover,
.sortmenu__subitem--active {
  background: rgba(14, 165, 255, 0.10);
  color: rgba(12, 17, 22, 0.94);
}

.sortmenu__item--parent {
  position: relative;
  justify-content: space-between;
}

.sortmenu__arrow {
  margin-left: auto;
  color: rgba(12, 17, 22, 0.52);
  font-size: 18px;
  line-height: 1;
}

.sortmenu__submenu {
  position: absolute;
  top: -6px;
  left: calc(100% + 6px);
  min-width: 224px;
  padding: 6px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-4px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.sortmenu__item--parent:hover .sortmenu__submenu,
.sortmenu__item--parent:focus-within .sortmenu__submenu,
.sortmenu__item--parent.sortmenu__item--open .sortmenu__submenu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.sortmenu__subitem .mapthumbicon-wrap {
  width: 24px;
  height: 24px;
  border-radius: 7px;
}

.sortmenu__subitem .mapthumbicon {
  width: 16px;
  height: 16px;
}

.sortmenu__subitem-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sortmenu__count {
  margin-left: auto;
  min-width: 22px;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  color: rgba(12, 17, 22, 0.56);
  background: rgba(12, 17, 22, 0.06);
  border-radius: 999px;
  padding: 2px 6px;
}

#searchInput {
  grid-area: search;
  min-width: 220px;
}

.bulkgrid .check {
  grid-area: check;
  width: 44px;
  justify-content: center;
  padding: 8px;
}

.bulkgrid .check input {
  margin: 0;
}

#btnMoveSelected {
  grid-area: move;
  justify-self: start;
}

#btnDeleteSelected {
  grid-area: trash;
  justify-self: start;
}

.folderpill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(14, 165, 255, 0.35);
  background: rgba(14, 165, 255, 0.12);
  color: rgba(12, 17, 22, 0.82);
  font-weight: 720;
  font-size: 13px;
  max-width: min(360px, 100%);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folderpill__icon {
  width: 16px;
  height: 16px;
  color: rgba(14, 165, 255, 0.95);
  flex: 0 0 auto;
}

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

.iconbtn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(12, 17, 22, 0.14);
  background: #ffffff;
  color: rgba(12, 17, 22, 0.78);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.iconbtn:hover {
  border-color: rgba(12, 17, 22, 0.22);
}

.iconbtn--active {
  border-color: rgba(14, 165, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(14, 165, 255, 0.12);
}

.select,
.input {
  appearance: none;
  border: 1px solid var(--btn-border);
  background: #ffffff;
  color: var(--fg);
  border-radius: 12px;
  padding: 9px 10px;
  font-size: 13px;
}

.input {
  width: min(320px, 100%);
}

.select:focus,
.input:focus {
  outline: none;
  border-color: rgba(14, 165, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(14, 165, 255, 0.14);
}

.table {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.table__head,
.table__row {
  display: grid;
  grid-template-columns: 44px minmax(240px, 1fr) 160px 220px 160px 44px 44px;
  align-items: center;
}

.table__head {
  background: rgba(12, 17, 22, 0.03);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 650;
  color: rgba(12, 17, 22, 0.72);
}

.table__cell {
  padding: 12px 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table__cell--icon {
  padding: 10px 10px;
}

.table input[type="checkbox"],
.card input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: rgba(14, 165, 255, 0.95);
  cursor: pointer;
}

.mapicon {
  width: 18px;
  height: 18px;
  color: rgba(12, 17, 22, 0.5);
  flex: 0 0 auto;
}

.mapthumbicon-wrap {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  background: var(--mapthumb-bg, #ffffff);
  border: 1px solid var(--mapthumb-border, rgba(12, 17, 22, 0.12));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 1px 3px var(--mapthumb-glow, rgba(15, 23, 42, 0.04));
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.mapthumbicon-wrap[data-map-thumb="default"] {
  background: #ffffff;
}

.mapthumbicon {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  object-fit: contain;
  display: block;
}

.namecell__link .mapthumbicon-wrap,
.card__titleLink .mapthumbicon-wrap {
  width: 26px;
  height: 26px;
  border-radius: 8px;
}

.namecell__link .mapthumbicon,
.card__titleLink .mapthumbicon {
  width: 17px;
  height: 17px;
}

.table__row:hover .mapicon,
.card:hover .mapicon {
  color: rgba(12, 17, 22, 0.68);
}

.table__row:hover .mapthumbicon-wrap,
.card:hover .mapthumbicon-wrap,
.foldercard:hover .mapthumbicon-wrap {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 3px 8px var(--mapthumb-glow, rgba(15, 23, 42, 0.06));
}

.namecell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.namecell__text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.namecell__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  cursor: pointer;
}

.namecell__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  display: block;
}

.namecell__link:hover {
  text-decoration: underline;
}

.namecell__link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(14, 165, 255, 0.14);
  border-radius: 6px;
}

.table__cell--name {
  font-weight: 500;
  color: rgba(12, 17, 22, 0.88);
}

.table__body {
  display: grid;
}

.loadmore {
  grid-column: 1 / -1;
  padding: 18px 14px;
  display: flex;
  justify-content: center;
}

.loadmore__btn {
  width: min(420px, 100%);
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(12, 17, 22, 0.14);
  background: #ffffff;
  color: rgba(12, 17, 22, 0.86);
  font-weight: 850;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 160ms ease, box-shadow 160ms ease, transform 80ms ease;
}

.loadmore__btn:hover {
  background: rgba(12, 17, 22, 0.06);
}

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

.loadmore__chev {
  display: inline-flex;
  align-items: center;
  color: rgba(12, 17, 22, 0.62);
}

.table__row {
  cursor: default;
  border-bottom: 1px solid rgba(12, 17, 22, 0.06);
}

.table__row:hover {
  background: rgba(12, 17, 22, 0.03);
}

.empty {
  padding: 34px 18px;
  text-align: center;
}

.empty__title {
  font-weight: 750;
}

.empty__subtitle {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.hidden {
  display: none !important;
}

.loc {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(12, 17, 22, 0.72);
  font-weight: 400;
  font-size: 13px;
  line-height: 1.2;
  min-width: 0;
}

.loc__icon,
.loc__foldericon {
  width: 18px;
  height: 18px;
  display: block;
  flex: 0 0 18px;
  color: currentColor;
}

.loc__icon {
  color: rgba(12, 17, 22, 0.64);
}

.loc__foldericon {
  color: rgba(151, 98, 7, 0.9);
}

.loc__foldericon path {
  fill: rgba(250, 204, 21, 0.2);
  stroke: currentColor;
}

.loc__folder {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  font: inherit;
  color: rgba(12, 17, 22, 0.78);
  cursor: pointer;
  text-decoration: none;
}

.loc__folder:hover {
  color: rgba(12, 17, 22, 0.92);
  text-decoration: none;
}

.card__meta-folder {
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(12, 17, 22, 0.18);
  text-underline-offset: 2px;
}

.card__meta-folder:hover {
  text-decoration-color: rgba(12, 17, 22, 0.32);
}

.userchip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.userchip__avatar {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
  background: rgba(18, 95, 22, 0.92);
}

.userchip__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(12, 17, 22, 0.76);
  font-weight: 650;
  font-size: 13px;
}

.rowbtn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: rgba(12, 17, 22, 0.58);
}

.rowbtn:hover {
  background: rgba(12, 17, 22, 0.04);
  border-color: rgba(12, 17, 22, 0.12);
}

.rowbtn--more {
  position: relative;
  background: rgba(14, 167, 255, 0.034);
  border-color: rgba(14, 167, 255, 0.507);
  color: rgba(122, 163, 184, 0.95);
}

.rowbtn--more:hover {
  background: rgba(142, 214, 255, 0.568);
}

.rowbtn--more[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  padding: 8px 10px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.96);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
  z-index: 5;
}

.rowbtn--more:hover::after {
  opacity: 1;
}

.rowbtn--active {
  color: rgba(14, 165, 255, 0.95);
}

.rowmenu {
  position: fixed;
  width: 300px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
  z-index: 200;
}

.rowmenu__header {
  padding: 10px 14px 6px;
  font-size: 13px;
  font-weight: 750;
  color: #0f172a;
  border-bottom: 1px solid rgba(12, 17, 22, 0.06);
  margin-bottom: 4px;
}

.rowmenu__divider {
  height: 1px;
  background: rgba(12, 17, 22, 0.08);
  margin: 6px 0;
}

.rowmenu__item {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  padding: 8px 14px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #0f172a;
  font-weight: 500;
  min-height: 36px;
}

.rowmenu__icon {
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  color: #64748b;
  flex-shrink: 0;
}

.rowmenu__item svg {
  width: 16px;
  height: 16px;
  color: inherit;
}

.rowmenu__label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rowmenu__suffix {
  margin-left: auto;
  display: flex;
  align-items: center;
}

.rowmenu__item:hover {
  background: rgba(12, 17, 22, 0.04);
}

.rowmenu__item--danger {
  color: #ef4444;
  background: transparent;
}

.rowmenu__item--danger:hover {
  background: rgba(12, 17, 22, 0.04);
}

.rowmenu__item--danger .rowmenu__icon {
  color: #ef4444;
}

.rowmenu__item--disabled {
  color: #94a3b8;
  cursor: default;
}

.rowmenu__item--disabled:hover {
  background: transparent;
}

.rowmenu__item--disabled .rowmenu__icon {
  color: #cbd5e1;
}

.menu-upgrade-badge {
  margin-left: auto;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 99px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  line-height: 1;
}

.menu-upgrade-badge:hover {
  background: #1d4ed8;
}

.table--grid .table__head {
  display: none;
}

.table--grid .table__body {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  padding: 12px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  padding: 12px 12px 10px;
  cursor: default;
  display: grid;
  gap: 8px;
}

.card__thumb {
  height: 130px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(14, 165, 255, 0.14), rgba(168, 85, 247, 0.12));
  border: 1px solid rgba(12, 17, 22, 0.08);
  display: grid;
  place-items: center;
  color: rgba(12, 17, 22, 0.55);
  overflow: hidden;
}

.card:hover {
  background: rgba(12, 17, 22, 0.02);
}

.card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.card__title {
  font-weight: 750;
  color: rgba(12, 17, 22, 0.9);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card__titleLink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  cursor: pointer;
}

.card__titleLabel {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  display: block;
}

.card__titleLink:hover {
  text-decoration: underline;
}

.card__titleLink:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(14, 165, 255, 0.14);
  border-radius: 6px;
}

.card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: rgba(12, 17, 22, 0.62);
  font-size: 12px;
}

@media (max-width: 860px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(86vw, 300px);
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    z-index: 1200;
    transform: translateX(-108%);
    transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 220ms ease;
    box-shadow: none;
  }

  .layout.layout--sidebar-open .sidebar {
    transform: translateX(0);
    box-shadow: 0 18px 34px rgba(2, 6, 23, 0.28);
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.34);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
    z-index: 1190;
  }

  .layout.layout--sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar-toggle {
    display: inline-flex;
    flex: 0 0 auto;
  }

  .main__titlewrap {
    align-items: center;
  }

  .quicktemplates-nav {
    display: inline-flex;
  }

  .table__head,
  .table__row {
    grid-template-columns: 44px 1fr 44px 44px;
  }
  .table__head .table__cell:nth-child(3),
  .table__head .table__cell:nth-child(4),
  .table__head .table__cell:nth-child(5),
  .table__row .table__cell:nth-child(3),
  .table__row .table__cell:nth-child(4),
  .table__row .table__cell:nth-child(5) {
    display: none;
  }
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(12, 17, 22, 0.14);
  background: #ffffff;
  color: rgba(12, 17, 22, 0.78);
  font-size: 13px;
  user-select: none;
  cursor: pointer;
}

.check input {
  width: 16px;
  height: 16px;
}

.userbtn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(12, 17, 22, 0.14);
  background: #ffffff;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.userbtn:hover {
  border-color: rgba(12, 17, 22, 0.22);
}

.userbtn__avatar {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 850;
  font-size: 14px;
  color: #ffffff;
  background: rgba(18, 95, 22, 0.92);
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: grid;
  place-items: center;
  z-index: 10000;
}

.overlay--glass {
  background: rgba(2, 6, 23, 0.58);
  backdrop-filter: blur(10px) saturate(1.2);
}

.modal {
  width: min(980px, calc(100vw - 24px));
  height: min(620px, calc(100vh - 24px));
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;
  grid-template-columns: 260px 1fr;
}

.modal--foldername {
  width: min(520px, calc(100vw - 24px));
  height: auto;
  min-height: auto;
  display: grid;
  grid-template-columns: 1fr;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    radial-gradient(1000px 260px at -20% -40%, rgba(14, 165, 255, 0.22), transparent 60%),
    radial-gradient(800px 260px at 120% -30%, rgba(168, 85, 247, 0.16), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.92));
  overflow: hidden;
}

.foldername__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(12, 17, 22, 0.08);
}

.foldername__mark {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.96);
  background: linear-gradient(135deg, #0ea5ff, #7c3aed);
  box-shadow: 0 10px 25px rgba(2, 6, 23, 0.18);
}

.foldername__titles {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.foldername__title {
  font-weight: 900;
  letter-spacing: 0.2px;
  color: rgba(12, 17, 22, 0.92);
  font-size: 16px;
}

.foldername__subtitle {
  color: rgba(12, 17, 22, 0.62);
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.foldername__close {
  background: rgba(12, 17, 22, 0.04);
  border: 1px solid rgba(12, 17, 22, 0.10);
}

.foldername__close:hover {
  background: rgba(12, 17, 22, 0.08);
}

.foldername__body {
  padding: 14px 16px 8px;
}

.foldername__label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: rgba(12, 17, 22, 0.7);
  margin-bottom: 8px;
}

.foldername__input {
  height: 44px;
  border-radius: 14px;
  font-weight: 650;
}

.foldername__hint {
  margin-top: 10px;
  color: rgba(12, 17, 22, 0.56);
  font-size: 12px;
  font-weight: 600;
}

.foldername__actions {
  padding: 12px 16px 16px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.foldername__btn {
  border-radius: 14px;
  padding: 10px 14px;
  font-weight: 850;
}

.foldername__btn--primary {
  border: none;
  color: #ffffff;
  background: linear-gradient(135deg, #0ea5ff, #7c3aed);
  box-shadow: 0 10px 26px rgba(2, 6, 23, 0.16);
}

.foldername__btn--primary:hover {
  filter: brightness(0.98);
  box-shadow: 0 14px 34px rgba(2, 6, 23, 0.2);
}

.modal--confirm {
  width: min(440px, calc(100vw - 24px));
  height: auto;
  min-height: auto;
  display: block;
  padding: 24px;
  position: relative;
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  border: none;
  background: transparent;
  color: rgba(12, 17, 22, 0.4);
}

.modal__close:hover {
    background: rgba(12, 17, 22, 0.04);
    color: rgba(12, 17, 22, 0.8);
}

.modal__confirm-title {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 12px;
  padding-right: 24px;
}

.modal__confirm-body {
  font-size: 14px;
  color: #475569;
  line-height: 1.5;
  margin-bottom: 24px;
}

.modal__confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.btn--secondary {
  background: #e2e8f0;
  color: #1e293b;
  border: none;
  font-weight: 600;
}

.btn--secondary:hover {
  background: #cbd5e1;
}

.btn--danger {
  background: #ef4444;
  color: #ffffff;
  border: none;
  font-weight: 600;
}

.btn--danger:hover {
  background: #dc2626;
}

.modal--wide {
  width: min(1120px, calc(100vw - 24px));
}
.modal--preview {
  width: min(960px, calc(100vw - 24px));
  height: min(640px, calc(100vh - 24px));
  grid-template-columns: 1fr;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.modal--folders {
  width: min(560px, calc(100vw - 24px));
  height: min(560px, calc(100vh - 24px));
  grid-template-columns: 1fr;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.folders__top {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(12, 17, 22, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.folders__title {
  font-weight: 820;
  color: rgba(12, 17, 22, 0.9);
}

.folders__body {
  padding: 12px 16px;
  overflow: auto;
}

.folders__list {
  display: grid;
  gap: 8px;
}

.folders__item {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(12, 17, 22, 0.12);
  background: #ffffff;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  font-weight: 720;
  color: rgba(12, 17, 22, 0.86);
}

.folders__item:hover {
  background: rgba(12, 17, 22, 0.02);
  border-color: rgba(12, 17, 22, 0.18);
}

.folders__item-sub {
  font-size: 12px;
  color: rgba(12, 17, 22, 0.6);
  font-weight: 650;
}

.folders__bottom {
  padding: 14px 16px;
  border-top: 1px solid rgba(12, 17, 22, 0.08);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.folderrow {
  display: grid;
  grid-template-columns: 44px minmax(240px, 1fr) 160px 220px 160px 44px 44px;
  align-items: center;
  border-bottom: 1px solid rgba(12, 17, 22, 0.06);
  background: rgba(12, 17, 22, 0.015);
  cursor: pointer;
}

.folderrow:hover {
  background: rgba(12, 17, 22, 0.03);
}

.folderrow__icon {
  width: 18px;
  height: 18px;
  color: rgba(12, 17, 22, 0.6);
}

.folderrow__caret {
  width: 16px;
  height: 16px;
  color: rgba(12, 17, 22, 0.55);
}

.folderdrop--over {
  box-shadow: inset 0 0 0 3px rgba(14, 165, 255, 0.35);
  background: rgba(14, 165, 255, 0.08);
}

.foldercard {
  border: 1px solid rgba(12, 17, 22, 0.12);
  border-radius: 14px;
  background: rgba(12, 17, 22, 0.015);
  padding: 12px;
  display: grid;
  gap: 8px;
  cursor: pointer;
}

.foldercard__top {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 780;
}

.foldercard__actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.foldercard__sub {
  font-size: 12px;
  color: rgba(12, 17, 22, 0.62);
}

.preview__top {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(12, 17, 22, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.preview__title {
  font-weight: 800;
  color: rgba(12, 17, 22, 0.9);
  transition: opacity 0.2s ease-in-out;
}

.preview__title.preview__title--transitioning {
  opacity: 0;
}

.preview__top-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.previewzoom {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  border-radius: 12px;
  border: 1px solid rgba(12, 17, 22, 0.12);
  background: rgba(12, 17, 22, 0.02);
}

.previewzoom .iconbtn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.previewzoom__label {
  min-width: 54px;
  text-align: center;
  font-weight: 750;
  color: rgba(12, 17, 22, 0.78);
}

.preview__top-actions .iconbtn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.preview__viewport {
  background: #ffffff;
  position: relative;
  overflow: hidden;
}

.preview__stage {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.preview__stage.preview__stage--transitioning {
  opacity: 0;
  transform: scale(0.95);
}

.preview__iframewrap {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: #0b1220;
  transition: opacity 0.3s ease-in-out;
}

.preview__iframewrap.preview__iframewrap--transitioning {
  opacity: 0;
}

#templatePreviewFrame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.preview__edges {
  position: absolute;
  left: 0;
  top: 0;
  color: rgba(12, 17, 22, 0.45);
  pointer-events: none;
  transition: opacity 0.3s ease-in-out;
}

.preview__nodes {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-in-out;
}

.previewnode {
  position: absolute;
  border: 2px solid rgba(12, 17, 22, 0.16);
  border-radius: 14px;
  background: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  box-sizing: border-box;
}

.previewnode__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.previewnode__text {
  font-weight: 750;
  color: rgba(12, 17, 22, 0.86);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1 auto;
  min-width: 0;
}

.previewinsight {
  position: absolute;
  border-radius: 14px;
  padding: 12px 12px;
  box-sizing: border-box;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  border: 1px solid rgba(2, 6, 23, 0.12);
}

.previewinsight__text {
  font-size: 12px;
  line-height: 1.35;
  font-weight: 600;
  white-space: pre-wrap;
}

.template-guide {
  position: absolute;
  top: 18px;
  left: 18px;
  max-width: 420px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(17, 24, 39, 0.86);
  color: #ffffff;
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
  z-index: 9999;
}

.template-guide__title {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
}

.template-guide__subtitle {
  font-size: 12px;
  opacity: 0.9;
  margin-top: 6px;
}

.template-guide__list {
  margin: 10px 0 8px 18px;
  font-size: 12px;
  opacity: 0.95;
}

.template-guide__tip {
  font-size: 12px;
  opacity: 0.95;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 8px;
}

.template-guide__actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.template-guide__actions button {
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  cursor: pointer;
}

.template-guide__actions button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.preview__bottom {
  padding: 14px 16px;
  border-top: 1px solid rgba(12, 17, 22, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.preview__desc {
  color: rgba(12, 17, 22, 0.7);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: opacity 0.2s ease-in-out;
}

.preview__desc.preview__desc--transitioning {
  opacity: 0;
}

.modal__side {
  background: rgba(12, 17, 22, 0.03);
  border-right: 1px solid rgba(12, 17, 22, 0.08);
  padding: 16px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
  min-height: 0;
}

.modal__side-title {
  font-size: 18px;
  font-weight: 780;
}

.modal__side-list {
  display: grid;
  gap: 6px;
  align-content: start;
  grid-auto-rows: max-content;
  overflow: auto;
  padding-right: 6px;
}

.modal__side-item {
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 650;
  color: rgba(12, 17, 22, 0.78);
}

.modal__side-item:hover {
  background: rgba(12, 17, 22, 0.04);
}

.modal__side-item--active {
  background: rgba(14, 165, 255, 0.14);
  border-color: rgba(14, 165, 255, 0.35);
  color: rgba(12, 17, 22, 0.92);
}

.modal__side-footer {
  border-top: 1px solid rgba(12, 17, 22, 0.08);
  padding-top: 12px;
}

.modal__side-foot-title {
  font-weight: 750;
}

.modal__side-foot-sub {
  margin-top: 6px;
  font-size: 12px;
  color: rgba(12, 17, 22, 0.62);
}

.modal__main {
  display: grid;
  grid-template-rows: auto auto 1fr;
  min-height: 0;
}

.modal__top {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(12, 17, 22, 0.08);
  display: flex;
  align-items: center;
  gap: 10px;
}

.templateschips {
  padding: 10px 16px 2px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}

.chip {
  appearance: none;
  border: 1px solid rgba(12, 17, 22, 0.14);
  background: rgba(12, 17, 22, 0.02);
  color: rgba(12, 17, 22, 0.78);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  user-select: none;
  height: auto;
  align-self: flex-start;
}

.chip:hover {
  background: rgba(12, 17, 22, 0.05);
  border-color: rgba(12, 17, 22, 0.22);
}

.chip--active {
  background: rgba(14, 165, 255, 0.14);
  border-color: rgba(14, 165, 255, 0.45);
  color: rgba(12, 17, 22, 0.9);
}

.template-card__fav {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(12, 17, 22, 0.12);
  background: rgba(255, 255, 255, 0.92);
  color: rgba(12, 17, 22, 0.62);
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 2;
}

.template-card__fav:hover {
  border-color: rgba(12, 17, 22, 0.22);
  color: rgba(12, 17, 22, 0.82);
}

.template-card__fav--active {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.10);
  color: rgba(239, 68, 68, 0.95);
}

.modal__search {
  flex: 1 1 auto;
  width: auto;
}

.templates {
  padding: 16px;
  overflow: auto;
  display: grid;
  gap: 18px;
  min-height: 0;
  overscroll-behavior: contain;
}

.templates__section-title {
  font-weight: 750;
  color: rgba(12, 17, 22, 0.82);
  margin-bottom: 10px;
}

.templates__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}

.template-card {
  border: 1px solid rgba(12, 17, 22, 0.12);
  border-radius: 14px;
  background: #ffffff;
  padding: 12px;
  cursor: default;
  display: grid;
  gap: 10px;
  position: relative;
  transition: all 200ms ease;
}

.template-card:hover {
  background: rgba(12, 17, 22, 0.02);
  border-color: rgba(14, 165, 255, 0.25);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.template-card__thumb {
  height: 120px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid rgba(12, 17, 22, 0.08);
  display: grid;
  place-items: center;
  color: rgba(12, 17, 22, 0.55);
  overflow: hidden;
}

.template-card__thumb svg {
  width: 100%;
  height: 100%;
}

.template-card__actions {
  display: flex;
  gap: 6px;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: all 200ms ease;
}

.template-card:hover .template-card__actions {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.template-card.template-card--actions-open .template-card__actions {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.template-card__btn {
  flex: 1;
  border: 1px solid rgba(12, 17, 22, 0.14);
  background: rgba(12, 17, 22, 0.02);
  color: rgba(12, 17, 22, 0.78);
  border-radius: 8px;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: all 160ms ease;
  text-align: center;
}

.template-card__btn:hover {
  border-color: rgba(12, 17, 22, 0.22);
  background: rgba(12, 17, 22, 0.04);
}

.template-card__btn--primary {
  background: #0ea5ff;
  border-color: #0ea5ff;
  color: #ffffff;
}

.template-card__btn--primary:hover {
  background: #0788f0;
  border-color: #0788f0;
}

.template-card__title {
  font-weight: 750;
}

.template-card__sub {
  font-size: 12px;
  color: rgba(12, 17, 22, 0.62);
}

.account {
  width: min(1080px, calc(100vw - 24px));
  height: min(720px, calc(100vh - 24px));
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;
  grid-template-columns: 280px 1fr;
}

.account__sidebar {
  background: rgba(12, 17, 22, 0.03);
  border-right: 1px solid rgba(12, 17, 22, 0.08);
  padding: 16px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
}

.account__profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account__avatar {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 22px;
  color: #ffffff;
  background: rgba(18, 95, 22, 0.92);
}

.account__who {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.account__name {
  font-weight: 780;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account__user {
  font-size: 12px;
  color: rgba(12, 17, 22, 0.62);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.accountnav {
  display: grid;
  gap: 6px;
  align-content: start;
  grid-auto-rows: max-content;
}

.accountnav__item {
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 650;
  color: rgba(12, 17, 22, 0.78);
}

.accountnav__item:hover {
  background: rgba(12, 17, 22, 0.04);
}

.accountnav__item--active {
  background: rgba(14, 165, 255, 0.14);
  border-color: rgba(14, 165, 255, 0.35);
}

.account__main {
  display: grid;
  grid-template-rows: auto auto 1fr;
  min-height: 0;
  position: relative;
}

.account__topbar {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(12, 17, 22, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.account__top-title {
  font-size: 28px;
  font-weight: 820;
}

.accounttabs {
  padding: 10px 16px 0;
  border-bottom: 1px solid rgba(12, 17, 22, 0.08);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.accounttabs__tab {
  border: none;
  background: transparent;
  padding: 12px 6px;
  font-weight: 650;
  color: rgba(12, 17, 22, 0.62);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.accounttabs__tab--active {
  color: rgba(12, 17, 22, 0.92);
  border-bottom-color: rgba(14, 165, 255, 0.85);
}

.accountbody {
  padding: 18px 16px;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
  /* Visual scroll indicators */
  scrollbar-width: thin;
  scrollbar-color: rgba(12, 17, 22, 0.2) transparent;
  
  /* Top/bottom shadow hint */
  background: 
    /* Shadow Cover Top */
    linear-gradient(#ffffff 30%, rgba(255,255,255,0)),
    /* Shadow Cover Bottom */
    linear-gradient(rgba(255,255,255,0), #ffffff 70%) 0 100%,
    
    /* Shadow Top */
    radial-gradient(farthest-side at 50% 0, rgba(0,0,0,.08), rgba(0,0,0,0)),
    /* Shadow Bottom */
    radial-gradient(farthest-side at 50% 100%, rgba(0,0,0,.08), rgba(0,0,0,0)) 0 100%;
    
  background-repeat: no-repeat;
  background-color: #ffffff;
  background-size: 100% 40px, 100% 40px, 100% 14px, 100% 14px;
  
  /* Operates on scroll position */
  background-attachment: local, local, scroll, scroll;
}

/* Custom Scrollbar for Webkit */
.accountbody::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.accountbody::-webkit-scrollbar-track {
  background: transparent;
}

.accountbody::-webkit-scrollbar-thumb {
  background-color: rgba(12, 17, 22, 0.12);
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: content-box;
}

.accountbody::-webkit-scrollbar-thumb:hover {
  background-color: rgba(12, 17, 22, 0.25);
}

.formgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

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

.field__label {
  font-size: 12px;
  color: rgba(12, 17, 22, 0.62);
  font-weight: 650;
}

.textarea {
  appearance: none;
  border: 1px solid var(--btn-border);
  background: #ffffff;
  color: var(--fg);
  border-radius: 12px;
  padding: 10px 10px;
  font-size: 13px;
  min-height: 90px;
  resize: vertical;
}

.textarea:focus {
  outline: none;
  border-color: rgba(14, 165, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(14, 165, 255, 0.14);
}

.formactions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-start;
}

/* User Menu Header Styles */
.um-header {
  padding: 10px 10px 5px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}

.um-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.um-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #1e293b;
  font-weight: 700;
  font-size: 20px;
  display: grid;
  place-items: center;
}

.um-details {
  flex: 1;
  min-width: 0;
}

.um-name {
  font-weight: 700;
  color: #0f172a;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.um-email {
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.um-team {
  font-size: 11px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

.um-badge {
  display: inline-block;
  margin-top: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  background: #e2e8f0;
  color: #475569;
}

.um-badge--pro {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
}

.um-usage {
  background: #f8fafc;
  border-radius: 8px;
  padding: 10px;
  border: 1px solid #e2e8f0;
}

.um-usage-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.um-usage-text {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 6px;
}

.um-upgrade-btn {
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.um-upgrade-btn:hover {
  background: #1d4ed8;
}

.um-progress {
  display: flex;
  gap: 4px;
  margin-bottom: 6px;
}

.um-bar-seg {
  flex: 1;
  height: 4px;
  background: #cbd5e1;
  border-radius: 2px;
}

.um-bar-seg.filled {
  background: #0ea5e9;
}

.um-usage-sub {
  font-size: 10px;
  color: #64748b;
}


/* Ajustes PRO vs FREE */
.um-avatar--pro {
  background: #15803d !important; /* verde escuro */
  color: #fff !important;
}

.um-badge {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 99px;
  background: #e2e8f0;
  color: #475569;
  letter-spacing: 0.5px;
}

.um-badge--pro {
  background: #e0e7ff;
  color: #3730a3;
  text-transform: uppercase;
}

.um-usage--pro {
  background: #f0f9ff !important;
  border: none !important;
  padding: 10px 12px !important;
}

.um-usage--pro .um-usage-text {
  color: #0284c7 !important;
  font-weight: 700;
}


/* Centered Profile Styles */
.um-profile-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 12px;
  text-align: center;
}

.um-avatar-centered {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #1e293b;
  font-weight: 700;
  font-size: 24px;
  display: grid;
  place-items: center;
  margin-bottom: 6px;
}

.um-avatar-centered--pro {
  background: #15803d !important;
  color: #fff !important;
}

.um-name-centered {
  font-weight: 700;
  color: #0f172a;
  font-size: 18px;
  margin-bottom: 2px;
}

.um-email-centered {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 4px;
}

.um-team-centered {
  font-size: 13px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  margin-bottom: 8px;
}

.um-badge-centered {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 6px;
  background: #e2e8f0;
  color: #475569;
  letter-spacing: 0.5px;
}

.um-badge-centered--pro {
  background: #e0e7ff;
  color: #3730a3;
}

/* Empty Trash Level 0 State */
.empty-trash-l0 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.empty-trash-icon {
  margin-bottom: 24px;
}

.empty-trash-icon svg:first-child {
    display: none; /* Hide the placeholder rect svg if I used the div method */
}

.empty-trash-title {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 12px;
}

.empty-trash-desc {
  font-size: 14px;
  color: #64748b;
  max-width: 400px;
  line-height: 1.5;
  margin-bottom: 24px;
}

.empty-trash-btn {
  background: #2563eb;
  color: #ffffff;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  transition: background 0.2s;
}

.empty-trash-btn:hover {
  background: #1d4ed8;
}

/* Maps Loader Overlay */
.maps-loader-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  pointer-events: none;
}

.maps-loader-overlay.hidden {
  display: none;
}

.maps-loader-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid transparent;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: mapsSpinner 0.6s linear infinite;
}

@keyframes mapsSpinner {
  to { transform: rotate(360deg); }
}
.toast-notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  color: white;
  padding: 14px 20px;
  border-radius: 12px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 10002;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  max-width: 400px;
  animation: toastSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-notification.hidden {
  display: none;
}

@keyframes toastSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toast-icon {
  background: white;
  color: #0f172a;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toast-icon svg {
  width: 12px;
  height: 12px;
  stroke-width: 3px;
}

.toast-message {
  font-size: 14px;
  line-height: 1.4;
  color: #f8fafc;
}

.toast-message b {
  font-weight: 600;
  color: #fff;
}

.toast-action {
  background: #334155;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.toast-action:hover {
  background: #475569;
}

.toast-action.hidden {
  display: none;
}
.loading-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(1px);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-modal-overlay.hidden {
  display: none;
}

.loading-modal-content {
  background: #fff;
  padding: 32px 48px;
  border-radius: 16px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  min-width: 280px;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e2e8f0;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spinner 0.8s linear infinite;
}

@keyframes spinner {
  to { transform: rotate(360deg); }
}

.loading-text {
  font-size: 16px;
  color: #0f172a;
  font-weight: 500;
}
.trash-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trash-modal-overlay.hidden {
  display: none;
}

.trash-modal-content {
  background: #fff;
  width: 90%;
  max-width: 480px;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.trash-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e2e8f0;
}

.trash-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

.trash-modal-close {
  background: transparent;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  padding: 4px;
}

.trash-modal-close:hover {
  color: #0f172a;
}

.trash-modal-body {
  padding: 24px;
  font-size: 15px;
  color: #334155;
  line-height: 1.5;
}

.trash-modal-footer {
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: #f8fafc;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.btn-trash-cancel {
  background: #e2e8f0;
  color: #475569;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-trash-cancel:hover {
  background: #cbd5e1;
}

.btn-trash-confirm {
  background: #ef4444;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-trash-confirm:hover {
  background: #dc2626;
}
.upgrade-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upgrade-modal-overlay.hidden {
  display: none;
}

.upgrade-modal-content {
  background: #fff;
  width: 100%;
  max-width: 400px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  animation: modalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  0% { opacity: 0; transform: scale(0.95); }
  100% { opacity: 1; transform: scale(1); }
}

.upgrade-modal-header {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  padding: 32px 24px 24px;
  text-align: center;
  color: #fff;
}

.upgrade-modal-rocket {
  font-size: 40px;
  margin-bottom: 16px;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2));
}

.upgrade-modal-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
  line-height: 1.2;
}

.upgrade-modal-subtitle {
  font-size: 14px;
  opacity: 0.9;
}

.upgrade-modal-body {
  padding: 24px;
}

.upgrade-features-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.upgrade-features-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #374151;
  font-weight: 500;
}

.check-icon {
  color: #10b981;
  font-weight: 800;
  font-size: 16px;
}

.upgrade-modal-footer {
  padding: 0 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.btn-upgrade-now {
  width: 100%;
  background: #3b82f6;
  color: white;
  border: none;
  padding: 14px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s;
  box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.5);
}

.btn-upgrade-now:hover {
  background: #2563eb;
}

.btn-upgrade-later {
  background: transparent;
  border: none;
  color: #9ca3af;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.btn-upgrade-later:hover {
  color: #6b7280;
}

.support-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.support-modal-overlay.hidden {
  display: none;
}

.support-modal-content {
  background: #fff;
  width: 100%;
  max-width: 520px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  animation: modalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.support-modal-header {
  background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
  padding: 22px 24px 18px;
  color: #fff;
}

.support-modal-title {
  font-size: 18px;
  font-weight: 800;
  margin: 0;
}

.support-modal-subtitle {
  font-size: 13px;
  opacity: 0.95;
  margin-top: 6px;
}

.support-modal-body {
  padding: 18px 24px 22px;
}

.support-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.support-step-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(2, 132, 199, 0.12);
  color: #0c4a6e;
}

.support-topics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.support-topic {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 12px;
  background: #fff;
  cursor: pointer;
  text-align: left;
}

.support-topic:hover {
  border-color: rgba(37, 99, 235, 0.45);
  background: rgba(37, 99, 235, 0.04);
}

.support-topic__title {
  font-weight: 800;
  font-size: 14px;
  color: #111827;
}

.support-topic__sub {
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
}

.support-form {
  display: grid;
  gap: 10px;
}

.support-textarea {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 12px;
  min-height: 110px;
  resize: vertical;
  font: inherit;
}

.support-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 12px;
}

.support-btn {
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #111827;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
}

.support-btn--primary {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.support-btn--primary:hover {
  background: #1d4ed8;
}
.empty-mine-l0 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.empty-mine-icon {
  margin-bottom: 24px;
}

.empty-mine-title {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 12px;
}

.empty-mine-desc {
  font-size: 15px;
  color: #64748b;
  max-width: 480px;
  line-height: 1.5;
  margin-bottom: 24px;
}

.empty-mine-btn {
  background: #2563eb;
  color: #ffffff;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  transition: background 0.2s;
}

.empty-mine-btn:hover {
  background: #1d4ed8;
}
.empty-folders-l0 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.empty-folders-icon {
  margin-bottom: 24px;
}

.empty-folders-title {
  font-size: 26px;
  font-weight: 800;
  color: #1a1a1a;
  margin-bottom: 12px;
}

.empty-folders-desc {
  font-size: 16px;
  color: #666;
  max-width: 500px;
  line-height: 1.5;
  margin-bottom: 24px;
}

.empty-folders-btn {
  background: #0d6efd;
  color: #ffffff;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  transition: background 0.2s;
}

.empty-folders-btn:hover {
  background: #0b5ed7;
}
.empty-fav-l0 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.empty-fav-icon {
  margin-bottom: 24px;
}

.empty-fav-title {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 12px;
}

.empty-fav-desc {
  font-size: 14px;
  color: #64748b;
  max-width: 400px;
  line-height: 1.5;
  margin-bottom: 24px;
}

.empty-fav-btn {
  background: #0ea5e9;
  color: #ffffff;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.empty-fav-btn:hover {
  background: #0284c7;
}

.link-sharing-section {
  margin-top: 24px;
  border-top: 1px solid #e2e8f0;
  padding-top: 24px;
}

.link-sharing-header {
  font-weight: 700;
  font-size: 14px;
  color: #0f172a;
  margin-bottom: 6px;
}

.link-sharing-desc {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 12px;
  max-width: 80%;
}

.link-sharing-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-end;
  position: relative;
}

.btn-link-perm {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid transparent;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

.btn-link-perm:hover {
  background: #dbeafe;
}

.btn-link-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  color: #94a3b8;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  cursor: default;
}

.btn-link-copy.active {
    background: #e0e7ff;
    color: #4f46e5;
    cursor: pointer;
}

/* Dropdown */
.ls-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-radius: 8px;
  width: 240px;
  z-index: 100;
  display: none;
}

.ls-dropdown.visible {
  display: block;
}

.ls-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 14px;
  color: #334155;
}

.ls-item:hover {
  background: #f8fafc;
}

.ls-item.active {
  background: #f1f5f9;
  font-weight: 600;
  color: #0f172a;
}

.ls-icon {
  width: 16px;
  height: 16px;
  color: #64748b;
}

.ls-badge {
  margin-left: auto;
  background: #fbbf24;
  color: #78350f;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 2px;
}

@media (max-width: 640px) {
  .quicktemplates {
    justify-content: flex-start;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 12px 14px 18px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .quicktemplates::-webkit-scrollbar {
    display: none;
  }

  .quicktemplate {
    flex: 0 0 138px;
    min-width: 138px;
    max-width: 138px;
    min-height: 132px;
    scroll-snap-align: start;
  }

  .quicktemplate__label {
    min-height: 28px;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .quicktemplate__actions {
    left: 8px;
    right: 8px;
    bottom: 8px;
    min-width: 0;
    width: auto;
    padding: 7px;
    transform: translateY(6px);
  }

  .quicktemplate:hover .quicktemplate__actions,
  .quicktemplate.quicktemplate--actions-open .quicktemplate__actions {
    transform: translateY(0);
  }

  .quicktemplate__actions::before {
    display: none;
  }

  .quicktemplate.quicktemplate--actions-open .quicktemplate__label {
    opacity: 0;
  }

  .quicktemplate__btn {
    padding: 7px 9px;
    font-size: 11.5px;
  }

  #templatesOverlay .modal--wide {
    width: calc(100vw - 20px);
    height: min(720px, calc(100vh - 20px));
    height: min(720px, calc(100dvh - 20px));
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    border-radius: 18px;
  }

  #templatesOverlay .modal__side {
    border-right: 0;
    border-bottom: 1px solid rgba(12, 17, 22, 0.08);
    padding: 14px 14px 10px;
    grid-template-rows: auto auto;
    gap: 10px;
  }

  #templatesOverlay .modal__side-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  #templatesOverlay .modal__side-list::-webkit-scrollbar {
    display: none;
  }

  #templatesOverlay .modal__side-item {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 9px 12px;
  }

  #templatesOverlay .modal__side-footer {
    display: none;
  }

  #templatesOverlay .modal__top {
    padding: 10px 12px;
    gap: 8px;
  }

  #templatesOverlay .templateschips {
    padding: 10px 12px 4px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  #templatesOverlay .templateschips::-webkit-scrollbar {
    display: none;
  }

  #templatesOverlay .chip {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  #templatesOverlay .templates {
    padding: 12px;
    gap: 16px;
  }

  #templatesOverlay .templates__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  #templatesOverlay .template-card {
    padding: 10px;
  }

  #templatesOverlay .template-card__thumb {
    height: 112px;
  }
}
