body::before { animation: drift-a 18s ease-in-out infinite alternate; }
body::after { animation: drift-b 22s ease-in-out infinite alternate; }
.glow-pink { animation: drift-c 20s ease-in-out infinite alternate; }
@keyframes drift-a { to { transform: translate(-120px, 90px) scale(1.12); } }
@keyframes drift-b { to { transform: translate(140px, -80px) scale(1.08); } }
@keyframes drift-c { to { transform: translate(90px, 60px) scale(1.2); } }

.grid-bg {
    position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background-image: linear-gradient(rgba(111, 76, 255, .055) 1px, transparent 1px), linear-gradient(90deg, rgba(111, 76, 255, .055) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 75%);
    mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 75%);
}

.reveal > * { opacity: 0; transform: translateY(14px); animation: rise .6s cubic-bezier(.2, .8, .2, 1) forwards; animation-delay: calc(var(--d, 0) * 70ms); }
@keyframes rise { to { opacity: 1; transform: none; } }

.auth-shell {
    width: min(980px, 100%);
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 40px 90px rgba(76, 60, 180, .16), 0 2px 8px rgba(20, 16, 60, .05);
    animation: pop .7s cubic-bezier(.2, .8, .2, 1);
}
@keyframes pop { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }

.auth-promo {
    position: relative;
    overflow: hidden;
    padding: 44px 40px;
    color: #fff;
    background:
        radial-gradient(520px 380px at 110% -10%, rgba(47, 181, 255, .65), transparent 60%),
        radial-gradient(460px 360px at -20% 110%, rgba(255, 110, 196, .55), transparent 60%),
        linear-gradient(150deg, #5b36ff 0%, #7a4dff 45%, #9b5cff 100%);
    display: flex;
    flex-direction: column;
    min-height: 560px;
}
.auth-promo::before {
    content: "";
    position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .22) 1px, transparent 1px);
    background-size: 22px 22px;
    -webkit-mask-image: linear-gradient(180deg, #000, transparent 70%);
    mask-image: linear-gradient(180deg, #000, transparent 70%);
    pointer-events: none;
}
.promo-kicker { position: relative; display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; padding: 7px 12px; border-radius: 999px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28); backdrop-filter: blur(8px); }
.promo-kicker i { width: 7px; height: 7px; border-radius: 50%; background: #7dffcf; box-shadow: 0 0 0 4px rgba(125, 255, 207, .25); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(125, 255, 207, 0); } }
.auth-promo h2 { position: relative; font-size: 34px; line-height: 1.08; letter-spacing: -.035em; margin: 22px 0 12px; color: #fff; }
.auth-promo p { position: relative; color: rgba(255, 255, 255, .84); margin: 0 0 22px; max-width: 360px; }
.promo-chips { position: relative; display: flex; flex-wrap: wrap; gap: 8px; }
.promo-chips span { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; padding: 8px 13px; border-radius: 999px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .24); backdrop-filter: blur(6px); }
.promo-chips svg { width: 16px; height: 16px; }

.promo-stage { position: relative; flex: 1; min-height: 210px; margin-top: 26px; }
.float-card {
    position: absolute;
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px;
    border-radius: 18px;
    color: var(--ink);
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 20px 40px rgba(30, 10, 90, .28);
    animation: float 6s ease-in-out infinite;
    white-space: nowrap;
}
.float-card b { display: block; font-size: 14px; }
.float-card small { display: block; font-size: 12.5px; color: var(--muted); }
.float-ico { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff; }
.float-ico svg { width: 19px; height: 19px; }
.fc-1 { left: 0; top: 6px; animation-delay: 0s; }
.fc-2 { right: 0; top: 76px; animation-delay: -2s; }
.fc-3 { left: 26px; bottom: 4px; animation-delay: -4s; }
@keyframes float { 50% { transform: translateY(-10px); } }
.eq { display: inline-flex; align-items: flex-end; gap: 3px; height: 18px; margin-left: 4px; }
.eq i { width: 3px; border-radius: 2px; background: linear-gradient(#2fb5ff, #21d4b4); animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(1) { height: 40%; animation-delay: -.2s; }
.eq i:nth-child(2) { height: 90%; animation-delay: -.5s; }
.eq i:nth-child(3) { height: 60%; animation-delay: -.8s; }
.eq i:nth-child(4) { height: 80%; animation-delay: -.35s; }
@keyframes eq { 50% { transform: scaleY(.35); } }
.eq i { transform-origin: bottom; }

.auth-form { padding: 48px 44px 36px; display: flex; flex-direction: column; justify-content: center; }
.auth-form h1 { font-size: 32px; }

.dash {
    width: min(980px, 100%);
    background: rgba(255, 255, 255, .86);
    backdrop-filter: blur(16px);
    border: 1px solid var(--line);
    border-radius: 32px;
    padding: 34px;
    box-shadow: 0 40px 90px rgba(76, 60, 180, .14), 0 2px 8px rgba(20, 16, 60, .05);
    animation: pop .7s cubic-bezier(.2, .8, .2, 1);
}
.dash-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.dash-user { display: flex; align-items: center; gap: 16px; min-width: 0; }
.avatar {
    position: relative;
    flex: none; width: 64px; height: 64px; border-radius: 22px;
    display: grid; place-items: center;
    font-size: 26px; font-weight: 800; color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-3)) center / cover no-repeat;
    box-shadow: 0 14px 30px rgba(111, 76, 255, .3);
}
.avatar::after { content: ""; position: absolute; right: -3px; bottom: -3px; width: 18px; height: 18px; border-radius: 50%; background: #22c58b; border: 3px solid #fff; }
.dash-user h1 { margin: 4px 0 0; font-size: 30px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-sub { margin: 4px 0 0; }
.dash-side { display: flex; align-items: center; gap: 10px; }
.balance-chip { display: flex; align-items: center; gap: 12px; padding: 10px 18px 10px 10px; border-radius: 20px; background: linear-gradient(135deg, #f4f0ff, #ecf7ff); border: 1px solid var(--line); }
.balance-chip .wallet { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #12b886, #2fb5ff); box-shadow: 0 10px 20px rgba(18, 184, 134, .28); }
.balance-chip .wallet svg { width: 20px; height: 20px; }
.balance-chip small { display: block; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.balance-chip b { display: block; font-size: 20px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.icon-btn { appearance: none; cursor: pointer; width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; color: var(--muted); background: #fff; border: 1px solid var(--line); transition: color .15s, border-color .15s; }
.icon-btn:hover { color: var(--bad); border-color: #ffd3dc; }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:disabled { opacity: .5; cursor: default; }

.bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 150px; gap: 14px; margin-top: 26px; }
.tile {
    position: relative;
    overflow: hidden;
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 20px;
    border-radius: 24px;
    color: #fff;
    text-decoration: none;
    isolation: isolate;
    box-shadow: 0 14px 30px var(--glow, rgba(111, 76, 255, .25));
    transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s;
}
.tile::before {
    content: "";
    position: absolute; inset: 0; z-index: -1;
    background: radial-gradient(380px 220px at 85% 0%, rgba(255, 255, 255, .35), transparent 60%);
}
.tile::after {
    content: "";
    position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; z-index: 1;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent);
    transform: skewX(-18deg);
    transition: left .7s ease;
    pointer-events: none;
}
.tile:hover { transform: translateY(-4px); box-shadow: 0 24px 44px var(--glow, rgba(111, 76, 255, .32)); }
.tile:hover::after { left: 130%; }
.tile-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.tile-ico { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; background: rgba(255, 255, 255, .22); border: 1px solid rgba(255, 255, 255, .35); backdrop-filter: blur(6px); }
.tile-ico svg { width: 23px; height: 23px; }
.tile-arrow { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .2); transition: transform .25s, background .25s; }
.tile-arrow svg { width: 17px; height: 17px; }
.tile:hover .tile-arrow { transform: rotate(-45deg); background: rgba(255, 255, 255, .34); }
.tile-body b { display: block; font-size: 21px; letter-spacing: -.02em; }
.tile-body span { display: block; font-size: 14px; color: rgba(255, 255, 255, .86); line-height: 1.35; }
.tile-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tile-tags em { font-style: normal; font-size: 12px; font-weight: 650; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .28); }
.tile-bg { position: absolute; right: -26px; bottom: -30px; width: 150px; height: 150px; z-index: -1; opacity: .16; transform: rotate(-12deg); transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.tile:hover .tile-bg { transform: rotate(0deg) scale(1.08); }

.tile-photo { grid-column: span 2; grid-row: span 2; --glow: rgba(255, 106, 136, .34); background: linear-gradient(140deg, #ff5f8f 0%, #ff8a6b 55%, #ffb36b 100%); }
.tile-photo .tile-body b { font-size: 30px; }
.tile-photo .tile-body span { font-size: 15.5px; max-width: 300px; }
.tile-photo .tile-bg { width: 260px; height: 260px; right: -40px; bottom: -50px; }
.tile-video { grid-column: span 2; --glow: rgba(111, 76, 255, .34); background: linear-gradient(140deg, #5b36ff 0%, #8c4dff 60%, #c05cff 100%); }
.tile-music { --glow: rgba(31, 182, 255, .32); background: linear-gradient(140deg, #1fa2ff 0%, #12d8c6 100%); }
.tile-agents { --glow: rgba(18, 184, 134, .32); background: linear-gradient(140deg, #0fb37f 0%, #6fd84a 100%); }
.tile-products { grid-column: span 4; grid-row: span 1; flex-direction: row; align-items: center; --glow: rgba(43, 45, 110, .3); background: linear-gradient(120deg, #1d1f5e 0%, #3b2f9a 55%, #6f4cff 100%); }
.tile-products .tile-top { order: 2; margin-left: auto; align-items: center; }
.tile-products .tile-ico { order: 0; }
.tile-products .tile-body { display: flex; align-items: center; gap: 16px; }
.tile-products .tile-tags { margin-top: 0; }
.tile-music .tile-body span, .tile-agents .tile-body span { font-size: 13px; }

@media (max-width: 860px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-promo { min-height: 0; padding: 32px 26px 28px; }
    .auth-promo h2 { font-size: 27px; }
    .promo-stage { display: none; }
    .auth-form { padding: 32px 24px 28px; }
    .bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: minmax(140px, auto); }
    .tile-body { margin-top: 18px; }
    .tile-products .tile-body { margin-top: 0; }
    .tile-photo { grid-column: span 2; grid-row: span 1; }
    .tile-photo .tile-body b { font-size: 24px; }
    .tile-photo .tile-tags { display: none; }
    .tile-photo .tile-bg { width: 170px; height: 170px; }
    .tile-video, .tile-products { grid-column: span 2; }
    .tile-products .tile-tags { display: none; }
}
@media (max-width: 520px) {
    .dash { padding: 22px 18px; border-radius: 26px; }
    .dash-user h1 { font-size: 24px; }
    .avatar { width: 54px; height: 54px; border-radius: 18px; font-size: 22px; }
    .dash-side { width: 100%; }
    .balance-chip { flex: 1; }
    .bento { gap: 10px; }
    .tile { padding: 16px; border-radius: 20px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .reveal > * { opacity: 1; transform: none; }
}

.head-actions { display: flex; align-items: center; gap: 8px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
@media (max-width: 560px) {
    .coop-pill span { display: none; }
}
