/* Desktop Client Download Page */
.client-download-page {
  max-width: 1120px;
}

.client-download-page--row {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 16px;
  align-items: stretch;
}

.client-download-main {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.85fr);
  gap: 18px;
  align-items: stretch;
}

.client-download-main--release {
  grid-template-columns: minmax(0, 520px);
  justify-content: start;
}

.download-packages-panel {
  width: 100%;
  min-width: 0;
  margin-bottom: 0;
  display: flex;
}

.download-packages-block {
  flex: 1;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,0.94);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(15,23,42,0.06));
}

.membership-panel-host {
  width: 100%;
  min-width: 0;
}

.membership-card {
  height: 100%;
  background: rgba(255,255,255,0.94);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  border-radius: 8px;
  padding: 24px 28px;
  background:
    linear-gradient(135deg, rgba(16,185,129,0.08), transparent 42%),
    linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  display: flex;
  flex-direction: column;
}

.membership-card.is-active {
  border-color: #a7f3d0;
}

.membership-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.membership-logout-btn {
  flex-shrink: 0;
  color: var(--red, #dc2626) !important;
  border-color: rgba(220, 38, 38, 0.25) !important;
}

.membership-logout-btn:hover {
  background: rgba(220, 38, 38, 0.08) !important;
}

.membership-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.membership-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 999px;
  padding: 4px 10px;
  margin-bottom: 0;
}

.membership-badge-pro {
  color: #4b5563;
  background: #f3f4f6;
  border-color: #e5e7eb;
  letter-spacing: 0.04em;
}

.membership-title {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 6px;
}

.membership-status {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.membership-price {
  text-align: right;
  white-space: nowrap;
}

.membership-price strong {
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
}

.membership-price span {
  font-size: 14px;
  color: var(--text-muted);
}

.membership-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}

.membership-meta-item {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: rgba(255,255,255,0.85);
  padding: 10px 12px;
  min-width: 0;
}

.membership-meta-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.membership-meta-item strong {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.membership-meta-item strong.is-expire {
  color: #dc2626;
}

.membership-quota-bar {
  margin-top: 8px;
  height: 6px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.membership-quota-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f59e0b, #ea7a00);
}

.membership-quota-bar.is-blue span {
  background: linear-gradient(90deg, #38bdf8, #2563eb);
}

.membership-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.membership-tag.is-ok {
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}

.membership-tag.is-warn {
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fcd34d;
}

.membership-tag.is-bad {
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.membership-tag.is-muted {
  color: #4b5563;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
}

.membership-features {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
}

.membership-features li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 6px;
}

.membership-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23047857' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 10px 10px no-repeat,
    #ecfdf5;
  border: 1px solid #a7f3d0;
}

.membership-card-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.membership-pay-hint {
  margin: 16px 0 0;
  font-size: 12px;
  color: var(--text-muted);
  background: #f3f4f6;
  border-radius: 999px;
  padding: 6px 12px;
  display: inline-block;
}

.membership-buy-btn {
  min-width: 140px;
  flex-shrink: 0;
  width: 100%;
}

.membership-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.membership-plans-title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 800;
}

.membership-plans .membership-pay-hint {
  margin-top: 10px;
}

.membership-plans-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.membership-plan-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.membership-plan-card.is-recommended {
  border-color: #93c5fd;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.1);
}

.membership-plan-card.is-current {
  outline: 2px solid rgba(234, 122, 0, 0.35);
}

.membership-plan-ribbon {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 10px;
  font-weight: 800;
  color: #1d4ed8;
  background: #dbeafe;
  border-radius: 999px;
  padding: 2px 8px;
}

.membership-plan-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}

.membership-plan-price {
  font-size: 22px;
  font-weight: 900;
  color: var(--primary, #ea7a00);
}

.membership-plan-price em {
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.membership-plan-meta {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--text-muted);
}

.membership-plan-features {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.55;
}

.membership-plan-features li {
  padding: 3px 0 3px 16px;
  position: relative;
}

.membership-plan-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #16a34a;
  font-weight: 800;
}

@media (max-width: 640px) {
  .membership-plans-grid { grid-template-columns: 1fr; }
}

.client-release-panel {
  position: relative;
  overflow: hidden;
  min-height: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
}

.client-release-visual {
  height: 56px;
  background:
    radial-gradient(ellipse 90% 120% at 10% 30%, rgba(59, 130, 246, 0.35), transparent 55%),
    radial-gradient(ellipse 70% 100% at 90% 80%, rgba(14, 165, 233, 0.28), transparent 50%),
    linear-gradient(135deg, #1e3a8a 0%, #2563eb 48%, #38bdf8 100%);
}

.client-release-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px 16px;
  flex: 1;
}

@media (max-width: 960px) {
  .client-download-page--row,
  .client-download-main {
    grid-template-columns: 1fr;
  }
  .membership-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .membership-meta-grid {
    grid-template-columns: 1fr;
  }
  .membership-card-foot {
    flex-direction: column;
    align-items: stretch;
  }
  .membership-pay-hint {
    max-width: none;
  }
}

.client-release-copy {
  max-width: none;
}

.client-release-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.client-release-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(145deg, #3b82f6, #1d4ed8);
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.24);
}

.client-release-badge {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
}

.client-release-copy h2 {
  margin: 0 0 6px;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

.client-release-copy p {
  margin: 0;
  color: var(--text-sub);
  font-size: 13px;
  line-height: 1.55;
}

.client-release-points {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.client-release-points li {
  position: relative;
  padding-left: 18px;
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.45;
}

.client-release-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2563eb;
}

.client-primary-download {
  width: 100%;
  min-height: 56px;
  padding: 10px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
  transition: filter 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.client-primary-download:hover:not(:disabled) {
  filter: brightness(1.04);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.34);
}

.client-primary-download .icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.client-primary-download-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: left;
}

.client-primary-download-label strong {
  font-size: 15px;
  font-weight: 800;
}

.client-primary-download small {
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  font-weight: 600;
}

.client-release-foot {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.client-primary-download:disabled,
.client-platform-row:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.client-primary-download.is-disabled {
  background: #cbd5e1;
  box-shadow: none;
  filter: none;
}

.client-primary-download.is-loading .icon {
  animation: clientPulse 0.8s ease-in-out infinite alternate;
}

.client-platform-panel {
  border-radius: 8px;
  padding: 18px;
}

.client-platform-title {
  margin-bottom: 12px;
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 900;
}

.client-platform-list {
  display: grid;
  gap: 10px;
}

.client-platform-row {
  width: 100%;
  min-height: 74px;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text-main);
  text-align: left;
  transition: 0.16s;
}

.client-platform-row:hover:not(:disabled) {
  border-color: rgba(234,122,0,0.38);
  background: #fffaf4;
  transform: translateY(-1px);
}

.client-platform-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--surface-dim);
  color: var(--blue);
}

.client-platform-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.client-platform-main strong {
  font-size: 15px;
  font-weight: 900;
}

.client-platform-main small {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
}

.client-platform-state {
  min-width: 76px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-text);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.client-platform-row.is-disabled {
  opacity: 0.62;
}

.client-platform-row.is-disabled .client-platform-state {
  background: var(--surface-dim);
  color: var(--text-muted);
}

@keyframes clientPulse {
  from { opacity: 0.62; }
  to { opacity: 1; }
}

@media (max-width: 900px) {
  .client-download-grid {
    grid-template-columns: 1fr;
  }

  .client-release-panel {
    min-height: 0;
  }
}

@media (max-width: 560px) {
  .client-download-page {
    gap: 14px;
  }

  .client-platform-panel {
    padding: 16px;
  }

  .client-release-body {
    padding: 18px 16px 18px;
  }

  .client-release-copy h2 {
    font-size: 22px;
  }

  .client-primary-download {
    width: 100%;
    min-width: 0;
  }

  .client-platform-row {
    grid-template-columns: 38px 1fr;
  }

  .client-platform-state {
    grid-column: 2;
    width: fit-content;
  }
}
