/* ================================================================
   163.com.hk Client Dashboard — Brand Workspace
   Accent: navy #1a3a5c + copper #9a6840
   Path: public/home/template/pc/hkcom163/css/home.css
   ================================================================ */

.home-dashboard {
  --hd-navy: #1a3a5c;
  --hd-navy-deep: #0c1d31;
  --hd-copper: #9a6840;
  --hd-ink: #1a2332;
  --hd-muted: #6b7a8d;
  --hd-line: #e8ecf1;
  --hd-soft: #f5f7fa;
  --hd-card: #ffffff;
  --hd-radius: 14px;
  --hd-shadow: 0 1px 2px rgba(12, 29, 49, 0.04), 0 8px 24px rgba(12, 29, 49, 0.05);
  max-width: 1280px;
  margin: 0 auto;
  background: transparent;
}

.home-main.el-main {
  background:
    radial-gradient(ellipse 900px 420px at 8% -10%, rgba(26, 58, 92, 0.07), transparent 60%),
    radial-gradient(ellipse 700px 360px at 100% 0%, rgba(154, 104, 64, 0.06), transparent 55%),
    #eef1f5 !important;
  padding: 20px 24px 28px !important;
  overflow: visible !important;
  margin-top: calc(var(--topnav-height, 56px) + 12px) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* ---------- Hero ---------- */
.home-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 20px;
  padding: 28px 32px;
  border-radius: var(--hd-radius);
  background: linear-gradient(125deg, rgba(12, 29, 49, 0.96) 0%, rgba(26, 58, 92, 0.92) 55%, rgba(62, 94, 128, 0.9) 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(12, 29, 49, 0.18);
}
.home-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 420px 240px at 88% 20%, rgba(154, 104, 64, 0.28), transparent 70%),
    linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.03) 50%, transparent 100%);
  pointer-events: none;
}
.home-hero-main,
.home-hero-actions {
  position: relative;
  z-index: 1;
}
.home-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  margin-bottom: 10px;
}
.home-hero-kicker::before {
  content: '';
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--hd-copper);
}
.home-hero-title {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: 0.2px;
}
.home-hero-desc {
  margin: 0;
  max-width: 560px;
  font-size: 14px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.7);
}
.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}
.home-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.home-action-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}
.home-action-btn.primary {
  background: linear-gradient(135deg, #b07a4a, #9a6840);
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(154, 104, 64, 0.35);
}
.home-action-btn.primary:hover {
  background: linear-gradient(135deg, #c08a52, #a87348);
}

/* ---------- Metrics ---------- */
.home-metrics {
  display: grid;
  grid-template-columns: 1.55fr 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}
.metric-balance {
  padding: 22px 24px;
  border-radius: var(--hd-radius);
  background: var(--hd-card);
  border: 1px solid var(--hd-line);
  box-shadow: var(--hd-shadow);
  position: relative;
  overflow: hidden;
}
.metric-balance::after {
  content: '';
  position: absolute;
  right: -40px;
  top: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(26, 58, 92, 0.08), transparent 70%);
}
.metric-balance-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}
.metric-balance-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--hd-muted);
}
.metric-balance-label i { color: var(--hd-navy); }
.metric-badge {
  font-style: normal;
  font-size: 11px;
  color: var(--hd-copper);
  background: rgba(154, 104, 64, 0.1);
  padding: 2px 8px;
  border-radius: 999px;
}
.metric-recharge {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: var(--hd-navy);
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.metric-recharge:hover { background: #234a70; }
.metric-balance-value {
  position: relative;
  z-index: 1;
  font-size: 34px;
  font-weight: 700;
  color: var(--hd-copper);
  line-height: 1.15;
  font-family: "DIN Alternate", "Outfit", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -0.5px;
  margin-bottom: 14px;
}
.metric-balance-value small {
  font-size: 18px;
  margin-right: 4px;
  color: var(--hd-copper);
  font-weight: 550;
}
.metric-balance-foot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  position: relative;
  z-index: 1;
}
.metric-foot-item {
  background: var(--hd-soft);
  border-radius: 10px;
  padding: 10px 12px;
}
.metric-foot-item span {
  display: block;
  font-size: 12px;
  color: var(--hd-muted);
  margin-bottom: 4px;
}
.metric-foot-item strong {
  font-size: 14px;
  color: var(--hd-copper);
  font-weight: 700;
  font-family: "DIN Alternate", "Outfit", "Helvetica Neue", Arial, sans-serif;
}
.metric-foot-item .up { color: #059669; font-style: normal; margin-left: 4px; font-size: 12px; }
.metric-foot-item .down { color: #dc2626; font-style: normal; margin-left: 4px; font-size: 12px; }

.metric-tile {
  background: var(--hd-card);
  border: 1px solid var(--hd-line);
  border-radius: var(--hd-radius);
  box-shadow: var(--hd-shadow);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.2s;
}
.metric-tile:hover {
  transform: translateY(-2px);
  border-color: #d5dde8;
  box-shadow: 0 8px 24px rgba(12, 29, 49, 0.08);
}
.metric-tile-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.metric-tile-icon.navy { background: rgba(26, 58, 92, 0.1); color: var(--hd-navy); }
.metric-tile-icon.indigo { background: rgba(99, 102, 241, 0.1); color: #4f46e5; }
.metric-tile-icon.amber { background: rgba(154, 104, 64, 0.12); color: var(--hd-copper); }
.metric-tile-label {
  font-size: 13px;
  color: var(--hd-muted);
  font-weight: 500;
  margin-bottom: 6px;
}
.metric-tile-num {
  font-size: 30px;
  font-weight: 800;
  color: var(--hd-ink);
  line-height: 1.1;
  font-family: "DIN Alternate", "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Status row ---------- */
.home-status-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.status-card {
  background: var(--hd-card);
  border: 1px solid var(--hd-line);
  border-radius: var(--hd-radius);
  box-shadow: var(--hd-shadow);
  padding: 18px 20px;
  min-width: 0;
  transition: transform 0.2s ease, border-color 0.2s;
}
.status-card:hover {
  transform: translateY(-1px);
  border-color: #d5dde8;
}
.status-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.status-card-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--hd-ink);
}
.status-card-title i { color: var(--hd-navy); }
.status-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(107, 122, 141, 0.12);
  color: var(--hd-muted);
}
.status-tag.active {
  background: rgba(5, 150, 105, 0.12);
  color: #059669;
}
.status-card-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--hd-copper);
  font-family: "DIN Alternate", "Outfit", "Helvetica Neue", Arial, sans-serif;
  margin-bottom: 8px;
  font-family: "DIN Alternate", "Helvetica Neue", Arial, sans-serif;
}
.status-card-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--hd-navy);
  cursor: pointer;
  text-decoration: none;
}
.status-card-link:hover {
  color: var(--hd-copper);
  text-decoration: none;
}
.status-card-link.inline { display: inline; }
.status-consume {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.status-consume-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--hd-muted);
  background: var(--hd-soft);
  border-radius: 8px;
  padding: 8px 10px;
}
.status-consume-row .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-consume-row .dot.navy { background: var(--hd-navy); }
.status-consume-row .dot.grey { background: #c5ccd6; }
.status-consume-row b {
  margin-left: auto;
  color: var(--hd-copper);
  font-weight: 700;
  font-family: "DIN Alternate", "Outfit", "Helvetica Neue", Arial, sans-serif;
}
.status-consume-row .pct {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 6px;
}
.status-consume-row .pct.up { color: #059669; background: rgba(5, 150, 105, 0.08); }
.status-consume-row .pct.down { color: #dc2626; background: rgba(220, 38, 38, 0.08); }
.status-cert-row {
  font-size: 13px;
  color: var(--hd-ink);
  margin-bottom: 6px;
}
.status-cert-row .muted { color: var(--hd-muted); }

/* ---------- Promo ---------- */
.home-promo { margin-bottom: 18px; }
.promo-panel {
  border-radius: var(--hd-radius);
  overflow: hidden;
  background: linear-gradient(120deg, #0c1d31 0%, #1a3a5c 58%, #3e5e80 100%);
  color: #fff;
  box-shadow: 0 10px 28px rgba(12, 29, 49, 0.16);
  position: relative;
}
.promo-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 420px 220px at 90% 30%, rgba(154, 104, 64, 0.28), transparent 70%);
  pointer-events: none;
}
.promo-panel-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 22px 26px;
}
.promo-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 6px;
}
.promo-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 6px;
}
.promo-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.68);
  margin-bottom: 12px;
  line-height: 1.5;
}
.promo-cta {
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  color: #f0d2b4;
}
.promo-cta:hover { color: #fff; }
.promo-figures {
  display: flex;
  align-items: center;
  gap: 28px;
  flex: 1;
  min-width: 0;
}
.promo-figure-val {
  font-size: 22px;
  font-weight: 700;
  color: #f0d2b4;
  font-family: "DIN Alternate", "Outfit", "Helvetica Neue", Arial, sans-serif;
}
.promo-figure-lbl {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 2px;
}
.promo-url { flex: 1; min-width: 0; }
.promo-url-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.promo-url-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 6px 10px;
}
.promo-url-row .el-button {
  background: rgba(255, 255, 255, 0.12) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #fff !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
}
.promo-panel-closed {
  background: linear-gradient(120deg, #374151 0%, #4b5563 55%, #6b7280 100%);
}

/* ---------- Workspace ---------- */
.home-workspace {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.workspace-main { flex: 5; min-width: 0; }
.workspace-side {
  flex: 2;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.panel {
  background: var(--hd-card);
  border: 1px solid var(--hd-line);
  border-radius: var(--hd-radius);
  box-shadow: var(--hd-shadow);
  padding: 18px 20px;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--hd-line);
}
.panel-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--hd-ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.panel-title i {
  color: var(--hd-navy);
  font-size: 16px;
}
.panel-meta .meta-pill {
  font-size: 12px;
  color: var(--hd-muted);
  background: var(--hd-soft);
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
}
.panel-more {
  font-size: 13px;
  font-weight: 700;
  color: var(--hd-navy);
  cursor: pointer;
  white-space: nowrap;
}
.panel-more:hover { color: var(--hd-copper); }

.product-panel { min-height: 300px; }
.home-product-table {
  border: none !important;
}
.home-product-table::before { display: none !important; }
.home-product-table th {
  background: var(--hd-soft) !important;
  color: var(--hd-muted) !important;
  font-weight: 700 !important;
  font-size: 12px !important;
}
.home-product-table td {
  font-size: 13px !important;
  color: #374151 !important;
}
.product-name {
  color: var(--hd-navy);
  font-weight: 600;
  text-decoration: none;
}
.product-name:hover {
  color: var(--hd-copper);
  text-decoration: none;
}
.red-time {
  color: #dc2626 !important;
  font-weight: 700;
}
.no-product {
  text-align: center;
  padding: 56px 24px;
}
.no-product-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 18px;
  background: rgba(26, 58, 92, 0.08);
  color: var(--hd-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}
.no-product h2 {
  font-size: 17px;
  font-weight: 800;
  color: var(--hd-ink);
  margin: 0 0 8px;
}
.no-product p {
  font-size: 14px;
  color: var(--hd-muted);
  margin: 0 0 22px;
  line-height: 1.6;
}
.no-product .el-button--primary {
  background: linear-gradient(135deg, #1a3a5c 0%, #2a5680 100%) !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 10px 26px !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 8px rgba(26, 58, 92, 0.2) !important;
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.news-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  margin: 0 -8px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.news-item:hover {
  background: var(--hd-soft);
  transform: translateX(2px);
}
.news-date {
  font-size: 11px;
  font-weight: 700;
  color: #9ca3af;
  margin-bottom: 4px;
}
.news-title {
  font-size: 13px;
  color: var(--hd-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}
.news-arrow {
  color: #c9cdd6;
  margin-left: 8px;
  transition: color 0.15s, transform 0.15s;
}
.news-item:hover .news-arrow {
  color: var(--hd-navy);
  transform: translateX(3px);
}

.ticket-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ticket-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}
.ticket-item:hover {
  background: var(--hd-soft);
  border-color: var(--hd-line);
}
.ticket-status {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  color: #fff;
  white-space: nowrap;
  flex-shrink: 0;
}
.ticket-title {
  font-size: 13px;
  color: var(--hd-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
  font-weight: 600;
}
.ticket-dept {
  font-size: 12px;
  color: #9ca3af;
}

.page-footer-copyright {
  text-align: center;
  padding: 32px 0 8px;
  font-size: 12px;
  color: #b6bdc8;
  letter-spacing: 0.3px;
}

.open-dialog { border-radius: 16px !important; }
.open-dialog .el-dialog__body {
  font-size: 14px;
  color: #4b5563;
  line-height: 1.7;
}
.open-dialog .dialog-footer .btn-ok {
  background: linear-gradient(135deg, #1a3a5c 0%, #2a5680 100%);
  border-radius: 10px;
  color: #fff;
  padding: 10px 28px;
  font-weight: 700;
  border: none;
}
.open-dialog .dialog-footer .btn-no {
  background: #f3f5f8;
  border-radius: 10px;
  color: #374151;
  padding: 10px 28px;
  font-weight: 700;
  border: 1px solid #e5e8ee;
}

.wx-code {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  z-index: 100;
  position: fixed;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  background: #fff;
}
.wx-code:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(-50%) scale(1.08);
}
.wx-code .wx-img {
  width: 40px;
  height: 40px;
  background: url('/clientarea/template/pc/hkcom163/img/home/wx.svg') no-repeat;
  background-size: 100% 100%;
}
.wx-code:hover .wx-img {
  background: url('/clientarea/template/pc/hkcom163/img/home/wx_hover.svg') no-repeat;
  background-size: 100% 100%;
}
.wx-box { text-align: center; }
.wx-box .tit {
  font-size: 14px;
  font-weight: 700;
  color: #1a2332;
  margin-bottom: 8px;
}
.wx-box .img {
  width: 200px;
  height: 200px;
  margin: 0 auto;
}
.wx-box .img img { width: 100%; }

@media screen and (max-width: 1200px) {
  .home-metrics { grid-template-columns: 1fr 1fr; }
  .metric-balance { grid-column: 1 / -1; }
  .promo-panel-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .promo-figures {
    flex-wrap: wrap;
    gap: 18px;
    width: 100%;
  }
  .home-workspace { flex-direction: column; }
  .workspace-side {
    min-width: auto;
    width: 100%;
  }
}

@media screen and (max-width: 750px) {
  .home-main.el-main {
    padding: 12px !important;
    margin-top: calc(var(--color-header-height, 56px) + 8px) !important;
  }
  .home-hero {
    flex-direction: column;
    align-items: flex-start;
    padding: 22px 18px;
  }
  .home-hero-title { font-size: 22px; }
  .home-hero-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .home-metrics {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .metric-balance-value { font-size: 28px; }
  .home-status-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .home-workspace {
    flex-direction: column;
    gap: 14px;
  }
  .panel { padding: 16px; }
}
