/* ============================================================
   OptClouds 会员中心仪表盘（方案 A · 浅色）
   作用域前缀 oc- ，不干预 clientarea 公共布局
   配色：主色 #2f7bff / 背景 #f4f6fa / 卡片 #ffffff
   ============================================================ */

/* ---------- 主区 ---------- */
.oc-home-main {
  background: #f4f6fa;
  padding: 20px 24px;
  min-height: 100%;
}

.oc-dash {
  max-width: 1280px;
  margin: 0 auto;
}

/* ---------- 欢迎条 ---------- */
.oc-welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid #e8ecf3;
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 16px;
}

.oc-welcome-left {
  display: flex;
  align-items: center;
}

.oc-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #3699ff;
  color: #ffffff;
  font-size: 20px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 14px;
  flex-shrink: 0;
  cursor: pointer;
}

.oc-welcome-info {
  min-width: 0;
}

.oc-hello {
  font-size: 16px;
  font-weight: 500;
  color: #1f2733;
  margin: 0 0 6px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 360px;
}

.oc-level-badge {
  cursor: pointer;
  font-size: 13px;
}

.oc-sub {
  font-size: 13px;
  color: #8593a8;
  margin: 0;
}

.oc-id {
  color: #3a4256;
}

.oc-dot {
  margin: 0 8px;
  color: #c4cddb;
}

.oc-cert {
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 10px;
}

.oc-cert.ok {
  color: #18b566;
  background: #e7f9f0;
}

.oc-cert.no {
  color: #2f7bff;
  background: #eaf2ff;
  cursor: pointer;
}

.oc-welcome-right {
  display: flex;
  align-items: center;
}

.oc-balance {
  text-align: right;
  margin-right: 18px;
}

.oc-balance-label {
  display: block;
  font-size: 12px;
  color: #8593a8;
  margin-bottom: 2px;
}

.oc-balance-num {
  font-size: 22px;
  font-weight: 500;
  color: #1f2733;
}

.oc-cur {
  font-size: 13px;
  margin-right: 1px;
}

.oc-btn-recharge {
  background: #2f7bff;
  color: #ffffff;
  font-size: 13px;
  border-radius: 6px;
  padding: 8px 22px;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.oc-btn-recharge:hover {
  background: #1f6bf5;
}

/* ---------- 统计卡 ---------- */
.oc-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.oc-stat-card {
  background: #ffffff;
  border: 1px solid #e8ecf3;
  border-radius: 10px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.oc-stat-card:hover {
  border-color: #b9d3ff;
  box-shadow: 0 4px 12px rgba(47, 123, 255, 0.08);
}

.oc-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 14px;
  flex-shrink: 0;
}

.oc-stat-icon.i-blue { background: #eaf2ff; color: #2f7bff; }
.oc-stat-icon.i-cyan { background: #e3f8f5; color: #00b4a6; }
.oc-stat-icon.i-orange { background: #fff3e6; color: #f28b2a; }
.oc-stat-icon.i-green { background: #e7f9f0; color: #18b566; }

.oc-stat-num {
  font-size: 24px;
  font-weight: 500;
  color: #1f2733;
  line-height: 1.2;
}

.oc-stat-label {
  font-size: 13px;
  color: #8593a8;
  margin-top: 3px;
}

/* ---------- 面板通用 ---------- */
.oc-panel {
  background: #ffffff;
  border: 1px solid #e8ecf3;
  border-radius: 10px;
  padding: 18px 20px;
}

.oc-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.oc-panel-title {
  font-size: 15px;
  font-weight: 500;
  color: #1f2733;
}

.oc-panel-more {
  font-size: 13px;
  color: #2f7bff;
  cursor: pointer;
}

.oc-panel-more:hover {
  text-decoration: underline;
}

/* ---------- 中部两栏 ---------- */
.oc-mid-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.oc-product-link {
  color: #2f7bff;
  text-decoration: none;
}

.oc-product-link:hover {
  text-decoration: underline;
}

.oc-red-time {
  color: #f5533d;
}

/* 到期提醒 */
.oc-expire-list {
  display: flex;
  flex-direction: column;
}

.oc-expire-item {
  display: flex;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid #f0f3f8;
  cursor: pointer;
}

.oc-expire-item:last-child {
  border-bottom: none;
}

.oc-expire-item:hover .oc-expire-name {
  color: #2f7bff;
}

.oc-expire-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 10px;
  flex-shrink: 0;
}

.oc-expire-dot.red { background: #f5533d; }
.oc-expire-dot.orange { background: #f28b2a; }
.oc-expire-dot.green { background: #18b566; }

.oc-expire-name {
  flex: 1;
  font-size: 13px;
  color: #3a4256;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s;
}

.oc-expire-days {
  font-size: 12px;
  margin-left: 12px;
  flex-shrink: 0;
}

.oc-expire-days.red { color: #f5533d; }
.oc-expire-days.orange { color: #f28b2a; }
.oc-expire-days.green { color: #18b566; }

/* 空状态 */
.oc-empty {
  text-align: center;
  padding: 36px 0 30px;
}

.oc-empty.small {
  padding: 24px 0;
}

.oc-empty-title {
  font-size: 15px;
  font-weight: 500;
  color: #3a4256;
  margin: 0 0 6px;
}

.oc-empty-sub {
  font-size: 13px;
  color: #8593a8;
  margin: 0 0 14px;
}

.oc-empty.small .oc-empty-sub {
  margin: 0;
}

/* ---------- 用量面板 ---------- */
.oc-usage-panel {
  margin-bottom: 8px;
}

.oc-usage-refresh {
  font-size: 12px;
  color: #a3b0c2;
}

.oc-usage-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr) auto;
  gap: 28px;
  align-items: center;
}

.oc-usage-item {
  min-width: 0;
}

.oc-usage-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}

.oc-usage-label {
  font-size: 13px;
  color: #3a4256;
}

.oc-usage-val {
  font-size: 14px;
  font-weight: 500;
  color: #1f2733;
}

.oc-bar {
  height: 8px;
  border-radius: 4px;
  background: #eef2f8;
  overflow: hidden;
}

.oc-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: #2f7bff;
  transition: width 0.6s ease;
}

.oc-bar-fill.cyan { background: #00b4a6; }
.oc-bar-fill.orange { background: #f28b2a; }

.oc-usage-note {
  font-size: 13px;
}

.oc-green-text { color: #18b566; }
.oc-red-text { color: #f5533d; }

/* ---------- 窄屏适配 ---------- */
@media (max-width: 1200px) {
  .oc-stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .oc-mid-grid {
    grid-template-columns: 1fr;
  }

  .oc-usage-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .oc-welcome {
    flex-direction: column;
    align-items: flex-start;
  }

  .oc-welcome-right {
    margin-top: 14px;
  }

  .oc-stat-grid {
    grid-template-columns: 1fr;
  }

  .oc-usage-grid {
    grid-template-columns: 1fr;
  }
}
