/*
|--------------------------------------------------------------------------
| Account & panel pages (wallet, deposit, withdraw, shipments, settings,
| affiliate, daily spin, static pages, streamer panel)
|--------------------------------------------------------------------------
| Extends the global design system in style.css: same radii, panels,
| form components (.form-group/.form-input) and order-card language.
*/

.account-page {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* ---------- alerts ---------- */

.account-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 14px;
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 600;
    margin-top: 16px;
}

.account-alert--success {
    background: rgba(28, 201, 120, 0.12);
    border: 1px solid rgba(28, 201, 120, 0.24);
    color: #59e49f;
}

.account-alert--error {
    background: rgba(255, 95, 95, 0.12);
    border: 1px solid rgba(255, 95, 95, 0.24);
    color: #ff8f8f;
}

/* ---------- buttons ---------- */

.account-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 22px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, #2f6bff 0%, #4a8bff 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 14px 30px rgba(47, 107, 255, 0.25);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.account-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(47, 107, 255, 0.32);
}

.account-btn--secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: none;
    color: #eaf0fb;
}

.account-btn--secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

.account-btn-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* ---------- forms (build on .form-group / .form-input) ---------- */

.account-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 560px;
    margin-top: 20px;
}

.account-form--narrow {
    max-width: 440px;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.form-row-2--left {
    grid-template-columns: 2fr 1fr;
}

.form-row-2--right {
    grid-template-columns: 1fr 2fr;
}

select.form-input {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238092b7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 42px;
    cursor: pointer;
}

select.form-input option {
    color: #0a0f18;
}

textarea.form-input {
    height: auto;
    min-height: 110px;
    padding: 14px 16px;
    resize: vertical;
    line-height: 1.5;
}

input[type="color"].form-input {
    width: 84px;
    height: 48px;
    padding: 6px;
    cursor: pointer;
}

.form-hint {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.form-hint a {
    color: #75a5ff;
    font-weight: 700;
    text-decoration: none;
}

.form-hint a:hover {
    text-decoration: underline;
}

/* ---------- card lists (reuses .order-card) ---------- */

.account-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 20px;
}

.account-list .order-card {
    margin: 0;
}

.account-list-foot {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
    color: var(--muted);
    font-size: 14px;
}

.account-list-foot a {
    color: #75a5ff;
    font-weight: 700;
    text-decoration: none;
}

.account-list-foot a:hover {
    text-decoration: underline;
}

.order-card-thumb {
    width: 52px;
    height: 62px;
    object-fit: contain;
    flex-shrink: 0;
}

.order-card-head-left--row {
    flex-direction: row;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.order-number--break {
    font-size: 14px;
    word-break: break-all;
}

.order-meta--commission {
    color: #59e49f;
    font-size: 14px;
    font-weight: 800;
}

/* ---------- link tiles (support page etc.) ---------- */

a.stat-card {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

a.stat-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(117, 165, 255, 0.35);
    transform: translateY(-2px);
}

.stat-value--sm {
    font-size: 19px;
}

/* ---------- static / legal pages ---------- */

.account-prose h2 {
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    margin: 26px 0 8px;
    letter-spacing: -0.01em;
}

.account-prose p {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.75;
}

/* ---------- selectable item rows (shipment redemption) ---------- */

.account-select-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 440px;
    overflow-y: auto;
    margin: 18px 0;
    padding-right: 6px;
}

.account-select-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-radius: 16px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease;
}

.account-select-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.account-select-row:has(input:checked) {
    border-color: rgba(117, 165, 255, 0.55);
    background: rgba(47, 107, 255, 0.08);
}

.account-select-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.account-select-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #3d63f3;
    flex-shrink: 0;
}

.account-select-img {
    width: 42px;
    height: 58px;
    object-fit: contain;
    flex-shrink: 0;
}

.account-select-title {
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-select-meta {
    color: var(--muted);
    font-size: 12px;
    margin-top: 2px;
}

.account-select-value {
    color: #fff;
    font-weight: 800;
    white-space: nowrap;
}

/* ---------- deposit amount chips ---------- */

.deposit-presets {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.deposit-preset {
    min-height: 44px;
    padding: 0 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.04);
    color: #eaf0fb;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease;
}

.deposit-preset:hover,
.deposit-preset.is-active {
    border-color: rgba(117, 165, 255, 0.55);
    background: rgba(47, 107, 255, 0.12);
}

/* ---------- latest pulls grid (dashboard) ---------- */

.pull-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
    margin-top: 20px;
}

a.pull-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-radius: 16px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.18s ease, transform 0.18s ease;
}

a.pull-card:hover {
    border-color: rgba(117, 165, 255, 0.35);
    transform: translateY(-2px);
}

.pull-card img {
    width: 100%;
    height: 130px;
    object-fit: contain;
}

.pull-card-name {
    color: var(--muted);
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pull-card-value {
    color: #fff;
    font-size: 16px;
    font-weight: 800;
}

/* ---------- analytics bars (streamer panel) ---------- */

.bar-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.bar-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.bar-row-label {
    width: 92px;
    flex-shrink: 0;
    color: var(--muted);
    font-size: 13px;
}

.bar-row-track {
    flex: 1;
    height: 20px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.bar-row-fill {
    height: 100%;
    border-radius: 8px;
    background: linear-gradient(90deg, #2f6bff, #4a8bff);
    min-width: 4px;
}

.bar-row-value {
    width: 130px;
    flex-shrink: 0;
    text-align: right;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

/* ---------- period switcher (analytics) ---------- */

.period-switch {
    display: inline-flex;
    gap: 6px;
    padding: 5px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    margin-top: 12px;
}

.period-switch a {
    padding: 7px 16px;
    border-radius: 9px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: 0.18s ease;
}

.period-switch a:hover {
    color: #fff;
}

.period-switch a.is-active {
    background: linear-gradient(135deg, #2f6bff 0%, #4a8bff 100%);
    color: #fff;
}

/* ---------- overlay URL rows (streamer settings) ---------- */

.overlay-url-row .order-card-head-left {
    min-width: 0;
}

/* ---------- daily spin wheel ---------- */

.daily-spin-wrap {
    position: relative;
    width: 280px;
    margin: 30px auto 10px;
}

.daily-spin-pointer {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    color: #ffc86b;
    font-size: 32px;
    z-index: 2;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.daily-spin-wheel {
    position: relative;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    border: 6px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35), inset 0 0 30px rgba(0, 0, 0, 0.35);
    background: conic-gradient(
        #2a3550 0deg 60deg,
        #1c2438 60deg 120deg,
        #2a3550 120deg 180deg,
        #1c2438 180deg 240deg,
        #2a3550 240deg 300deg,
        #3d63f3 300deg 360deg
    );
    transition: transform 4.2s cubic-bezier(0.12, 0.6, 0.08, 1);
}

.daily-spin-label {
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -14px 0 0 -20px;
    width: 40px;
    height: 28px;
    color: #fff;
    font-weight: 800;
    font-size: 15px;
    text-align: center;
    line-height: 28px;
    transform-origin: center;
}

.daily-spin-hub {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #0a0f18;
    border: 3px solid rgba(255, 255, 255, 0.18);
    color: #ffc86b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.daily-spin-result {
    min-height: 30px;
    margin-top: 14px;
    color: var(--muted);
    font-size: 16px;
}

.daily-spin-result strong {
    color: #59e49f;
}

/* ---------- responsive ---------- */

@media (max-width: 1024px) {
    .pull-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .form-row-2,
    .form-row-2--left,
    .form-row-2--right {
        grid-template-columns: 1fr;
    }

    .pull-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bar-row-label {
        width: 56px;
    }

    .bar-row-value {
        width: 96px;
    }
}

/* stacked cards inside page-cards need spacing even without .account-list */
.page-card > .order-card,
.page-card > form > .order-card {
    margin-top: 14px;
}

.order-number a {
    color: inherit;
    text-decoration: none;
}

.order-number a:hover {
    text-decoration: underline;
}

/* ---------- charts ---------- */

.account-chart-wrap {
    position: relative;
    height: 300px;
    margin-top: 20px;
}

.account-prose a {
    color: #75a5ff;
    font-weight: 700;
    text-decoration: none;
}

.account-prose a:hover {
    text-decoration: underline;
}

.account-prose strong,
.account-prose em {
    color: #dce6ff;
}
