/* Customer account area — calmer brand-aligned theme */
.account-page {
    --account-ink: var(--tapus-ink-soft, #373737);
    --account-accent: var(--tapus-blue, #1D38BE);
    --account-accent-soft: var(--tapus-red, #9a1b24);
    --account-surface: var(--tapus-surface, #ffffff);
    --account-muted: var(--tapus-muted, #6b7280);
    --account-border: #e5e7eb;
    background: linear-gradient(180deg, var(--tapus-bg, #f8fafc) 0%, #f3f4f6 100%);
    min-height: 100vh;
}

.account-shell {
    max-width: 72rem;
    margin: 0 auto;
    padding: 2rem 1rem 3rem;
}

.account-hero {
    background: var(--account-surface);
    border-radius: var(--radius-card, 1.5rem);
    box-shadow: var(--neo-shadow-x) var(--neo-shadow-y) 0 var(--neo-shadow-on-surface);
    padding: 1.75rem 2rem;
    margin-bottom: 1.5rem;
    border: var(--neo-border-width-thick) solid var(--neo-border-on-surface);
}

.account-hero h1 {
    color: var(--account-ink);
    font-size: 1.875rem;
    font-weight: 800;
    line-height: 1.2;
}

.account-hero p {
    color: var(--account-muted);
    margin-top: 0.5rem;
}

.account-profile-quick {
    margin-bottom: 0;
}

.account-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

.account-nav a {
    padding: 0.625rem 1.25rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.875rem;
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    border: 2px solid var(--account-border);
    color: var(--account-ink);
    background: var(--account-surface);
}

.account-nav a:hover {
    border-color: var(--account-accent);
    color: var(--account-accent);
}

.account-nav a.is-active {
    background: var(--account-accent);
    border-color: var(--account-accent);
    color: #fff;
}

.account-card {
    background: var(--account-surface);
    border-radius: var(--radius-card, 1.5rem);
    box-shadow: var(--neo-shadow-x) var(--neo-shadow-y) 0 var(--neo-shadow-on-surface);
    border: var(--neo-border-width-thick) solid var(--neo-border-on-surface);
    padding: 2rem;
}

.account-card h2 {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--account-ink);
    margin-bottom: 1rem;
}

.account-field label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--account-muted);
    margin-bottom: 0.25rem;
}

.account-field p {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--account-ink);
}

/* Helper / policy copy — never inherit the large value-style .account-field p */
.account-field__hint,
.account-field .tapus-pw-check,
.account-field .tapus-pw-check__label {
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.45;
    letter-spacing: normal;
    text-transform: none;
    color: var(--account-muted);
}

.account-field__hint {
    margin: 0.4rem 0 0;
}

.account-field .tapus-pw-check {
    margin: 0.55rem 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.3rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.account-field .tapus-pw-check__item {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    color: var(--account-muted);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.35;
}

.account-input {
    width: 100%;
    border: 2px solid var(--account-border);
    border-radius: 0.75rem;
    padding: 0.625rem 0.875rem;
    font-size: 1rem;
    color: var(--account-ink);
    background: #fff;
}

.account-input:focus {
    outline: none;
    border-color: var(--account-accent);
    box-shadow: 0 0 0 3px rgba(29, 56, 190, 0.15);
}

.account-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--account-accent);
    color: #fff;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    transition: background 0.15s;
    text-decoration: none;
}

.account-btn-primary:hover {
    background: var(--tapus-blue-dark, #1B529B);
}

.account-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #f3f4f6;
    color: var(--account-ink);
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    border: 2px solid var(--account-border);
    text-decoration: none;
}

.account-btn-secondary:hover {
    border-color: var(--account-accent);
    color: var(--account-accent);
}

/* Profile / edit-device page primitives (shop-aligned) */
.account-shell--profile,
.account-shell--edit-device {
    max-width: 64rem;
}

.account-page-title {
    font-family: "Super Cartoon", "CUBAO", system-ui, sans-serif;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--tapus-red, #9a1b24);
    margin: 0;
}

.account-page-subtitle {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--account-ink);
}

.account-hero--page {
    margin-bottom: 1.25rem;
}

.account-hero--page .account-page-title {
    margin-top: 0.25rem;
}

.account-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: start;
}

@media (min-width: 1024px) {
    .account-layout {
        grid-template-columns: minmax(16rem, 20rem) minmax(0, 1fr);
        gap: 1.75rem;
    }

    .account-layout__aside {
        position: sticky;
        top: 5.5rem;
    }
}

.account-layout__main {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    min-width: 0;
}

.account-section-card {
    background: var(--account-surface);
    border-radius: var(--radius-card, 1.5rem);
    box-shadow: var(--neo-shadow-x) var(--neo-shadow-y) 0 var(--neo-shadow-on-surface);
    border: var(--neo-border-width-thick) solid var(--neo-border-on-surface);
    padding: 1.5rem 1.75rem;
}

.account-section-card--accent {
    position: relative;
    padding-left: 1.5rem;
    border-left: none;
}

.account-section-card--accent::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.75rem;
    bottom: 0.75rem;
    width: 0.35rem;
    border-radius: 9999px;
    background: var(--tapus-blue, #1D38BE);
}

.account-section-card--accent-cream {
    background: #fffbeb;
    border-color: #fcd34d;
}

.account-section-card--accent-cream::before {
    background: var(--tapus-orange, #FFA600);
}

.account-section-card--status-ok {
    border-color: var(--neo-border-on-success, #059669);
    box-shadow: var(--neo-shadow-x) var(--neo-shadow-y) 0 var(--neo-shadow-on-success, #059669);
    background: #ecfdf5;
}

.account-section-card--status-warn {
    border-color: var(--neo-border-on-warning, #d97706);
    box-shadow: var(--neo-shadow-x) var(--neo-shadow-y) 0 var(--neo-shadow-on-warning, #d97706);
    background: #fffbeb;
}

.account-section-card--status-danger {
    border-color: #b91c1c;
    box-shadow: 4px 4px 0 #b91c1c;
    background: #fef2f2;
}

.account-section-card--status-info {
    border-color: var(--neo-border-on-secondary, #1B529B);
    box-shadow: var(--neo-shadow-x) var(--neo-shadow-y) 0 var(--neo-shadow-on-secondary, #1B529B);
    background: #eff6ff;
}

.account-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-bottom: 1rem;
}

.account-section-head__icon {
    width: 1.75rem;
    height: 1.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--tapus-red, #9a1b24);
    font-size: 1rem;
    flex-shrink: 0;
}

.account-section-head__title {
    font-family: "Super Cartoon", "CUBAO", system-ui, sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--account-ink);
    margin: 0;
    line-height: 1.2;
}

.account-section-head__meta {
    margin-left: auto;
}

.account-kv {
    display: grid;
    gap: 0.15rem;
}

.account-kv__label {
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--account-muted);
}

.account-kv__value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--account-ink);
    word-break: break-word;
}

.account-divider {
    height: 0;
    border: 0;
    border-top: 2px solid var(--tapus-yellow, #ffd85f);
    margin: 1.25rem 0;
}

.account-identity-card .neo-profile-avatar {
    margin-bottom: 0.75rem;
}

.account-identity-card__name {
    font-family: "Super Cartoon", "CUBAO", system-ui, sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--account-ink);
    line-height: 1.2;
    margin: 0 0 0.25rem;
}

.account-identity-card__email {
    font-size: 0.875rem;
    color: var(--account-muted);
    margin: 0 0 0.75rem;
    word-break: break-all;
}

.account-url-box {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.5rem;
    margin: 0.75rem 0 1rem;
    padding: 0.75rem;
    border: var(--neo-border-width-thick) solid var(--neo-border-on-surface);
    border-radius: var(--neo-radius-lg);
    box-shadow: var(--neo-shadow-x) var(--neo-shadow-y) 0 var(--neo-shadow-on-secondary);
    background: #fff;
}

.account-url-box__text {
    flex: 1 1 8rem;
    min-width: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--account-ink);
    word-break: break-all;
    align-self: center;
}

.account-url-box .neo-btn,
.account-url-box .account-btn-secondary {
    flex-shrink: 0;
}

.account-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.account-cta-row > * {
    flex: 1 1 auto;
    min-width: min(100%, 9rem);
    justify-content: center;
}

.account-device-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-card, 1.5rem);
    border: var(--neo-border-width-thick) solid var(--neo-border-on-surface);
    box-shadow: var(--neo-shadow-x) var(--neo-shadow-y) 0 var(--neo-shadow-on-surface);
    background: linear-gradient(135deg, var(--tapus-red, #9a1b24) 0%, var(--tapus-red-dark, #70070e) 100%);
    color: #fff;
    margin-bottom: 0;
}

.account-device-header__image {
    width: 5.5rem;
    height: 5.5rem;
    border-radius: var(--neo-radius-lg);
    object-fit: cover;
    border: 3px solid #fff;
    background: #fff;
    flex-shrink: 0;
}

.account-device-header__title {
    font-family: "Super Cartoon", "CUBAO", system-ui, sans-serif;
    font-size: clamp(1.35rem, 3vw, 1.85rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin: 0 0 0.25rem;
    line-height: 1.15;
}

.account-device-header__variant {
    margin: 0;
    opacity: 0.9;
    font-size: 0.95rem;
    font-weight: 600;
}

.account-device-header__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.65rem;
}

.account-device-header__badges span {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.2);
    border: 1.5px solid rgba(255, 255, 255, 0.55);
    color: #fff;
}

.account-flash {
    padding: 0.875rem 1rem;
    border-radius: var(--neo-radius-lg);
    font-size: 0.875rem;
    font-weight: 700;
    border: 2px solid transparent;
}

.account-flash--ok {
    background: #dcfce7;
    color: #166534;
    border-color: #86efac;
}

.account-flash--error {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fca5a5;
}

.account-choice-card {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    border: 2px solid #d1d5db;
    border-radius: var(--neo-radius-lg);
    padding: 1rem;
    background: #fff;
    cursor: pointer;
    transition: border-color var(--neo-duration-fast) ease, background var(--neo-duration-fast) ease, box-shadow var(--neo-duration-fast) ease;
}

.account-choice-card:hover {
    border-color: var(--account-accent);
}

.account-choice-card:has(:checked) {
    border-color: var(--account-accent);
    background: #eff6ff;
    box-shadow: 2px 2px 0 var(--neo-shadow-on-secondary);
}

.account-choice-card__radio {
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.account-choice-card__content {
    flex: 1;
    min-width: 0;
}

.account-choice-card__title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.5rem;
}

.account-choice-card__lead-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 0.45rem;
    background: #eef2ff;
    color: #1d38be;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.account-choice-card__lead-icon--medical {
    background: #fef2f2;
    color: #9a1b24;
}

.account-choice-card--tapus .account-choice-card__lead-icon {
    background: #fef2f2;
    color: #9a1b24;
}

.account-choice-card--tapus .account-choice-card__name {
    color: #9a1b24;
}

.account-choice-card__name {
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
}

.account-choice-card__desc {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.875rem;
    line-height: 1.35;
    color: #4b5563;
}

.account-choice-card__badges {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
}

.account-dest-tapus-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    background: #9a1b24;
    border: 1.5px solid #111827;
    box-shadow: 1px 1px 0 #111827;
    flex-shrink: 0;
    overflow: hidden;
}

.account-dest-tapus-badge img {
    width: 1rem;
    height: 1rem;
    object-fit: contain;
    display: block;
}

.account-dest-preset-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 0.4rem;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #374151;
    font-size: 0.72rem;
    line-height: 1;
}

.account-dest-preset-badge[data-slug="instagram"] {
    color: #e4405f;
    border-color: #f9a8d4;
    background: #fff1f2;
}
.account-dest-preset-badge[data-slug="facebook"] {
    color: #1877f2;
    border-color: #bfdbfe;
    background: #eff6ff;
}
.account-dest-preset-badge[data-slug="tiktok"],
.account-dest-preset-badge[data-slug="x"],
.account-dest-preset-badge[data-slug="twitter"] {
    color: #111111;
    border-color: #d1d5db;
    background: #f9fafb;
}
.account-dest-preset-badge[data-slug="youtube"] {
    color: #ff0000;
    border-color: #fecaca;
    background: #fef2f2;
}
.account-dest-preset-badge[data-slug="whatsapp"] {
    color: #25d366;
    border-color: #bbf7d0;
    background: #f0fdf4;
}
.account-dest-preset-badge[data-slug="telegram"] {
    color: #26a5e4;
    border-color: #bae6fd;
    background: #f0f9ff;
}
.account-dest-preset-badge[data-slug="maps"] {
    color: #ea4335;
    border-color: #fecaca;
    background: #fef2f2;
}
.account-dest-preset-badge[data-slug="spotify"] {
    color: #1db954;
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.account-edit-stack {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.account-edit-stack > [id] {
    scroll-margin-top: 6rem;
}

.account-inset-panel {
    position: relative;
    border-radius: var(--neo-radius-lg);
    border: 2px solid transparent;
    padding: 1rem 1.15rem;
}

.account-inset-panel--info {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e3a8a;
}

.account-inset-panel--warn {
    background: #fffbeb;
    border-color: #fcd34d;
    color: #92400e;
}

.account-inset-panel--ok {
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.account-inset-panel--danger {
    background: #fef2f2;
    border-color: #fecaca;
}

@media (max-width: 1023px) {
    .account-layout__aside {
        position: static;
    }
}

@media (max-width: 639px) {
    .account-section-card {
        padding: 1.25rem;
    }

    .account-cta-row > * {
        min-width: 100%;
    }

    .account-device-header {
        padding: 1rem 1.15rem;
    }

    .account-url-box {
        flex-direction: column;
    }

    .account-url-box .neo-btn {
        width: 100%;
    }

    .account-url-box .neo-btn .neo-btn-top {
        width: 100%;
        text-align: center;
    }

    .account-section-head__meta {
        margin-left: 0;
        width: 100%;
    }
}

.account-device-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .account-device-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

.integration-panel {
    border-radius: 1rem;
    border: 1px solid var(--account-border);
    background: #fafbfc;
    padding: 1.25rem;
}

.integration-panel h3 {
    font-weight: 700;
    color: var(--account-ink);
    margin-bottom: 0.5rem;
}

.integration-panel p {
    font-size: 0.875rem;
    color: var(--account-muted);
    line-height: 1.6;
}

.integration-panel a {
    color: var(--account-accent);
    font-weight: 600;
}

.neo-profile-quick-link {
    text-decoration: none;
    color: inherit;
    transition: background var(--neo-duration-fast) ease;
}

.neo-profile-quick-link:hover {
    background: #f9fafb;
}

.neo-profile-quick-link h1 {
    margin: 0;
}

.neo-profile-avatar {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: var(--neo-radius-lg);
    background: var(--account-accent);
    color: #fff;
    font-weight: 800;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: var(--neo-border-width-thick) solid var(--neo-border-on-secondary);
    box-shadow: var(--neo-shadow-x) var(--neo-shadow-y) 0 var(--neo-shadow-on-secondary);
}

.neo-profile-stat {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--account-ink);
    background: #f3f4f6;
    border: var(--neo-border-width) solid var(--neo-border-on-surface);
    box-shadow: 1px 1px 0 var(--neo-shadow-on-surface);
}

.neo-profile-stat--connected {
    background: #ecfdf5;
    color: #047857;
    border-color: var(--neo-border-on-success);
    box-shadow: 1px 1px 0 var(--neo-shadow-on-success);
}

.neo-purchase-history-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.neo-purchase-row {
    padding: 1rem 1.25rem;
    background: var(--account-surface);
    border: var(--neo-border-width) solid var(--neo-border-on-surface);
    border-radius: var(--neo-radius-lg);
    box-shadow: var(--neo-shadow-sm);
    transition: transform var(--neo-duration-fast) ease, box-shadow var(--neo-duration-fast) ease;
}

.neo-purchase-row:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--neo-shadow);
}

/* Shared account shell with sidebar */
.account-shell--with-sidebar {
    max-width: 72rem;
}

.account-app-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    align-items: start;
}

@media (min-width: 1024px) {
    .account-app-layout {
        grid-template-columns: 15.5rem minmax(0, 1fr);
        gap: 1.75rem;
    }
}

.account-app-layout__main {
    min-width: 0;
    max-width: 100%;
    overflow-x: clip;
}

.account-sidebar {
    display: flex;
    flex-direction: column;
    background: var(--account-surface);
    border: var(--neo-border-width-thick) solid var(--neo-border-on-surface);
    border-radius: var(--radius-card, 1.5rem);
    box-shadow: var(--neo-shadow-x) var(--neo-shadow-y) 0 var(--neo-shadow-on-surface);
    padding: 0.7rem 0.55rem;
    min-height: 0;
    transition: box-shadow 0.28s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 1024px) {
    .account-sidebar {
        position: sticky;
        top: 5.15rem;
        min-height: calc(100vh - 6.15rem);
        max-height: calc(100vh - 6.15rem);
        padding: 0.55rem 0.5rem 0.65rem;
    }
}

.account-sidebar__brand {
    display: flex;
    align-items: center;
    padding: 0.2rem 0.7rem 0.55rem;
}

.account-sidebar__brand-text {
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--account-ink);
    letter-spacing: 0.01em;
}

.account-sidebar__mobile-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    border-radius: 9999px;
    border: 2px solid var(--account-border);
    background: #fff;
    font-weight: 800;
    color: var(--account-ink);
    cursor: pointer;
}

@media (min-width: 1024px) {
    .account-sidebar__mobile-toggle {
        display: none;
    }
}

.account-sidebar__mobile-toggle.is-open .account-sidebar__chevron {
    transform: rotate(180deg);
}

.account-sidebar__chevron {
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.account-sidebar__nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    margin-top: 0;
    transition: max-height 0.42s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
                margin-top 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.account-sidebar__nav.is-open {
    max-height: 32rem;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    margin-top: 0.55rem;
}

@media (min-width: 1024px) {
    .account-sidebar__nav,
    .account-sidebar__nav.is-open {
        max-height: none;
        opacity: 1;
        transform: none;
        pointer-events: auto;
        margin-top: 0.15rem;
        overflow: visible;
    }
}

.account-sidebar__link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--account-ink);
    text-decoration: none;
    border: 2px solid transparent;
    transition: background 0.25s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.25s cubic-bezier(0.22, 1, 0.36, 1),
                color 0.25s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.account-sidebar__icon {
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #fff;
    flex-shrink: 0;
}

.account-sidebar__icon--blue { background: #1D38BE; }
.account-sidebar__icon--red { background: #9a1b24; }
.account-sidebar__icon--yellow { background: #e6b800; color: #1e1e1e; }
.account-sidebar__icon--green { background: #059669; }
.account-sidebar__icon--ink { background: #373737; }
.account-sidebar__icon--danger { background: #b91c1c; }

.account-sidebar__link:hover {
    background: #f3f4f6;
    transform: translateX(2px);
}

.account-sidebar__link:active {
    transform: translateX(1px) scale(0.98);
}

.account-sidebar__link.is-active {
    background: #e8eeff;
    color: var(--account-accent);
}

.account-sidebar__link.is-active .account-sidebar__icon {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px currentColor;
}

.account-sidebar__link--muted {
    font-size: 0.8rem;
    color: var(--account-muted);
}

.account-sidebar__link--danger {
    color: #b91c1c;
}

.account-sidebar__divider {
    height: 1px;
    background: #e5e7eb;
    margin: 0.65rem 0.75rem;
}

.account-sidebar__footer {
    margin-top: auto;
    padding-top: 0.55rem;
    border-top: 1px solid #e5e7eb;
}

/* Google-Account-like home hero */
.account-home-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem 1rem 2rem;
    margin-bottom: 0.5rem;
    animation: account-home-enter 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes account-home-enter {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.account-home-hero__avatar {
    width: clamp(6.5rem, 18vw, 8.5rem);
    height: clamp(6.5rem, 18vw, 8.5rem);
    border-radius: 28%;
    background: var(--tapus-blue, #1D38BE);
    color: #fff;
    font-family: "Super Cartoon", "CUBAO", system-ui, sans-serif;
    font-size: clamp(1.85rem, 5vw, 2.6rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--neo-border-on-secondary);
    box-shadow: 5px 5px 0 var(--neo-shadow-on-secondary);
    margin-bottom: 1rem;
}

.account-home-hero__name {
    margin: 0;
    font-size: clamp(1.65rem, 4vw, 2.25rem);
    font-weight: 800;
    color: var(--account-ink);
    line-height: 1.15;
}

.account-home-hero__identity {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    margin-top: 0.45rem;
    flex-wrap: wrap;
}

.account-home-hero__handle {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.65rem;
    border-radius: 9999px;
    border: 2px solid var(--neo-border-on-surface);
    background: #fff;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--account-accent);
    box-shadow: 1px 1px 0 var(--neo-shadow-on-surface);
}

.account-publish-badge {
    position: relative;
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 9999px;
    border: 2px solid var(--neo-border-on-surface);
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    box-shadow: 1px 1px 0 var(--neo-shadow-on-surface);
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.25s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.account-publish-badge img {
    width: 1rem;
    height: 1rem;
    object-fit: contain;
    transition: filter 0.25s ease, opacity 0.25s ease;
}

.account-publish-badge--unpublished img,
.account-publish-badge--draft img {
    filter: grayscale(1);
    opacity: 0.7;
}

.account-publish-badge--published {
    border-color: #059669;
}

.account-publish-badge__tip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 0.45rem);
    transform: translateX(-50%) translateY(4px);
    white-space: nowrap;
    background: #1e1e1e;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.35rem 0.55rem;
    border-radius: 0.45rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 5;
}

.account-publish-badge__tip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1e1e1e;
}

.account-publish-badge:hover,
.account-publish-badge:focus-visible,
.account-publish-badge.is-open {
    transform: translateY(-1px);
    box-shadow: 2px 2px 0 var(--neo-shadow-on-surface);
}

.account-publish-badge:hover .account-publish-badge__tip,
.account-publish-badge:focus-visible .account-publish-badge__tip,
.account-publish-badge.is-open .account-publish-badge__tip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.account-home-hero__email {
    margin: 0.55rem 0 0;
    font-size: 0.95rem;
    color: var(--account-muted);
    word-break: break-all;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.account-kv__value--with-badge {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.account-email-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none;
    border: 1.5px solid transparent;
}

.account-email-badge--verified {
    color: #166534;
    background: #dcfce7;
    border-color: #86efac;
}

.account-email-badge--verified i {
    font-size: 0.75rem;
}

.account-email-badge--pending {
    color: #9a3412;
    background: #ffedd5;
    border-color: #fdba74;
}

.account-email-badge--pending:hover {
    background: #fed7aa;
}

.account-home-hero__badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.9rem;
    max-width: 36rem;
}

.account-home-hero__sep {
    width: 1px;
    height: 1.1rem;
    background: #d1d5db;
    margin: 0 0.15rem;
}

.account-drive-badge {
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 9999px;
    border: 2px solid #e5e7eb;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.55;
    filter: grayscale(1);
    transition: opacity 0.25s ease, filter 0.25s ease, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.25s ease;
}

.account-drive-badge img {
    width: 1rem;
    height: 1rem;
    object-fit: contain;
}

.account-drive-badge.is-connected {
    opacity: 1;
    filter: none;
    border-color: #86efac;
}

.account-drive-badge:hover {
    transform: translateY(-1px);
}

.account-home-hero__ctas {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.55rem;
    margin-top: 1.15rem;
}

.account-pill-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1rem;
    border-radius: 9999px;
    border: 2px solid var(--neo-border-on-surface);
    background: #fff;
    color: var(--account-ink);
    font-size: 0.8125rem;
    font-weight: 700;
    text-decoration: none;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.25s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.25s cubic-bezier(0.22, 1, 0.36, 1),
                color 0.25s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 2px 2px 0 transparent;
}

.account-pill-cta:hover {
    border-color: var(--account-accent);
    color: var(--account-accent);
    transform: translateY(-1px);
    box-shadow: 2px 2px 0 var(--neo-shadow-on-secondary);
}

.account-pill-cta--solid,
.account-pill-cta--blue {
    background: var(--account-accent);
    border-color: var(--tapus-blue-dark, #1B529B);
    color: #fff;
    box-shadow: 2px 2px 0 var(--neo-shadow-on-secondary);
}

.account-pill-cta--solid:hover,
.account-pill-cta--blue:hover {
    color: #fff;
    background: var(--tapus-blue-dark, #1B529B);
    transform: translateY(-1px);
}

.account-pill-cta--dark {
    background: #1e1e1e;
    border-color: #111;
    color: #fff;
    box-shadow: 2px 2px 0 #111;
}

.account-pill-cta--dark:hover {
    color: #fff;
    background: #333;
}

.account-pill-cta--yellow {
    background: var(--tapus-yellow, #ffd85f);
    border-color: #e6b800;
    color: #1e1e1e;
    box-shadow: 2px 2px 0 var(--neo-shadow-on-accent, #e6b800);
}

.account-pill-cta--yellow:hover {
    color: #1e1e1e;
    background: #ffe27a;
}

.account-pill-cta--green {
    background: #059669;
    border-color: #047857;
    color: #fff;
    box-shadow: 2px 2px 0 #047857;
}

.account-pill-cta--green:hover {
    color: #fff;
    background: #047857;
}

.account-pill-cta:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: 1px 1px 0 transparent;
}

.account-pill-cta--compact {
    padding: 0.4rem 0.85rem;
    font-size: 0.75rem;
}

.account-pill-cta--ghost {
    border-color: #d1d5db;
    color: #4b5563;
    background: transparent;
    box-shadow: none;
}

.account-pill-cta--ghost:hover {
    border-color: var(--account-accent);
    color: var(--account-accent);
    box-shadow: none;
}

.account-pill-cta.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.account-wallet {
    margin-top: 0.25rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.account-wallet--bare {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
}

.account-wallet__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
    padding: 0 0.15rem;
}

.account-wallet__title {
    margin: 0;
    font-family: "Super Cartoon", "CUBAO", system-ui, sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--account-ink);
}

.account-wallet__subtitle {
    margin: 0.25rem 0 0;
    font-size: 0.8rem;
    color: var(--account-muted);
}

.account-wallet__viewport {
    --wallet-slide-max: 42rem;
    position: relative;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    container-type: inline-size;
    container-name: account-wallet;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scroll-padding-inline: 0;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    touch-action: pan-x;
    /* Room for coupon tear notches (half circle sticks outside the card) */
    padding: 0.9rem 0 1.15rem;
}

.account-wallet__viewport::-webkit-scrollbar {
    display: none;
}

.account-wallet__track {
    display: flex;
    gap: 0.75rem;
    box-sizing: border-box;
    width: max-content;
    min-width: 100%;
    outline: none;
    padding-inline: 0;
}

/*
 * Slide width = --wallet-slide-w from dashboard ResizeObserver (viewport width, max 42rem).
 * Fallback 100% keeps the card inside the wallet column instead of clipping.
 */
.account-wallet__slide {
    flex: 0 0 var(--wallet-slide-w, 100%);
    width: var(--wallet-slide-w, 100%);
    max-width: 100%;
    min-width: 0;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    opacity: 0.72;
    box-sizing: border-box;
}

.account-wallet__slide.is-active {
    opacity: 1;
}

.account-wallet__slide .account-device-coupon {
    width: 100%;
    max-width: 100%;
    height: 100%;
    min-width: 0;
}

.account-wallet__controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.account-wallet__btn {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 9999px;
    border: 2px solid var(--neo-border-on-surface);
    background: #fff;
    box-shadow: 2px 2px 0 var(--neo-shadow-on-surface);
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.2s ease,
                background 0.2s ease;
}

.account-wallet__btn:hover:not(:disabled) {
    transform: translateY(-1px);
    background: #f8fafc;
}

.account-wallet__btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.account-wallet__counter {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--account-muted);
    min-width: 3.5rem;
    text-align: center;
}

.account-wallet-actions,
.account-wallet-secondary {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.85rem;
    min-height: 2.25rem;
    transition: opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.account-wallet-actions.is-swapping {
    animation: account-actions-swap 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes account-actions-swap {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.account-wallet-secondary {
    margin-top: 0.55rem;
    min-height: 2rem;
}

@media (prefers-reduced-motion: reduce) {
    .account-home-hero,
    .account-wallet__slide,
    .account-wallet-actions,
    .account-pill-cta,
    .account-sidebar__link {
        animation: none !important;
        transition: none !important;
    }
}

/* Collapsible account sections */
.account-collapse {
    border: var(--neo-border-width-thick) solid var(--neo-border-on-surface);
    border-radius: var(--radius-card, 1.5rem);
    box-shadow: var(--neo-shadow-x) var(--neo-shadow-y) 0 var(--neo-shadow-on-surface);
    background: var(--account-surface);
    overflow: hidden;
}

.account-collapse__trigger {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 1rem 1.25rem;
    background: transparent;
    border: 0;
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: inherit;
    transition: background 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.account-collapse__trigger:hover {
    background: #f9fafb;
}

.account-collapse__trigger:active {
    background: #f3f4f6;
}

.account-collapse__trigger .account-section-head__title {
    flex: 1;
}

.account-collapse__chevron {
    color: var(--account-muted);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.account-collapse.is-open .account-collapse__chevron {
    transform: rotate(180deg);
}

.account-collapse__panel {
    display: grid;
    grid-template-rows: 0fr;
    padding: 0 1.25rem;
    border-top: 2px solid transparent;
    opacity: 0;
    transition: grid-template-rows 0.42s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.28s cubic-bezier(0.22, 1, 0.36, 1),
                padding 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.account-collapse__panel-inner {
    overflow: hidden;
    min-height: 0;
}

.account-collapse.is-open .account-collapse__panel {
    grid-template-rows: 1fr;
    opacity: 1;
    border-top-color: #f3f4f6;
    padding-top: 1rem;
    padding-bottom: 1.25rem;
}

.account-collapse--static {
    padding: 1.5rem 1.75rem;
}

/* Dashboard split layout (checkout-style) — legacy helpers */
.account-dashboard-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
}

@media (min-width: 1024px) {
    .account-dashboard-layout {
        grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
        gap: 2rem;
    }
}

.account-dashboard-layout__sidebar {
    min-width: 0;
}

@media (min-width: 1024px) {
    .account-dashboard-layout__sidebar {
        position: sticky;
        top: 6rem;
    }
}

.account-dashboard-layout__main {
    min-width: 0;
}

.account-profile-quick--sidebar {
    margin-bottom: 0;
}

.account-profile-quick--sidebar > .flex {
    flex-direction: column;
}

.account-profile-quick--sidebar .neo-profile-quick-link {
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 1rem;
}

.account-profile-quick__logout {
    width: 100%;
}

.account-dashboard-section + .account-dashboard-section {
    margin-top: 2rem;
}

.account-dashboard-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.account-dashboard-tabs__tab {
    padding: 0.625rem 1.25rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.875rem;
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    border: 2px solid var(--account-border);
    color: var(--account-ink);
    background: var(--account-surface);
}

.account-dashboard-tabs__tab:hover {
    border-color: var(--account-accent);
    color: var(--account-accent);
}

.account-dashboard-tabs__tab.is-active {
    background: var(--account-accent);
    border-color: var(--account-accent);
    color: #fff;
}

.account-dashboard-tab-panel[hidden] {
    display: none;
}

.account-pagination {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--account-border);
}

@media (min-width: 640px) {
    .account-pagination {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.account-pagination__summary {
    font-size: 0.875rem;
    color: var(--account-muted);
    margin: 0;
}

.account-pagination__controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.account-pagination__status {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--account-ink);
}

.account-pagination__btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.875rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
    border: 2px solid var(--account-border);
    color: var(--account-ink);
    background: #fff;
}

.account-pagination__btn:hover {
    border-color: var(--account-accent);
    color: var(--account-accent);
}

.account-pagination__btn.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.account-purchase-history.account-card {
    padding: 1.5rem;
}

.account-device-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Horizontal coupon device cards */
.account-device-coupon {
    --coupon-notch-bg: var(--tapus-bg, #f8fafc);
    --coupon-notch-size: 1.125rem;
    --coupon-border: var(--neo-border-on-surface, #373737);
    --coupon-border-width: var(--neo-border-width-thick, 3px);
    /* Stub scales with the card so narrow columns shrink instead of clipping */
    --coupon-stub: clamp(4.75rem, 28%, 12.5rem);
    display: grid;
    grid-template-columns: minmax(0, var(--coupon-stub)) var(--coupon-notch-size) minmax(0, 1fr);
    grid-template-rows: auto;
    align-items: stretch;
    background: #fff;
    border: var(--coupon-border-width) solid var(--coupon-border);
    border-radius: var(--neo-radius-lg, 1.25rem);
    box-shadow: none;
    overflow: hidden; /* keep internals inside the shell at all widths */
    min-height: 16.5rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    /* Product copy must stay Poppins — global h3 uses Super Cartoon uppercase */
    font-family: 'Poppins', system-ui, sans-serif;
    text-transform: none;
    letter-spacing: normal;
}

/* Wallet carousel: lock shell size so no-image devices match photo devices */
.account-device-coupon--wallet {
    grid-template-rows: 1fr;
    height: 16.5rem;
    max-height: 16.5rem;
    /* Notches need to paint outside the card; clip only on very narrow if needed via parent */
    overflow: visible;
}

@container account-wallet (max-width: 40rem) {
    .account-device-coupon {
        --coupon-stub: clamp(4.5rem, 26%, 7.5rem);
        --coupon-notch-size: 1rem;
        min-height: 14.5rem;
    }

    .account-device-coupon--wallet {
        height: 14.5rem;
        max-height: 14.5rem;
    }

    .account-device-coupon__media {
        padding: 0.5rem;
    }

    .account-device-coupon__body {
        padding: 0.75rem 0.75rem 0.75rem 0.45rem;
        gap: 0.45rem;
    }

    .account-device-coupon__title {
        font-size: 1rem;
    }

    .account-device-coupon__subtitle {
        font-size: 0.8rem;
    }

    .account-device-coupon__image-fallback {
        font-size: 1.85rem;
    }
}

@container account-wallet (max-width: 22rem) {
    .account-device-coupon {
        --coupon-stub: 4.25rem;
        min-height: 13.5rem;
    }

    .account-device-coupon--wallet {
        height: 13.5rem;
        max-height: 13.5rem;
    }
}

.account-device-coupon__media {
    background: var(--coupon-media-bg, var(--tapus-blue, #1d38be));
    color: var(--coupon-media-fg, #fff);
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    padding: 0.75rem;
    min-width: 0;
    min-height: 0;
    height: 100%;
    align-self: stretch;
    border-radius: calc(var(--neo-radius-lg, 1.25rem) - var(--coupon-border-width)) 0 0
        calc(var(--neo-radius-lg, 1.25rem) - var(--coupon-border-width));
}

.account-device-coupon--blue .account-device-coupon__media {
    background: var(--coupon-media-bg, var(--tapus-blue, #1d38be));
}

.account-device-coupon--red .account-device-coupon__media {
    background: var(--coupon-media-bg, var(--tapus-red, #9a1b24));
}

.account-device-coupon--yellow .account-device-coupon__media {
    background: var(--coupon-media-bg, var(--tapus-yellow, #ffd85f));
}

.account-device-coupon__image-wrap {
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    align-self: stretch;
    background: #fff;
    border: var(--coupon-border-width) solid var(--coupon-border);
    border-radius: 0.65rem;
    overflow: hidden;
    box-shadow: none;
}

.account-device-coupon__image {
    /* Absolute so intrinsic image size never expands the coupon */
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.account-device-coupon__image-fallback {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--tapus-blue, #1d38be);
    background: #fff;
}

.account-device-coupon--yellow .account-device-coupon__image-fallback {
    color: var(--tapus-red, #9a1b24);
}

.account-device-coupon__tear {
    position: relative;
    align-self: stretch;
}

.account-device-coupon__tear::before {
    content: '';
    position: absolute;
    left: 50%;
    top: calc(var(--coupon-notch-size) / 2 + 2px);
    bottom: calc(var(--coupon-notch-size) / 2 + 2px);
    width: 6px;
    transform: translateX(-50%);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='16' viewBox='0 0 6 16'%3E%3Cpath d='M3 0 L6 4 L3 8 L0 4 Z M3 8 L6 12 L3 16 L0 12 Z' fill='%2394a3b8'/%3E%3C/svg%3E");
    background-repeat: repeat-y;
    background-size: 6px 16px;
}

.account-device-coupon__notch {
    position: absolute;
    left: 50%;
    width: var(--coupon-notch-size);
    height: var(--coupon-notch-size);
    border-radius: 50%;
    background: var(--coupon-notch-bg);
    z-index: 2;
}

.account-device-coupon__notch::before {
    content: '';
    position: absolute;
    inset: calc(var(--coupon-border-width) * -1.5);
    border-radius: 50%;
    background: var(--coupon-notch-bg);
    z-index: 0;
}

.account-device-coupon__notch::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: var(--coupon-border-width) solid var(--coupon-border);
    box-sizing: border-box;
    pointer-events: none;
    z-index: 1;
}

.account-device-coupon__notch--top {
    top: 0;
    transform: translate(-50%, -50%);
}

.account-device-coupon__notch--top::after {
    clip-path: inset(50% 0 0 0);
}

.account-device-coupon__notch--bottom {
    bottom: 0;
    transform: translate(-50%, 50%);
}

.account-device-coupon__notch--bottom::after {
    clip-path: inset(0 0 50% 0);
}

.account-device-coupon__body {
    min-width: 0;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    padding: 1.15rem 1.35rem 1.15rem 0.85rem;
    overflow: hidden;
}

.account-device-coupon__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.85rem;
    min-width: 0;
}

.account-device-coupon__heading {
    min-width: 0;
    flex: 1 1 auto;
}

.account-device-coupon__title {
    margin: 0;
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: normal;
    text-transform: none;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-device-coupon__subtitle {
    margin: 0.25rem 0 0;
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: normal;
    text-transform: none;
    color: #6b7280;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.4rem;
    min-width: 0;
}

.account-device-coupon__dot {
    color: #9ca3af;
}

.account-device-coupon__config {
    color: var(--account-accent, #1d38be);
    font-weight: 700;
}

.account-device-coupon__status {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.account-device-coupon__target {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.65rem;
    padding: 0.7rem 0.8rem;
    min-width: 0;
}

.account-device-coupon__target--empty {
    background: #fffbeb;
    border-color: #fde68a;
}

.account-device-coupon__target-label {
    margin: 0 0 0.2rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #9ca3af;
}

.account-device-coupon__target-value {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.35;
    color: #111827;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-device-coupon__target--empty .account-device-coupon__target-value {
    font-family: inherit;
    font-weight: 700;
    color: #92400e;
}

.account-device-coupon__notice {
    border: 2px solid #e5e7eb;
    border-radius: 0.65rem;
    padding: 0.5rem 0.6rem;
    font-size: 0.72rem;
    line-height: 1.35;
}

.account-device-coupon__notice--pending {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.account-device-coupon__notice--ok {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

.account-device-coupon__notice--danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.account-device-coupon__notice-title {
    margin: 0;
    font-weight: 800;
}

.account-device-coupon__notice-detail {
    margin: 0.2rem 0 0;
    word-break: break-all;
}

.account-device-coupon__footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
}

.account-device-coupon__meter-row,
.account-device-coupon__lifetime {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: #6b7280;
    min-width: 0;
}

.account-device-coupon__meter-count {
    font-weight: 800;
    color: #111827;
}

.account-device-coupon__meter-count.is-ok {
    color: #059669;
}

.account-device-coupon__meter-count.is-low {
    color: #dc2626;
}

.account-device-coupon__meter-track {
    margin-top: 0.3rem;
    width: 100%;
    height: 0.35rem;
    border-radius: 9999px;
    background: #e5e7eb;
    overflow: hidden;
}

.account-device-coupon__meter-fill {
    height: 100%;
    border-radius: inherit;
    background: var(--tapus-blue, #1d38be);
}

.account-device-coupon__lifetime-label {
    flex: 0 0 auto;
}

.account-device-coupon__lifetime-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.account-device-coupon__actions {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.15rem;
}

/* Compact ready-destination chips (edit device) */
.ready-destination-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.4rem;
}

@media (min-width: 480px) {
    .ready-destination-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 640px) {
    .ready-destination-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

.ready-dest-card {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.5rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 0.55rem;
    background: #fff;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
    min-width: 0;
}

.ready-dest-card:hover {
    border-color: #c7cdd6;
    background: #fafafa;
}

.ready-dest-card.is-selected {
    border-color: currentColor;
    background: color-mix(in srgb, currentColor 8%, #fff);
    box-shadow: inset 0 0 0 1px currentColor;
}

.ready-dest-card__icon {
    flex-shrink: 0;
    width: 1.35rem;
    height: 1.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    line-height: 1;
}

.ready-dest-card__label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #1e1e1e;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ready-dest-card[data-slug="instagram"] {
    color: #e4405f;
}
.ready-dest-card[data-slug="instagram"] .ready-dest-card__icon {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.ready-dest-card[data-slug="facebook"] {
    color: #1877f2;
}
.ready-dest-card[data-slug="facebook"] .ready-dest-card__icon {
    color: #1877f2;
}

.ready-dest-card[data-slug="tiktok"] {
    color: #111111;
}
.ready-dest-card[data-slug="tiktok"] .ready-dest-card__icon {
    color: #111111;
}

.ready-dest-card[data-slug="x"] {
    color: #111111;
}
.ready-dest-card[data-slug="x"] .ready-dest-card__icon {
    color: #111111;
}

.ready-dest-card[data-slug="youtube"] {
    color: #ff0000;
}
.ready-dest-card[data-slug="youtube"] .ready-dest-card__icon {
    color: #ff0000;
}

.ready-dest-card[data-slug="whatsapp"] {
    color: #25d366;
}
.ready-dest-card[data-slug="whatsapp"] .ready-dest-card__icon {
    color: #25d366;
}

.ready-dest-card[data-slug="telegram"] {
    color: #26a5e4;
}
.ready-dest-card[data-slug="telegram"] .ready-dest-card__icon {
    color: #26a5e4;
}

.ready-dest-card[data-slug="maps"] {
    color: #ea4335;
}
.ready-dest-card[data-slug="maps"] .ready-dest-card__icon {
    color: #ea4335;
}

.ready-dest-card[data-slug="spotify"] {
    color: #1db954;
}
.ready-dest-card[data-slug="spotify"] .ready-dest-card__icon {
    color: #1db954;
}

.ready-dest-card[data-slug="custom"] {
    color: #1d38be;
}
.ready-dest-card[data-slug="custom"] .ready-dest-card__icon {
    color: #1d38be;
}


.account-section-card.is-hash-target {
    animation: account-hash-pulse 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes account-hash-pulse {
    0% { box-shadow: var(--neo-shadow-x) var(--neo-shadow-y) 0 var(--neo-shadow-on-surface); }
    40% { box-shadow: 0 0 0 4px rgba(29, 56, 190, 0.28), 6px 6px 0 var(--neo-shadow-on-secondary); }
    100% { box-shadow: var(--neo-shadow-x) var(--neo-shadow-y) 0 var(--neo-shadow-on-surface); }
}

.account-wallet__btn:active:not(:disabled) {
    transform: translateY(1px) scale(0.96);
}

.account-mobile-toggle,
.account-sidebar__mobile-toggle {
    transition: background 0.25s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.25s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.account-sidebar__mobile-toggle:hover {
    border-color: var(--account-accent);
}

.account-sidebar__mobile-toggle:active {
    transform: scale(0.98);
}

/* Submit / OTP busy state */
.neo-btn.is-busy,
button.is-busy,
.neo-btn[aria-busy="true"] {
    opacity: 0.85;
    cursor: wait;
    pointer-events: none;
}

form.is-busy {
    cursor: wait;
}

.account-busy-spinner {
    display: inline-block;
    width: 0.9em;
    height: 0.9em;
    margin-right: 0.35em;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    vertical-align: -0.1em;
    animation: account-busy-spin 0.7s linear infinite;
}

@keyframes account-busy-spin {
    to { transform: rotate(360deg); }
}

