:root {
    --portal-ink: #211731;
    --portal-muted: #746d7f;
    --portal-purple: #6c36cf;
    --portal-purple-dark: #5124a2;
    --portal-purple-soft: #f1eaff;
    --portal-gold: #f8bd32;
    --portal-red: #ef321d;
    --portal-green: #147a46;
    --portal-green-soft: #e6f7ee;
    --portal-orange: #a95408;
    --portal-orange-soft: #fff1df;
    --portal-border: #e8e1ef;
    --portal-surface: #ffffff;
    --portal-background: #f7f4fb;
    --portal-shadow: 0 18px 50px rgba(49, 25, 78, .10);
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: light;
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: var(--portal-ink);
    background: var(--portal-background);
    font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

a {
    color: inherit;
}

.skip-link {
    position: fixed;
    z-index: 100;
    top: 8px;
    left: 8px;
    padding: 10px 14px;
    border-radius: 9px;
    color: #fff;
    background: var(--portal-purple-dark);
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: translateY(0);
}

.portal-shell {
    width: min(1180px, calc(100% - 40px));
    margin-inline: auto;
}

.portal-header {
    position: sticky;
    z-index: 20;
    top: 0;
    border-bottom: 1px solid rgba(69, 44, 95, .08);
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 8px 30px rgba(41, 22, 63, .04);
    backdrop-filter: blur(14px);
}

.portal-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 84px;
    gap: 24px;
}

.portal-brand {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 12px;
    color: var(--portal-ink);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -.02em;
    text-decoration: none;
}

.portal-brand img {
    display: block;
    width: 58px;
    height: 58px;
    object-fit: contain;
}

.portal-brand strong {
    color: var(--portal-red);
    font-weight: 800;
}

.portal-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    font-size: 14px;
    font-weight: 600;
}

.portal-nav a {
    text-decoration: none;
}

.portal-nav a:hover,
.portal-nav a:focus-visible,
.portal-text-link:hover,
.portal-text-link:focus-visible {
    color: var(--portal-purple);
}

.portal-nav .portal-signout {
    padding: 10px 16px;
    border: 1px solid var(--portal-border);
    border-radius: 999px;
    background: #fff;
}

.portal-language-link {
    display: inline-flex;
    min-width: 38px;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    border: 1px solid var(--portal-border);
    border-radius: 999px;
    background: #fff;
    color: var(--portal-purple);
    font-weight: 800 !important;
    letter-spacing: .06em;
}

.portal-main {
    padding-block: 52px 72px;
}

.portal-welcome {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 40px;
    overflow: hidden;
    padding: 44px;
    border-radius: 28px;
    color: #fff;
    background: linear-gradient(130deg, #3d176e 0%, #6d36cf 58%, #8b58e6 100%);
    box-shadow: var(--portal-shadow);
}

.portal-welcome::before,
.portal-welcome::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 50%;
}

.portal-welcome::before {
    width: 330px;
    height: 330px;
    right: -150px;
    top: -220px;
}

.portal-welcome::after {
    width: 150px;
    height: 150px;
    right: 24%;
    bottom: -120px;
}

.portal-welcome > * {
    position: relative;
    z-index: 1;
}

.portal-eyebrow {
    display: block;
    margin-bottom: 8px;
    color: var(--portal-purple);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.portal-eyebrow-light,
.portal-welcome .portal-eyebrow {
    color: #f9ca53;
}

.portal-welcome h1 {
    max-width: 700px;
    margin: 0;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.1;
    letter-spacing: -.04em;
}

.portal-welcome p {
    max-width: 700px;
    margin: 16px 0 0;
    color: rgba(255, 255, 255, .82);
    font-size: 17px;
}

.portal-account-card {
    display: flex;
    flex-direction: column;
    max-width: 285px;
    min-width: 220px;
    padding: 19px 22px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 18px;
    background: rgba(255, 255, 255, .11);
}

.portal-account-card span {
    color: rgba(255, 255, 255, .7);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.portal-account-card strong {
    overflow: hidden;
    margin-top: 4px;
    font-size: 14px;
    text-overflow: ellipsis;
}

.portal-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 20px;
}

.portal-stats div {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    border: 1px solid var(--portal-border);
    border-radius: 18px;
    background: var(--portal-surface);
}

.portal-stats strong {
    color: var(--portal-purple);
    font-size: 28px;
    line-height: 1;
}

.portal-stats span {
    color: var(--portal-muted);
    font-size: 13px;
    font-weight: 600;
}

.portal-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin: 54px 0 20px;
}

.portal-section-heading h2 {
    margin: 0;
    font-size: 30px;
    line-height: 1.2;
    letter-spacing: -.03em;
}

.portal-text-link {
    color: var(--portal-purple);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.portal-orders {
    display: grid;
    gap: 22px;
}

.portal-order-card,
.portal-empty {
    overflow: hidden;
    border: 1px solid var(--portal-border);
    border-radius: 24px;
    background: var(--portal-surface);
    box-shadow: 0 10px 34px rgba(49, 25, 78, .06);
}

.portal-order-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
    padding: 28px 30px 22px;
    border-bottom: 1px solid var(--portal-border);
}

.portal-order-head h3 {
    margin: 11px 0 3px;
    font-size: 22px;
    line-height: 1.25;
    letter-spacing: -.025em;
}

.portal-order-head > div {
    min-width: 0;
}

.portal-order-head p {
    margin: 0;
    color: var(--portal-muted);
    font-size: 13px;
}

.portal-price {
    flex: 0 0 auto;
    color: var(--portal-ink);
    font-size: 18px;
    font-weight: 700;
}

.portal-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.portal-status i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.portal-status-ready {
    color: var(--portal-green);
    background: var(--portal-green-soft);
}

.portal-status-progress {
    color: var(--portal-orange);
    background: var(--portal-orange-soft);
}

.portal-status-attention {
    color: #a92621;
    background: #ffe8e6;
}

.portal-order-body {
    display: grid;
    grid-template-columns: minmax(280px, .86fr) minmax(320px, 1.14fr);
}

.portal-preview {
    display: grid;
    min-height: 330px;
    background: #211731;
    place-items: center;
}

.portal-preview video {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 620px;
    object-fit: contain;
    background: #151019;
}

.portal-progress-art {
    position: relative;
    display: grid;
    width: 150px;
    height: 150px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .12), transparent 68%);
    place-items: center;
}

.portal-progress-art img {
    display: block;
    width: 92px;
    height: 92px;
    object-fit: contain;
}

.portal-spark {
    position: absolute;
    color: var(--portal-gold);
}

.portal-spark-one {
    top: 8px;
    right: 15px;
    font-size: 25px;
}

.portal-spark-two {
    bottom: 15px;
    left: 7px;
    font-size: 15px;
}

.portal-order-info {
    display: flex;
    flex-direction: column;
    padding: 30px;
}

.portal-order-message {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 15px 17px;
    border-radius: 14px;
    color: var(--portal-ink);
    background: var(--portal-purple-soft);
}

.portal-order-message strong {
    font-size: 14px;
}

.portal-order-message span {
    color: var(--portal-muted);
    font-size: 13px;
}

.portal-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 26px;
    margin: 24px 0;
}

.portal-details div {
    min-width: 0;
}

.portal-details dt {
    margin-bottom: 4px;
    color: var(--portal-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.portal-details dd {
    overflow-wrap: anywhere;
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.portal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
}

.portal-button {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 12px 20px;
    border: 1px solid transparent;
    border-radius: 13px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.portal-button:hover {
    transform: translateY(-1px);
}

.portal-button:focus-visible,
.portal-field input:focus,
.portal-password-field button:focus-visible {
    outline: 3px solid rgba(108, 54, 207, .2);
    outline-offset: 2px;
}

.portal-button svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.portal-button-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--portal-purple), var(--portal-purple-dark));
    box-shadow: 0 8px 20px rgba(108, 54, 207, .2);
}

.portal-button-secondary {
    border-color: var(--portal-border);
    color: var(--portal-purple-dark);
    background: #fff;
}

.portal-empty {
    padding: 56px 24px;
    text-align: center;
}

.portal-empty-icon {
    display: grid;
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    border-radius: 18px;
    color: var(--portal-purple);
    background: var(--portal-purple-soft);
    font-size: 28px;
    place-items: center;
}

.portal-empty h2 {
    margin: 0;
    font-size: 24px;
}

.portal-empty p {
    max-width: 580px;
    margin: 10px auto 24px;
    color: var(--portal-muted);
}

.portal-help-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 22px;
    padding: 24px 28px;
    border-radius: 20px;
    color: #fff;
    background: var(--portal-ink);
}

.portal-help-strip div {
    display: flex;
    flex-direction: column;
}

.portal-help-strip span {
    color: rgba(255, 255, 255, .68);
    font-size: 13px;
}

.portal-help-strip a {
    flex: 0 0 auto;
    color: #f9ca53;
    font-weight: 700;
}

.portal-auth-page {
    background: #fff;
}

.portal-auth-shell {
    display: grid;
    grid-template-columns: minmax(360px, .9fr) minmax(480px, 1.1fr);
    min-height: 100vh;
}

.portal-auth-intro {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: clamp(36px, 5vw, 70px);
    color: #fff;
    background: linear-gradient(145deg, #35145f 0%, #6731c5 55%, #8450dc 100%);
}

.portal-auth-intro::before,
.portal-auth-intro::after,
.portal-auth-orbit {
    content: "";
    position: absolute;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 50%;
}

.portal-auth-intro::before {
    width: 430px;
    height: 430px;
    right: -230px;
    top: -170px;
}

.portal-auth-intro::after {
    width: 190px;
    height: 190px;
    right: 40px;
    bottom: -110px;
}

.portal-auth-orbit {
    width: 76px;
    height: 76px;
    right: 18%;
    top: 48%;
    border-color: rgba(248, 189, 50, .42);
}

.portal-brand-light {
    position: relative;
    z-index: 1;
    color: #fff;
}

.portal-brand-light strong {
    color: #ff5a42;
}

.portal-auth-copy {
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin-block: auto;
    padding-block: 70px;
}

.portal-auth-copy h1 {
    margin: 0;
    font-size: clamp(40px, 5vw, 66px);
    line-height: 1.03;
    letter-spacing: -.055em;
}

.portal-auth-copy > p {
    max-width: 560px;
    margin: 22px 0 30px;
    color: rgba(255, 255, 255, .78);
    font-size: 17px;
}

.portal-auth-copy ul {
    display: grid;
    gap: 13px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 14px;
    font-weight: 600;
}

.portal-auth-copy li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.portal-auth-copy li span {
    display: grid;
    width: 23px;
    height: 23px;
    border-radius: 50%;
    color: var(--portal-purple-dark);
    background: var(--portal-gold);
    font-size: 13px;
    place-items: center;
}

.portal-auth-panel {
    display: grid;
    padding: 34px;
    background: linear-gradient(145deg, #fff, #f9f6fc);
    place-items: center;
}

.portal-auth-card {
    width: min(100%, 480px);
    padding: 44px;
    border: 1px solid var(--portal-border);
    border-radius: 26px;
    background: rgba(255, 255, 255, .96);
    box-shadow: var(--portal-shadow);
}

.portal-mobile-brand {
    display: none;
}

.portal-auth-card h2 {
    margin: 0;
    font-size: 34px;
    line-height: 1.15;
    letter-spacing: -.04em;
}

.portal-auth-lead {
    margin: 11px 0 28px;
    color: var(--portal-muted);
    font-size: 14px;
}

.portal-field {
    display: block;
    margin-bottom: 17px;
}

.portal-field > span:first-child {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 700;
}

.portal-field-heading {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
}

.portal-field-heading a {
    margin-left: auto;
    color: var(--portal-purple);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.portal-field input {
    width: 100%;
    min-height: 54px;
    padding: 13px 15px;
    border: 1px solid #dcd4e5;
    border-radius: 12px;
    color: var(--portal-ink);
    background: #fff;
    font-size: 16px;
    outline: none;
}

.portal-field input[readonly] {
    color: #5b5265;
    background: #f7f4fa;
}

.portal-field input:focus {
    border-color: var(--portal-purple);
}

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

.portal-password-field input {
    padding-right: 68px;
}

.portal-password-field button {
    position: absolute;
    top: 50%;
    right: 9px;
    padding: 8px 9px;
    border: 0;
    border-radius: 8px;
    color: var(--portal-purple);
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    transform: translateY(-50%);
}

.portal-submit {
    width: 100%;
    min-height: 55px;
    margin-top: 4px;
}

.portal-submit[disabled] {
    cursor: wait;
    opacity: .7;
}

.portal-form-message,
.portal-notice {
    display: none;
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 11px;
    font-size: 13px;
}

.portal-form-message.is-visible,
.portal-notice {
    display: block;
}

.portal-form-message.is-error {
    color: #8c241e;
    background: #ffebe8;
}

.portal-form-message.is-success {
    color: var(--portal-green);
    background: var(--portal-green-soft);
}

.portal-notice {
    color: #71500f;
    background: #fff5d9;
}

.portal-auth-switch,
.portal-auth-help {
    margin: 20px 0 0;
    color: var(--portal-muted);
    font-size: 13px;
    text-align: center;
}

.portal-auth-switch a,
.portal-auth-help a {
    color: var(--portal-purple);
    font-weight: 700;
}

.portal-auth-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 34px;
    padding-top: 20px;
    border-top: 1px solid var(--portal-border);
    color: #978f9e;
    font-size: 11px;
}

.portal-auth-footer a {
    color: var(--portal-muted);
    font-weight: 600;
    text-decoration: none;
}

@media (max-width: 900px) {
    .portal-auth-shell {
        grid-template-columns: 1fr;
    }

    .portal-auth-intro {
        display: none;
    }

    .portal-auth-panel {
        min-height: 100vh;
        padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
    }

    .portal-mobile-brand {
        display: block;
        margin-bottom: 38px;
    }

    .portal-welcome {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .portal-account-card {
        max-width: 100%;
    }

    .portal-order-body {
        grid-template-columns: minmax(240px, .8fr) minmax(300px, 1.2fr);
    }
}

@media (max-width: 700px) {
    .portal-shell {
        width: min(100% - 24px, 1180px);
    }

    .portal-header-inner {
        min-height: 72px;
        gap: 12px;
    }

    .portal-brand {
        gap: 8px;
        font-size: 15px;
    }

    .portal-brand img {
        width: 48px;
        height: 48px;
    }

    .portal-nav {
        gap: 8px;
    }

    .portal-nav > a:not(.portal-signout) {
        display: none;
    }

    .portal-nav > .portal-language-link {
        display: inline-flex;
        min-width: 34px;
        padding: 7px 8px;
        font-size: 11px;
    }

    .portal-admin-page .portal-brand span {
        display: none;
    }

    .portal-admin-page .portal-nav > .portal-admin-link {
        display: inline-flex;
        font-size: 11px;
    }

    .portal-nav .portal-signout {
        padding: 8px 13px;
        font-size: 12px;
    }

    .portal-main {
        padding-block: 20px 44px;
    }

    .portal-welcome {
        gap: 20px;
        padding: 28px 22px;
        border-radius: 21px;
    }

    .portal-welcome h1 {
        font-size: 30px;
    }

    .portal-welcome p {
        font-size: 14px;
    }

    .portal-account-card {
        min-width: 0;
        padding: 14px 16px;
    }

    .portal-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
        margin-top: 10px;
    }

    .portal-stats div {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        min-width: 0;
        padding: 13px 11px;
        border-radius: 14px;
    }

    .portal-stats strong {
        font-size: 24px;
    }

    .portal-stats span {
        font-size: 10px;
        line-height: 1.3;
    }

    .portal-section-heading {
        align-items: flex-start;
        margin: 38px 0 15px;
    }

    .portal-section-heading h2 {
        font-size: 25px;
    }

    .portal-section-heading .portal-text-link {
        max-width: 112px;
        font-size: 11px;
        text-align: right;
    }

    .portal-order-card {
        border-radius: 20px;
    }

    .portal-order-head {
        padding: 21px 19px 17px;
    }

    .portal-order-head h3 {
        font-size: 18px;
    }

    .portal-price {
        font-size: 15px;
    }

    .portal-order-body {
        grid-template-columns: 1fr;
    }

    .portal-preview {
        min-height: 245px;
    }

    .portal-preview video {
        max-height: 72vh;
    }

    .portal-order-info {
        padding: 20px 19px 22px;
    }

    .portal-details {
        grid-template-columns: 1fr;
        gap: 14px;
        margin: 20px 0;
    }

    .portal-actions,
    .portal-actions .portal-button {
        width: 100%;
    }

    .portal-help-strip {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
        padding: 21px;
    }

    .portal-auth-panel {
        align-items: start;
        padding-inline: 12px;
    }

    .portal-auth-card {
        padding: 25px 20px;
        border-radius: 21px;
    }

    .portal-mobile-brand {
        margin-bottom: 30px;
    }

    .portal-auth-card h2 {
        font-size: 29px;
    }

    .portal-auth-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }
}

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

/* Client conversations, uploaded order images and administrator workspace. */
textarea,
select {
    font: inherit;
}

.portal-detail-wide {
    grid-column: 1 / -1;
}

.portal-order-uploads {
    margin: 0 0 22px;
}

.portal-conversation-title,
.portal-client-message-form > label,
.portal-admin-reply > label,
.portal-admin-file > span {
    display: block;
    margin-bottom: 9px;
    font-size: 13px;
    font-weight: 700;
}

.portal-order-upload-grid,
.portal-admin-images-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.portal-order-uploads-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 9px;
}

.portal-order-uploads-heading strong {
    color: var(--portal-ink);
    font-size: 13px;
}

.portal-order-uploads-heading span {
    color: var(--portal-muted);
    font-size: 10px;
    font-weight: 700;
}

.portal-order-uploads a {
    position: relative;
    display: block;
    width: 92px;
    height: 92px;
    overflow: hidden;
    border: 1px solid var(--portal-border);
    border-radius: 12px;
}

.portal-order-uploads a span {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    overflow: hidden;
    padding: 5px 6px;
    color: #fff;
    background: linear-gradient(transparent, rgba(24, 14, 35, .82));
    font-size: 8px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-order-uploads img,
.portal-admin-images img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portal-conversation {
    display: grid;
    gap: 9px;
    margin: 0 0 22px;
}

.portal-message {
    max-width: 88%;
    padding: 12px 14px;
    border-radius: 15px;
    background: #f3eff7;
}

.portal-message-admin {
    border-bottom-left-radius: 4px;
    background: var(--portal-purple-soft);
}

.portal-message-client {
    justify-self: end;
    border-bottom-right-radius: 4px;
    background: #eef5ff;
}

.portal-message > span {
    display: block;
    margin-bottom: 4px;
    color: var(--portal-muted);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.portal-message p {
    margin: 0;
    color: var(--portal-ink);
    font-size: 13px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.portal-message a {
    color: var(--portal-purple);
    font-weight: 700;
}

.portal-client-message-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    margin-top: 24px;
    padding-top: 23px;
    border-top: 1px solid var(--portal-border);
}

.portal-client-message-form > label,
.portal-client-message-form .portal-action-message {
    grid-column: 1 / -1;
}

.portal-client-message-form textarea,
.portal-admin-reply textarea,
.portal-admin-search input,
.portal-admin-client-view input,
.portal-admin-review-panel input,
.portal-admin-review-panel select,
.portal-admin-review-panel textarea,
.portal-tip-amount input {
    width: 100%;
    border: 1px solid #dcd4e5;
    border-radius: 12px;
    color: var(--portal-ink);
    background: #fff;
    outline: none;
}

.portal-client-message-form textarea,
.portal-admin-reply textarea,
.portal-admin-review-panel textarea {
    min-height: 92px;
    padding: 12px 14px;
    resize: vertical;
}

.portal-client-message-form textarea:focus,
.portal-admin-reply textarea:focus,
.portal-admin-search input:focus,
.portal-admin-client-view input:focus,
.portal-admin-review-panel input:focus,
.portal-admin-review-panel select:focus,
.portal-admin-review-panel textarea:focus,
.portal-tip-amount input:focus {
    border-color: var(--portal-purple);
    box-shadow: 0 0 0 3px rgba(108, 54, 207, .12);
}

.portal-client-message-form textarea:disabled,
.portal-client-message-form button:disabled {
    cursor: not-allowed;
    opacity: .6;
}

.portal-action-message {
    display: none;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--portal-muted);
    background: #f4f1f6;
    font-size: 12px;
    font-weight: 600;
}

.portal-action-message.is-visible {
    display: block;
}

.portal-action-message.is-success {
    color: var(--portal-green);
    background: var(--portal-green-soft);
}

.portal-action-message.is-error {
    color: #8c241e;
    background: #ffebe8;
}

.portal-flash {
    margin-top: 16px;
    padding: 14px 17px;
    border: 1px solid #a9dec2;
    border-radius: 13px;
    color: var(--portal-green);
    background: var(--portal-green-soft);
    font-size: 13px;
    font-weight: 700;
}

.portal-flash-warning {
    border-color: #efc17f;
    color: #85470f;
    background: var(--portal-orange-soft);
}

.portal-preview-banner {
    position: sticky;
    z-index: 19;
    top: 84px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 11px 20px;
    color: #40206f;
    background: #fff0b8;
    box-shadow: 0 7px 18px rgba(49, 25, 78, .08);
    font-size: 13px;
}

.portal-preview-banner span {
    color: #725b27;
}

.portal-preview-banner a {
    padding: 6px 11px;
    border-radius: 999px;
    color: #fff;
    background: var(--portal-purple-dark);
    font-weight: 700;
    text-decoration: none;
}

.portal-admin-page {
    background: #f3eff8;
}

.portal-admin-main {
    width: min(1440px, calc(100% - 40px));
}

.portal-admin-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 32px;
    padding: 34px 38px;
    border-radius: 25px;
    color: #fff;
    background: linear-gradient(125deg, #25113e, #5c2bb3 62%, #7440cd);
    box-shadow: var(--portal-shadow);
}

.portal-admin-hero h1 {
    margin: 0;
    font-size: clamp(29px, 4vw, 46px);
    line-height: 1.1;
    letter-spacing: -.04em;
}

.portal-admin-hero p {
    max-width: 760px;
    margin: 12px 0 0;
    color: rgba(255, 255, 255, .78);
}

.portal-admin-alert {
    display: flex;
    flex-direction: column;
    margin-top: 20px;
    padding: 20px;
    border: 1px solid #f1b3ae;
    border-radius: 16px;
    color: #79241e;
    background: #fff0ee;
}

.portal-admin-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.portal-admin-stats a {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 17px 20px;
    border: 1px solid var(--portal-border);
    border-radius: 16px;
    background: #fff;
    text-decoration: none;
}

.portal-admin-stats a.has-attention {
    border-color: #f1a6a0;
    background: #fff5f4;
}

.portal-admin-stats strong {
    color: var(--portal-purple);
    font-size: 25px;
}

.portal-admin-stats span {
    color: var(--portal-muted);
    font-size: 12px;
    font-weight: 700;
}

.portal-admin-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr);
    gap: 14px;
    margin-top: 16px;
}

.portal-admin-search,
.portal-admin-client-view {
    padding: 18px;
    border: 1px solid var(--portal-border);
    border-radius: 17px;
    background: #fff;
}

.portal-admin-search > label,
.portal-admin-client-view > label {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 800;
}

.portal-admin-search > div,
.portal-admin-client-view > div {
    display: flex;
    gap: 8px;
}

.portal-admin-search input,
.portal-admin-client-view input {
    min-width: 0;
    min-height: 48px;
    padding: 11px 13px;
}

.portal-admin-toolbar .portal-button {
    flex: 0 0 auto;
    min-height: 48px;
    padding-block: 10px;
}

.portal-admin-results-heading > span {
    color: var(--portal-muted);
    font-size: 13px;
    font-weight: 700;
}

.portal-admin-orders {
    display: grid;
    gap: 13px;
}

.portal-admin-order {
    overflow: hidden;
    border: 1px solid var(--portal-border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(49, 25, 78, .05);
}

.portal-admin-order > summary {
    display: grid;
    grid-template-columns: minmax(280px, 1.5fr) minmax(220px, 1fr) auto 28px;
    align-items: center;
    gap: 20px;
    min-height: 104px;
    padding: 18px 22px;
    cursor: pointer;
    list-style: none;
}

.portal-admin-order > summary::-webkit-details-marker {
    display: none;
}

.portal-admin-order[open] > summary {
    border-bottom: 1px solid var(--portal-border);
    background: #fdfcff;
}

.portal-admin-order-primary,
.portal-admin-customer {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
}

.portal-admin-order-primary > strong,
.portal-admin-customer > strong {
    overflow: hidden;
    max-width: 100%;
    margin-top: 7px;
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-admin-customer > strong {
    margin-top: 0;
}

.portal-admin-order-primary small,
.portal-admin-customer small {
    overflow: hidden;
    max-width: 100%;
    color: var(--portal-muted);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-admin-badges {
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    gap: 5px;
}

.portal-mini-badge {
    padding: 5px 8px;
    border-radius: 999px;
    color: #6f6777;
    background: #f1edf4;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .03em;
    white-space: nowrap;
    text-transform: uppercase;
}

.portal-mini-badge.is-registered,
.portal-mini-badge.is-replied {
    color: var(--portal-green);
    background: var(--portal-green-soft);
}

.portal-mini-badge.needs-reply {
    color: #a92621;
    background: #ffe4e1;
}

.portal-mini-badge.is-photo {
    color: #185f75;
    background: #dff5fb;
}

.portal-mini-badge.is-photo-missing {
    color: #98501b;
    background: #fff0d5;
}

.portal-admin-expand {
    color: var(--portal-purple);
    font-size: 24px;
    transition: transform .2s ease;
}

.portal-admin-order[open] .portal-admin-expand {
    transform: rotate(180deg);
}

.portal-admin-order-content {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
}

.portal-admin-order-sidebar {
    padding: 22px;
    border-right: 1px solid var(--portal-border);
    background: #faf8fc;
}

.portal-admin-order-sidebar > video,
.portal-admin-no-video {
    display: block;
    width: 100%;
    max-height: 420px;
    border-radius: 14px;
    background: #1b1224;
    object-fit: contain;
}

.portal-admin-no-video {
    display: grid;
    min-height: 170px;
    color: #bdb2c7;
    font-size: 12px;
    place-items: center;
}

.portal-admin-details {
    display: grid;
    gap: 12px;
    margin: 20px 0;
}

.portal-admin-details dt {
    color: var(--portal-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.portal-admin-details dd {
    margin: 2px 0 0;
    font-size: 12px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.portal-admin-quick-links {
    display: grid;
    gap: 7px;
    padding-top: 17px;
    border-top: 1px solid var(--portal-border);
}

.portal-admin-external-reply {
    display: grid;
    gap: 7px;
    margin: 0 0 16px;
}

.portal-admin-external-reply button {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid #d4c9de;
    border-radius: 10px;
    color: var(--portal-purple-dark);
    background: #fff;
    cursor: pointer;
    font-size: 10px;
    font-weight: 800;
}

.portal-admin-quick-links a {
    color: var(--portal-purple);
    font-size: 12px;
    font-weight: 700;
}

.portal-admin-images {
    margin-top: 22px;
    padding: 13px;
    border: 1px solid var(--portal-border);
    border-radius: 14px;
    background: #fff;
}

.portal-admin-images-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.portal-admin-images-heading > div > strong {
    display: block;
    color: var(--portal-ink);
    font-size: 13px;
}

.portal-admin-images-heading > span {
    color: var(--portal-muted);
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}

.portal-admin-images-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.portal-admin-images-grid a {
    position: relative;
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 6px;
    overflow: hidden;
    border: 1px solid #e8e0ee;
    border-radius: 11px;
    color: inherit;
    background: #fbf9fc;
    text-decoration: none;
}

.portal-admin-images-grid a img {
    width: 56px;
    height: 56px;
    border-radius: 8px;
}

.portal-admin-images-grid a > span {
    min-width: 0;
}

.portal-admin-images-grid a > span strong,
.portal-admin-images-grid a > span small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-admin-images-grid a > span strong {
    color: var(--portal-ink);
    font-size: 10px;
}

.portal-admin-images-grid a > span small {
    margin-top: 3px;
    color: var(--portal-muted);
    font-size: 8px;
}

.portal-admin-images-grid a > b {
    padding: 5px 7px;
    border-radius: 7px;
    color: var(--portal-purple);
    background: #f0e8fb;
    font-size: 8px;
    text-transform: uppercase;
}

.portal-admin-images-grid a:hover,
.portal-admin-images-grid a:focus-visible {
    border-color: #bba5cf;
    background: #fff;
}

.portal-admin-photo-missing {
    display: grid;
    gap: 4px;
    margin-top: 22px;
    padding: 12px 13px;
    border: 1px solid #f0d3a3;
    border-radius: 12px;
    color: #784415;
    background: #fff8e8;
}

.portal-admin-photo-missing strong {
    font-size: 11px;
}

.portal-admin-photo-missing span {
    font-size: 9px;
    line-height: 1.5;
}

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

    .portal-admin-images-grid a {
        grid-template-columns: 52px minmax(0, 1fr) auto;
    }

    .portal-admin-images-grid a img {
        width: 52px;
        height: 52px;
    }
}

/* Product catalog manager */
.portal-nav a[aria-current="page"] {
    color: var(--portal-purple);
}

.portal-product-main {
    padding-bottom: 70px;
}

.portal-product-hero {
    align-items: center;
}

.portal-product-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 13px;
    color: #fff;
    background: rgba(255, 255, 255, .14);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.portal-product-add:hover,
.portal-product-add:focus-visible {
    color: var(--portal-purple-dark);
    background: #fff;
}

.portal-product-source {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0 0;
    padding: 14px 16px;
    border: 1px solid #bfe3c9;
    border-radius: 14px;
    color: #174f28;
    background: #f2fbf5;
}

.portal-product-source > span {
    flex: 0 0 10px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #25a052;
    box-shadow: 0 0 0 5px rgba(37, 160, 82, .12);
}

.portal-product-source > div {
    display: grid;
    gap: 2px;
}

.portal-product-source strong {
    font-size: 13px;
}

.portal-product-source small {
    color: #477154;
    font-size: 10px;
    line-height: 1.45;
}

.portal-product-source code {
    font: inherit;
    font-weight: 700;
}

.portal-product-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.portal-product-stats > div {
    display: grid;
    gap: 3px;
    padding: 18px;
    border: 1px solid var(--portal-border);
    border-radius: 15px;
    background: #fff;
    box-shadow: var(--portal-shadow-sm);
}

.portal-product-stats strong {
    color: var(--portal-ink);
    font-size: 26px;
    line-height: 1;
}

.portal-product-stats span {
    color: var(--portal-muted);
    font-size: 12px;
    font-weight: 700;
}

.portal-product-editor {
    margin: 22px 0;
    overflow: hidden;
    border: 1px solid #ded3e8;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 18px 44px rgba(43, 25, 62, .11);
}

.portal-product-editor > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 21px 24px;
    border-bottom: 1px solid var(--portal-border);
    background: linear-gradient(135deg, #fbf8ff, #fff);
}

.portal-product-editor > header h2 {
    margin: 2px 0 0;
    color: var(--portal-ink);
    font-size: 24px;
}

.portal-product-editor > header > a {
    color: var(--portal-muted);
    font-size: 13px;
    font-weight: 700;
}

.portal-product-editor form {
    padding: 24px;
}

.portal-product-editor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.portal-product-field {
    display: grid;
    align-content: start;
    gap: 7px;
    min-width: 0;
    color: var(--portal-ink);
    font-size: 13px;
    font-weight: 800;
}

.portal-product-field > .portal-product-field-label {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    color: var(--portal-ink);
}

.portal-product-field-label b {
    color: #c52950;
    font: inherit;
}

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

.portal-product-field input,
.portal-product-field textarea {
    width: 100%;
    min-width: 0;
    padding: 12px 13px;
    border: 1px solid #dcd3e4;
    border-radius: 11px;
    outline: 0;
    color: var(--portal-ink);
    background: #fff;
    font: inherit;
    font-weight: 500;
}

.portal-product-field input {
    min-height: 46px;
}

.portal-product-field textarea {
    resize: vertical;
}

.portal-product-field input:focus,
.portal-product-field textarea:focus {
    border-color: #8a62c2;
    box-shadow: 0 0 0 3px rgba(108, 54, 207, .11);
}

.portal-product-field small {
    color: var(--portal-muted);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.45;
}

.portal-product-switches {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 22px 0 0;
    padding: 0;
    border: 0;
}

.portal-product-switches legend {
    grid-column: 1 / -1;
    margin-bottom: 1px;
    color: var(--portal-ink);
    font-size: 14px;
    font-weight: 800;
}

.portal-product-switches label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
    padding: 13px;
    border: 1px solid var(--portal-border);
    border-radius: 12px;
    background: #faf8fc;
    cursor: pointer;
}

.portal-product-switches input {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    accent-color: var(--portal-purple);
}

.portal-product-switches label > span {
    display: grid;
    gap: 2px;
}

.portal-product-switches strong {
    color: var(--portal-ink);
    font-size: 12px;
}

.portal-product-switches small {
    color: var(--portal-muted);
    font-size: 10px;
    line-height: 1.4;
}

.portal-product-media {
    margin-top: 22px;
    padding: 18px;
    border: 1px solid var(--portal-border);
    border-radius: 17px;
    background: #faf9fc;
}

.portal-product-media-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 15px;
}

.portal-product-media-header h3 {
    margin: 2px 0 0;
    color: var(--portal-ink);
    font-size: 18px;
}

.portal-product-media-header p {
    margin: 5px 0 0;
    color: var(--portal-muted);
    font-size: 11px;
    line-height: 1.45;
}

.portal-product-media-status {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.portal-product-media-status span {
    padding: 6px 9px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.portal-product-media-status .is-ready {
    color: #16613c;
    background: #e8f7ee;
}

.portal-product-media-status .is-missing {
    color: #92500a;
    background: #fff1df;
}

.portal-product-media-list {
    display: grid;
    gap: 13px;
}

.portal-product-media-row {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 15px;
    padding: 14px;
    border: 1px solid #e5ddec;
    border-radius: 15px;
    background: #fff;
}

.portal-product-current-media {
    min-width: 0;
    margin: 0;
}

.portal-product-media-preview {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 220px;
    overflow: hidden;
    border-radius: 12px;
    background: #1d1628;
}

.portal-product-media-preview img,
.portal-product-media-preview video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.portal-product-media-preview img {
    background: #efeaf3;
}

.portal-product-media-preview.is-empty {
    padding: 18px;
    background: linear-gradient(145deg, #f4f0f8, #ebe5f1);
    color: var(--portal-muted);
}

.portal-product-media-empty {
    display: grid;
    justify-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

.portal-product-media-empty svg {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.portal-product-current-media figcaption {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
}

.portal-product-current-media figcaption > div {
    display: grid;
    gap: 1px;
}

.portal-product-current-media figcaption strong {
    color: var(--portal-ink);
    font-size: 11px;
}

.portal-product-current-media figcaption span,
.portal-product-current-media figcaption a {
    color: var(--portal-muted);
    font-size: 9px;
    line-height: 1.4;
}

.portal-product-current-media figcaption a {
    color: var(--portal-purple);
    font-weight: 800;
    white-space: nowrap;
}

.portal-product-dropzone {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 220px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border: 2px dashed #cbbbdc;
    border-radius: 13px;
    background: #fbf9ff;
    cursor: pointer;
    text-align: center;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.portal-product-dropzone:hover,
.portal-product-dropzone:focus-within,
.portal-product-dropzone.is-dragging {
    border-color: var(--portal-purple);
    background: #f5efff;
    box-shadow: 0 10px 25px rgba(91, 42, 165, .1);
}

.portal-product-dropzone.is-dragging {
    transform: translateY(-2px);
}

.portal-product-dropzone.is-error {
    border-color: #cf3150;
    background: #fff4f6;
}

.portal-product-dropzone input {
    position: absolute;
    z-index: 2;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.portal-product-dropzone > span,
.portal-product-dropzone > strong,
.portal-product-dropzone > small,
.portal-product-dropzone > em {
    pointer-events: none;
}

.portal-product-dropzone-icon {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    margin-bottom: 11px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(145deg, #7d42df, #5425a3);
    box-shadow: 0 9px 20px rgba(91, 42, 165, .2);
}

.portal-product-dropzone-icon.is-video {
    background: linear-gradient(145deg, #f04a71, #b91f4e);
    box-shadow: 0 9px 20px rgba(190, 31, 79, .18);
}

.portal-product-dropzone-icon svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.portal-product-dropzone strong {
    color: var(--portal-ink);
    font-size: 13px;
}

.portal-product-dropzone > span:not(.portal-product-dropzone-icon) {
    margin-top: 5px;
    color: var(--portal-muted);
    font-size: 11px;
}

.portal-product-dropzone > span b {
    color: var(--portal-purple);
}

.portal-product-dropzone small {
    margin-top: 4px;
    color: #8f8798;
    font-size: 10px;
}

.portal-product-dropzone em {
    max-width: 100%;
    margin-top: 12px;
    padding: 6px 9px;
    overflow: hidden;
    border-radius: 999px;
    color: #6e6578;
    background: #eee9f4;
    font-size: 9px;
    font-style: normal;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-product-dropzone.has-file em {
    color: #14613a;
    background: #e4f6eb;
}

.portal-product-dropzone.is-error em {
    color: #9d1733;
    background: #ffe2e8;
}

.portal-product-save-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 22px;
}

.portal-product-save-row > div {
    display: grid;
    gap: 3px;
}

.portal-product-save-row a {
    color: var(--portal-purple);
    font-size: 12px;
    font-weight: 800;
}

.portal-product-save-row span {
    color: var(--portal-muted);
    font-size: 10px;
}

.portal-product-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin: 27px 0 12px;
}

.portal-product-toolbar form {
    flex: 1 1 620px;
    max-width: 720px;
}

.portal-product-toolbar label {
    display: block;
    margin-bottom: 7px;
    color: var(--portal-ink);
    font-size: 13px;
    font-weight: 800;
}

.portal-product-toolbar form > div {
    display: flex;
    gap: 8px;
}

.portal-product-toolbar input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0 14px;
    border: 1px solid #dcd3e4;
    border-radius: 11px;
    outline: 0;
    font: inherit;
}

.portal-product-toolbar input:focus {
    border-color: #8a62c2;
    box-shadow: 0 0 0 3px rgba(108, 54, 207, .11);
}

.portal-product-toolbar > span {
    padding-bottom: 12px;
    color: var(--portal-muted);
    font-size: 12px;
    font-weight: 700;
}

.portal-product-list {
    overflow: hidden;
    border: 1px solid var(--portal-border);
    border-radius: 17px;
    background: #fff;
    box-shadow: var(--portal-shadow-sm);
}

.portal-product-row {
    display: grid;
    grid-template-columns: 64px minmax(220px, 1.5fr) minmax(130px, .55fr) minmax(150px, .7fr) auto;
    align-items: center;
    gap: 15px;
    min-width: 0;
    padding: 12px 14px;
    border-top: 1px solid #eee9f2;
}

.portal-product-row:first-child {
    border-top: 0;
}

.portal-product-row:hover {
    background: #fcfaff;
}

.portal-product-row-image {
    width: 64px;
    height: 76px;
    overflow: hidden;
    border-radius: 10px;
    background: #eee9f3;
}

.portal-product-row-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portal-product-row-image.is-missing {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    color: var(--portal-muted);
    font-size: 9px;
    font-weight: 700;
    text-align: center;
}

.portal-product-row-main,
.portal-product-price,
.portal-product-row-status {
    display: grid;
    min-width: 0;
}

.portal-product-row-main > span {
    color: var(--portal-purple);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.portal-product-row-main > strong {
    overflow: hidden;
    margin-top: 2px;
    color: var(--portal-ink);
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-product-row-main > small {
    overflow: hidden;
    margin-top: 3px;
    color: var(--portal-muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-product-price strong {
    color: var(--portal-ink);
    font-size: 15px;
}

.portal-product-price span {
    margin-top: 2px;
    color: var(--portal-muted);
    font-size: 9px;
}

.portal-product-row-status {
    grid-template-columns: repeat(2, max-content);
    gap: 5px;
}

.portal-product-row-status span {
    padding: 4px 7px;
    border-radius: 999px;
    color: #6b6371;
    background: #f0edf2;
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
}

.portal-product-row-status .is-good {
    color: #17622d;
    background: #e0f5e6;
}

.portal-product-row-status .is-pinterest {
    color: #a51b28;
    background: #ffe5e7;
}

.portal-product-row-status .is-warning {
    color: #8d4f11;
    background: #fff0d5;
}

.portal-product-edit {
    padding: 9px 12px;
    border: 1px solid #d8cbe4;
    border-radius: 9px;
    color: var(--portal-purple);
    background: #fff;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
}

.portal-product-edit:hover,
.portal-product-edit:focus-visible {
    color: #fff;
    border-color: var(--portal-purple);
    background: var(--portal-purple);
}

.portal-product-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 17px;
}

.portal-product-pagination a {
    padding: 9px 12px;
    border: 1px solid var(--portal-border);
    border-radius: 9px;
    color: var(--portal-purple);
    background: #fff;
    font-size: 11px;
    font-weight: 800;
}

.portal-product-pagination span {
    color: var(--portal-muted);
    font-size: 11px;
    font-weight: 700;
}

@media (max-width: 900px) {
    .portal-product-row {
        grid-template-columns: 58px minmax(0, 1fr) auto;
        gap: 11px;
    }

    .portal-product-row-image {
        width: 58px;
        height: 70px;
    }

    .portal-product-price,
    .portal-product-row-status {
        grid-column: 2;
    }

    .portal-product-edit {
        grid-column: 3;
        grid-row: 1 / 4;
    }
}

@media (max-width: 680px) {
    .portal-product-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .portal-product-add {
        width: 100%;
    }

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

    .portal-product-stats > div {
        padding: 14px;
    }

    .portal-product-editor > header,
    .portal-product-editor form {
        padding: 17px;
    }

    .portal-product-editor-grid,
    .portal-product-switches {
        grid-template-columns: minmax(0, 1fr);
    }

    .portal-product-field-wide,
    .portal-product-switches legend {
        grid-column: auto;
    }

    .portal-product-media {
        padding: 12px;
    }

    .portal-product-media-header {
        flex-direction: column;
        gap: 10px;
    }

    .portal-product-media-status {
        justify-content: flex-start;
    }

    .portal-product-media-row {
        grid-template-columns: minmax(0, 1fr);
        padding: 11px;
    }

    .portal-product-media-preview {
        height: min(62vw, 280px);
    }

    .portal-product-dropzone {
        min-height: 170px;
        padding: 16px;
    }

    .portal-product-save-row,
    .portal-product-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .portal-product-save-row .portal-button,
    .portal-product-toolbar .portal-button {
        width: 100%;
    }

    .portal-product-toolbar form {
        flex-basis: auto;
        width: 100%;
    }

    .portal-product-toolbar form > div {
        align-items: stretch;
        flex-direction: column;
    }

    .portal-product-toolbar input {
        min-height: 46px;
    }

    .portal-product-toolbar > span {
        padding: 0;
    }

    .portal-product-row {
        grid-template-columns: 54px minmax(0, 1fr) auto;
        padding: 11px;
    }

    .portal-product-row-image {
        width: 54px;
        height: 66px;
    }

    .portal-product-row-status {
        grid-template-columns: repeat(2, max-content);
    }

    .portal-product-edit {
        padding: 8px 10px;
    }
}

.portal-admin-order-workspace {
    min-width: 0;
    padding: 25px;
}

.portal-admin-subheading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.portal-admin-subheading .portal-eyebrow {
    margin-bottom: 3px;
}

.portal-admin-subheading h3 {
    margin: 0;
    font-size: 21px;
}

.portal-admin-subheading > span,
.portal-admin-empty-copy {
    color: var(--portal-muted);
    font-size: 11px;
}

.portal-admin-thread-list {
    display: grid;
    gap: 9px;
    max-height: 360px;
    margin-top: 14px;
    overflow-y: auto;
    padding-right: 5px;
}

.portal-admin-reply {
    display: grid;
    gap: 13px;
    margin-top: 24px;
    padding: 20px;
    border: 1px solid var(--portal-border);
    border-radius: 16px;
    background: #fcfbfe;
}

.portal-admin-reply > label {
    margin: 0 0 -5px;
}

.portal-admin-file {
    padding: 13px 14px;
    border: 1px dashed #c8bad7;
    border-radius: 12px;
    background: #fff;
}

.portal-admin-file > span {
    margin-bottom: 6px;
}

.portal-admin-file input {
    display: block;
    max-width: 100%;
    font-size: 12px;
}

.portal-admin-file small {
    display: block;
    margin-top: 6px;
    color: var(--portal-muted);
    font-size: 10px;
}

.portal-admin-delivery-note {
    display: flex;
    flex-direction: column;
    padding: 12px 14px;
    border-radius: 12px;
    color: #84430c;
    background: var(--portal-orange-soft);
    font-size: 11px;
}

.portal-admin-delivery-note.is-registered {
    color: var(--portal-green);
    background: var(--portal-green-soft);
}

.portal-admin-options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 18px;
}

.portal-admin-options label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 600;
}

.portal-email-sender-select {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--portal-muted);
    font-size: 13px;
    font-weight: 700;
}

.portal-email-sender-select select {
    min-height: 38px;
    max-width: 260px;
    padding: 7px 34px 7px 10px;
    border: 1px solid #dcd4e5;
    border-radius: 10px;
    color: var(--portal-ink);
    background: #fff;
    cursor: pointer;
    font: inherit;
}

.portal-email-sender-select select:focus {
    border-color: var(--portal-purple);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(108, 54, 207, .12);
}

.portal-email-sender-select.is-disabled {
    opacity: .5;
}

.portal-admin-options .portal-email-sender-select {
    gap: 8px;
    font-size: 13px;
}

.portal-admin-options .portal-email-sender-select select {
    font-size: 13px;
}

.portal-email-sender-select.is-compact {
    display: grid;
    gap: 4px;
    margin-bottom: 6px;
    text-align: left;
}

.portal-email-sender-select.is-compact span {
    font-size: 12px;
}

.portal-email-sender-select.is-compact select {
    min-height: 34px;
    max-width: 210px;
    font-size: 12px;
}

.portal-tip-amount input {
    width: 76px;
    min-height: 36px;
    padding: 7px 8px;
}

.portal-admin-submit-row {
    display: flex;
    align-items: center;
    gap: 13px;
}

.portal-admin-submit-row > span {
    color: var(--portal-muted);
    font-size: 10px;
}

.portal-admin-review-panel {
    margin-top: 14px;
    padding: 15px 18px;
    border: 1px solid var(--portal-border);
    border-radius: 14px;
}

.portal-admin-review-panel > summary {
    cursor: pointer;
    color: var(--portal-purple);
    font-size: 12px;
    font-weight: 800;
}

.portal-admin-review-panel > p {
    color: var(--portal-muted);
    font-size: 11px;
}

.portal-admin-review-panel form,
.portal-admin-review-panel label {
    display: grid;
    gap: 7px;
}

.portal-admin-review-panel form {
    gap: 13px;
}

.portal-admin-review-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 130px;
    gap: 10px;
}

.portal-admin-review-panel label {
    font-size: 11px;
    font-weight: 700;
}

.portal-admin-review-panel input,
.portal-admin-review-panel select {
    min-height: 42px;
    padding: 9px 11px;
}

@media (max-width: 1000px) {
    .portal-admin-toolbar,
    .portal-admin-order-content {
        grid-template-columns: 1fr;
    }

    .portal-admin-order-sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--portal-border);
    }

    .portal-admin-order-sidebar > video {
        max-height: 65vh;
    }
}

@media (max-width: 700px) {
    .portal-preview-banner {
        top: 72px;
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
        padding: 9px 14px;
        font-size: 11px;
    }

    .portal-preview-banner a {
        position: absolute;
        top: 12px;
        right: 12px;
    }

    .portal-client-message-form {
        grid-template-columns: 1fr;
    }

    .portal-client-message-form > label,
    .portal-client-message-form .portal-action-message {
        grid-column: auto;
    }

    .portal-admin-main {
        width: min(100% - 16px, 1440px);
        padding-top: 12px;
    }

    .portal-admin-hero {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 25px 20px;
        border-radius: 20px;
    }

    .portal-admin-hero h1 {
        font-size: 30px;
    }

    .portal-admin-hero p {
        font-size: 12px;
    }

    .portal-admin-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .portal-admin-stats a {
        gap: 8px;
        padding: 13px 11px;
    }

    .portal-admin-search,
    .portal-admin-client-view {
        padding: 14px;
    }

    .portal-admin-search > div,
    .portal-admin-client-view > div {
        flex-wrap: wrap;
    }

    .portal-admin-search input,
    .portal-admin-client-view input {
        flex: 1 1 100%;
    }

    .portal-admin-results-heading {
        margin-top: 31px;
    }

    .portal-admin-order > summary {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 12px;
        min-height: 0;
        padding: 16px;
    }

    .portal-admin-customer {
        grid-column: 1;
    }

    .portal-admin-badges {
        grid-column: 1 / -1;
        align-items: flex-start;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .portal-admin-expand {
        grid-column: 2;
        grid-row: 1 / 3;
    }

    .portal-admin-order-sidebar,
    .portal-admin-order-workspace {
        padding: 16px;
    }

    .portal-admin-reply {
        padding: 15px;
    }

    .portal-admin-options {
        align-items: flex-start;
        flex-direction: column;
    }

    .portal-admin-submit-row {
        align-items: stretch;
        flex-direction: column;
    }

    .portal-admin-review-grid {
        grid-template-columns: 1fr;
    }
}

/* Admin business dashboard. Kept after the legacy portal rules so deployments
   receive one predictable, responsive presentation. */
.portal-admin-page {
    background:
        radial-gradient(circle at 8% 2%, rgba(126, 78, 213, .10), transparent 24rem),
        #f6f3fa;
}

.portal-admin-main {
    width: min(1320px, calc(100% - 48px));
    padding-top: 28px;
}

.portal-admin-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 28px 32px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 24px;
    background: linear-gradient(118deg, #251139 0%, #492078 48%, #6935c4 100%);
    box-shadow: 0 22px 55px rgba(47, 22, 78, .20);
}

.portal-admin-hero::before,
.portal-admin-hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 50%;
}

.portal-admin-hero::before {
    width: 280px;
    height: 280px;
    top: -205px;
    right: 8%;
}

.portal-admin-hero::after {
    width: 170px;
    height: 170px;
    right: -55px;
    bottom: -115px;
}

.portal-admin-hero h1 {
    font-size: clamp(28px, 3.4vw, 40px);
}

.portal-admin-hero p {
    margin-top: 7px;
    font-size: 15px;
}

.portal-admin-hero .portal-account-card {
    padding: 14px 18px;
    border-radius: 14px;
}

.portal-admin-range {
    display: grid;
    grid-template-columns: auto minmax(260px, 1fr) auto;
    align-items: center;
    gap: 22px;
    margin-top: 18px;
    padding: 15px 17px;
    border: 1px solid var(--portal-border);
    border-radius: 18px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 10px 30px rgba(47, 22, 78, .05);
}

.portal-admin-range-summary {
    min-width: 145px;
}

.portal-admin-range-summary .portal-eyebrow {
    margin-bottom: 1px;
    font-size: 10px;
}

.portal-admin-range-summary > strong {
    display: block;
    font-size: 14px;
}

.portal-admin-range-presets {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
    padding: 4px;
    border-radius: 13px;
    background: #f3eef9;
}

.portal-admin-range-presets a {
    min-width: 72px;
    padding: 8px 13px;
    border-radius: 10px;
    color: #6e6678;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.portal-admin-range-presets a:hover,
.portal-admin-range-presets a:focus-visible,
.portal-admin-range-presets a.is-active {
    color: #fff;
    background: var(--portal-purple);
    box-shadow: 0 7px 16px rgba(108, 54, 207, .22);
}

.portal-admin-date-picker {
    position: relative;
    min-width: 250px;
    align-self: center;
}

.portal-admin-date-picker > summary {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    align-items: center;
    flex-wrap: nowrap;
    gap: 7px;
    min-height: 42px;
    padding: 7px 11px;
    border: 1px solid var(--portal-border);
    border-radius: 12px;
    color: var(--portal-ink);
    background: #fff;
    cursor: pointer;
    list-style: none;
    font-size: 11px;
    font-weight: 800;
}

.portal-admin-date-picker > summary::-webkit-details-marker {
    display: none;
}

.portal-admin-date-picker > summary::after {
    content: "";
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    margin: -4px 3px 0 5px;
    border-right: 2px solid var(--portal-purple);
    border-bottom: 2px solid var(--portal-purple);
    transform: rotate(45deg);
    transition: transform .18s ease, margin .18s ease;
}

.portal-admin-date-picker[open] > summary {
    border-color: #bca5e7;
    box-shadow: 0 0 0 3px rgba(108, 54, 207, .1);
}

.portal-admin-date-picker[open] > summary::after {
    margin-top: 4px;
    transform: rotate(-135deg);
}

.portal-admin-date-picker > summary strong {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    color: var(--portal-muted);
    font-size: 10px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-calendar-icon {
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 7px;
    color: #fff;
    background: var(--portal-purple);
    font-size: 12px;
}

.portal-admin-date-panel {
    position: absolute;
    z-index: 10;
    top: calc(100% + 8px);
    right: 0;
    width: min(640px, calc(100vw - 32px));
    padding: 12px;
    border: 1px solid var(--portal-border);
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(47, 22, 78, .16);
}

.portal-date-shortcuts {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
}

.portal-date-shortcuts a {
    padding: 6px 8px;
    border-radius: 8px;
    color: #62449c;
    background: #f4effb;
    font-size: 10px;
    font-weight: 700;
    text-decoration: none;
}

.portal-date-shortcuts a:hover,
.portal-date-shortcuts a:focus-visible {
    color: #fff;
    background: var(--portal-purple);
}

.portal-date-picker-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    color: var(--portal-muted);
    font-size: 10px;
    font-weight: 700;
}

.portal-date-picker-topline span:last-child {
    color: var(--portal-purple);
    text-align: right;
}

.portal-date-picker-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 12px;
}

.portal-date-picker-presets button {
    padding: 6px 9px;
    border: 1px solid #e4daf1;
    border-radius: 8px;
    color: #62449c;
    background: #f7f2fc;
    cursor: pointer;
    font-size: 10px;
    font-weight: 800;
}

.portal-date-picker-presets button:hover,
.portal-date-picker-presets button:focus-visible,
.portal-date-picker-presets button.is-active {
    border-color: var(--portal-purple);
    color: #fff;
    background: var(--portal-purple);
}

.portal-date-picker-calendars {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.portal-date-calendar {
    min-width: 0;
    padding: 10px;
    border: 1px solid #eee8f4;
    border-radius: 13px;
    background: #fcfbfe;
}

.portal-date-calendar > header {
    display: grid;
    grid-template-columns: 27px minmax(0, 1fr) 27px;
    align-items: center;
    gap: 5px;
    margin-bottom: 7px;
}

.portal-date-calendar > header strong {
    overflow: hidden;
    color: var(--portal-ink);
    font-size: 11px;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-date-calendar > header button {
    display: grid;
    width: 27px;
    height: 27px;
    place-items: center;
    border: 1px solid #e9e2f0;
    border-radius: 8px;
    color: var(--portal-purple);
    background: #fff;
    cursor: pointer;
    font-size: 17px;
    line-height: 1;
}

.portal-date-calendar > header button:hover,
.portal-date-calendar > header button:focus-visible {
    border-color: var(--portal-purple);
    background: #f4effb;
}

.portal-date-calendar > header button:disabled,
.portal-admin-custom-range button:disabled {
    cursor: not-allowed;
    opacity: .45;
}

.portal-date-weekdays,
.portal-date-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 2px;
}

.portal-date-weekdays {
    margin-bottom: 3px;
    color: #9c91a7;
    font-size: 9px;
    font-weight: 800;
    text-align: center;
}

.portal-date-grid > button,
.portal-date-grid > span {
    display: grid;
    min-width: 0;
    min-height: 28px;
    place-items: center;
    border-radius: 8px;
    font-size: 10px;
}

.portal-date-grid > button {
    border: 1px solid transparent;
    color: var(--portal-ink);
    background: transparent;
    cursor: pointer;
}

.portal-date-grid > button:hover,
.portal-date-grid > button:focus-visible {
    border-color: #c9b2ed;
    background: #f1eaff;
}

.portal-date-grid > button.is-today {
    border-color: #c9b2ed;
    color: var(--portal-purple);
    font-weight: 900;
}

.portal-date-grid > button.is-in-range {
    border-radius: 0;
    background: #eee5fb;
    color: #4f2c91;
}

.portal-date-grid > button.is-selected-start,
.portal-date-grid > button.is-selected-end {
    border-radius: 8px;
    color: #fff;
    background: var(--portal-purple);
    font-weight: 900;
}

.portal-date-grid > button.is-disabled {
    color: #c8c1cf;
    cursor: not-allowed;
    opacity: .55;
}

.portal-admin-date-picker .portal-admin-custom-range {
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
    padding-top: 11px;
    border-top: 1px solid #eee8f4;
}

.portal-admin-custom-range input[type="hidden"] {
    display: none;
}

.portal-date-selected {
    min-width: 0;
    overflow: hidden;
    color: var(--portal-muted);
    font-size: 11px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-date-auto-note {
    flex: 0 0 auto;
    color: #168351;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.portal-admin-custom-range {
    display: flex;
    align-items: flex-end;
    gap: 6px;
}

.portal-admin-custom-range label {
    color: var(--portal-muted);
    font-size: 10px;
    font-weight: 700;
}

.portal-admin-custom-range label span {
    display: block;
    margin-bottom: 2px;
}

.portal-admin-custom-range input {
    display: block;
    width: 125px;
    min-height: 34px;
    margin-top: 2px;
    padding: 6px 8px;
    border: 1px solid var(--portal-border);
    border-radius: 9px;
    color: var(--portal-ink);
    background: #fff;
    font-size: 11px;
}

.portal-date-arrow {
    align-self: center;
    padding-bottom: 2px;
    color: var(--portal-muted);
    font-size: 15px;
}

.portal-admin-custom-range button,
.portal-followup-item button {
    min-height: 34px;
    padding: 7px 12px;
    border: 0;
    border-radius: 9px;
    color: #fff;
    background: var(--portal-purple);
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
}

.portal-admin-custom-range button:hover,
.portal-followup-item button:hover {
    background: var(--portal-purple-dark);
}

.portal-admin-chart-mode {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 3px;
    border: 0;
    border-radius: 10px;
    background: #f3eef9;
}

.portal-admin-chart-mode a {
    min-width: 66px;
    padding: 7px 11px;
    border-radius: 7px;
    color: var(--portal-muted);
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
}

.portal-admin-chart-mode a:hover,
.portal-admin-chart-mode a:focus-visible,
.portal-admin-chart-mode a.is-active {
    color: #fff;
    background: var(--portal-purple);
}

.portal-admin-kpis {
    display: grid;
    grid-template-columns: 1.25fr repeat(3, 1fr);
    gap: 12px;
    margin-top: 14px;
}

.portal-pinterest-status {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 15px;
    margin-top: 14px;
    padding: 17px 19px;
    border: 1px solid #eadcf1;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(47, 22, 78, .05);
}

.portal-pinterest-status.is-connected {
    border-color: #d7ebdf;
    background: linear-gradient(110deg, #f8fffb, #fff 58%);
}

.portal-pinterest-status.is-error {
    border-color: #f2cec9;
    background: #fff9f8;
}

.portal-pinterest-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: #e60023;
    box-shadow: 0 8px 20px rgba(230, 0, 35, .2);
    font-size: 21px;
    font-weight: 800;
}

.portal-pinterest-copy {
    min-width: 0;
}

.portal-pinterest-copy .portal-eyebrow {
    margin-bottom: 1px;
    font-size: 9px;
}

.portal-pinterest-copy h2 {
    margin: 0;
    font-size: 16px;
    line-height: 1.25;
}

.portal-pinterest-copy p,
.portal-pinterest-copy small {
    display: block;
    margin: 4px 0 0;
    color: var(--portal-muted);
    font-size: 11px;
    line-height: 1.45;
}

.portal-pinterest-copy .portal-pinterest-period-spend {
    display: inline-block;
    margin-top: 7px;
    color: #176a43;
    font-size: 12px;
}

.portal-pinterest-copy code {
    padding: 2px 5px;
    border-radius: 5px;
    background: #f1ecf7;
    color: #4f267f;
    font-size: .92em;
}

.portal-pinterest-status form {
    display: grid;
    justify-items: end;
    gap: 5px;
}

.portal-pinterest-status button {
    min-height: 39px;
    padding: 9px 15px;
    border: 0;
    border-radius: 11px;
    color: #fff;
    background: #211731;
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
}

.portal-pinterest-status button:hover {
    background: #4e287c;
}

.portal-pinterest-status .portal-action-message {
    max-width: 260px;
    margin: 0;
    text-align: right;
}

.portal-admin-kpis.has-profit {
    grid-template-columns: 1.25fr repeat(4, 1fr);
}

.portal-admin-kpis article {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 128px;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    padding: 20px 22px;
    border: 1px solid var(--portal-border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(47, 22, 78, .05);
}

.portal-admin-kpis article.is-primary {
    color: #fff;
    border-color: #6d38ca;
    background: linear-gradient(135deg, #6d38cf, #4d2597);
}

.portal-admin-kpis article.is-primary::after {
    content: "$";
    position: absolute;
    right: 10px;
    bottom: -42px;
    color: rgba(255, 255, 255, .07);
    font-size: 145px;
    font-weight: 800;
}

.portal-admin-kpis article > span {
    position: relative;
    z-index: 1;
    color: var(--portal-muted);
    font-size: 12px;
    font-weight: 700;
}

.portal-admin-kpis article.is-primary > span,
.portal-admin-kpis article.is-primary small {
    color: rgba(255, 255, 255, .76);
}

.portal-admin-kpis article > strong {
    position: relative;
    z-index: 1;
    overflow: hidden;
    margin-top: 2px;
    font-size: clamp(25px, 3vw, 35px);
    line-height: 1.2;
    letter-spacing: -.035em;
    text-overflow: ellipsis;
}

.portal-admin-kpis article small {
    position: relative;
    z-index: 1;
    margin-top: 6px;
    color: #8e8697;
    font-size: 10px;
    font-weight: 600;
}

.portal-trend.is-up {
    color: #148351;
}

.portal-trend.is-down {
    color: #bd342d;
}

.portal-admin-kpis article.is-primary .portal-trend.is-up,
.portal-admin-kpis article.is-primary .portal-trend.is-down {
    color: #fff;
}

.portal-admin-chart-card,
.portal-admin-attention {
    margin-top: 14px;
    padding: 23px 25px;
    border: 1px solid var(--portal-border);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(47, 22, 78, .05);
}

.portal-admin-chart-card > header,
.portal-admin-attention > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.portal-chart-header-tools {
    display: grid;
    justify-items: end;
    gap: 9px;
}

.portal-admin-chart-card .portal-eyebrow,
.portal-admin-attention .portal-eyebrow {
    margin-bottom: 2px;
    font-size: 10px;
}

.portal-admin-chart-card h2,
.portal-admin-attention h2 {
    margin: 0;
    font-size: 21px;
    line-height: 1.25;
    letter-spacing: -.025em;
}

.portal-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    color: var(--portal-muted);
    font-size: 12px;
    font-weight: 700;
}

.portal-chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.portal-chart-legend i {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #168bd4;
}

.portal-chart-legend i.is-orders {
    background: #f4ad2f;
}

.portal-chart-legend i.is-spend {
    border: 1px solid #d7a4c3;
    background: #f4dceb;
}

.portal-chart-legend i.is-profit {
    background: #7657d8;
}

.portal-chart-math {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding: 11px 14px;
    border: 1px solid #ebe6f1;
    border-radius: 14px;
    background: #fbfafe;
}

.portal-chart-math span {
    display: flex;
    min-width: 0;
    align-items: baseline;
    gap: 7px;
}

.portal-chart-math small {
    color: var(--portal-muted);
    font-size: 11px;
    font-weight: 700;
}

.portal-chart-math strong {
    color: var(--portal-ink);
    font-size: 14px;
    white-space: nowrap;
}

.portal-chart-math .is-revenue strong {
    color: #137fbe;
}

.portal-chart-math .is-spend strong {
    color: #b34b70;
}

.portal-chart-math .is-profit strong {
    color: #6542c7;
}

.portal-chart-math > b {
    color: #aaa0b2;
    font-size: 16px;
    font-weight: 600;
}

.portal-chart-wrap {
    position: relative;
    overflow: hidden;
    margin-top: 8px;
}

.portal-sales-chart {
    display: block;
    width: 100%;
    min-height: 220px;
}

.portal-sales-chart .portal-chart-grid {
    stroke: #f0edf4;
    stroke-width: .8;
}

.portal-sales-chart .portal-chart-grid.is-zero {
    stroke: #d9d2e1;
    stroke-width: 1;
}

.portal-sales-chart .portal-chart-area.is-revenue {
    fill: url(#portal-revenue-fill);
}

.portal-sales-chart .portal-chart-area.is-profit {
    fill: url(#portal-profit-fill);
}

.portal-sales-chart .portal-chart-line {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.25;
}

.portal-sales-chart .portal-chart-line.is-revenue {
    stroke: #168bd4;
}

.portal-sales-chart .portal-chart-line.is-profit {
    stroke: #7657d8;
    stroke-width: 2.05;
}

.portal-sales-chart .portal-chart-guide {
    opacity: 0;
    stroke: #8b7b99;
    stroke-dasharray: 4 4;
    stroke-width: 1;
    transition: opacity .15s ease;
}

.portal-sales-chart .portal-chart-hit {
    fill: transparent;
    cursor: crosshair;
}

.portal-sales-chart .portal-chart-hover-target:hover .portal-chart-guide,
.portal-sales-chart .portal-chart-hover-target:focus .portal-chart-guide {
    opacity: .5;
}

.portal-sales-chart .portal-chart-hover-target:focus {
    outline: none;
}

.portal-sales-chart text {
    fill: #8d8496;
    font-family: "Poppins", sans-serif;
    font-size: 11px;
}

.portal-sales-chart .portal-chart-axis-label {
    fill: #6f6479;
    font-size: 12px;
    font-weight: 600;
}

.portal-chart-tooltip {
    position: absolute;
    z-index: 5;
    top: 10px;
    min-width: 188px;
    padding: 11px 12px;
    border: 1px solid #e5ddec;
    border-radius: 12px;
    color: var(--portal-ink);
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 12px 34px rgba(38, 22, 55, .17);
    pointer-events: none;
}

.portal-chart-tooltip[hidden] {
    display: none;
}

.portal-chart-tooltip > strong {
    display: block;
    margin-bottom: 7px;
    font-size: 12px;
}

.portal-chart-tooltip > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 4px;
    color: var(--portal-muted);
    font-size: 11px;
}

.portal-chart-tooltip > div.is-hidden {
    display: none;
}

.portal-chart-tooltip span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.portal-chart-tooltip i {
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #168bd4;
}

.portal-chart-tooltip i.is-spend {
    border: 1px solid #d7a4c3;
    background: #f4dceb;
}

.portal-chart-tooltip i.is-profit {
    background: #7657d8;
}

.portal-chart-tooltip i.is-orders {
    background: #f4ad2f;
}

.portal-chart-tooltip b {
    color: var(--portal-ink);
    white-space: nowrap;
}

.portal-chart-tooltip b.is-negative {
    color: #bd342d;
}

.portal-admin-chart-card > p {
    margin: 0;
    color: #968e9e;
    font-size: 10px;
}

.portal-chart-empty {
    display: flex;
    min-height: 150px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    margin-top: 13px;
    border-radius: 15px;
    color: var(--portal-muted);
    background: #faf8fc;
    text-align: center;
}

.portal-chart-empty strong {
    color: var(--portal-ink);
    font-size: 15px;
}

.portal-chart-empty span {
    margin-top: 4px;
    font-size: 12px;
}

.portal-admin-attention > header > span {
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--portal-purple);
    background: var(--portal-purple-soft);
    font-size: 11px;
    font-weight: 800;
}

.portal-admin-attention-intro {
    margin: 7px 0 18px;
    color: var(--portal-muted);
    font-size: 12px;
}

.portal-inbox-sync {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 16px;
    padding: 13px 14px;
    border: 1px solid #cce8dc;
    border-radius: 14px;
    background: #f3fbf7;
}

.portal-inbox-sync.is-warning {
    border-color: #efd59e;
    background: #fff9eb;
}

.portal-inbox-sync.is-setup {
    border-color: var(--portal-border);
    background: #faf8fc;
}

.portal-inbox-sync > div:first-child {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

.portal-inbox-sync strong {
    color: var(--portal-ink);
    font-size: 12px;
}

.portal-inbox-sync span {
    color: var(--portal-muted);
    font-size: 10px;
    line-height: 1.5;
}

.portal-inbox-sync form {
    flex: 0 0 auto;
    text-align: right;
}

.portal-inbox-sync .portal-action-message {
    max-width: 280px;
    margin-top: 5px;
    font-size: 9px;
    text-align: left;
}

.portal-followup-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
}

.portal-followup-columns > section {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--portal-border);
    border-radius: 16px;
    background: #fbfafd;
}

.portal-followup-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--portal-border);
}

.portal-followup-heading > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.portal-followup-heading strong {
    font-size: 13px;
}

.portal-followup-heading small {
    color: var(--portal-muted);
    font-size: 10px;
}

.portal-followup-icon {
    display: grid;
    width: 31px;
    height: 31px;
    flex: 0 0 auto;
    border-radius: 10px;
    color: #177548;
    background: var(--portal-green-soft);
    font-size: 14px;
    font-weight: 800;
    place-items: center;
}

.portal-followup-heading.is-birthday .portal-followup-icon {
    color: #8d5b08;
    background: #fff2ce;
}

.portal-followup-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid #eee8f3;
}

.portal-followup-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.portal-followup-item > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.portal-followup-item > div strong,
.portal-followup-item > div span,
.portal-followup-item > div small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-followup-item > div strong {
    font-size: 12px;
}

.portal-followup-item > div span,
.portal-followup-item > div small,
.portal-followup-empty {
    color: var(--portal-muted);
    font-size: 10px;
}

.portal-followup-item > div a {
    color: var(--portal-purple);
    font-weight: 800;
}

.portal-followup-item form {
    text-align: right;
}

.portal-followup-item button[disabled] {
    cursor: wait;
    opacity: .65;
}

.portal-followup-item .portal-action-message {
    max-width: 220px;
    margin-top: 5px;
    padding: 6px 8px;
    font-size: 9px;
    text-align: left;
}

.portal-followup-empty {
    margin: 18px 0 4px;
}

.portal-admin-stats {
    margin-top: 14px;
}

.portal-admin-stats a {
    box-shadow: 0 8px 24px rgba(47, 22, 78, .04);
}

.portal-admin-toolbar {
    margin-top: 14px;
}

.portal-admin-results-heading {
    margin-top: 42px;
}

@media (max-width: 1060px) {
    .portal-admin-range {
        grid-template-columns: auto 1fr;
    }

    .portal-admin-range-presets {
        justify-content: flex-start;
    }

    .portal-admin-date-picker {
        justify-self: end;
    }

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

    .portal-admin-kpis.has-profit {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .portal-admin-main {
        width: min(100% - 16px, 1320px);
        padding-top: 10px;
    }

    .portal-admin-hero {
        gap: 13px;
        padding: 20px;
        border-radius: 19px;
    }

    .portal-admin-hero h1 {
        font-size: 27px;
    }

    .portal-admin-hero p {
        font-size: 12px;
    }

    .portal-admin-hero .portal-account-card {
        display: none;
    }

    .portal-admin-range {
        display: flex;
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
        padding: 13px;
    }

    .portal-admin-range-presets {
        overflow-x: auto;
        justify-content: flex-start;
        scrollbar-width: none;
    }

    .portal-admin-range-presets::-webkit-scrollbar {
        display: none;
    }

    .portal-admin-range-presets a {
        min-width: max-content;
    }

    .portal-admin-date-picker {
        width: 100%;
    }

    .portal-admin-date-panel {
        position: static;
        width: 100%;
        margin-top: 8px;
    }

    .portal-admin-custom-range {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 7px;
    }

    .portal-admin-date-picker .portal-date-selected {
        flex: 1 1 180px;
    }

    .portal-admin-date-picker .portal-admin-custom-range button {
        grid-column: auto;
    }

    .portal-date-picker-calendars {
        grid-template-columns: 1fr;
    }

    .portal-date-arrow {
        display: none;
    }

    .portal-admin-kpis {
        gap: 7px;
    }

    .portal-admin-kpis article {
        min-height: 112px;
        padding: 14px;
        border-radius: 15px;
    }

    .portal-admin-kpis article > strong {
        font-size: 24px;
    }

    .portal-pinterest-status {
        grid-template-columns: auto minmax(0, 1fr);
        align-items: start;
        gap: 11px;
        padding: 14px;
        border-radius: 15px;
    }

    .portal-pinterest-mark {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .portal-pinterest-status form {
        grid-column: 1 / -1;
        justify-items: stretch;
    }

    .portal-pinterest-status button {
        width: 100%;
    }

    .portal-pinterest-status .portal-action-message {
        max-width: none;
        text-align: left;
    }

    .portal-admin-chart-card,
    .portal-admin-attention {
        padding: 17px 14px;
        border-radius: 17px;
    }

    .portal-admin-chart-card > header,
    .portal-admin-attention > header {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .portal-chart-header-tools {
        width: 100%;
        justify-items: start;
    }

    .portal-admin-chart-mode {
        width: auto;
        max-width: 100%;
        overflow-x: auto;
    }

    .portal-chart-math {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
        gap: 7px;
        padding: 10px;
    }

    .portal-chart-math span {
        align-items: flex-start;
        flex-direction: column;
        gap: 1px;
    }

    .portal-chart-math small {
        font-size: 10px;
        line-height: 1.25;
    }

    .portal-chart-math strong {
        font-size: 12px;
    }

    .portal-chart-wrap {
        overflow-x: auto;
    }

    .portal-sales-chart {
        width: 780px;
        min-height: 190px;
    }

    .portal-followup-columns {
        grid-template-columns: 1fr;
    }

    .portal-inbox-sync {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }

    .portal-inbox-sync form,
    .portal-inbox-sync button {
        width: 100%;
    }

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

    .portal-followup-item form,
    .portal-followup-item button,
    .portal-followup-item .portal-email-sender-select,
    .portal-followup-item .portal-email-sender-select select {
        width: 100%;
        max-width: none;
    }

    .portal-admin-stats a {
        min-width: 0;
    }

    .portal-admin-stats strong {
        font-size: 21px;
    }

    .portal-admin-results-heading {
        margin-top: 32px;
    }
}
