/* 移动端样式合集 - 包含布局、域名管理、订单管理、实名模板管理的移动端适配样式 */

/* ========== 移动端布局样式 ========== */

/* 移动端菜单抽屉动画 */
.mobile-menu-drawer .n-drawer {
  transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-drawer .n-drawer-content {
  padding: 0;
}

.mobile-menu-drawer .n-drawer-header {
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
  /* background: #fafafa; */
}

.mobile-menu-drawer .n-drawer-body {
  padding: 0;
}

/* 移动端菜单项样式 */
.mobile-menu-drawer .n-menu {
  background: transparent;
}

/* .mobile-menu-drawer .n-menu-item {
  padding: 12px;
  margin: 0;
  border-radius: 0;
} */

.mobile-menu-drawer .n-menu-item:hover {
  background: #f5f5f5;
}

.mobile-menu-drawer .n-menu-item--selected {
  background: #e6f7ff;
  color: #1890ff;
}

/* 移动端底部菜单动画 */
.n-dropdown {
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* 移动端遮罩层 */
.mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-overlay.show {
  opacity: 1;
  visibility: visible;
}

/* ========== 卡片样式 ========== */

/* 域名管理移动端卡片样式 */
.domain-card {
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.domain-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

/* 订单管理移动端卡片样式 */
.order-card {
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.order-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

/* 实名模板管理移动端卡片样式 */
.template-card {
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.template-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

/* 通用移动端卡片样式 */

.mobile-card .n-card__content {
  padding: 12px;
}


/* 卡片列表容器样式 */
.template-card-list {
  width: 100%;
}

/* ========== 移动端适配 (max-width: 768px) ========== */
@media (max-width: 768px) {
  /* 表单移动端适配 */
  .n-form.n-form--inline {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  
  .n-form-item {
    width: 100% !important;
    margin-bottom: 8px;
  }
  
  .n-form-item .n-select,
  .n-form-item .n-input,
  .n-form-item .n-date-picker {
    width: 100% !important;
  }
  
  .n-form-item .w-28,
  .n-form-item .w-32,
  .n-form-item .w-64 {
    width: 100% !important;
  }
  
  /* 表单按钮组 */
  .n-space {
    width: 100%;
    justify-content: center;
    gap: 8px;
  }
  
  .n-space .n-button {
    flex: 1;
    min-width: 80px;
  }

  /* 头部按钮间距调整 */
  .n-layout-header .n-button {
    margin: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
  }
  
  /* Logo在移动端的调整 - 确保居中显示 */
  .mobile-logo {
    width: 112px; /* 7rem = 112px */
    z-index: 1;
  }
  
  .mobile-logo img {
    width: 60px;
    height: auto;
  }
  
  /* 移动端头部布局优化 */
  .n-layout-header {
    position: relative;
    padding-left: 16px;
    padding-right: 16px;
  }
  
  /* 确保左右按钮有足够的点击区域 */
  .n-layout-header > div:first-child,
  .n-layout-header > div:last-child {
    min-width: 48px;
    display: flex;
    justify-content: center;
  }
  
  /* 概览卡片移动端紧凑样式 */
  .n-card .n-card__content {
    padding: 12px 16px !important;
  }

  .mobile-card .n-card__content {
    padding: 14px 14px !important;
  }
  
  /* 概览卡片内容紧凑布局 */
  .n-card .flex.items-center.gap-4 {
    gap: 12px !important;
  }
  
  /* 图标容器尺寸调整 */
  .n-card .w-15.h-15 {
    width: 48px !important;
    height: 48px !important;
  }
  
  /* 文字内容间距调整 */
  .n-card .text-2xl {
    font-size: 20px !important;
    line-height: 1.2 !important;
    margin-bottom: 4px !important;
  }
  
  .n-card .text-sm {
    margin-bottom: 2px !important;
  }
  
  .n-card .text-xs {
    line-height: 1.3 !important;
  }
  
  /* 网格间距调整 */

  /* 底部版权信息移动端适配 */
  .n-layout-footer {
    padding: 12px 16px;
    text-align: center;
  }
  
  .n-layout-footer p {
    font-size: 12px;
    line-height: 1.4;
  }

  /* 域名卡片样式 */
  .domain-card {
    margin-bottom: 12px;
    border-radius: 8px;
  }
  
  .domain-card .n-card__content {
    padding: 16px !important;
  }
  
  /* 域名标题样式 */
  .domain-card .font-medium {
    font-size: 16px;
    line-height: 1.4;
    color: #1f2937;
  }
  
  /* 备注信息样式 */
  .domain-card .text-xs {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
  }
  
  /* 状态标签样式 */
  .domain-card .n-tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
  }
  
  /* 时间信息样式 */
  .domain-card .text-sm {
    font-size: 13px;
    line-height: 1.4;
  }
  
  .domain-card .text-gray-500 {
    color: #9ca3af;
    font-weight: 500;
  }
  
  .domain-card .text-gray-600 {
    color: #4b5563;
  }
  
  /* 操作按钮样式 */
  .domain-card .n-button {
    min-height: 32px;
    font-size: 13px;
    border-radius: 6px;
  }
  
  /* 图标样式 */
  .domain-card .i-mdi-earth {
    width: 18px;
    height: 18px;
  }

  /* 订单卡片样式 */
  .order-card {
    margin-bottom: 12px;
    border-radius: 8px;
  }
  
  .order-card .n-card__content {
    padding: 16px !important;
  }
  
  /* 订单号样式 */
  .order-card .font-medium {
    font-size: 16px;
    line-height: 1.4;
    color: #1f2937;
  }
  
  /* 域名信息样式 */
  .order-card .text-sm {
    font-size: 13px;
    line-height: 1.4;
  }
  
  .order-card .text-gray-500 {
    color: #9ca3af;
    font-weight: 500;
  }
  
  .order-card .text-gray-600 {
    color: #4b5563;
  }
  
  /* 状态标签样式 */
  .order-card .n-tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
  }
  
  /* 金额显示样式 */
  .order-card .amount-text {
    font-size: 18px;
    font-weight: 600;
    color: #059669;
  }
  
  /* 时间信息样式 */
  .order-card .time-text {
    font-size: 12px;
    color: #6b7280;
  }
  
  /* 操作按钮样式 */
  .order-card .n-button {
    min-height: 32px;
    font-size: 13px;
    border-radius: 6px;
  }
  
  /* 图标样式 */
  .order-card .i-mdi-receipt {
    width: 18px;
    height: 18px;
  }
  
  /* 概览卡片移动端适配 */
  .overview-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  .overview-card {
    padding: 8px;
  }
  
  .overview-card .n-card__content {
    padding: 8px !important;
  }
  
  .overview-card .text-2xl {
    font-size: 18px;
  }
  
  .overview-card .w-12 {
    width: 32px;
    height: 32px;
  }
  
  .overview-card .text-sm {
    font-size: 12px;
    margin-bottom: 2px;
  }

  .crad-list-mobile .n-card .n-card__content {
    padding: 16px !important;
  }

  /* 搜索切换按钮样式 */
  .search-toggle-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
  }
  
  .search-toggle-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }
  
  /* 移动端搜索表单样式 */
  .mobile-search-form {
    width: 100%;
  }
  
  .mobile-search-form .n-form {
    width: 100%;
  }
  
  .mobile-search-form .n-form-item {
    margin-bottom: 12px;
  }
  
  .mobile-search-form .n-date-picker,
  .mobile-search-form .n-select,
  .mobile-search-form .n-input {
    width: 100% !important;
  }

  /* 实名模板卡片样式 */
  .template-card {
    margin-bottom: 12px;
    border-radius: 8px;
  }
  
  .template-card .n-card__content {
    padding: 16px !important;
  }
  
  /* 模板标题样式 */
  .template-card .font-medium {
    font-size: 16px;
    line-height: 1.4;
    color: #1f2937;
  }
  
  /* 所有者信息样式 */
  .template-card .text-xs {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
  }
  
  /* 状态标签样式 */
  .template-card .n-tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
  }
  
  /* 信息文本样式 */
  .template-card .text-sm {
    font-size: 13px;
    line-height: 1.4;
  }
  
  .template-card .text-gray-500 {
    color: #9ca3af;
    font-weight: 500;
  }
  
  .template-card .text-gray-600 {
    color: #4b5563;
  }
  
  /* 操作按钮样式 */
  .template-card .n-button {
    min-height: 32px;
    font-size: 13px;
    border-radius: 6px;
  }
  
  /* 刷新按钮样式 */
  .template-card .n-button--quaternary {
    padding: 2px 6px;
    font-size: 11px;
    min-height: 24px;
  }
  
  /* 错误信息图标样式 */
  .template-card .text-red-500 {
    color: #ef4444;
  }
  
  /* 卡片内容间距优化 */
  .template-card .n-flex {
    gap: 8px;
  }
  
  /* 证件号码和电话号码脱敏文本样式 */
  .template-card .masked-text {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.5px;
  }

  /* 分页器在移动端居中 */
  .n-pagination {
    justify-content: center;
  }

  /* 空状态样式优化 */
  .empty-state {
    padding: 40px 20px;
  }
  
  .empty-state .n-button {
    width: 100%;
    max-width: 200px;
  }

  /* 移动端滚动优化 */
  .n-layout-content {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
  }
  
  /* 防止移动端缩放 */
  .n-layout {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
  }
}

/* ========== 响应式文本大小 (max-width: 480px) ========== */
@media (max-width: 480px) {
  .template-card .font-medium {
    font-size: 15px;
  }
  
  .template-card .text-sm {
    font-size: 12px;
  }
  
  .template-card .text-xs {
    font-size: 11px;
  }
  
  .template-card .n-tag {
    font-size: 10px;
    padding: 1px 6px;
  }
  
  .template-card .n-button {
    font-size: 12px;
    min-height: 30px;
  }
}

/* ========== 平板端适配 ========== */
@media (min-width: 768px) and (max-width: 1023px) {
  .n-layout-sider {
    width: 180px;
  }
  
  .n-layout-sider--collapsed {
    width: 60px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .domain-card {
    margin-bottom: 16px;
  }
  
  .domain-card .n-card__content {
    padding: 20px !important;
  }

  .order-card {
    margin-bottom: 16px;
  }
  
  .order-card .n-card__content {
    padding: 20px !important;
  }
}

/* ========== 移动端安全区域适配 ========== */
@supports (padding: max(0px)) {
  .n-layout-header {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }
  
  .n-layout-footer {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }
}


/* ========== 暗色主题适配 ========== */
@media (prefers-color-scheme: dark) {
  .domain-card,
  .order-card {
    background-color: #1f2937;
    border-color: #374151;
  }
  
  .domain-card .font-medium,
  .order-card .font-medium {
    color: #f9fafb;
  }
  
  .domain-card .text-gray-500,
  .order-card .text-gray-500 {
    color: #9ca3af;
  }
  
  .domain-card .text-gray-600,
  .order-card .text-gray-600 {
    color: #d1d5db;
  }
  
  .order-card .amount-text {
    color: #10b981;
  }
}

/* ========== 高对比度模式支持 ========== */
@media (prefers-contrast: high) {
  .mobile-menu-drawer .n-menu-item--selected {
    background: #000;
    color: #fff;
  }
  
  .mobile-menu-drawer .n-menu-item:hover {
    background: #333;
    color: #fff;
  }

  .domain-card,
  .order-card {
    border: 2px solid #000;
  }
  
  .domain-card .font-medium,
  .order-card .font-medium {
    font-weight: 700;
  }
}

/* ========== 减少动画模式支持 ========== */
@media (prefers-reduced-motion: reduce) {
  .mobile-menu-drawer .n-drawer,
  .n-dropdown,
  .mobile-overlay,
  .domain-card,
  .order-card,
  .template-card {
    transition: none;
  }
  
  .domain-card:hover,
  .order-card:hover,
  .template-card:hover {
    transform: none;
  }
}