/* Customer Dashboard Styles (Mobile First Refactor) */

:root {
    --customer-card-bg: #ffffff;
    --customer-card-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    --customer-card-shadow-hover: 0 6px 18px rgba(0, 0, 0, 0.10);
    --customer-card-radius: 6px;
    --customer-accent: #3BAA35;
    --customer-accent-soft: rgba(59, 170, 53, 0.08);
    --customer-text-main: #222222;
    --customer-text-muted: #666666;
    --customer-border: #E6E6E6;
    --customer-bg: #F5F5F5;
}

.shop-customer-dashboard {
    background: var(--customer-bg);
    min-height: 100vh;
    padding-bottom: 5rem;
    color: var(--customer-text-main);
}

/* Customer Settings Tabs (Account > Meine Daten) */
.customer-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--customer-border);
    border-radius: var(--customer-card-radius);
    background: var(--customer-card-bg);
    box-shadow: var(--customer-card-shadow);
    margin-bottom: 1.5rem;
}

.customer-tab {
    appearance: none;
    border: 1px solid transparent;
    background: transparent;
    color: var(--customer-text-muted);
    font-weight: 700;
    font-size: 0.875rem;
    padding: 0.65rem 0.9rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.customer-tab:hover {
    background: var(--customer-accent-soft);
    color: var(--customer-accent);
}

.customer-tab.is-active {
    background: var(--customer-accent);
    color: #fff;
}

.customer-tab:focus-visible {
    outline: 2px solid rgba(59, 170, 53, 0.55);
    outline-offset: 2px;
}

.customer-tab-panel[hidden] {
    display: none !important;
}

/* Breadcrumb Styling */
.breadcrumb {
    margin: 1rem 0;
    font-size: 0.875rem;
}

/* Dashboard Navigation Modernized */
.dashboard-nav {
    background: var(--customer-card-bg);
    border: none !important;
    border-radius: var(--customer-card-radius);
    box-shadow: var(--customer-card-shadow);
    margin-bottom: 2rem !important;
    padding: 0.5rem;
}

.dashboard-nav-menu {
    gap: 0.5rem !important;
    display: flex;
    flex-wrap: wrap;
    /* Allow wrapping on mobile */
}

.dashboard-nav-menu a {
    border-radius: 4px;
    border: none !important;
    padding: 0.75rem 1rem !important;
    font-size: 0.9rem !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    flex: 1 1 auto;
    /* Grow to fill space */
    text-align: center;
}

.dashboard-nav-menu a.active {
    background: var(--customer-accent) !important;
    color: white !important;
    font-weight: 500;
}

.dashboard-nav-menu a:not(.active):hover {
    background: var(--customer-accent-soft) !important;
    color: var(--customer-accent) !important;
}

/* Card Components */
.customer-card {
    background: var(--customer-card-bg);
    border-radius: var(--customer-card-radius);
    box-shadow: var(--customer-card-shadow);
    padding: 1.5rem;
    /* Reduced padding mobile */
    margin-bottom: 1.5rem;
    border: 1px solid var(--customer-border);
}

.customer-card:hover {
    box-shadow: var(--customer-card-shadow-hover);
}

/* Nested wrapper override for flat look */
.customer-card .customer-table-wrapper {
    border: none;
    box-shadow: none;
    border-radius: 0;
    margin-bottom: 0;
}

/* Ensure table items inside card have separation if needed, but table row border handles it */

.customer-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--customer-border);
    padding-bottom: 0.75rem;
}

.customer-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--customer-text-main);
}

/* Stats Modern Layout */
.dashboard-stats {
    display: grid;
    grid-template-columns: 1fr;
    /* Mobile Default */
    gap: 1rem !important;
    margin-bottom: 2rem;
}

/* Bento Grid Adapted for Mobile First */
.bento-grid {
    display: grid;
    grid-template-columns: 1fr;
    /* Mobile Default: 1 Col */
    gap: 1rem;
    grid-auto-rows: minmax(140px, auto);
}

.bento-card {
    background: var(--customer-card-bg);
    border-radius: var(--customer-card-radius);
    /* Unify Radius */
    border: 1px solid var(--customer-border);
    box-shadow: var(--customer-card-shadow);
    /* Unify Shadow */
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
    grid-column: span 1;
    /* Default span 1 */
}

.bento-card-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.bento-card-link:focus-visible {
    outline: 2px solid rgba(59, 170, 53, 0.6);
    outline-offset: 3px;
    border-radius: var(--customer-card-radius);
}

.widget-subtle {
    color: var(--customer-text-muted);
}

.widget-accent-link {
    color: var(--customer-accent);
    font-size: 0.875rem;
}

.widget-link-small {
    font-size: 0.75rem;
    color: var(--customer-accent);
    text-decoration: none;
}

.btn-block {
    width: 100%;
}

/* Customer Notification Settings (Account > Benachrichtigungen) */
.customer-notify-groups {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.customer-notify-group {
    padding: 12px;
    border: 1px solid var(--customer-border);
    border-radius: var(--customer-card-radius);
}

.customer-notify-group__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.customer-notify-group__title {
    font-weight: 700;
}

.customer-notify-group__hint {
    font-size: 12px;
    margin-top: 3px;
}

.customer-notify-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.customer-notify-item {
    padding: 12px;
    border: 1px solid var(--customer-border);
    border-radius: var(--customer-card-radius);
    display: flex;
    gap: 12px;
    align-items: flex-start;
    justify-content: space-between;
}

.customer-notify-item__left {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.customer-notify-item__name {
    font-weight: 600;
}

.customer-notify-item__help {
    max-width: 44ch;
    font-size: 12px;
    line-height: 1.35;
    padding-top: 2px;
    text-align: right;
}

/* 2FA (Customer Settings) */
.twofa-recovery-codes {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.twofa-recovery-code {
    padding: 6px 10px;
    border: 1px solid var(--customer-border);
    border-radius: var(--customer-card-radius);
    background: #fff;
}

.twofa-recovery-hint {
    margin-top: 8px;
}

.twofa-setup-card {
    padding: 16px;
}

.twofa-setup-grid {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.twofa-step {
    min-width: 220px;
}

.twofa-step--grow {
    flex: 1;
    min-width: 240px;
}

.twofa-step-title {
    font-weight: 700;
    margin-bottom: 6px;
}

.twofa-qr {
    margin-top: 12px;
    width: 210px;
    height: 210px;
    border: 1px solid var(--customer-border);
    border-radius: var(--customer-card-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

/* Order Card Definition */
.order-card {
    border: 1px solid var(--customer-border);
    border-radius: var(--customer-card-radius);
    /* Keep distinct or match card radius? 8px is fine for inner items */
    padding: 1rem;
    margin-bottom: 1rem;
    background: #fff;
    transition: all 0.2s ease;
}

.order-card:hover {
    border-color: rgba(59, 170, 53, 0.35);
    box-shadow: var(--customer-card-shadow-hover);
}

.order-detail-addresses {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.order-detail-address-box {
    flex: 1;
    min-width: 250px;
    background: var(--customer-bg);
    padding: 1.5rem;
    border-radius: var(--customer-card-radius);
    border: 1px solid var(--customer-border);
}

.order-address-title {
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--customer-border);
    padding-bottom: 0.5rem;
}

.order-meta-table-container {
    margin-bottom: 2rem;
}

.order-meta-table thead tr {
    background: var(--customer-bg);
    text-align: left;
}

.order-meta-table th,
.order-meta-table td {
    padding: 1rem;
}

.order-total-strong {
    font-weight: 700;
}

.order-items-table-container {
    margin-top: 2rem;
    overflow-x: auto;
}

.order-items-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.order-items-title {
    margin-bottom: 0;
}

.order-items-table thead tr {
    background: var(--customer-bg);
    text-align: left;
}

.order-items-table th,
.order-items-table td {
    padding: 1rem;
}

.order-items-table tbody tr {
    border-bottom: 1px solid var(--customer-border);
}

.order-item-media__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--customer-text-muted, #6b7280);
}

.order-item-media__placeholder svg {
    opacity: 0.7;
}

.order-items-total-row {
    border-top: 1px solid var(--customer-border);
}

.order-items-total-row--final {
    border-top: 2px solid var(--customer-border);
}

.order-total-label {
    font-weight: 700;
    font-size: 1.05rem;
}

.order-total-value {
    font-weight: 700;
    font-size: 1.05rem;
}

.btn-invoice {
    background-color: #10b981;
    border-color: #10b981;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-invoice--disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: transparent;
}

/* Desktop Overrides for Grid */
@media (min-width: 640px) {
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .bento-card.span-2 {
        grid-column: span 2;
    }

    .bento-card.span-4 {
        grid-column: span 2;
        /* Tablet: Span 2 cols (full width in 2-col grid) */
    }
}

@media (min-width: 1024px) {
    .dashboard-stats {
        grid-template-columns: repeat(4, 1fr) !important;
    }

    .bento-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .bento-card.span-4 {
        grid-column: span 4;
    }

    .bento-card.row-2 {
        grid-row: span 2;
    }

    .customer-card {
        padding: 2rem;
        margin-bottom: 2rem;
    }
}

/* New Utility Classes for View Cleanup */
.customer-welcome-card {
    display: flex;
    flex-direction: column;
    /* Mobile Default */
    align-items: flex-start;
    gap: 1rem;
}

@media (min-width: 640px) {
    .customer-welcome-card {
        flex-direction: row;
        align-items: center;
        gap: 1.5rem;
    }
}

.customer-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--customer-border);
    flex-shrink: 0;
}

.customer-avatar-placeholder {
    width: 80px;
    height: 80px;
    background: #f5f5f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    flex-shrink: 0;
}

.customer-welcome-content {
    padding: 0.5rem 0;
}

.customer-welcome-title {
    font-size: 2.125rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: var(--customer-text-main);
}

.customer-welcome-text {
    color: var(--customer-text-muted);
    margin: 0.5rem 0 0;
    line-height: 1.5;
}

/* Widget Content Refactor */
.widget-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--customer-text-muted);
    margin-bottom: 0.5rem;
}

.widget-value {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--customer-text-main);
    margin-top: auto;
}

.widget-trend {
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.trend-up {
    color: #10b981;
}

.trend-down {
    color: #ef4444;
}

/* Recent Order Widget */
.widget-recent-order {
    flex: 1;
    display: flex;
    flex-direction: column;
    /* Mobile Default: Stacked */
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 1rem;
}

.widget-recent-order-icon {
    width: 60px;
    height: 60px;
    background: #f3f4f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
}

.widget-recent-order-info {
    font-weight: 600;
    font-size: 1.125rem;
}

.widget-recent-order-date {
    color: var(--customer-text-muted);
    margin-top: 0.25rem;
    font-size: 0.875rem;
    font-weight: 400;
}

/* Forms & Settings Refactor */
.form-group-card {
    display: grid;
    grid-template-columns: 1fr;
    /* Mobile Default */
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
    .form-group-card {
        grid-template-columns: 1fr 1fr;
    }
}

.modern-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--customer-border);
    border-radius: 4px;
    /* Slightly smaller radius */
    background: #fdfdfd;
    transition: all 0.2s ease;
    font-size: 1rem;
    /* Prevent iOS input-zoom (needs >= 16px). */
}

.modern-input:focus {
    border-color: var(--customer-accent);
    box-shadow: 0 0 0 3px var(--customer-accent-soft);
    outline: none;
}

.label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.375rem;
}

/* Settings Avatar */
.settings-avatar-section {
    display: flex;
    flex-direction: column;
    /* Mobile Default */
    gap: 1.5rem;
    align-items: center;
    /* Center on mobile */
}

@media (min-width: 640px) {
    .settings-avatar-section {
        flex-direction: row;
        align-items: flex-start;
        gap: 2rem;
    }
}

.settings-avatar-preview {
    flex-shrink: 0;
    text-align: center;
}

.settings-avatar-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--customer-border);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.settings-avatar-form {
    flex: 1;
    width: 100%;
}

.avatar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    /* Responsive Grid */
    gap: 0.75rem;
    margin: 1rem 0;
}

.avatar-option-label {
    cursor: pointer;
    display: block;
    margin: 0;
}

.avatar-option-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid transparent;
    transition: all 0.2s;
    display: block;
    margin: 0 auto;
}

.avatar-option-label:hover .avatar-option-img {
    transform: scale(1.1);
}

.avatar-option-input:checked+.avatar-option-img {
    border-color: #3b82f6;
}

/* Utilities */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right !important;
}

.mb-8 {
    margin-bottom: 2rem !important;
}

.mb-4 {
    margin-bottom: 1rem !important;
}

.mt-8 {
    margin-top: 2rem !important;
}

.mt-4 {
    margin-top: 1rem !important;
}

/* Tables */
.customer-table-wrapper {
    background: #fff;
    border: 1px solid var(--customer-border);
    border-radius: var(--customer-card-radius);
    overflow: hidden;
    overflow-x: auto;
    margin-bottom: 2rem;
    -webkit-overflow-scrolling: touch;
}

.customer-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
    /* Ensure table doesn't squash */
}

.customer-table th,
.customer-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--customer-border);
}

.customer-table th {
    background: #f5f5f5;
    font-weight: 600;
    font-size: 0.875rem;
}

@media (max-width: 640px) {
    .customer-notify-item {
        flex-direction: column;
        align-items: stretch;
    }

    .customer-notify-item__help {
        max-width: none;
        text-align: left;
    }

    .customer-table {
        min-width: 0;
    }

    .customer-table th,
    .customer-table td {
        padding: 0.75rem;
        white-space: normal;
    }

    .customer-table td {
        overflow-wrap: anywhere;
        word-break: break-word;
    }
}

/* Order List Items Scroll */
.order-items-scroll {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--customer-border);
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    /* Scrollbar space */
}

.order-item-badge {
    background: #f5f5f5;
    padding: 0.5rem;
    border-radius: 8px;
    font-size: 0.8rem;
    white-space: nowrap;
    border: 1px solid var(--customer-border);
    flex-shrink: 0;
}

.badge {
    border-radius: 9999px !important;
    padding: 4px 12px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    text-transform: uppercase;
}

.badge-pending {
    background: #fff7ed;
    color: #c2410c;
}

.badge-paid {
    background: #ecfdf5;
    color: #047857;
}

.badge-shipped {
    background: #eff6ff;
    color: #1d4ed8;
}

.badge-completed {
    background: #f0fdf4;
    color: #15803d;
}

.badge-cancelled {
    background: #fef2f2;
    color: #b91c1c;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.btn-primary {
    background: #3BAA35;
    color: #fff;
}

.btn-primary:hover {
    background: #2F8F2B;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-secondary {
    background: #fff;
    border-color: #E6E6E6;
    color: #222222;
}

.btn-secondary:hover {
    background: rgba(59, 170, 53, 0.08);
    border-color: #3BAA35;
    color: #3BAA35;
}

.btn-outline {
    background: transparent;
    border: 1px solid #3BAA35;
    color: #3BAA35;
}

.btn-outline:hover {
    border-color: #3BAA35;
    color: #3BAA35;
}

/* Collapsible Order History */
.order-header {
    cursor: pointer;
    position: relative;
    width: 100%;
    background: transparent;
    border: 0;
    padding: 0;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    user-select: none;
}

.order-header:focus-visible {
    outline: 2px solid rgba(59, 170, 53, 0.6);
    outline-offset: 3px;
    border-radius: var(--customer-card-radius);
}

.order-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.order-title {
    font-weight: 700;
    font-size: 1rem;
}

.order-date {
    font-size: 0.8rem;
}

.order-status {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.order-details-inner {
    padding-top: 1rem;
    border-top: 1px solid var(--customer-border);
}

.order-details-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.order-payment {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.order-amount-strong {
    font-size: 1.1rem;
}

.order-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.btn-success {
    background-color: #10b981;
    border-color: #10b981;
    color: #fff;
}

.btn-success:hover {
    background-color: #0ea371;
    border-color: #0ea371;
    color: #fff;
}

.order-toggle-icon {
    transition: transform 0.3s ease;
    color: var(--customer-text-muted);
}

.order-card.expanded .order-toggle-icon {
    transform: rotate(180deg);
    color: var(--customer-accent);
}

.order-details {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-in, margin 0.3s ease;
}

.order-card.expanded .order-details {
    opacity: 1;
    margin-top: 1rem;
    /* max-height set via JS for smoothness */
}

.order-header-price {
    font-weight: 700;
    color: var(--customer-text-main);
    margin-right: 1rem;
    white-space: nowrap;
}

/* Address Book List & Modal */
.address-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .address-list {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

.customer-card-sub {
    background: #fdfdfd;
    border: 1px solid var(--customer-border);
    border-radius: var(--customer-card-radius);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
    transition: all 0.2s ease;
}

.customer-card-sub:hover {
    border-color: rgba(59, 170, 53, 0.35);
    box-shadow: var(--customer-card-shadow-hover);
}

.address-details {
    line-height: 1.6;
    font-size: 0.95rem;
    color: var(--customer-text-muted);
}

.address-details strong {
    color: var(--customer-text-main);
    font-size: 1rem;
}

.address-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
    border-top: 1px solid var(--customer-border);
    padding-top: 1rem;
    margin-top: auto;
}

/* Modal Styles */
.modal-overlay {
    z-index: 1000;
    backdrop-filter: blur(4px);
    padding: 1rem;
}

.modal-content {
    animation: modalSlideUp 0.3s ease-out;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-danger-outline {
    background: transparent;
    border: 1px solid #fca5a5;
    color: #ef4444;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger-outline:hover {
    background: #fef2f2;
    border-color: #ef4444;
}

/* Customer Dashboard Updates */

.customer-link-subtle {
    text-decoration: none;
    color: var(--customer-text-muted);
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s;
}

.customer-link-subtle:hover {
    color: var(--customer-accent);
}

/* Support Icon via CSS */
.customer-link-subtle::before {
    content: "";
    /* Question mark SVG icon */
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3'/%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    transition: background-image 0.2s;
}

.customer-link-subtle:hover::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%233BAA35' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3'/%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'/%3E%3C/svg%3E");
}

/* Order Detail Addresses */
.order-detail-addresses {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 640px) {
    .order-detail-addresses {
        grid-template-columns: 1fr 1fr;
    }
}

.address-box {
    background: var(--customer-bg);
    padding: 1.5rem;
    border-radius: var(--customer-card-radius);
    border: 1px solid var(--customer-border);
}

.address-box h4 {
    margin-top: 0;
}

/* Support */
.support-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 900px) {
    .support-grid {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
}

.support-contact {
    background: var(--customer-bg);
    border: 1px solid var(--customer-border);
    border-radius: var(--customer-card-radius);
    padding: 1.25rem;
}

.support-contact h3 {
    margin-top: 0;
}

.support-form-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.support-ticket-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.support-bulk-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 0 0 0.75rem;
}

.support-bulk-selectall {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--customer-text-muted);
    font-size: 0.9rem;
    user-select: none;
}

.support-bulk-actions {
    display: inline-flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.support-ticket-row {
    display: flex;
    align-items: stretch;
    gap: 0.75rem;
}

.support-ticket-checkbox {
    width: 18px;
    height: 18px;
    margin: 0.9rem 0 0;
    flex: 0 0 auto;
}

.support-ticket-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem;
    border: 1px solid var(--customer-border);
    border-radius: var(--customer-card-radius);
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.support-ticket-item:hover {
    border-color: rgba(59, 170, 53, 0.35);
    box-shadow: var(--customer-card-shadow-hover);
}

.support-ticket-meta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: baseline;
    color: var(--customer-text-muted);
    font-size: 0.875rem;
}

.support-ticket-status {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    border: 1px solid var(--customer-border);
    background: var(--customer-bg);
    color: var(--customer-text-muted);
    font-size: 0.8rem;
}

.support-ticket-status.is-open {
    border-color: rgba(59, 170, 53, 0.3);
    background: rgba(59, 170, 53, 0.10);
    color: #166534;
}

.support-ticket-status.is-answered {
    border-color: rgba(59, 130, 246, 0.35);
    background: rgba(59, 130, 246, 0.10);
    color: #1d4ed8;
}

.support-thread {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.support-msg {
    border: 1px solid var(--customer-border);
    border-radius: var(--customer-card-radius);
    padding: 1rem;
    background: #fff;
}

.support-msg.is-merchant {
    border-color: rgba(59, 170, 53, 0.3);
    background: rgba(59, 170, 53, 0.08);
}

.support-msg-head {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: baseline;
}

.support-msg-text {
    margin-top: 0.5rem;
    white-space: pre-wrap;
}

.support-attachments {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.support-attachment {
    font-size: 0.875rem;
    color: var(--customer-text-muted);
    text-decoration: underline;
}

.support-attachment:hover {
    color: var(--customer-text-main);
}

.support-attachment--image {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.support-attachment-thumb {
    width: 88px;
    height: 64px;
    border-radius: var(--customer-card-radius);
    object-fit: cover;
    border: 1px solid var(--customer-border);
    background: #fff;
}

.support-attachment-name {
    text-decoration: underline;
}

.support-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
}

.customer-nav-badge {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 18px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.10);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #b91c1c;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
}

.support-order-info {
    margin-top: 0;
}

.customer-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.customer-product-tile {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-tile__link {
    text-decoration: none;
    color: inherit;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.customer-product-img-wrap {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f9fafb;
}

.customer-product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-tile__link:hover .customer-product-img {
    transform: scale(1.03);
}

.customer-product-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
}

.customer-product-info {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.customer-product-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    color: var(--customer-text-main);
}

.customer-product-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--customer-text-main);
}

.customer-product-meta {
    margin-top: 0.35rem;
    font-size: 0.85rem;
    color: var(--customer-text-muted);
}

.customer-product-footer {
    padding: 1rem;
    padding-top: 0;
    display: flex;
    gap: 0.75rem;
}

.customer-product-actions {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 10;
}

.customer-favorite-remove-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 50%;
    background: #fff;
    color: #ef4444;
    border: 1px solid var(--customer-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    cursor: pointer;
}

.customer-favorite-remove-btn:hover {
    border-color: #ef4444;
    background: #fef2f2;
}

.customer-flex-1 {
    flex: 1;
}

.customer-btn-full {
    width: 100%;
}

.customer-form-reset {
    margin: 0;
}

.downloads-order-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: baseline;
    flex-wrap: wrap;
}

.downloads-order-date {
    margin: 0.25rem 0 0;
}

.downloads-file-list {
    margin-top: 1rem;
    display: grid;
    gap: 0.75rem;
}

.downloads-file-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    border: 1px solid var(--customer-border);
    border-radius: var(--customer-card-radius);
    padding: 0.75rem 0.9rem;
}

.downloads-file-info {
    min-width: 200px;
}

.downloads-file-name {
    font-weight: 600;
}

.downloads-file-last {
    font-size: 0.9rem;
}

.downloads-btn-disabled {
    pointer-events: none;
    opacity: 0.7;
}

.dashboard-action-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.dashboard-action-title {
    margin: 0;
    font-weight: 500;
}

.dashboard-action-subtitle {
    font-weight: 400;
    font-size: 0.875rem;
}

.dashboard-action-link {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--customer-accent);
    text-decoration: none;
}

.dashboard-action-link:hover {
    text-decoration: underline;
}

.payments-open-value {
    color: #b45309;
}

.payments-title {
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.payments-order-link {
    font-weight: 500;
    color: var(--customer-text-main);
    text-decoration: none;
}

.payments-order-link:hover {
    text-decoration: underline;
}

.payments-empty-row {
    padding: 2rem;
    text-align: center;
    color: var(--customer-text-muted);
}

.customer-table-wrapper-flat {
    border: none;
    box-shadow: none;
    margin-bottom: 0;
}

.customer-cell-pad {
    padding: 1rem;
}

.order-support-btn {
    margin-left: 0.5rem;
}

.support-badge-new {
    margin-left: 6px;
}

.settings-avatar-placeholder {
    width: 120px;
    height: 120px;
    font-size: 3rem;
}

.settings-section-title {
    font-size: 1rem;
}

.customer-hidden-input {
    display: none;
}

.customer-inline-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.settings-file-input {
    padding: 0.5rem;
    max-width: 300px;
}

.customer-input-disabled {
    background: #f3f4f6;
    cursor: not-allowed;
}

.customer-note-xs {
    font-size: 0.75rem;
}

.customer-inline-form {
    display: inline;
}

.customer-address-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.customer-address-modal-content {
    width: 100%;
    max-width: 500px;
    margin: 2rem;
}

.customer-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.customer-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.customer-check-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.customer-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.customer-grid-street {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
}

.customer-grid-city {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1rem;
}

.customer-actions-end {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.customer-privacy-box {
    background: #fff;
    border: 1px solid var(--customer-border);
    border-radius: var(--customer-card-radius);
    padding: 14px;
}

.customer-privacy-box-muted {
    background: #f9fafb;
}

.customer-privacy-title {
    margin: 0 0 6px;
    font-size: 1rem;
}

.customer-privacy-list {
    margin: 0;
    padding-left: 18px;
    color: var(--customer-text-muted);
    font-size: 0.875rem;
    line-height: 1.45;
}

.customer-input-240 {
    max-width: 240px;
}

.customer-input-200 {
    max-width: 200px;
}

.customer-danger-zone {
    border-color: #fca5a5;
    background: #fef2f2;
}

.customer-danger-title {
    color: #ef4444;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.customer-danger-text {
    font-size: 0.875rem;
    color: #7f1d1d;
    margin-bottom: 1rem;
}

.customer-btn-danger {
    background: #ef4444;
    color: #fff;
    border: none;
}

.customer-btn-danger:hover {
    background: #dc2626;
}

@media (max-width: 640px) {
    .customer-grid-2,
    .customer-grid-street,
    .customer-grid-city {
        grid-template-columns: 1fr;
    }

    .customer-input-240,
    .customer-input-200,
    .settings-file-input {
        max-width: 100%;
    }
}

.m-0 {
    margin: 0;
}
