.account-wrap { min-height: 100vh; }

.acc-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 1.4rem; align-items: start; margin-top: 1.6rem; }

.card { padding: 1.9rem 2.1rem; border-radius: 24px; border: 1px solid rgba(255,255,255,0.08); background: linear-gradient(160deg, rgba(255,255,255,0.035), rgba(255,255,255,0.01)); box-shadow: 0 30px 80px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.06); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.card-title { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 1.4rem; color: var(--text-dim); font-size: 0.78rem; font-weight: 600; letter-spacing: 2.5px; text-transform: uppercase; }
.card-title::before { content: ""; flex: none; width: 3px; height: 13px; border-radius: 3px; background: #f4f7ff; box-shadow: 0 0 10px rgba(170,195,255,0.9), 0 0 24px rgba(120,155,240,0.6); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; margin-bottom: 1.4rem; }
.card-header .card-title { margin-bottom: 0; }

.acc-hero { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 1.8rem; padding: 2rem 2.4rem; background: radial-gradient(ellipse 55% 140% at 100% 0%, rgba(120,155,240,0.16), transparent 60%), linear-gradient(160deg, rgba(255,255,255,0.035), rgba(255,255,255,0.01)); }
.page-avatar-wrap { position: relative; flex: none; }
.page-avatar { display: block; width: 96px; height: 96px; border-radius: 50%; object-fit: cover; background: #05070c; border: 1px solid rgba(200,215,255,0.45); box-shadow: 0 0 40px rgba(120,155,240,0.35); }
.page-avatar-status { position: absolute; right: 4px; bottom: 4px; width: 17px; height: 17px; border-radius: 50%; background: #dfe8ff; border: 3px solid #05070c; box-shadow: 0 0 12px rgba(170,195,255,0.8); }
.acc-who { min-width: 0; }
.page-username { display: flex; align-items: center; flex-wrap: wrap; gap: 0.7rem; font-size: clamp(1.7rem, 3.5vw, 2.2rem); font-weight: 700; letter-spacing: -0.8px; line-height: 1.15; overflow-wrap: anywhere; }
.acc-pro-badge { display: inline-flex; align-items: center; padding: 0.15rem 0.65rem; border-radius: 100px; background: #f4f7ff; color: #05060a; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; box-shadow: 0 0 16px rgba(170,195,255,0.45); }
.acc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.6rem; margin-top: 0.45rem; color: var(--text-dim); font-size: 0.92rem; }
.acc-meta .dot-sep { opacity: 0.5; }
.acc-id { display: inline-flex; align-items: center; gap: 0.45rem; font-family: 'Consolas', monospace; font-size: 0.86rem; cursor: pointer; transition: color 0.2s; }
.acc-id small { font-family: 'Outfit', sans-serif; font-size: 0.72rem; color: var(--accent-2); }
.acc-id:hover { color: #fff; }
.acc-stats { display: flex; gap: 2.2rem; }
.acc-stats div { text-align: right; }
.acc-stats b { display: block; font-size: 1.7rem; font-weight: 700; letter-spacing: -0.6px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.acc-stats span { color: var(--text-dim); font-size: 0.8rem; white-space: nowrap; }

.plan-name { display: flex; align-items: center; flex-wrap: wrap; gap: 0.7rem; margin-bottom: 0.5rem; }
.plan-name b { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 700; letter-spacing: -1px; line-height: 1.15; }
.plan-for { margin-bottom: 0.35rem; color: var(--text-dim); font-size: 0.92rem; }
.plan-for strong { color: var(--accent-3); font-weight: 600; }
.plan-subs { display: grid; margin-top: 1.3rem; border-top: 1px solid rgba(255,255,255,0.06); }
.plan-sub { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.9rem; padding: 0.85rem 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.plan-sub .guild-icon { width: 38px; height: 38px; border-radius: 12px; font-size: 0.85rem; }
.plan-sub-main { min-width: 0; }
.plan-sub-main b { display: block; overflow: hidden; font-size: 0.97rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.plan-sub-main span { color: var(--text-dim); font-size: 0.82rem; }
.plan-sub-date { color: var(--text-dim); font-size: 0.84rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.plan-desc { color: var(--text-dim); font-size: 0.97rem; line-height: 1.55; }
.plan-desc strong { color: #fff; font-weight: 600; }
.plan-meta { display: flex; justify-content: space-between; gap: 1rem; margin: 1.4rem 0 0.55rem; color: var(--text-dim); font-size: 0.84rem; font-variant-numeric: tabular-nums; }
.plan-bar { height: 6px; border-radius: 6px; background: rgba(255,255,255,0.07); overflow: hidden; }
.plan-bar i { display: block; height: 100%; width: 100%; border-radius: 6px; background: linear-gradient(90deg, #3d4f8f, var(--accent-3)); box-shadow: 0 0 10px rgba(120,155,240,0.5); transform-origin: 0 50%; transition: transform 1.2s cubic-bezier(0.16,1,0.3,1); }
.plan-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.6rem; }
.plan-msg { min-height: 1.2rem; margin-top: 0.8rem; color: var(--text-dim); font-size: 0.88rem; }
.plan-msg:empty { display: none; }
.plan-perks { display: grid; gap: 0.45rem; margin: 1.2rem 0 0; padding: 0; list-style: none; color: #d0d4e0; font-size: 0.92rem; }
.plan-perks li { display: flex; align-items: center; gap: 0.6rem; }
.plan-perks li::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 8px rgba(169,189,240,0.8); }

.acc-plan { align-self: stretch; }
.acc-side { display: flex; flex-direction: column; gap: 1.4rem; min-width: 0; }
.acc-licenses { grid-column: 1 / -1; }

.btn-light, .promo-btn, .licenses-buy-btn { flex: none; display: inline-flex; align-items: center; justify-content: center; padding: 0.7rem 1.5rem; border-radius: 100px; border: 1px solid rgba(255,255,255,0.7); background: #f4f7ff; color: #05060a; font-size: 0.9rem; font-weight: 600; white-space: nowrap; cursor: pointer; box-shadow: 0 0 30px rgba(150,180,255,0.22), inset 0 1px 0 #fff; transition: transform 0.3s cubic-bezier(0.16,1,0.3,1), box-shadow 0.3s, background 0.3s; }
.btn-light:hover, .promo-btn:hover, .licenses-buy-btn:hover { transform: translateY(-2px); background: #fff; box-shadow: 0 0 48px rgba(170,195,255,0.45), inset 0 1px 0 #fff; }
.btn-light:disabled, .promo-btn:disabled, .licenses-buy-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-ghost, .card-header-btn, .license-assign-btn, .license-panel-link { display: inline-flex; align-items: center; justify-content: center; padding: 0.5rem 1.05rem; border-radius: 100px; border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.04); color: #fff; font-size: 0.84rem; font-weight: 600; white-space: nowrap; cursor: pointer; transition: border-color 0.25s, background 0.25s; }
.btn-ghost { padding: 0.7rem 1.3rem; font-size: 0.9rem; }
.btn-ghost:hover, .card-header-btn:hover, .license-assign-btn:hover, .license-panel-link:hover { border-color: rgba(150,180,255,0.5); background: rgba(255,255,255,0.08); }
.btn-ghost:disabled, .card-header-btn:disabled, .license-assign-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.card-link-btn { padding: 0; border: none; background: none; color: var(--text-dim); font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: color 0.2s; }
.card-link-btn:hover { color: #fff; }

.pill { display: inline-flex; align-items: center; padding: 0.18rem 0.7rem; border-radius: 100px; font-size: 0.76rem; font-weight: 600; letter-spacing: 0; white-space: nowrap; }
.pill-on { color: #cfe0ff; background: rgba(120,155,240,0.14); border: 1px solid rgba(150,180,255,0.3); }
.pill-off { color: var(--text-dim); background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); }
.pill-warn { color: #fcd34d; background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.25); }

.promo-row { display: flex; gap: 0.6rem; }
.promo-input { flex: 1; min-width: 0; padding: 0.75rem 1.2rem; border-radius: 100px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.04); color: #fff; font-family: 'Consolas', monospace; font-size: 0.92rem; text-transform: uppercase; outline: none; transition: border-color 0.25s, box-shadow 0.25s; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.promo-input::placeholder { color: var(--text-dim); font-family: 'Outfit', sans-serif; text-transform: none; }
.promo-input:focus { border-color: rgba(150,180,255,0.55); box-shadow: 0 0 0 4px rgba(120,155,240,0.12); }
.promo-msg { min-height: 1.4rem; margin-top: 0.7rem; padding-left: 0.4rem; font-size: 0.88rem; }
.promo-msg.ok { color: var(--accent-3); }
.promo-msg.err { color: #fca5a5; }

#invoicesSection { min-height: 60px; }
.invoice-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 3.4rem; align-items: center; gap: 0.9rem; padding: 0.75rem 0; border-top: 1px solid rgba(255,255,255,0.06); }
.invoice-row:first-child { padding-top: 0; border-top: none; }
.invoice-row:last-child { padding-bottom: 0; }
.invoice-date { color: #d0d4e0; font-size: 0.92rem; }
.invoice-date small { display: block; color: var(--text-dim); font-size: 0.78rem; }
.invoice-amount { color: #fff; font-size: 0.95rem; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.invoice-link { justify-self: end; color: var(--accent-2); font-size: 0.8rem; font-weight: 600; transition: color 0.2s; }
.invoice-link:hover { color: #fff; }
.invoices-empty { color: var(--text-dim); font-size: 0.95rem; }

#licensesSection { min-height: 80px; }
.license-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 1rem; padding: 1.05rem 0; border-top: 1px solid rgba(255,255,255,0.06); }
.license-row:first-child { padding-top: 0; border-top: none; }
.license-row:last-child { padding-bottom: 0; }
.license-row.expired .license-title { color: var(--text-dim); }
.guild-icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; overflow: hidden; border-radius: 14px; border: 1px solid rgba(200,215,255,0.2); background: #05070c; color: var(--accent-3); font-size: 0.95rem; font-weight: 700; }
.guild-icon img { display: block; width: 100%; height: 100%; object-fit: cover; }
.guild-icon.empty { border-style: dashed; color: var(--text-dim); }
.license-main { min-width: 0; }
.license-title { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; font-size: 1rem; font-weight: 600; overflow-wrap: anywhere; }
.license-guild-id { color: var(--text-dim); font-family: 'Consolas', monospace; font-size: 0.9rem; font-weight: 500; }
.license-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem 0.8rem; margin-top: 0.35rem; color: var(--text-dim); font-size: 0.84rem; }
.license-code { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.15rem 0.7rem; border-radius: 100px; border: 1px solid rgba(150,180,255,0.25); background: rgba(120,155,240,0.1); color: var(--accent-3); font-family: 'Consolas', monospace; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.04em; cursor: pointer; transition: background 0.2s; }
.license-code:hover { background: rgba(120,155,240,0.2); }
.license-code small { color: var(--accent-2); font-family: 'Outfit', sans-serif; font-size: 0.7rem; font-weight: 500; letter-spacing: 0; }
.license-row.expired .license-code { border-color: rgba(255,255,255,0.08); background: rgba(255,255,255,0.03); color: var(--text-dim); }
.license-action { display: flex; align-items: center; justify-content: flex-end; gap: 0.5rem; min-width: 0; }
.license-assign-wrap { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.license-guild-select { width: 240px; min-width: 0; max-width: 100%; padding: 0.5rem 0.9rem; border-radius: 100px; border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.04); color: #fff; color-scheme: dark; font-size: 0.85rem; outline: none; cursor: pointer; transition: border-color 0.25s; }
.license-guild-select:focus { border-color: rgba(150,180,255,0.55); }
.license-guild-select option { background: #0a0c12; color: #fff; }
.license-no-guilds { color: var(--text-dim); font-size: 0.88rem; text-decoration: underline; text-decoration-color: rgba(200,215,255,0.35); text-underline-offset: 3px; transition: color 0.2s; }
.license-no-guilds:hover { color: #fff; }
.licenses-empty { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: var(--text-dim); font-size: 0.97rem; }
.licenses-more { margin-top: 1.1rem; }

.section-error { display: flex; align-items: center; gap: 0.6rem; color: var(--text-dim); font-size: 0.95rem; }
.section-error::before { content: "!"; flex: none; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: rgba(239,68,68,0.14); color: #fca5a5; font-size: 0.72rem; font-weight: 700; }

.skeleton-line { height: 14px; margin-bottom: 10px; border-radius: 6px; background: rgba(255,255,255,0.06); animation: skeletonPulse 1.5s ease-in-out infinite; }
@keyframes skeletonPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

@media (max-width: 960px) {
    .acc-grid { grid-template-columns: minmax(0, 1fr); }
    .acc-hero { grid-template-columns: auto minmax(0, 1fr); }
    .acc-stats { grid-column: 1 / -1; justify-content: space-between; gap: 1rem; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,0.06); }
    .acc-stats div { text-align: left; }
}
@media (max-width: 700px) {
    .acc-grid { gap: 1.1rem; margin-top: 1.2rem; }
    .card { padding: 1.5rem 1.2rem; border-radius: 20px; }
    .acc-hero { gap: 1.1rem; padding: 1.4rem 1.2rem; }
    .page-avatar { width: 64px; height: 64px; }
    .page-avatar-status { right: 0; bottom: 0; width: 14px; height: 14px; border-width: 2px; }
    .acc-stats b { font-size: 1.35rem; }
    .acc-stats span { font-size: 0.74rem; white-space: normal; }
    .card-header { flex-wrap: wrap; }
    .license-row { grid-template-columns: auto minmax(0, 1fr); }
    .license-action { grid-column: 1 / -1; justify-content: flex-start; }
    .license-assign-wrap { flex: 1; width: 100%; }
    .license-guild-select { flex: 1; width: auto; }
    .plan-actions > * { flex: 1 1 auto; }
    .plan-sub { grid-template-columns: auto minmax(0, 1fr); }
    .plan-sub > :last-child { grid-column: 2; justify-self: start; }
}
@media (prefers-reduced-motion: reduce) {
    .plan-bar i { transition: none; }
}
