/* Client feedback polish: integration hero, compact profile, dashboard balance, and mobile fixes. */

.shopify-integration-page {
    display: grid;
    gap: 16px;
    align-content: start;
}

.shopify-integration-hero {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
    min-height: 142px;
    padding: 24px 28px;
    overflow: hidden;
    border: 1px solid #262a30;
    border-bottom: 4px solid var(--dream-red, #e30613);
    border-radius: 12px;
    color: #fff;
    background:
        radial-gradient(circle at 84% 16%, rgba(227, 6, 19, .2), transparent 28%),
        linear-gradient(135deg, #0b0d10 0%, #15191f 100%);
    box-shadow: 0 16px 34px rgba(15, 23, 42, .12);
}

.shopify-integration-hero::after {
    position: absolute;
    z-index: -1;
    right: -95px;
    bottom: -135px;
    width: 285px;
    height: 285px;
    border-radius: 50%;
    background: rgba(227, 6, 19, .08);
    content: '';
}

.shopify-integration-hero-icon {
    display: grid;
    place-items: center;
    width: 70px;
    height: 70px;
    border: 1px solid rgba(255, 255, 255, .11);
    border-radius: 12px;
    color: #fff;
    background: rgba(227, 6, 19, .16);
}

.shopify-integration-hero-icon .nav-icon,
.shopify-integration-hero-action .nav-icon,
.shopify-integration-step > span .nav-icon {
    display: grid;
    place-items: center;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    color: inherit;
    background: transparent !important;
}

.shopify-integration-hero-icon svg {
    width: 31px;
    height: 31px;
}

.shopify-integration-hero-copy {
    min-width: 0;
}

.shopify-integration-kicker {
    display: block;
    margin-bottom: 5px;
    color: #ff9aa3;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.shopify-integration-hero h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(26px, 2.3vw, 34px);
    line-height: 1.08;
}

.shopify-integration-hero p {
    max-width: 720px;
    margin: 8px 0 0;
    color: #cfd5dd;
    font-size: 14px;
}

.shopify-integration-status {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 12px;
    color: #c8d0da;
    font-size: 12px;
}

.shopify-integration-status span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.shopify-integration-status span::before {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #47d890;
    box-shadow: 0 0 0 4px rgba(71, 216, 144, .12);
    content: '';
}

.shopify-integration-status span:last-child::before {
    background: #ffb341;
    box-shadow: 0 0 0 4px rgba(255, 179, 65, .12);
}

.shopify-integration-hero-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 50px;
    padding: 0 18px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 10px;
    color: #fff;
    background: rgba(255, 255, 255, .08);
    text-decoration: none;
    white-space: nowrap;
    box-shadow: none;
}

.shopify-integration-hero-action .nav-icon svg {
    width: 20px;
    height: 20px;
}

.shopify-integration-hero-action:hover,
.shopify-integration-hero-action:focus-visible {
    border-color: #fff;
    color: #111317;
    background: #fff;
    transform: translateY(-1px);
}

.shopify-integration-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
}

.shopify-integration-grid > .panel {
    height: 100%;
    min-height: 292px;
}

.shopify-integration-grid .store-list {
    display: grid;
    gap: 10px;
}

.shopify-integration-workflow {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.shopify-integration-step {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 13px;
    min-height: 96px;
    padding: 17px 18px;
    border: 1px solid #dfe5ed;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .05);
}

.shopify-integration-step > span {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 10px;
    color: var(--dream-red, #e30613);
    background: #fee9eb;
}

.shopify-integration-step > span svg {
    width: 22px;
    height: 22px;
}

.shopify-integration-step strong,
.shopify-integration-step small {
    display: block;
}

.shopify-integration-step strong {
    color: #172033;
    font-size: 15px;
}

.shopify-integration-step small {
    margin-top: 4px;
    color: #6d7789;
    line-height: 1.45;
}

/* Keep the merchant dashboard right column visually complete on desktop. */
@media (min-width: 981px) {
    .dashboard-live-grid {
        align-items: stretch !important;
    }

    .dashboard-side-stack {
        align-self: stretch !important;
        height: 100% !important;
        min-height: 0 !important;
        grid-template-rows: auto minmax(0, 1fr) !important;
    }

    .dashboard-side-stack .order-breakdown-card {
        display: flex !important;
        height: 100% !important;
        min-height: 0 !important;
        flex-direction: column;
    }

    .dashboard-side-stack .order-breakdown-card .breakdown-row {
        display: flex;
        flex: 1 1 0;
        min-height: 74px;
        flex-direction: column;
        justify-content: center;
    }
}

/* Compact merchant profile information hierarchy. */
.profile-information-panel,
.profile-password-panel,
.profile-manager-panel {
    min-height: 0 !important;
}

.profile-information-panel {
    padding: 22px 28px !important;
}

.profile-information-panel .panel-header {
    margin-bottom: 18px !important;
}

.profile-information-grid {
    gap: 18px 34px !important;
}

.profile-information-grid > div {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.profile-information-grid > div > span {
    color: #5f6f86 !important;
    font-size: 11px !important;
    font-weight: 750 !important;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.profile-information-grid > div > strong {
    min-width: 0;
    overflow-wrap: anywhere;
    color: #111827 !important;
    font-size: clamp(16px, 1.45vw, 19px) !important;
    line-height: 1.25 !important;
}

.profile-password-panel {
    padding: 22px 28px !important;
}

.profile-password-panel .form-grid {
    gap: 14px 16px !important;
}

.profile-password-panel input {
    min-height: 44px !important;
}

.profile-password-checklist {
    padding: 12px 14px !important;
}

/* Admin mobile role must stay a readable Admin badge, not a profile avatar. */
@media (max-width: 980px) {
    .topbar-actions > .badge {
        display: inline-flex !important;
        width: auto !important;
        min-width: 58px !important;
        height: 34px !important;
        min-height: 34px !important;
        flex: 0 0 auto !important;
        align-items: center;
        justify-content: center;
        padding: 0 12px !important;
        overflow: visible !important;
        border: 1px solid rgba(255, 255, 255, .76) !important;
        border-radius: 999px !important;
        color: #4a1014 !important;
        background: #fff !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, .14);
        font-size: 12px !important;
        line-height: 1 !important;
    }

    .topbar-actions > .badge::before {
        display: none !important;
        content: none !important;
    }

    .dashboard-live-grid,
    .dashboard-side-stack,
    .live-orders-panel,
    .order-breakdown-card {
        height: auto !important;
        min-height: 0 !important;
    }

    .dashboard-live-grid {
        align-items: start !important;
    }

    .dashboard-side-stack {
        align-self: start !important;
        grid-template-rows: auto !important;
    }

    /* Remove the oversized empty gap in the admin Orders mobile toolbar. */
    .admin-orders-toolbar {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 14px !important;
        min-height: 0 !important;
        padding: 14px !important;
    }

    .admin-orders-toolbar .table-toolbar-title,
    .admin-orders-toolbar .table-toolbar-actions,
    .admin-orders-toolbar .admin-orders-toolbar-controls,
    .admin-orders-toolbar .admin-order-filters {
        width: 100% !important;
        min-width: 0 !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .admin-orders-toolbar .table-toolbar-title {
        flex: none !important;
    }

    .admin-orders-toolbar .table-toolbar-actions {
        display: grid !important;
        gap: 12px !important;
    }

    .admin-orders-toolbar .admin-orders-toolbar-controls {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 10px !important;
    }

    .admin-orders-toolbar .entries-control,
    .admin-orders-toolbar .entries-control label,
    .admin-orders-toolbar .entries-control select,
    .admin-orders-toolbar .admin-orders-toolbar-controls .btn,
    .admin-orders-toolbar .admin-order-filters input,
    .admin-orders-toolbar .admin-order-filters select,
    .admin-orders-toolbar .admin-order-filters .btn {
        width: 100% !important;
    }

    .admin-orders-toolbar .entries-control label {
        display: grid !important;
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .admin-orders-toolbar .admin-order-filters {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 10px !important;
    }
}

@media (max-width: 1080px) {
    .shopify-integration-hero {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .shopify-integration-hero-action {
        grid-column: 2;
        justify-self: start;
    }

    .shopify-integration-workflow {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .shopify-integration-hero {
        grid-template-columns: 1fr;
        align-items: start;
        gap: 14px;
        min-height: 0;
        padding: 20px;
    }

    .shopify-integration-hero-icon {
        width: 54px;
        height: 54px;
    }

    .shopify-integration-hero-icon svg {
        width: 26px;
        height: 26px;
    }

    .shopify-integration-hero-action {
        grid-column: auto;
        justify-self: stretch;
        width: 100%;
    }

    .shopify-integration-grid {
        grid-template-columns: 1fr;
    }

    .shopify-integration-grid > .panel {
        min-height: 0;
    }

    .profile-information-panel,
    .profile-password-panel {
        padding: 18px !important;
    }

    .profile-information-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
}

@media (max-width: 560px) {
    .topbar-actions > .badge {
        min-width: 54px !important;
        height: 32px !important;
        min-height: 32px !important;
        padding-inline: 10px !important;
        font-size: 11px !important;
    }
}
