@import "variables.css";

/* === 全局重置与基础 === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}
ul {
  list-style: none;
}
button {
  font-family: inherit;
  cursor: pointer;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* === 侧边栏 === */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 260px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition:
    width 0.3s ease,
    transform 0.3s ease;
}
.sidebar-header {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.sidebar .logo {
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
}
.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
}
.logo-text {
  white-space: nowrap;
  overflow: hidden;
  transition:
    opacity 0.2s,
    width 0.2s;
}
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px;
}
.nav-section {
  margin-bottom: 8px;
}
.nav-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-disabled);
  letter-spacing: 0.05em;
  padding: 0 12px;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
}
.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-main);
}
.nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}
.nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.nav-text {
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

/* === 侧边栏折叠 === */
.sidebar-collapsed .sidebar {
  width: 72px;
}
.sidebar-collapsed .logo-text,
.sidebar-collapsed .nav-text,
.sidebar-collapsed .nav-section-title {
  opacity: 0;
  width: 0;
}
.sidebar-collapsed .sidebar-header {
  justify-content: center;
}
.sidebar-collapsed .nav-item {
  justify-content: center;
  padding: 10px;
}

/* === 主内容区 === */
.main-wrapper {
  margin-left: 260px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.3s ease;
}
.sidebar-collapsed .main-wrapper {
  margin-left: 72px;
}

/* === 头部导航 === */
.header {
  background: var(--bg-body);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  transition: var(--transition);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  gap: 16px;
}
.header.scrolled {
  box-shadow: var(--shadow-sm);
}
.header.scrolled .header-inner {
  padding: 12px 24px;
}
.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}
.header-nav-item {
  font-size: 15px;
  color: var(--text-muted);
  font-weight: 500;
}
.header-nav-item.active {
  color: var(--text-main);
}
.header-nav-sep {
  color: var(--text-disabled);
  font-size: 14px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 8px;
  cursor: pointer;
}
/* === 全局提示条 === */
.global-notice-area {
  display: none;
  padding: 16px 24px 0;
}
.global-notice-area.show {
  display: block;
}
.install-state-notice {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 14px;
  line-height: 1.6;
}
.install-state-notice a {
  text-decoration: underline;
  font-weight: 500;
}
.install-state-notice.warning {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.08);
  color: #b45309;
}
.install-state-notice.info {
  border-color: rgba(59, 130, 246, 0.28);
  background: rgba(59, 130, 246, 0.08);
  color: #1d4ed8;
}

/* === 页面内容 === */
.page-content {
  display: none;
  padding: 24px;
  flex: 1;
}
.page-content.active {
  display: block;
}
.page-header {
  margin-bottom: 24px;
}

.page-header h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}
.page-header p {
  color: var(--text-muted);
  font-size: 15px;
}

/* === 仪表盘 === */
.dashboard-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.dashboard-row {
  display: grid;
  gap: 24px;
}
.dashboard-row.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}
.dashboard-row.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* === 欢迎卡片 === */
.welcome-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.welcome-info h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}
.welcome-info p {
  color: var(--text-muted);
  font-size: 15px;
}
.welcome-stats {
  display: flex;
  gap: 32px;
}
.welcome-stat {
  text-align: center;
}
.welcome-stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
}
.welcome-stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* === 统计卡片 === */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: var(--transition);
}
.stat-card:hover {
  box-shadow: var(--shadow-md);
}
.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 500;
}
.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-main);
}
.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  font-size: 20px;
}

/* === 实例统计卡片 === */
.instance-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
}
.instance-stat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.instance-stat-title {
  font-size: 16px;
  font-weight: 600;
}
.instance-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.instance-stat-item {
  text-align: center;
  padding: 16px;
  background: var(--bg-muted);
  border-radius: var(--radius-md);
}
.instance-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
}
.instance-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* === 公告滚动卡片 === */
.announcement-scroll-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
}
.announcement-scroll-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.announcement-scroll-title {
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.announcement-scroll-list {
  max-height: 300px;
  overflow-y: auto;
}
.announcement-scroll-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.announcement-scroll-item:last-child {
  border-bottom: none;
}
.announcement-scroll-content {
  flex: 1;
  min-width: 0;
}
.announcement-scroll-content h4 {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
}
.announcement-scroll-content p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.announcement-scroll-link {
  font-size: 12px;
  color: var(--primary);
  white-space: nowrap;
}
.announcement-scroll-date {
  font-size: 12px;
  color: var(--text-disabled);
  white-space: nowrap;
}
.announcement-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
}

/* === 快捷操作 === */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.quick-action-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}
.quick-action-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}
.quick-action-icon {
  font-size: 28px;
  margin-bottom: 8px;
}
.quick-action-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-light);
}

/* === 管理实例卡片 === */
.manage-instance-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
}
.manage-instance-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.manage-instance-title {
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* === Hero区域 === */
.hero {
  text-align: center;
  padding: 60px 24px 50px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-light) 0%, transparent 50%);
}
.hero h1 {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  color: var(--text-main);
}
.hero p {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* === 产品卡片 === */
.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  padding-bottom: 60px;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
  transform: translateY(-2px);
}
.card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
}
.specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.spec {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-muted);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-light);
}
.spec-icon {
  font-size: 16px;
}
.spec-value {
  font-weight: 500;
}
.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
}
.price {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
}
.price-unit {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
}
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}
.badge-hot {
  background: var(--danger-bg);
  color: var(--danger);
}
.badge-new {
  background: var(--success-bg);
  color: var(--success);
}
.badge-out {
  background: var(--bg-muted);
  color: var(--text-disabled);
}

/* === 按钮 === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}
.btn-outline {
  background: transparent;
  color: var(--text-main);
  border-color: var(--border);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover {
  background: #dc2626;
}
.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}
.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 600;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* === 表单 === */
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-light);
  margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text-main);
  transition: var(--transition);
  font-family: inherit;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* === 订单区域 === */
.query-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  margin-top: 24px;
}
.section-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
}
.order-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.order-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: var(--transition);
}
.order-item:hover {
  box-shadow: var(--shadow-sm);
}
.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.order-no {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  color: var(--text-muted);
}
.order-status {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}
.status-paid {
  background: var(--success-bg);
  color: var(--success);
}
.status-pending {
  background: var(--warning-bg);
  color: var(--warning);
}
.status-refunded {
  background: var(--danger-bg);
  color: var(--danger);
}
.status-delivered {
  background: var(--primary-light);
  color: var(--primary);
}
.order-info {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.order-info-item {
  font-size: 13px;
  color: var(--text-muted);
}
.order-info-item strong {
  color: var(--text-main);
  font-weight: 500;
}
.order-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

/* === 弹窗 === */
.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal-bg.show {
  display: flex;
}
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid var(--border);
}
.modal-head h3 {
  font-size: 18px;
  font-weight: 600;
}
.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--bg-muted);
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover {
  background: var(--danger-bg);
  color: var(--danger);
}
.modal-body {
  padding: 24px;
}
.modal-foot {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

.refund-summary-card {
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(
    180deg,
    rgba(99, 102, 241, 0.1),
    rgba(255, 255, 255, 0.02)
  );
  margin-bottom: 18px;
}
.refund-summary-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 8px;
}
.refund-summary-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.refund-summary-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  word-break: break-all;
}
.refund-summary-tip {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
}
.refund-option-list {
  display: grid;
  gap: 12px;
}
.refund-option-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-muted);
  cursor: pointer;
  transition: var(--transition);
}
.refund-option-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.refund-option-card input {
  margin-top: 3px;
  accent-color: var(--primary);
}
.refund-option-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}
.refund-option-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* === VPS信息 === */
.vps-info {
  background: var(--bg-muted);
  border-radius: var(--radius-md);
  padding: 20px;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
}
.vps-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}
.vps-row:last-child {
  border-bottom: none;
}
.vps-label {
  color: var(--text-muted);
  flex-shrink: 0;
}
.vps-value {
  color: var(--text-main);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vps-row code {
  word-break: break-all;
  white-space: normal;
}
.copy-btn {
  padding: 4px 10px;
  background: var(--primary-light);
  color: var(--primary);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
}
.copy-btn:hover {
  background: var(--primary);
  color: #fff;
}
.copy-btn.copied {
  background: var(--success);
  color: #fff;
}

/* === 工单系统 === */
.ticket-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ticket-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: var(--transition);
}
.ticket-item:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--primary);
}
.ticket-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.ticket-title {
  font-weight: 500;
  font-size: 15px;
}
.ticket-status {
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
}
.ticket-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
}
.ticket-reply {
  padding: 16px;
  margin-bottom: 12px;
  border-radius: var(--radius-md);
  background: var(--bg-muted);
  border-left: 3px solid var(--border);
}
.ticket-reply.admin {
  border-left-color: var(--primary);
  background: var(--primary-light);
}
.ticket-reply-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 13px;
}
.ticket-reply-author {
  font-weight: 600;
}
.ticket-reply-time {
  color: var(--text-muted);
}
.ticket-reply-content {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-light);
}
.ticket-attachment {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-muted);
  border-radius: var(--radius-sm);
  font-size: 12px;
  margin-top: 8px;
}
.ticket-attachment-name {
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* === 公告列表 === */
.announcement-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.announcement-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.announcement-item h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}
.announcement-item p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}
.announcement-date {
  font-size: 12px;
  color: var(--text-disabled);
  margin-top: 12px;
}

/* === 分页 === */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}
.pagination button {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
}
.pagination button:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.pagination button.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* === 通知系统 === */
.notification-wrapper {
  position: relative;
}
.notification-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}
.notification-btn:hover {
  background: var(--bg-hover);
  color: var(--text-main);
  border-color: var(--primary);
}
.notification-btn:active {
  transform: scale(0.95);
}
.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  border-radius: 9px;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
}
.notification-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 360px;
  max-height: 480px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 100;
  overflow: hidden;
}
.notification-panel.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.notification-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-muted);
}
.notification-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}
.notification-mark-all {
  padding: 4px 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
}
.notification-mark-all:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.notification-list {
  max-height: 360px;
  overflow-y: auto;
}
.notification-item {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  position: relative;
  cursor: pointer;
  transition: background 0.2s ease;
}
.notification-item:hover {
  background: var(--bg-hover);
}
.notification-item.unread {
  background: var(--primary-light);
}
.notification-item.unread::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--primary);
}
.notification-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
}
.notification-icon.success {
  background: var(--success-bg);
  color: var(--success);
}
.notification-icon.warning {
  background: var(--warning-bg);
  color: var(--warning);
}
.notification-icon.error {
  background: var(--danger-bg);
  color: var(--danger);
}
.notification-content {
  flex: 1;
  min-width: 0;
  position: relative;
}
.notification-content-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notification-content-text {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.notification-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
}
.notification-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}
.notification-footer {
  padding: 12px 16px;
  text-align: center;
  border-top: 1px solid var(--border);
  background: var(--bg-muted);
}
.notification-footer a {
  color: var(--primary);
  font-size: 13px;
  font-weight: 500;
}
.notification-footer a:hover {
  text-decoration: underline;
}
.notification-login-prompt {
  background: var(--bg-card);
}

/* === Toast提示 === */
.toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text-main);
  color: var(--bg-body);
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 9999;
}
.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* === Footer === */
.footer {
  padding: 48px 0;
  margin-top: 60px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* === 用户区域 === */
.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}
.user-name {
  font-size: 14px;
  font-weight: 500;
}
.user-role {
  font-size: 11px;
  color: var(--text-muted);
}
.login-btn {
  padding: 8px 20px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.login-btn:hover {
  background: var(--primary-hover);
}

/* === 欢迎卡片补充 === */
.welcome-avatar {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.welcome-greeting {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}
.welcome-quote {
  font-size: 14px;
  color: var(--text-muted);
}
.welcome-card {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* === 实例统计补充 === */
.instance-stat-card {
  display: flex;
  align-items: center;
  gap: 20px;
  cursor: pointer;
}
.instance-stat-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  background: var(--success-bg);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.instance-stat-info {
  flex: 1;
}
.instance-stat-value {
  font-size: 24px;
  font-weight: 700;
}

/* === 快速操作补充 === */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.quick-action-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-light);
}

/* === 管理实例补充 === */
.manage-instance-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.manage-instance-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* === 空状态 === */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}
.empty-state p {
  font-size: 15px;
}

/* === 公告滚动空状态 === */
.announcement-scroll-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* === 优惠券 === */
.coupon-section {
  margin-bottom: 20px;
}
.coupon-input-group {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}
.coupon-input-group input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  background: var(--bg-input);
}
.coupon-input-group input:focus {
  outline: none;
  border-color: var(--primary);
}
.coupon-msg {
  font-size: 13px;
  margin-top: 6px;
  min-height: 20px;
}

/* === OAuth === */
.oauth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--text-disabled);
  font-size: 13px;
}
.oauth-divider::before,
.oauth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.btn-linuxdo {
  background: #1a1a2e;
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-linuxdo:hover {
  background: #16162a;
}

/* === 响应式 === */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar-open .sidebar {
    transform: translateX(0);
  }
  .sidebar-open .sidebar-overlay {
    opacity: 1;
    visibility: visible;
  }
  .main-wrapper {
    margin-left: 0 !important;
  }
  .menu-btn {
    display: flex;
  }
  .dashboard-row.cols-2,
  .dashboard-row.cols-3 {
    grid-template-columns: 1fr;
  }
  .welcome-card {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }
  .welcome-stats {
    justify-content: center;
  }
}
@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }
  .global-notice-area {
    padding: 12px 0 0;
  }

  .hero h1 {
    font-size: 32px;
  }
  .hero p {
    font-size: 15px;
    max-width: 100%;
    margin-bottom: 24px;
  }
  .hero {
    padding: 50px 16px 40px;
  }
  .header-inner {
    padding: 12px 16px;
  }
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .stat-card {
    padding: 20px;
  }
  .stat-value {
    font-size: 24px;
  }
  .page-header h2 {
    font-size: 24px;
  }
  .products {
    grid-template-columns: 1fr;
    gap: 20px;
    padding-bottom: 40px;
  }
  .card {
    padding: 24px;
  }
  .price {
    font-size: 24px;
  }
  .query-box {
    padding: 24px;
    margin-top: 40px;
  }
  .section-title {
    font-size: 18px;
  }
  .order-item {
    padding: 20px;
  }
  .order-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .modal {
    width: 95%;
    max-width: none;
  }
  .modal-head {
    padding: 20px;
  }
  .modal-body {
    padding: 20px;
  }
  .modal-foot {
    padding: 16px 20px;
    flex-direction: column;
  }
  .modal-foot .btn {
    width: 100%;
  }
  .vps-info {
    padding: 16px;
    font-size: 12px;
  }
  .vps-row {
    flex-direction: column;
    gap: 4px;
    padding: 10px 0;
  }
  .vps-row code {
    word-break: break-all;
  }
  .footer {
    padding: 40px 0;
    margin-top: 40px;
  }
  .notification-panel {
    position: fixed;
    top: 56px;
    right: 8px;
    left: 8px;
    width: auto;
    max-height: calc(100vh - 80px);
    z-index: 1000;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 26px;
  }
  .hero p {
    font-size: 14px;
  }
  .hero {
    padding: 40px 16px 30px;
  }
  .btn-lg {
    padding: 12px 20px;
    font-size: 14px;
  }
  .specs {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .spec {
    padding: 10px 14px;
  }
  .spec-value {
    font-size: 14px;
  }
  .card {
    padding: 20px;
  }
  .card h3 {
    font-size: 18px;
    margin-bottom: 20px;
  }
  .card-footer {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
    padding-top: 20px;
  }
  .card-footer .btn {
    width: 100%;
    padding: 12px;
  }
  .price {
    font-size: 22px;
    text-align: center;
  }
  .page-content {
    padding: 16px;
  }
  .instance-stat-grid {
    grid-template-columns: 1fr;
  }
  .quick-actions-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* === 未登录提示卡片 === */
.login-required-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 32px 48px;
  text-align: center;
  border-radius: var(--radius-xl);
  background: linear-gradient(160deg, rgba(59, 130, 246, 0.06) 0%, rgba(99, 102, 241, 0.02) 50%, transparent 100%);
  border: 1px dashed var(--border);
  margin: 16px 0;
  position: relative;
  overflow: hidden;
}
.login-required-card::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.login-required-card::after {
  content: "";
  position: absolute;
  bottom: -40px;
  left: -40px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.login-required-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(99, 102, 241, 0.06) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--primary);
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.08);
}
.login-required-hint {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-light);
  margin-bottom: 8px;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}
.login-required-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.5;
  max-width: 320px;
  position: relative;
  z-index: 1;
}
.login-required-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.login-required-btn {
  padding: 10px 28px !important;
  font-size: 14px !important;
  border-radius: var(--radius-lg) !important;
}
.login-required-btn-secondary {
  padding: 10px 20px !important;
  font-size: 13px !important;
  border-radius: var(--radius-lg) !important;
}
/* 紧凑模式 */
.login-required-compact {
  padding: 32px 20px 28px;
  margin: 8px 0;
}
.login-required-compact .login-required-icon {
  width: 60px;
  height: 60px;
  margin-bottom: 14px;
}
.login-required-compact .login-required-hint {
  font-size: 13px;
}
.login-required-compact .login-required-sub {
  font-size: 12px;
  margin-bottom: 16px;
}
.login-required-compact .login-required-actions {
  gap: 8px;
}
.login-required-compact .login-required-btn {
  padding: 8px 20px !important;
  font-size: 13px !important;
}
.login-required-compact .login-required-btn-secondary {
  padding: 8px 16px !important;
  font-size: 12px !important;
}
@media (max-width: 480px) {
  .login-required-card {
    padding: 40px 20px 32px;
  }
  .login-required-actions {
    flex-direction: column;
    width: 100%;
  }
  .login-required-actions .btn {
    width: 100%;
  }
}

/* === 分页控件 === */
.pagination-widget {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 20px 0 8px;
  flex-wrap: wrap;
}
.pagination-info {
  color: var(--text-muted);
  font-size: 12px;
  white-space: nowrap;
}
.pagination-btns {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-light);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  line-height: 1;
}
.pagination-btn svg {
  display: block;
}
.pagination-btn:hover:not(:disabled):not(.active) {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(99, 102, 241, 0.08);
}
.pagination-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  pointer-events: none;
}
.pagination-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.pagination-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 32px;
  color: var(--text-muted);
  font-size: 14px;
  letter-spacing: 2px;
  user-select: none;
}

@media (max-width: 480px) {
  .pagination-widget {
    flex-direction: column;
    gap: 8px;
  }
  .pagination-btn {
    min-width: 28px;
    height: 28px;
    font-size: 12px;
  }
}
