/* ============================================================================
   Tarawera — My Projects (My Account page)
   ============================================================================ */

/* Header */
.toe-my-account {
    max-width: 1000px;
}

.toe-ma-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #e8604c;
    border-radius: 12px;
    padding: 20px 28px;
    margin-bottom: 24px;
}

.toe-ma-header h2 {
    color: #fff;
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.toe-ma-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

#toe-ma-search {
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 15px;
    width: 240px;
    outline: none;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
}

.toe-ma-delete-all {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 16px;
    border-radius: 8px;
    background: #c0392b;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    transition: opacity .15s, transform .1s;
}

.toe-ma-delete-all:hover {
    color: #fff;
    opacity: .9;
    transform: translateY(-1px);
}

.toe-ma-empty {
    color: #888;
    text-align: center;
    padding: 40px 0;
    font-size: 16px;
}

/* ============================================================================
   Orders
   ============================================================================ */

.toe-orders-search-form {
    margin: 0;
}

#toe-orders-search {
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 15px;
    width: 240px;
    outline: none;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
}

.toe-order-card {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.toe-order-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 20px;
    border-bottom: 1px solid #111;
    background: #fafafa;
}

.toe-order-title {
    font-size: 18px;
    font-weight: 700;
}

.toe-order-status {
    font-size: 16px;
    font-weight: 700;
    font-style: italic;
}

.toe-order-card-body {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr) minmax(280px, 300px);
    gap: 20px;
    padding: 16px;
}

.toe-order-previews {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toe-order-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    background: #f8f8f8;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    overflow: hidden;
}

.toe-order-preview img {
    max-width: 100%;
    max-height: 150px;
    object-fit: contain;
}

.toe-order-main,
.toe-order-payment {
    min-width: 0;
}

.toe-order-project-list {
    border: 1px solid #d8e0ea;
    padding: 10px 12px;
    margin-bottom: 12px;
    font-weight: 600;
}

.toe-order-table {
    width: 100%;
    border-collapse: collapse;
}

.toe-order-table th,
.toe-order-table td {
    border: 1px solid #d8e0ea;
    padding: 7px 10px;
    vertical-align: top;
    overflow-wrap: anywhere;
}

.toe-order-table th {
    width: 48%;
    text-align: left;
    font-weight: 600;
    color: #333;
}

.toe-order-table td {
    color: #777;
}

.toe-order-payment-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.toe-order-payment-badge--paid {
    background: #e7f6ed;
    color: #1f7a3f;
}

.toe-order-payment-badge--unpaid {
    background: #fff4df;
    color: #9a5b00;
}

.toe-order-removal th,
.toe-order-removal td {
    color: #e8604c;
    font-weight: 700;
}

.toe-order-action {
    display: block;
    margin: 16px auto 12px;
    padding: 12px 18px;
    max-width: 240px;
    border-radius: 10px;
    background: #35a832;
    color: #fff;
    text-align: center;
    text-decoration: none;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.25;
}

.toe-order-action:hover {
    color: #fff;
    opacity: .9;
}

.toe-order-total {
    max-width: 220px;
    margin: 0 auto;
    padding: 8px 14px;
    border-radius: 10px;
    background: #8db99e;
    color: #fff;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
}

/* ============================================================================
   Project card
   ============================================================================ */

.toe-ma-card {
    position: relative;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

/* Card header row — project name */
.toe-ma-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
}

.toe-ma-project-name {
    font-weight: 700;
    font-size: 16px;
    font-style: italic;
}

.toe-ma-project-id {
    color: #aaa;
    font-size: 13px;
}

/* Card body — three columns */
.toe-ma-card-body {
    display: grid;
    grid-template-columns: 220px 1fr 160px;
    gap: 0;
}

/* Photo column */
.toe-ma-photo {
    border-right: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: #f8f8f8;
    min-height: 200px;
}

.toe-ma-photo img {
    max-width: 100%;
    max-height: 220px;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

.toe-ma-photo-placeholder {
    color: #bbb;
    font-size: 13px;
    text-align: center;
}

.toe-ma-design-preview {
    position: relative;
    container-type: size;
    width: min(100%, 168px);
    background: #dfe7ef;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

.toe-ma-design-preview::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        45deg,
        rgba(255,255,255,.25) 0,
        rgba(255,255,255,.25) 8px,
        rgba(255,255,255,.08) 8px,
        rgba(255,255,255,.08) 16px
    );
}

.toe-ma-design-preview__svg {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
}

.toe-ma-design-preview__background,
.toe-ma-design-preview__image,
.toe-ma-design-preview__text {
    position: absolute;
}

.toe-ma-photo .toe-ma-design-preview__background {
    z-index: 1;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
}

.toe-ma-design-preview__image {
    display: block;
    overflow: hidden;
    background: rgba(255,255,255,.55);
}

.toe-ma-photo .toe-ma-design-preview__image img {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
}

.toe-ma-design-preview__text {
    display: block;
    min-width: 24px;
    min-height: 14px;
    padding: 2px 4px;
    white-space: pre;
    text-align: center;
    text-shadow: 0 1px 2px rgba(255,255,255,0.18);
}

/* Details column */
.toe-ma-details {
    padding: 16px 20px;
}

.toe-ma-details table {
    width: 100%;
    border-collapse: collapse;
}

.toe-ma-details th {
    text-align: left;
    font-weight: 500;
    color: #555;
    padding: 5px 12px 5px 0;
    white-space: nowrap;
    width: 160px;
}

.toe-ma-details td {
    color: #888;
    padding: 5px 0;
}

.toe-ma-removal-soon td,
.toe-ma-removal-soon th {
    color: #e8604c !important;
    font-weight: 600;
}

/* Buttons column */
.toe-ma-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    border-left: 1px solid #f0f0f0;
    justify-content: center;
}

.toe-ma-btn {
    display: block;
    text-align: center;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: opacity .15s, transform .1s;
    line-height: 1.2;
}

.toe-ma-btn:hover {
    opacity: .85;
    transform: translateY(-1px);
}

.toe-ma-btn--price,
.toe-ma-btn--add-cart { background: #e8604c; color: #fff; }
.toe-ma-btn--preview { background: #4a9e6f; color: #fff; }
.toe-ma-btn--edit    { background: #4a9e6f; color: #fff; }
.toe-ma-btn--copy    { background: #4a9e6f; color: #fff; }
.toe-ma-btn--delete  { background: #c0392b; color: #fff; }

.toe-ma-btn--disabled {
    opacity: .4 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* ============================================================================
   Pending overlay
   ============================================================================ */

.toe-ma-card--pending {
    overflow: hidden;
}

.toe-ma-pending-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.88);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    backdrop-filter: blur(2px);
}

.toe-ma-pending-overlay p {
    font-weight: 700;
    font-size: 16px;
    color: #333;
    margin: 0;
}

.toe-ma-pending-overlay small {
    color: #888;
    font-size: 13px;
}

.toe-ma-pending-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e0e0e0;
    border-top-color: #e8604c;
    border-radius: 50%;
    animation: toe-spin 0.8s linear infinite;
}

@keyframes toe-spin {
    to { transform: rotate(360deg); }
}

/* ============================================================================
   Pagination
   ============================================================================ */

.toe-ma-pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 24px;
}

.toe-ma-page {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 6px;
    border: 1px solid #ddd;
    color: #555;
    text-decoration: none;
    font-size: 14px;
    transition: background .15s;
}

.toe-ma-page:hover         { background: #f5f5f5; }
.toe-ma-page--active       { background: #e8604c; color: #fff; border-color: #e8604c; }

/* ============================================================================
   Price modal
   ============================================================================ */

.toe-ma-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toe-ma-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 99998;
}

.toe-ma-modal-inner {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 32px 36px;
    min-width: 280px;
    z-index: 99999;
    box-shadow: 0 8px 40px rgba(0,0,0,.18);
}

.toe-ma-modal-inner h3 {
    margin: 0 0 16px;
    font-size: 18px;
}

.toe-ma-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #888;
    line-height: 1;
}

.toe-price-table th {
    text-align: left;
    padding: 6px 16px 6px 0;
    color: #555;
    font-weight: 500;
}

.toe-price-table td {
    padding: 6px 0;
    font-size: 16px;
}

/* ============================================================================
   Responsive
   ============================================================================ */

@media (max-width: 700px) {
    .toe-ma-header {
        align-items: stretch;
        flex-direction: column;
        gap: 14px;
    }
    .toe-ma-header-actions {
        align-items: stretch;
        flex-direction: column;
    }
    .toe-ma-card-body {
        grid-template-columns: 1fr;
    }
    .toe-ma-photo {
        border-right: none;
        border-bottom: 1px solid #f0f0f0;
        min-height: 140px;
    }
    .toe-ma-actions {
        border-left: none;
        border-top: 1px solid #f0f0f0;
        flex-direction: row;
        flex-wrap: wrap;
    }
    .toe-ma-btn { flex: 1; min-width: 80px; }
    #toe-ma-search { width: 100%; }
    #toe-orders-search { width: 160px; }

    .toe-orders-search-form {
        width: 100%;
    }

    .toe-order-card-body {
        grid-template-columns: 1fr;
    }

    .toe-order-card-header,
    .toe-ma-header {
        align-items: stretch;
        flex-direction: column;
    }

    .toe-order-previews {
        flex-direction: row;
        overflow-x: auto;
    }

    .toe-order-preview {
        min-width: 140px;
    }
}

/* In-cart state — single centered button */
.toe-ma-actions--in-cart {
    justify-content: center;
    align-items: center;
}

.toe-ma-btn--remove-cart {
    background: #e8604c;
    color: #fff;
    white-space: nowrap;
    text-align: center;
}
.toe-ma-btn--remove-cart:hover { background: #c94e3a; }

/* Add-to-cart loading overlay */
.toe-ma-is-ordering body {
    overflow: hidden;
}

.toe-ma-is-ordering .toe-my-account {
    filter: blur(2px);
    pointer-events: none;
    user-select: none;
}

.toe-ma-ordering-overlay {
    position: fixed;
    inset: 0;
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(2px);
    cursor: not-allowed;
}

.toe-ma-ordering-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
}

.toe-ma-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, .25);
    border-top-color: #e8604c;
    border-radius: 50%;
    animation: toe-spin .8s linear infinite;
}

.toe-email-prefs-form {
    display: grid;
    gap: 16px;
}

.toe-email-prefs-group {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.toe-email-prefs-group h3 {
    margin: 0;
    padding: 14px 18px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 16px;
}

.toe-email-pref-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 18px;
    border-bottom: 1px solid #edf0f3;
}

.toe-email-pref-row:last-child {
    border-bottom: 0;
}

.toe-email-pref-copy {
    display: grid;
    gap: 4px;
}

.toe-email-pref-copy strong {
    font-size: 14px;
}

.toe-email-pref-copy small,
.toe-email-pref-copy em,
.toe-email-prefs-empty {
    color: #64748b;
    font-size: 13px;
    font-style: normal;
}

.toe-email-pref-toggle input {
    width: 20px;
    height: 20px;
}

/* ============================================================================
   Premium customer dashboard refresh — Orders + My Projects
   ============================================================================ */

:root {
    --toe-ma-bg: #F5F5F7;
    --toe-ma-card-bg: #FFFFFF;
    --toe-ma-border: #E5E7EB;
    --toe-ma-primary: #0EA5A4;
    --toe-ma-primary-hover: #0F766E;
    --toe-ma-primary-soft: #CCFBF1;
    --toe-ma-success: #22C55E;
    --toe-ma-warning: #F59E0B;
    --toe-ma-error: #EF4444;
    --toe-ma-text: #111827;
    --toe-ma-muted: #6B7280;
    --toe-ma-shadow: 0 18px 45px rgba(15, 23, 42, .08);
    --toe-ma-shadow-sm: 0 8px 22px rgba(15, 23, 42, .06);
    --toe-ma-radius: 12px;
}

.woocommerce-account .woocommerce,
.woocommerce-account .entry-content,
.woocommerce-account .site-main,
.toe-my-account {
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.woocommerce-account .entry-content,
.woocommerce-account .site-main {
    background: var(--toe-ma-bg);
}

.woocommerce-account .woocommerce {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    max-width: 1480px;
    margin: 0 auto;
    padding: 26px 24px 42px;
}

.woocommerce-account .woocommerce-MyAccount-navigation {
    position: sticky;
    top: 24px;
    width: auto;
    float: none;
    padding: 14px;
    border: 1px solid var(--toe-ma-border);
    border-radius: var(--toe-ma-radius);
    background: var(--toe-ma-card-bg);
    box-shadow: var(--toe-ma-shadow-sm);
}

.woocommerce-account .woocommerce-MyAccount-navigation ul {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.woocommerce-account .woocommerce-MyAccount-navigation li {
    margin: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 0 14px;
    border-radius: 10px;
    color: #334155;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.woocommerce-account .woocommerce-MyAccount-navigation a::before {
    content: "";
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    opacity: .82;
    background: currentColor;
    -webkit-mask: var(--toe-ma-nav-icon, linear-gradient(#000 0 0)) center / contain no-repeat;
    mask: var(--toe-ma-nav-icon, linear-gradient(#000 0 0)) center / contain no-repeat;
}

.woocommerce-account .woocommerce-MyAccount-navigation-link--dashboard a {
    --toe-ma-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2'%3E%3Cpath d='M4 4h7v7H4zM13 4h7v7h-7zM4 13h7v7H4zM13 13h7v7h-7z'/%3E%3C/svg%3E");
}
.woocommerce-account .woocommerce-MyAccount-navigation-link--orders a {
    --toe-ma-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2'%3E%3Cpath d='M6 7h12l-1 13H7L6 7Z'/%3E%3Cpath d='M9 7a3 3 0 0 1 6 0'/%3E%3C/svg%3E");
}
.woocommerce-account .woocommerce-MyAccount-navigation-link--downloads a {
    --toe-ma-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2'%3E%3Cpath d='M12 3v12m0 0 4-4m-4 4-4-4M5 21h14'/%3E%3C/svg%3E");
}
.woocommerce-account .woocommerce-MyAccount-navigation-link--edit-address a {
    --toe-ma-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2'%3E%3Cpath d='m3 11 9-8 9 8'/%3E%3Cpath d='M5 10v10h14V10'/%3E%3C/svg%3E");
}
.woocommerce-account .woocommerce-MyAccount-navigation-link--edit-account a {
    --toe-ma-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2'%3E%3Cpath d='M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z'/%3E%3Cpath d='M4 21a8 8 0 0 1 16 0'/%3E%3C/svg%3E");
}
.woocommerce-account .woocommerce-MyAccount-navigation-link--my-projects a {
    --toe-ma-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2'%3E%3Cpath d='M6 3h9l3 3v15H6z'/%3E%3Cpath d='M15 3v4h4M9 13h6M9 17h6'/%3E%3C/svg%3E");
}
.woocommerce-account .woocommerce-MyAccount-navigation-link--email-notifications a {
    --toe-ma-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2'%3E%3Cpath d='M4 6h16v12H4z'/%3E%3Cpath d='m4 7 8 6 8-6'/%3E%3C/svg%3E");
}
.woocommerce-account .woocommerce-MyAccount-navigation-link--customer-logout a {
    --toe-ma-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2'%3E%3Cpath d='M10 5H5v14h5M15 8l4 4-4 4M8 12h11'/%3E%3C/svg%3E");
}

.woocommerce-account .woocommerce-MyAccount-navigation a:hover,
.woocommerce-account .woocommerce-MyAccount-navigation a:focus-visible {
    background: #F8FAFC;
    color: var(--toe-ma-primary-hover);
    outline: none;
    transform: translateX(2px);
}

.woocommerce-account .woocommerce-MyAccount-navigation .is-active a {
    background: linear-gradient(135deg, var(--toe-ma-primary), #14B8A6);
    color: #fff;
    box-shadow: 0 10px 22px rgba(14, 165, 164, .22);
}

.woocommerce-account .woocommerce-MyAccount-content {
    width: auto;
    float: none;
    min-width: 0;
}

.toe-my-account {
    max-width: none;
    color: var(--toe-ma-text);
}

.toe-ma-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 22px;
    padding: 0;
    border-radius: 0;
    background: transparent;
}

.toe-ma-header h2 {
    color: var(--toe-ma-text);
    font-size: 26px;
    font-weight: 900;
    letter-spacing: 0;
}

.toe-ma-header-actions,
.toe-orders-search-form {
    display: flex;
    align-items: center;
    gap: 12px;
}

#toe-ma-search,
#toe-orders-search {
    width: min(100%, 320px);
    min-height: 46px;
    padding: 0 16px 0 42px;
    border: 1px solid var(--toe-ma-border);
    border-radius: 10px;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236B7280' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") 14px center / 18px 18px no-repeat,
        #fff;
    color: var(--toe-ma-text);
    box-shadow: var(--toe-ma-shadow-sm);
}

#toe-ma-search::placeholder,
#toe-orders-search::placeholder {
    color: #9CA3AF;
}

.toe-ma-delete-all {
    min-height: 44px;
    border: 1px solid rgba(239, 68, 68, .32);
    border-radius: 10px;
    background: #fff;
    color: #B91C1C;
    box-shadow: none;
}

.toe-ma-delete-all:hover {
    background: #FEF2F2;
    color: #991B1B;
}

.toe-ma-empty {
    margin: 0;
    padding: 42px 24px;
    border: 1px solid var(--toe-ma-border);
    border-radius: var(--toe-ma-radius);
    background: #fff;
    color: var(--toe-ma-muted);
    box-shadow: var(--toe-ma-shadow-sm);
}

.toe-order-card,
.toe-ma-card {
    overflow: hidden;
    margin-bottom: 22px;
    border: 1px solid var(--toe-ma-border);
    border-radius: var(--toe-ma-radius);
    background: var(--toe-ma-card-bg);
    box-shadow: var(--toe-ma-shadow);
}

.toe-order-card-header,
.toe-ma-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 64px;
    padding: 0 22px;
    border-bottom: 1px solid var(--toe-ma-border);
    background: #fff;
}

.toe-order-title,
.toe-ma-project-name {
    color: var(--toe-ma-text);
    font-size: 18px;
    font-style: normal;
    font-weight: 900;
}

.toe-order-status,
.toe-ma-project-id {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: #F8FAFC;
    color: var(--toe-ma-muted);
    font-size: 13px;
    font-style: normal;
    font-weight: 900;
}

.toe-order-status::before {
    content: "";
    width: 7px;
    height: 7px;
    margin-right: 8px;
    border-radius: 50%;
    background: var(--toe-ma-warning);
}

.toe-order-card-body {
    display: grid;
    grid-template-columns: minmax(150px, 220px) minmax(320px, 1fr) minmax(260px, 360px);
    gap: 18px;
    padding: 22px;
}

.toe-ma-card-body {
    display: grid;
    grid-template-columns: minmax(180px, 260px) minmax(320px, 1fr) minmax(170px, 210px);
    gap: 18px;
    padding: 22px;
}

.toe-order-previews,
.toe-ma-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    padding: 14px;
    border: 1px solid var(--toe-ma-border);
    border-radius: 10px;
    background: #F8FAFC;
}

.toe-order-previews {
    flex-direction: column;
    gap: 10px;
}

.toe-order-preview {
    width: 100%;
    min-height: 150px;
    border: 0;
    border-radius: 8px;
    background: #fff;
}

.toe-order-preview img,
.toe-ma-photo img,
.toe-ma-design-preview {
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .10);
}

.toe-order-preview img {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
}

.toe-ma-photo {
    border-right: 1px solid var(--toe-ma-border);
}

.toe-ma-design-preview {
    width: min(100%, 210px);
    background: #EEF2F7;
}

.toe-order-project-list {
    margin-bottom: 12px;
    padding: 14px 16px;
    border: 1px solid var(--toe-ma-border);
    border-radius: 10px;
    background: #fff;
    color: #334155;
    font-size: 15px;
    font-weight: 900;
}

.toe-order-project-deleted {
    margin: -4px 0 12px;
    color: #6b7280;
    font-size: 13px;
    font-weight: 700;
}

.toe-order-table,
.toe-ma-details table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid var(--toe-ma-border);
    border-radius: 10px;
    background: #fff;
}

.toe-order-table tr,
.toe-ma-details tr {
    display: grid;
    grid-template-columns: minmax(135px, .48fr) minmax(0, 1fr);
    border-bottom: 1px solid var(--toe-ma-border);
}

.toe-order-table tr:last-child,
.toe-ma-details tr:last-child {
    border-bottom: 0;
}

.toe-order-table th,
.toe-order-table td,
.toe-ma-details th,
.toe-ma-details td {
    border: 0;
    padding: 12px 14px;
    vertical-align: top;
    overflow-wrap: anywhere;
}

.toe-order-table th,
.toe-ma-details th {
    width: auto;
    color: var(--toe-ma-text);
    font-size: 14px;
    font-weight: 900;
    text-align: left;
}

.toe-order-table td,
.toe-ma-details td {
    color: var(--toe-ma-muted);
    font-size: 14px;
    font-weight: 600;
}

.toe-ma-details {
    padding: 0;
}

.toe-order-payment {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.toe-order-payment-badge {
    min-height: 26px;
    padding: 4px 11px;
    font-size: 12px;
    font-weight: 900;
}

.toe-order-payment-badge--paid {
    background: #DCFCE7;
    color: #15803D;
}

.toe-order-payment-badge--unpaid {
    background: #FEF3C7;
    color: #B45309;
}

.toe-order-removal th,
.toe-order-removal td,
.toe-ma-removal-soon td,
.toe-ma-removal-soon th {
    color: var(--toe-ma-error) !important;
    font-weight: 900;
}

.toe-order-action {
    width: 100%;
    max-width: none;
    min-height: 54px;
    margin: 18px 0 12px;
    padding: 0 18px;
    border-radius: 10px;
    background: linear-gradient(135deg, #22C55E, #16A34A);
    color: #fff;
    font-size: 17px;
    font-weight: 900;
    line-height: 54px;
    box-shadow: 0 12px 24px rgba(34, 197, 94, .22);
}

.toe-order-action:hover {
    opacity: 1;
    color: #fff;
    background: linear-gradient(135deg, #16A34A, #15803D);
    transform: translateY(-1px);
}

.toe-order-total {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 14px 18px;
    border-radius: 10px;
    background: linear-gradient(135deg, #DCFCE7, #CCFBF1);
    color: var(--toe-ma-primary-hover);
    font-size: 20px;
    font-weight: 900;
}

.toe-order-history {
    margin: -8px 0 22px;
    padding: 20px 22px 22px;
    border: 1px solid var(--toe-ma-border);
    border-radius: var(--toe-ma-radius);
    background: #fff;
    box-shadow: var(--toe-ma-shadow-sm);
}

.toe-order-history h3 {
    margin: 0 0 16px;
    color: var(--toe-ma-text);
    font-size: 16px;
    font-weight: 900;
}

.toe-order-history__list {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.toe-order-history__item {
    position: relative;
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 24px;
    min-height: 48px;
    padding: 0 0 18px 24px;
}

.toe-order-history__item:last-child {
    padding-bottom: 0;
}

.toe-order-history__item::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 5px;
    z-index: 1;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--toe-ma-primary);
    box-shadow: 0 0 0 4px rgba(14, 165, 164, .10);
}

.toe-order-history__item::after {
    content: "";
    position: absolute;
    left: 7px;
    top: 15px;
    bottom: 0;
    width: 2px;
    background: #D7ECEC;
}

.toe-order-history__item:last-child::after {
    display: none;
}

.toe-order-history__item time {
    color: var(--toe-ma-muted);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

.toe-order-history__item span {
    display: grid;
    gap: 4px;
}

.toe-order-history__item strong {
    color: var(--toe-ma-text);
    font-size: 14px;
    font-weight: 900;
    line-height: 1.35;
}

.toe-order-history__item small {
    color: var(--toe-ma-muted);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
}

.toe-ma-actions {
    justify-content: center;
    gap: 10px;
    padding: 0;
    border-left: 0;
}

.toe-ma-btn {
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 900;
    line-height: 42px;
    box-shadow: none;
    transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.toe-ma-btn:hover {
    opacity: 1;
}

.toe-ma-btn--add-cart,
.toe-ma-btn--preview,
.toe-ma-btn--edit,
.toe-ma-btn--copy {
    background: var(--toe-ma-primary);
    color: #fff;
}

.toe-ma-btn--add-cart:hover,
.toe-ma-btn--preview:hover,
.toe-ma-btn--edit:hover,
.toe-ma-btn--copy:hover {
    background: var(--toe-ma-primary-hover);
    color: #fff;
}

.toe-ma-btn--delete,
.toe-ma-btn--remove-cart {
    border-color: rgba(239, 68, 68, .38);
    background: #fff;
    color: #B91C1C;
}

.toe-ma-btn--delete:hover,
.toe-ma-btn--remove-cart:hover {
    background: #FEF2F2;
    color: #991B1B;
}

.toe-ma-pagination {
    margin-top: 26px;
}

.toe-ma-page {
    min-width: 38px;
    padding: 8px 12px;
    border-color: var(--toe-ma-border);
    border-radius: 10px;
    background: #fff;
    color: var(--toe-ma-muted);
    font-weight: 900;
}

.toe-ma-page:hover {
    background: #F8FAFC;
}

.toe-ma-page--active {
    border-color: var(--toe-ma-primary);
    background: var(--toe-ma-primary);
    color: #fff;
}

.toe-ma-spinner,
.toe-ma-pending-spinner {
    border-top-color: var(--toe-ma-primary);
}

@media (max-width: 1100px) {
    .woocommerce-account .woocommerce {
        grid-template-columns: 1fr;
    }

    .woocommerce-account .woocommerce-MyAccount-navigation {
        position: static;
    }

    .woocommerce-account .woocommerce-MyAccount-navigation ul {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

@media (max-width: 900px) {
    .toe-order-card-body,
    .toe-ma-card-body {
        grid-template-columns: 1fr;
    }

    .toe-order-previews {
        flex-direction: row;
        overflow-x: auto;
        justify-content: flex-start;
    }

    .toe-order-preview {
        min-width: 180px;
    }

    .toe-ma-actions {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    }
}

@media (max-width: 700px) {
    .woocommerce-account .woocommerce {
        padding: 18px 12px 30px;
    }

    .toe-ma-header,
    .toe-order-card-header,
    .toe-ma-card-header {
        align-items: stretch;
        flex-direction: column;
        padding: 16px;
    }

    .toe-ma-header-actions,
    .toe-orders-search-form {
        width: 100%;
    }

    #toe-ma-search,
    #toe-orders-search {
        width: 100%;
    }

    .toe-order-card-body,
    .toe-ma-card-body {
        padding: 16px;
    }

    .toe-order-history__item {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}
