/* Mini Shop owner workspace — progressive layer over mini-shop-dashboard.css. */

.mini-shop-dashboard {
    --shop-surface: rgba(14, 20, 43, 0.72);
    --shop-surface-strong: rgba(22, 29, 61, 0.88);
    --shop-surface-soft: rgba(255, 255, 255, 0.065);
    --shop-border: rgba(255, 255, 255, 0.13);
    --shop-border-accent: rgba(125, 112, 255, 0.38);
    --shop-purple: #8b7cff;
    --shop-blue: #4ea8ff;
    --shop-cyan: #35d5e8;
    --shop-green: #4ade9a;
    --shop-amber: #ffc45c;
    --shop-red: #ff7d91;
    --shop-ease: cubic-bezier(0.22, 1, 0.36, 1);
    display: grid;
    gap: 14px;
    padding-top: max(12px, var(--app-top-chrome-padding, env(safe-area-inset-top)));
}

.mini-shop-dashboard [hidden] {
    display: none !important;
}

.mini-shop-dashboard__hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    margin: 0;
    padding: 22px;
    border: 1px solid rgba(139, 124, 255, 0.42);
    border-radius: 28px;
    background:
        radial-gradient(circle at 84% 12%, rgba(53, 213, 232, 0.18), transparent 34%),
        radial-gradient(circle at 8% 0%, rgba(139, 124, 255, 0.3), transparent 42%),
        linear-gradient(145deg, rgba(28, 35, 74, 0.92), rgba(11, 17, 38, 0.78));
    box-shadow: 0 24px 72px rgba(4, 7, 23, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(28px) saturate(155%);
    -webkit-backdrop-filter: blur(28px) saturate(155%);
}

.mini-shop-dashboard__hero::before {
    content: '';
    position: absolute;
    inset: auto -50px -72px auto;
    width: 190px;
    height: 190px;
    border-radius: 50%;
    background: conic-gradient(from 20deg, rgba(78, 168, 255, 0.34), rgba(139, 124, 255, 0.12), rgba(53, 213, 232, 0.28));
    filter: blur(16px);
    opacity: 0.74;
    z-index: -1;
}

.mini-shop-dashboard__hero::after {
    content: '';
    position: absolute;
    top: 18px;
    right: 20px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--shop-green);
    box-shadow: 0 0 0 6px rgba(74, 222, 154, 0.09), 0 0 22px rgba(74, 222, 154, 0.82);
}

.mini-shop-dashboard__hero h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(25px, 7vw, 38px);
    letter-spacing: -0.045em;
}

.mini-shop-dashboard__hero > p:last-child {
    max-width: 720px;
    margin-top: 10px;
    color: rgba(232, 238, 255, 0.76);
    line-height: 1.55;
}

.mini-shop-dashboard__eyebrow {
    margin: 0 0 7px;
    color: rgba(202, 211, 255, 0.76) !important;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.16em;
}

/* Workspace tabs */
.mini-shop-workspace-nav {
    position: sticky;
    top: calc(var(--app-top-chrome-padding, 0px) + 8px);
    z-index: 12;
    padding: 7px;
    border: 1px solid var(--shop-border);
    border-radius: 21px;
    background: rgba(9, 14, 32, 0.79);
    box-shadow: 0 18px 48px rgba(3, 6, 20, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
}

.mini-shop-workspace-nav__track {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}

.mini-shop-workspace-nav__track::-webkit-scrollbar {
    display: none;
}

.mini-shop-workspace-nav__tab {
    position: relative;
    flex: 0 0 auto;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 15px;
    color: rgba(226, 232, 255, 0.68);
    background: transparent;
    font: inherit;
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
    scroll-snap-align: center;
    transition: color 180ms ease, border-color 180ms ease, background 180ms ease, transform 180ms var(--shop-ease);
}

.mini-shop-workspace-nav__tab:hover {
    color: #fff;
    transform: translateY(-1px);
}

.mini-shop-workspace-nav__tab.is-active {
    color: #fff;
    border-color: rgba(139, 124, 255, 0.4);
    background: linear-gradient(135deg, rgba(92, 105, 255, 0.34), rgba(139, 92, 246, 0.24));
    box-shadow: 0 10px 28px rgba(72, 61, 178, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.13);
}

.mini-shop-workspace-nav__tab.is-active::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 4px;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--shop-purple), var(--shop-cyan));
    transform: translateX(-50%);
    box-shadow: 0 0 10px rgba(53, 213, 232, 0.58);
}

/* Section composition */
.mini-shop-workspace {
    min-width: 0;
}

.mini-shop-workspace-section {
    animation: mini-shop-section-enter 460ms var(--shop-ease) both;
}

.mini-shop-workspace-section__header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    padding: 6px 4px 12px;
}

.mini-shop-workspace-section__header h2 {
    margin: 0;
    font-size: 21px;
    letter-spacing: -0.025em;
}

.mini-shop-workspace-section__header .mini-shop-dashboard__eyebrow {
    display: none;
}

.mini-shop-workspace-section__grid,
.mini-shop-dashboard__loading-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 12px;
}

.mini-shop-workspace-section__grid > .mini-shop-dashboard__widget,
.mini-shop-dashboard__loading-grid > .mini-shop-dashboard__widget {
    grid-column: 1 / -1;
}

.mini-shop-workspace-section[data-mini-shop-section='sales'] .mini-shop-dashboard__widget,
.mini-shop-workspace-section[data-mini-shop-section='publishing'] .mini-shop-dashboard__widget {
    grid-column: span 6;
}

/* Widgets */
.mini-shop-dashboard__widget {
    position: relative;
    min-width: 0;
    padding: 17px;
    overflow: hidden;
    border: 1px solid var(--shop-border) !important;
    border-radius: 23px;
    background:
        radial-gradient(circle at 96% 0%, rgba(139, 124, 255, 0.08), transparent 34%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.038)),
        var(--shop-surface) !important;
    box-shadow: 0 16px 48px rgba(3, 6, 20, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(24px) saturate(145%);
    -webkit-backdrop-filter: blur(24px) saturate(145%);
    transition: transform 220ms var(--shop-ease), border-color 220ms ease, box-shadow 220ms ease;
}

.mini-shop-dashboard__widget:hover {
    transform: translateY(-2px);
    border-color: rgba(139, 124, 255, 0.32) !important;
    box-shadow: 0 22px 58px rgba(3, 6, 20, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.mini-shop-dashboard__widget::after {
    content: '';
    position: absolute;
    right: -42px;
    bottom: -62px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(139, 124, 255, 0.08);
    filter: blur(8px);
    pointer-events: none;
}

.mini-shop-dashboard__widget--suspended::after,
.mini-shop-dashboard__widget--error::after {
    background: rgba(255, 125, 145, 0.11);
}

.mini-shop-dashboard__widget-header {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.075);
}

.mini-shop-dashboard__widget h2 {
    margin: 0;
    font-size: 17px;
    letter-spacing: -0.02em;
}

.mini-shop-dashboard__state {
    flex: 0 0 auto;
    padding: 5px 9px;
    border: 1px solid rgba(74, 222, 154, 0.18);
    border-radius: 999px;
    color: rgba(196, 255, 226, 0.9);
    background: rgba(74, 222, 154, 0.085);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.mini-shop-dashboard__widget--suspended .mini-shop-dashboard__state,
.mini-shop-dashboard__widget--error .mini-shop-dashboard__state {
    border-color: rgba(255, 125, 145, 0.2);
    color: rgba(255, 214, 221, 0.95);
    background: rgba(255, 125, 145, 0.1);
}

.mini-shop-dashboard__widget--empty .mini-shop-dashboard__state,
.mini-shop-dashboard__widget--loading .mini-shop-dashboard__state {
    border-color: rgba(255, 196, 92, 0.18);
    color: rgba(255, 232, 190, 0.92);
    background: rgba(255, 196, 92, 0.08);
}

.mini-shop-dashboard__widget-body {
    position: relative;
    z-index: 1;
}

/* Metrics and rows */
.mini-shop-dashboard__metrics,
.mini-shop-dashboard__metrics--compact {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.mini-shop-dashboard__metrics--compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mini-shop-dashboard__metrics > div,
.mini-shop-dashboard__rows > p {
    min-width: 0;
    min-height: 84px;
    margin: 0;
    padding: 13px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.045);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.mini-shop-dashboard__metrics span,
.mini-shop-dashboard__rows span {
    display: block;
    color: rgba(226, 232, 255, 0.58);
    font-size: 10px;
    font-weight: 650;
    line-height: 1.3;
}

.mini-shop-dashboard__metrics strong,
.mini-shop-dashboard__rows strong {
    display: block;
    margin-top: 9px;
    color: rgba(255, 255, 255, 0.96);
    font-size: 17px;
    font-weight: 780;
    letter-spacing: -0.03em;
    overflow-wrap: anywhere;
}

.mini-shop-dashboard__rows {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

/* Checklist/setup */
.mini-shop-dashboard__setup {
    display: grid;
    gap: 10px;
    margin: 0 0 14px;
    padding: 15px;
    border: 1px solid rgba(139, 124, 255, 0.2);
    border-radius: 19px;
    background: linear-gradient(145deg, rgba(92, 105, 255, 0.14), rgba(53, 213, 232, 0.055));
}

.mini-shop-dashboard__setup p {
    margin: 0;
    color: rgba(228, 235, 255, 0.7);
}

.mini-shop-dashboard__setup-title {
    color: #fff !important;
    font-size: 15px;
    font-weight: 780;
}

.mini-shop-dashboard__checklist {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mini-shop-dashboard__checklist li {
    display: grid;
    grid-template-columns: 27px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 46px;
    padding: 9px 11px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.04);
}

.mini-shop-dashboard__checklist li > span {
    display: grid;
    place-items: center;
    width: 27px;
    height: 27px;
    border-radius: 10px;
    font-weight: 900;
}

.mini-shop-dashboard__checklist .is-passed > span {
    color: var(--shop-green);
    background: rgba(74, 222, 154, 0.09);
}

.mini-shop-dashboard__checklist .is-blocked > span {
    color: var(--shop-amber);
    background: rgba(255, 196, 92, 0.09);
}

.mini-shop-dashboard__notice {
    margin: 12px 0 0;
    padding: 10px 12px;
    border: 1px solid rgba(255, 196, 92, 0.12);
    border-radius: 14px;
    color: rgba(243, 235, 218, 0.78);
    background: rgba(255, 196, 92, 0.055);
    font-size: 12px;
    line-height: 1.45;
}

.mini-shop-dashboard__notice--error {
    border-color: rgba(255, 125, 145, 0.18);
    color: rgba(255, 221, 226, 0.9);
    background: rgba(255, 125, 145, 0.075);
}

/* All ordinary widget buttons use dark CRM surfaces, never white pills. */
.mini-shop-dashboard .button,
.mini-shop-dashboard .btn,
.mini-shop-dashboard .btn-primary,
.mini-shop-dashboard .btn-secondary {
    min-height: 44px;
    border: 1px solid rgba(139, 124, 255, 0.25);
    border-radius: 15px;
    color: #fff;
    background: linear-gradient(135deg, rgba(92, 105, 255, 0.3), rgba(139, 92, 246, 0.2));
    box-shadow: 0 10px 28px rgba(7, 10, 31, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    font-weight: 720;
    cursor: pointer;
    transition: transform 180ms var(--shop-ease), border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.mini-shop-dashboard .button:hover,
.mini-shop-dashboard .btn:hover,
.mini-shop-dashboard .btn-primary:hover,
.mini-shop-dashboard .btn-secondary:hover {
    transform: translateY(-2px);
    border-color: rgba(139, 124, 255, 0.48);
    background: linear-gradient(135deg, rgba(92, 105, 255, 0.4), rgba(139, 92, 246, 0.28));
    box-shadow: 0 15px 36px rgba(7, 10, 31, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.13);
}

.mini-shop-dashboard .button:active,
.mini-shop-dashboard .btn:active {
    transform: translateY(0) scale(0.985);
}

.mini-shop-dashboard button[disabled] {
    opacity: 0.44;
    filter: saturate(0.6);
    cursor: not-allowed;
    transform: none !important;
}

/* Grouped action center */
.mini-shop-action-center {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.mini-shop-action-group {
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 19px;
    background: rgba(255, 255, 255, 0.035);
}

.mini-shop-action-group h3 {
    margin: 0 0 9px;
    color: rgba(224, 232, 255, 0.62);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.mini-shop-action-group__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}

.mini-shop-action-card.button {
    position: relative;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 9px;
    align-items: center;
    width: 100%;
    min-height: 58px;
    padding: 8px 10px;
    border-color: rgba(255, 255, 255, 0.09);
    border-radius: 16px;
    color: rgba(248, 250, 255, 0.94);
    text-align: left;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.mini-shop-action-card--primary.button {
    border-color: rgba(139, 124, 255, 0.24);
    background: linear-gradient(135deg, rgba(92, 105, 255, 0.24), rgba(139, 92, 246, 0.13));
}

.mini-shop-action-card--warning.button {
    border-color: rgba(255, 196, 92, 0.17);
    background: linear-gradient(135deg, rgba(255, 196, 92, 0.11), rgba(255, 125, 145, 0.05));
}

.mini-shop-action-card__icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(139, 124, 255, 0.18);
    border-radius: 13px;
    color: rgba(214, 220, 255, 0.95);
    background: rgba(139, 124, 255, 0.09);
}

.mini-shop-action-card--warning .mini-shop-action-card__icon {
    border-color: rgba(255, 196, 92, 0.18);
    color: rgba(255, 222, 160, 0.96);
    background: rgba(255, 196, 92, 0.08);
}

.mini-shop-action-card__icon svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mini-shop-action-card__label {
    min-width: 0;
    font-size: 11px;
    font-weight: 730;
    line-height: 1.22;
}

.mini-shop-action-card__arrow {
    color: rgba(224, 232, 255, 0.34);
    font-size: 20px;
    transition: transform 180ms var(--shop-ease), color 180ms ease;
}

.mini-shop-action-card:hover .mini-shop-action-card__arrow {
    color: #fff;
    transform: translateX(2px);
}

.mini-shop-dashboard__inline-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.mini-shop-dashboard__public-url {
    overflow-wrap: anywhere;
    color: rgba(219, 232, 255, 0.94) !important;
    font-weight: 740;
}

@keyframes mini-shop-section-enter {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.992);
        filter: blur(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@media (max-width: 760px) {
    .mini-shop-workspace-section[data-mini-shop-section='sales'] .mini-shop-dashboard__widget,
    .mini-shop-workspace-section[data-mini-shop-section='publishing'] .mini-shop-dashboard__widget {
        grid-column: 1 / -1;
    }

    .mini-shop-dashboard__metrics,
    .mini-shop-dashboard__metrics--compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mini-shop-action-center {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .mini-shop-dashboard {
        gap: 11px;
        padding-right: max(10px, env(safe-area-inset-right));
        padding-left: max(10px, env(safe-area-inset-left));
    }

    .mini-shop-dashboard__hero {
        padding: 18px;
        border-radius: 24px;
    }

    .mini-shop-dashboard__hero h1 {
        padding-right: 18px;
        font-size: 25px;
    }

    .mini-shop-workspace-nav {
        margin-inline: -1px;
        border-radius: 18px;
    }

    .mini-shop-workspace-nav__tab {
        min-height: 40px;
        padding-inline: 12px;
        font-size: 11px;
    }

    .mini-shop-workspace-section__header {
        padding: 4px 3px 10px;
    }

    .mini-shop-workspace-section__header h2 {
        font-size: 19px;
    }

    .mini-shop-dashboard__widget {
        padding: 14px;
        border-radius: 20px;
    }

    .mini-shop-dashboard__metrics > div,
    .mini-shop-dashboard__rows > p {
        min-height: 76px;
        padding: 11px;
    }

    .mini-shop-dashboard__metrics strong,
    .mini-shop-dashboard__rows strong {
        font-size: 15px;
    }

    .mini-shop-dashboard__rows {
        grid-template-columns: 1fr;
    }

    .mini-shop-action-group {
        padding: 10px;
        border-radius: 17px;
    }

    .mini-shop-action-group__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mini-shop-action-card.button {
        grid-template-columns: 34px minmax(0, 1fr);
        min-height: 62px;
        padding: 8px;
    }

    .mini-shop-action-card__arrow {
        display: none;
    }

    .mini-shop-action-card__icon {
        width: 34px;
        height: 34px;
    }
}

@media (max-width: 350px) {
    .mini-shop-action-group__grid,
    .mini-shop-dashboard__metrics,
    .mini-shop-dashboard__metrics--compact,
    .mini-shop-dashboard__inline-actions {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mini-shop-workspace-section {
        animation: none;
    }

    .mini-shop-dashboard__widget,
    .mini-shop-workspace-nav__tab,
    .mini-shop-dashboard .button,
    .mini-shop-action-card__arrow {
        transition-duration: 0.01ms !important;
    }
}
