/* CartClip responsive webapp layer — loaded after the legacy styles. */
:root {
    --cc-page: #f4f7fb;
    --cc-panel: rgba(255, 255, 255, .92);
    --cc-ink: #091b36;
    --cc-muted: #62728a;
    --cc-blue: #1677ee;
    --cc-cyan: #11b7a7;
    --cc-line: rgba(28, 55, 91, .12);
    --cc-shadow: 0 18px 50px rgba(21, 43, 78, .10);
}

/* Unified CartClip typography */
:root {
    --cartclip-font: "IBM Plex Sans Thai", "Tahoma", sans-serif;
}

html,
body,
button,
input,
select,
textarea,
option {
    font-family: var(--cartclip-font) !important;
}

body * {
    font-family: var(--cartclip-font) !important;
}

code,
pre,
kbd,
samp,
code *,
pre * {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace !important;
}

body {
    font-weight: 400;
    line-height: 1.55;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6,
.page-title,
.brand strong,
.primary-btn,
.ghost-btn,
.danger-btn,
.swal2-title {
    font-family: var(--cartclip-font) !important;
    font-weight: 700;
    letter-spacing: -0.018em;
}

label,
summary,
th,
strong,
b,
.nav-link,
.mobile-nav-link {
    font-family: var(--cartclip-font) !important;
    font-weight: 600;
}

.swal2-popup,
.swal2-html-container,
.swal2-styled {
    font-family: var(--cartclip-font) !important;
}

html {
    scroll-behavior: smooth;
}

body {
    min-width: 0;
    background:
        radial-gradient(circle at 8% 0%, rgba(30, 124, 255, .08), transparent 25rem),
        radial-gradient(circle at 100% 18%, rgba(17, 183, 167, .08), transparent 28rem),
        var(--cc-page);
    font-size: 16px;
    line-height: 1.62;
}

body *,
body *::before,
body *::after {
    box-sizing: border-box;
    min-width: 0;
}

h1, h2, h3, .brand strong, button, .primary-btn, .ghost-btn {
    font-family: "Kanit", "Lexend Deca", system-ui, sans-serif;
}

h1, h2, h3 {
    color: var(--cc-ink);
    line-height: 1.16;
    text-wrap: balance;
}

p, li, small, span {
    text-wrap: pretty;
}

button, a, input, select, textarea {
    -webkit-tap-highlight-color: transparent;
}

button, .primary-btn, .ghost-btn, .mini-btn {
    min-height: 46px;
}

input, select, textarea {
    max-width: 100%;
}

.tiktok-id-field[hidden],
.shopee-link-field[hidden] {
    display: none !important;
}

.topbar {
    width: min(100% - 32px, 1440px);
    min-height: 76px;
    margin: 14px auto 0;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 22px;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 14px 42px rgba(20, 43, 79, .10);
    backdrop-filter: blur(18px);
}

.brand {
    flex: 0 1 auto;
}

.brand > span:last-child {
    min-width: 0;
}

.brand strong {
    font-size: 1rem;
    letter-spacing: -.01em;
}

.brand small {
    color: var(--cc-muted);
    font-size: .72rem;
}

.topbar .nav {
    gap: 4px;
}

.topbar .nav a {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    padding: 0 13px;
    border-radius: 14px;
    white-space: nowrap;
}

.topbar .nav a.active {
    color: var(--cc-blue);
    background: #eaf3ff;
}

.top-actions {
    flex: 0 1 auto;
}

.page-home .sale-page {
    width: min(100% - 32px, 1440px);
    margin: 20px auto 48px;
}

.page-home .hero {
    min-height: clamp(560px, 68vh, 760px);
    overflow: hidden;
    border-radius: clamp(24px, 3vw, 42px);
    box-shadow: 0 34px 90px rgba(6, 20, 45, .24);
}

.page-home .hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        linear-gradient(90deg, rgba(4, 14, 34, .94) 0%, rgba(4, 14, 34, .80) 43%, rgba(4, 14, 34, .22) 78%),
        linear-gradient(0deg, rgba(4, 14, 34, .66), transparent 42%);
}

.page-home .hero-copy {
    z-index: 2;
    width: min(730px, 64%);
    padding: clamp(38px, 6vw, 84px);
}

.page-home .hero h1 {
    max-width: 760px;
    margin: 12px 0 16px;
    color: #fff;
    font-size: clamp(2.65rem, 5vw, 5.4rem);
    font-weight: 800;
    letter-spacing: -.045em;
}

.page-home .hero .lead {
    max-width: 650px;
    font-size: clamp(1rem, 1.35vw, 1.22rem);
    line-height: 1.7;
}

.hero-badges, .hero-actions {
    flex-wrap: wrap;
}

.hero-actions a {
    min-height: 52px;
    padding-inline: 22px;
}

.hero-proof {
    width: min(100%, 620px);
    margin-top: 26px;
}

.metrics, .sale-flow, .pricing, .feature-band {
    margin-top: clamp(26px, 5vw, 66px);
}

.metrics article, .flow-grid article, .price-card, .feature-band article, .signup-box {
    border: 1px solid var(--cc-line);
    border-radius: 24px;
    background: var(--cc-panel);
    box-shadow: var(--cc-shadow);
}

.metrics article {
    padding: 24px;
}

.metrics strong {
    color: var(--cc-ink);
    font-size: clamp(1.25rem, 2vw, 1.75rem);
}

.section-head {
    max-width: 760px;
}

.section-head h2, .feature-intro h2 {
    margin-top: 8px;
    font-size: clamp(2rem, 4vw, 3.6rem);
    font-weight: 800;
    letter-spacing: -.035em;
}

.flow-grid {
    gap: 18px;
}

.flow-grid article {
    position: relative;
    overflow: hidden;
    padding: 28px;
}

.flow-grid article b {
    color: rgba(22, 119, 238, .14);
    font-size: 3.6rem;
    line-height: 1;
}

.price-grid {
    gap: 18px;
}

.price-card {
    overflow: hidden;
    padding: 28px;
}

.price-card.featured {
    border-color: rgba(22, 119, 238, .36);
    box-shadow: 0 24px 60px rgba(22, 119, 238, .16);
}

.feature-band {
    gap: 18px;
}

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 34px;
    padding: 24px 6px 10px;
    border-top: 1px solid var(--cc-line);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-brand img {
    width: 44px;
    height: 44px;
    border-radius: 13px;
}

.footer-brand span {
    display: grid;
}

.footer-brand small {
    color: var(--cc-muted);
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.site-footer nav a {
    color: var(--cc-muted);
    font-weight: 700;
}

.narrow-page {
    min-height: calc(100dvh - 100px);
    display: grid;
    place-items: center;
    width: min(100% - 28px, 560px);
}

.auth-panel {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 30px;
    padding: clamp(26px, 6vw, 50px);
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 30px 90px rgba(26, 54, 92, .16);
}

.auth-panel h1 {
    margin: 8px 0 26px;
    font-size: clamp(1.8rem, 5vw, 2.6rem);
    font-weight: 800;
}

.alina-shell {
    grid-template-columns: 264px minmax(0, 1fr);
    background: transparent;
}

.side-menu {
    position: sticky;
    top: 0;
    height: 100dvh;
    min-height: 0;
    overflow-y: auto;
    background: rgba(255, 255, 255, .86);
    backdrop-filter: blur(22px);
}

.shell-main {
    min-width: 0;
}

.shell-top {
    position: sticky;
    top: 0;
    z-index: 30;
    min-height: 86px;
    padding: 16px clamp(20px, 3.5vw, 48px);
    background: rgba(244, 247, 251, .88);
    backdrop-filter: blur(20px);
}

.shell-top h2 {
    font-size: clamp(1.15rem, 2vw, 1.55rem);
    font-weight: 800;
}

.breadcrumb {
    margin-top: 6px;
    font-size: .78rem;
}

.alina-shell main {
    max-width: 1580px;
    padding: clamp(18px, 3vw, 44px);
}

.alina-shell .workspace-head {
    border-radius: 24px;
    padding: 22px 26px;
    background:
        linear-gradient(135deg, rgba(255,255,255,.96), rgba(237,246,255,.9));
    box-shadow: var(--cc-shadow);
}

.alina-shell .workspace-head h1 {
    font-size: clamp(1.7rem, 3vw, 2.55rem);
    font-weight: 800;
}

.tool-grid {
    grid-template-columns: minmax(0, 1fr) minmax(250px, 330px);
    align-items: start;
}

.builder, .side-status, .product-block, .history-list, .history-detail, .credit-panel, .admin-panel, .table-section {
    border-radius: 24px;
    box-shadow: var(--cc-shadow);
}

.product-fields {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.product-fields .wide-field {
    grid-column: 1 / -1;
}

.platform-field select {
    border-color: rgba(22, 119, 238, .34);
    background-color: #f0f7ff;
    font-weight: 800;
}

.shopee-link-field {
    color: #e84e23;
}

.shopee-link-field input {
    border-color: rgba(238, 77, 45, .32);
    background: #fff6f3;
}

.shopee-link-field small {
    display: block;
    margin-top: 6px;
    color: var(--cc-muted);
    font-size: .74rem;
}

.table-section, .admin-panel {
    overflow-x: auto;
}

/* Keep every native select visually distinct from a text input. This rule is
   intentionally late and uses background-image only, so field-specific
   background colors remain intact without accidentally erasing the arrow. */
select:not([multiple]) {
    -webkit-appearance: none !important;
    appearance: none !important;
    padding-right: 48px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath d='M5 7.5 10 12.5 15 7.5' fill='none' stroke='%2310223f' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 15px center !important;
    background-size: 20px 20px !important;
    cursor: pointer;
}

:root[data-theme="dark"] select:not([multiple]) {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath d='M5 7.5 10 12.5 15 7.5' fill='none' stroke='%23e7eefb' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}

@media (max-width: 1120px) {
    .topbar .nav {
        display: none;
    }

    .metrics, .price-grid, .feature-band {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

    .side-status {
        position: static;
    }

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

@media (max-width: 820px) {
    body {
        padding-bottom: calc(78px + env(safe-area-inset-bottom));
    }

    .topbar {
        width: min(100% - 20px, 720px);
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px;
        margin-top: 10px;
        border-radius: 18px;
    }

    .topbar .brand {
        overflow: hidden;
    }

    .topbar .brand-mark {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
    }

    .topbar .brand small {
        display: none;
    }

    .top-actions .user-pill, .top-actions .pill {
        display: none;
    }

    .top-actions .primary-btn, .top-actions .ghost-btn {
        min-height: 40px;
        padding: 0 12px;
        font-size: .78rem;
    }

    .page-home .sale-page {
        width: min(100% - 20px, 720px);
        margin-top: 12px;
    }

    .page-home .hero {
        min-height: 620px;
        border-radius: 26px;
        background-position: 62% center;
    }

    .page-home .hero::before {
        background:
            linear-gradient(0deg, rgba(4, 14, 34, .97) 0%, rgba(4, 14, 34, .86) 54%, rgba(4, 14, 34, .30) 100%);
    }

    .page-home .hero-copy {
        width: 100%;
        align-self: end;
        padding: 34px 24px;
    }

    .page-home .hero h1 {
        font-size: clamp(2.35rem, 10vw, 4.2rem);
    }

    .hero-proof {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hero-proof div {
        padding: 12px 8px;
    }

    .alina-shell {
        display: block;
    }

    .side-menu {
        display: none;
    }

    .rail {
        position: fixed;
        inset: auto 10px calc(8px + env(safe-area-inset-bottom)) 10px;
        z-index: 1000;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        min-height: 66px;
        height: 66px;
        gap: 4px;
        overflow: visible;
        padding: 7px;
        border: 1px solid rgba(255, 255, 255, .14);
        border-radius: 22px;
        background: rgba(7, 17, 34, .94);
        box-shadow: 0 18px 60px rgba(0, 0, 0, .34);
        backdrop-filter: blur(20px);
    }

    .rail-logo, .rail-logout {
        display: none;
    }

    .rail-item {
        width: 100%;
        min-width: 0;
        height: 52px;
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: 20px 15px;
        gap: 3px;
        padding: 6px 3px;
        border-radius: 16px;
    }

    .rail-label {
        display: block;
        max-width: 100%;
        font-size: .65rem;
        text-align: center;
    }

    .shell-top {
        min-height: 70px;
        padding: 12px 16px;
    }

    .shell-top > div:first-child {
        overflow: hidden;
    }

    .breadcrumb {
        display: none;
    }

    .top-icons .user-chip {
        display: none;
    }

    .top-icons .flag, .top-icons .credit-chip {
        height: 40px;
        padding-inline: 10px;
    }

    .alina-shell main {
        padding: 16px 12px 28px;
    }

    .alina-shell .workspace-head {
        min-height: 0;
        padding: 18px;
    }

    .account-strip {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .builder, .side-status, .product-block, .history-list, .history-detail, .credit-panel, .admin-panel, .table-section {
        padding: 18px 14px;
        border-radius: 20px;
    }

    .product-fields, .form-row, .advanced-grid, .signup-box {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .product-fields .wide-field {
        grid-column: auto;
    }

    .builder-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .site-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .topbar {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .brand strong {
        font-size: .88rem;
    }

    .top-actions .icon-pill {
        display: none;
    }

    .page-home .hero {
        min-height: 640px;
    }

    .hero-logo {
        width: min(190px, 52vw);
    }

    .page-home .hero .eyebrow {
        font-size: .72rem;
    }

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

    .hero-badges span {
        justify-content: center;
        text-align: center;
    }

    .hero-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .hero-actions a {
        width: 100%;
        justify-content: center;
    }

    .hero-proof dt {
        font-size: 1.1rem;
    }

    .hero-proof dd {
        font-size: .64rem;
    }

    .metrics, .flow-grid, .price-grid, .feature-band {
        grid-template-columns: minmax(0, 1fr);
    }

    .metrics article, .flow-grid article, .price-card, .feature-band article {
        padding: 20px;
        border-radius: 20px;
    }

    .section-head h2, .feature-intro h2 {
        font-size: clamp(1.8rem, 9vw, 2.6rem);
    }

    .signup-box {
        padding: 20px;
    }

    .shell-top h2 {
        max-width: 54vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .account-strip {
        grid-template-columns: minmax(0, 1fr);
    }

    .product-head {
        align-items: center;
        flex-direction: row;
    }
}

@media (max-width: 760px) {
    .csv-auto-rules {
        grid-template-columns: 1fr;
    }
}

/* Sale page typography — readable Thai body copy with a stronger commercial hierarchy. */
body.page-home {
    --sp3-body-font: "Anuphan", "Leelawadee UI", Tahoma, sans-serif;
    --sp3-display-font: "Bai Jamjuree", "Leelawadee UI", Tahoma, sans-serif;
    font-family: var(--sp3-body-font) !important;
    font-kerning: normal;
    font-synthesis: none;
}

body.page-home .sp3,
body.page-home .sp3 p,
body.page-home .sp3 li,
body.page-home .sp3 span,
body.page-home .sp3 small,
body.page-home .sp3 label,
body.page-home .sp3 summary,
body.page-home .sp3 em,
body.page-home .sp3 input,
body.page-home .sp3 select,
body.page-home .sp3 textarea {
    font-family: var(--sp3-body-font) !important;
    letter-spacing: -.006em;
}

body.page-home .sp3 h1,
body.page-home .sp3 h2,
body.page-home .sp3 h3,
body.page-home .sp3 strong,
body.page-home .sp3 b,
body.page-home .sp3 .sp3-btn,
body.page-home .sp3 button,
body.page-home .brand strong,
body.page-home .nav a,
body.page-home .top-actions a {
    font-family: var(--sp3-display-font) !important;
}

body.page-home .sp3 h1,
body.page-home .sp3 h2,
body.page-home .sp3 h3 {
    font-weight: 700;
    text-wrap: balance;
}

body.page-home .sp3-hero h1 {
    line-height: 1.055;
    letter-spacing: -.042em;
}

body.page-home .sp3-section-copy h2,
body.page-home .sp3-section-head h2,
body.page-home .sp3-pricing h2,
body.page-home .sp3-faq h2,
body.page-home .sp3-final h2,
body.page-home .sp3-tutorial-head h2 {
    line-height: 1.18;
    letter-spacing: -.027em;
}

body.page-home .sp3 h3 {
    line-height: 1.42;
    letter-spacing: -.016em;
}

body.page-home .sp3 p,
body.page-home .sp3 li,
body.page-home .sp3 summary {
    line-height: 1.72;
}

body.page-home .sp3-btn,
body.page-home .sp3 button,
body.page-home .nav a,
body.page-home .top-actions a {
    font-weight: 700;
    letter-spacing: -.012em;
}

body.page-home .sp3-kicker,
body.page-home .sp3-eyebrow,
body.page-home .sp3-hero-price-line strong,
body.page-home .sp3-price,
body.page-home .sp3-proof-row strong {
    font-family: var(--sp3-display-font) !important;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 780px) {
    body.page-home .sp3-hero h1 {
        line-height: 1.09;
        letter-spacing: -.035em;
    }

    body.page-home .sp3 p,
    body.page-home .sp3 li,
    body.page-home .sp3 summary {
        line-height: 1.68;
    }
}

/* Mobile application header navigation. Desktop keeps the existing sidebar;
   phones use one explicit three-line button and an accessible slide-out menu. */
.mobile-menu-toggle,
.mobile-menu-backdrop,
.mobile-app-menu {
    display: none;
}

@media (max-width: 820px) {
    body.mobile-menu-open {
        overflow: hidden;
        overscroll-behavior: none;
    }

    .alina-shell > .rail {
        display: none !important;
    }

    .alina-shell .shell-top {
        grid-template-columns: 46px minmax(0, 1fr) auto;
        align-items: center;
        gap: 10px;
        min-height: 68px;
        padding: 10px 12px;
    }

    .mobile-menu-toggle {
        width: 44px;
        height: 44px;
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        flex: 0 0 44px;
        border: 1px solid rgba(92, 78, 157, .18);
        border-radius: 14px;
        padding: 0;
        color: #15213a;
        background: #ffffff;
        box-shadow: 0 8px 22px rgba(28, 39, 74, .12);
        cursor: pointer;
    }

    .mobile-menu-toggle span {
        width: 21px;
        height: 2.5px;
        display: block;
        border-radius: 10px;
        background: currentColor;
        transition: transform .2s ease, opacity .2s ease;
    }

    .mobile-menu-open .mobile-menu-toggle span:nth-child(1) {
        transform: translateY(7.5px) rotate(45deg);
    }

    .mobile-menu-open .mobile-menu-toggle span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-open .mobile-menu-toggle span:nth-child(3) {
        transform: translateY(-7.5px) rotate(-45deg);
    }

    .alina-shell .shell-top > div:first-of-type {
        min-width: 0;
        overflow: hidden;
    }

    .alina-shell .shell-top h2 {
        overflow: hidden;
        font-size: 1.05rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .alina-shell .shell-top .top-icons {
        width: auto;
        min-width: 0;
        overflow: visible;
        padding: 0;
    }

    .alina-shell .shell-top .page-guide-button,
    .alina-shell .shell-top .flag {
        display: none;
    }

    .alina-shell .shell-top .credit-chip {
        height: 40px;
        white-space: nowrap;
    }

    .mobile-menu-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1290;
        width: 100%;
        height: 100%;
        display: block;
        border: 0;
        padding: 0;
        background: rgba(5, 11, 27, .58);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity .22s ease, visibility .22s ease;
        backdrop-filter: blur(3px);
    }

    .mobile-app-menu {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 1300;
        width: min(86vw, 340px);
        height: 100dvh;
        display: flex;
        flex-direction: column;
        border-right: 1px solid rgba(66, 62, 107, .13);
        padding: max(16px, env(safe-area-inset-top)) 14px max(16px, env(safe-area-inset-bottom));
        background: #f8f8ff;
        box-shadow: 24px 0 70px rgba(10, 16, 40, .24);
        transform: translateX(-105%);
        visibility: hidden;
        transition: transform .24s ease, visibility .24s ease;
    }

    .mobile-menu-open .mobile-menu-backdrop {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .mobile-menu-open .mobile-app-menu {
        transform: translateX(0);
        visibility: visible;
    }

    .mobile-app-menu-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        border-bottom: 1px solid rgba(66, 62, 107, .12);
        padding: 2px 2px 15px;
    }

    .mobile-app-menu-head > a {
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 10px;
        color: #17233d;
    }

    .mobile-app-menu-head .logo-tile {
        width: 42px;
        height: 42px;
        display: grid;
        flex: 0 0 42px;
        place-items: center;
        overflow: hidden;
        border-radius: 13px;
        background: #070912;
    }

    .mobile-app-menu-head .logo-tile img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .mobile-app-menu-head strong {
        overflow: hidden;
        font-size: .98rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-app-menu-head > button {
        width: 40px;
        height: 40px;
        flex: 0 0 40px;
        border: 1px solid #ddd9f0;
        border-radius: 13px;
        color: #4d4385;
        background: #ffffff;
        font-family: inherit;
        font-size: 1.65rem;
        font-weight: 700;
        line-height: 1;
        cursor: pointer;
    }

    .mobile-app-menu-nav {
        display: grid;
        gap: 6px;
        overflow-y: auto;
        padding: 14px 0;
    }

    .mobile-app-menu-nav a {
        min-height: 50px;
        display: flex;
        align-items: center;
        gap: 12px;
        border: 1px solid transparent;
        border-radius: 16px;
        padding: 9px 13px;
        color: #293550;
        font-weight: 800;
    }

    .mobile-app-menu-nav a i {
        width: 30px;
        height: 30px;
        display: grid;
        place-items: center;
        border-radius: 10px;
        color: #7256d9;
        background: #eeeaff;
        font-style: normal;
    }

    .mobile-app-menu-nav a.active {
        border-color: #d7cdfc;
        color: #5d3fd3;
        background: #eee9ff;
    }

    .mobile-app-menu-foot {
        display: grid;
        gap: 6px;
        margin-top: auto;
        border-top: 1px solid rgba(66, 62, 107, .12);
        padding: 14px 2px 0;
    }

    .mobile-app-menu-foot span {
        overflow: hidden;
        color: #69758c;
        font-size: .78rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-app-menu-foot strong {
        color: #27334c;
        font-size: .84rem;
    }

    .mobile-app-menu-foot button {
        min-height: 44px;
        margin-top: 5px;
        border: 1px solid #ffd0da;
        border-radius: 14px;
        color: #df3f61;
        background: #fff0f4;
        font-family: inherit;
        font-weight: 900;
    }

    :root[data-theme="dark"] .mobile-menu-toggle,
    :root[data-theme="dark"] .mobile-app-menu-head > button {
        color: #edf2ff;
        border-color: #34415a;
        background: #152036;
    }

    :root[data-theme="dark"] .mobile-app-menu {
        border-color: #2f3b52;
        background: #101a2d;
    }

    :root[data-theme="dark"] .mobile-app-menu-head > a,
    :root[data-theme="dark"] .mobile-app-menu-foot strong,
    :root[data-theme="dark"] .mobile-app-menu-nav a {
        color: #eaf0ff;
    }

    :root[data-theme="dark"] .mobile-app-menu-nav a.active {
        border-color: #6e5ad1;
        background: #2a2450;
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* UX audit 2026-07-27: shared interaction and state system */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 3px solid rgba(37, 99, 235, .42) !important;
    outline-offset: 3px;
}

:where(button, .primary-btn, .ghost-btn, .mini-btn, .guide-view-btn, .guide-download-btn) {
    min-height: 44px;
}

:where(button, input, select, textarea):disabled {
    cursor: not-allowed !important;
    opacity: .48;
    filter: grayscale(.22);
}

.media-fallback,
.admin-showcase-placeholder {
    width: 100%;
    min-height: 150px;
    display: grid;
    place-content: center;
    gap: 8px;
    text-align: center;
    color: #64748b;
    border: 1px dashed #cbd5e1;
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(37,99,235,.06), rgba(20,184,166,.08)),
        #f8fafc;
}

.media-fallback b,
.admin-showcase-placeholder b {
    font-size: 34px;
    color: #2563eb;
}

img[data-qr-link] {
    min-height: 160px;
    background: linear-gradient(100deg, #eef2f7 20%, #fff 42%, #eef2f7 64%);
    background-size: 300% 100%;
    animation: cartclipSkeleton 1.35s linear infinite;
}

.qr-fallback-link {
    width: min(100%, 230px);
    text-align: center;
}

.password-field {
    position: relative;
    display: block;
}

.password-field input {
    width: 100%;
    padding-right: 76px;
}

.password-field button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    min-height: 36px;
    padding: 6px 12px;
    border: 0;
    border-radius: 10px;
    color: #2563eb;
    background: #eff6ff;
}

.auth-intro {
    margin: -4px 0 18px;
    color: #64748b;
}

.field-requirement {
    display: inline-flex;
    width: fit-content;
    margin: 0 0 4px 7px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    vertical-align: middle;
}

.field-requirement.is-required {
    color: #b91c1c;
    background: #fef2f2;
}

.field-requirement.is-optional {
    color: #64748b;
    background: #f1f5f9;
}

.field-error {
    display: block;
    min-height: 18px;
    margin-top: 5px;
    color: #b91c1c;
    font-size: 12px;
}

[aria-invalid="true"] {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239,68,68,.12) !important;
}

.page-login .auth-topbar .nav {
    display: none;
}

.page-login .auth-panel {
    max-width: 520px;
}

@media (max-width: 720px) {
    .clip-table,
    .clip-table tbody,
    .clip-table tr,
    .clip-table td {
        display: block;
        width: 100%;
    }

    .clip-table {
        min-width: 0 !important;
    }

    .clip-table thead {
        display: none;
    }

    .clip-table tr {
        margin-bottom: 12px;
        padding: 10px 14px;
        border: 1px solid #dbe7f5;
        border-radius: 16px;
        background: #fff;
        box-shadow: 0 8px 20px rgba(15, 23, 42, .06);
    }

    .clip-table td {
        display: grid;
        grid-template-columns: minmax(88px, 34%) minmax(0, 1fr);
        gap: 10px;
        padding: 9px 0 !important;
        border: 0 !important;
        border-bottom: 1px solid #edf2f7 !important;
        overflow-wrap: anywhere;
    }

    .clip-table td:last-child {
        border-bottom: 0 !important;
    }

    .clip-table td::before {
        content: attr(data-label);
        color: #64748b;
        font-size: 12px;
        font-weight: 700;
    }

    .clip-table-actions {
        display: flex !important;
        flex-wrap: wrap;
    }

    .clip-table-actions::before {
        width: 100%;
    }
}

/* Dashboard */
.page-dashboard .shell-main {
    background:
        radial-gradient(circle at 12% 3%, rgba(41, 121, 255, .12), transparent 30%),
        radial-gradient(circle at 92% 12%, rgba(21, 199, 176, .12), transparent 26%),
        #f4f8fd;
}

.dashboard-page {
    display: grid;
    gap: 22px;
    width: min(100% - 46px, 1500px);
    margin: 0 auto;
    padding: 26px 0 42px;
}

.dashboard-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(310px, 390px);
    align-items: center;
    gap: 32px;
    min-height: 280px;
    padding: clamp(28px, 4vw, 52px);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 34px;
    color: #fff;
    background: linear-gradient(125deg, #071327 0%, #0f2d58 58%, #087f8c 115%);
    box-shadow: 0 26px 55px rgba(24, 55, 95, .18);
}

.dashboard-hero::before,
.dashboard-hero::after {
    position: absolute;
    z-index: -1;
    content: "";
    border-radius: 999px;
    filter: blur(2px);
}

.dashboard-hero::before {
    width: 330px;
    height: 330px;
    right: 22%;
    top: -190px;
    background: rgba(46, 151, 255, .22);
}

.dashboard-hero::after {
    width: 250px;
    height: 250px;
    right: -80px;
    bottom: -150px;
    background: rgba(38, 234, 190, .24);
}

.dashboard-hero .eyebrow,
.dashboard-panel .eyebrow,
.dashboard-quick-section .eyebrow {
    margin: 0 0 5px;
    color: #1683ee;
    font: 800 .73rem/1.2 "Lexend Deca", sans-serif;
    letter-spacing: .12em;
}

.dashboard-hero .eyebrow {
    color: #49e2cf;
}

.dashboard-hero h1 {
    margin: 0;
    font-size: clamp(2.15rem, 4vw, 3.5rem);
    line-height: 1.05;
}

.dashboard-hero-copy > p:not(.eyebrow) {
    max-width: 680px;
    margin: 13px 0 0;
    color: #cfe0f5;
    font-size: 1.05rem;
    line-height: 1.7;
}

.dashboard-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 11px;
    margin-top: 25px;
}

.dashboard-hero-actions a {
    min-height: 48px;
    padding: 13px 20px;
    border-radius: 14px;
    text-decoration: none;
}

.dashboard-secondary-btn {
    border: 1px solid rgba(255, 255, 255, .28);
    color: #fff;
    background: rgba(255, 255, 255, .08);
}

.dashboard-balance-card {
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 25px;
    background: rgba(255, 255, 255, .12);
    box-shadow: inset 0 1px rgba(255, 255, 255, .12);
    backdrop-filter: blur(14px);
}

.dashboard-balance-card > span {
    color: #cfe0f5;
    font-size: .9rem;
}

.dashboard-balance-card > strong {
    display: block;
    margin-top: 8px;
    font: 800 clamp(2.3rem, 4vw, 3.4rem)/1 "Lexend Deca", sans-serif;
}

.dashboard-balance-card > strong small {
    font: 600 1rem/1 "Kanit", sans-serif;
}

.dashboard-balance-card p {
    margin: 13px 0 19px;
    color: #d6e6f8;
    line-height: 1.5;
}

.dashboard-balance-card a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 12px;
    color: #07223c;
    font-weight: 800;
    text-decoration: none;
    background: #50e1cc;
}

.dashboard-state {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border: 1px solid #fecaca;
    border-radius: 18px;
    color: #851c2e;
    background: #fff1f2;
}

.dashboard-state > span {
    display: grid;
    flex: 0 0 40px;
    height: 40px;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    font-weight: 900;
    background: #e84362;
}

.dashboard-state p {
    margin: 2px 0 0;
}

.dashboard-state a {
    margin-left: auto;
    color: inherit;
    font-weight: 800;
}

.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.dashboard-kpi-card {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    padding: 21px;
    border: 1px solid #dce6f2;
    border-radius: 23px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 12px 28px rgba(30, 65, 110, .08);
}

.dashboard-kpi-icon {
    display: grid;
    flex: 0 0 54px;
    height: 54px;
    place-items: center;
    border-radius: 17px;
    color: #fff;
    font-size: 1.45rem;
    font-weight: 900;
}

.dashboard-kpi-card.is-total .dashboard-kpi-icon { background: linear-gradient(135deg, #2378ec, #28a7ef); }
.dashboard-kpi-card.is-ready .dashboard-kpi-icon { background: linear-gradient(135deg, #08a77d, #32d7b0); }
.dashboard-kpi-card.is-active .dashboard-kpi-icon { background: linear-gradient(135deg, #f08b20, #ffc34c); }
.dashboard-kpi-card.is-failed .dashboard-kpi-icon { background: linear-gradient(135deg, #df3a5b, #ff718a); }

.dashboard-kpi-card small {
    display: block;
    color: #6f7f94;
    font-weight: 600;
}

.dashboard-kpi-card strong {
    display: block;
    margin: 2px 0;
    color: #0b1d38;
    font: 800 2rem/1.1 "Lexend Deca", sans-serif;
}

.dashboard-kpi-card p {
    overflow: hidden;
    margin: 0;
    color: #8795a8;
    font-size: .82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr);
    gap: 18px;
    align-items: start;
}

.dashboard-panel,
.dashboard-quick-section {
    border: 1px solid #dce6f2;
    border-radius: 25px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 14px 32px rgba(30, 65, 110, .08);
}

.dashboard-panel {
    padding: 22px;
}

.dashboard-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.dashboard-panel-head h2 {
    margin: 0;
    color: #0b1d38;
    font-size: 1.35rem;
}

.dashboard-panel-head > a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: #1d73dd;
    font-weight: 800;
    text-decoration: none;
}

.dashboard-campaign-list {
    display: grid;
    gap: 10px;
    margin-top: 17px;
}

.dashboard-campaign-row {
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    min-height: 92px;
    padding: 13px 15px 13px 10px;
    border: 1px solid #e3ebf4;
    border-radius: 18px;
    color: inherit;
    text-decoration: none;
    background: #fbfdff;
    transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.dashboard-campaign-row:hover {
    transform: translateY(-2px);
    border-color: #93bdf2;
    box-shadow: 0 8px 20px rgba(31, 97, 180, .1);
}

.dashboard-campaign-mark {
    width: 5px;
    height: 52px;
    border-radius: 999px;
    background: linear-gradient(#2d7ee9, #27c9b5);
}

.dashboard-campaign-content {
    min-width: 0;
}

.dashboard-campaign-title {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
}

.dashboard-campaign-title > strong {
    overflow: hidden;
    color: #14243d;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-status {
    flex: 0 0 auto;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 800;
}

.dashboard-status.is-success { color: #08795d; background: #d9f8ed; }
.dashboard-status.is-working { color: #9a5b00; background: #fff0c9; }
.dashboard-status.is-error { color: #ad2943; background: #ffe0e6; }
.dashboard-status.is-queued { color: #35658f; background: #e6f1fb; }

.dashboard-progress {
    overflow: hidden;
    height: 6px;
    margin: 10px 0 7px;
    border-radius: 999px;
    background: #e8eef5;
}

.dashboard-progress i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #287eed, #24c7b3);
}

.dashboard-campaign-row p {
    margin: 0;
    color: #7a899c;
    font-size: .79rem;
}

.dashboard-campaign-row > b {
    color: #93a3b8;
    font-size: 1.8rem;
}

.dashboard-empty {
    display: grid;
    min-height: 330px;
    padding: 34px;
    place-items: center;
    align-content: center;
    text-align: center;
}

.dashboard-empty > span {
    display: grid;
    width: 66px;
    height: 66px;
    place-items: center;
    border-radius: 20px;
    color: #1f78e7;
    font-size: 2rem;
    background: #e8f2ff;
}

.dashboard-empty h3 {
    margin: 16px 0 3px;
}

.dashboard-empty p {
    margin: 0 0 18px;
    color: #76869b;
}

.dashboard-side-stack {
    display: grid;
    gap: 18px;
}

.dashboard-platform-total {
    margin-top: 22px;
    color: #0c1f3b;
    font: 800 2.4rem/1 "Lexend Deca", sans-serif;
}

.dashboard-platform-total small {
    color: #78889d;
    font: 500 .9rem/1 "Kanit", sans-serif;
}

.dashboard-platform-bar {
    overflow: hidden;
    height: 12px;
    margin: 21px 0 17px;
    border-radius: 999px;
    background: #ffddce;
}

.dashboard-platform-bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #111b30, #287de8);
}

.dashboard-platform-legend {
    display: grid;
    gap: 9px;
}

.dashboard-platform-legend span {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    color: #617188;
}

.dashboard-platform-legend i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dashboard-platform-legend .is-tiktok i { background: #182944; }
.dashboard-platform-legend .is-shopee i { background: #ff6537; }
.dashboard-platform-legend b { color: #24344d; }
.dashboard-platform-legend strong { color: #10213c; font-family: "Lexend Deca", sans-serif; }

.dashboard-account-panel > strong {
    display: block;
    margin-top: 19px;
    color: #14243d;
    font-size: 1.35rem;
}

.dashboard-account-panel > p {
    overflow: hidden;
    margin: 3px 0 15px;
    color: #718097;
    text-overflow: ellipsis;
}

.dashboard-account-panel > span {
    display: block;
    padding: 11px 13px;
    border-radius: 13px;
    color: #1763b8;
    font-weight: 700;
    background: #eaf4ff;
}

.dashboard-quick-section {
    padding: 22px;
}

.dashboard-quick-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 17px;
}

.dashboard-quick-grid > a {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 85px;
    padding: 15px;
    border: 1px solid #dce6f2;
    border-radius: 18px;
    color: #152640;
    text-decoration: none;
    background: #fbfdff;
}

.dashboard-quick-grid i {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 15px;
    color: #fff;
    font-size: 1.25rem;
    font-style: normal;
    font-weight: 900;
}

.dashboard-quick-grid .is-create i { background: linear-gradient(135deg, #2579eb, #28a9ed); }
.dashboard-quick-grid .is-csv i { background: linear-gradient(135deg, #7049e8, #9b6cf2); }
.dashboard-quick-grid .is-history i { background: linear-gradient(135deg, #03a980, #38d1af); }
.dashboard-quick-grid .is-credit i { background: linear-gradient(135deg, #f18522, #ffc34c); }

.dashboard-quick-grid strong,
.dashboard-quick-grid small {
    display: block;
}

.dashboard-quick-grid small {
    overflow: hidden;
    margin-top: 2px;
    color: #7a899c;
    font-size: .78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-quick-grid > a > b {
    color: #92a3b8;
    font-size: 1.5rem;
}

@media (max-width: 1180px) {
    .dashboard-kpi-grid,
    .dashboard-quick-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 940px) {
    .dashboard-page {
        width: min(100% - 28px, 1500px);
    }
    .dashboard-hero,
    .dashboard-main-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 620px) {
    .dashboard-page {
        width: calc(100% - 16px);
        gap: 14px;
        padding-top: 14px;
    }
    .dashboard-hero {
        gap: 22px;
        padding: 25px 19px;
        border-radius: 25px;
    }
    .dashboard-hero h1 {
        font-size: 2.05rem;
    }
    .dashboard-hero-actions {
        display: grid;
    }
    .dashboard-hero-actions a {
        justify-content: center;
        text-align: center;
    }
    .dashboard-kpi-grid,
    .dashboard-quick-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .dashboard-panel,
    .dashboard-quick-section {
        padding: 16px;
        border-radius: 21px;
    }
    .dashboard-kpi-card {
        padding: 17px;
    }
    .dashboard-campaign-title {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }
    .dashboard-campaign-title > strong {
        max-width: 100%;
    }
    .dashboard-campaign-row {
        grid-template-columns: 7px minmax(0, 1fr);
    }
    .dashboard-campaign-row > b {
        display: none;
    }
    .dashboard-state {
        align-items: flex-start;
        flex-wrap: wrap;
    }
    .dashboard-state a {
        width: 100%;
        margin-left: 54px;
    }
}

/* Dashboard v2 — compact, readable and stable across desktop/mobile */
.page-dashboard .shell-main {
    background:
        radial-gradient(circle at 16% 0%, rgba(49, 123, 238, .10), transparent 28rem),
        radial-gradient(circle at 95% 8%, rgba(23, 186, 165, .10), transparent 24rem),
        #f3f7fc;
}

.dashboard-v2 {
    width: min(calc(100% - 40px), 1280px);
    gap: 16px;
    padding: 22px 0 38px;
}

.dashboard-v2 .dashboard-hero {
    grid-template-columns: minmax(0, 1.45fr) minmax(290px, .75fr);
    min-height: 0;
    gap: 24px;
    padding: 30px 34px;
    border-radius: 26px;
    background:
        radial-gradient(circle at 75% -25%, rgba(77, 151, 255, .38), transparent 42%),
        linear-gradient(125deg, #08162b 0%, #102e58 62%, #0d6a76 120%);
    box-shadow: 0 18px 42px rgba(25, 56, 96, .16);
}

.dashboard-v2 .dashboard-hero::before {
    width: 220px;
    height: 220px;
    top: -145px;
    right: 37%;
}

.dashboard-v2 .dashboard-hero::after {
    width: 190px;
    height: 190px;
    right: -75px;
    bottom: -120px;
}

.dashboard-v2 .dashboard-hero .eyebrow,
.dashboard-v2 .dashboard-panel .eyebrow,
.dashboard-v2 .dashboard-quick-section .eyebrow {
    margin-bottom: 6px;
    font-family: "Kanit", sans-serif;
    font-size: .76rem;
    letter-spacing: .04em;
}

.dashboard-v2 .dashboard-hero h1 {
    max-width: 660px;
    font-size: clamp(2rem, 3.2vw, 3rem);
    line-height: 1.06;
    letter-spacing: -.025em;
}

.dashboard-v2 .dashboard-hero h1 span {
    color: #60e3d1;
}

.dashboard-v2 .dashboard-hero-copy > p:not(.eyebrow) {
    margin-top: 10px;
    font-size: .98rem;
    line-height: 1.55;
}

.dashboard-v2 .dashboard-hero-actions {
    margin-top: 20px;
}

.dashboard-v2 .dashboard-hero-actions a {
    min-height: 46px;
    padding: 11px 18px;
    border-radius: 13px;
}

.dashboard-v2 .dashboard-balance-card {
    padding: 20px;
    border-color: rgba(255, 255, 255, .18);
    border-radius: 20px;
    background: rgba(255, 255, 255, .10);
}

.dashboard-balance-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.dashboard-balance-head > span {
    color: #d9e8f8;
    font-size: .86rem;
    font-weight: 700;
}

.dashboard-balance-head > i {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 11px;
    color: #08263d;
    font-style: normal;
    font-weight: 900;
    background: #57e2cf;
}

.dashboard-v2 .dashboard-balance-card > strong {
    margin: 9px 0 13px;
    font-size: clamp(2.1rem, 3vw, 2.8rem);
}

.dashboard-balance-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}

.dashboard-balance-meta > span {
    min-height: 72px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 14px;
    color: #c8dbee;
    font-size: .86rem;
    line-height: 1.4;
    background: rgba(7, 24, 48, .20);
}

.dashboard-balance-meta b {
    display: block;
    margin-bottom: 2px;
    color: #fff;
    font-size: 1.2rem;
    line-height: 1.15;
}

.dashboard-v2 .dashboard-balance-card > a {
    display: flex;
    justify-content: space-between;
    width: 100%;
    min-height: 42px;
    padding: 9px 13px;
    border-radius: 11px;
    font-size: .86rem;
}

.dashboard-v2 .dashboard-kpi-grid {
    gap: 12px;
}

.dashboard-v2 .dashboard-kpi-card {
    position: relative;
    overflow: hidden;
    gap: 13px;
    min-height: 108px;
    padding: 17px;
    border: 1px solid #dce6f2;
    border-radius: 19px;
    box-shadow: 0 8px 22px rgba(30, 65, 110, .065);
}

.dashboard-v2 .dashboard-kpi-card::after {
    position: absolute;
    width: 72px;
    height: 72px;
    right: -28px;
    bottom: -35px;
    content: "";
    border-radius: 50%;
    background: var(--dashboard-kpi-tint, #e8f2ff);
}

.dashboard-v2 .dashboard-kpi-card.is-total { --dashboard-kpi-tint: #e5efff; }
.dashboard-v2 .dashboard-kpi-card.is-ready { --dashboard-kpi-tint: #dcf7ef; }
.dashboard-v2 .dashboard-kpi-card.is-active { --dashboard-kpi-tint: #fff0d2; }
.dashboard-v2 .dashboard-kpi-card.is-failed { --dashboard-kpi-tint: #ffe3e8; }

.dashboard-v2 .dashboard-kpi-icon {
    flex-basis: 46px;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    font-size: 1.15rem;
}

.dashboard-v2 .dashboard-kpi-card strong {
    margin: 1px 0 3px;
    font-size: 1.65rem;
}

.dashboard-v2 .dashboard-kpi-card p {
    max-width: 170px;
    font-size: .76rem;
}

.dashboard-v2 .dashboard-panel,
.dashboard-v2 .dashboard-quick-section {
    border-radius: 21px;
    box-shadow: 0 10px 26px rgba(30, 65, 110, .065);
}

.dashboard-v2 .dashboard-quick-section {
    padding: 18px;
}

.dashboard-v2 .dashboard-panel {
    padding: 20px;
}

.dashboard-v2 .dashboard-panel-head h2 {
    font-size: 1.2rem;
}

.dashboard-v2 .dashboard-quick-grid {
    gap: 10px;
    margin-top: 13px;
}

.dashboard-v2 .dashboard-quick-grid > a {
    min-height: 76px;
    padding: 12px;
    border-radius: 16px;
    background: linear-gradient(145deg, #fff, #f7faff);
    transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.dashboard-v2 .dashboard-quick-grid > a:hover {
    transform: translateY(-2px);
    border-color: #9bc2f1;
    box-shadow: 0 8px 18px rgba(34, 91, 163, .09);
}

.dashboard-v2 .dashboard-quick-grid i {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    font-size: 1.08rem;
}

.dashboard-extension-section {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(340px, .88fr);
    gap: 14px;
}

.dashboard-extension-card,
.dashboard-install-card {
    border: 1px solid #d9e6f4;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(30, 65, 110, .07);
}

.dashboard-extension-card {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 18px;
    overflow: hidden;
    padding: 22px;
    background:
        radial-gradient(circle at 100% 0%, rgba(44, 209, 187, .16), transparent 17rem),
        linear-gradient(145deg, #f7fbff, #fff 62%);
}

.dashboard-extension-icon {
    display: grid;
    width: 64px;
    height: 64px;
    place-items: center;
    border-radius: 19px;
    color: #fff;
    font-family: "Kanit", sans-serif;
    font-size: 1.75rem;
    font-weight: 900;
    background: linear-gradient(145deg, #2579e7, #12b8a3);
    box-shadow: 0 10px 24px rgba(35, 121, 220, .24);
}

.dashboard-extension-copy h2,
.dashboard-install-card h2 {
    margin: 0;
    color: #0c1c35;
    font-family: "Kanit", sans-serif;
    font-size: 1.28rem;
    line-height: 1.3;
}

.dashboard-extension-copy > p:not(.eyebrow) {
    margin: 8px 0 0;
    color: #60738c;
    font-size: .86rem;
    line-height: 1.6;
}

.dashboard-extension-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.dashboard-extension-features span {
    padding: 7px 10px;
    border: 1px solid #cce8e2;
    border-radius: 999px;
    color: #12695f;
    font-size: .74rem;
    font-weight: 800;
    background: #edfbf8;
}

.dashboard-extension-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 17px;
}

.dashboard-extension-actions .primary-btn {
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 13px;
}

.dashboard-guide-link {
    min-height: 44px;
    padding: 11px 13px;
    border: 1px solid #cbdcf0;
    border-radius: 13px;
    color: #176ac5;
    font-size: .82rem;
    font-weight: 900;
    background: #fff;
}

.dashboard-extension-copy > small {
    display: block;
    margin-top: 10px;
    color: #8494a9;
    font-size: .7rem;
}

.dashboard-install-card {
    padding: 22px;
}

.dashboard-install-card header {
    padding-bottom: 14px;
    border-bottom: 1px solid #e4ebf4;
}

.dashboard-install-steps {
    display: grid;
    gap: 10px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.dashboard-install-steps li {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 11px;
    align-items: start;
    padding: 10px;
    border-radius: 14px;
    background: #f6f9fd;
}

.dashboard-install-steps li > span {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(145deg, #2579e7, #12b8a3);
}

.dashboard-install-steps strong {
    display: block;
    color: #13243e;
    font-size: .86rem;
}

.dashboard-install-steps p {
    margin: 3px 0 0;
    color: #677990;
    font-size: .74rem;
    line-height: 1.48;
}

.dashboard-install-steps code {
    padding: 1px 5px;
    border-radius: 5px;
    color: #176ac5;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    background: #e6f0fd;
}

.dashboard-v2 .dashboard-main-grid {
    grid-template-columns: minmax(0, 1.65fr) minmax(280px, .72fr);
    gap: 14px;
}

.dashboard-v2 .dashboard-side-stack {
    gap: 14px;
}

.dashboard-v2 .dashboard-campaign-list {
    gap: 8px;
    margin-top: 13px;
}

.dashboard-v2 .dashboard-campaign-row {
    grid-template-columns: 6px minmax(0, 1fr) auto;
    min-height: 78px;
    padding: 11px 13px 11px 9px;
    border-radius: 15px;
}

.dashboard-v2 .dashboard-campaign-mark {
    width: 4px;
    height: 44px;
}

.dashboard-v2 .dashboard-progress {
    height: 5px;
    margin: 8px 0 6px;
}

.dashboard-v2 .dashboard-platform-total {
    margin-top: 16px;
    font-size: 2rem;
}

.dashboard-v2 .dashboard-platform-bar {
    height: 10px;
    margin: 17px 0 14px;
}

.dashboard-v2 a:focus-visible {
    outline: 3px solid rgba(36, 126, 237, .34);
    outline-offset: 3px;
}

@media (max-width: 1120px) {
    .dashboard-v2 .dashboard-hero {
        grid-template-columns: minmax(0, 1.25fr) minmax(270px, .75fr);
    }

    .dashboard-v2 .dashboard-main-grid {
        grid-template-columns: minmax(0, 1.4fr) minmax(260px, .7fr);
    }
}

@media (max-width: 940px) {
    .dashboard-v2 {
        width: min(calc(100% - 24px), 1280px);
    }

    .dashboard-v2 .dashboard-hero,
    .dashboard-v2 .dashboard-main-grid,
    .dashboard-extension-section {
        grid-template-columns: minmax(0, 1fr);
    }

    .dashboard-v2 .dashboard-side-stack {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .dashboard-v2 {
        width: calc(100% - 12px);
        gap: 12px;
        padding: 10px 0 24px;
    }

    .dashboard-v2 .dashboard-hero {
        gap: 18px;
        padding: 22px 17px;
        border-radius: 21px;
    }

    .dashboard-v2 .dashboard-hero h1 {
        font-size: 1.85rem;
    }

    .dashboard-v2 .dashboard-hero-copy > p:not(.eyebrow) {
        font-size: .88rem;
    }

    .dashboard-v2 .dashboard-hero-actions {
        grid-template-columns: minmax(0, 1fr);
        margin-top: 16px;
    }

    .dashboard-balance-meta,
    .dashboard-v2 .dashboard-side-stack {
        grid-template-columns: minmax(0, 1fr);
    }

    .dashboard-v2 .dashboard-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .dashboard-extension-card {
        grid-template-columns: minmax(0, 1fr);
        padding: 18px;
    }

    .dashboard-extension-icon {
        width: 52px;
        height: 52px;
        border-radius: 16px;
        font-size: 1.4rem;
    }

    .dashboard-extension-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .dashboard-extension-actions a {
        justify-content: center;
        text-align: center;
    }

    .dashboard-install-card {
        padding: 18px;
    }

    .dashboard-v2 .dashboard-kpi-card {
        display: block;
        min-height: 132px;
        padding: 14px;
    }

    .dashboard-v2 .dashboard-kpi-icon {
        margin-bottom: 10px;
    }

    .dashboard-v2 .dashboard-kpi-card p {
        white-space: normal;
    }

    .dashboard-v2 .dashboard-quick-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .dashboard-v2 .dashboard-panel,
    .dashboard-v2 .dashboard-quick-section {
        padding: 15px;
        border-radius: 18px;
    }

    .dashboard-v2 .dashboard-panel-head > a {
        font-size: .82rem;
    }

    .dashboard-v2 .dashboard-campaign-row {
        grid-template-columns: 5px minmax(0, 1fr);
    }
}

.csv-draft-actions,
.csv-validation-summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.csv-validation-summary {
    margin: 14px 0;
}

.csv-validation-summary span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 13px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
}

.csv-validation-summary .is-valid { color: #047857; background: #ecfdf5; }
.csv-validation-summary .is-invalid { color: #b45309; background: #fffbeb; }
.csv-validation-summary .is-duplicate { color: #be123c; background: #fff1f2; }

.csv-empty-state {
    min-height: 230px;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 7px;
    margin: 14px 0;
    padding: 28px;
    text-align: center;
    color: #64748b;
    border: 2px dashed #cbd5e1;
    border-radius: 24px;
    background: linear-gradient(135deg, #f8fafc, #eff6ff);
}

.csv-empty-state strong {
    color: #0f172a;
    font-size: clamp(18px, 2vw, 24px);
}

.builder-submit-dock {
    position: sticky;
    z-index: 25;
    bottom: 12px;
    display: grid;
    grid-template-columns: minmax(210px, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    padding: 13px;
    border: 1px solid rgba(148,163,184,.32);
    border-radius: 20px;
    background: rgba(255,255,255,.94);
    box-shadow: 0 20px 46px rgba(15,23,42,.16);
    backdrop-filter: blur(14px);
}

.builder-submit-summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px 16px;
}

.builder-submit-summary small {
    flex-basis: 100%;
    color: #047857;
}

.builder-submit-summary small.is-invalid {
    color: #b45309;
}

.builder-confirm-summary {
    display: grid;
    gap: 16px;
    text-align: left;
    color: #10223f;
}

.builder-confirm-swal {
    border: 1px solid rgba(255,255,255,.76) !important;
    border-radius: 28px !important;
    background: linear-gradient(180deg,#f8fbff 0%,#eef5fc 100%) !important;
    box-shadow: 0 34px 100px rgba(15,23,42,.28) !important;
}

.builder-confirm-swal .swal2-title {
    color: #071733;
    font-size: clamp(25px,3vw,34px);
}

.builder-confirm-swal .swal2-html-container {
    margin-inline: 24px;
}

.builder-confirm-intro {
    display: grid;
    grid-template-columns: auto minmax(0,1fr);
    gap: 14px;
    align-items: center;
    padding: 16px 18px;
    border: 1px solid #bdd8f7;
    border-radius: 19px;
    background: linear-gradient(135deg,#eaf4ff,#e9fbf7);
}

.builder-confirm-intro > span {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 15px;
    color: #fff;
    font-size: 22px;
    font-weight: 1000;
    background: linear-gradient(135deg,#2574db,#19b3a2);
    box-shadow: 0 9px 22px rgba(37,116,219,.2);
}

.builder-confirm-intro b,
.builder-confirm-intro small {
    display: block;
}

.builder-confirm-intro small {
    margin-top: 4px;
    color: #60738d;
    line-height: 1.45;
}

.builder-confirm-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.builder-confirm-facts span {
    display: grid;
    align-content: center;
    gap: 4px;
    min-height: 76px;
    padding: 12px;
    text-align: center;
    border: 1px solid #d4e1f0;
    border-radius: 16px;
    background: rgba(255,255,255,.94);
    box-shadow: 0 10px 24px rgba(15,23,42,.05);
}

.builder-confirm-facts b {
    color: #1766be;
    font-size: 16px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.builder-confirm-facts small {
    color: #64748b;
    font-size: 12px;
}

.builder-confirm-products {
    max-height: min(54vh,560px);
    overflow: auto;
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 14px;
    padding: 2px 8px 2px 2px;
    scrollbar-width: thin;
    scrollbar-color: #796bef #e8eef7;
}

.builder-confirm-product {
    display: grid;
    gap: 12px;
    align-content: start;
    padding: 16px;
    border: 1px solid #d4e1f0;
    border-radius: 20px;
    background: linear-gradient(180deg,#fff,#f8fbff);
    box-shadow: 0 12px 28px rgba(15,23,42,.06);
}

.builder-confirm-product-head {
    display: grid;
    grid-template-columns: 76px minmax(0,1fr);
    gap: 12px;
    align-items: center;
}

.builder-confirm-product-head img,
.builder-confirm-image-empty {
    width: 76px;
    height: 76px;
    border: 1px solid #cbd5e1;
    border-radius: 15px;
    background: #fff;
}

.builder-confirm-product-head img {
    object-fit: cover;
}

.builder-confirm-image-empty {
    display: grid;
    place-items: center;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 900;
    text-align: center;
}

.builder-confirm-product-head b,
.builder-confirm-product-head small {
    display: block;
    overflow-wrap: anywhere;
}

.builder-confirm-product-head b {
    margin-top: 6px;
    color: #071733;
    font-size: 15px;
    line-height: 1.35;
}

.builder-confirm-product-head small {
    margin-top: 4px;
    color: #64748b;
    font-size: 12px;
}

.builder-confirm-platform {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    color: #1766be;
    font-size: 11px;
    font-weight: 1000;
    background: #e8f2ff;
}

.builder-confirm-product > p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: #475569;
    font-size: 13px;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.builder-confirm-product dl {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 0;
}

.builder-confirm-product dl > div {
    min-width: 0;
    padding: 9px 10px;
    border-radius: 12px;
    background: #eef5fc;
}

.builder-confirm-product dt {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
}

.builder-confirm-product dd {
    margin: 3px 0 0;
    color: #10223f;
    font-size: 12px;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.builder-confirm-product blockquote {
    margin: 0;
    padding: 10px 12px;
    border-left: 4px solid #19b3a2;
    border-radius: 10px;
    background: #ecfdf8;
    color: #0f766e;
    font-size: 12px;
    line-height: 1.5;
}

@media (max-width: 760px) {
    .builder-confirm-swal .swal2-html-container {
        margin-inline: 10px;
    }

    .builder-confirm-facts,
    .builder-confirm-products {
        grid-template-columns: 1fr;
    }

    .builder-confirm-product dl {
        grid-template-columns: 1fr;
    }
}

.product-block textarea[data-field="product_detail"] {
    min-height: 104px;
    max-height: 220px;
}

.image-zone {
    min-height: 0 !important;
}

.side-status {
    position: sticky;
    top: 92px;
    align-self: start;
    max-height: calc(100vh - 112px);
    overflow: auto;
}

.page-history .workspace-head {
    align-items: stretch;
    display: grid;
    grid-template-columns: minmax(210px, .72fr) minmax(680px, 3fr);
    gap: 30px;
    padding: 30px 32px;
}

.page-history .workspace-head::after {
    display: none;
}

.history-head-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding-right: 26px;
    border-right: 1px solid rgba(124, 70, 223, .15);
}

.history-head-copy .eyebrow {
    margin: 0 0 7px;
    font-size: 12px;
}

.page-history .workspace-head .history-head-copy h1 {
    margin: 0;
    font-size: clamp(2rem, 2.7vw, 2.8rem);
    line-height: 1.08;
}

.history-head-copy > p:last-child {
    max-width: 260px;
    margin: 12px 0 0;
    color: #66758f;
    font-size: 13px;
    line-height: 1.55;
}

.history-toolbar {
    display: grid;
    grid-template-columns: minmax(250px, 2fr) minmax(150px, .85fr) minmax(160px, .95fr) minmax(160px, .95fr);
    align-content: center;
    align-items: end;
    gap: 14px 12px;
    min-width: 0;
}

.history-search,
.history-compact-filter {
    display: grid;
    gap: 7px;
    min-width: 0;
    color: #22314d;
    font-size: 13px;
    font-weight: 800;
}

.history-compact-filter input,
.history-compact-filter select,
.history-search input {
    width: 100%;
    min-height: 50px;
    border: 1px solid #dbe2ee;
    border-radius: 15px;
    padding-inline: 16px;
    color: #17233a;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 5px 14px rgba(43, 56, 85, .045);
}

.history-compact-filter input:focus,
.history-compact-filter select:focus,
.history-search input:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 4px rgba(124, 70, 223, .1);
}

.history-control-group {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    padding: 5px;
    border: 1px solid #ded7fa;
    border-radius: 16px;
    background: rgba(246, 243, 255, .86);
}

.history-control-group > small {
    flex: 0 0 auto;
    margin: 0 5px 0 7px;
    color: #68738a;
    font-size: 11px;
    font-weight: 800;
}

.history-control-group .ghost-btn {
    min-height: 40px;
    padding: 0 14px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    box-shadow: none;
}

.history-platform-group {
    grid-column: 1 / span 2;
}

.history-view-group {
    grid-column: 3;
}

.history-refresh-btn {
    grid-column: 4;
    min-height: 50px;
    border-color: #ded7fa;
    color: #7042d5;
    background: #fff;
}

@media (max-width: 1180px) {
    .page-history .workspace-head {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .history-head-copy {
        padding: 0 0 18px;
        border-right: 0;
        border-bottom: 1px solid rgba(124, 70, 223, .15);
    }

    .history-head-copy > p:last-child {
        max-width: none;
    }
}

@media (max-width: 820px) {
    .history-toolbar {
        grid-template-columns: 1fr 1fr;
    }

    .history-search {
        grid-column: 1 / -1;
    }

    .history-platform-group,
    .history-view-group,
    .history-refresh-btn {
        grid-column: auto;
    }

    .history-platform-group {
        grid-column: 1 / -1;
    }
}

@media (max-width: 560px) {
    .page-history .workspace-head {
        padding: 22px 18px;
    }

    .history-toolbar {
        grid-template-columns: 1fr;
    }

    .history-search,
    .history-platform-group,
    .history-view-group,
    .history-refresh-btn {
        grid-column: 1;
    }

    .history-control-group {
        flex-wrap: wrap;
    }
}

.campaign-row strong {
    display: grid;
    gap: 2px;
}

.campaign-row strong small {
    color: #64748b;
    font-size: 11px;
    font-weight: 500;
}

.history-detail-skeleton {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.history-layout > .history-list {
    position: sticky;
    top: 88px;
    align-self: start;
    max-height: calc(100vh - 108px);
    overflow: auto;
}

.history-detail-skeleton span,
.history-list-skeleton span {
    min-height: 260px;
    border-radius: 22px;
    background: linear-gradient(100deg, #eef2f7 20%, #fff 42%, #eef2f7 64%);
    background-size: 300% 100%;
    animation: cartclipSkeleton 1.35s linear infinite;
}

.history-list-skeleton {
    display: grid;
    gap: 10px;
}

.ui-skeleton-list {
    display: grid;
    gap: 10px;
}

.ui-skeleton-list i {
    display: block;
    min-height: 86px;
    border-radius: 18px;
    background: linear-gradient(100deg, #eef2f7 20%, #fff 42%, #eef2f7 64%);
    background-size: 300% 100%;
    animation: cartclipSkeleton 1.35s linear infinite;
}

.ui-empty-state {
    min-height: 280px;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 7px;
    padding: 28px;
    text-align: center;
    color: #64748b;
}

.ui-empty-state > span {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    color: #2563eb;
    border-radius: 18px;
    background: #eff6ff;
    font-size: 22px;
}

.history-list-skeleton span {
    min-height: 84px;
}

@keyframes cartclipSkeleton {
    to { background-position-x: -150%; }
}

.current-order-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.current-order-head > div {
    display: grid;
    gap: 6px;
}

.pending-order-warning {
    padding: 12px 14px;
    color: #92400e;
    border: 1px solid #fde68a;
    border-radius: 14px;
    background: #fffbeb;
}

[data-topup-amount].active {
    color: #fff !important;
    border-color: #2563eb !important;
    background: linear-gradient(135deg, #2563eb, #14b8a6) !important;
    box-shadow: 0 10px 24px rgba(37,99,235,.22);
}

.admin-section-tabs {
    position: sticky;
    z-index: 35;
    top: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 18px;
    padding: 8px;
    border: 1px solid #dbe4f0;
    border-radius: 18px;
    background: rgba(255,255,255,.94);
    box-shadow: 0 10px 30px rgba(15,23,42,.08);
    backdrop-filter: blur(12px);
}

.admin-section-tabs button {
    border: 0;
    border-radius: 13px;
    color: #475569;
    background: transparent;
    font-weight: 700;
}

.admin-section-tabs button.active {
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #14b8a6);
}

.admin-showcase-tools {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin: 12px 0 18px;
}

.admin-showcase-tools label {
    width: min(100%, 520px);
}

.admin-showcase-card[hidden] {
    display: none !important;
}

.admin-showcase-pager {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
}

.admin-table-tools {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto auto;
    align-items: end;
    gap: 12px;
    margin: 12px 0 16px;
}

.admin-table-tools nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-admin tbody tr[hidden] {
    display: none !important;
}

.table-section[hidden],
.admin-grid[hidden],
[data-admin-group][hidden] {
    display: none !important;
}

@media (max-width: 820px) {
    .builder-submit-dock {
        bottom: 76px;
        grid-template-columns: 1fr 1fr;
    }
    .builder-submit-summary {
        grid-column: 1 / -1;
    }
    .builder-submit-dock .primary-btn,
    .builder-submit-dock .ghost-btn {
        width: 100%;
    }
    .history-detail-skeleton {
        grid-template-columns: 1fr;
    }
    .history-layout > .history-list {
        position: static;
        max-height: none;
    }
    .history-detail-skeleton span:nth-child(n+2) {
        display: none;
    }
    .side-status {
        position: static;
        max-height: none;
    }
    .page-admin .rail {
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    }
    .page-admin .rail a {
        min-width: 0;
        padding-inline: 3px;
        font-size: 10px;
    }
    .admin-section-tabs {
        overflow-x: auto;
        grid-template-columns: repeat(4, minmax(112px, 1fr));
    }
    .admin-showcase-tools {
        align-items: stretch;
        flex-direction: column;
    }
    .admin-table-tools {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
}

@media (max-width: 720px) {
    .page-admin .table-wrap {
        overflow: visible;
    }
    .page-admin table,
    .page-admin tbody,
    .page-admin tr,
    .page-admin td {
        display: block;
        width: 100%;
        min-width: 0;
    }
    .page-admin thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }
    .page-admin tbody {
        display: grid;
        gap: 12px;
    }
    .page-admin tr {
        padding: 12px;
        border: 1px solid #dbe4f0;
        border-radius: 16px;
        background: #fff;
        box-shadow: 0 8px 22px rgba(15,23,42,.06);
    }
    .page-admin td {
        display: grid;
        grid-template-columns: minmax(90px, .7fr) 1fr;
        gap: 12px;
        padding: 8px 4px;
        border: 0;
        border-bottom: 1px solid #eef2f7;
        text-align: right;
        overflow-wrap: anywhere;
    }
    .page-admin td:last-child { border-bottom: 0; }
    .page-admin td::before {
        content: attr(data-label);
        color: #64748b;
        text-align: left;
        font-size: 12px;
        font-weight: 600;
    }
}

@media (max-width: 560px) {
    .builder-submit-dock {
        grid-template-columns: 1fr;
        border-radius: 16px;
    }
    .builder-submit-summary,
    .builder-submit-dock .primary-btn,
    .builder-submit-dock .ghost-btn {
        grid-column: 1;
    }
    .csv-submit-bar {
        align-items: stretch;
        flex-direction: column;
    }
    .csv-submit-bar > * {
        width: 100%;
    }
    .current-order-head {
        align-items: stretch;
        flex-direction: column;
    }
}
@media (max-width: 760px) {
    .csv-import-hub {
        padding: 17px 14px;
        border-radius: 21px;
    }
    .csv-import-heading {
        align-items: flex-start;
    }
    .csv-import-heading-icon {
        flex-basis: 50px;
        width: 50px;
        height: 50px;
        border-radius: 16px;
        font-size: .72rem;
    }
    .csv-platform-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .csv-platform-actions {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 1180px) {
    .csv-page-layout {
        grid-template-columns: minmax(0, 1fr);
    }
    .csv-guide-panel {
        position: static;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .csv-guide-panel > .eyebrow,
    .csv-guide-panel > h2,
    .csv-guide-note {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    .page-csv .app-page {
        width: min(100% - 24px, 1480px);
    }
    .csv-page-hero {
        grid-template-columns: minmax(0, 1fr);
        min-height: auto;
        border-radius: 28px;
    }
    .csv-page-hero-art {
        display: none;
    }
    .csv-page-hero h1 {
        font-size: clamp(2rem, 8vw, 3.6rem);
    }
    .csv-campaign-bar {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 720px) {
    .page-csv .app-page {
        width: calc(100% - 16px);
    }
    .csv-page {
        gap: 14px;
    }
    .csv-page-hero {
        padding: 24px 18px;
        border-radius: 24px;
    }
    .csv-page-hero h1 {
        font-size: 2.15rem;
        line-height: 1.04;
    }
    .csv-hero-badges {
        display: grid;
    }
    .csv-builder {
        padding: 12px;
        border-radius: 22px;
    }
    .csv-builder .csv-import-hub {
        padding: 17px 13px;
    }
    .csv-builder .csv-platform-card {
        min-height: 0;
        padding: 17px;
    }
    .csv-campaign-bar {
        gap: 12px;
        padding: 15px;
    }
    .csv-imported-section {
        padding: 14px;
    }
    .csv-imported-head {
        align-items: stretch;
        flex-direction: column;
    }
    .csv-submit-bar {
        position: static;
        align-items: stretch;
        flex-direction: column;
    }
    .csv-submit-bar > div {
        margin: 0 0 4px;
    }
    .csv-submit-bar .primary-btn,
    .csv-submit-bar .ghost-btn {
        width: 100%;
        text-align: center;
    }
    .csv-guide-panel {
        grid-template-columns: minmax(0, 1fr);
        padding: 18px;
        border-radius: 22px;
    }
    .csv-guide-panel > .eyebrow,
    .csv-guide-panel > h2,
    .csv-guide-note {
        grid-column: auto;
    }
}

/* Compact create-confirmation modal: keep the action buttons in the first
   viewport while product details remain independently scrollable. */
.builder-confirm-swal {
    width: min(92vw, 960px) !important;
    max-height: calc(100dvh - 24px) !important;
    padding: 16px 18px 14px !important;
    overflow: hidden !important;
}

.builder-confirm-swal .swal2-title {
    margin: 0 0 10px !important;
    padding: 0 !important;
    font-size: clamp(24px, 2.4vw, 30px) !important;
    line-height: 1.2 !important;
}

.builder-confirm-swal .swal2-html-container {
    min-height: 0 !important;
    max-height: calc(100dvh - 174px) !important;
    margin: 0 !important;
    padding: 0 2px !important;
    overflow: hidden !important;
}

.builder-confirm-swal .swal2-actions {
    flex: 0 0 auto;
    margin: 12px 0 0 !important;
    padding: 0 !important;
}

.builder-confirm-summary {
    min-height: 0;
    max-height: calc(100dvh - 174px);
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 10px;
    overflow: hidden;
}

.builder-confirm-intro {
    gap: 11px;
    padding: 10px 13px;
    border-radius: 15px;
}

.builder-confirm-intro > span {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 19px;
}

.builder-confirm-intro b {
    font-size: 15px;
    line-height: 1.3;
}

.builder-confirm-intro small {
    margin-top: 2px;
    font-size: 12px;
    line-height: 1.3;
}

.builder-confirm-facts {
    gap: 8px;
}

.builder-confirm-facts span {
    min-height: 64px;
    max-height: 72px;
    gap: 2px;
    padding: 8px 10px;
    overflow: hidden;
    border-radius: 13px;
}

.builder-confirm-facts b {
    display: -webkit-box;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.builder-confirm-products {
    min-height: 0;
    max-height: min(30dvh, 270px);
    gap: 10px;
    padding: 0 6px 0 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.builder-confirm-product {
    gap: 8px;
    padding: 12px;
    border-radius: 16px;
}

.builder-confirm-product-head {
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 10px;
}

.builder-confirm-product-head img,
.builder-confirm-image-empty {
    width: 62px;
    height: 62px;
    border-radius: 12px;
}

.builder-confirm-product-head b {
    margin-top: 4px;
    font-size: 14px;
    line-height: 1.3;
}

.builder-confirm-product-head small,
.builder-confirm-product > p,
.builder-confirm-product dd {
    font-size: 11px;
}

.builder-confirm-product > p {
    line-height: 1.4;
    -webkit-line-clamp: 2;
}

.builder-confirm-product dl {
    gap: 6px;
}

.builder-confirm-product dl > div {
    padding: 7px 8px;
}

@media (max-width: 760px) {
    .builder-confirm-swal {
        width: min(96vw, 620px) !important;
        max-height: calc(100dvh - 12px) !important;
        padding: 12px 10px 10px !important;
    }

    .builder-confirm-swal .swal2-title {
        margin-bottom: 8px !important;
        font-size: 22px !important;
    }

    .builder-confirm-swal .swal2-html-container,
    .builder-confirm-summary {
        max-height: calc(100dvh - 154px) !important;
    }

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

    .builder-confirm-products {
        grid-template-columns: 1fr;
        max-height: min(25dvh, 210px);
    }
}

/* Dashboard package upgrade and referral credit */
.dashboard-commerce-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px;margin:20px 0}.dashboard-package-card,.dashboard-referral-card{position:relative;display:grid;grid-template-columns:56px minmax(0,1fr);gap:16px;padding:24px;border:1px solid #dbe6f3;border-radius:24px;background:#fff;box-shadow:0 14px 38px rgba(30,61,106,.08);overflow:hidden}.dashboard-package-card:before,.dashboard-referral-card:before{content:"";position:absolute;inset:0 0 auto;height:5px;background:linear-gradient(90deg,#2d6cdf,#71a4ff)}.dashboard-referral-card:before{background:linear-gradient(90deg,#08a886,#5bd8bd)}.dashboard-commerce-icon{display:grid;place-items:center;width:56px;height:56px;border-radius:18px;font-size:25px;font-weight:900}.dashboard-commerce-icon.is-package{color:#2166d1;background:#e8f1ff}.dashboard-commerce-icon.is-referral{color:#07886e;background:#dcf8f0}.dashboard-commerce-copy{min-width:0}.dashboard-commerce-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.dashboard-commerce-heading .eyebrow{margin:0 0 3px;color:#6a7a91;font-size:12px;font-weight:800;letter-spacing:.08em}.dashboard-commerce-heading h2{margin:0;color:#12233e;font-size:25px;line-height:1.2}.dashboard-purchase-state,.dashboard-referral-rate{flex:0 0 auto;padding:7px 11px;border-radius:999px;font-size:12px;font-weight:900}.dashboard-purchase-state.is-paid{color:#087a5e;background:#dff8ee}.dashboard-purchase-state.is-account{color:#49627e;background:#edf2f8}.dashboard-referral-rate{color:#087a5e;background:#dff8ee;font-size:18px}.dashboard-package-facts,.dashboard-referral-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:18px 0}.dashboard-package-facts span,.dashboard-referral-stats span{display:grid;gap:3px;padding:12px;border-radius:14px;background:#f5f8fc}.dashboard-package-facts small,.dashboard-referral-stats small{color:#718198;font-size:11px}.dashboard-package-facts b,.dashboard-referral-stats b{color:#162944;font-size:15px}.dashboard-commerce-note{margin:12px 0;color:#60728b;line-height:1.6}.dashboard-commerce-note.is-complete{padding:12px 14px;border-radius:13px;color:#087a5e;background:#e6f8f2;font-weight:800}.dashboard-upgrade-options{display:grid;gap:9px}.dashboard-upgrade-options button{display:flex;align-items:center;justify-content:space-between;gap:14px;width:100%;padding:13px 14px;border:1px solid #ccdbee;border-radius:15px;background:#f8fbff;color:#173152;text-align:left;font:inherit;cursor:pointer;transition:.18s ease}.dashboard-upgrade-options button:hover{border-color:#5590e9;background:#eef5ff;transform:translateY(-1px)}.dashboard-upgrade-options button span{display:grid;gap:2px}.dashboard-upgrade-options button b{font-size:14px}.dashboard-upgrade-options button small{color:#6f7f95}.dashboard-upgrade-options button strong{white-space:nowrap;color:#1e65d2}.dashboard-referral-link{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:8px}.dashboard-referral-link input{min-width:0;padding:12px 13px;border:1px solid #cddceb;border-radius:12px;background:#f7fafc;color:#172b47;font:600 13px/1.2 ui-monospace,SFMono-Regular,Consolas,monospace}.dashboard-referral-link button{padding:11px 13px;border:0;border-radius:12px;background:#1f67d4;color:#fff;font:800 13px/1.2 inherit;cursor:pointer}.dashboard-referral-link button:last-child{background:#0b9c7e}.dashboard-referral-rule{display:block;color:#77869a;line-height:1.5}.dashboard-upgrade-modal[hidden]{display:none}.dashboard-upgrade-modal{position:fixed;inset:0;z-index:100020;display:grid;place-items:center;padding:18px}.dashboard-upgrade-backdrop{position:absolute;inset:0;background:rgba(7,18,38,.72);backdrop-filter:blur(7px)}.dashboard-upgrade-dialog{position:relative;width:min(540px,100%);max-height:calc(100vh - 36px);overflow:auto;padding:30px;border-radius:26px;background:#fff;color:#142846;box-shadow:0 28px 90px rgba(4,18,47,.4)}.dashboard-upgrade-dialog h2{margin:3px 42px 18px 0;font-size:29px}.dashboard-upgrade-dialog>div>p:not(.eyebrow){color:#60728b;line-height:1.6}.dashboard-upgrade-close{position:absolute;right:14px;top:12px;width:42px;height:42px;border:0;border-radius:50%;background:#edf3fb;color:#18304f;font-size:29px;cursor:pointer}.dashboard-upgrade-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:17px 0}.dashboard-upgrade-summary>div{display:grid;gap:3px;padding:14px;border-radius:14px;background:#f2f6fc}.dashboard-upgrade-summary small,.dashboard-upgrade-summary span{color:#6d7e95;font-size:12px}.dashboard-upgrade-summary b,.dashboard-upgrade-summary strong{color:#175fc9;font-size:17px}.dashboard-upgrade-error{min-height:22px!important;color:#c62d4b!important;font-weight:800}.dashboard-upgrade-submit,.dashboard-upgrade-check{width:100%;justify-content:center;border:0;cursor:pointer}.dashboard-upgrade-submit:disabled{opacity:.62;cursor:wait}.dashboard-upgrade-dialog [data-upgrade-step=payment]{text-align:center}.dashboard-upgrade-dialog [data-upgrade-step=payment] .dashboard-upgrade-summary{display:block}.dashboard-upgrade-dialog [data-dashboard-upgrade-qr]{display:block;width:min(300px,82vw);aspect-ratio:1;object-fit:contain;margin:12px auto;border:8px solid #fff;border-radius:17px;box-shadow:0 8px 28px rgba(16,51,102,.18)}.dashboard-upgrade-countdown{color:#df7b18!important;font-weight:900}.dashboard-upgrade-status{min-height:48px}.dashboard-upgrade-check{padding:13px;border-radius:13px;background:#142b4b;color:#fff;font:800 15px/1.2 inherit}.dashboard-upgrade-success{text-align:center;padding:14px 0}.dashboard-upgrade-success>div:first-child{display:grid;place-items:center;width:74px;height:74px;margin:0 auto 14px;border-radius:50%;background:#ddf8ed;color:#079368;font-size:40px;font-weight:900}.dashboard-upgrade-success .primary-btn{border:0;cursor:pointer}.dashboard-upgrade-modal [hidden]{display:none!important}
@media(max-width:980px){.dashboard-commerce-grid{grid-template-columns:1fr}.dashboard-package-card,.dashboard-referral-card{grid-template-columns:48px minmax(0,1fr)}.dashboard-commerce-icon{width:48px;height:48px;border-radius:15px}}
@media(max-width:640px){.dashboard-package-card,.dashboard-referral-card{grid-template-columns:1fr;padding:19px;border-radius:20px}.dashboard-commerce-heading{align-items:center}.dashboard-commerce-heading h2{font-size:21px}.dashboard-package-facts,.dashboard-referral-stats{grid-template-columns:1fr 1fr}.dashboard-package-facts span:last-child,.dashboard-referral-stats span:last-child{grid-column:1/-1}.dashboard-referral-link{grid-template-columns:1fr 1fr}.dashboard-referral-link input{grid-column:1/-1}.dashboard-upgrade-options button{align-items:flex-start;flex-direction:column;gap:6px}.dashboard-upgrade-dialog{padding:26px 17px 20px;border-radius:21px}.dashboard-upgrade-dialog h2{font-size:24px}.dashboard-upgrade-summary{grid-template-columns:1fr}.dashboard-upgrade-summary>div{padding:11px 13px}}
