.sc-account-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background:
    radial-gradient(circle at 20% 10%, rgba(16, 185, 129, 0.22), transparent 32%),
    radial-gradient(circle at 86% 18%, rgba(99, 102, 241, 0.20), transparent 30%),
    rgba(15, 23, 42, 0.58);
  opacity: 0;
  pointer-events: none;
  transition: opacity 190ms ease;
  backdrop-filter: blur(10px);
}

.sc-account-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 90;
  width: min(980px, calc(100vw - 28px));
  max-height: min(760px, calc(100dvh - 28px));
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(360px, 1fr);
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.82);
  border-radius: 34px;
  background: #ffffff;
  box-shadow: 0 34px 90px rgba(15, 23, 42, 0.32), 0 0 0 1px rgba(255, 255, 255, 0.42) inset;
  transform: translate(-50%, calc(-50% + 24px)) scale(0.97);
  opacity: 0;
  pointer-events: none;
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 180ms ease;
}

body.sc-account-open { overflow: hidden; }
body.sc-account-open .sc-account-backdrop { opacity: 1; pointer-events: auto; }
body.sc-account-open .sc-account-modal { transform: translate(-50%, -50%) scale(1); opacity: 1; pointer-events: auto; }

.sc-account-visual {
  position: relative;
  display: grid;
  align-content: space-between;
  min-height: 610px;
  padding: 32px;
  color: #ffffff;
  background:
    radial-gradient(circle at 20% 12%, rgba(255, 255, 255, 0.24), transparent 28%),
    radial-gradient(circle at 70% 70%, rgba(16, 185, 129, 0.28), transparent 34%),
    linear-gradient(145deg, #0f172a 0%, #111827 42%, #064e3b 100%);
}

.sc-account-visual::after {
  content: "";
  position: absolute;
  inset: auto 28px 30px auto;
  width: 136px;
  height: 136px;
  border-radius: 38px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.04)),
    linear-gradient(135deg, rgba(16, 185, 129, 0.62), rgba(99, 102, 241, 0.30));
  transform: rotate(-10deg);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.28);
}

.sc-account-brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  padding: 10px 13px 10px 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px);
}

.sc-account-brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: #0f172a;
  background: #ffffff;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.sc-account-brand strong { font-size: 0.96rem; letter-spacing: -0.02em; }
.sc-account-hero { position: relative; z-index: 1; display: grid; gap: 18px; max-width: 370px; }
.sc-account-kicker { width: fit-content; margin: 0; padding: 8px 11px; border: 1px solid rgba(167, 243, 208, 0.30); border-radius: 999px; color: #a7f3d0; background: rgba(6, 78, 59, 0.28); font-size: 0.75rem; font-weight: 950; letter-spacing: 0.12em; text-transform: uppercase; }
.sc-account-hero h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.35rem); line-height: 0.95; letter-spacing: -0.075em; }
.sc-account-hero p { margin: 0; color: rgba(255, 255, 255, 0.76); font-size: 1rem; line-height: 1.65; }
.sc-account-benefits { position: relative; z-index: 1; display: grid; gap: 10px; padding: 0; margin: 26px 0 0; list-style: none; }
.sc-account-benefits li { display: flex; align-items: center; gap: 10px; color: rgba(255, 255, 255, 0.82); font-size: 0.94rem; font-weight: 760; }
.sc-account-benefits li::before { content: "✓"; display: grid; place-items: center; flex: 0 0 auto; width: 22px; height: 22px; border-radius: 999px; color: #064e3b; background: #a7f3d0; font-size: 0.78rem; font-weight: 950; }

.sc-account-panel { display: grid; grid-template-rows: auto 1fr; min-height: 610px; overflow: hidden; background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.09), transparent 34%), #ffffff; }
.sc-account-topbar { display: flex; align-items: start; justify-content: space-between; gap: 18px; padding: 28px 30px 18px; border-bottom: 1px solid #e2e8f0; }
.sc-account-title-block { min-width: 0; display: grid; gap: 6px; }
.sc-account-title { margin: 0; color: #0f172a; font-size: 1.55rem; line-height: 1.05; letter-spacing: -0.055em; }
.sc-account-subtitle { margin: 0; color: #64748b; font-size: 0.94rem; line-height: 1.45; }
.sc-account-close { display: grid; place-items: center; flex: 0 0 auto; width: 44px; height: 44px; border: 1px solid #e2e8f0; border-radius: 999px; color: #0f172a; background: #ffffff; box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08); cursor: pointer; font: inherit; font-size: 1.45rem; line-height: 1; }
.sc-account-close:hover { transform: translateY(-1px); }
.sc-account-body { min-height: 0; overflow: auto; padding: 22px 30px 30px; }
.sc-account-status { margin: 0 0 18px; padding: 13px 15px; border: 1px solid #e2e8f0; border-radius: 18px; color: #475569; background: #f8fafc; font-size: 0.94rem; line-height: 1.48; }
.sc-account-status[data-tone="success"] { border-color: rgba(16, 185, 129, 0.32); color: #047857; background: #ecfdf5; }
.sc-account-status[data-tone="error"] { border-color: rgba(185, 28, 28, 0.25); color: #b91c1c; background: #fef2f2; }
.sc-account-status[data-tone="checkout"] { border-color: rgba(99, 102, 241, 0.30); color: #3730a3; background: #eef2ff; }
.sc-account-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0 0 18px; padding: 5px; border-radius: 999px; background: #f1f5f9; }
.sc-account-tab { min-height: 42px; border: 0; border-radius: 999px; color: #64748b; background: transparent; cursor: pointer; font: inherit; font-size: 0.92rem; font-weight: 900; }
.sc-account-tab[aria-selected="true"] { color: #0f172a; background: #ffffff; box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08); }
.sc-account-form { display: grid; gap: 14px; }
.sc-account-field { display: grid; gap: 7px; }
.sc-account-label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.sc-account-field label { color: #334155; font-size: 0.91rem; font-weight: 900; }
.sc-account-hint { color: #64748b; font-size: 0.82rem; font-weight: 750; }
.sc-account-input-wrap { position: relative; }
.sc-account-input-wrap input { width: 100%; min-height: 50px; padding: 13px 48px 13px 14px; border: 1px solid #cbd5e1; border-radius: 16px; outline: none; color: #0f172a; background: #ffffff; font: inherit; transition: border 160ms ease, box-shadow 160ms ease, background 160ms ease; }
.sc-account-input-wrap input:focus { border-color: #10b981; box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.14); }
.sc-account-input-icon { position: absolute; top: 50%; right: 14px; transform: translateY(-50%); color: #94a3b8; font-size: 1rem; pointer-events: none; }
.sc-account-password-rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 2px 0 0; }
.sc-account-rule { display: flex; align-items: center; gap: 7px; color: #64748b; font-size: 0.82rem; font-weight: 760; }
.sc-account-rule::before { content: ""; display: block; width: 7px; height: 7px; border-radius: 999px; background: #cbd5e1; }
.sc-account-rule[data-valid="true"] { color: #047857; }
.sc-account-rule[data-valid="true"]::before { background: #10b981; }
.sc-account-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 4px; }
.sc-account-primary, .sc-account-secondary, .sc-account-ghost, .sc-account-danger { min-height: 48px; padding: 0 17px; border-radius: 999px; cursor: pointer; font: inherit; font-weight: 950; }
.sc-account-primary { border: 0; color: #ffffff; background: #111827; box-shadow: 0 16px 34px rgba(15, 23, 42, 0.16); }
.sc-account-primary:hover { transform: translateY(-1px); }
.sc-account-primary:disabled, .sc-account-secondary:disabled, .sc-account-ghost:disabled, .sc-account-danger:disabled { cursor: not-allowed; opacity: 0.58; transform: none; }
.sc-account-secondary { border: 1px solid #c7d2fe; color: #312e81; background: #eef2ff; }
.sc-account-ghost { border: 1px solid #e2e8f0; color: #334155; background: #ffffff; }
.sc-account-danger { border: 1px solid rgba(185, 28, 28, 0.20); color: #b91c1c; background: #fef2f2; }
.sc-account-divider { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin: 18px 0; color: #94a3b8; font-size: 0.82rem; font-weight: 850; text-transform: uppercase; letter-spacing: 0.08em; }
.sc-account-divider::before, .sc-account-divider::after { content: ""; height: 1px; background: #e2e8f0; }
.sc-account-mini-copy { margin: 0; color: #64748b; font-size: 0.92rem; line-height: 1.55; }
.sc-account-signed-in { display: grid; gap: 16px; }
.sc-account-card, .sc-order-panel { display: grid; gap: 14px; padding: 18px; border: 1px solid #e2e8f0; border-radius: 24px; background: #ffffff; box-shadow: 0 16px 38px rgba(15, 23, 42, 0.06); }
.sc-account-profile { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 13px; align-items: center; }
.sc-account-avatar { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 18px; color: #ffffff; background: linear-gradient(135deg, #111827, #10b981); font-size: 1.1rem; font-weight: 950; letter-spacing: -0.04em; }
.sc-account-profile p { margin: 0; color: #64748b; font-size: 0.9rem; }
.sc-account-profile strong { display: block; margin-top: 3px; color: #0f172a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1.02rem; }
.sc-account-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sc-account-metric { padding: 13px; border: 1px solid #e2e8f0; border-radius: 18px; background: #f8fafc; }
.sc-account-metric span { display: block; color: #64748b; font-size: 0.78rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.sc-account-metric strong { display: block; margin-top: 6px; color: #0f172a; font-size: 1.1rem; }
.sc-order-panel { background: #f8fafc; box-shadow: none; }
.sc-order-panel-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sc-order-panel-header h3 { margin: 0; color: #0f172a; font-size: 1.08rem; letter-spacing: -0.03em; }
.sc-order-status, .sc-account-footer-copy { margin: 0; color: #64748b; font-size: 0.92rem; line-height: 1.45; }
.sc-order-list { display: grid; gap: 10px; padding: 0; margin: 0; list-style: none; }
.sc-order-card { display: grid; gap: 5px; padding: 13px; border: 1px solid #e2e8f0; border-radius: 18px; background: #ffffff; }
.sc-order-card strong { color: #0f172a; }
.sc-order-card span { color: #64748b; font-size: 0.88rem; line-height: 1.45; }
.sc-account-footer-copy { margin-top: 14px; font-size: 0.86rem; line-height: 1.5; }

@media (max-width: 860px) {
  .sc-account-modal { grid-template-columns: 1fr; width: min(560px, calc(100vw - 24px)); }
  .sc-account-visual { min-height: auto; padding: 24px; }
  .sc-account-visual::after { display: none; }
  .sc-account-hero { gap: 10px; }
  .sc-account-hero h2 { font-size: 2rem; }
  .sc-account-benefits { display: none; }
  .sc-account-panel { min-height: 0; }
}

@media (max-width: 560px) {
  .sc-account-modal { width: 100vw; height: 100dvh; max-height: none; border-radius: 0; }
  .sc-account-visual { display: none; }
  .sc-account-topbar, .sc-account-body { padding-left: 18px; padding-right: 18px; }
  .sc-account-tabs { grid-template-columns: 1fr; border-radius: 22px; }
  .sc-account-tab { border-radius: 18px; }
  .sc-account-password-rules, .sc-account-metrics { grid-template-columns: 1fr; }
  .sc-order-panel-header { align-items: stretch; flex-direction: column; }
}