@import url('./main-layout.css');

:root {
  --app-bg: #101010;
  --app-surface-1: #171717;
  --app-surface-2: #1f1f1f;
  --app-border: #2a2a2a;
  --app-border-strong: #3a3a3a;
  --app-text: #ffffff;
  --app-muted: #c8c8c8;
  --app-accent: #62bbff;
  --app-input-icon: #dbe7f5;

  --lumo-base-color: var(--app-bg);
  --lumo-body-text-color: var(--app-text);
  --lumo-header-text-color: var(--app-text);
  --lumo-primary-text-color: var(--app-text);
  --lumo-secondary-text-color: var(--app-muted);
  --lumo-primary-color: var(--app-accent);
  --lumo-primary-color-10pct: rgba(98, 187, 255, 0.2);
  --lumo-contrast-10pct: rgba(255, 255, 255, 0.1);
  --lumo-contrast-20pct: rgba(255, 255, 255, 0.2);
}

html,
body {
  background: var(--app-bg);
  color: var(--app-text);
}

/* Global scrollbar theme */
* {
  scrollbar-width: thin;
  scrollbar-color: #3a3a3a #141414;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: #141414;
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #3f3f3f 0%, #2f2f2f 100%);
  border-radius: 999px;
  border: 2px solid #141414;
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #565656 0%, #3f3f3f 100%);
}

vaadin-app-layout,
vaadin-app-layout::part(drawer),
vaadin-app-layout::part(navbar) {
  background: var(--app-bg);
  color: var(--app-text);
}

vaadin-side-nav-item::part(content) {
  border-radius: 10px;
}

vaadin-side-nav-item[current]::part(content) {
  background: rgba(98, 187, 255, 0.18);
}

vaadin-text-field::part(prefix),
vaadin-combo-box::part(prefix),
vaadin-email-field::part(prefix),
vaadin-number-field::part(prefix),
vaadin-password-field::part(prefix),
vaadin-combo-box::part(toggle-button),
vaadin-date-picker::part(toggle-button),
vaadin-time-picker::part(toggle-button),
vaadin-date-time-picker::part(toggle-button),
vaadin-number-field::part(increase-button),
vaadin-number-field::part(decrease-button) {
  color: var(--app-input-icon);
}

vaadin-text-field vaadin-icon,
vaadin-combo-box vaadin-icon,
vaadin-email-field vaadin-icon,
vaadin-number-field vaadin-icon,
vaadin-password-field vaadin-icon,
vaadin-date-picker vaadin-icon,
vaadin-time-picker vaadin-icon,
vaadin-date-time-picker vaadin-icon {
  color: var(--app-input-icon);
}

.media-page,
.posts-page {
  background: var(--app-bg);
  color: var(--app-text);
}

.media-week-scroller,
.media-folder-scroller {
  background: transparent;
}

.posts-left-rail {
  display: flex;
  flex-direction: column;
  width: 220px;
  min-width: 220px;
  border-right: 1px solid var(--app-border);
  border-radius: 18px;
  background: #0d0d0d;
  overflow: hidden;
  transition: width 220ms ease, min-width 220ms ease, border-color 220ms ease;
}

.posts-left-rail.collapsed {
  width: 92px;
  min-width: 92px;
}

.posts-left-rail-header {
  margin: 0;
  padding: 12px 14px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.posts-left-rail-title {
  color: var(--app-muted);
  font-size: var(--lumo-font-size-s);
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: opacity 150ms ease, transform 150ms ease;
}

.posts-left-rail-collapse,
.email-designer-library-toggle {
  width: 38px;
  min-width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: linear-gradient(180deg, #1e1e1e 0%, #151515 100%);
  color: #f1f1f1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.posts-left-rail-collapse:hover,
.email-designer-library-toggle:hover {
  border-color: rgba(255, 255, 255, 0.26);
  background: linear-gradient(180deg, #262626 0%, #1b1b1b 100%);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  transform: translateY(-1px);
}

.posts-left-rail-collapse:active,
.email-designer-library-toggle:active {
  transform: translateY(0);
}

.posts-left-rail-collapse vaadin-icon,
.email-designer-library-toggle vaadin-icon {
  width: 16px;
  height: 16px;
}

.posts-left-rail.collapsed .posts-left-rail-header {
  justify-content: center;
  padding-inline: 12px;
}

.posts-left-rail.collapsed .posts-left-rail-title {
  opacity: 0;
  flex: 0 0 0;
  width: 0;
  min-width: 0;
  overflow: hidden;
  transform: translateX(-6px);
  pointer-events: none;
}

.posts-left-rail.collapsed .posts-left-rail-collapse {
  margin-inline: auto;
}

.posts-left-rail.collapsed .posts-rail-toggle {
  display: none;
}

.posts-rail-toggle {
  display: none;
  padding: 12px 12px 10px;
  gap: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
}

.media-main-layout .posts-rail-toggle {
  display: flex;
}

.media-main-layout .posts-left-rail {
  width: 252px;
  min-width: 252px;
}

.media-main-layout .posts-left-rail[data-active-rail="folders"] {
  width: 360px;
  min-width: 360px;
}

.media-main-layout .posts-left-rail.collapsed,
.media-main-layout .posts-left-rail[data-active-rail="folders"].collapsed {
  width: 92px;
  min-width: 92px;
}

.posts-rail-toggle-button {
  flex: 1 1 0;
  min-height: 38px;
  margin: 0;
  border: 1px solid var(--app-border);
  border-radius: 12px;
  background: #171717;
  color: #d8d8d8;
  font-weight: 600;
}

.posts-rail-toggle-button:hover {
  background: #202020;
  color: #ffffff;
}

.posts-rail-toggle-button.active {
  border-color: #5b5b5b;
  background: linear-gradient(180deg, #f7f7f7 0%, #d6d6d6 100%);
  color: #0f0f0f;
}

.posts-rail-section {
  min-width: 0;
}

.media-main-layout .posts-rail-section {
  display: none;
}

.media-main-layout .posts-left-rail[data-active-rail="calendar"] .posts-rail-section-calendar {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.media-main-layout .posts-left-rail[data-active-rail="folders"] .posts-rail-section-folders {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
}

.media-main-layout .posts-left-rail .media-week-scroller,
.media-main-layout .posts-left-rail .media-folder-scroller {
  flex: 1 1 auto;
  min-height: 0;
}

.media-timeline-rail-section {
  min-height: 0;
}

.media-top-rail {
  width: 100%;
  min-width: 0;
  border-right: none;
  border-bottom: 1px solid var(--app-border);
}

.media-top-rail .posts-rail-toggle {
  display: flex;
}

.media-top-rail .posts-rail-section {
  display: none;
}

.media-top-rail[data-active-rail="month"] .posts-rail-section-month {
  display: block;
}

.media-top-rail[data-active-rail="weeks"] .posts-rail-section-weeks {
  display: flex;
}

.media-top-rail .posts-mini-calendar-nav {
  padding: 10px 12px 0;
}

.media-top-rail .posts-mini-calendar-overview {
  flex-direction: row;
  flex-wrap: wrap;
  padding: 10px 12px 12px;
  border-bottom: none;
}

.media-top-rail .posts-mini-calendar {
  flex: 1 1 220px;
  max-width: 320px;
  padding: 8px;
}

.media-top-rail .posts-mini-calendar-overview .posts-mini-calendar:nth-child(n + 2) {
  display: none;
}

.media-top-rail .posts-rail-section-weeks .media-week-scroller {
  height: 116px !important;
  max-height: 116px;
  min-height: 116px;
}

.media-top-rail .posts-rail-section-weeks .media-week-scroller::part(content) {
  overflow-x: auto;
  overflow-y: hidden;
}

.media-top-rail .posts-rail-section-weeks .media-week-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(112px, 1fr);
  grid-template-rows: repeat(2, minmax(0, auto));
  gap: 6px;
  align-items: start;
  padding: 10px 12px 12px;
  min-width: max-content;
}

.media-top-rail .posts-rail-section-weeks .media-week-button {
  min-height: 34px;
  border-radius: 9px;
}

.media-top-rail .posts-rail-section-weeks .media-week-button .media-week-content {
  gap: 6px;
  padding: 0 4px 0 8px;
}

.media-top-rail .posts-rail-section-weeks .media-week-count {
  min-width: 22px;
  padding: 1px 6px;
  font-size: 0.68rem;
}

.media-top-rail .posts-rail-section-weeks .media-week-button-week .media-week-content,
.media-top-rail .posts-rail-section-weeks .media-week-button-all .media-week-content {
  font-size: 0.78rem;
}

.posts-mini-calendar-overview {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
}

.posts-mini-calendar-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 14px 0;
  border-bottom: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
}

.posts-mini-calendar-nav-label {
  color: #f3f3f3;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.posts-mini-calendar-nav-button {
  min-width: 24px;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid var(--app-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #d9eeff;
}

.posts-mini-calendar-nav-button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.posts-mini-calendar {
  padding: 10px;
  border: 1px solid var(--app-border);
  border-radius: 12px;
  background: var(--app-surface-1);
}

.posts-mini-calendar-title {
  display: block;
  margin-bottom: 8px;
  color: #f3f3f3;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.posts-left-rail.collapsed .posts-mini-calendar-overview {
  padding: 10px 8px 8px;
  gap: 8px;
}

.posts-left-rail.collapsed .posts-mini-calendar-nav {
  padding: 10px 8px 6px;
  justify-content: center;
}

.posts-left-rail.collapsed .posts-mini-calendar-nav-label {
  display: none;
}

.posts-left-rail.collapsed .posts-mini-calendar {
  padding: 10px 8px;
  border-radius: 10px;
}

.posts-left-rail.collapsed .posts-mini-calendar-grid {
  display: none;
}

.posts-left-rail.collapsed .posts-mini-calendar-title {
  margin: 0;
  font-size: 0;
  letter-spacing: 0;
  text-align: center;
}

.posts-left-rail.collapsed .posts-mini-calendar-title::after {
  content: attr(data-short-label);
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #f3f3f3;
}

.posts-mini-calendar-grid {
  display: grid;
  grid-template-columns: 22px repeat(7, minmax(0, 1fr));
  gap: 4px;
  align-items: center;
}

.posts-mini-calendar-header-spacer,
.posts-mini-calendar-dow,
.posts-mini-calendar-week-number,
.posts-mini-calendar-day {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 18px;
  font-size: 0.68rem;
  line-height: 1;
}

.posts-mini-calendar-dow {
  color: var(--app-muted);
  font-weight: 600;
}

.posts-mini-calendar-week-number {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  border-radius: 6px;
  color: #8ea6bd;
  cursor: pointer;
  font-weight: 600;
  transition: background 120ms ease, color 120ms ease;
}

.posts-mini-calendar-week-number.active {
  color: #d9eeff;
}

.posts-mini-calendar-day {
  appearance: none;
  position: relative;
  border: none;
  background: transparent;
  padding: 0;
  border-radius: 6px;
  color: #f0f0f0;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}

.posts-mini-calendar-week-number:hover,
.posts-mini-calendar-day:hover {
  background: rgba(255, 255, 255, 0.06);
}

.posts-mini-calendar-week-number:focus-visible,
.posts-mini-calendar-day:focus-visible {
  outline: 1px solid rgba(98, 187, 255, 0.7);
  outline-offset: 1px;
}

.posts-mini-calendar-day-number {
  display: block;
}

.posts-mini-calendar-day-count {
  position: absolute;
  top: 1px;
  right: 2px;
  color: #8fc2eb;
  font-size: 0.46rem;
  font-weight: 700;
  line-height: 1;
}

.posts-mini-calendar-day.outside-month {
  color: rgba(255, 255, 255, 0.22);
}

.posts-mini-calendar-day.outside-month .posts-mini-calendar-day-count {
  color: rgba(255, 255, 255, 0.24);
}

.posts-mini-calendar-day.today {
  background: rgba(98, 187, 255, 0.18);
  color: #dff3ff;
}

.posts-mini-calendar-day.active-week {
  background: rgba(255, 255, 255, 0.08);
}

.posts-mini-calendar-day.active-week .posts-mini-calendar-day-count {
  color: #dff3ff;
}

.media-week-rail {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  transition: padding 220ms ease;
}

.media-week-button {
  margin: 0;
  border: 1px solid var(--app-border);
  border-radius: 10px;
  background: var(--app-surface-1);
  color: var(--app-text);
  transition: border-color 120ms ease, background 120ms ease;
}

.media-week-button:hover {
  border-color: var(--app-border-strong);
  background: var(--app-surface-2);
}

.media-week-button.drop-target {
  border-color: #f0f0f0;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.media-week-button.active {
  border-color: var(--app-accent);
  background: rgba(98, 187, 255, 0.18);
}

.posts-left-rail.collapsed .media-week-rail {
  padding-left: 8px;
  padding-right: 8px;
  gap: 6px;
}

.posts-left-rail.collapsed .media-week-button {
  min-height: 36px;
  border-radius: 10px;
}

.posts-left-rail.collapsed .media-week-prefix,
.posts-left-rail.collapsed .media-unassigned-card {
  display: none;
}

.posts-left-rail.collapsed .media-week-button-week .media-week-content,
.posts-left-rail.collapsed .media-week-button-all .media-week-content {
  justify-content: space-between;
  gap: 6px;
  padding: 0 6px;
}

.media-week-content {
  min-width: 0;
  box-sizing: border-box;
  gap: 8px;
  padding: 0 6px 0 8px;
}

.media-week-count {
  min-width: 28px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  text-align: center;
  font-size: var(--lumo-font-size-xs);
}

.media-week-all-label {
  font-weight: 600;
}

.posts-left-rail.collapsed .media-week-number,
.posts-left-rail.collapsed .media-week-all-label {
  font-weight: 700;
  font-size: 0.78rem;
}

.posts-left-rail.collapsed .media-week-count {
  min-width: 22px;
  padding: 1px 6px;
  font-size: 0.64rem;
}

.media-unassigned-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px dashed var(--app-border-strong);
  color: var(--app-muted);
}

.media-folder-rail {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  transition: padding 220ms ease;
}

.media-folder-button {
  margin: 0;
  border: 1px solid var(--app-border);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0.015) 100%);
  color: var(--app-text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.media-folder-button:hover {
  border-color: var(--app-border-strong);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transform: translateY(-1px);
}

.media-folder-button.drop-target {
  border-color: #f0f0f0;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.media-folder-button.active {
  border-color: var(--app-accent);
  background: rgba(98, 187, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(98, 187, 255, 0.16);
}

.media-folder-content {
  min-width: 0;
  box-sizing: border-box;
  gap: 10px;
  padding: 0 14px;
}

.media-folder-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  font-size: 0.95rem;
}

.media-folder-count {
  min-width: 32px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  text-align: center;
  font-size: var(--lumo-font-size-xs);
}

.media-folder-empty-state {
  padding: 16px 18px;
  border: 1px dashed var(--app-border-strong);
  border-radius: 14px;
  color: var(--app-muted);
  background: rgba(255, 255, 255, 0.02);
}

.media-folder-explorer-header {
  display: grid;
  gap: 12px;
}

.media-folder-section-label,
.media-folder-location-caption {
  color: #c2c2c2;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.media-folder-nav-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.media-explorer-action-button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.03);
  color: #ececec;
}

.media-explorer-action-button:hover {
  background: rgba(255, 255, 255, 0.07);
}

.media-explorer-action-button.active {
  border-color: rgba(98, 187, 255, 0.48);
  background: rgba(98, 187, 255, 0.14);
}

.media-folder-location-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.015) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.media-folder-path-label,
.media-folder-path-drop-zone {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--app-muted);
  overflow: hidden;
}

.media-folder-path-label {
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 600;
}

.media-folder-path-drop-zone {
  gap: 6px;
  flex-wrap: wrap;
  transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.media-folder-path-drop-zone > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-folder-breadcrumb-bar {
  align-items: center;
}

.media-folder-breadcrumb-button {
  margin: 0;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: #f5f5f5;
  font-size: 0.78rem;
  font-weight: 600;
}

.media-folder-breadcrumb-button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.media-folder-breadcrumb-button.active {
  border-color: rgba(98, 187, 255, 0.5);
  background: rgba(98, 187, 255, 0.16);
}

.media-folder-breadcrumb-separator {
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.78rem;
  font-weight: 700;
}

.media-folder-path-drop-zone.drop-target {
  border-color: #f0f0f0;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.media-folder-tree {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.media-explorer-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding-left: calc(var(--media-tree-depth, 0) * 18px);
  min-width: 0;
}

.media-explorer-toggle,
.media-explorer-toggle-placeholder {
  width: 26px;
  min-width: 26px;
  height: 26px;
}

.media-explorer-toggle {
  margin: 0;
  padding: 0;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.82);
}

.media-explorer-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.media-explorer-toggle vaadin-icon {
  width: 18px;
  height: 18px;
}

.media-explorer-toggle-placeholder {
  display: block;
}

.media-folder-tree-button,
.media-explorer-file-button {
  min-height: 32px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--app-text);
  text-align: left;
  box-shadow: none;
}

.media-folder-tree-button:hover,
.media-explorer-file-button:hover {
  transform: none;
  border-color: rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
}

.media-folder-tree-button.active,
.media-explorer-file-button.active {
  border-color: rgba(98, 187, 255, 0.44);
  background: rgba(98, 187, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(98, 187, 255, 0.08);
}

.media-folder-tree-button::part(label),
.media-explorer-file-button::part(label) {
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.media-explorer-item-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding: 0 8px 0 6px;
}

.media-explorer-label-wrap {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}

.media-explorer-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  min-width: 18px;
  height: 18px;
  color: rgba(255, 255, 255, 0.72);
}

.media-explorer-icon vaadin-icon {
  width: 16px;
  height: 16px;
}

.media-explorer-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.92rem;
  font-weight: 500;
}

.media-explorer-count,
.media-explorer-file-meta {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.72rem;
  line-height: 1;
}

.media-explorer-count {
  min-width: 24px;
  padding: 2px 0;
  text-align: right;
  font-weight: 700;
}

.media-explorer-file-meta {
  max-width: 72px;
}

.posts-left-rail.collapsed .media-folder-rail {
  padding-left: 8px;
  padding-right: 8px;
  gap: 6px;
}

.posts-left-rail.collapsed .media-folder-button {
  min-height: 36px;
  border-radius: 10px;
}

.posts-left-rail.collapsed .media-folder-content {
  gap: 6px;
  padding: 0 6px;
}

.posts-left-rail.collapsed .media-folder-count {
  min-width: 22px;
  padding: 1px 6px;
  font-size: 0.64rem;
}

.posts-left-rail.collapsed .media-folder-empty-state {
  display: none;
}

.posts-left-rail.collapsed .media-folder-explorer-header,
.posts-left-rail.collapsed .media-folder-tree,
.posts-left-rail.collapsed .media-folder-path-drop-zone,
.posts-left-rail.collapsed .media-folder-path-label,
.posts-left-rail.collapsed .media-folder-location-card,
.posts-left-rail.collapsed .media-folder-section-label {
  display: none;
}

.media-content {
  padding: 18px 20px 20px;
  gap: 12px;
  box-sizing: border-box;
  min-width: 0;
  overflow: hidden;
}

.settings-section-stack {
  gap: 18px;
  padding-bottom: 16px;
}

.settings-tab-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  width: fit-content;
  max-width: 100%;
  padding: 6px;
  border: 1px solid var(--app-border);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0.015) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.settings-tab-button {
  margin: 0;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 16px;
  color: var(--app-muted);
  font-weight: 600;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.settings-tab-button:hover {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.92);
}

.settings-tab-button-active {
  color: #fff;
  background: linear-gradient(135deg, rgba(141, 214, 255, 0.2) 0%, rgba(83, 164, 255, 0.32) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 18px rgba(0, 0, 0, 0.18);
}

.settings-tab-shell {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
}

.settings-tab-panel {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
}

.settings-admin-panel {
  overflow: hidden;
}

.settings-admin-channel-tab-bar {
  align-self: flex-start;
}

.settings-admin-channel-shell {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
}

.settings-admin-channel-panel {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  gap: 12px;
  overflow: auto;
  scrollbar-gutter: stable;
  padding-right: 4px;
}

.settings-admin-channel-header {
  display: grid;
  gap: 2px;
}

.settings-admin-tool-tab-bar {
  align-self: flex-start;
}

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

.settings-admin-channel-note {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--app-border);
  background: rgba(255, 255, 255, 0.025);
  color: var(--app-muted);
  line-height: 1.55;
}

.settings-admin-content {
  padding-left: 0;
  padding-right: 0;
  padding-bottom: 0;
}

.settings-admin-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.settings-admin-media-card {
  overflow: hidden;
}

.settings-admin-media-preview {
  height: 180px;
}

.settings-admin-media-body {
  display: grid;
  gap: 10px;
  padding: 14px 16px 16px;
}

.settings-admin-media-title {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.35;
}

.settings-admin-media-summary {
  color: var(--app-muted);
  font-size: 0.86rem;
}

.settings-admin-media-path-block {
  display: grid;
  gap: 4px;
}

.settings-admin-media-path-label {
  color: var(--app-muted);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.settings-admin-media-path-value {
  color: inherit;
  font-size: 0.84rem;
  line-height: 1.45;
  word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.settings-section {
  display: grid;
  gap: 14px;
}

.settings-section-header {
  margin: 0;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.settings-section-title {
  margin: 0;
  font-size: 1.08rem;
}

.settings-account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.settings-account-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0%, rgba(255, 255, 255, 0.012) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.settings-account-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.settings-account-header > :first-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.settings-account-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.settings-account-body {
  margin: 0;
  color: var(--app-muted);
  line-height: 1.6;
}

.settings-inline-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--app-border-strong);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.8rem;
  line-height: 1.2;
}

.settings-api-domain-selector-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
}

.settings-api-domain-selector,
.settings-api-workspace-selector {
  position: relative;
  display: grid;
  gap: 14px;
  width: 100%;
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 28%),
    linear-gradient(180deg, #181818 0%, #111111 100%);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
  box-sizing: border-box;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.settings-api-domain-selector:hover,
.settings-api-workspace-selector:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.22);
}

.settings-api-domain-selector:focus-visible,
.settings-api-workspace-selector:focus-visible {
  outline: 2px solid rgba(98, 187, 255, 0.32);
  outline-offset: 2px;
}

.settings-api-domain-selector-active,
.settings-api-workspace-selector-active {
  color: #ffffff;
}

.settings-api-domain-selector-social.settings-api-domain-selector-active {
  border-color: rgba(98, 187, 255, 0.24);
  background:
    radial-gradient(circle at top right, rgba(98, 187, 255, 0.14) 0%, rgba(98, 187, 255, 0) 34%),
    linear-gradient(180deg, #181a1c 0%, #111315 100%);
}

.settings-api-domain-selector-mailing.settings-api-domain-selector-active {
  border-color: rgba(255, 255, 255, 0.14);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 34%),
    linear-gradient(180deg, #191919 0%, #111111 100%);
}

.settings-api-tab-icon {
  width: 24px;
  height: 24px;
  color: inherit;
  fill: currentColor;
}

.settings-api-selector-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}

.settings-api-selector-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.settings-api-selector-title {
  color: #f4f4f4;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
}

.settings-api-selector-subtitle {
  color: #a7a7a7;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.settings-api-selector-icon-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  flex-shrink: 0;
}

.settings-api-selector-icon-shell-instagram {
  background: rgba(228, 64, 95, 0.12);
  color: #ffb4c4;
}

.settings-api-selector-icon-shell-linkedin {
  background: rgba(10, 102, 194, 0.16);
  color: #a8d0ff;
}

.settings-api-selector-icon-shell-youtube {
  background: rgba(255, 0, 51, 0.12);
  color: #ffb2c2;
}

.settings-api-selector-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.settings-api-selector-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #d4d4d4;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.settings-api-selector-chip-ready {
  border-color: rgba(98, 187, 255, 0.24);
  background: rgba(98, 187, 255, 0.14);
  color: #e6f4ff;
}

.settings-api-selector-chip-muted {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #c2c2c2;
}

.settings-api-domain-shell {
  width: 100%;
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
}

.settings-api-domain-panel {
  display: flex;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 0;
}

.settings-api-workspace-shell {
  display: grid;
  grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
  gap: 18px;
  width: 100%;
  min-width: 0;
  min-height: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.settings-api-workspace-rail {
  position: sticky;
  top: 0;
  align-self: start;
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--app-border);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 30%),
    linear-gradient(180deg, #171717 0%, #101010 100%);
  max-width: 100%;
  box-sizing: border-box;
}

.settings-api-rail-header {
  display: grid;
  gap: 6px;
}

.settings-api-rail-eyebrow {
  color: var(--app-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.settings-api-rail-title {
  color: #f4f4f4;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.2;
}

.settings-api-rail-subtitle {
  color: #a7a7a7;
  font-size: 0.86rem;
  line-height: 1.55;
}

.settings-api-workspace-rail-list {
  display: grid;
  gap: 12px;
}

.settings-api-workspace-selector-active {
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.24);
}

.settings-api-workspace-selector-instagram.settings-api-workspace-selector-active {
  border-color: rgba(228, 64, 95, 0.24);
  background:
    radial-gradient(circle at top right, rgba(228, 64, 95, 0.14) 0%, rgba(228, 64, 95, 0) 34%),
    linear-gradient(180deg, #191415 0%, #111111 100%);
}

.settings-api-workspace-selector-linkedin.settings-api-workspace-selector-active {
  border-color: rgba(10, 102, 194, 0.28);
  background:
    radial-gradient(circle at top right, rgba(10, 102, 194, 0.16) 0%, rgba(10, 102, 194, 0) 34%),
    linear-gradient(180deg, #15181c 0%, #101113 100%);
}

.settings-api-workspace-selector-youtube.settings-api-workspace-selector-active {
  border-color: rgba(255, 0, 51, 0.24);
  background:
    radial-gradient(circle at top right, rgba(255, 0, 51, 0.14) 0%, rgba(255, 0, 51, 0) 34%),
    linear-gradient(180deg, #1a1416 0%, #111111 100%);
}

.settings-api-workspace-stage {
  width: 100%;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  overflow: hidden;
}

.settings-api-panel,
.settings-api-domain-panel-mailing {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--app-border);
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 30%),
    linear-gradient(180deg, #181818 0%, #111111 100%);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
  overflow: hidden;
}

.settings-api-panel-instagram {
  border-color: rgba(228, 64, 95, 0.16);
}

.settings-api-panel-linkedin {
  border-color: rgba(10, 102, 194, 0.18);
}

.settings-api-panel-youtube {
  border-color: rgba(255, 0, 51, 0.16);
}

.settings-api-domain-panel-mailing {
  border-color: rgba(255, 255, 255, 0.08);
}

.settings-api-workspace-hero {
  display: grid;
  gap: 18px;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.settings-api-workspace-hero-instagram {
  border-color: transparent;
}

.settings-api-workspace-hero-linkedin {
  border-color: transparent;
}

.settings-api-workspace-hero-youtube {
  border-color: transparent;
}

.settings-api-workspace-hero-mailing {
  border-color: transparent;
}

.settings-api-workspace-header {
  margin: 0;
  gap: 18px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.settings-api-workspace-copy {
  gap: 8px;
  margin: 0;
}

.settings-api-workspace-title-row {
  margin: 0;
  gap: 16px;
  align-items: center;
}

.settings-api-workspace-eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.settings-api-workspace-eyebrow-instagram {
  background: rgba(228, 64, 95, 0.14);
  color: #ffb4c4;
}

.settings-api-workspace-eyebrow-linkedin {
  background: rgba(10, 102, 194, 0.18);
  color: #a8d0ff;
}

.settings-api-workspace-eyebrow-youtube {
  background: rgba(255, 0, 51, 0.14);
  color: #ffb2c2;
}

.settings-api-workspace-eyebrow-mailing {
  background: rgba(255, 255, 255, 0.08);
  color: #e0e0e0;
}

.settings-api-workspace-title {
  margin: 0;
  font-size: 1.38rem;
  line-height: 1.15;
}

.settings-api-workspace-subtitle {
  max-width: 72ch;
  overflow-wrap: anywhere;
}

.settings-api-workspace-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.settings-api-workspace-chip,
.settings-api-workspace-chip.media-stat-chip {
  min-height: auto;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: rgba(255, 255, 255, 0.72);
  font-size: var(--lumo-font-size-s);
  font-weight: 600;
  line-height: 1.3;
}

.settings-api-add-button {
  flex-shrink: 0;
}

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

.settings-api-insight-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.settings-api-insight-label {
  color: var(--app-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.settings-api-insight-value {
  color: #f1f1f1;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.settings-api-accounts-shell {
  display: grid;
  gap: 14px;
  width: 100%;
  min-width: 0;
  padding: 18px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-right: none;
  border-bottom: none;
  border-left: none;
  border-radius: 0;
  background: transparent;
}

.settings-api-section-header {
  display: grid;
  gap: 4px;
}

.settings-api-section-title {
  color: #f4f4f4;
  font-size: 1rem;
  font-weight: 700;
}

.settings-api-mailing-empty-state {
  max-width: 560px;
}

.settings-api-account-grid {
  width: 100%;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  max-width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.settings-account-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
  max-width: 100%;
  padding: 18px 20px;
  background: transparent;
  box-sizing: border-box;
}

.settings-account-row + .settings-account-row {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.settings-account-row-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
  flex: 1 1 auto;
}

.settings-account-row-title {
  color: #f4f4f4;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.2;
}

.settings-account-row-subtitle {
  color: var(--app-muted);
  font-size: 0.79rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.settings-account-row-summary {
  color: #d7d7d7;
  font-size: 0.88rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.settings-account-row-detail {
  color: #9d9d9d;
  font-size: 0.82rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.settings-account-row-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
  align-self: center;
}

.settings-account-row-status {
  white-space: nowrap;
}

.settings-account-row-action {
  min-height: 36px;
  padding-inline: 14px;
  border-radius: 999px;
}

.settings-api-account-grid .posts-empty-state {
  margin: 18px;
}

.media-heading {
  gap: 2px;
  min-width: 0;
}

.media-heading-row {
  margin: 0;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.media-title {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: 0.2px;
}

.media-subtitle {
  color: var(--app-muted);
  font-size: var(--lumo-font-size-s);
}

.settings-api-heading {
  gap: 4px;
}

.settings-api-title-row {
  margin: 0;
  gap: 16px;
  align-items: center;
}

.settings-api-overview-stat {
  color: var(--app-muted);
  font-size: var(--lumo-font-size-s);
  font-weight: 600;
  line-height: 1.3;
  text-align: right;
  white-space: nowrap;
}

.media-stat-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
  max-width: 100%;
}

.media-stat-group > * {
  max-width: 100%;
}

.media-stat-chip {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  max-width: 100%;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--app-border-strong);
  background: var(--app-surface-1);
  font-size: var(--lumo-font-size-s);
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
}

.media-selection-meta,
.media-results-meta {
  display: inline-flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}

.media-selection-meta {
  min-width: fit-content;
  padding-inline-end: 4px;
}

.media-results-footer {
  margin: 0;
  padding: 0 4px 2px;
  min-height: 20px;
}

.media-filter-row,
.media-action-row {
  margin: 0;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.media-action-row {
  align-items: center;
  padding: 14px;
  border: 1px solid var(--app-border);
  border-radius: 16px;
  background: linear-gradient(180deg, #151515 0%, #111111 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.media-storage-action-row {
  width: 100%;
  box-sizing: border-box;
  align-items: center;
}

.media-storage-action-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--app-border);
  border-radius: 20px;
  background: linear-gradient(180deg, #161616 0%, #111111 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  box-sizing: border-box;
}

.media-storage-action-panel .media-action-row {
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.media-storage-primary-row .media-search-field {
  flex: 1 1 320px;
  min-width: 280px;
}

.media-storage-folder-row .media-folder-create-field {
  flex: 1 1 320px;
  min-width: 240px;
}

.media-storage-primary-row .media-upload {
  flex: 0 1 auto;
}

.media-storage-bulk-row {
  justify-content: flex-start;
}

.media-storage-bulk-row .media-week-picker {
  width: 140px !important;
  min-width: 140px;
}

.media-storage-bulk-row .media-folder-bulk-field {
  width: 220px !important;
  min-width: 220px;
}

.media-action-row > * {
  margin: 0;
  max-width: 100%;
}

.posts-archive-toggle.active {
  border-color: #5b5b5b;
  background: linear-gradient(180deg, #f7f7f7 0%, #d6d6d6 100%);
  color: #0f0f0f;
}

.posts-filter-row {
  min-width: 0;
  margin: 0;
  gap: 10px;
}

.posts-title-row {
  margin: 0;
  gap: 10px;
}

.posts-title-copy {
  gap: 0;
}

.posts-heading-toggle {
  flex-shrink: 0;
}

.posts-filter-search,
.posts-filter-category,
.posts-filter-channel {
  min-width: 0;
}

.posts-filters-stack {
  gap: 8px;
}

.posts-primary-filter-row,
.posts-secondary-filter-row {
  min-width: 0;
}

.posts-primary-filter-row {
  flex-wrap: nowrap;
}

.posts-secondary-filter-row {
  margin: 0;
  gap: 10px;
}

.posts-secondary-filter-row > * {
  min-width: 0;
}

.posts-filter-action-button {
  white-space: nowrap;
}

.posts-primary-filter-row .posts-filter-search {
  flex: 1 1 300px;
}

.posts-secondary-filter-row .posts-filter-category,
.posts-secondary-filter-row .posts-filter-channel {
  flex: 1 1 0;
}

.post-ai-action-row {
  margin: 0;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
  justify-content: flex-end;
}

.post-ai-generate-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: linear-gradient(180deg, #191919 0%, #141414 100%);
  color: #d8d8d8;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}

.post-ai-generate-button:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: linear-gradient(180deg, #202020 0%, #161616 100%);
}

.post-ai-generate-button:active {
  transform: translateY(1px);
}

.post-ai-generate-button[disabled],
.post-ai-generate-button.loading {
  opacity: 1;
  cursor: default;
}

.post-ai-generate-button::part(label) {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.post-ai-generate-button-content {
  gap: 10px;
}

.post-ai-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
}

.post-ai-action-icon-idle::before {
  content: "✦";
  font-size: 0.9rem;
  line-height: 1;
}

.post-ai-stop-button {
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: linear-gradient(180deg, #191919 0%, #141414 100%);
  color: #d8d8d8;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: border-color 120ms ease, background 120ms ease;
}

.post-ai-stop-button:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: linear-gradient(180deg, #202020 0%, #161616 100%);
}

.post-ai-stop-button[disabled] {
  opacity: 0.6;
}

.post-ai-stop-button vaadin-icon {
  width: 14px;
  height: 14px;
}

.post-ai-loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #f1f1f1;
  border-radius: 999px;
  animation: post-ai-spin 0.8s linear infinite;
}

.post-ai-loading-text {
  font-size: 0.84rem;
  letter-spacing: 0.01em;
}

@keyframes post-ai-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.media-upload {
  min-width: 370px;
}

.media-search-field {
  min-width: 280px;
}

.media-search-field::part(input-field) {
  min-height: 44px;
  border: 1px solid var(--app-border-strong);
  border-radius: 12px;
  background: #1b1b1b;
  box-shadow: none;
}

.media-search-field::part(value) {
  color: var(--app-text);
}

.media-search-field vaadin-icon {
  color: var(--app-input-icon);
}

.media-upload::part(primary-buttons) {
  padding: 0;
}

.media-upload::part(drop-label) {
  color: var(--app-muted);
  font-size: var(--lumo-font-size-s);
}

.media-upload::part(drop-label-icon) {
  color: var(--app-text);
}

.media-upload::part(upload-button) {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid #3a3a3a;
  border-radius: 12px;
  background: linear-gradient(180deg, #252525 0%, #1c1c1c 100%);
  color: #fff;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.media-upload::part(upload-button):hover {
  border-color: #4a4a4a;
  background: linear-gradient(180deg, #2d2d2d 0%, #222222 100%);
}

.media-upload::part(drop-label),
.media-upload::part(upload-button) {
  display: flex;
  align-items: center;
}

.media-upload[dragover-valid] {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.media-week-picker {
  min-width: 120px;
}

.media-week-picker::part(input-field) {
  min-height: 44px;
  border: 1px solid var(--app-border-strong);
  border-radius: 12px;
  background: #1b1b1b;
  box-shadow: none;
}

.media-action-row vaadin-button {
  min-height: 44px;
  padding-inline: 16px;
  border-radius: 12px;
  font-weight: 600;
}

.media-action-button::part(label),
.media-action-button-primary::part(label),
.media-action-button-danger::part(label) {
  line-height: 1;
}

.media-action-button {
  border: 1px solid var(--app-border-strong);
  background: #1b1b1b;
  color: #f4f4f4;
}

.media-action-button:hover {
  background: #232323;
  border-color: #525252;
}

.media-action-button-primary {
  border: 1px solid #5a5a5a;
  background: linear-gradient(180deg, #f5f5f5 0%, #d9d9d9 100%);
  color: #0f0f0f;
}

.media-action-button-primary:hover {
  background: linear-gradient(180deg, #ffffff 0%, #e5e5e5 100%);
}

.media-action-button-danger {
  border: 1px solid #4a4a4a;
  background: #181818;
  color: #ffefef;
}

.media-action-button-danger:hover {
  border-color: #7a4a4a;
  background: #221616;
  color: #ffffff;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
  gap: 14px;
  align-items: start;
  padding: 20px;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.media-main-row {
  overflow: hidden;
  min-width: 0;
}

.media-main-layout {
  min-width: 0;
  min-height: 0;
  gap: 16px;
  padding: 14px;
  box-sizing: border-box;
}

.media-main-layout > * {
  min-width: 0;
  min-height: 0;
}

.media-main-column {
  min-width: 0;
  min-height: 0;
}

.media-main-column > * {
  min-width: 0;
}

.media-preview-stage {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 8px 0 14px;
  padding: 18px;
  border: 1px solid var(--app-border);
  border-radius: 20px;
  background: linear-gradient(180deg, #171717 0%, #111111 100%);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  box-sizing: border-box;
}

.media-preview-stage-header {
  margin: 0;
  gap: 16px;
  align-items: flex-start;
}

.media-preview-stage-heading {
  gap: 4px;
  min-width: 0;
}

.media-preview-stage-heading > * {
  min-width: 0;
}

.media-preview-stage-eyebrow {
  color: #aeb5be;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.media-preview-stage-title {
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-preview-stage-meta {
  color: #9b9b9b;
  font-size: 0.8rem;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-preview-stage-actions {
  margin: 0;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.media-preview-stage-download {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: #f1f1f1;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 120ms ease, background 120ms ease;
}

.media-preview-stage-download:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

.media-preview-stage-close {
  width: 38px;
  min-width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: #f1f1f1;
}

.media-preview-stage-close:hover {
  background: rgba(255, 255, 255, 0.08);
}

.media-preview-stage-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 340px;
  padding: 12px;
  border-radius: 18px;
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01) 45%), #090909;
  overflow: hidden;
}

.media-preview-stage-asset {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  display: block;
  border-radius: 14px;
  background: #000;
}

.media-preview-stage-video {
  min-height: 320px;
}

.media-grid-scroller {
  min-width: 0;
}

.media-grid-scroller::part(content) {
  overflow-x: hidden;
  overflow-y: auto;
}

.posts-list-scroller::part(content) {
  overflow-x: hidden;
  overflow-y: auto;
}

.posts-list-scroller {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.posts-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  box-sizing: border-box;
  min-height: 100%;
}

.posts-main-layout {
  min-width: 0;
  gap: 16px;
  padding: 14px;
  box-sizing: border-box;
}

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

.posts-view-toggle {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
  padding: 5px;
  border: 1px solid var(--app-border);
  border-radius: 18px;
  background: #151515;
}

.posts-view-toggle-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 42px;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: #d4d4d4;
  white-space: nowrap;
}

.posts-view-toggle-button::part(label) {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.posts-view-toggle-button-labeled {
  min-width: 0;
  width: auto;
  padding: 0 14px;
}

.posts-view-toggle-button-labeled vaadin-icon {
  flex-shrink: 0;
}

.posts-view-toggle-button:hover {
  background: #202020;
  color: #fff;
}

.posts-view-toggle-button.active,
.posts-view-toggle-button:disabled {
  border-color: #5b5b5b;
  background: linear-gradient(180deg, #f7f7f7 0%, #d6d6d6 100%);
  color: #0f0f0f;
  opacity: 1;
  cursor: default;
}

.posts-calendar-mode {
  min-height: 100%;
  height: 100%;
  padding: 20px;
}

.posts-calendar {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1 1 auto;
  min-height: 100%;
  border: 1px solid var(--app-border);
  border-radius: 18px;
  background: linear-gradient(180deg, #161616 0%, #111111 100%);
  overflow: hidden;
}

.posts-calendar-grid-shell {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.posts-calendar-header {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  border-bottom: 1px solid var(--app-border);
  background: #141414;
}

.posts-calendar-corner {
  border-right: 1px solid var(--app-border);
  min-height: 56px;
}

.posts-calendar-day-headers {
  display: grid;
  grid-template-columns: repeat(var(--posts-day-count), minmax(140px, 1fr));
}

.posts-calendar-day-header {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 12px;
  border-right: 1px solid var(--app-border);
  color: #f3f3f3;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.posts-calendar-day-header:last-child {
  border-right: none;
}

.posts-calendar-body {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  min-height: min-content;
}

.posts-calendar-scroller {
  flex: 1 1 auto;
  min-height: 0;
}

.posts-calendar-scroller::part(content) {
  overflow: auto;
}

.posts-calendar-time-rail {
  position: relative;
  border-right: 1px solid var(--app-border);
  background: #101010;
}

.posts-calendar-time-label {
  position: absolute;
  right: 12px;
  color: #8f8f8f;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
}

.posts-calendar-days {
  display: grid;
  grid-template-columns: repeat(var(--posts-day-count), minmax(140px, 1fr));
  min-width: 0;
}

.posts-calendar-day-column {
  position: relative;
  border-right: 1px solid var(--app-border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0) 100%),
    #131313;
  transition: background-color 120ms ease, box-shadow 120ms ease;
}

.posts-calendar-day-column:last-child {
  border-right: none;
}

.posts-calendar-day-column.drop-target {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0) 100%),
    #171717;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.posts-calendar-grid-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
}

.posts-calendar-post-marker {
  position: absolute;
  left: 10px;
  right: 10px;
  min-height: 60px;
  padding: 10px 12px;
  border: 1px solid #5b5b5b;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(245, 245, 245, 0.12) 0%, rgba(255, 255, 255, 0.06) 100%), #1d1d1d;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 6px;
  overflow: hidden;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.posts-calendar-post-marker.dragging {
  opacity: 0.28;
}

.posts-calendar-post-marker:active {
  cursor: grabbing;
}

.posts-calendar-post-marker.drag-ghost {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  right: auto;
  pointer-events: none;
  opacity: 0.96;
  transform: translateY(-1px);
  border-color: #8a8a8a;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.38);
}

.posts-calendar-post-label {
  width: fit-content;
  min-width: 38px;
  padding: 3px 8px;
  border: 1px solid #7a7a7a;
  border-radius: 999px;
  background: linear-gradient(180deg, #f6f6f6 0%, #d7d7d7 100%);
  color: #101010;
  font-size: 0.76rem;
  text-align: center;
  font-weight: 700;
}

.posts-calendar-post-time {
  color: #f3f3f3;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.1;
}

.posts-calendar-post-meta {
  color: #bbbbbb;
  font-size: 0.72rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.posts-calendar-compact {
  display: none;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding: 14px 14px 12px;
  box-sizing: border-box;
}

.posts-calendar-compact-tab-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 10px;
  margin-bottom: 14px;
  scrollbar-width: thin;
}

.posts-calendar-compact-scroller {
  flex: 1 1 auto;
  min-height: 0;
}

.posts-calendar-compact-scroller::part(content) {
  overflow-x: hidden;
  overflow-y: auto;
}

.posts-calendar-compact-panels {
  min-height: 0;
  padding-right: 2px;
  box-sizing: border-box;
}

.posts-calendar-compact-tab-button {
  margin: 0;
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: #d8d8d8;
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
}

.posts-calendar-compact-tab-button:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
}

.posts-calendar-compact-tab-button.active {
  border-color: #5f5f5f;
  background: linear-gradient(180deg, #f7f7f7 0%, #d9d9d9 100%);
  color: #111111;
}

.posts-calendar-compact-tab-content {
  margin: 0;
  gap: 8px;
}

.posts-calendar-compact-tab-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.posts-calendar-compact-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  box-sizing: border-box;
}

.posts-calendar-compact-tab-button.active .posts-calendar-compact-tab-count {
  background: rgba(17, 17, 17, 0.12);
}

.posts-calendar-compact-day {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 0 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.posts-calendar-compact-day:first-child {
  padding-top: 0;
}

.posts-calendar-compact-day:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: none;
}

.posts-calendar-compact-day-panel[hidden] {
  display: none !important;
}

.posts-calendar-compact-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.posts-calendar-compact-day-label {
  color: #f4f4f4;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.posts-calendar-compact-day-count {
  min-height: 26px;
  padding-inline: 10px;
  font-size: 0.74rem;
}

.posts-calendar-compact-day-body {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  min-height: 0;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0.01) 100%), #121212;
}

.posts-calendar-compact-time-rail {
  border-right: 1px solid var(--app-border);
  background: #101010;
}

.posts-calendar-compact-time-label {
  right: 8px;
  font-size: 0.68rem;
}

.posts-calendar-compact-day-column {
  position: relative;
  min-width: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0%, rgba(255, 255, 255, 0) 100%),
    #141414;
}

.posts-calendar-compact-grid-line {
  background: rgba(255, 255, 255, 0.055);
}

.posts-calendar-compact-post-marker {
  left: 8px;
  right: 8px;
  min-height: 44px;
  padding: 7px 10px;
  border-radius: 12px;
  gap: 4px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
}

.posts-calendar-compact-post-marker .posts-calendar-post-label {
  min-width: 34px;
  padding: 2px 7px;
  font-size: 0.7rem;
}

.posts-calendar-compact-post-marker .posts-calendar-post-time {
  font-size: 0.76rem;
}

.posts-calendar-compact-post-marker .posts-calendar-post-meta {
  font-size: 0.66rem;
}

.post-card {
  display: grid;
  grid-template-columns: 8px 170px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  position: relative;
  border: 1px solid var(--app-border);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 28%),
    linear-gradient(180deg, #181818 0%, #111111 100%);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.24);
  overflow: hidden;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.post-card.archived {
  border-color: rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.025) 0%, rgba(255, 255, 255, 0) 28%),
    linear-gradient(180deg, #161616 0%, #101010 100%);
  cursor: default;
}

.post-card.archived .post-card-rail {
  background: linear-gradient(180deg, #a8a8a8 0%, #5d5d5d 100%);
}

.post-card.archived .post-card-meta,
.post-card.archived .post-card-body {
  filter: blur(6px);
  opacity: 0.26;
  pointer-events: none;
  user-select: none;
}

.post-card.dragging {
  opacity: 0.3;
}

.post-card:active {
  cursor: grabbing;
}

.post-card.drag-ghost {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  right: auto;
  pointer-events: none;
  opacity: 0.96;
  transform: rotate(-1deg);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.34);
  grid-template-columns: 8px minmax(0, auto);
  gap: 0;
  width: 160px !important;
  min-height: 0;
}

.post-card.drag-ghost .post-card-body,
.post-card.drag-ghost .post-card-info,
.post-card.drag-ghost .post-card-description-column {
  display: none;
}

.post-card.drag-ghost .post-card-meta {
  padding: 12px 14px;
  justify-content: center;
}

.post-card.drag-ghost .post-card-meta .post-chip:not(.post-chip-strong) {
  display: none;
}

.post-card-rail {
  background: linear-gradient(180deg, #f4f4f4 0%, #8f8f8f 100%);
}

.post-card-meta,
.post-card-body {
  margin: 0;
  padding: 16px 0;
  gap: 10px;
}

.post-card-meta {
  justify-content: center;
}

.post-card-body {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(320px, 1fr);
  gap: 20px;
  padding: 14px 18px 14px 0;
  align-items: stretch;
}

.post-card-info,
.post-card-description-column {
  margin: 0;
  gap: 10px;
}

.post-card-description-column {
  padding: 6px 6px 6px 18px;
}

.post-card-description-header {
  margin: 0;
}

.post-card-actions {
  margin: 0;
}

.post-card-action {
  min-width: 34px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: #f2f2f2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.post-card-action:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.post-card-action-archive.active {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.26);
  color: #ffffff;
}

.post-card-archived-actions {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.post-card-archived-actions .post-card-action {
  pointer-events: none;
  opacity: 0.35;
}

.post-card-archived-actions .post-card-action-archive {
  pointer-events: auto;
  opacity: 1;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.post-card-archived-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(10, 10, 10, 0.16) 0%, rgba(10, 10, 10, 0.24) 100%);
}

.post-card-archived-overlay span {
  color: rgba(255, 255, 255, 0.14);
  font-size: 144px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
}

@media (max-width: 1380px) {
  .posts-heading-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 8px 12px;
  }

  .posts-heading {
    gap: 0;
  }

  .posts-title-row {
    gap: 8px;
  }

  .posts-page-title {
    font-size: 1.28rem;
    line-height: 1.04;
  }

  .posts-page-subtitle {
    font-size: 0.84rem;
    line-height: 1.35;
  }

  .posts-heading-row .posts-stat-group {
    width: auto;
    justify-content: flex-end;
    align-self: start;
  }

  .posts-results-chip {
    min-height: 34px;
    padding: 5px 11px;
    font-size: 0.82rem;
  }

  .posts-primary-filter-row {
    gap: 8px;
  }

  .posts-secondary-filter-row {
    gap: 8px;
  }

  .posts-filter-search,
  .posts-filter-category,
  .posts-filter-channel {
    width: auto !important;
  }

  .posts-filter-category,
  .posts-filter-channel {
    max-width: 220px;
  }

  .posts-filter-action-button {
    min-height: 38px;
    padding-inline: 12px;
  }

  .posts-filter-search::part(input-field),
  .posts-filter-category::part(input-field),
  .posts-filter-channel::part(input-field) {
    min-height: 38px;
  }

  .post-card {
    grid-template-columns: 8px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 16px;
    row-gap: 0;
  }

  .post-card-rail {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .post-card-meta {
    grid-column: 2;
    grid-row: 1;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    padding: 16px 18px 0 0;
  }

  .post-card-body {
    grid-column: 2;
    grid-row: 2;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    padding: 10px 18px 18px 0;
  }

  .post-card-description-column {
    order: -1;
    padding: 0;
  }

  .post-card-description-header {
    position: relative;
    flex-wrap: nowrap;
    align-items: flex-start;
    min-height: 34px;
    padding-right: 132px;
  }

  .post-card-actions {
    position: absolute;
    top: 0;
    right: 0;
    width: auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
  }

  .post-card-archived-overlay span {
    font-size: 112px;
  }
}

@media (max-width: 1180px) {
  .posts-calendar-mode {
    padding: 14px;
  }

  .posts-calendar-grid-shell {
    display: none;
  }

  .posts-calendar-compact {
    display: flex;
    flex-direction: column;
  }

  .posts-main-layout {
    flex-direction: column;
  }

  .posts-main-layout .posts-left-rail {
    width: 100%;
    min-width: 0;
    border-right: none;
    border-bottom: 1px solid var(--app-border);
  }

  .posts-main-layout .posts-left-rail.collapsed {
    width: 100%;
    min-width: 0;
  }

  .posts-main-layout .posts-left-rail-header {
    display: none;
  }

  .posts-main-layout .posts-rail-toggle {
    display: flex;
  }

  .posts-main-layout .posts-left-rail.collapsed .posts-rail-toggle {
    display: flex;
  }

  .posts-main-layout .posts-rail-section {
    display: none;
  }

  .posts-main-layout .posts-left-rail[data-active-rail="month"] .posts-rail-section-month {
    display: block;
  }

  .posts-main-layout .posts-left-rail[data-active-rail="weeks"] .posts-rail-section-weeks {
    display: flex;
  }

  .posts-main-layout .posts-mini-calendar-nav {
    padding: 10px 12px 0;
  }

  .posts-main-layout .posts-mini-calendar-overview {
    flex-direction: row;
    flex-wrap: wrap;
    padding: 10px 12px 12px;
    border-bottom: none;
  }

  .posts-main-layout .posts-mini-calendar {
    flex: 1 1 220px;
    max-width: 320px;
    padding: 8px;
  }

  .posts-main-layout .posts-left-rail.collapsed .posts-mini-calendar-grid {
    display: grid;
  }

  .posts-main-layout .posts-left-rail.collapsed .posts-mini-calendar-title {
    margin-bottom: 8px;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-align: left;
  }

  .posts-main-layout .posts-left-rail.collapsed .posts-mini-calendar-title::after {
    content: none;
  }

  .posts-main-layout .posts-mini-calendar-overview .posts-mini-calendar:nth-child(n + 2) {
    display: none;
  }

  .posts-main-layout .posts-rail-section-weeks .media-week-scroller {
    height: 116px !important;
    max-height: 116px;
    min-height: 116px;
  }

  .posts-main-layout .posts-rail-section-weeks .media-week-scroller::part(content) {
    overflow-x: auto;
    overflow-y: hidden;
  }

  .posts-main-layout .posts-rail-section-weeks .media-week-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(112px, 1fr);
    grid-template-rows: repeat(2, minmax(0, auto));
    gap: 6px;
    align-items: start;
    padding: 10px 12px 12px;
    min-width: max-content;
  }

  .posts-main-layout .posts-rail-section-weeks .media-week-button {
    min-height: 34px;
    border-radius: 9px;
  }

  .posts-main-layout .posts-left-rail.collapsed .media-week-prefix {
    display: inline;
  }

  .posts-main-layout .posts-left-rail.collapsed .media-week-count {
    display: inline-flex;
  }

  .posts-main-layout .posts-left-rail.collapsed .media-unassigned-card {
    display: flex;
  }

  .posts-main-layout .posts-rail-section-weeks .media-week-button .media-week-content {
    gap: 6px;
    padding: 0 4px 0 8px;
  }

  .posts-main-layout .posts-rail-section-weeks .media-week-count {
    min-width: 22px;
    padding: 1px 6px;
    font-size: 0.68rem;
  }

  .posts-main-layout .posts-rail-section-weeks .media-week-button-week .media-week-content,
  .posts-main-layout .posts-rail-section-weeks .media-week-button-all .media-week-content {
    font-size: 0.78rem;
  }
}

@media (max-width: 980px) {
  .posts-calendar-compact {
    padding: 12px 12px 10px;
  }

  .posts-calendar-compact-tab-strip {
    gap: 6px;
    padding-bottom: 8px;
    margin-bottom: 12px;
  }

  .posts-calendar-compact-tab-button {
    min-height: 36px;
    padding: 0 10px;
  }

  .posts-calendar-compact-tab-label {
    font-size: 0.74rem;
  }

  .posts-calendar-compact-tab-count {
    min-width: 20px;
    height: 20px;
    font-size: 0.66rem;
  }

  .posts-calendar-compact-day {
    gap: 8px;
    padding: 0 0 12px;
    margin-bottom: 12px;
  }

  .posts-calendar-compact-day-body {
    grid-template-columns: 56px minmax(0, 1fr);
    border-radius: 14px;
  }

  .posts-calendar-compact-time-label {
    right: 6px;
    font-size: 0.64rem;
  }

  .posts-calendar-compact-post-marker {
    left: 6px;
    right: 6px;
    min-height: 40px;
    padding: 6px 8px;
  }

  .posts-calendar-compact-post-marker .posts-calendar-post-time {
    font-size: 0.72rem;
  }

  .posts-calendar-compact-post-marker .posts-calendar-post-meta {
    font-size: 0.62rem;
  }

  .posts-heading-row {
    gap: 6px 10px;
  }

  .posts-title-row {
    align-items: flex-start;
  }

  .posts-page-subtitle {
    font-size: 0.78rem;
  }

  .posts-primary-filter-row {
    gap: 8px;
  }

  .posts-secondary-filter-row {
    flex-wrap: wrap;
    gap: 8px;
  }

  .posts-secondary-filter-row .posts-filter-category,
  .posts-secondary-filter-row .posts-filter-channel {
    flex: 1 1 180px;
    max-width: none;
  }
}

vaadin-dialog-overlay[theme~="post-edit"]::part(content) {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  width: min(1880px, calc(100vw - 8px));
  max-width: calc(100vw - 8px);
  height: calc(100vh - 8px);
  max-height: calc(100vh - 8px);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0) 24%),
    linear-gradient(180deg, #232323 0%, #1b1b1b 100%);
  color: var(--app-text);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.46);
  overflow: hidden;
}

vaadin-dialog-overlay[theme~="post-edit"]::part(backdrop) {
  background: rgba(0, 0, 0, 0.72);
}

vaadin-dialog-overlay[theme~="post-edit"]::part(header) {
  padding: 22px 22px 8px;
  background: transparent;
}

vaadin-dialog-overlay[theme~="post-edit"]::part(title) {
  color: #f5f5f5;
  font-size: 1.15rem;
  font-weight: 700;
}

vaadin-dialog-overlay[theme~="post-edit"]::part(footer) {
  padding: 12px 22px 20px;
  background: linear-gradient(180deg, #1c1c1c 0%, #191919 100%);
  box-shadow: none;
  border-top: none;
}

.post-edit-content {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  padding: 8px 22px 14px;
  background: transparent;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  align-items: stretch;
}

.post-edit-workspace {
  display: grid;
  grid-template-columns: minmax(420px, 48%) minmax(0, 52%);
  grid-template-areas:
    "preview setup"
    "preview description"
    "preview prompt";
  column-gap: 26px;
  row-gap: 18px;
  width: 100%;
  min-height: 0;
  align-items: start;
  min-width: 0;
  overflow: visible;
  box-sizing: border-box;
}

.post-edit-compact-tab-bar {
  display: none;
  width: 100%;
  box-sizing: border-box;
  gap: 6px;
  align-items: center;
}

.post-edit-compact-tab-button {
  flex: 1 1 0;
  min-height: 40px;
  margin: 0;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #cfcfcf;
  font-weight: 600;
}

.post-edit-compact-tab-button:hover {
  color: #ffffff;
}

.post-edit-compact-tab-button.active {
  background: linear-gradient(180deg, #f7f7f7 0%, #d6d6d6 100%);
  color: #111111;
}

.post-edit-section {
  min-width: 0;
  max-width: 100%;
}

.post-edit-section-preview {
  grid-area: preview;
}

.post-edit-section-setup {
  grid-area: setup;
}

.post-edit-section-description {
  grid-area: description;
}

.post-edit-section-prompt {
  grid-area: prompt;
}

.post-edit-main-column {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.post-edit-setup {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.post-edit-media-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  min-height: 0;
  box-sizing: border-box;
}

.post-edit-phone-preview-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
}

.post-edit-phone-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.post-edit-phone-screen {
  width: min(100%, 500px);
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 34px;
  background: linear-gradient(180deg, #232323 0%, #151515 100%);
  box-shadow: 0 26px 48px rgba(0, 0, 0, 0.34);
}

.post-edit-phone-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 24px;
  width: 100%;
  aspect-ratio: 9 / 16;
  min-height: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0) 100%),
    #101010;
}

.post-edit-phone-media::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  width: 34%;
  height: 18px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.36);
  z-index: 2;
}

.post-edit-phone-arrows {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  pointer-events: none;
}

.post-edit-phone-remove {
  position: absolute;
  top: 20px;
  right: 16px;
  z-index: 4;
  width: 34px;
  height: 34px;
  min-width: 34px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 15, 15, 0.62);
  color: #fff;
  backdrop-filter: blur(10px);
}

.post-edit-phone-remove:hover {
  background: rgba(25, 25, 25, 0.78);
}

.post-edit-phone-arrow {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 15, 15, 0.55);
  color: #fff;
  backdrop-filter: blur(10px);
  pointer-events: auto;
}

.post-edit-phone-arrow:hover {
  background: rgba(20, 20, 20, 0.72);
}

.post-edit-phone-arrow:disabled {
  opacity: 0.28;
}

.post-edit-phone-image,
.post-edit-phone-video {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  object-position: center;
  display: block;
  flex: 1 1 auto;
}

.post-edit-phone-video {
  display: block;
  background: #0c0c0c;
}

.post-edit-phone-empty {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: center;
  color: #b8b8b8;
}

.post-edit-phone-info {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  padding-top: 14px;
}

.post-edit-phone-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.post-edit-phone-dot {
  min-width: 10px;
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.22);
  cursor: pointer;
}

.post-edit-phone-dot.active {
  width: 22px;
  background: #ffffff;
}

.post-edit-setup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.post-edit-platform-tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  background: rgba(21, 21, 21, 0.92);
  box-sizing: border-box;
}

.post-edit-platform-tab-button {
  flex: 1 1 108px;
  min-height: 38px;
  margin: 0;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #cfcfcf;
  font-weight: 600;
}

.post-edit-platform-tab-button:hover {
  color: #ffffff;
}

.post-edit-platform-tab-button.active {
  background: linear-gradient(180deg, #f7f7f7 0%, #d6d6d6 100%);
  color: #111111;
}

.post-edit-account-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.post-edit-account-option {
  min-height: 40px;
  padding: 0 16px;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(20, 20, 20, 0.92);
  color: #d7d7d7;
  font-weight: 600;
}

.post-edit-account-option:hover {
  border-color: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.post-edit-account-option.selected {
  border-color: transparent;
  background: linear-gradient(180deg, #f7f7f7 0%, #d6d6d6 100%);
  color: #111111;
}

.post-edit-platform-content {
  width: 100%;
  min-width: 0;
}

.post-edit-platform-stack {
  display: grid;
  gap: 12px;
}

.post-edit-platform-placeholder p {
  margin: 0;
  color: #ababab;
  line-height: 1.6;
}

.post-edit-form,
.post-edit-panel,
.post-media-picker {
  padding: 20px 22px;
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0%, rgba(255, 255, 255, 0.012) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.post-edit-form {
  gap: 14px;
}

.post-edit-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.post-edit-editor-panel {
  min-height: 0;
}

.post-edit-channel-row {
  padding-top: 6px;
  gap: 10px;
}

.post-channel-toggle {
  width: 48px;
  min-width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: linear-gradient(180deg, #1b1b1b 0%, #141414 100%);
  color: #7d7d7d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease, transform 120ms ease;
}

.post-channel-toggle:hover {
  border-color: rgba(255, 255, 255, 0.16);
  color: #a7a7a7;
}

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

.post-channel-toggle.selected {
  border-color: rgba(98, 187, 255, 0.42);
  background: linear-gradient(180deg, rgba(98, 187, 255, 0.22) 0%, rgba(98, 187, 255, 0.12) 100%);
  color: #62bbff;
  box-shadow: 0 0 0 1px rgba(98, 187, 255, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.post-channel-toggle-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: grayscale(1) brightness(0.7);
  opacity: 0.78;
  transition: filter 120ms ease, opacity 120ms ease;
}

.post-channel-toggle.selected .post-channel-toggle-icon {
  filter: brightness(0) saturate(100%) invert(70%) sepia(54%) saturate(1913%) hue-rotate(176deg) brightness(102%) contrast(102%);
  opacity: 1;
}

.post-media-picker {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  height: 100%;
  align-self: stretch;
  width: 100%;
  max-width: 100%;
}

.post-media-picker-header {
  display: flex;
  align-items: stretch;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.post-media-picker-header .post-media-search {
  flex: 1 1 auto;
  min-width: 0;
}

.post-media-upload {
  flex: 0 0 min(320px, 38%);
  min-width: 220px;
}

.post-media-search::part(input-field) {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  background: #1f1f1f;
  box-shadow: none;
}

.post-media-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
  gap: 12px;
  min-height: 0;
  height: 100%;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.post-media-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 2px 4px 2px 0;
  min-height: 0;
  max-height: none;
  overflow: auto;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.post-media-item {
  margin: 0;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  background: #1e1e1e;
  color: #f1f1f1;
  text-align: left;
  justify-content: flex-start;
  align-items: flex-start;
  white-space: normal;
}

.post-media-item:hover,
.post-media-item.active {
  border-color: rgba(255, 255, 255, 0.16);
  background: #272727;
}

.post-media-item-text {
  width: 100%;
  min-width: 0;
  gap: 4px;
}

.post-media-item-name {
  display: block;
  color: #f4f4f4;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.post-media-item-type,
.post-media-item-meta {
  color: #a8a8a8;
  font-size: 0.74rem;
}

.post-media-preview {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border-radius: 18px;
  background: #1d1d1d;
  min-height: 0;
  height: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.post-edit-workspace > *,
.post-edit-main-column > *,
.post-edit-setup > *,
.post-edit-media-section > *,
.post-media-picker > * {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.post-media-preview.empty {
  justify-content: center;
  color: #a7a7a7;
}

.post-media-preview-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.post-media-preview-title {
  color: #f5f5f5;
  font-size: 0.92rem;
  font-weight: 600;
  word-break: break-word;
}

.post-media-preview-meta {
  color: #9f9f9f;
  font-size: 0.76rem;
}

.post-media-preview-image,
.post-media-preview-video {
  width: 100%;
  flex: 1 1 auto;
  min-height: 240px;
  object-fit: contain;
  border-radius: 14px;
  background: #111;
}

.post-media-preview-video {
  min-height: 220px;
  display: block;
}

.post-media-empty {
  padding: 16px;
  border-radius: 14px;
  background: #1c1c1c;
  color: #a7a7a7;
}

vaadin-dialog-overlay[theme~="post-edit"] vaadin-text-area::part(input-field),
vaadin-dialog-overlay[theme~="post-edit"] vaadin-date-time-picker::part(input-field) {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  background: #202020;
  box-shadow: none;
}

vaadin-dialog-overlay[theme~="post-edit"] vaadin-text-area.post-edit-editor-field {
  min-height: 0;
  height: 100%;
}

vaadin-dialog-overlay[theme~="post-edit"] vaadin-text-area.post-edit-editor-field::part(input-field) {
  min-height: 220px;
}

vaadin-dialog-overlay[theme~="post-edit"] vaadin-text-area.post-edit-tags-field {
  min-height: 170px;
}

vaadin-dialog-overlay[theme~="post-edit"] vaadin-text-area::part(label),
vaadin-dialog-overlay[theme~="post-edit"] vaadin-date-time-picker::part(label) {
  color: #c5c5c5;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

vaadin-dialog-overlay[theme~="post-edit"] vaadin-text-area::part(helper-text) {
  color: #919191;
}

vaadin-dialog-overlay[theme~="post-edit"] vaadin-checkbox {
  color: #efefef;
}

vaadin-dialog-overlay[theme~="post-edit"] vaadin-form-layout {
  row-gap: 14px;
}

vaadin-dialog-overlay[theme~="post-edit"] vaadin-text-area,
vaadin-dialog-overlay[theme~="post-edit"] vaadin-date-time-picker {
  width: 100%;
  min-width: 0;
}

vaadin-dialog-overlay[theme~="post-edit"] vaadin-button[theme~="primary"] {
  border: 1px solid #5e5e5e;
  border-radius: 12px;
  background: linear-gradient(180deg, #f2f2f2 0%, #d8d8d8 100%);
  color: #111;
}

vaadin-dialog-overlay[theme~="post-edit"] vaadin-button[theme~="primary"]:hover {
  background: linear-gradient(180deg, #ffffff 0%, #e3e3e3 100%);
}

vaadin-dialog-overlay[theme~="post-edit"] vaadin-button[theme~="tertiary"] {
  color: #d7d7d7;
}

@media (max-width: 1280px), (max-height: 820px) {
  .post-edit-workspace {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    row-gap: 14px;
  }

  .post-edit-compact-tab-bar {
    display: flex;
    flex: 0 0 auto;
    padding: 4px;
    margin-bottom: 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    background: rgba(21, 21, 21, 0.92);
    box-sizing: border-box;
  }

  .post-edit-compact-tab-button {
    justify-content: center;
  }

  .post-edit-section {
    width: 100%;
  }

  .post-edit-phone-screen {
    width: min(100%, 460px);
  }
}

@media (max-width: 960px) {
  .post-edit-content {
    padding: 8px 20px 16px;
  }

  .post-edit-setup-grid,
  .post-media-grid {
    grid-template-columns: 1fr;
  }

  .post-media-picker-header {
    flex-direction: column;
  }

  .post-media-upload {
    flex-basis: auto;
    width: 100%;
    min-width: 0;
  }
}

@media (max-height: 940px) {
  .post-edit-phone-screen {
    width: min(100%, 420px);
  }
}

@media (max-height: 840px) {
  vaadin-dialog-overlay[theme~="post-edit"]::part(header) {
    padding: 18px 18px 8px;
  }

  vaadin-dialog-overlay[theme~="post-edit"]::part(footer) {
    padding: 10px 18px 16px;
  }

  .post-edit-content {
    padding: 6px 18px 12px;
  }

  .post-edit-workspace {
    column-gap: 20px;
    row-gap: 14px;
  }

  .post-edit-phone-screen {
    width: min(100%, 360px);
    padding: 14px;
    border-radius: 28px;
  }

  .post-edit-phone-media {
    border-radius: 20px;
  }
}

@media (max-height: 720px) {
  vaadin-dialog-overlay[theme~="post-edit"]::part(content) {
    border-radius: 22px;
  }

  .post-edit-content {
    padding: 4px 14px 10px;
  }

  .post-edit-phone-screen {
    width: min(100%, 300px);
    padding: 12px;
    border-radius: 24px;
  }

  .post-edit-phone-media::before {
    top: 8px;
    height: 14px;
  }

  .post-edit-form,
  .post-edit-panel,
  .post-media-picker {
    padding: 16px 18px;
  }
}

.post-section-label {
  color: #a8a8a8;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.post-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.post-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid #343434;
  border-radius: 999px;
  background: #1f1f1f;
  color: #e8e8e8;
  font-size: 0.82rem;
  line-height: 1;
}

.post-chip-strong {
  border-color: #666;
  background: linear-gradient(180deg, #f5f5f5 0%, #d6d6d6 100%);
  color: #111;
  font-weight: 700;
}

.post-channel-chip {
  background: #222;
  color: #fff;
}

.post-hashtag-chip {
  background: rgba(255, 255, 255, 0.06);
  color: #d0d0d0;
}

.post-description {
  margin: 0;
  color: #f5f5f5;
  font-size: 1.02rem;
  line-height: 1.7;
  max-width: 100ch;
  white-space: pre-wrap;
}

.posts-empty-state {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 28px;
  border: 1px dashed var(--app-border-strong);
  border-radius: 16px;
  background: #141414;
  color: var(--app-muted);
}

.media-card {
  border: 1px solid var(--app-border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--app-surface-1);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
  position: relative;
}

.media-preview {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
  background: #000;
}

.media-video-preview {
  pointer-events: none;
}

.media-image-wrap {
  position: relative;
}

.media-image-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  opacity: 0;
  transition: opacity 140ms ease;
  pointer-events: none;
  z-index: 1;
}

.media-card-top-actions {
  position: absolute;
  top: 12px;
  left: 56px;
  right: 12px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
  z-index: 2;
}

.media-type-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(8, 8, 8, 0.68);
  color: rgba(255, 255, 255, 0.92);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
  pointer-events: none;
  z-index: 2;
}

.media-type-badge vaadin-icon {
  width: 13px;
  height: 13px;
}

.media-select-action {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  min-width: 32px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(8, 8, 8, 0.72);
  color: #ffffff;
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.media-select-action vaadin-icon,
.media-select-action svg {
  width: 14px;
  height: 14px;
  opacity: 0;
  transform: scale(0.75);
  transition: opacity 120ms ease, transform 120ms ease;
}

.media-select-action:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(14, 14, 14, 0.84);
  transform: translateY(-1px);
}

.media-select-action.selected {
  border-color: rgba(98, 187, 255, 0.9);
  background: linear-gradient(180deg, rgba(98, 187, 255, 0.96) 0%, rgba(67, 154, 219, 0.96) 100%);
  box-shadow: 0 10px 24px rgba(21, 93, 140, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.media-select-action.selected vaadin-icon,
.media-select-action.selected svg {
  opacity: 1;
  transform: scale(1);
}

.media-card.selected {
  border-color: var(--app-accent);
  box-shadow: 0 0 0 1px rgba(98, 187, 255, 0.2), 0 20px 34px rgba(0, 0, 0, 0.24);
}

.media-card.dragging {
  opacity: 0.28;
}

.media-card.drag-ghost {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  right: auto;
  pointer-events: none;
  opacity: 0.96;
  transform: rotate(-1deg);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.34);
}

.media-card:hover .media-card-top-actions,
.media-card:focus-within .media-card-top-actions,
.media-card.selected .media-card-top-actions {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.media-card:hover .media-image-wrap::after,
.media-card:focus-within .media-image-wrap::after,
.media-card.selected .media-image-wrap::after {
  opacity: 1;
}

.media-icon-action {
  min-width: 36px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(8, 8, 8, 0.72);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.media-icon-action vaadin-icon,
.media-icon-action svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.media-icon-action:hover {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(14, 14, 14, 0.84);
  transform: translateY(-1px);
}

.media-icon-action:active,
.media-select-action:active {
  transform: translateY(0);
}

.media-icon-link {
  text-decoration: none;
}

.media-card-summary {
  padding: 8px 10px 10px;
  color: var(--app-muted);
  font-size: var(--lumo-font-size-xs);
  line-height: 1.25;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.media-empty-state {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border-radius: 14px;
  border: 1px dashed var(--app-border-strong);
  color: var(--app-muted);
  background: var(--app-surface-1);
}

@media (max-width: 1180px) {
  .media-main-layout {
    flex-direction: column;
  }

  .media-main-layout .posts-left-rail {
    width: 100%;
    min-width: 0;
    border-right: none;
    border-bottom: 1px solid var(--app-border);
  }

  .media-main-layout .posts-left-rail.collapsed {
    width: 100%;
    min-width: 0;
  }

  .media-main-layout .posts-left-rail-header {
    display: none;
  }

  .media-main-layout .posts-rail-toggle {
    display: flex;
  }

  .media-main-layout .posts-left-rail.collapsed .posts-rail-toggle {
    display: flex;
  }

  .media-main-layout .posts-rail-section {
    display: none;
  }

  .media-main-layout .posts-left-rail[data-active-rail="calendar"] .posts-rail-section-calendar {
    display: flex;
    flex-direction: column;
  }

  .media-main-layout .posts-left-rail[data-active-rail="folders"] .posts-rail-section-folders {
    display: flex;
  }

  .media-main-layout .posts-mini-calendar-nav {
    padding: 10px 12px 0;
  }

  .media-main-layout .posts-mini-calendar-overview {
    flex-direction: row;
    flex-wrap: wrap;
    padding: 10px 12px 12px;
    border-bottom: none;
  }

  .media-main-layout .posts-mini-calendar {
    flex: 1 1 220px;
    max-width: 320px;
    padding: 8px;
  }

  .media-main-layout .posts-left-rail.collapsed .posts-mini-calendar-grid {
    display: grid;
  }

  .media-main-layout .posts-left-rail.collapsed .posts-mini-calendar-title {
    margin-bottom: 8px;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-align: left;
  }

  .media-main-layout .posts-left-rail.collapsed .posts-mini-calendar-title::after {
    content: none;
  }

  .media-main-layout .posts-mini-calendar-overview .posts-mini-calendar:nth-child(n + 2) {
    display: none;
  }

  .media-main-layout .posts-rail-section-calendar .media-week-scroller {
    height: 116px !important;
    max-height: 116px;
    min-height: 116px;
  }

  .media-main-layout .posts-rail-section-calendar .media-week-scroller::part(content) {
    overflow-x: auto;
    overflow-y: hidden;
  }

  .media-main-layout .posts-rail-section-calendar .media-week-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(112px, 1fr);
    grid-template-rows: repeat(2, minmax(0, auto));
    gap: 6px;
    align-items: start;
    padding: 10px 12px 12px;
    min-width: max-content;
  }

  .media-main-layout .posts-rail-section-calendar .media-week-button {
    min-height: 34px;
    border-radius: 9px;
  }

  .media-main-layout .posts-left-rail.collapsed .media-week-prefix {
    display: inline;
  }

  .media-main-layout .posts-left-rail.collapsed .media-week-count {
    display: inline-flex;
  }

  .media-main-layout .posts-left-rail.collapsed .media-unassigned-card {
    display: flex;
  }

  .media-main-layout .posts-rail-section-calendar .media-week-button .media-week-content {
    gap: 6px;
    padding: 0 4px 0 8px;
  }

  .media-main-layout .posts-rail-section-calendar .media-week-count {
    min-width: 22px;
    padding: 1px 6px;
    font-size: 0.68rem;
  }

  .media-main-layout .posts-rail-section-calendar .media-week-button-week .media-week-content,
  .media-main-layout .posts-rail-section-calendar .media-week-button-all .media-week-content {
    font-size: 0.78rem;
  }

  .media-main-layout .posts-rail-section-folders .media-folder-scroller {
    height: auto !important;
    max-height: none;
    min-height: 0;
  }

  .media-main-layout .posts-rail-section-folders .media-folder-scroller::part(content) {
    overflow-x: hidden;
    overflow-y: visible;
  }

  .media-main-layout .posts-rail-section-folders .media-folder-rail {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
    padding: 14px 12px 12px;
    min-width: 0;
  }

  .media-main-layout .posts-rail-section-folders .media-folder-button {
    min-height: 40px;
    border-radius: 12px;
  }

  .media-main-layout .posts-rail-section-folders .media-folder-tree {
    gap: 1px;
  }

  .media-main-layout .posts-rail-section-folders .media-explorer-row {
    padding-left: calc(var(--media-tree-depth, 0) * 14px);
  }

  .media-main-layout .posts-rail-section-folders .media-explorer-toggle,
  .media-main-layout .posts-rail-section-folders .media-explorer-toggle-placeholder {
    width: 24px;
    min-width: 24px;
    height: 24px;
  }

  .media-main-layout .posts-rail-section-folders .media-folder-explorer-header {
    gap: 10px;
  }

  .media-main-layout .posts-rail-section-folders .media-folder-nav-row {
    gap: 6px;
  }

  .media-main-layout .posts-rail-section-folders .media-folder-location-card {
    padding: 12px;
  }

  .media-main-layout .posts-rail-section-folders .media-folder-path-drop-zone {
    padding: 8px 10px;
  }

  .media-main-layout .posts-rail-section-folders .media-explorer-item-content {
    padding-right: 6px;
  }

  .media-main-layout .posts-rail-section-folders .media-explorer-toggle vaadin-icon {
    width: 16px;
    height: 16px;
  }

  .media-main-layout .posts-rail-section-folders .media-explorer-file-meta,
  .media-main-layout .posts-rail-section-folders .media-explorer-count {
    font-size: 0.68rem;
  }

  .media-preview-stage {
    margin: 8px 0 12px;
    padding: 14px;
  }

  .media-preview-stage-header {
    gap: 12px;
    flex-wrap: wrap;
  }

  .media-preview-stage-title,
  .media-preview-stage-meta {
    white-space: normal;
  }

  .media-preview-stage-body {
    min-height: 260px;
    padding: 10px;
  }

  .media-preview-stage-asset {
    max-height: 360px;
  }

  .media-storage-primary-row,
  .media-storage-bulk-row {
    flex-wrap: wrap;
  }

  .media-storage-primary-row .media-search-field {
    min-width: 0;
    width: auto !important;
  }

  .media-storage-primary-row .media-upload {
    min-width: 260px;
  }

  .media-storage-bulk-row .media-week-picker {
    width: auto !important;
    min-width: 140px;
  }

  .media-storage-action-panel .media-action-row vaadin-button {
    min-width: 0;
  }
}

@media (max-width: 1000px) {
  .media-content {
    padding: 14px;
  }

  .settings-api-title-row {
    gap: 12px;
  }

  .media-heading-row {
    gap: 12px;
  }

  .media-stat-group {
    width: 100%;
    justify-content: flex-start;
  }

  .media-grid {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  }
}

.dashboard-page {
  background: var(--app-bg);
  color: var(--app-text);
}

.dashboard-toolbar {
  padding: 10px 12px;
  justify-content: flex-end;
}

.dashboard-scroller::part(content) {
  overflow: auto;
}

.dashboard-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(280px, 1fr));
  gap: 18px;
  padding: 20px;
  align-items: start;
  box-sizing: border-box;
  min-width: 0;
}

.dashboard-column {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--app-border);
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--dashboard-platform-accent) 24%, transparent) 0%, transparent 22%),
    linear-gradient(180deg, #171717 0%, #101010 100%);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.22);
}

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

.dashboard-column-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--dashboard-platform-accent) 22%, #181818);
  color: #fff;
}

.dashboard-column-title-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.dashboard-column-title {
  font-size: 1rem;
  font-weight: 700;
}

.dashboard-column-subtitle {
  color: var(--app-muted);
  font-size: 0.78rem;
}

.dashboard-column-count {
  min-width: 34px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  text-align: center;
  font-weight: 700;
}

.dashboard-column-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dashboard-phone-shell {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dashboard-phone-topbar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 0 6px;
  color: var(--app-muted);
  font-size: 0.74rem;
  letter-spacing: 0.02em;
}

.dashboard-phone {
  position: relative;
  display: grid;
  grid-template-rows: minmax(260px, 340px) auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  background: linear-gradient(180deg, #222 0%, #141414 100%);
  overflow: hidden;
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.32);
}

.dashboard-phone::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  width: 34%;
  height: 18px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  z-index: 2;
}

.dashboard-phone-media {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0) 100%),
    #101010;
}

.dashboard-phone-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dashboard-phone-video-placeholder,
.dashboard-phone-media-fallback,
.dashboard-phone-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 100%;
  color: #e6e6e6;
  padding: 20px;
  text-align: center;
  box-sizing: border-box;
}

.dashboard-phone-video-placeholder {
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 44%),
    linear-gradient(180deg, #121212 0%, #0c0c0c 100%);
}

.dashboard-phone-video-placeholder vaadin-icon,
.dashboard-phone-media-fallback vaadin-icon,
.dashboard-phone-empty-state vaadin-icon {
  width: 34px;
  height: 34px;
}

.dashboard-phone-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 18px 20px;
  background: linear-gradient(180deg, rgba(24, 24, 24, 0.96) 0%, rgba(18, 18, 18, 1) 100%);
}

.dashboard-phone-countdown {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--dashboard-platform-accent) 22%, rgba(255, 255, 255, 0.04));
  border: 1px solid color-mix(in srgb, var(--dashboard-platform-accent) 48%, rgba(255, 255, 255, 0.08));
  color: #fff;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.dashboard-phone-description {
  margin: 0;
  color: #f4f4f4;
  font-size: 0.92rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.dashboard-phone-hashtags {
  color: #9ecbff;
  font-size: 0.8rem;
  line-height: 1.45;
}

.dashboard-phone-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dashboard-phone-chip {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: #ececec;
  font-size: 0.72rem;
}

.dashboard-phone-empty {
  grid-template-rows: minmax(420px, 1fr);
}

.ai-page {
  background: var(--app-bg);
  color: var(--app-text);
}

.ai-library-layout {
  min-height: 0;
}

.ai-library-rail {
  gap: 10px;
}

.ai-library-section-label {
  padding: 10px 6px 0;
  color: var(--app-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ai-library-content {
  min-width: 0;
}

.ai-prompt-list-description {
  display: block;
}

.ai-description-view {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
  box-sizing: border-box;
}

.ai-description-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ai-description-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ai-description-history {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.ai-prompt-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
  padding: 20px;
  box-sizing: border-box;
}

.ai-prompt-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--app-border);
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0) 24%),
    linear-gradient(180deg, #181818 0%, #121212 100%);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.22);
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.ai-prompt-card.dragging {
  opacity: 0.28;
}

.ai-prompt-card:active {
  cursor: grabbing;
}

.ai-prompt-card.drag-ghost {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  right: auto;
  pointer-events: none;
  opacity: 0.96;
  transform: rotate(-1deg);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.34);
}

.ai-prompt-header {
  margin: 0;
}

.ai-prompt-title {
  color: #f4f4f4;
  font-size: 1rem;
  font-weight: 700;
}

.ai-prompt-badge-active {
  border-color: rgba(98, 187, 255, 0.28);
  background: rgba(98, 187, 255, 0.14);
}

.ai-prompt-badge-inactive {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
}

.ai-prompt-preview {
  margin: 0;
  color: #d4d4d4;
  line-height: 1.5;
  white-space: pre-wrap;
}

.ai-prompt-output {
  margin: 0;
  color: #b8c7d6;
  line-height: 1.5;
  white-space: pre-wrap;
}

.content-category-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  padding: 20px;
  box-sizing: border-box;
}

.content-category-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--app-border);
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0) 24%),
    linear-gradient(180deg, #181818 0%, #121212 100%);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.22);
}

.content-category-header {
  gap: 14px;
  margin: 0;
}

.content-category-swatch {
  width: 22px;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.content-category-title-block {
  gap: 4px;
  margin: 0;
}

.mailing-list-grid-hint {
  padding-inline: 4px;
}

.mailing-list-import-upload {
  min-width: 0;
}

.mailing-list-import-upload::part(primary-buttons) {
  padding: 0;
}

.mailing-list-import-upload::part(drop-label),
.mailing-list-import-upload::part(file-list) {
  display: none;
}

.mailing-list-import-upload::part(upload-button) {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--app-border-strong);
  border-radius: 12px;
  background: #1b1b1b;
  color: var(--app-text);
  font-weight: 600;
  box-shadow: none;
}

.mailing-list-import-upload::part(upload-button):hover {
  border-color: #4a4a4a;
  background: #232323;
}

.mailing-list-grid-shell {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  border: 1px solid var(--app-border);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 28%),
    linear-gradient(180deg, #181818 0%, #111111 100%);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.24);
  overflow: hidden;
  box-sizing: border-box;
}

.mailing-list-grid {
  min-height: 0;
  background: transparent;
  --vaadin-grid-background: transparent;
  --vaadin-grid-cell-background: transparent;
  --vaadin-grid-header-background: #191919;
}

.mailing-list-grid::part(header-row) {
  background: linear-gradient(180deg, rgba(30, 30, 30, 0.98) 0%, rgba(24, 24, 24, 0.98) 100%);
}

.mailing-list-grid::part(first-header-row) {
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  overflow: hidden;
}

.mailing-list-grid::part(header-cell) {
  min-height: 54px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(30, 30, 30, 0.98) 0%, rgba(24, 24, 24, 0.98) 100%);
  color: var(--app-muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.mailing-list-grid::part(body-cell) {
  min-height: 78px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: transparent;
  color: var(--app-text);
  cursor: pointer;
}

.mailing-list-grid::part(row):hover {
  background: rgba(255, 255, 255, 0.025);
}

.mailing-list-grid::part(last-row-cell) {
  border-bottom: none;
}

.mailing-grid-contact,
.mailing-grid-updated {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px 0;
}

.mailing-grid-contact-title,
.mailing-grid-updated-primary {
  color: #f4f4f4;
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.2;
}

.mailing-grid-contact-meta,
.mailing-grid-updated-secondary {
  color: #a7a7a7;
  font-size: 0.8rem;
  line-height: 1.35;
}

.mailing-grid-chip {
  width: fit-content;
  max-width: 100%;
}

.mailing-grid-status-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.mailing-grid-chip-muted {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #bcbcbc;
}

.mailing-grid-status-chip {
  font-weight: 700;
}

.mailing-grid-status-chip-subscribed {
  border-color: rgba(98, 187, 255, 0.28);
  background: rgba(98, 187, 255, 0.14);
  color: #e6f4ff;
}

.mailing-grid-status-chip-unsubscribed {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: #d2d2d2;
}

.mailing-grid-formality-chip-formal {
  border-color: rgba(163, 208, 255, 0.2);
  background: rgba(163, 208, 255, 0.08);
  color: #d9ecff;
}

.mailing-grid-formality-chip-informal {
  border-color: rgba(255, 214, 153, 0.2);
  background: rgba(255, 214, 153, 0.08);
  color: #ffe3bf;
}

.mailing-grid-actions {
  margin: 0;
  gap: 8px;
  justify-content: flex-end;
}

.mailing-grid-action {
  min-height: 34px;
  padding-inline: 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.mailing-contact-groups-members,
.mailing-contact-groups-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}

.mailing-contact-groups-selected-label {
  padding-inline: 4px;
  margin-top: 4px;
}

.mailing-contact-groups-selected {
  min-height: 72px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.02) 100%);
}

.mailing-contact-groups-selected-empty {
  color: #a7a7a7;
  font-size: 0.82rem;
  line-height: 1.5;
}

.mailing-list-empty-state {
  align-self: center;
  width: min(520px, 100%);
  margin: auto;
  text-align: center;
}

.scheduled-mails-page {
  min-width: 0;
}

.scheduled-mails-filter-row {
  align-items: center;
}

.scheduled-mails-filter {
  min-width: 200px;
}

.scheduled-mails-list {
  padding-top: 10px;
}

.scheduled-mail-card {
  cursor: default;
  user-select: text;
  touch-action: auto;
}

.scheduled-mail-card:active {
  cursor: default;
}

.scheduled-mail-card.scheduled .post-card-rail {
  background: linear-gradient(180deg, #ffe2ab 0%, #d48a27 100%);
}

.scheduled-mail-card.without-date .post-card-rail {
  background: linear-gradient(180deg, #e4ebf7 0%, #71839b 100%);
}

.scheduled-mail-card.overdue .post-card-rail {
  background: linear-gradient(180deg, #ffc0af 0%, #c85f3d 100%);
}

.scheduled-mail-card.archived .post-card-rail {
  background: linear-gradient(180deg, #a8a8a8 0%, #5d5d5d 100%);
}

.scheduled-mail-card-design-action {
  min-width: auto;
  padding-inline: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.scheduled-mail-status-chip {
  width: fit-content;
  font-weight: 700;
}

.scheduled-mail-status-chip-scheduled {
  border-color: rgba(255, 209, 140, 0.28);
  background: rgba(255, 209, 140, 0.14);
  color: #fff2d3;
}

.scheduled-mail-status-chip-draft {
  border-color: rgba(173, 194, 219, 0.24);
  background: rgba(173, 194, 219, 0.12);
  color: #edf4ff;
}

.scheduled-mail-status-chip-archived {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: #d2d2d2;
}

.scheduled-mail-timing-chip,
.scheduled-mail-info-chip {
  width: fit-content;
  max-width: 100%;
}

.scheduled-mail-card-lifecycle {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.scheduled-mail-card-lifecycle-line {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.scheduled-mail-card-lifecycle-label {
  color: #9e9e9e;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.scheduled-mail-card-lifecycle-value {
  color: #d2d2d2;
  font-size: 0.84rem;
  line-height: 1.45;
}

.scheduled-mail-card-header {
  gap: 20px;
}

.scheduled-mail-card-title-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.scheduled-mail-card-title {
  color: #f5f5f5;
  font-size: 1.16rem;
  font-weight: 700;
  line-height: 1.25;
}

.scheduled-mail-card-subject {
  color: #bfbfbf;
  font-size: 0.92rem;
  line-height: 1.45;
}

.scheduled-mail-card-preview {
  margin-top: 6px;
}

.scheduled-mail-card-content {
  margin: 6px 0 0;
  color: #a8a8a8;
  font-size: 0.88rem;
  line-height: 1.65;
  white-space: pre-wrap;
}

.scheduled-mails-empty-state {
  align-self: center;
  width: min(620px, 100%);
  margin: auto;
  text-align: center;
}

.scheduled-mail-edit-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(300px, 0.95fr);
  gap: 18px;
  width: 100%;
  box-sizing: border-box;
}

.scheduled-mail-edit-shell > * {
  min-width: 0;
}

.scheduled-mail-edit-shell .post-edit-content,
.scheduled-mail-edit-recipients-panel {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.02);
  box-sizing: border-box;
}

.scheduled-mail-edit-shell .post-edit-content {
  gap: 14px;
}

.scheduled-mail-edit-recipients-panel {
  gap: 14px;
  align-self: start;
}

.scheduled-mail-edit-recipients-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.scheduled-mail-edit-recipients-header > :first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.scheduled-mail-edit-recipients-title,
.scheduled-mail-edit-picker-title {
  color: #f5f5f5;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
}

.scheduled-mail-edit-recipients-subtitle,
.scheduled-mail-edit-picker-subtitle {
  color: #a8a8a8;
  font-size: 0.84rem;
  line-height: 1.55;
}

.scheduled-mail-edit-recipients-stats,
.scheduled-mail-edit-picker-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.scheduled-mail-edit-recipients-list {
  display: grid;
  gap: 10px;
}

.scheduled-mail-recipient-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.scheduled-mail-recipient-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
}

.scheduled-mail-recipient-title {
  color: #f5f5f5;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.3;
}

.scheduled-mail-recipient-subtitle,
.scheduled-mail-recipient-meta {
  color: #a8a8a8;
  font-size: 0.82rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.scheduled-mail-recipient-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.scheduled-mail-recipient-remove {
  color: #dcdcdc;
}

.scheduled-mail-edit-recipients-empty,
.scheduled-mail-edit-picker-empty {
  width: 100%;
  margin: 0;
}

.scheduled-mail-edit-picker-shell {
  width: 100%;
  min-height: 0;
}

.scheduled-mail-contact-picker-grid {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}

.email-designer-page {
  gap: 12px;
  min-width: 0;
  padding: 10px 12px 12px;
  box-sizing: border-box;
}

.email-designer-page .media-heading-row {
  width: 100%;
  gap: 12px;
  flex-wrap: nowrap;
  align-items: flex-end;
}

.email-designer-page .media-heading {
  gap: 4px;
}

.email-designer-heading-actions {
  display: flex;
  gap: 10px;
  flex: 0 0 auto;
}

.email-designer-main {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 12px;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  padding: 0;
  box-sizing: border-box;
}

.email-designer-main.collapsed {
  grid-template-columns: 60px minmax(0, 1fr);
}

.email-designer-main > * {
  min-width: 0;
}

.email-designer-library,
.email-designer-studio {
  min-width: 0;
  min-height: 0;
  border: 1px solid var(--app-border);
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 28%),
    linear-gradient(180deg, #181818 0%, #111111 100%);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  transition: width 160ms ease, min-width 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.email-designer-library-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 14px 10px;
  box-sizing: border-box;
}

.email-designer-library-header-copy {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: wrap;
}

.email-designer-library-header .media-results-meta {
  padding: 3px 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.75rem;
  line-height: 1;
}

.email-designer-section-title {
  color: #f3f3f3;
  font-size: 1rem;
  font-weight: 700;
}

.email-designer-library-toggle {
  margin-inline-start: auto;
}

.email-designer-library.collapsed .email-designer-library-header {
  justify-content: center;
  padding: 14px 0;
}

.email-designer-library-search {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
  width: 100%;
  padding: 0 14px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-sizing: border-box;
}

.email-designer-library-search .email-designer-library-new-draft {
  width: 100%;
  justify-content: center;
}

.email-designer-library-search .email-designer-library-search-field {
  width: 100% !important;
  max-width: none;
}

.email-designer-library-scroller {
  min-width: 0;
  width: 100%;
}

.email-designer-library-scroller::part(content) {
  display: block;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
}

.email-designer-mail-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  min-width: 0;
  padding: 14px;
  box-sizing: border-box;
  min-height: 100%;
}

.email-designer-mail-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 14px;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055) 0%, rgba(255, 255, 255, 0.02) 100%);
  cursor: pointer;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.email-designer-mail-item:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.email-designer-mail-item.active {
  border-color: rgba(255, 223, 170, 0.38);
  background:
    linear-gradient(180deg, rgba(255, 210, 140, 0.18) 0%, rgba(255, 255, 255, 0.025) 100%);
  box-shadow: 0 16px 26px rgba(0, 0, 0, 0.18), inset 0 0 0 1px rgba(255, 229, 183, 0.1);
}

.email-designer-mail-item.archived {
  opacity: 0.72;
}

.email-designer-mail-item.draft {
  border-style: dashed;
}

.email-designer-mail-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.email-designer-mail-item-title {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  color: #f6f6f6;
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.email-designer-mail-item-chip {
  flex: 0 0 auto;
  align-self: flex-start;
  padding: 4px 9px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
}

.email-designer-mail-item-chip.theme-draft {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #e8e8e8;
}

.email-designer-mail-item-chip.theme-scheduled {
  border-color: rgba(98, 187, 255, 0.28);
  background: rgba(98, 187, 255, 0.14);
  color: #e0f2ff;
}

.email-designer-mail-item-chip.theme-archived {
  border-color: rgba(255, 223, 170, 0.24);
  background: rgba(255, 223, 170, 0.1);
  color: #ffe8bf;
}

.email-designer-mail-item-subject {
  display: -webkit-box;
  min-width: 0;
  color: #d1d1d1;
  font-size: 0.84rem;
  line-height: 1.45;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.email-designer-mail-item-meta {
  display: block;
  min-width: 0;
  color: #a5a5a5;
  font-size: 0.74rem;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.email-designer-library-empty {
  align-self: center;
  width: min(280px, 100%);
  margin: auto;
  text-align: center;
}

.email-designer-studio {
  display: flex;
  flex-direction: column;
}

.email-designer-workspace-header {
  padding: 18px 18px 10px;
}

.email-designer-workspace-title-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.email-designer-workspace-title {
  color: #f5f5f5;
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.2;
}

.email-designer-workspace-meta {
  color: #a7a7a7;
  font-size: 0.84rem;
  line-height: 1.45;
}

.email-designer-workspace-actions {
  margin: 0;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.email-designer-workspace-navigator {
  margin: 0 18px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.email-designer-tabs {
  display: flex;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-sizing: border-box;
  --lumo-primary-color-10pct: transparent;
  --lumo-primary-color-50pct: transparent;
  --lumo-contrast-10pct: transparent;
}

.email-designer-tabs::part(tabs) {
  gap: 10px;
  border: none;
  box-shadow: none;
  background: transparent;
}

.email-designer-pane-tabs::part(tabs) {
  gap: 4px;
}

vaadin-tab.email-designer-tab {
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border-radius: 22px;
  color: inherit;
}

.email-designer-tab-body {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid transparent;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  box-sizing: border-box;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: transform 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.email-designer-tab-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: #f7e2bc;
  flex: 0 0 auto;
}

.email-designer-tab-icon svg {
  width: 18px;
  height: 18px;
}

.email-designer-tab-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
  width: 100%;
}

.email-designer-tab-title {
  display: block;
  color: #f5f5f5;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.email-designer-tab-subtitle {
  display: block;
  color: #a8a8a8;
  font-size: 0.79rem;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

vaadin-tab.email-designer-tab::part(content),
vaadin-tab.email-designer-pane-tab::part(content) {
  padding: 0;
  width: 100%;
}

vaadin-tab.email-designer-tab::before,
vaadin-tab.email-designer-tab::after,
vaadin-tab.email-designer-pane-tab::before,
vaadin-tab.email-designer-pane-tab::after {
  display: none;
}

vaadin-tab.email-designer-tab:hover .email-designer-tab-body {
  background: rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

vaadin-tab.email-designer-tab[selected] .email-designer-tab-body {
  background: linear-gradient(180deg, rgba(255, 224, 177, 0.16) 0%, rgba(255, 255, 255, 0.05) 100%);
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.18),
    inset 0 0 0 1px rgba(255, 224, 177, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

vaadin-tab.email-designer-tab[selected] .email-designer-tab-icon {
  background: rgba(255, 244, 221, 0.16);
  color: #fff1d2;
}

vaadin-tab.email-designer-tab[selected] .email-designer-tab-subtitle {
  color: #ebdcc0;
}

.email-designer-workspace-content {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  padding-top: 14px;
}

.email-designer-workspace-content > * {
  min-width: 0;
  min-height: 0;
}

.email-designer-tab-view {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  min-height: 0;
}

.email-designer-tab-view-setup,
.email-designer-tab-view-recipients {
  overflow: auto;
}

.email-designer-tab-view-recipients {
  padding: 0 18px 22px;
  box-sizing: border-box;
}

.email-designer-tab-view-setup .email-designer-meta-form {
  margin: 0 18px 22px;
  padding: 20px 20px 22px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.025);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.email-designer-meta-form {
  row-gap: 20px;
  column-gap: 14px;
}

.email-designer-tab-view-email .email-designer-surface {
  max-width: none;
  margin: 0 18px 22px;
}

.email-designer-tab-view-recipients .email-designer-recipients-layout {
  margin: 0;
}

.email-designer-recipients-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.email-designer-recipients-layout > * {
  min-width: 0;
  min-height: 0;
}

.email-designer-recipients-panel {
  gap: 16px;
}

.email-designer-recipients-header {
  align-items: center;
}

.email-designer-recipients-list {
  gap: 12px;
}

.email-designer-recipients-overview {
  min-height: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.email-designer-recipients-overview-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 4px 4px 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.email-designer-recipients-overview-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 0 4px 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.email-designer-recipients-overview-search {
  flex: 1 1 220px;
  min-width: 180px;
}

.email-designer-recipients-overview-filter {
  flex: 1 1 150px;
  min-width: 140px;
  max-width: 180px;
}

.email-designer-recipients-overview-shell {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 440px;
  border-radius: 22px;
  overflow: hidden;
  box-sizing: border-box;
}

.email-designer-recipients-grid {
  min-height: 0;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.email-designer-recipients-grid::part(header-cell) {
  min-height: 48px;
  overflow: hidden;
}

.email-designer-recipients-grid::part(body-cell) {
  min-height: 68px;
  overflow: hidden;
}

.email-designer-recipients-grid .mailing-grid-contact,
.email-designer-recipients-grid .mailing-grid-status-group,
.email-designer-recipients-grid-action-shell {
  min-width: 0;
}

.email-designer-recipients-grid .mailing-grid-contact-title,
.email-designer-recipients-grid .mailing-grid-contact-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.email-designer-recipients-grid-action-shell {
  display: flex;
  justify-content: flex-end;
}

.email-designer-recipients-grid-action {
  min-height: 34px;
  padding-inline: 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.email-designer-recipients-overview-meta {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.email-designer-recipients-overview-empty {
  width: min(280px, 100%);
  margin: auto;
  text-align: center;
}

.email-designer-recipients-audience-chip-included {
  border-color: rgba(255, 224, 177, 0.22);
  background: rgba(255, 224, 177, 0.1);
  color: #ffe4b6;
}

.email-designer-recipients-audience-chip-available {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #bcbcbc;
}

.email-designer-send-planner {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 10px;
  padding: 16px 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  box-sizing: border-box;
}

.email-designer-send-planner.scheduled {
  border-color: rgba(255, 224, 177, 0.18);
  background: linear-gradient(180deg, rgba(255, 224, 177, 0.08), rgba(255, 255, 255, 0.03));
}

.email-designer-send-planner.past {
  border-color: rgba(255, 120, 120, 0.24);
}

.email-designer-send-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.email-designer-send-label {
  color: #f2f2f2;
  font-size: 0.86rem;
  font-weight: 700;
}

.email-designer-send-summary {
  color: #cfcfcf;
  font-size: 0.82rem;
  line-height: 1.35;
  text-align: right;
}

.email-designer-send-planner.scheduled .email-designer-send-summary {
  color: #fff2d3;
}

.email-designer-send-planner.past .email-designer-send-summary {
  color: #ffb6b6;
}

.email-designer-send-presets {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.email-designer-send-preset-group {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.email-designer-send-preset-label {
  color: #bdbdbd;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.email-designer-send-preset-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.email-designer-send-preset-button {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding-inline: 12px;
  border-radius: 8px;
  color: #dedede;
  font-size: 0.84rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.email-designer-send-preset-button::part(label) {
  overflow: hidden;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.email-designer-send-preset-button:hover,
.email-designer-send-preset-button.active {
  background: rgba(255, 224, 177, 0.15);
  box-shadow: inset 0 0 0 1px rgba(255, 224, 177, 0.22);
  color: #fff2d3;
}

.email-designer-send-custom-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.email-designer-send-custom-picker::part(input-field) {
  min-height: 40px;
  border-radius: 8px;
  background: rgba(10, 10, 10, 0.38);
}

.email-designer-send-clear {
  align-self: flex-end;
  min-height: 40px;
  border-radius: 8px;
  color: #cfcfcf;
}

.email-designer-surface {
  min-height: 0;
  flex: 1 1 auto;
  width: 100%;
  max-width: 1540px;
  margin: 0 auto;
  overflow: hidden;
  justify-content: center;
}

.email-designer-surface > * {
  min-width: 0;
}

.email-designer-pane {
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.email-designer-pane-preview {
  flex: 1 1 50%;
  min-height: 640px;
}

.email-designer-pane-code {
  flex: 1 1 50%;
  min-width: 0;
  max-width: none;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}

.email-designer-pane-tabs {
  display: flex;
  width: fit-content;
  margin: 8px 18px 0;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

vaadin-tab.email-designer-pane-tab {
  min-height: 30px;
  padding: 0 12px;
  border-radius: 6px;
  color: #a8a8a8;
  font-size: 0.8rem;
  font-weight: 700;
}

vaadin-tab.email-designer-pane-tab[selected] {
  background: rgba(98, 187, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(98, 187, 255, 0.18);
  color: #f2f2f2;
}

.email-designer-pane-content {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
}

.email-designer-pane-content > * {
  width: 100%;
  height: 100%;
}

.email-designer-pane-view {
  min-height: 0;
}

.email-designer-pane-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 18px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-sizing: border-box;
}

.email-designer-pane-title {
  color: #f2f2f2;
  font-size: 0.95rem;
  font-weight: 700;
}

.email-designer-pane-meta {
  color: #a8a8a8;
  font-size: 0.82rem;
  line-height: 1.5;
}

.email-designer-html-editor {
  margin: 14px 18px 18px;
  min-height: 320px;
}

.email-designer-pane-view-ai {
  padding: 0 0 18px;
  box-sizing: border-box;
}

.email-designer-ai-chat-scroller {
  min-height: 0;
}

.email-designer-ai-chat-scroller::part(content) {
  display: flex;
  min-height: 100%;
}

.email-designer-ai-chat-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 18px 8px;
  box-sizing: border-box;
}

.email-designer-ai-chat-empty {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.02);
  color: #181818;
  line-height: 1.55;
}

.email-designer-ai-chat-empty > span:first-child {
  color: #f2f2f2;
  font-weight: 700;
}

.email-designer-ai-chat-bubble {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: fit-content;
  max-width: min(100%, 520px);
  min-width: 0;
  padding: 14px 16px;
  border-radius: 20px;
  box-sizing: border-box;
}

.email-designer-ai-chat-bubble.assistant {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.email-designer-ai-chat-bubble.user {
  align-self: flex-end;
  background: rgba(255, 224, 177, 0.11);
  border: 1px solid rgba(255, 224, 177, 0.14);
}

.email-designer-ai-chat-bubble.loading {
  color: #cfcfcf;
}

.email-designer-ai-chat-bubble.html-applied {
  box-shadow: inset 0 0 0 1px rgba(255, 224, 177, 0.08);
}

.email-designer-ai-chat-role {
  color: #9e9e9e;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.email-designer-ai-chat-content {
  color: #f1f1f1;
  font-size: 0.9rem;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.email-designer-ai-chat-html-details {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: 4px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.email-designer-ai-chat-html-details::part(summary) {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #d9d9d9;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.5;
}

.email-designer-ai-chat-html-details::part(content) {
  padding-top: 10px;
}

.email-designer-ai-chat-html-code {
  margin: 0;
  padding: 12px 14px;
  max-height: 240px;
  overflow: auto;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: #ededed;
  font-family: "SFMono-Regular", "Cascadia Code", "IBM Plex Mono", Consolas, monospace;
  font-size: 0.77rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.email-designer-ai-chat-apply-note {
  color: #fff0ce;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.4;
}

.email-designer-ai-chat-composer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  box-sizing: border-box;
}

.email-designer-ai-chat-input-row {
  gap: 10px;
  align-items: center;
}

.email-designer-ai-chat-attach {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  min-width: 40px;
  padding: 0;
  border-radius: 8px;
}

.email-designer-ai-chat-input {
  flex: 1 1 auto;
  min-width: 0;
}

.email-designer-ai-chat-input::part(input-field) {
  min-height: 52px;
  padding-inline: 16px;
  border-radius: 18px;
  background: rgba(10, 10, 10, 0.42);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.email-designer-ai-chat-input::part(value) {
  font-size: 0.95rem;
}

.email-designer-ai-chat-send {
  flex: 0 0 auto;
  min-height: 40px;
  border-radius: 999px;
  white-space: nowrap;
}

.email-designer-ai-chat-send.generating {
  border-color: rgba(255, 255, 255, 0.14);
}

.email-designer-ai-chat-attachment-tray:empty {
  display: none;
}

.email-designer-ai-chat-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.email-designer-ai-chat-attachment-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(100%, 260px);
  min-width: 0;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  box-sizing: border-box;
}

.email-designer-ai-chat-attachment-thumb {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 6px;
  object-fit: cover;
  background: #111;
}

.email-designer-ai-chat-attachment-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 auto;
}

.email-designer-ai-chat-attachment-name {
  overflow: hidden;
  color: #f1f1f1;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.email-designer-ai-chat-attachment-meta {
  color: #a9a9a9;
  font-size: 0.72rem;
  line-height: 1.3;
}

.email-designer-ai-chat-attachment-remove {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  min-width: 28px;
  padding: 0;
  border-radius: 8px;
}

.email-designer-html-editor::part(input-field) {
  height: 100%;
  border-radius: 12px;
  background: rgba(10, 10, 10, 0.42);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.email-designer-html-editor::part(value) {
  font-family: "SFMono-Regular", "Cascadia Code", "IBM Plex Mono", Consolas, monospace;
  font-size: 0.83rem;
  line-height: 1.6;
  color: #efefef;
}

.email-designer-preview-toggle {
  display: inline-flex;
  gap: 4px;
  width: fit-content;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}

.email-designer-preview-mode-button {
  min-height: 28px;
  padding-inline: 12px;
  border-radius: 6px;
  color: #cfcfcf;
}

.email-designer-preview-mode-button.active {
  background: rgba(255, 224, 177, 0.12);
  color: #fff2d3;
}

.email-designer-preview-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  box-sizing: border-box;
  min-height: 0;
  min-width: 0;
  flex: 1 1 auto;
  background:
    linear-gradient(180deg, rgba(255, 249, 241, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
  overflow: auto;
  scrollbar-gutter: stable both-edges;
}

.email-designer-preview-stage {
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-height: 640px;
  min-width: 0;
  margin: 0 auto;
  padding: 12px;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.email-designer-preview-stage.mobile {
  width: min(100%, 430px);
}

.email-designer-preview-viewport {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 12px;
  box-sizing: border-box;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

@media (max-width: 1180px) {
  .dashboard-columns {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
  }

  .settings-api-domain-selector-grid,
  .settings-api-workspace-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-api-workspace-rail {
    position: static;
  }

  .settings-api-workspace-rail-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .settings-api-insight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ai-prompt-list {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }

  .ai-description-history {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }

  .content-category-list {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }

  .email-designer-main {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .email-designer-main.collapsed {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .email-designer-library-header {
    padding-inline: 16px;
  }

  .email-designer-library-search {
    padding-inline: 16px;
  }

  .email-designer-pane-preview {
    min-height: 640px;
  }

  .email-designer-preview-shell {
    padding: 20px;
  }

  .email-designer-preview-stage {
    min-height: 640px;
    padding: 14px;
  }
}

@media (max-width: 1040px) {
  .email-designer-page {
    height: auto !important;
    min-height: 100%;
    overflow: visible;
  }

  .email-designer-main,
  .email-designer-main.collapsed {
    grid-template-columns: minmax(0, 1fr);
    flex: 0 0 auto;
    overflow: visible;
  }

  .email-designer-library,
  .email-designer-library.collapsed {
    width: 100%;
    max-height: 300px;
  }

  .email-designer-library.collapsed .email-designer-library-header {
    justify-content: space-between;
    padding: 14px 16px;
  }

  .email-designer-studio,
  .email-designer-workspace-content,
  .email-designer-tab-view,
  .email-designer-tab-view-email {
    height: auto !important;
    overflow: visible;
  }

  .email-designer-surface {
    height: auto !important;
    overflow: visible;
  }

  .email-designer-workspace-header {
    flex-wrap: wrap;
  }
}

@media (max-width: 980px) {
  .email-designer-recipients-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .email-designer-recipients-overview-filters {
    padding-bottom: 10px;
  }

  .email-designer-recipients-overview-shell {
    min-height: 360px;
  }

  .email-designer-surface {
    flex-direction: column;
  }

  .email-designer-pane-code,
  .email-designer-pane-preview {
    width: 100% !important;
    flex: 0 0 auto;
  }

  .email-designer-pane-code {
    order: 1;
    min-height: 540px;
    border-left: none;
    border-top: none;
  }

  .email-designer-pane-preview {
    order: 2;
    min-height: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }

  .email-designer-pane-content,
  .email-designer-pane-view,
  .email-designer-pane-view-html {
    height: auto !important;
  }

  .email-designer-pane-view-ai {
    height: min(680px, 72vh) !important;
    min-height: 520px;
  }

  .email-designer-html-editor {
    min-height: 430px;
  }

  .email-designer-preview-stage {
    min-height: 560px;
  }
}

@media (max-width: 780px) {
  .dashboard-columns {
    grid-template-columns: minmax(0, 1fr);
    padding: 14px;
  }

  .settings-api-title-row {
    align-items: flex-start;
  }

  .settings-api-overview-stat {
    white-space: normal;
  }

  .settings-api-domain-selector-grid,
  .settings-api-workspace-rail-list,
  .settings-api-insight-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-api-domain-selector,
  .settings-api-workspace-selector,
  .settings-api-workspace-rail {
    padding: 16px;
    border-radius: 22px;
  }

  .settings-api-panel,
  .settings-api-domain-panel-mailing {
    padding: 16px;
    border-radius: 22px;
  }

  .settings-api-workspace-title-row {
    align-items: flex-start;
  }

  .settings-api-workspace-stats {
    justify-content: flex-start;
  }

  .settings-api-accounts-shell {
    padding-top: 16px;
  }

  .settings-api-workspace-title {
    font-size: 1.2rem;
  }

  .settings-api-account-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-account-row {
    flex-direction: column;
    align-items: stretch;
  }

  .settings-account-row-actions {
    justify-content: space-between;
    align-self: stretch;
  }

  .dashboard-phone {
    grid-template-rows: minmax(220px, 300px) auto;
  }

  .ai-library-layout {
    flex-direction: column;
  }

  .ai-library-layout vaadin-scroller.media-week-scroller {
    width: 100% !important;
    min-width: 0 !important;
    max-height: 220px;
  }

  .mailing-list-grid-shell {
    padding: 6px;
    border-radius: 20px;
  }

  .email-designer-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .email-designer-main.collapsed {
    grid-template-columns: minmax(0, 1fr);
  }

  .email-designer-library {
    max-height: 280px;
  }

  .email-designer-page .media-heading-row {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .email-designer-workspace-navigator {
    margin-inline: 18px;
  }

  .email-designer-pane-tabs {
    padding-inline: 18px;
  }

  .email-designer-pane-preview {
    min-height: 0;
  }

  .email-designer-surface {
    flex-direction: column;
  }

  .email-designer-pane-code {
    min-width: 0;
    border-left: none;
    border-top: none;
  }

  .email-designer-preview-shell {
    padding: 18px 18px 22px;
  }

  .email-designer-preview-stage {
    width: 100%;
    max-width: 100%;
    min-height: 500px;
    padding: 14px;
  }

  .email-designer-preview-viewport {
    padding: 12px;
  }

  .email-designer-workspace-header {
    padding: 18px;
  }

  .email-designer-tab-view-setup .email-designer-meta-form,
  .email-designer-tab-view-email .email-designer-surface {
    margin-inline: 18px;
  }

  .email-designer-tab-view-recipients {
    padding-inline: 18px;
  }

  .email-designer-ai-chat-composer {
    padding-inline: 18px;
  }

  .email-designer-ai-chat-messages {
    padding-inline: 18px;
  }

  .scheduled-mails-filter {
    min-width: 180px;
  }

  .mailing-grid-contact-title,
  .mailing-grid-updated-primary {
    font-size: 0.9rem;
  }

  .posts-view-toggle {
    width: 100%;
  }

  .posts-heading-toggle {
    width: auto;
  }

  .posts-view-toggle-button-labeled {
    flex: 1 1 0;
    justify-content: center;
  }
}

@media (max-width: 860px) {
  .scheduled-mail-card .post-card-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .scheduled-mail-card-header {
    gap: 12px;
  }

  .scheduled-mail-edit-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .scheduled-mail-recipient-row {
    flex-direction: column;
    align-items: stretch;
  }

  .scheduled-mail-recipient-actions {
    justify-content: space-between;
  }

  .email-designer-heading-actions {
    width: 100%;
  }

  .email-designer-heading-actions > * {
    flex: 1 1 0;
  }

  .email-designer-page {
    gap: 14px;
    padding: 12px;
  }

  .email-designer-page .media-heading-row {
    gap: 12px;
  }

  .email-designer-page .media-heading {
    width: 100%;
  }

  .email-designer-workspace-navigator {
    margin-inline: 14px;
    padding: 0;
    border-radius: 0;
  }

  .email-designer-pane-tabs {
    padding-inline: 14px;
  }

  .email-designer-workspace-header {
    align-items: flex-start;
    gap: 12px;
  }

  .email-designer-workspace-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .email-designer-tab-body {
    padding: 14px 15px;
    gap: 12px;
  }

  .email-designer-tab-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .email-designer-recipients-overview-search,
  .email-designer-recipients-overview-filter {
    flex: 1 1 100%;
    min-width: 0;
  }

  .email-designer-tab-view-setup .email-designer-meta-form,
  .email-designer-tab-view-email .email-designer-surface {
    margin-inline: 14px;
  }

  .email-designer-tab-view-recipients {
    padding-inline: 14px;
  }

  .email-designer-preview-shell {
    padding: 12px;
  }

  .email-designer-preview-stage {
    min-height: 460px;
    border-radius: 22px;
  }

  .email-designer-ai-chat-composer {
    align-items: stretch;
    padding-inline: 14px;
  }

  .email-designer-ai-chat-input-row {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .email-designer-ai-chat-send {
    flex: 0 0 auto;
  }

  .email-designer-ai-chat-messages {
    padding-inline: 14px;
  }
}

@media (max-width: 620px) {
  .email-designer-page {
    padding: 10px;
  }

  .email-designer-heading-actions {
    gap: 8px;
  }

  .email-designer-heading-actions > * {
    min-width: 0;
  }

  .email-designer-library,
  .email-designer-studio {
    border-radius: 18px;
  }

  .email-designer-library {
    max-height: 260px;
  }

  .email-designer-library-header {
    padding: 14px 14px 10px;
  }

  .email-designer-library-header .media-results-meta {
    font-size: 0.72rem;
  }

  .email-designer-library-search {
    padding: 0 14px 12px;
  }

  .email-designer-mail-list {
    gap: 8px;
    padding: 10px;
  }

  .email-designer-mail-item {
    padding: 12px;
    border-radius: 12px;
  }

  .email-designer-workspace-header,
  .email-designer-meta-form,
  .email-designer-pane-header {
    padding-inline: 14px;
  }

  .email-designer-workspace-title {
    font-size: 1.08rem;
  }

  .email-designer-send-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .email-designer-send-summary {
    text-align: left;
  }

  .email-designer-send-custom-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .email-designer-send-preset-group {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .email-designer-send-preset-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .email-designer-send-clear {
    width: 100%;
    justify-content: center;
  }

  .email-designer-workspace-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .email-designer-workspace-actions > * {
    width: 100%;
  }

  .email-designer-tabs,
  .email-designer-pane-tabs {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .email-designer-tabs::-webkit-scrollbar,
  .email-designer-pane-tabs::-webkit-scrollbar {
    display: none;
  }

  vaadin-tab.email-designer-tab {
    flex: 0 0 min(260px, calc(100vw - 88px));
  }

  vaadin-tab.email-designer-pane-tab {
    flex: 1 0 auto;
    justify-content: center;
  }

  .email-designer-pane-code {
    min-height: 500px;
  }

  .email-designer-pane-view-ai {
    height: 620px !important;
    min-height: 0;
  }

  .email-designer-html-editor {
    margin: 14px;
    min-height: 400px;
  }

  .email-designer-ai-chat-bubble {
    max-width: 100%;
    border-radius: 12px;
  }

  .email-designer-ai-chat-input-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 8px;
    align-items: stretch;
  }

  .email-designer-ai-chat-attach {
    width: 42px;
    min-width: 42px;
    height: 42px;
  }

  .email-designer-ai-chat-send {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 42px;
    justify-content: center;
  }

  .email-designer-ai-chat-attachment-chip {
    max-width: 100%;
    flex: 1 1 100%;
  }

  .email-designer-preview-shell {
    padding: 10px;
  }

  .email-designer-preview-stage {
    min-height: 420px;
    padding: 8px;
    border-radius: 14px;
  }

  .email-designer-preview-viewport {
    padding: 8px;
    border-radius: 12px;
  }
}

@media (max-width: 420px) {
  .email-designer-page {
    padding: 8px;
  }

  .email-designer-heading-actions,
  .email-designer-workspace-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .email-designer-heading-actions {
    display: grid;
  }

  .email-designer-library {
    max-height: 230px;
  }

  .email-designer-meta-form {
    padding: 12px;
  }

  .email-designer-send-preset-options {
    grid-template-columns: minmax(0, 1fr);
  }

  .email-designer-pane-header {
    padding: 14px 12px 12px;
  }

  .email-designer-pane-code {
    min-height: 460px;
  }

  .email-designer-html-editor {
    margin: 12px;
    min-height: 360px;
  }

  .email-designer-pane-view-ai {
    height: 580px !important;
  }

  .email-designer-ai-chat-messages {
    padding: 14px 12px 8px;
  }

  .email-designer-ai-chat-composer {
    padding: 12px 12px 0;
  }

  .email-designer-preview-stage {
    min-height: 360px;
  }
}

.admin-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.admin-preview-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 4px 0 28px;
}

.admin-preview-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--app-border);
  border-radius: 18px;
  background: linear-gradient(180deg, var(--app-surface-1) 0%, #131313 100%);
}

.admin-preview-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.admin-preview-platform {
  color: var(--app-muted);
  font-size: var(--lumo-font-size-s);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.admin-preview-status-ready,
.admin-preview-status-blocked {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: var(--lumo-font-size-s);
}

.admin-preview-status-ready {
  background: rgba(88, 196, 130, 0.18);
  color: #9be6b6;
}

.admin-preview-status-blocked {
  background: rgba(255, 99, 99, 0.16);
  color: #ffb0b0;
}

.admin-preview-title {
  margin: 0;
  font-size: 1.2rem;
}

.admin-preview-summary {
  color: var(--app-muted);
}

.admin-request-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-request-label {
  font-weight: 600;
}

.admin-request-endpoint {
  color: var(--app-muted);
  font-size: var(--lumo-font-size-s);
  word-break: break-all;
}

.calendar-page {
  min-width: 0;
}

.calendar-toolbar {
  width: 100%;
  box-sizing: border-box;
  padding: 14px;
  border: 1px solid var(--app-border);
  border-radius: 20px;
  background: linear-gradient(180deg, #171717 0%, #111111 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.calendar-main-layout {
  min-width: 0;
  gap: 14px;
}

.calendar-sidebar {
  box-sizing: border-box;
  padding: 14px;
  border: 1px solid var(--app-border);
  border-radius: 24px;
  background: linear-gradient(180deg, #171717 0%, #111111 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.calendar-sidebar-header {
  gap: 10px;
  padding-bottom: 12px;
}

.calendar-sidebar-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.1;
}

.calendar-sidebar-meta {
  color: var(--app-muted);
  font-size: 0.76rem;
  line-height: 1.25;
}

.calendar-sidebar-filters {
  gap: 8px;
}

.calendar-sidebar-filter-button {
  min-height: 34px;
  padding-inline: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.76rem;
  font-weight: 700;
}

.calendar-sidebar-filter-button:hover {
  background: rgba(255, 255, 255, 0.06);
}

.calendar-sidebar-filter-button.active {
  border-color: #5a5a5a;
  background: linear-gradient(180deg, #f5f5f5 0%, #d9d9d9 100%);
  color: #0f0f0f;
}

.calendar-sidebar-scroller {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.calendar-sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 0 2px;
}

.calendar-sidebar-post {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--calendar-post-outline-color, rgba(255, 255, 255, 0.06));
  border-radius: 16px;
  background: linear-gradient(180deg, #1b1b1b 0%, #141414 100%);
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.calendar-sidebar-post.draggable {
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.calendar-sidebar-post.dragging {
  opacity: 0.28;
}

.calendar-sidebar-post.drag-ghost {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  right: auto;
  pointer-events: none;
  opacity: 0.96;
  transform: rotate(-1deg);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.38);
}

.calendar-sidebar-post.scheduled.clickable {
  cursor: pointer;
}

.calendar-sidebar-post.draggable.clickable {
  cursor: grab;
}

.calendar-sidebar-post.scheduled.clickable:hover {
  background: linear-gradient(180deg, #202020 0%, #171717 100%);
}

.calendar-sidebar-post.draggable:active {
  cursor: grabbing;
}

.calendar-sidebar-post.scheduled.clickable:active {
  transform: translateY(1px);
}

.calendar-sidebar-post.selected {
  box-shadow: inset 0 0 0 1px rgba(245, 245, 245, 0.16);
}

.calendar-sidebar-post.archived {
  opacity: 0.7;
}

.calendar-sidebar-post-id {
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.66);
}

.calendar-sidebar-post-date {
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.25;
}

.calendar-sidebar-post-platforms {
  color: var(--app-muted);
  font-size: 0.74rem;
  line-height: 1.25;
}

.calendar-sidebar-post-description {
  color: #f4f4f4;
  font-size: 0.82rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.calendar-sidebar-post-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 22px;
}

.calendar-sidebar-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
}

.calendar-sidebar-badge-without-date {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.82);
}

.calendar-sidebar-badge-archived {
  background: rgba(255, 99, 99, 0.14);
  color: #ffb5b5;
}

.calendar-sidebar-empty {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  color: var(--app-muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.calendar-navigation-group {
  flex-wrap: wrap;
  gap: 8px;
}

.calendar-navigation-group vaadin-button {
  min-height: 40px;
}

.calendar-range-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.calendar-range-label {
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.calendar-range-meta {
  color: var(--app-muted);
  font-size: var(--lumo-font-size-s);
  line-height: 1.35;
}

.calendar-mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  padding: 4px;
  border-radius: 14px;
  border: 1px solid var(--app-border);
  background: #121212;
}

.calendar-mode-button {
  min-height: 38px;
  padding-inline: 14px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.72);
}

.calendar-mode-button:hover {
  background: rgba(255, 255, 255, 0.05);
}

.calendar-mode-button.active {
  border: 1px solid #5a5a5a;
  background: linear-gradient(180deg, #f5f5f5 0%, #d9d9d9 100%);
  color: #0f0f0f;
}

.calendar-surface {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  overflow: auto;
}

.calendar-surface > * {
  width: 100%;
  min-height: 0;
}

.calendar-month-shell,
.calendar-week-shell,
.calendar-year-shell {
  width: 100%;
  min-height: 0;
}

.calendar-month-shell {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calendar-month-weekday-row,
.calendar-month-grid {
  min-width: 980px;
}

.calendar-month-weekday-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.calendar-month-weekday {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--app-muted);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.calendar-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--app-border);
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.calendar-month-day {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 168px;
  padding: 12px;
  background: linear-gradient(180deg, #171717 0%, #111111 100%);
}

.calendar-month-day.outside-month {
  background: #121212;
  color: rgba(255, 255, 255, 0.44);
}

.calendar-month-day.today {
  box-shadow: inset 0 0 0 1px rgba(245, 245, 245, 0.22);
}

.calendar-month-day.selected {
  background: linear-gradient(180deg, #1f1f1f 0%, #151515 100%);
}

.calendar-month-day.calendar-drop-target-active {
  background: linear-gradient(180deg, #242424 0%, #181818 100%);
  box-shadow: inset 0 0 0 1px rgba(245, 245, 245, 0.16);
}

.calendar-month-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.calendar-day-number {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}

.calendar-day-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1;
}

.calendar-month-post-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.calendar-month-post,
.calendar-week-post {
  border: 1px solid var(--calendar-post-outline-color, rgba(255, 255, 255, 0.08));
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.calendar-month-post {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 12px;
}

.calendar-month-post.draggable,
.calendar-week-post.draggable {
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.calendar-month-post.dragging,
.calendar-week-post.dragging {
  opacity: 0.28;
}

.calendar-month-post:active,
.calendar-week-post:active {
  cursor: grabbing;
}

.calendar-month-post.drag-ghost,
.calendar-week-post.drag-ghost {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  right: auto;
  pointer-events: none;
  opacity: 0.96;
  transform: translateY(-1px);
  border-color: var(--calendar-post-outline-color, #8a8a8a);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.38);
}

.calendar-post-time {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.calendar-post-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.calendar-post-platform-icons {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
  flex: 0 0 auto;
}

.calendar-post-platform-icon {
  width: 12px;
  height: 12px;
  background: var(--app-accent);
  opacity: 0.92;
  -webkit-mask-image: var(--calendar-post-platform-icon);
  mask-image: var(--calendar-post-platform-icon);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.calendar-post-label {
  font-size: 0.82rem;
  line-height: 1.35;
  color: #f5f5f5;
  overflow-wrap: anywhere;
}

.calendar-month-more {
  color: var(--app-muted);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.3;
}

.calendar-week-shell {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.calendar-week-header,
.calendar-week-grid {
  min-width: 1120px;
}

.calendar-week-header {
  display: grid;
  grid-template-columns: 84px repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.calendar-week-header > div:first-child {
  min-height: 74px;
}

.calendar-week-day-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 74px;
  padding: 12px;
  border-radius: 16px;
  background: linear-gradient(180deg, #171717 0%, #111111 100%);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.calendar-week-day-header.today {
  box-shadow: inset 0 0 0 1px rgba(245, 245, 245, 0.2);
}

.calendar-week-day-header.selected {
  background: linear-gradient(180deg, #1d1d1d 0%, #141414 100%);
}

.calendar-week-day-name {
  color: var(--app-muted);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.calendar-week-day-date {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.1;
}

.calendar-week-day-count {
  color: var(--app-muted);
  font-size: 0.75rem;
  line-height: 1.25;
}

.calendar-week-scroller {
  flex: 1 1 auto;
  min-height: 0;
  border: 1px solid var(--app-border);
  border-radius: 24px;
  background: linear-gradient(180deg, #151515 0%, #101010 100%);
}

.calendar-week-grid {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  min-height: 100%;
}

.calendar-week-time-rail {
  position: relative;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, #141414 0%, #0f0f0f 100%);
}

.calendar-week-time-label {
  position: absolute;
  right: 14px;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.72rem;
  line-height: 1;
  letter-spacing: 0.04em;
}

.calendar-week-columns {
  display: grid;
  grid-template-columns: repeat(var(--calendar-week-day-count), minmax(0, 1fr));
  position: relative;
}

.calendar-week-day-column {
  position: relative;
  min-width: 0;
  background: linear-gradient(180deg, #161616 0%, #111111 100%);
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}

.calendar-week-day-column:first-child {
  border-left: none;
}

.calendar-week-day-column.calendar-drop-target-active {
  background: linear-gradient(180deg, #1d1d1d 0%, #151515 100%);
  box-shadow: inset 0 0 0 1px rgba(245, 245, 245, 0.12);
}

.calendar-week-grid-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
}

.calendar-week-post {
  position: absolute;
  left: 8px;
  right: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 58px;
  padding: 8px 10px;
  border-radius: 14px;
  z-index: 1;
}

.calendar-year-shell {
  display: flex;
  flex-direction: column;
}

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

.calendar-year-month {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid var(--app-border);
  background: linear-gradient(180deg, #171717 0%, #111111 100%);
}

.calendar-year-month.today {
  box-shadow: inset 0 0 0 1px rgba(245, 245, 245, 0.18);
}

.calendar-year-month.selected {
  background: linear-gradient(180deg, #1d1d1d 0%, #131313 100%);
}

.calendar-year-month-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.calendar-year-month-button {
  padding: 0;
  color: #f5f5f5;
  font-size: 1rem;
  font-weight: 700;
}

.calendar-year-month-button::part(label) {
  line-height: 1.1;
}

.calendar-year-month-summary {
  color: var(--app-muted);
  font-size: 0.76rem;
  line-height: 1.2;
  white-space: nowrap;
}

.calendar-year-weekday-row,
.calendar-year-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.calendar-year-weekday {
  display: inline-flex;
  justify-content: center;
  color: var(--app-muted);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

.calendar-year-day {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.78rem;
  line-height: 1;
}

.calendar-year-day.outside-month {
  opacity: 0.34;
}

.calendar-year-day.has-posts {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.calendar-year-day.today {
  background: linear-gradient(180deg, #f5f5f5 0%, #d9d9d9 100%);
  color: #0f0f0f;
}

.calendar-year-day.calendar-drop-target-active {
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.image-editor-heading-row {
  align-items: stretch;
  flex-wrap: nowrap;
}

.image-editor-heading-copy {
  min-width: 0;
  width: auto;
  flex: 1 1 auto;
}

.image-editor-heading-back-button {
  flex: 0 0 auto;
  align-self: stretch;
  min-height: 0;
  height: auto;
  padding-inline: 14px;
}

.image-editor-heading-back-button vaadin-icon,
.image-editor-heading-back-button::part(prefix) {
  margin: 0;
}

.image-editor-heading-export-button {
  flex: 0 0 auto;
  align-self: center;
  margin-left: auto;
}

.image-editor-workspace {
  display: grid;
  grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
  gap: 22px;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 12px 0 22px;
  align-items: stretch;
  box-sizing: border-box;
}

.image-editor-project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  width: 100%;
  align-content: start;
}

.image-editor-project-card {
  min-height: 172px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 34%),
    linear-gradient(180deg, rgba(24, 24, 24, 0.98) 0%, rgba(17, 17, 17, 0.96) 100%);
  color: inherit;
  text-align: left;
  box-shadow: 0 20px 34px rgba(0, 0, 0, 0.16);
}

.image-editor-project-card:hover {
  border-color: rgba(246, 231, 200, 0.18);
  background:
    radial-gradient(circle at top right, rgba(246, 231, 200, 0.08) 0%, rgba(255, 255, 255, 0) 34%),
    linear-gradient(180deg, rgba(31, 31, 31, 0.98) 0%, rgba(18, 18, 18, 0.96) 100%);
}

.image-editor-project-card::part(label) {
  width: 100%;
}

.image-editor-project-card-body {
  display: grid;
  align-content: start;
  gap: 10px;
  width: 100%;
  min-height: 172px;
  padding: 20px;
  box-sizing: border-box;
}

.image-editor-project-card-eyebrow {
  color: #d6bf8c;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.image-editor-project-card-title {
  color: #f5f5f5;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.25;
}

.image-editor-project-card-meta {
  color: #b2b2b2;
  font-size: 0.84rem;
  line-height: 1.45;
}

.image-editor-project-empty {
  display: grid;
  gap: 8px;
  padding: 28px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.02);
  color: #b3b3b3;
}

.image-editor-project-empty > :first-child {
  color: #f5f5f5;
  font-size: 1rem;
  font-weight: 700;
}

.image-editor-project-dialog-body {
  min-width: min(420px, calc(100vw - 64px));
  padding-top: 6px;
}

.image-editor-tool-rail {
  display: grid;
  align-content: stretch;
  min-height: 0;
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 26px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 30%),
    linear-gradient(180deg, rgba(24, 24, 24, 0.98) 0%, rgba(17, 17, 17, 0.96) 100%);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.24);
  box-sizing: border-box;
}

.image-editor-rail-main,
.image-editor-drawer-detail-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
  min-height: 0;
  min-width: 0;
}

.image-editor-rail-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.image-editor-rail-tab-button {
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0%, rgba(255, 255, 255, 0.02) 100%);
  color: #f6e7c8;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.image-editor-rail-tab-button:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075) 0%, rgba(255, 255, 255, 0.035) 100%);
  border-color: rgba(255, 255, 255, 0.1);
}

.image-editor-rail-tab-button.active {
  border-color: rgba(246, 231, 200, 0.28);
  background: linear-gradient(180deg, rgba(246, 231, 200, 0.16) 0%, rgba(246, 231, 200, 0.07) 100%);
  box-shadow: inset 0 0 0 1px rgba(246, 231, 200, 0.14);
}

.image-editor-rail-tab-button::part(label) {
  width: 100%;
  text-align: center;
}

.image-editor-rail-panels,
.image-editor-rail-panel {
  min-width: 0;
}

.image-editor-drawer-detail-header {
  display: flex;
  align-items: center;
  min-height: 36px;
}

.image-editor-drawer-back-button {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 12px;
}

.image-editor-drawer-back-icon {
  width: 16px;
  height: 16px;
}

.image-editor-drawer-detail-panels {
  display: grid;
  align-content: start;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.image-editor-tools-header-divider {
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0%, rgba(246, 231, 200, 0.18) 16%, rgba(246, 231, 200, 0.18) 84%, rgba(255, 255, 255, 0.02) 100%);
}

.image-editor-tools-body {
  display: grid;
  grid-template-columns: 72px 1px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  min-width: 0;
}

.image-editor-tools-divider {
  align-self: stretch;
  width: 1px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(246, 231, 200, 0.18) 18%, rgba(246, 231, 200, 0.18) 82%, rgba(255, 255, 255, 0.02) 100%);
}

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

.image-editor-tools-body .image-editor-tool-tabs {
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
}

.image-editor-tool-tab-button {
  min-height: 74px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0%, rgba(255, 255, 255, 0.025) 100%);
  color: #f6e7c8;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.image-editor-tool-tab-button:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075) 0%, rgba(255, 255, 255, 0.035) 100%);
  border-color: rgba(255, 255, 255, 0.1);
}

.image-editor-tool-tab-button.active {
  border-color: rgba(246, 231, 200, 0.28);
  background: linear-gradient(180deg, rgba(246, 231, 200, 0.16) 0%, rgba(246, 231, 200, 0.07) 100%);
  box-shadow: inset 0 0 0 1px rgba(246, 231, 200, 0.14);
}

.image-editor-tools-body .image-editor-tool-tab-button {
  position: relative;
  width: 72px;
  min-height: 72px;
  border-color: transparent;
  border-radius: 20px;
  background: transparent;
  color: rgba(246, 231, 200, 0.52);
  box-shadow: none;
}

.image-editor-tools-body .image-editor-tool-tab-button:hover {
  border-color: transparent;
  background: transparent;
  color: rgba(246, 231, 200, 0.82);
  box-shadow: none;
}

.image-editor-tools-body .image-editor-tool-tab-button.active {
  border-color: transparent;
  background: transparent;
  color: #f6e7c8;
  box-shadow: none;
}

.image-editor-tools-body .image-editor-tool-tab-button.active::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 50%;
  width: 4px;
  height: 28px;
  border-radius: 999px;
  background: rgba(246, 231, 200, 0.9);
  transform: translateY(-50%);
}

.image-editor-tool-tab-button::part(label) {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.image-editor-tool-tab-icon {
  width: 28px;
  height: 28px;
}

.image-editor-tool-tab-text-icon {
  color: inherit;
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1;
}

.image-editor-tool-panels {
  min-width: 0;
}

.image-editor-tools-body .image-editor-tool-panels {
  min-width: 0;
}

.image-editor-tools-body .image-editor-tool-panel-copy,
.image-editor-tools-body .image-editor-tool-copy {
  display: none;
}

.image-editor-tools-body .image-editor-tool-panel {
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.image-editor-tools-body .image-editor-tool-body {
  grid-template-columns: auto;
  justify-content: start;
  padding: 18px;
}

.image-editor-tool-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.025);
  box-sizing: border-box;
}

.image-editor-transform-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.image-editor-tool-panel-copy {
  display: grid;
  gap: 4px;
}

.image-editor-tool-panel-title {
  color: #f5f5f5;
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.25;
}

.image-editor-tool-panel-hint {
  color: #b0b0b0;
  font-size: 0.82rem;
  line-height: 1.45;
}

.image-editor-tool-button {
  min-height: 82px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0%, rgba(255, 255, 255, 0.025) 100%);
  color: inherit;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.image-editor-tool-button:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075) 0%, rgba(255, 255, 255, 0.035) 100%);
  border-color: rgba(255, 255, 255, 0.1);
}

.image-editor-tool-button[disabled] {
  opacity: 0.54;
}

.image-editor-tool-button::part(label) {
  width: 100%;
}

.image-editor-tool-body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 18px;
  box-sizing: border-box;
}

.image-editor-tool-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(247, 242, 230, 0.16) 0%, rgba(216, 204, 175, 0.08) 100%);
  color: #f6e7c8;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.image-editor-tool-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.image-editor-tool-title {
  color: #f5f5f5;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.2;
}

.image-editor-tool-hint {
  color: #b0b0b0;
  font-size: 0.82rem;
  line-height: 1.45;
}

.image-editor-text-preset-grid {
  display: grid;
  gap: 10px;
}

.image-editor-text-preset-button {
  min-height: 96px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0%, rgba(255, 255, 255, 0.025) 100%);
  color: inherit;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.image-editor-text-preset-button:hover {
  border-color: rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.035) 100%);
}

.image-editor-text-preset-button::part(label) {
  width: 100%;
}

.image-editor-text-preset-body {
  display: grid;
  align-content: center;
  gap: 10px;
  width: 100%;
  min-height: 96px;
  padding: 18px;
  box-sizing: border-box;
}

.image-editor-text-preset-preview {
  color: #f3efe6;
  line-height: 1;
  white-space: nowrap;
}

.image-editor-text-preset-preview-headline {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.9rem;
  font-weight: 700;
}

.image-editor-text-preset-preview-body {
  font-family: "Trebuchet MS", sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.image-editor-text-preset-preview-caption {
  color: #d9c7a0;
  font-family: Arial, sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.image-editor-text-preset-label {
  color: #b6b6b6;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.image-editor-image-action-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.image-editor-image-option-button {
  min-height: 110px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0%, rgba(255, 255, 255, 0.025) 100%);
  color: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.image-editor-image-option-button:hover {
  border-color: rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.035) 100%);
}

.image-editor-image-option-button::part(label) {
  width: 100%;
}

.image-editor-image-option-body {
  display: grid;
  justify-items: center;
  gap: 12px;
  width: 100%;
  padding: 16px 12px;
  box-sizing: border-box;
}

.image-editor-image-option-preview {
  position: relative;
  width: 62px;
  height: 46px;
}

.image-editor-image-option-preview::before,
.image-editor-image-option-preview::after {
  content: "";
  position: absolute;
  border-radius: 12px;
}

.image-editor-image-option-preview-base::before {
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(242, 242, 238, 1) 100%);
  box-shadow:
    0 10px 20px rgba(0, 0, 0, 0.12),
    inset 0 0 0 1px rgba(17, 17, 17, 0.08);
}

.image-editor-image-option-preview-overlay::before {
  left: 8px;
  top: 8px;
  width: 34px;
  height: 26px;
  background: rgba(241, 223, 184, 0.22);
  box-shadow: inset 0 0 0 2px rgba(241, 223, 184, 0.56);
}

.image-editor-image-option-preview-overlay::after {
  right: 4px;
  bottom: 2px;
  width: 38px;
  height: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 244, 240, 1) 100%);
  box-shadow:
    0 10px 18px rgba(0, 0, 0, 0.14),
    inset 0 0 0 1px rgba(17, 17, 17, 0.08);
}

.image-editor-image-option-label {
  color: #f3f3f3;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
}

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

.image-editor-shape-option-button {
  min-height: 108px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0%, rgba(255, 255, 255, 0.025) 100%);
  color: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.image-editor-shape-option-button:hover {
  border-color: rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.035) 100%);
}

.image-editor-shape-option-button::part(label) {
  width: 100%;
}

.image-editor-shape-option-body {
  display: grid;
  justify-items: center;
  gap: 12px;
  width: 100%;
  padding: 16px 12px;
  box-sizing: border-box;
}

.image-editor-shape-option-preview {
  position: relative;
  width: 64px;
  height: 48px;
  --shape-preview-width: 52px;
  --shape-preview-height: 36px;
  --shape-preview-radius: 10px;
}

.image-editor-shape-option-preview::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--shape-preview-width);
  height: var(--shape-preview-height);
  transform: translate(-50%, -50%);
  background: rgba(246, 231, 200, 0.18);
  box-shadow: inset 0 0 0 2px rgba(246, 231, 200, 0.72);
  border-radius: var(--shape-preview-radius);
}

.image-editor-shape-option-preview-rect::before {
  --shape-preview-radius: 0px;
}

.image-editor-shape-option-preview-rounded::before {
  --shape-preview-width: 50px;
  --shape-preview-height: 36px;
  --shape-preview-radius: 8px;
}

.image-editor-shape-option-preview-circle::before {
  --shape-preview-width: 38px;
  --shape-preview-height: 38px;
  --shape-preview-radius: 999px;
}

.image-editor-shape-option-preview-halfcircle::before {
  --shape-preview-width: 48px;
  --shape-preview-height: 24px;
  background: rgba(246, 231, 200, 0.72);
  box-shadow: none;
  border-radius: 999px 999px 0 0;
}

.image-editor-shape-option-preview-halfcircle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 40px;
  height: 18px;
  transform: translate(-50%, -50%);
  background: rgba(246, 231, 200, 0.18);
  border-radius: 999px 999px 0 0;
}

.image-editor-shape-option-preview-pill::before {
  --shape-preview-width: 58px;
  --shape-preview-height: 24px;
  --shape-preview-radius: 999px;
}

.image-editor-shape-option-preview-diamond::before {
  --shape-preview-width: 46px;
  --shape-preview-height: 34px;
  background: rgba(246, 231, 200, 0.72);
  box-shadow: none;
  border-radius: 0;
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.image-editor-shape-option-preview-diamond::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 38px;
  height: 26px;
  transform: translate(-50%, -50%);
  background: rgba(246, 231, 200, 0.18);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.image-editor-shape-option-preview-rhombus::before {
  --shape-preview-width: 48px;
  --shape-preview-height: 34px;
  background: rgba(246, 231, 200, 0.72);
  box-shadow: none;
  border-radius: 0;
  clip-path: polygon(28% 0%, 100% 32%, 72% 100%, 0% 68%);
}

.image-editor-shape-option-preview-rhombus::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 40px;
  height: 26px;
  transform: translate(-50%, -50%);
  background: rgba(246, 231, 200, 0.18);
  clip-path: polygon(28% 0%, 100% 32%, 72% 100%, 0% 68%);
}

.image-editor-shape-option-preview-triangle::before {
  --shape-preview-width: 44px;
  --shape-preview-height: 36px;
  background: rgba(246, 231, 200, 0.72);
  box-shadow: none;
  border-radius: 0;
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
}

.image-editor-shape-option-preview-triangle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 36px;
  height: 28px;
  transform: translate(-50%, -50%);
  background: rgba(246, 231, 200, 0.18);
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
}

.image-editor-shape-option-preview-pentagon::before {
  --shape-preview-width: 44px;
  --shape-preview-height: 38px;
  background: rgba(246, 231, 200, 0.72);
  box-shadow: none;
  border-radius: 0;
  clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
}

.image-editor-shape-option-preview-pentagon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 36px;
  height: 30px;
  transform: translate(-50%, -50%);
  background: rgba(246, 231, 200, 0.18);
  clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
}

.image-editor-shape-option-preview-hexagon::before {
  --shape-preview-width: 50px;
  --shape-preview-height: 34px;
  background: rgba(246, 231, 200, 0.72);
  box-shadow: none;
  border-radius: 0;
  clip-path: polygon(24% 0%, 76% 0%, 100% 50%, 76% 100%, 24% 100%, 0% 50%);
}

.image-editor-shape-option-preview-hexagon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 42px;
  height: 26px;
  transform: translate(-50%, -50%);
  background: rgba(246, 231, 200, 0.18);
  clip-path: polygon(24% 0%, 76% 0%, 100% 50%, 76% 100%, 24% 100%, 0% 50%);
}

.image-editor-shape-option-preview-octagon::before {
  --shape-preview-width: 46px;
  --shape-preview-height: 38px;
  background: rgba(246, 231, 200, 0.72);
  box-shadow: none;
  border-radius: 0;
  clip-path: polygon(28% 0%, 72% 0%, 100% 28%, 100% 72%, 72% 100%, 28% 100%, 0% 72%, 0% 28%);
}

.image-editor-shape-option-preview-octagon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 38px;
  height: 30px;
  transform: translate(-50%, -50%);
  background: rgba(246, 231, 200, 0.18);
  clip-path: polygon(28% 0%, 72% 0%, 100% 28%, 100% 72%, 72% 100%, 28% 100%, 0% 72%, 0% 28%);
}

.image-editor-shape-option-preview-trapezoid::before {
  --shape-preview-width: 50px;
  --shape-preview-height: 34px;
  background: rgba(246, 231, 200, 0.72);
  box-shadow: none;
  border-radius: 0;
  clip-path: polygon(18% 0%, 82% 0%, 100% 100%, 0% 100%);
}

.image-editor-shape-option-preview-trapezoid::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 42px;
  height: 26px;
  transform: translate(-50%, -50%);
  background: rgba(246, 231, 200, 0.18);
  clip-path: polygon(18% 0%, 82% 0%, 100% 100%, 0% 100%);
}

.image-editor-shape-option-preview-star::before {
  --shape-preview-width: 46px;
  --shape-preview-height: 42px;
  background: rgba(246, 231, 200, 0.72);
  box-shadow: none;
  border-radius: 0;
  clip-path: polygon(50% 0%, 61% 34%, 98% 35%, 68% 57%, 79% 92%, 50% 71%, 21% 92%, 32% 57%, 2% 35%, 39% 34%);
}

.image-editor-shape-option-preview-star::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 36px;
  height: 32px;
  transform: translate(-50%, -50%);
  background: rgba(246, 231, 200, 0.18);
  clip-path: polygon(50% 0%, 61% 34%, 98% 35%, 68% 57%, 79% 92%, 50% 71%, 21% 92%, 32% 57%, 2% 35%, 39% 34%);
}

.image-editor-shape-option-preview-arrow::before {
  --shape-preview-width: 54px;
  --shape-preview-height: 34px;
  background: rgba(246, 231, 200, 0.72);
  box-shadow: none;
  border-radius: 0;
  clip-path: polygon(0% 24%, 58% 24%, 58% 0%, 100% 50%, 58% 100%, 58% 76%, 0% 76%);
}

.image-editor-shape-option-preview-arrow::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 46px;
  height: 26px;
  transform: translate(-50%, -50%);
  background: rgba(246, 231, 200, 0.18);
  clip-path: polygon(0% 24%, 58% 24%, 58% 0%, 100% 50%, 58% 100%, 58% 76%, 0% 76%);
}

.image-editor-shape-option-preview-chevron::before {
  --shape-preview-width: 52px;
  --shape-preview-height: 34px;
  background: rgba(246, 231, 200, 0.72);
  box-shadow: none;
  border-radius: 0;
  clip-path: polygon(0% 20%, 38% 20%, 100% 50%, 38% 80%, 0% 80%, 44% 50%);
}

.image-editor-shape-option-preview-chevron::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 26px;
  transform: translate(-50%, -50%);
  background: rgba(246, 231, 200, 0.18);
  clip-path: polygon(0% 20%, 38% 20%, 100% 50%, 38% 80%, 0% 80%, 44% 50%);
}

.image-editor-shape-option-preview-line::before {
  left: 6px;
  right: 6px;
  top: 50%;
  width: auto;
  height: 0;
  border-top: 4px solid rgba(246, 231, 200, 0.84);
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  transform: translateY(-50%) rotate(-16deg);
}

.image-editor-shape-option-preview-line::after {
  content: "";
  position: absolute;
  left: calc(50% - 4px);
  top: calc(50% - 4px);
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #f6e7c8;
  box-shadow: 0 0 0 2px rgba(17, 17, 17, 0.45);
}

.image-editor-shape-option-label {
  color: #f3f3f3;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
}

.image-editor-stage-card {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 26px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 30%),
    linear-gradient(180deg, rgba(24, 24, 24, 0.98) 0%, rgba(17, 17, 17, 0.96) 100%);
  box-sizing: border-box;
}

.image-editor-panel-eyebrow {
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.image-editor-panel-title {
  color: #f5f5f5;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.3;
}

.image-editor-panel-meta,
.image-editor-panel-location {
  color: #b0b0b0;
  font-size: 0.88rem;
  line-height: 1.6;
}

.image-editor-stage-card {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 14px;
  height: 100%;
  min-height: 0;
  padding: 18px;
}

.image-editor-stage-header {
  display: grid;
  gap: 6px;
}

.image-editor-toolbar {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  padding: 0 2px;
  min-width: 0;
}

.image-editor-toolbar-button,
.image-editor-toolbar-chip-button {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0%, rgba(255, 255, 255, 0.025) 100%);
  color: #f5f5f5;
  font: inherit;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.image-editor-toolbar-button:hover,
.image-editor-toolbar-chip-button:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 100%);
}

.image-editor-toolbar-button[disabled],
.image-editor-toolbar-chip-button[disabled] {
  opacity: 0.44;
  cursor: default;
}

.image-editor-toolbar-button {
  display: inline-flex;
  flex: 0 0 42px;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  box-sizing: border-box;
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1;
}

.image-editor-toolbar-history-button {
  position: relative;
  font-size: 0;
}

.image-editor-toolbar-history-button .image-editor-toolbar-history-button-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: 18px;
  height: 18px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.image-editor-toolbar-delete-button {
  margin-left: auto;
  color: #f3d8d1;
}

.image-editor-toolbar-delete-button:hover {
  border-color: rgba(224, 125, 108, 0.3);
  background: linear-gradient(180deg, rgba(224, 125, 108, 0.16) 0%, rgba(224, 125, 108, 0.06) 100%);
}

.image-editor-toolbar-delete-icon {
  width: 18px;
  height: 18px;
}

.image-editor-toolbar-transparency-group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: min(320px, 100%);
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  box-sizing: border-box;
}

.image-editor-toolbar-transparency-group.disabled,
.image-editor-toolbar-popover-control.disabled {
  opacity: 0.5;
}

.image-editor-toolbar-label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.image-editor-toolbar-transparency {
  flex: 1 1 auto;
  min-width: 120px;
  accent-color: #efe3c4;
}

.image-editor-toolbar-transparency-value {
  min-width: 44px;
  color: #f3eee4;
  font-size: 0.83rem;
  font-weight: 700;
  text-align: right;
}

.image-editor-toolbar-popover-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.image-editor-toolbar-style-button {
  --swatch-color: #efe3c4;
  position: relative;
}

.image-editor-toolbar-canvas-button {
  position: relative;
}

.image-editor-toolbar-layers-button {
  position: relative;
  display: grid;
  place-items: center;
}

.image-editor-toolbar-layers-icon {
  position: relative;
  width: 20px;
  height: 18px;
  pointer-events: none;
}

.image-editor-toolbar-layers-shape {
  position: absolute;
  width: 12px;
  height: 8px;
  border: 2px solid rgba(246, 231, 200, 0.82);
  border-radius: 4px;
  background: rgba(246, 231, 200, 0.08);
  box-sizing: border-box;
}

.image-editor-toolbar-layers-shape-back {
  left: 1px;
  top: 8px;
  opacity: 0.42;
}

.image-editor-toolbar-layers-shape-middle {
  left: 4px;
  top: 5px;
  opacity: 0.68;
}

.image-editor-toolbar-layers-shape-front {
  left: 7px;
  top: 2px;
}

.image-editor-toolbar-canvas-button::before,
.image-editor-toolbar-canvas-button::after {
  content: "";
  position: absolute;
  box-sizing: border-box;
}

.image-editor-toolbar-canvas-button::before {
  inset: 10px;
  border: 2px solid rgba(246, 231, 200, 0.82);
  border-radius: 7px;
}

.image-editor-toolbar-canvas-button::after {
  right: 9px;
  bottom: 9px;
  width: 10px;
  height: 10px;
  border-right: 2px solid rgba(246, 231, 200, 0.82);
  border-bottom: 2px solid rgba(246, 231, 200, 0.82);
}

.image-editor-toolbar-style-button::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 7px;
  box-sizing: border-box;
}

.image-editor-toolbar-fill-button::before {
  background: var(--swatch-color);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.image-editor-toolbar-border-button::before {
  border: 3px solid var(--swatch-color);
  background: transparent;
}

.image-editor-toolbar-shadow-button::before {
  inset: 11px 12px 13px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 4px 4px 10px var(--swatch-color);
}

.image-editor-toolbar-style-button.active {
  border-color: rgba(246, 231, 200, 0.44);
  background: linear-gradient(180deg, rgba(246, 231, 200, 0.18) 0%, rgba(246, 231, 200, 0.08) 100%);
}

.image-editor-toolbar-style-button.inactive::before {
  opacity: 0.42;
}

.image-editor-toolbar-style-button.inactive::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  top: 19px;
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  transform: rotate(-34deg);
}

.image-editor-font-popover {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  z-index: 8;
  display: grid;
  gap: 14px;
  width: min(420px, calc(100vw - 80px));
  min-width: 280px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 28%),
    linear-gradient(180deg, rgba(24, 24, 24, 0.99) 0%, rgba(16, 16, 16, 0.98) 100%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
  box-sizing: border-box;
}

.image-editor-drawer-detail-shell .image-editor-font-popover {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.image-editor-toolbar-style-popover {
  width: min(220px, calc(100vw - 80px));
  min-width: 0;
}

.image-editor-drawer-detail-shell .image-editor-toolbar-style-popover,
.image-editor-drawer-detail-shell .image-editor-toolbar-canvas-popover,
.image-editor-drawer-detail-shell .image-editor-toolbar-layers-popover,
.image-editor-drawer-detail-shell .image-editor-toolbar-border-popover,
.image-editor-drawer-detail-shell .image-editor-toolbar-shadow-popover {
  width: 100%;
}

.image-editor-toolbar-canvas-popover {
  width: min(260px, calc(100vw - 80px));
}

.image-editor-toolbar-background-popover {
  width: min(320px, calc(100vw - 80px));
}

.image-editor-toolbar-layers-popover {
  width: min(264px, calc(100vw - 80px));
}

.image-editor-toolbar-border-popover {
  width: min(340px, calc(100vw - 80px));
}

.image-editor-toolbar-shadow-popover {
  width: min(320px, calc(100vw - 80px));
}

.image-editor-toolbar-layers-control .image-editor-font-popover,
.image-editor-toolbar-canvas-control .image-editor-font-popover,
.image-editor-toolbar-border-control .image-editor-font-popover,
.image-editor-toolbar-shadow-control .image-editor-font-popover,
.image-editor-toolbar-font-control .image-editor-font-popover {
  left: auto;
  right: 0;
}

.image-editor-toolbar-layers-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.image-editor-toolbar-background-image-section {
  display: grid;
  gap: 8px;
}

.image-editor-toolbar-background-image-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.image-editor-toolbar-background-action-button {
  margin: 0;
  min-height: 38px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.025) 100%);
  color: #f3eee4;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.image-editor-toolbar-background-action-button:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.095) 0%, rgba(255, 255, 255, 0.04) 100%);
}

.image-editor-toolbar-background-action-button[disabled] {
  opacity: 0.44;
}

.image-editor-toolbar-background-action-button::part(label) {
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 0.8rem;
  font-weight: 700;
}

.image-editor-toolbar-background-image-status {
  overflow: hidden;
  color: #acacac;
  font-size: 0.76rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-editor-toolbar-layers-group {
  display: grid;
  gap: 8px;
}

.image-editor-toolbar-layers-group-label {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
}

.image-editor-toolbar-layers-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.image-editor-font-popover-header,
.image-editor-font-popover-copy {
  display: grid;
  gap: 4px;
}

.image-editor-font-popover-title {
  color: #f5f5f5;
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.25;
}

.image-editor-font-popover-hint {
  color: #acacac;
  font-size: 0.78rem;
  line-height: 1.45;
}

.image-editor-font-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 12px;
}

.image-editor-font-control,
.image-editor-font-group,
.image-editor-font-size-row {
  display: grid;
  gap: 8px;
}

.image-editor-toolbar-range-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 10px;
}

.image-editor-canvas-dimension-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.image-editor-toolbar-range-value {
  min-width: 46px;
  color: #efe3c4;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: right;
}

.image-editor-font-label {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.image-editor-font-family,
.image-editor-font-color {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: #f3f3f3;
  font: inherit;
  box-sizing: border-box;
}

.image-editor-toolbar-corner-input,
.image-editor-toolbar-border-style,
.image-editor-transform-input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: #f3f3f3;
  font: inherit;
  box-sizing: border-box;
}

.image-editor-layers-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.image-editor-layers-empty {
  padding: 16px 14px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  color: #9e9e9e;
  font-size: 0.82rem;
  line-height: 1.45;
  text-align: center;
}

.image-editor-layer-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0%, rgba(255, 255, 255, 0.025) 100%);
  color: inherit;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.image-editor-layer-item:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075) 0%, rgba(255, 255, 255, 0.035) 100%);
}

.image-editor-layer-item.selected {
  border-color: rgba(246, 231, 200, 0.16);
}

.image-editor-layer-item.active {
  border-color: rgba(246, 231, 200, 0.3);
  background: linear-gradient(180deg, rgba(246, 231, 200, 0.14) 0%, rgba(246, 231, 200, 0.06) 100%);
}

.image-editor-layer-item-badge {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(246, 231, 200, 0.12);
  color: #efe3c4;
  font-size: 0.78rem;
  font-weight: 800;
}

.image-editor-layer-item-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.image-editor-layer-item-title {
  color: #f5f5f5;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
}

.image-editor-layer-item-meta {
  color: #a7a7a7;
  font-size: 0.76rem;
  line-height: 1.4;
}

.image-editor-toolbar-border-radius,
.image-editor-toolbar-border-width,
.image-editor-toolbar-border-opacity,
.image-editor-toolbar-character-spacing,
.image-editor-toolbar-line-spacing,
.image-editor-toolbar-shadow-direction,
.image-editor-toolbar-shadow-distance,
.image-editor-toolbar-shadow-blur,
.image-editor-toolbar-shadow-spread,
.image-editor-toolbar-shadow-opacity {
  width: 100%;
  min-width: 120px;
  accent-color: #efe3c4;
}

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

.image-editor-toolbar-corner-field {
  display: grid;
  gap: 6px;
}

.image-editor-toolbar-corner-label {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.image-editor-font-family:disabled,
.image-editor-font-size:disabled,
.image-editor-toolbar-character-spacing:disabled,
.image-editor-toolbar-line-spacing:disabled,
.image-editor-toolbar-border-radius:disabled,
.image-editor-toolbar-border-width:disabled,
.image-editor-toolbar-border-opacity:disabled,
.image-editor-transform-input:disabled,
.image-editor-toolbar-shadow-direction:disabled,
.image-editor-toolbar-shadow-distance:disabled,
.image-editor-toolbar-shadow-blur:disabled,
.image-editor-toolbar-shadow-spread:disabled,
.image-editor-toolbar-shadow-opacity:disabled,
.image-editor-toolbar-corner-input:disabled,
.image-editor-toolbar-border-style:disabled {
  opacity: 0.46;
  cursor: default;
}

.image-editor-color-picker {
  position: relative;
  width: 100%;
}

.image-editor-color-picker-trigger {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: #f3f3f3;
  font: inherit;
  text-align: left;
  box-sizing: border-box;
}

.image-editor-color-picker.open .image-editor-color-picker-trigger {
  border-color: rgba(246, 231, 200, 0.28);
  box-shadow: 0 0 0 1px rgba(246, 231, 200, 0.12);
}

.image-editor-color-picker.disabled .image-editor-color-picker-trigger {
  opacity: 0.46;
  cursor: default;
}

.image-editor-color-picker-trigger-swatch,
.image-editor-color-picker-preview {
  background: #ffffff;
}

.image-editor-color-picker-trigger-swatch {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.28);
}

.image-editor-color-picker-trigger-value {
  min-width: 0;
  color: #f3f3f3;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.image-editor-color-picker-trigger-caret {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.image-editor-color-picker-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 14;
  display: grid;
  gap: 12px;
  width: min(290px, calc(100vw - 72px));
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 28%),
    linear-gradient(180deg, rgba(24, 24, 24, 0.99) 0%, rgba(16, 16, 16, 0.98) 100%);
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.34);
  box-sizing: border-box;
}

.image-editor-color-picker-panel[hidden] {
  display: none;
}

.image-editor-color-picker-surface {
  position: relative;
  height: 176px;
  border: none;
  border-radius: 5px;
  overflow: hidden;
  cursor: crosshair;
  background: transparent;
  box-shadow: none;
  isolation: isolate;
}

.image-editor-color-picker-surface-white,
.image-editor-color-picker-surface-black {
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.image-editor-color-picker-surface-white {
  background: linear-gradient(90deg, #ffffff 0%, rgba(255, 255, 255, 0) 100%);
}

.image-editor-color-picker-surface-black {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000000 100%);
}

.image-editor-color-picker-surface-handle {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.28), 0 4px 12px rgba(0, 0, 0, 0.24);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.image-editor-color-picker-strip {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.image-editor-color-picker-preview {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.image-editor-color-picker-hue {
  width: 100%;
  margin: 0;
  appearance: none;
  height: 14px;
  border-radius: 999px;
  outline: none;
  background: linear-gradient(90deg, #ff0000 0%, #ffff00 17%, #00ff00 34%, #00ffff 51%, #0000ff 68%, #ff00ff 85%, #ff0000 100%);
}

.image-editor-color-picker-hue::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: transparent;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.28), 0 4px 12px rgba(0, 0, 0, 0.24);
}

.image-editor-color-picker-hue::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: transparent;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.28), 0 4px 12px rgba(0, 0, 0, 0.24);
}

.image-editor-color-picker-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.image-editor-color-picker-channel {
  display: grid;
  gap: 6px;
}

.image-editor-color-picker-channel-input {
  width: 100%;
  min-height: 40px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: #f5f5f5;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  text-align: center;
  box-sizing: border-box;
}

.image-editor-color-picker-channel-input::-webkit-outer-spin-button,
.image-editor-color-picker-channel-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.image-editor-color-picker-channel-input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.image-editor-color-picker.disabled .image-editor-color-picker-hue,
.image-editor-color-picker.disabled .image-editor-color-picker-channel-input {
  opacity: 0.46;
  cursor: default;
}

.image-editor-color-picker-channel-label {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.image-editor-font-size-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}

.image-editor-font-size {
  width: 100%;
  accent-color: #efe3c4;
}

.image-editor-font-size-value {
  min-width: 52px;
  color: #f3eee4;
  font-size: 0.83rem;
  font-weight: 700;
  text-align: right;
}

.image-editor-font-toggle-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.image-editor-toolbar-chip-button {
  min-height: 38px;
  padding: 0 12px;
  font-size: 0.84rem;
  font-weight: 700;
}

.image-editor-toolbar-chip-button.active {
  border-color: rgba(246, 231, 200, 0.44);
  background: linear-gradient(180deg, rgba(246, 231, 200, 0.24) 0%, rgba(246, 231, 200, 0.12) 100%);
  color: #fff3d6;
}

.image-editor-stage {
  position: relative;
  min-height: 0;
  height: 100%;
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(15, 15, 15, 0.08);
  background:
    linear-gradient(180deg, rgba(233, 233, 230, 0.98) 0%, rgba(222, 222, 218, 1) 100%);
}

.image-editor-stage.empty {
  border: 1px dashed rgba(255, 255, 255, 0.12);
}

.image-editor-empty-stage {
  display: grid;
  gap: 10px;
  max-width: 420px;
  padding: 32px;
  text-align: center;
  color: #b9b9b9;
  line-height: 1.6;
}

.image-editor-empty-stage > :first-child {
  color: #f4f4f4;
  font-size: 1.08rem;
  font-weight: 700;
}

.image-editor-canvas-surface {
  position: relative;
  flex: 0 0 auto;
  border-radius: 2px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(249, 249, 247, 1) 100%);
  box-shadow:
    0 18px 38px rgba(0, 0, 0, 0.16),
    inset 0 0 0 1px rgba(17, 17, 17, 0.06);
}

.image-editor-stage-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
  z-index: 1;
}

.image-editor-overlay-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: auto;
}

.image-editor-selection-marquee {
  position: absolute;
  z-index: 10;
  pointer-events: none;
  border: 1px solid rgba(17, 17, 17, 0.72);
  background: rgba(246, 231, 200, 0.28);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.38);
  box-sizing: border-box;
}

.image-editor-selection-marquee[hidden] {
  display: none;
}

.image-editor-context-menu {
  position: absolute;
  z-index: 12;
  display: grid;
  gap: 6px;
  min-width: 180px;
  padding: 8px;
  border: 1px solid rgba(17, 17, 17, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(16px);
  box-sizing: border-box;
}

.image-editor-context-menu[hidden] {
  display: none;
}

.image-editor-context-menu-action {
  appearance: none;
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #111111;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.image-editor-context-menu-action:hover {
  background: rgba(17, 17, 17, 0.08);
}

.image-editor-context-menu-action.disabled,
.image-editor-context-menu-action:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.image-editor-context-menu-action.disabled:hover,
.image-editor-context-menu-action:disabled:hover {
  background: transparent;
}

.image-editor-context-submenu {
  position: relative;
  display: grid;
  gap: 0;
}

.image-editor-context-submenu[hidden] {
  display: none;
}

.image-editor-context-submenu.disabled > .image-editor-context-submenu-panel {
  display: none !important;
}

.image-editor-context-submenu-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.image-editor-context-submenu-trigger::after {
  content: ">";
  color: rgba(17, 17, 17, 0.54);
  font-size: 0.82rem;
  font-weight: 800;
}

.image-editor-context-submenu-panel {
  display: none;
  position: absolute;
  top: -8px;
  left: calc(100% - 4px);
  z-index: 13;
  min-width: 168px;
  gap: 4px;
  padding: 8px;
  border: 1px solid rgba(17, 17, 17, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(16px);
  box-sizing: border-box;
}

.image-editor-context-submenu:not(.disabled):hover > .image-editor-context-submenu-panel,
.image-editor-context-submenu:not(.disabled):focus-within > .image-editor-context-submenu-panel {
  display: grid;
}

.image-editor-context-submenu-panel .image-editor-context-menu-action {
  min-height: 34px;
  font-size: 0.8rem;
  font-weight: 600;
}

.image-editor-overlay-shell {
  position: absolute;
  pointer-events: auto;
  cursor: move;
  touch-action: none;
  box-sizing: border-box;
  user-select: none;
  transition: box-shadow 120ms ease, transform 120ms ease;
}

.image-editor-overlay-shell.selected {
  z-index: 3;
}

.image-editor-overlay-selection {
  position: absolute;
  inset: -8px;
  display: none;
  border: 2px solid #111111;
  border-radius: 0;
  pointer-events: none;
  z-index: 5;
}

.image-editor-overlay-shell.selected > .image-editor-overlay-selection {
  display: block;
}

.image-editor-overlay-handle {
  display: none;
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #111111;
  box-sizing: border-box;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.22);
  pointer-events: auto;
}

.image-editor-overlay-shell.active-selection > .image-editor-overlay-selection > .image-editor-overlay-handle {
  display: block;
}

.image-editor-overlay-handle[data-handle="line-start"],
.image-editor-overlay-handle[data-handle="line-toggle"],
.image-editor-overlay-handle[data-handle="line-end"] {
  display: none;
  width: 14px;
  height: 14px;
  transform: translate(-50%, -50%);
}

.image-editor-overlay-shell:not(.image-editor-overlay-shell-line) > .image-editor-overlay-selection > .image-editor-overlay-handle[data-handle="line-start"],
.image-editor-overlay-shell:not(.image-editor-overlay-shell-line) > .image-editor-overlay-selection > .image-editor-overlay-handle[data-handle="line-toggle"],
.image-editor-overlay-shell:not(.image-editor-overlay-shell-line) > .image-editor-overlay-selection > .image-editor-overlay-handle[data-handle="line-end"] {
  display: none !important;
}

.image-editor-overlay-shell-line > .image-editor-overlay-selection > .image-editor-overlay-handle[data-handle="nw"],
.image-editor-overlay-shell-line > .image-editor-overlay-selection > .image-editor-overlay-handle[data-handle="n"],
.image-editor-overlay-shell-line > .image-editor-overlay-selection > .image-editor-overlay-handle[data-handle="ne"],
.image-editor-overlay-shell-line > .image-editor-overlay-selection > .image-editor-overlay-handle[data-handle="e"],
.image-editor-overlay-shell-line > .image-editor-overlay-selection > .image-editor-overlay-handle[data-handle="se"],
.image-editor-overlay-shell-line > .image-editor-overlay-selection > .image-editor-overlay-handle[data-handle="s"],
.image-editor-overlay-shell-line > .image-editor-overlay-selection > .image-editor-overlay-handle[data-handle="sw"],
.image-editor-overlay-shell-line > .image-editor-overlay-selection > .image-editor-overlay-handle[data-handle="w"] {
  display: none !important;
}

.image-editor-overlay-shell-line.active-selection > .image-editor-overlay-selection > .image-editor-overlay-handle[data-handle="line-start"],
.image-editor-overlay-shell-line.active-selection > .image-editor-overlay-selection > .image-editor-overlay-handle[data-handle="line-toggle"],
.image-editor-overlay-shell-line.active-selection > .image-editor-overlay-selection > .image-editor-overlay-handle[data-handle="line-end"] {
  display: block;
}

.image-editor-overlay-line-handle {
  border-color: #ffffff;
  background: #111111;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.26);
}

.image-editor-overlay-line-handle[data-handle="line-start"],
.image-editor-overlay-line-handle[data-handle="line-end"] {
  cursor: grab;
}

.image-editor-overlay-line-handle[data-handle="line-toggle"] {
  width: 16px;
  height: 16px;
  border-color: #111111;
  background: #f7f1df;
  cursor: grab;
}

.image-editor-overlay-line-handle[data-handle="line-toggle"].curved {
  background: #111111;
  border-color: #f7f1df;
}

.image-editor-overlay-handle[data-handle="nw"] {
  left: -7px;
  top: -7px;
  cursor: nwse-resize;
}

.image-editor-overlay-handle[data-handle="n"] {
  left: calc(50% - 6px);
  top: -7px;
  cursor: ns-resize;
}

.image-editor-overlay-handle[data-handle="ne"] {
  right: -7px;
  top: -7px;
  cursor: nesw-resize;
}

.image-editor-overlay-handle[data-handle="e"] {
  right: -7px;
  top: calc(50% - 6px);
  cursor: ew-resize;
}

.image-editor-overlay-handle[data-handle="se"] {
  right: -7px;
  bottom: -7px;
  cursor: nwse-resize;
}

.image-editor-overlay-handle[data-handle="s"] {
  left: calc(50% - 6px);
  bottom: -7px;
  cursor: ns-resize;
}

.image-editor-overlay-handle[data-handle="sw"] {
  left: -7px;
  bottom: -7px;
  cursor: nesw-resize;
}

.image-editor-overlay-handle[data-handle="w"] {
  left: -7px;
  top: calc(50% - 6px);
  cursor: ew-resize;
}

.image-editor-overlay-shell-text {
  border: 0 solid transparent;
  border-radius: 18px;
  background: transparent;
  backdrop-filter: none;
}

.image-editor-overlay-shell.frame-active {
  box-shadow: none;
}

.image-editor-overlay-shell-box,
.image-editor-overlay-shell-image {
  background: transparent;
  box-shadow: none;
}

.image-editor-overlay-shell-line {
  border: 0 solid transparent;
  border-radius: 0;
  background: transparent;
}

.image-editor-overlay-shell:active {
  cursor: move;
}

.image-editor-overlay-input {
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 12px 18px;
  border: none;
  outline: none;
  background: transparent;
  color: #b7b7b7;
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.18;
  box-sizing: border-box;
  cursor: text;
  resize: none;
  overflow: hidden auto;
  font-family: Georgia, "Times New Roman", serif;
}

.image-editor-overlay-shape {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
  border-radius: inherit;
  background: transparent;
}

.image-editor-overlay-shape-path {
  vector-effect: non-scaling-stroke;
  box-sizing: border-box;
}

.image-editor-overlay-image {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.image-editor-overlay-input::placeholder {
  color: #181818;
}

@media (max-width: 1100px) {
  .image-editor-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .image-editor-stage {
    min-height: 540px;
  }

  .image-editor-font-popover {
    width: min(420px, calc(100vw - 80px));
  }
}

@media (max-width: 760px) {
  .image-editor-heading-export-button {
    width: auto;
  }

  .image-editor-workspace {
    gap: 16px;
    padding: 12px 0 18px;
  }

  .image-editor-tool-rail,
  .image-editor-stage-card {
    border-radius: 22px;
  }

  .image-editor-tool-button {
    min-height: 74px;
  }

  .image-editor-tools-body {
    grid-template-columns: 64px 1px minmax(0, 1fr);
    gap: 12px;
  }

  .image-editor-tools-body .image-editor-tool-tab-button {
    width: 64px;
    min-height: 64px;
    border-radius: 18px;
  }

  .image-editor-rail-tab-button {
    min-height: 46px;
  }

  .image-editor-tool-tab-button {
    min-height: 66px;
    border-radius: 18px;
  }

  .image-editor-tool-panel {
    padding: 14px;
    border-radius: 18px;
  }

  .image-editor-shape-option-button {
    min-height: 96px;
  }

  .image-editor-stage-card {
    padding: 14px;
  }

  .image-editor-toolbar {
    gap: 10px;
  }

  .image-editor-toolbar-status {
    flex-basis: 100%;
  }

  .image-editor-transform-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .image-editor-shape-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .image-editor-toolbar-transparency-group {
    width: 100%;
  }

  .image-editor-font-popover {
    left: 0;
    right: auto;
    width: min(420px, calc(100vw - 32px));
    min-width: 0;
  }

  .image-editor-toolbar-style-popover {
    width: min(220px, calc(100vw - 32px));
  }

  .image-editor-font-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .image-editor-font-size-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .image-editor-stage {
    min-height: 420px;
  }

  .image-editor-overlay-input {
    font-size: 1.06rem;
    padding: 11px 14px;
  }
}

@media (max-width: 1380px) {
  .calendar-year-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .calendar-month-day {
    min-height: 144px;
  }
}

@media (max-width: 1100px) {
  .calendar-toolbar {
    align-items: flex-start;
  }

  .calendar-main-layout {
    flex-direction: column;
  }

  .calendar-sidebar {
    width: 100% !important;
    min-width: 0 !important;
    max-height: 280px;
  }

  .calendar-range-block {
    order: -1;
    width: 100%;
  }

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

@media (max-width: 760px) {
  .calendar-year-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .calendar-range-label {
    font-size: 1.04rem;
  }

  .calendar-mode-toggle {
    width: 100%;
  }

  .calendar-sidebar-filters {
    width: 100%;
  }

  .calendar-mode-button {
    flex: 1 1 0;
    justify-content: center;
  }

  .calendar-sidebar-filter-button {
    flex: 1 1 0;
    justify-content: center;
  }
}
