/**
 * Twenty Twenty-Five Bridge Theme: User Center ("我的") Stylesheet
 * File: assets/css/bridge-user-center.css
 * Fully decoupled, responsive styling for /my-account/
 */

/* ==========================================================================
   1. Container & Global Layout
   ========================================================================== */
.bridge-account-wrap {
  max-width: 1140px;
  margin: 24px auto 48px;
  padding: 0 16px;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: #1e293b;
}

.bridge-account-wrap * {
  box-sizing: border-box;
}

/* Common Buttons */
.bridge-account-wrap .bridge-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  line-height: 1.4;
}

.bridge-account-wrap .bridge-btn-primary {
  background: #1e40af;
  color: #ffffff !important;
  border-color: #1e40af;
}

.bridge-account-wrap .bridge-btn-primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.25);
}

.bridge-account-wrap .bridge-btn-outline {
  background: #ffffff;
  color: #475569 !important;
  border-color: #cbd5e1;
}

.bridge-account-wrap .bridge-btn-outline:hover {
  background: #f8fafc;
  color: #0f172a !important;
  border-color: #94a3b8;
}

.bridge-account-wrap .bridge-btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 6px;
}

/* ==========================================================================
   2. Logged-out Card
   ========================================================================== */
.bridge-login-card {
  text-align: center;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 60px 24px;
  max-width: 600px;
  margin: 40px auto;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
}

.bridge-login-icon {
  font-size: 48px;
  margin-bottom: 16px;
  line-height: 1;
}

.bridge-login-card h2 {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 10px 0;
}

.bridge-login-card p {
  font-size: 14px;
  color: #64748b;
  line-height: 1.6;
  margin: 0;
}

/* ==========================================================================
   3. User Profile Header Card
   ========================================================================== */
.bridge-account-header {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 22px 28px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  gap: 20px;
}

.bridge-user-profile {
  display: flex;
  align-items: center;
  gap: 16px;
}

.bridge-user-avatar {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #f1f5f9;
  overflow: hidden;
}

.bridge-user-avatar img {
  border-radius: 50%;
  border: 2px solid #e2e8f0;
  width: 56px;
  height: 56px;
  display: block;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.bridge-user-name-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.bridge-user-name {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

.bridge-vip-badge {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
  border: 1px solid #fcd34d;
  padding: 2px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 1px 3px rgba(245, 158, 11, 0.15);
}

.bridge-regular-badge {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  padding: 2px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
}

.bridge-user-sub {
  font-size: 13px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.bridge-meta-divider {
  color: #cbd5e1;
}

.bridge-user-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.bridge-logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 7px 14px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.bridge-logout-btn:hover {
  background: #fff1f2;
  color: #e11d48;
  border-color: #fecdd3;
}

/* ==========================================================================
   4. Option A: Unified Single-Row Capsule Pill Tabs
   ========================================================================== */
.bridge-account-tabs-wrap {
  margin: 0 0 20px 0;
  padding: 6px 4px 10px 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.bridge-account-tabs-wrap::-webkit-scrollbar {
  display: none;
}

.bridge-account-tabs {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: max-content;
}

.bridge-pill-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 600;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
  min-height: 42px;
}

.bridge-pill-tab:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.bridge-pill-tab.active {
  background: #1e40af;
  color: #ffffff !important;
  border-color: #1e40af;
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.25);
}

.bridge-tab-icon {
  font-size: 16px;
  line-height: 1;
}

/* VIP Badge on Tab Pill */
.bridge-vip-pill-badge {
  background: linear-gradient(135deg, #fef08a, #f59e0b);
  color: #78350f !important;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
}

/* Normal Reader Counter Badge on Tab Pill */
.bridge-count-pill-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  line-height: 1.3;
  background: #e2e8f0;
  color: #334155;
}

.bridge-pill-tab.active .bridge-count-pill-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* ==========================================================================
   5. Tab Content Panel
   ========================================================================== */
.bridge-tab-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.bridge-panel-head {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
}

.bridge-panel-title {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 6px 0;
}

.bridge-panel-desc {
  font-size: 13px;
  color: #64748b;
  margin: 0;
}

/* Sub-section headings */
.bridge-sub-section {
  margin-bottom: 24px;
}

.bridge-sub-title {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 14px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* VIP Hero Privilege Card (Option 1) */
.bridge-vip-hero-card {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fde68a;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.08);
}

.bridge-vip-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f59e0b;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 6px;
}

.bridge-vip-hero-content h4 {
  margin: 0 0 4px 0;
  font-size: 16px;
  font-weight: 700;
  color: #78350f;
}

.bridge-vip-hero-content p {
  margin: 0;
  font-size: 13px;
  color: #92400e;
  line-height: 1.5;
}

.bridge-vip-hero-action {
  flex-shrink: 0;
}

.bridge-vip-hero-action .bridge-btn-gold {
  background: linear-gradient(135deg, #d97706, #b45309);
  color: #ffffff !important;
  font-weight: 600;
  font-size: 13px;
  padding: 9px 18px;
  border-radius: 8px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(180, 83, 9, 0.25);
  transition: all 0.2s ease;
}

.bridge-vip-hero-action .bridge-btn-gold:hover {
  background: linear-gradient(135deg, #b45309, #92400e);
  transform: translateY(-1px);
}

/* Graceful Placeholder Card (Option 1) */
.bridge-placeholder-card {
  text-align: center;
  padding: 48px 24px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  max-width: 600px;
  margin: 20px auto;
}

.bridge-placeholder-icon {
  font-size: 44px;
  margin-bottom: 12px;
  line-height: 1;
}

.bridge-placeholder-badge {
  display: inline-block;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.bridge-placeholder-card h4 {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 8px 0;
}

.bridge-placeholder-card p {
  font-size: 14px;
  color: #64748b;
  line-height: 1.6;
  margin: 0 0 22px 0;
}

.bridge-placeholder-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Empty State */
.bridge-empty-state {
  text-align: center;
  padding: 50px 20px;
  background: #f8fafc;
  border: 1px dashed #e2e8f0;
  border-radius: 12px;
}

.bridge-empty-icon {
  font-size: 40px;
  margin-bottom: 12px;
  line-height: 1;
}

.bridge-empty-state h4 {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 6px 0;
}

.bridge-empty-state p {
  font-size: 13px;
  color: #64748b;
  margin: 0;
}

/* ==========================================================================
   6. Magazines / Issues / Articles
   ========================================================================== */
.bridge-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
}

.bridge-shelf-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.bridge-shelf-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  border-color: #cbd5e1;
}

.bridge-shelf-cover {
  aspect-ratio: 3/4;
  overflow: hidden;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bridge-shelf-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bridge-cover-placeholder {
  font-size: 13px;
  color: #94a3b8;
  font-weight: 600;
}

.bridge-shelf-info {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
}

.bridge-shelf-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: #eff6ff;
  color: #1d4ed8;
  margin-bottom: 6px;
  align-self: flex-start;
}

.bridge-shelf-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 4px 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bridge-shelf-sub {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Article List */
.bridge-article-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bridge-article-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.bridge-article-row:hover {
  background: #eff6ff;
  border-color: #93c5fd;
}

.bridge-article-row-icon {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}

.bridge-article-row-main {
  flex: 1 1 auto;
  min-width: 0;
}

.bridge-article-row-title {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  text-decoration: none;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bridge-article-row-title:hover {
  color: #1e40af;
}

.bridge-article-row-meta {
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.bridge-article-row-action {
  flex-shrink: 0;
}

/* ==========================================================================
   7. Orders Tab & Filters
   ========================================================================== */
.bridge-orders-subfilter {
  margin-bottom: 20px;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.bridge-filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.bridge-filter-label {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}

.bridge-filter-pill {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: #475569;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  text-decoration: none;
  transition: all 0.15s ease;
}

.bridge-filter-pill:hover {
  border-color: #94a3b8;
  color: #0f172a;
}

.bridge-filter-pill.active {
  background: #1e40af;
  color: #ffffff !important;
  border-color: #1e40af;
  font-weight: 600;
}

/* Desktop Orders Table */
.bridge-orders-table-wrap {
  overflow-x: auto;
}

.bridge-orders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.bridge-orders-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.bridge-orders-table td {
  padding: 14px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
  vertical-align: middle;
}

.bridge-orders-table tbody tr:hover {
  background: #f8fafc;
}

.bridge-ord-no {
  font-family: monospace;
  font-size: 12px;
  color: #64748b;
}

.bridge-ord-title {
  color: #0f172a;
}

.bridge-ord-amount {
  font-weight: 700;
  color: #ea580c;
  font-size: 14px;
  white-space: nowrap;
}

.bridge-channel-tag {
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  white-space: nowrap;
}

.bridge-ord-time {
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
}

/* Status Tags */
.bridge-status-tag {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  display: inline-block;
  white-space: nowrap;
}

.bridge-status-paid {
  background: #dcfce7;
  color: #15803d;
}

.bridge-status-pending {
  background: #fef3c7;
  color: #b45309;
}

.bridge-status-refunded {
  background: #fee2e2;
  color: #b91c1c;
}

/* Mobile Order Cards */
.bridge-orders-mobile-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bridge-order-mobile-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
}

.bridge-order-m-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 8px;
}

.bridge-order-m-no {
  font-family: monospace;
  color: #64748b;
  word-break: break-all;
}

.bridge-order-m-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bridge-order-m-type {
  display: flex;
}

.bridge-order-m-title strong {
  font-size: 14px;
  color: #0f172a;
  line-height: 1.4;
}

.bridge-order-m-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #f1f5f9;
  padding-top: 8px;
  margin-top: 2px;
  flex-wrap: wrap;
  gap: 6px;
}

.bridge-order-m-time {
  font-size: 12px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
}

.bridge-order-m-price {
  font-size: 17px;
  font-weight: 800;
  color: #ea580c;
}

/* Responsive visibility helpers */
@media (min-width: 769px) {
  .bridge-desktop-only {
    display: block !important;
  }
  .bridge-mobile-only {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .bridge-desktop-only {
    display: none !important;
  }
  .bridge-mobile-only {
    display: flex !important;
  }
}

/* ==========================================================================
   8. Responsive Mobile Breakpoints (<= 768px)
   ========================================================================== */
@media (max-width: 768px) {
  .bridge-account-wrap {
    margin: 16px auto 36px;
    padding: 0 12px;
  }

  .bridge-account-header {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 14px;
  }

  .bridge-user-profile {
    gap: 12px;
  }

  .bridge-user-avatar {
    width: 48px;
    height: 48px;
  }

  .bridge-user-avatar img {
    width: 48px;
    height: 48px;
  }

  .bridge-user-name {
    font-size: 16px;
  }

  .bridge-user-header-actions {
    justify-content: flex-end;
    border-top: 1px solid #f1f5f9;
    padding-top: 10px;
    margin-top: -2px;
  }

  .bridge-logout-btn {
    width: 100%;
    justify-content: center;
    padding: 8px;
  }

  .bridge-account-tabs-wrap {
    margin: 0 0 16px 0;
    padding-bottom: 6px;
  }

  .bridge-pill-tab {
    padding: 8px 14px;
    font-size: 13px;
    min-height: 38px;
  }

  .bridge-tab-panel {
    padding: 16px;
    border-radius: 12px;
  }

  .bridge-panel-head {
    margin-bottom: 16px;
    padding-bottom: 12px;
  }

  .bridge-panel-title {
    font-size: 16px;
  }

  .bridge-card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .bridge-shelf-info {
    padding: 10px;
  }

  .bridge-shelf-title {
    font-size: 13px;
  }

  .bridge-article-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
  }

  .bridge-article-row-action {
    align-self: flex-end;
  }

  .bridge-vip-hero-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    gap: 14px;
  }

  .bridge-vip-hero-action {
    width: 100%;
  }

  .bridge-vip-hero-action .bridge-btn-gold {
    width: 100%;
    justify-content: center;
  }

  .bridge-placeholder-card {
    padding: 36px 16px;
  }

  .bridge-placeholder-actions {
    flex-direction: column;
  }

  .bridge-placeholder-actions .bridge-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .bridge-card-grid {
    grid-template-columns: 1fr;
  }
}
