.shein-instance-picker {
  width: 100%;
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid #315e54;
  border-radius: 10px;
  background: #0b1b1a;
}

.shein-instance-picker small,
.instance-options small {
  color: var(--muted);
  font-weight: 400;
}

.shein-instance-picker span,
.instance-options span {
  display: grid;
  gap: 3px;
}

.shein-permission {
  display: grid;
  align-items: start;
}

.instance-options {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.instance-options .check-option {
  align-items: flex-start;
}

.shopee-permission {
  grid-column: 1 / -1;
}

.permission-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.permission-count {
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid #315e54;
  border-radius: 999px;
  background: #0b1b1a;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.owner-shop-summary {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px dashed #315e54;
  border-radius: 9px;
  color: var(--muted);
  background: #0b151d;
}

.shop-permission-details {
  width: 100%;
  margin-top: 12px;
  border: 1px solid #2a3c52;
  border-radius: 10px;
  background: #0b131f;
  overflow: hidden;
}

.shop-create-picker {
  margin-top: 0;
}

.shop-permission-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  color: #dce7f5;
}

.shop-permission-details > summary::-webkit-details-marker {
  display: none;
}

.shop-permission-details > summary::after {
  content: "⌄";
  margin-left: 4px;
  color: var(--accent);
  font-size: 18px;
  transition: transform .18s ease;
}

.shop-permission-details[open] > summary::after {
  transform: rotate(180deg);
}

.shop-permission-details > summary span:first-child {
  display: grid;
  gap: 3px;
}

.shop-permission-details > summary small {
  color: var(--muted);
  font-weight: 400;
}

.details-action {
  margin-left: auto;
  color: var(--accent);
  font-size: 12px;
}

.shop-picker-toolbar {
  padding: 10px 12px;
  border-top: 1px solid #223247;
}

.shop-picker-toolbar input {
  padding: 9px 11px;
}

.shop-options {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  max-height: 330px;
  margin-top: 0;
  padding: 2px 12px 12px;
  overflow-y: auto;
}

.shop-option {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #223247;
  border-radius: 8px;
  background: #101927;
}

.shop-option span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.shop-option[hidden] {
  display: none;
}

@media (max-width: 720px) {
  .permission-card-heading {
    display: grid;
  }

  .shop-options {
    grid-template-columns: 1fr;
  }
}

/* 账号有效期徽章与管理操作样式 */
.account-title-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.account-title-line h3 {
  margin: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid;
  letter-spacing: 0.02em;
}

.badge-permanent {
  background: #112233;
  border-color: #234563;
  color: #79b8ff;
}

.badge-valid {
  background: #0d281e;
  border-color: #19523c;
  color: #52e3a7;
}

.badge-warning {
  background: #2b1f0d;
  border-color: #634515;
  color: #f7ba53;
}

.badge-expired {
  background: #2f1317;
  border-color: #68232c;
  color: #ff7875;
}

.user-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid;
}

.home-expiration-pill {
  display: inline-flex;
  align-items: center;
  margin-left: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  border: 1px solid;
  vertical-align: middle;
}

.home-expiration-pill strong {
  margin-left: 4px;
}

.account-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #1c2738;
}

.expiration-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
}

.exp-form-label {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.expiration-form input[type="date"] {
  width: auto;
  min-width: 145px;
  padding: 7px 10px;
  font-size: 13px;
}

.expiration-form button {
  padding: 7px 13px;
  font-size: 13px;
}

.reset-exp-btn {
  margin-left: 4px;
  font-size: 12px;
  color: #8bb3e0;
  text-decoration: underline;
  cursor: pointer;
}

@media (min-width: 851px) {
  .account-create-grid {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    align-items: start;
  }
}

/* 快捷预设月份样式 */
.expiration-field-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.expiration-field-container label {
  margin: 0;
}

.expiration-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-preset-row {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.preset-hint {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.preset-chip {
  padding: 3px 8px !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  line-height: 1.3 !important;
  border-radius: 6px !important;
  background: #192638 !important;
  color: #a8c7ed !important;
  border: 1px solid #283d57 !important;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.preset-chip:hover {
  background: #233752 !important;
  border-color: var(--accent) !important;
  color: #fff !important;
  transform: translateY(-1px);
}

.preset-chip.custom-chip {
  background: #252336 !important;
  border-color: #4a3e6b !important;
  color: #c9b3f7 !important;
}

.preset-chip.custom-chip:hover {
  border-color: #a782f6 !important;
  color: #fff !important;
}

.preset-chip.clear-chip {
  background: #2b1d20 !important;
  border-color: #523136 !important;
  color: #f7a8b0 !important;
}

.preset-chip.clear-chip:hover {
  border-color: #f87171 !important;
  color: #fff !important;
}

/* 输入框填充微动画高亮 */
@keyframes flashGlow {
  0% {
    border-color: #52e3a7;
    box-shadow: 0 0 10px rgba(82, 227, 167, 0.45);
  }
  100% {
    border-color: var(--line);
    box-shadow: none;
  }
}

.input-highlight {
  animation: flashGlow 0.8s ease-out forwards;
}

/* 顶部悬浮 Toast 弹窗通知（自动 3 秒关闭） */
.toast-container {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  width: max-content;
  max-width: min(92vw, 600px);
}

.toast-item {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: 12px;
  background: rgba(18, 26, 39, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08);
  color: #f0f4fc;
  font-size: 14px;
  font-weight: 500;
  animation: toastSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast-item.toast-success {
  border-left: 4px solid #52e3a7;
}

.toast-item.toast-error {
  border-left: 4px solid #ff7875;
}

.toast-item.toast-warning {
  border-left: 4px solid #f59e0b;
  background: #19160d;
}

.toast-item.toast-info {
  border-left: 4px solid #79b8ff;
}

.toast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.toast-success .toast-icon {
  background: rgba(82, 227, 167, 0.2);
  color: #52e3a7;
}

.toast-error .toast-icon {
  background: rgba(255, 120, 117, 0.2);
  color: #ff7875;
}

.toast-warning .toast-icon {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.session-status.online {
  color: #52e3a7;
  font-weight: 600;
}

.session-status.offline {
  color: var(--muted);
}

.toast-text {
  flex: 1;
  line-height: 1.4;
  word-break: break-word;
}

.toast-close {
  background: none !important;
  border: none !important;
  padding: 0 4px !important;
  color: var(--muted) !important;
  font-size: 18px !important;
  line-height: 1 !important;
  cursor: pointer !important;
  opacity: 0.7;
  transition: opacity 0.15s ease, color 0.15s ease;
  margin-left: 6px;
}

.toast-close:hover {
  opacity: 1;
  color: #fff !important;
}

@keyframes toastSlideDown {
  0% {
    opacity: 0;
    transform: translateY(-16px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.toast-item.toast-fade-out {
  opacity: 0;
  transform: translateY(-12px) scale(0.96);
  pointer-events: none;
}

/* 账号搜索与多维筛选工具栏 */
.account-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0 10px;
  padding: 14px 16px;
  background: #0d1522;
  border: 1px solid #1f2e44;
  border-radius: 12px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 240px;
  min-width: 200px;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: var(--muted);
  pointer-events: none;
}

.search-box input[type="search"] {
  width: 100%;
  padding: 8px 12px 8px 36px;
  font-size: 13px;
  border-radius: 8px;
  border: 1px solid #24354c;
  background: #080d15;
  color: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box input[type="search"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(98, 230, 181, 0.2);
}

.filter-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

.filter-label select {
  padding: 7px 10px;
  font-size: 13px;
  background: #080d15;
  color: #e2eaf8;
  border: 1px solid #24354c;
  border-radius: 8px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}

.filter-label select:focus {
  border-color: var(--accent);
}

.reset-filter-btn {
  padding: 6px 12px !important;
  font-size: 12px !important;
  background: #1e2c3d !important;
  color: #a3c2e6 !important;
  border-radius: 8px !important;
  white-space: nowrap;
}

.reset-filter-btn:hover {
  background: #2b3d52 !important;
  color: #fff !important;
}

.filter-summary-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 6px 4px 14px;
}

.filter-count-text {
  font-size: 12px;
  color: var(--muted);
}

.filter-count-text strong {
  color: var(--accent);
}

.empty-results-box {
  padding: 44px 20px;
  text-align: center;
  background: #0a111a;
  border: 1px dashed #223247;
  border-radius: 12px;
  margin: 12px 0 20px;
}

.empty-results-box .empty-icon {
  font-size: 36px;
  margin-bottom: 10px;
  opacity: 0.85;
}

.empty-results-box p {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 16px;
}

@media (max-width: 900px) {
  .account-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-group {
    flex-wrap: wrap;
  }

  .pagination-container {
    flex-direction: column;
    align-items: stretch;
  }

  .pagination-pages-wrapper {
    justify-content: space-between;
  }
}

.filter-submit-btn {
  padding: 6px 14px !important;
  font-size: 13px !important;
  border-radius: 8px !important;
  background: #173836 !important;
  color: var(--accent) !important;
  border: 1px solid #23544c !important;
  cursor: pointer;
}

.filter-submit-btn:hover {
  background: #1d4744 !important;
  border-color: var(--accent) !important;
}

/* 精炼卡片：应用授权标签胶囊 */
.user-app-overview {
  margin: 12px 0 10px;
  padding: 10px 14px;
  background: rgba(13, 21, 34, 0.6);
  border: 1px solid #1a283b;
  border-radius: 10px;
}

.user-app-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.tags-label {
  font-size: 12px;
  color: var(--muted);
  margin-right: 4px;
}

.app-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  border: 1px solid #2a3d54;
  background: #101c2b;
  color: #c9d8ec;
}

.app-tag-pill strong {
  color: var(--accent);
  font-weight: 600;
}

.app-tag-pill.pill-owner {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.15), rgba(202, 138, 4, 0.25));
  border-color: rgba(234, 179, 8, 0.5);
  color: #fef08a;
  font-weight: 600;
}

.app-tag-pill.pill-shopee {
  background: rgba(238, 77, 45, 0.12);
  border-color: rgba(238, 77, 45, 0.4);
  color: #ff8a75;
}

.app-tag-pill.pill-aliexpress {
  background: rgba(255, 106, 0, 0.12);
  border-color: rgba(255, 106, 0, 0.4);
  color: #ffad7a;
}

.app-tag-pill.pill-pre_image {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.4);
  color: #93c5fd;
}

.app-tag-pill.pill-shein {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

.app-tag-pill.pill-empty {
  background: transparent;
  border-style: dashed;
  color: var(--muted);
}

/* 抽屉式应用授权展开器 */
.permission-edit-drawer {
  margin-top: 10px;
  border: 1px solid #1f2e44;
  border-radius: 10px;
  background: #0b1420;
  overflow: hidden;
  transition: all 0.2s ease;
}

.permission-edit-drawer[open] {
  border-color: #2b4566;
  background: #080f19;
}

.drawer-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  cursor: pointer;
  list-style: none;
  font-size: 13px;
  color: #b0c9e6;
  user-select: none;
  background: #0d1726;
  transition: background 0.15s ease, color 0.15s ease;
}

.drawer-summary:hover {
  background: #111e32;
  color: #fff;
}

.drawer-summary::-webkit-details-marker {
  display: none;
}

.drawer-summary-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.drawer-chevron {
  font-size: 11px;
  color: var(--muted);
  transition: transform 0.2s ease;
}

.permission-edit-drawer[open] .drawer-chevron {
  transform: rotate(180deg);
  color: var(--accent);
}

.drawer-body {
  padding: 16px 14px;
  border-top: 1px solid #1f2e44;
}

/* 分页器组件 */
.pagination-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
  padding: 14px 18px;
  background: #0b131f;
  border: 1px solid #1a283c;
  border-radius: 12px;
}

.pagination-size-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.page-size-select {
  padding: 5px 10px;
  font-size: 13px;
  border-radius: 6px;
  border: 1px solid #23354b;
  background: #080d16;
  color: #e2eaf8;
  outline: none;
  cursor: pointer;
}

.page-size-select:focus {
  border-color: var(--accent);
}

.pagination-total-text {
  margin-left: 6px;
  color: var(--muted);
}

.pagination-pages-wrapper {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.pagination-nav {
  display: inline-flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 4px;
}

.pagination-nav li {
  display: inline;
}

.page-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid #1f2e44;
  background: #0e1826;
  color: #b0c6e0;
  text-decoration: none;
  transition: all 0.15s ease;
  user-select: none;
}

.page-nav-btn:hover:not(.disabled):not(.active) {
  background: #18283d;
  border-color: #2f4769;
  color: #fff;
}

.page-nav-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #041212;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(98, 230, 181, 0.35);
}

.page-nav-btn.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: #0a111a;
  border-color: #162232;
  color: var(--muted);
}

.pagination-jump {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.pagination-jump input {
  width: 52px;
  padding: 5px 6px;
  font-size: 13px;
  text-align: center;
  border-radius: 6px;
  border: 1px solid #23354b;
  background: #080d16;
  color: #fff;
  outline: none;
}

.pagination-jump input:focus {
  border-color: var(--accent);
}

.jump-btn {
  padding: 5px 12px !important;
  font-size: 12px !important;
  border-radius: 6px !important;
}

/* 标题栏操作区与创建账号按钮 */
.panel-heading-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.create-account-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #051412 !important;
  background: var(--accent) !important;
  border: 1px solid var(--accent) !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 10px rgba(98, 230, 181, 0.25);
  cursor: pointer;
  transition: all 0.18s ease;
}

.create-account-trigger-btn:hover {
  background: #7ef0cb !important;
  border-color: #7ef0cb !important;
  box-shadow: 0 4px 16px rgba(98, 230, 181, 0.4);
  transform: translateY(-1px);
}

.create-account-trigger-btn:active {
  transform: translateY(0);
}

/* 创建账号模态弹窗 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 9, 16, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: modalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-dialog {
  position: relative;
  width: 100%;
  max-width: 820px;
  max-height: 90vh;
  background: #0d1624;
  border: 1px solid #233750;
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalSlideUp 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid #1c2b3e;
  background: #0f1a2b;
}

.modal-header h2 {
  margin: 0 0 4px;
  font-size: 18px;
  color: #fff;
}

.modal-header .muted {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.modal-close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  background: #142236 !important;
  border: 1px solid #233750 !important;
  border-radius: 8px !important;
  color: var(--muted) !important;
  font-size: 16px !important;
  line-height: 1 !important;
  cursor: pointer;
  transition: all 0.15s ease;
}

.modal-close:hover {
  background: #1e3352 !important;
  color: #fff !important;
  border-color: #3b5a82 !important;
}

.modal-body {
  padding: 22px 24px 24px;
  overflow-y: auto;
  max-height: calc(90vh - 80px);
}

.modal-create-form {
  display: grid;
  gap: 16px;
}

.modal-footer-actions {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #1c2b3e;
}

.modal-footer-actions button {
  min-width: 96px;
  height: 38px !important;
  padding: 0 20px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 8px !important;
  line-height: 1 !important;
  box-sizing: border-box;
  cursor: pointer;
  transition: all 0.18s ease;
}

.modal-footer-actions button.secondary {
  background: #172436 !important;
  border: 1px solid #283e58 !important;
  color: #c4d7ed !important;
}

.modal-footer-actions button.secondary:hover {
  background: #22354e !important;
  border-color: #3d5b80 !important;
  color: #fff !important;
}

.modal-footer-actions .modal-submit-btn {
  background: var(--accent) !important;
  border: 1px solid var(--accent) !important;
  color: #041212 !important;
  box-shadow: 0 2px 10px rgba(98, 230, 181, 0.25);
}

.modal-footer-actions .modal-submit-btn:hover {
  background: #7ef0cb !important;
  border-color: #7ef0cb !important;
  box-shadow: 0 4px 16px rgba(98, 230, 181, 0.4);
  transform: translateY(-1px);
}

.modal-footer-actions .modal-submit-btn:active {
  transform: translateY(0);
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}





