.website-manager-page {
  min-height: 0;
  margin: 0;
  background: #fff8f4;
  color: #3f2d2a;
  font-family: var(--font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif);
  font-size: 16px;
}

html.is-embedded,
html.is-embedded body.website-manager-page {
  height: 100%;
  overflow: hidden;
}

.website-manager-topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  padding: 14px 22px;
  background: rgba(255, 248, 244, 0.94);
  border-bottom: 1px solid rgba(207, 75, 69, 0.16);
  backdrop-filter: blur(12px);
}

html.is-embedded .website-manager-topbar {
  display: none;
}

.website-manager-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #cf4b45;
  font-size: 16px;
  text-decoration: none;
}

.website-manager-shell {
  width: min(1440px, calc(100% - 32px));
  min-height: 0;
  margin: 0 auto;
  padding: 24px 0 16px;
}

html.is-embedded .website-manager-shell {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  height: 100vh;
  padding: 12px 0 14px;
  overflow: hidden;
}

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

.website-manager-heading h1 {
  margin: 0;
  color: #cf4b45;
  font-size: 28px;
  font-weight: 550;
}

.website-manager-heading p,
.website-list-status,
.website-pagination,
.website-empty,
.website-meta {
  color: #856b65;
  line-height: 1.65;
}

.website-manager-heading p {
  margin: 4px 0 0;
}

.website-manager-toolbar {
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(280px, 1fr) 92px 70px;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.website-manager-toolbar .g_picker {
  width: 100%;
  height: 44px;
  padding: 0 44px 0 14px;
  overflow: hidden;
  color: #3f2d2a;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23cf4b45' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px 18px;
  border: 1px solid rgba(207, 75, 69, 0.22);
  border-radius: 12px;
  box-shadow: none;
  appearance: none;
}

.website-manager-toolbar .g_picker:focus {
  border-color: rgba(207, 75, 69, 0.5);
  outline: 3px solid rgba(207, 75, 69, 0.12);
  outline-offset: 0;
}

.website-tag-panel {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  min-height: 34px;
  margin-bottom: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

html.is-embedded .website-tag-panel {
  max-height: 36px;
}

.website-tag {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(207, 75, 69, 0.18);
  border-radius: 999px;
  background: #fff;
  color: #8b4a45;
  font-size: 16px;
  cursor: pointer;
}

.website-tag.active {
  background: #cf4b45;
  border-color: #cf4b45;
  color: #fff;
}

.website-list-panel {
  display: flex;
  min-height: 0;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(207, 75, 69, 0.16);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 14px 34px rgba(207, 75, 69, 0.08);
}

.website-list-status {
  flex: 0 0 auto;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(207, 75, 69, 0.12);
}

.website-list {
  display: grid;
  min-height: 0;
  grid-auto-rows: minmax(58px, auto);
}

html.is-embedded .website-list {
  flex: 1 1 auto;
  align-content: start;
  overflow: hidden;
}

.website-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 16px;
  align-items: center;
  min-height: 58px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(207, 75, 69, 0.1);
}

html.is-embedded .website-item {
  min-height: 58px;
}

.website-item:last-child {
  border-bottom: 0;
}

.website-title-row,
.website-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.website-title-row {
  min-width: 0;
  flex-wrap: nowrap;
}

.website-name {
  min-width: 0;
  max-width: min(520px, 100%);
  overflow: hidden;
  color: #3f2d2a;
  font-size: 17px;
  font-weight: 550;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.website-name:hover {
  color: #cf4b45;
}

.website-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: #fff3f1;
  color: #cf4b45;
  font-size: 16px;
}

.website-meta {
  display: flex;
  min-width: 0;
  flex-wrap: nowrap;
  gap: 8px 12px;
  margin-top: 3px;
  overflow: hidden;
  white-space: nowrap;
}

.website-meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.website-meta span:first-child {
  flex: 0 0 auto;
}

html.is-embedded .website-meta {
  max-height: 26px;
  overflow: hidden;
}

.website-actions {
  justify-content: flex-end;
  min-width: 92px;
}

.website-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #8b4a45;
  cursor: pointer;
}

.website-icon-button:hover {
  color: #cf4b45;
  background: #fff3f1;
}

.website-icon-button[disabled] {
  cursor: not-allowed;
  opacity: .38;
}

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

.website-pagination {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 54px;
  padding: 8px 16px;
  border-top: 1px solid rgba(207, 75, 69, 0.12);
}

.website-dialog {
  width: min(620px, calc(100vw - 24px));
  border: 0;
  border-radius: 16px;
  padding: 0;
  color: #3f2d2a;
  box-shadow: 0 22px 70px rgba(63, 45, 42, 0.22);
}

.website-dialog::backdrop {
  background: rgba(63, 45, 42, 0.34);
}

.website-dialog form {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.website-dialog header,
.website-dialog footer,
.website-form-grid {
  display: flex;
  align-items: center;
  gap: 12px;
}

.website-dialog header,
.website-dialog footer {
  justify-content: space-between;
}

.website-dialog h2 {
  margin: 0;
  color: #cf4b45;
  font-size: 22px;
  font-weight: 550;
}

.website-field {
  display: grid;
  gap: 8px;
}

.website-field span,
.website-check {
  color: #59433f;
}

.website-form-grid .website-field {
  flex: 1 1 0;
}

.website-check {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 36px;
}

.website-check input {
  width: 17px;
  height: 17px;
  accent-color: #cf4b45;
}

.website-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  max-width: min(420px, calc(100vw - 44px));
  padding: 13px 16px;
  color: #fff;
  background: #cf4b45;
  border-radius: 14px;
  box-shadow: 0 16px 36px rgba(207, 75, 69, 0.26);
}

.website-toast[hidden] {
  display: none;
}

.website-tag-panel {
  display: none;
}

.website-list {
  grid-auto-rows: 44px;
}

.website-table-row {
  display: grid;
  grid-template-columns: 11em 52ch minmax(96px, 1fr) minmax(76px, 1fr) minmax(64px, .8fr) minmax(64px, .8fr);
  align-items: center;
  min-height: 44px;
  border-bottom: 1px solid rgba(207, 75, 69, 0.1);
}

.website-table-row.website-item {
  gap: 0;
  min-height: 44px;
  padding: 0;
}

html.is-embedded .website-table-row.website-item {
  min-height: 44px;
}

.website-table-head {
  min-height: 42px;
  background: #fff8f4;
  color: #856b65;
}

.website-table-row > div {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 0 14px;
  line-height: 44px;
  text-align: center;
}

.website-table-head > div {
  height: 42px;
  line-height: 42px;
}

.website-title-cell,
.website-url-cell,
.website-category-cell,
.website-top-cell,
.website-action-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
}

.website-url,
.website-name,
.website-category-cell,
.website-top-cell {
  overflow: hidden;
  font-size: 16px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.website-url {
  display: inline-block;
  width: min(50ch, 100%);
  max-width: 50ch;
  color: #3f2d2a;
  text-decoration: none;
}

.website-name {
  display: inline-block;
  width: min(10em, 100%);
  max-width: 10em;
  color: #3f2d2a;
  text-decoration: none;
}

.website-url:hover,
.website-name:hover {
  color: #cf4b45;
}

.website-action-cell {
  justify-content: center;
}

.website-top-cell {
  justify-content: center;
  color: #59433f;
}

@media (max-width: 840px) {
  .website-manager-toolbar {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .website-form-grid {
    flex-direction: column;
  }

  .website-manager-heading {
    align-items: flex-start;
  }

  .website-item {
    grid-template-columns: minmax(0, 1fr) 92px;
  }

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

  .website-table-row {
    grid-template-columns: 9em 38ch minmax(76px, 1fr) minmax(62px, .9fr) minmax(46px, .7fr) minmax(46px, .7fr);
  }

  .website-table-row > div {
    padding: 0 8px;
  }
}

@media (max-width: 620px) {
  .website-manager-shell {
    width: min(100% - 20px, 1440px);
    padding-top: 10px;
  }

  .website-manager-topbar {
    padding: 12px 14px;
  }
}
