/* ============================================
   Veeam 门户 — 页面布局样式
   ============================================ */

body { background: #f6f8fb; min-height: 100vh; }
main.page { padding: 32px 0 64px; min-height: calc(100vh - 80px); }

.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap; gap: 16px;
}
.page-header__title {
  font-size: 28px; font-weight: 700; color: #232323;
  display: flex; align-items: center; gap: 12px;
}
.page-header__title i {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #3700ff 0%, #00D15F 100%);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.page-header__subtitle { color: #6b7280; font-size: 14px; margin-top: 4px; }
.page-header__actions { display: flex; gap: 10px; align-items: center; }

/* ===== 提交 Case 步骤指示器 ===== */
.stepper {
  display: flex; align-items: center; justify-content: center;
  background: #fff; border-radius: 16px; padding: 24px;
  margin-bottom: 24px; box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.stepper__item { display: flex; align-items: center; gap: 10px; color: #9ca3af; }
.stepper__item.active { color: #3700ff; }
.stepper__item.active .stepper__circle { background: #3700ff; color: #fff; border-color: #3700ff; }
.stepper__circle {
  width: 32px; height: 32px; border-radius: 50%;
  background: #fff; color: #9ca3af;
  border: 2px solid #d1d5db;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 14px;
  transition: all 0.3s;
}
.stepper__label { font-weight: 500; font-size: 14px; }
.stepper__line { flex: 0 0 80px; height: 2px; background: #e1e5ea; margin: 0 12px; }
@media (max-width: 640px) {
  .stepper__line { flex: 0 0 32px; }
  .stepper__label { display: none; }
}

/* ===== Case 类型卡片 ===== */
.case-type-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px;
}
.case-type-card { cursor: pointer; }
.case-type-card input { position: absolute; opacity: 0; pointer-events: none; }
.case-type-card__content {
  padding: 18px 20px;
  border: 2px solid #e1e5ea;
  border-radius: 12px;
  transition: all 0.2s;
  background: #fff;
}
.case-type-card__content i { font-size: 22px; color: #6b7280; margin-bottom: 8px; }
.case-type-card__title { font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.case-type-card__desc { font-size: 12px; color: #6b7280; line-height: 1.5; }
.case-type-card:hover .case-type-card__content { border-color: #a8a8d0; }
.case-type-card input:checked + .case-type-card__content {
  border-color: #3700ff; background: rgba(55,0,255,0.04);
  box-shadow: 0 4px 12px rgba(55,0,255,0.15);
}
.case-type-card input:checked + .case-type-card__content i { color: #3700ff; }

/* 表单行 */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

/* ===== 文档卡片网格 ===== */
.doc-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px;
}
.doc-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px;
  background: #fafbfc;
  border: 1px solid #eef0f3;
  border-radius: 12px;
  transition: all 0.2s; cursor: pointer;
}
.doc-card:hover { background: #fff; border-color: #3700ff; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.06); }
.doc-card__icon {
  width: 48px; height: 48px; border-radius: 10px;
  background: rgba(55,0,255,0.1); color: #3700ff;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
  flex-shrink: 0;
}
.doc-card__body { flex: 1; min-width: 0; }
.doc-card__title { font-weight: 600; font-size: 14px; margin-bottom: 6px; line-height: 1.4; }
.doc-card__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ===== FAQ 列表 ===== */
.faq-item {
  border-bottom: 1px solid #f0f2f5;
  padding: 4px 0;
}
.faq-item:last-child { border-bottom: none; }
.faq-item__q {
  list-style: none; cursor: pointer;
  padding: 16px 0; display: flex; align-items: center;
  font-weight: 500; font-size: 15px; color: #232323;
  user-select: none;
}
.faq-item__q::-webkit-details-marker { display: none; }
.faq-item__q > span { flex: 1; }
.faq-item__arrow { color: #9ca3af; transition: transform 0.2s; font-size: 12px; }
.faq-item[open] .faq-item__arrow { transform: rotate(180deg); color: #3700ff; }
.faq-item__a {
  padding: 0 0 18px 26px; color: #505861; font-size: 14px; line-height: 1.7;
}

/* ===== 联系方式卡片 ===== */
.contact-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px;
}
.contact-card {
  padding: 20px;
  border: 1px solid #eef0f3;
  border-radius: 12px;
  text-align: center;
  transition: all 0.2s;
}
.contact-card:hover { border-color: #3700ff; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.05); }
.contact-card__icon {
  width: 56px; height: 56px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin: 0 auto 12px;
}
.contact-card__title { font-size: 13px; color: #6b7280; margin-bottom: 6px; }
.contact-card__value { font-size: 16px; font-weight: 700; color: #232323; margin-bottom: 4px; word-break: break-all; }
.contact-card__hint { font-size: 12px; color: #9ca3af; }

/* ===== App Shell: 深色侧边栏 + 浅色主区（参考 Veeam 风格） ===== */
.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 80px);
  background: #f6f8fb;
}
.app-shell__sidebar {
  background: #0f1116;
  color: #d4d7dc;
  padding: 24px 0;
  position: sticky;
  top: 80px;
  height: calc(100vh - 80px);
  overflow-y: auto;
  border-right: 1px solid rgba(255,255,255,0.04);
}
.app-shell__main {
  padding: 32px 36px 64px;
  min-width: 0;
}
@media (max-width: 1024px) {
  .app-shell { grid-template-columns: 72px 1fr; }
  .app-shell__sidebar { padding: 16px 0; }
  .app-shell__main { padding: 24px 18px 48px; }
}

/* 侧边栏账户信息 */
.sidebar-user {
  padding: 0 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 12px;
}
@media (max-width: 1024px) { .sidebar-user { justify-content: center; padding: 0 8px 16px; } }
.sidebar-user__avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, #00D15F, #3700ff);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; flex-shrink: 0;
}
.sidebar-user__meta { line-height: 1.3; min-width: 0; }
@media (max-width: 1024px) { .sidebar-user__meta { display: none; } }
.sidebar-user__name { color: #fff; font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user__role { color: #7a7f8a; font-size: 12px; margin-top: 2px; }

/* 侧边栏导航 */
.sidebar-nav { display: flex; flex-direction: column; }
.sidebar-nav__group { margin-bottom: 8px; }
.sidebar-nav__group-title {
  padding: 14px 24px 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #6b7280;
}
@media (max-width: 1024px) { .sidebar-nav__group-title { display: none; } }
.sidebar-nav__item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 24px;
  color: #c2c5cc;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all 0.2s;
  text-decoration: none;
}
.sidebar-nav__item:hover { background: rgba(255,255,255,0.04); color: #fff; }
.sidebar-nav__item.active {
  background: rgba(55,0,255,0.18);
  color: #fff;
  border-left-color: #3700ff;
}
.sidebar-nav__item i { width: 20px; text-align: center; font-size: 15px; }
@media (max-width: 1024px) {
  .sidebar-nav__item { justify-content: center; padding: 12px 8px; }
  .sidebar-nav__item span { display: none; }
}
.sidebar-nav__divider {
  height: 1px;
  margin: 12px 16px;
  background: rgba(255,255,255,0.06);
}
.sidebar-nav__logout {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 24px;
  color: #c2c5cc;
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
  background: none; border: none; width: 100%; text-align: left;
  transition: all 0.2s;
}
.sidebar-nav__logout:hover { background: rgba(255,71,87,0.1); color: #ff7a85; }
@media (max-width: 1024px) {
  .sidebar-nav__logout { justify-content: center; padding: 12px 8px; }
  .sidebar-nav__logout span { display: none; }
}

/* ===== Auth pages (login / register) ===== */
.auth-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #3700ff 0%, #00D15F 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  position: relative; overflow: hidden;
}
.auth-page::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 20% 30%, rgba(255,255,255,0.15) 0%, transparent 50%),
              radial-gradient(circle at 80% 70%, rgba(255,255,255,0.1) 0%, transparent 50%);
  pointer-events: none;
}
.auth-card {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.25);
  position: relative;
  z-index: 1;
  animation: cardIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.auth-card__brand {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 8px;
}
.auth-card__logo svg { height: 32px; }
.auth-card__brand-text { font-weight: 600; color: #3700ff; font-size: 14px; }
.auth-card__title { font-size: 26px; font-weight: 700; margin: 16px 0 8px; }
.auth-card__subtitle { color: #6b7280; font-size: 14px; margin-bottom: 28px; }
.auth-card__footer { text-align: center; margin-top: 20px; font-size: 14px; color: #6b7280; }
.auth-card__footer a { color: #3700ff; font-weight: 600; }
.auth-card__demo {
  margin-top: 20px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(55,0,255,0.04), rgba(0,209,95,0.04));
  border-radius: 10px;
  border: 1px dashed rgba(55,0,255,0.2);
  font-size: 12px;
  color: #505861;
  line-height: 1.7;
}
.auth-card__demo b { color: #3700ff; }
.auth-card__demo a { color: #3700ff; font-weight: 600; cursor: pointer; text-decoration: underline; }

/* ===== Dashboard 统计卡片 ===== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}
.stat-card {
  background: #fff;
  border-radius: 16px;
  padding: 22px 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  transition: all 0.3s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(0,0,0,0.08); }
.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #3700ff, #00D15F);
}
.stat-card__label { font-size: 13px; color: #6b7280; font-weight: 500; margin-bottom: 8px; }
.stat-card__value { font-size: 32px; font-weight: 700; color: #232323; line-height: 1.2; }
.stat-card__value-sub { font-size: 14px; color: #6b7280; font-weight: 400; margin-left: 6px; }
.stat-card__delta { font-size: 12px; color: #00a04a; margin-top: 6px; display: flex; align-items: center; gap: 4px; }
.stat-card__icon {
  position: absolute; top: 22px; right: 24px;
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  color: #3700ff;
  background: rgba(55,0,255,0.08);
}
.stat-card--green .stat-card__icon { color: #00a04a; background: rgba(0,209,95,0.1); }
.stat-card--orange .stat-card__icon { color: #ff8c00; background: rgba(255,140,0,0.1); }
.stat-card--red .stat-card__icon { color: #ff4757; background: rgba(255,71,87,0.1); }

/* ===== Panel ===== */
.panel {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  margin-bottom: 24px;
}
.panel__header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap; gap: 12px;
}
.panel__title { font-size: 18px; font-weight: 700; }
.panel__hint { font-size: 13px; color: #6b7280; }
.panel__actions { display: flex; gap: 8px; }

.two-col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}
@media (max-width: 1024px) { .two-col { grid-template-columns: 1fr; } }

/* ===== Case Timeline ===== */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: '';
  position: absolute; left: 9px; top: 6px; bottom: 6px;
  width: 2px; background: #e1e5ea;
}
.timeline-item { position: relative; padding-bottom: 22px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: '';
  position: absolute; left: -24px; top: 4px;
  width: 12px; height: 12px; border-radius: 50%;
  background: #fff;
  border: 3px solid #3700ff;
}
.timeline-item--engineer::before { border-color: #00D15F; }
.timeline-item--system::before { border-color: #6b7280; }
.timeline-item__head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.timeline-item__actor { font-weight: 600; font-size: 14px; }
.timeline-item__role {
  font-size: 11px; padding: 2px 8px; border-radius: 4px;
  background: rgba(55,0,255,0.1); color: #3700ff; font-weight: 600;
}
.timeline-item--engineer .timeline-item__role { background: rgba(0,209,95,0.1); color: #00a04a; }
.timeline-item__time { font-size: 12px; color: #6b7280; margin-left: auto; }
.timeline-item__text { font-size: 14px; color: #505861; line-height: 1.6; }

/* ===== Toolbar ===== */
.toolbar {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  margin-bottom: 18px;
}
.toolbar .form-control { width: auto; min-width: 220px; }
.toolbar__spacer { flex: 1; }

/* ===== Empty state enhancement ===== */
.empty-state {
  background: #fff;
  border-radius: 16px;
}

/* ===== Index portal entry section ===== */
.portal-cta {
  background: linear-gradient(135deg, #0a0e2a 0%, #1a1f4a 50%, #0a0e2a 100%);
  color: #fff;
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}
.portal-cta::before {
  content: '';
  position: absolute; top: -50%; right: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(0,209,95,0.15) 0%, transparent 60%);
  pointer-events: none;
}
.portal-cta::after {
  content: '';
  position: absolute; bottom: -30%; left: -10%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(55,0,255,0.2) 0%, transparent 60%);
  pointer-events: none;
}
.portal-cta__inner {
  max-width: 1260px; margin: 0 auto; padding: 0 15px;
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.2fr 1fr;
  gap: 60px; align-items: center;
}
@media (max-width: 900px) {
  .portal-cta__inner { grid-template-columns: 1fr; }
}
.portal-cta__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(0,209,95,0.15);
  color: #00D15F;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px; font-weight: 600;
  margin-bottom: 18px;
}
.portal-cta__title {
  font-size: 44px; line-height: 1.15; font-weight: 700;
  margin-bottom: 18px;
  background: linear-gradient(90deg, #fff 0%, #b4c5ff 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.portal-cta__desc {
  font-size: 17px; line-height: 1.7; color: rgba(255,255,255,0.78);
  margin-bottom: 32px; max-width: 540px;
}
.portal-cta__buttons { display: flex; gap: 14px; flex-wrap: wrap; }
.portal-cta__visual {
  position: relative;
  perspective: 1200px;
}
.portal-mock {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 24px;
  transform: rotateY(-5deg) rotateX(2deg);
  box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}
.portal-mock__header {
  display: flex; gap: 6px; margin-bottom: 18px;
}
.portal-mock__dot { width: 10px; height: 10px; border-radius: 50%; }
.portal-mock__dot:nth-child(1) { background: #ff5f56; }
.portal-mock__dot:nth-child(2) { background: #ffbd2e; }
.portal-mock__dot:nth-child(3) { background: #27c93f; }
.portal-mock__row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 13px;
  color: rgba(255,255,255,0.85);
}
.portal-mock__row i { color: #00D15F; }
.portal-mock__row .badge { margin-left: auto; }

/* ===== Home features quick cards ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 32px;
}
.feature-card {
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  border: 1px solid #eef0f3;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(0,0,0,0.08);
  border-color: rgba(55,0,255,0.2);
}
.feature-card__icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  background: linear-gradient(135deg, rgba(55,0,255,0.1), rgba(0,209,95,0.1));
  color: #3700ff;
  margin-bottom: 18px;
}
.feature-card__title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.feature-card__desc { font-size: 14px; color: #6b7280; line-height: 1.7; }
