/* ================================
   MifA - 訂製頁面樣式表
   ================================ */

.main-content {
    min-height: 100vh;
    padding-top: 80px;
    background: linear-gradient(180deg, var(--bg-cream) 0%, var(--bg-white) 100%);
}

/* ================================
   Customize Container
   ================================ */
.customize-container {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--space-2xl) var(--space-lg);
}

.customize-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.customize-header h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: var(--space-md);
}

.customize-header p {
    font-size: 1.1rem;
    color: var(--text-medium);
}

/* Login Required Message */
.login-required-message {
    text-align: center;
    padding: var(--space-3xl);
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

.login-required-message i {
    font-size: 4rem;
    color: var(--text-light);
    margin-bottom: var(--space-xl);
}

.login-required-message p {
    font-size: 1.2rem;
    color: var(--text-medium);
    margin-bottom: var(--space-xl);
}

/* Access Denied */
.access-denied {
    text-align: center;
    padding: var(--space-3xl);
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    max-width: 500px;
    margin: 100px auto;
}

.access-denied i {
    font-size: 4rem;
    color: var(--error-color);
    margin-bottom: var(--space-xl);
}

.access-denied h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: var(--space-md);
}

.access-denied p {
    color: var(--text-medium);
    margin-bottom: var(--space-md);
}

.access-denied .cta-button {
    margin-top: var(--space-xl);
}

/* Admin Info */
.admin-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.admin-info span {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-light);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    color: var(--text-medium);
}

.admin-info i {
    color: var(--primary-color);
}

/* ================================
   Form Steps
   ================================ */
.customize-form {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: var(--space-2xl);
}

.form-step {
    display: none;
    animation: fadeIn 0.4s ease;
}

.form-step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-indicator {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 2px solid var(--border-color);
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: var(--bg-white);
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-label {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* ================================
   Option Grid
   ================================ */
.option-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
}

.option-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.option-card {
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: visible;
    z-index: 1;
}

.option-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 10;
    cursor: pointer;
}

.option-card .option-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
}

.option-card .option-content i {
    font-size: 2.5rem;
    color: var(--text-light);
    margin-bottom: var(--space-md);
    transition: color var(--transition-normal);
}

.option-card .option-content span {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-medium);
}

.option-card:hover .option-content {
    border-color: var(--primary-light);
    transform: translateY(-3px);
}

.option-card:hover .option-content i {
    color: var(--primary-color);
}

.option-card input[type="radio"]:checked + .option-content {
    background: linear-gradient(135deg, var(--accent-color), var(--bg-light));
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.option-card input[type="radio"]:checked + .option-content i {
    color: var(--primary-color);
}

.option-card input[type="radio"]:checked + .option-content span {
    color: var(--primary-dark);
    font-weight: 600;
}

@media (max-width: 768px) {
    .option-grid,
    .option-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .option-grid,
    .option-grid-3 {
        grid-template-columns: 1fr;
    }
}

/* Custom Input Container Styles */
.custom-input-container {
    background: var(--bg-light);
    border: 2px dashed var(--primary-color);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-top: var(--space-md);
}

.custom-input-container .custom-text-input {
    width: 100%;
    padding: var(--space-md);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: border-color var(--transition-fast);
}

.custom-input-container .custom-text-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.custom-input-container .custom-input-hint {
    display: block;
    margin-top: var(--space-sm);
    font-size: 0.85rem;
    color: var(--text-light);
}

.custom-input-container:has(.custom-text-input:not(:disabled)):has(.custom-text-input:focus) {
    border-style: solid;
    border-color: var(--primary-color);
}

.custom-input-container:has(.custom-text-input:placeholder-shown) {
    border-color: var(--border-color);
}

/* Radio button selected state with validation */
.option-card:has(input[value="style_custom"]:checked) ~ .custom-input-container,
.option-card:has(input[value="size_ring_custom"]:checked) ~ .custom-input-container,
.option-card:has(input[value="size_bracelet_custom"]:checked) ~ .custom-input-container,
.option-card:has(input[value="size_earring_custom"]:checked) ~ .custom-input-container,
.option-card:has(input[value="size_pendant_custom"]:checked) ~ .custom-input-container {
    border-color: var(--primary-color);
}

/* ================================\n   Engraving Section
   ================================ */
.engraving-section {
    max-width: 600px;
    margin: 0 auto;
}

.engraving-section .form-group {
    margin-bottom: var(--space-xl);
}

.engraving-section label {
    display: block;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: var(--space-sm);
}

.engraving-section input,
.engraving-section select,
.engraving-section textarea {
    width: 100%;
    padding: var(--space-md);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: border-color var(--transition-fast);
}

.engraving-section input:focus,
.engraving-section select:focus,
.engraving-section textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.engraving-section textarea {
    resize: vertical;
    min-height: 100px;
}

.char-count {
    display: block;
    text-align: right;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: var(--space-xs);
}

/* ================================
   Preview Section
   ================================ */
.preview-section {
    max-width: 600px;
    margin: 0 auto;
}

.preview-section h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: var(--space-xl);
    text-align: center;
}

.preview-content {
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
}

.preview-item {
    display: flex;
    justify-content: space-between;
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--border-color);
}

.preview-item:last-child {
    border-bottom: none;
}

.preview-label {
    font-weight: 500;
    color: var(--text-medium);
}

.preview-value {
    font-weight: 600;
    color: var(--text-dark);
    text-align: right;
}

/* ================================
   Form Navigation
   ================================ */
.form-navigation {
    display: flex;
    justify-content: space-between;
    gap: var(--space-lg);
    margin-top: var(--space-2xl);
    padding-top: var(--space-xl);
    border-top: 2px solid var(--border-color);
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
}

.nav-btn i {
    transition: transform var(--transition-fast);
}

.prev-btn {
    background: var(--bg-light);
    color: var(--text-medium);
    border: 2px solid var(--border-color);
}

.prev-btn:hover {
    background: var(--border-color);
    color: var(--text-dark);
}

.prev-btn:hover i {
    transform: translateX(-3px);
}

.next-btn {
    background: var(--primary-color);
    color: var(--bg-white);
    margin-left: auto;
}

.next-btn:hover {
    background: var(--primary-dark);
}

.next-btn:hover i {
    transform: translateX(3px);
}

.submit-btn {
    background: var(--success-color);
    color: var(--bg-white);
    margin-left: auto;
}

.submit-btn:hover {
    background: #219a52;
}

@media (max-width: 576px) {
    .form-navigation {
        flex-direction: column;
    }
    
    .nav-btn {
        justify-content: center;
        width: 100%;
    }
    
    .prev-btn {
        order: 2;
    }
    
    .next-btn,
    .submit-btn {
        order: 1;
        margin-left: 0;
    }
}

/* ================================
   Checkout Modal
   ================================ */
.checkout-container {
    padding: var(--space-lg);
}

.checkout-container h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: var(--space-xs);
}

.checkout-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: var(--space-xl);
}

.checkout-section {
    margin-bottom: var(--space-xl);
}

.checkout-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border-color);
}

.price-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg);
    background: var(--bg-light);
    border-radius: var(--radius-md);
}

.price-label {
    font-size: 1rem;
    color: var(--text-medium);
}

.price-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.price-note {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: var(--space-sm);
}

.checkout-section .form-group {
    margin-bottom: var(--space-lg);
}

.checkout-section label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: var(--space-xs);
}

.checkout-section input,
.checkout-section textarea {
    width: 100%;
    padding: var(--space-md);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: border-color var(--transition-fast);
}

.checkout-section input:focus,
.checkout-section textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.payment-note {
    font-size: 0.9rem;
    color: var(--text-medium);
    margin-bottom: var(--space-md);
}

.payment-method {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--bg-light);
    border-radius: var(--radius-md);
    cursor: pointer;
}

.payment-method input[type="radio"] {
    accent-color: var(--primary-color);
}

.card-details {
    margin-top: var(--space-lg);
    padding: var(--space-lg);
    background: var(--bg-light);
    border-radius: var(--radius-md);
}

.btn-submit {
    width: 100%;
    padding: var(--space-lg);
    background: var(--primary-color);
    color: var(--bg-white);
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
}

.btn-submit:hover:not(:disabled) {
    background: var(--primary-dark);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ================================
   Orders Page
   ================================ */
.orders-page {
    padding-top: 100px;
    min-height: 100vh;
    background: var(--bg-light);
}

.orders-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: var(--space-2xl) var(--space-lg);
}

.orders-header {
    margin-bottom: var(--space-2xl);
}

.orders-header h1 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: var(--space-3xl);
}

.loading-state .loading-spinner {
    width: 40px;
    height: 40px;
    border-width: 3px;
    border-color: rgba(139, 92, 246, 0.3);
    border-top-color: var(--primary-color);
    margin: 0 auto;
}

.loading-state p {
    margin-top: var(--space-lg);
    color: var(--text-medium);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--space-3xl);
    background: var(--bg-white);
    border-radius: var(--radius-lg);
}

.empty-state i {
    font-size: 4rem;
    color: var(--text-light);
    margin-bottom: var(--space-lg);
}

.empty-state h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: var(--space-md);
}

.empty-state p {
    color: var(--text-medium);
    margin-bottom: var(--space-xl);
}

/* Orders List */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.order-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow var(--transition-normal);
}

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

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg);
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
}

.order-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.order-id {
    font-weight: 600;
    color: var(--text-dark);
}

.order-date {
    font-size: 0.85rem;
    color: var(--text-light);
}

.order-status {
    padding: var(--space-xs) var(--space-md);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-full);
}

.status-pending {
    background: rgba(243, 156, 18, 0.15);
    color: #d68910;
}

.status-paid {
    background: rgba(39, 174, 96, 0.15);
    color: #27ae60;
}

.status-designing {
    background: rgba(52, 152, 219, 0.15);
    color: #2980b9;
}

.status-manufacturing {
    background: rgba(155, 89, 182, 0.15);
    color: #8e44ad;
}

.status-shipping {
    background: rgba(230, 126, 34, 0.15);
    color: #e67e22;
}

.status-delivered {
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
}

.status-refunding,
.status-refunded {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
}

.order-details {
    padding: var(--space-lg);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: var(--space-sm) 0;
}

.detail-label {
    color: var(--text-light);
}

.detail-value {
    font-weight: 500;
    color: var(--text-dark);
}

.detail-value.price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
}

.order-design {
    padding: 0 var(--space-lg);
    position: relative; /* 讓 .btn-expand-image-order 絕對定位 */
}

.order-design img {
    width: 100%;
    max-height: 200px;
    object-fit: contain;
    border-radius: var(--radius-md);
    cursor: zoom-in;
    display: block;
}

/* Orders page - AI preview 圖放大按鈕（複用 my-designs 的 .btn-expand-image-card 風格） */
.btn-expand-image-order {
    position: absolute;
    top: 8px;
    right: calc(var(--space-lg) + 8px);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.2s, transform 0.2s;
    z-index: 2;
}

.btn-expand-image-order:hover {
    background: rgba(0, 0, 0, 0.75);
    transform: scale(1.05);
}

.btn-expand-image-order:active {
    transform: scale(0.95);
}

/* Orders page - 用戶個人資料區塊（訂單詳細） */
.order-user-info {
    margin: 0 var(--space-lg) var(--space-md);
    padding: var(--space-md);
    background: linear-gradient(135deg, rgba(192, 168, 117, 0.06) 0%, rgba(192, 168, 117, 0.02) 100%);
    border: 1px solid rgba(192, 168, 117, 0.18);
    border-radius: var(--radius-md);
}

.order-user-info-title {
    margin: 0 0 var(--space-md);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-color, #c0a875);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.order-user-info-title i {
    font-size: 0.9rem;
}

.order-user-info-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.order-user-info .detail-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 0;
}

.order-user-info .detail-row-block {
    margin-top: var(--space-xs);
}

.order-user-info .detail-label {
    font-size: 0.78rem;
    color: #888;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.order-user-info .detail-value {
    font-size: 0.92rem;
    color: var(--text-primary, #2a2a2a);
    word-break: break-word;
    line-height: 1.4;
}

.order-actions {
    padding: var(--space-lg);
    border-top: 1px solid var(--border-color);
}

.btn-checkout {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    background: var(--primary-color);
    color: var(--bg-white);
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
}

.btn-checkout:hover {
    background: var(--primary-dark);
}

.action-note {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-medium);
}

.action-note i {
    color: var(--primary-color);
}

/* ================================
   Admin Dashboard
   ================================ */
.admin-page {
    padding-top: 80px;
    min-height: 100vh;
    background: var(--bg-light);
}

.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-2xl);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-2xl);
}

.admin-header h1 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-dark);
}

.admin-tabs {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.admin-tab {
    padding: var(--space-md) var(--space-xl);
    background: var(--bg-white);
    color: var(--text-medium);
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.admin-tab:hover {
    background: var(--bg-light);
}

.admin-tab.active {
    background: var(--primary-color);
    color: var(--bg-white);
}

.admin-section {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.admin-section h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 2px solid var(--border-color);
}

/* Admin Table */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    font-weight: 600;
    color: var(--text-dark);
    background: var(--bg-light);
}

.admin-table td {
    color: var(--text-medium);
}

.user-cell {
    display: flex;
    flex-direction: column;
}

.user-cell small {
    font-size: 0.8rem;
    color: var(--text-light);
}

.status-select {
    padding: var(--space-xs) var(--space-sm);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    background: var(--bg-white);
}

.action-buttons {
    display: flex;
    gap: var(--space-sm);
}

.btn-action {
    width: 36px;
    height: 36px;
    background: var(--bg-light);
    color: var(--text-medium);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.btn-action:hover {
    background: var(--primary-color);
    color: var(--bg-white);
}

.empty-message {
    text-align: center;
    color: var(--text-light);
    padding: var(--space-xl);
}

/* Create Order Modal */
.create-order-container {
    padding: var(--space-lg);
}

.create-order-container h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: var(--space-xs);
}

.create-order-container .subtitle {
    color: var(--text-light);
    margin-bottom: var(--space-xl);
}

.create-order-container .form-group {
    margin-bottom: var(--space-lg);
}

.create-order-container label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: var(--space-xs);
}

.create-order-container input,
.create-order-container textarea {
    width: 100%;
    padding: var(--space-md);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
}

.create-order-container textarea {
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-xl);
}

.btn-cancel {
    flex: 1;
    padding: var(--space-md);
    background: var(--bg-light);
    color: var(--text-medium);
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.btn-cancel:hover {
    background: var(--border-color);
}

.form-actions .btn-submit {
    flex: 1;
}

@media (max-width: 992px) {
    .admin-table {
        display: block;
        overflow-x: auto;
    }
}

/* ================================
   AI Design Generator Styles
   ================================ */

/* AI Generate Button */
.ai-generate-section {
    text-align: center;
    padding: var(--space-xl);
    margin: var(--space-xl) 0;
    background: linear-gradient(135deg, #f5f7ff 0%, #fff 100%);
    border-radius: var(--radius-lg);
    border: 2px dashed var(--primary-color);
}

.btn-ai-generate {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    background: linear-gradient(135deg, var(--primary-color) 0%, #9b59b6 100%);
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-ai-generate:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.btn-ai-generate:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-ai-generate i {
    font-size: 1.2rem;
}

.btn-ai-regenerate {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    background: linear-gradient(135deg, var(--primary-color) 0%, #9b59b6 100%);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
    width: 100%;
    max-width: 280px;
    margin: var(--space-lg) auto 0;
}

.btn-ai-regenerate:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.btn-ai-regenerate:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-ai-regenerate i {
    font-size: 1rem;
}

.ai-preview-actions {
    text-align: center;
    margin-top: var(--space-md);
}

.ai-hint {
    margin-top: var(--space-md);
    font-size: 0.9rem;
    color: var(--text-light);
}

/* AI Preview Result */
.ai-preview-result {
    margin-top: var(--space-xl);
    padding: var(--space-xl);
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.ai-preview-result h4 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.ai-preview-result h4 i {
    color: var(--primary-color);
}

.ai-preview-image {
    text-align: center;
    margin-bottom: var(--space-lg);
    min-height: 100px;
    display: block;
}

/* AI Preview Grid (3 candidate images) */
.ai-select-hint {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: var(--space-md);
}

.ai-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.ai-preview-card {
    position: relative;
    display: block;
    cursor: pointer;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 3px solid transparent;
    transition: all 0.2s ease;
    background: var(--bg-light);
}

.ai-preview-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.ai-preview-card.selected {
    border-color: var(--primary-color, #b8860b);
    box-shadow: 0 0 0 2px rgba(184, 134, 11, 0.2);
}

.ai-preview-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ai-preview-card-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: white;
}

.ai-preview-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ai-preview-card-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-color, #b8860b);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.ai-preview-card.selected .ai-preview-card-badge {
    opacity: 1;
}

.ai-preview-card-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 6px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    font-size: 0.8rem;
    text-align: center;
    font-weight: 500;
}

.ai-empty-hint {
    color: var(--text-light);
    font-style: italic;
    text-align: center;
    padding: var(--space-lg);
}

@media (max-width: 640px) {
    .ai-preview-grid {
        grid-template-columns: 1fr;
    }
}

/* AI Preview Card Actions - Expand Button */
.ai-preview-card-actions {
    position: absolute;
    bottom: 30px;  /* 避開底部的 label */
    left: 8px;
    display: flex;
    gap: 4px;
    z-index: 2;
}

.btn-expand-image {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.btn-expand-image:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.btn-expand-image:active {
    transform: scale(0.95);
}

/* AI Image Modal (full screen view) */
.ai-image-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: aiImageModalFadeIn 0.25s ease-out;
}

.ai-image-modal.active {
    display: flex;
}

@keyframes aiImageModalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.ai-image-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    cursor: pointer;
}

.ai-image-modal-content {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 90vh;
    background: white;
    border-radius: 12px;
    padding: 16px;
    padding-top: 12px;
    padding-bottom: 12px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.ai-image-modal-img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    display: block;
    border-radius: 8px;
}

.ai-image-modal-close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary-color, #b8860b);
    color: white;
    border: 2px solid white;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
    z-index: 2;
}

.ai-image-modal-close:hover {
    background: var(--primary-dark, #9a6f08);
    transform: scale(1.1) rotate(90deg);
}

.ai-image-modal-toolbar {
    display: flex;
    gap: 12px;
    align-items: center;
    width: 100%;
    justify-content: center;
    padding-top: 4px;
    border-top: 1px solid var(--border-color, #e0e0e0);
}

.ai-image-modal-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-color, #b8860b);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.ai-image-modal-download:hover {
    background: var(--bg-light, #f5f5f5);
    transform: translateY(-1px);
}

/* Mobile responsive */
@media (max-width: 640px) {
    .ai-image-modal {
        padding: 12px;
    }
    .ai-image-modal-content {
        max-width: 95vw;
        max-height: 92vh;
        padding: 10px;
    }
    .ai-image-modal-img {
        max-height: 70vh;
    }
    .ai-image-modal-close {
        width: 34px;
        height: 34px;
        top: -12px;
        right: -8px;
    }
    .btn-expand-image {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
}

.ai-design-img {
    max-width: 100%;
    width: 100%;
    height: auto;
    max-height: 300px;
    min-height: 150px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    background: var(--bg-light);
    object-fit: contain;
    position: relative;
    z-index: 1;
}

.ai-preview-description {
    display: none; /* 隐藏技术性描述 */
}

/* Design Disclaimer */
.design-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: linear-gradient(135deg, #fff9e6 0%, #fff 100%);
    border-radius: var(--radius-md);
    border-left: 4px solid #f59e0b;
}

.design-disclaimer i {
    color: #f59e0b;
    font-size: 1.2rem;
    margin-top: 2px;
}

.design-disclaimer p {
    color: #92400e;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.6;
}

.design-disclaimer strong {
    color: #b45309;
}

/* Design Status */
.design-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    font-weight: 500;
    margin: var(--space-lg) 0;
}

.design-status.loading {
    background: #e0e7ff;
    color: #4338ca;
}

.design-status.success {
    background: #dcfce7;
    color: #166534;
}

.design-status.error {
    background: #fee2e2;
    color: #dc2626;
}

.design-status.warning {
    background: #fef3c7;
    color: #92400e;
}

/* Design Preview Modal */
.design-preview-modal-content {
    padding: var(--space-lg);
}

.design-preview-modal-content h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: var(--space-xl);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.design-preview-modal-content h2 i {
    color: var(--primary-color);
}

.modal-actions {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-xl);
}

.btn-secondary {
    flex: 1;
    padding: var(--space-md);
    background: var(--bg-light);
    color: var(--text-medium);
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.btn-secondary:hover {
    background: var(--border-color);
    color: var(--text-dark);
}

.btn-primary {
    flex: 1;
    padding: var(--space-md);
    background: linear-gradient(135deg, var(--primary-color) 0%, #9b59b6 100%);
    color: white;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

/* Payment Modal Styles */
.payment-modal-content {
    padding: var(--space-lg);
}

.payment-modal-content h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.payment-subtitle {
    color: var(--text-light);
    margin-bottom: var(--space-xl);
}

.payment-subtitle span {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.3rem;
}

.form-section {
    margin-bottom: var(--space-xl);
}

.form-section h3 {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border-color);
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.payment-method {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.payment-method:hover {
    border-color: var(--primary-color);
}

.payment-method.selected {
    border-color: var(--primary-color);
    background: rgba(139, 92, 246, 0.05);
}

.payment-method input {
    display: none;
}

.payment-method i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.payment-status {
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin: var(--space-md) 0;
    text-align: center;
}

.payment-status.loading {
    background: #e0e7ff;
    color: #4338ca;
}

.payment-status.success {
    background: #dcfce7;
    color: #166534;
}

.payment-status.error {
    background: #fee2e2;
    color: #dc2626;
}

.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    border-radius: var(--radius-lg);
    z-index: 10;
}

.loading-overlay .loading-spinner {
    width: 50px;
    height: 50px;
}

/* Modal Content Sizes */
.modal-content-large {
    max-width: 700px;
}

/* Responsive AI Styles */
@media (max-width: 768px) {
    .ai-generate-section {
        padding: var(--space-lg);
    }
    
    .btn-ai-generate {
        width: 100%;
        justify-content: center;
    }
    
    .ai-preview-result {
        padding: var(--space-lg);
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions .btn-secondary,
    .modal-actions .btn-primary {
        width: 100%;
    }
}

/* Required field hint */
.step-required-hint {
    color: #e74c3c;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 10px;
    padding: 8px 12px;
    background-color: rgba(231, 76, 60, 0.1);
    border-radius: 4px;
    text-align: left;
}

/* ================================
   AI Generator States
   ================================ */
.ai-loading {
    padding: var(--space-xl);
    text-align: center;
}

.ai-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--bg-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    margin: 0 auto var(--space-md);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.ai-loading-text {
    color: var(--text-medium);
}

.ai-error {
    padding: var(--space-xl);
    text-align: center;
    color: #dc2626;
}

.ai-error i {
    font-size: 2rem;
    margin-bottom: var(--space-md);
}

.ai-retry-btn {
    margin-top: var(--space-md);
    padding: var(--space-sm) var(--space-lg);
    background: var(--bg-light);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
}

.ai-result {
    text-align: center;
}

.ai-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.ai-actions {
    margin-top: var(--space-lg);
    display: flex;
    justify-content: center;
    gap: var(--space-md);
}

.ai-btn-secondary {
    padding: var(--space-sm) var(--space-lg);
    background: var(--bg-light);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
}

/* Ensure AI result buttons are visible */
.ai-result {
    text-align: center;
    position: relative;
    z-index: 5;
}

.ai-preview-result {
    margin-top: var(--space-xl);
    padding: var(--space-xl);
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: visible;
    z-index: 1;
}

.ai-preview-result h4 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    position: relative;
    z-index: 2;
}

.ai-preview-result h4 i {
    color: var(--primary-color);
}

/* =============================================================
   My Designs Page (v3) - Responsive grid, filter chips, detail modal
   ============================================================= */

/* Filter bar */
.designs-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    padding: var(--space-md) 0;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 2px solid var(--border-color, #e0e0e0);
    border-radius: 999px;
    background: white;
    color: var(--text-medium, #666);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-chip:hover:not(:disabled):not(.empty) {
    border-color: var(--primary-color, #b8860b);
    color: var(--primary-color, #b8860b);
    transform: translateY(-1px);
}

.filter-chip.active {
    background: var(--primary-color, #b8860b);
    border-color: var(--primary-color, #b8860b);
    color: white;
}

.filter-chip:disabled,
.filter-chip.empty {
    opacity: 0.4;
    cursor: not-allowed;
}

.filter-count {
    background: rgba(0, 0, 0, 0.1);
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 0.8rem;
    min-width: 22px;
    text-align: center;
}

.filter-chip.active .filter-count {
    background: rgba(255, 255, 255, 0.25);
}

/* Designs grid - responsive: 3 cols / 2 cols / 1 col */
.designs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-lg);
}

/* Design card - improved layout */
.design-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color, #f0f0f0);
}

.design-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.design-card .design-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--bg-light, #f5f5f5);
    overflow: hidden;
}

.design-card .design-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.design-card .design-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f0e8, #faf8f5);
    color: var(--primary-color, #b8860b);
    gap: 12px;
}

.design-card .design-placeholder i {
    font-size: 3rem;
    opacity: 0.4;
}

.design-card .design-placeholder span {
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.6;
}

/* Expand button on card (always visible) */
.btn-expand-image-card {
    position: absolute;
    bottom: 12px;
    left: 12px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2;
}

.btn-expand-image-card:hover {
    background: rgba(0, 0, 0, 0.95);
    transform: scale(1.1);
}

.btn-expand-image-card:active {
    transform: scale(0.95);
}

/* Status badge on card image */
.design-status-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
    background: white;
    color: var(--text-dark, #333);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.design-status-badge.status-pending {
    background: #fff4e6;
    color: #b35900;
}

.design-status-badge.status-success {
    background: #e6f7e6;
    color: #2d7a2d;
}

.design-status-badge.status-info {
    background: #e6f3ff;
    color: #1c5db4;
}

.design-status-badge.status-completed {
    background: #f0e6ff;
    color: #5e2db4;
}

.design-status-badge.status-cancelled {
    background: #ffe6e6;
    color: #b32d2d;
}

/* v12: 4 個新狀態類別 */
.design-status-badge.status-not-quoted {
    background: #fff4e6;
    color: #b35900;
}

.design-status-badge.status-waiting-quote {
    background: #e6f3ff;
    color: #1c5db4;
}

.design-status-badge.status-quoted {
    background: #f0e6ff;
    color: #5e2db4;
}

.design-status-badge.status-order-created {
    background: #e6f7e6;
    color: #2d7a2d;
}

/* Card info area */
.design-card .design-info {
    padding: var(--space-md) var(--space-lg);
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.design-id-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.8rem;
    color: var(--text-light, #888);
}

.design-id-badge {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: var(--primary-color, #b8860b);
}

.design-card .design-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: var(--text-dark, #333);
    margin: 0;
    line-height: 1.3;
}

.design-card .design-title .design-material {
    color: var(--text-light, #888);
    font-weight: 400;
    font-size: 0.95rem;
}

.design-card .design-engraving {
    font-size: 0.85rem;
    color: var(--text-medium, #666);
    margin: 0;
    line-height: 1.4;
    display: flex;
    align-items: flex-start;
    gap: 4px;
}

.design-card .design-engraving i {
    color: var(--primary-color, #b8860b);
    flex-shrink: 0;
    margin-top: 2px;
}

.design-card .design-price {
    margin-top: 4px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color, #b8860b);
}

/* Card actions */
.design-card .design-actions {
    padding: 0 var(--space-lg) var(--space-md);
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.design-card .design-actions button,
.design-card .design-actions a {
    flex: 1;
    min-width: 100px;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.design-card .btn-view {
    background: var(--bg-light, #f5f5f5);
    color: var(--text-dark, #333);
}

.design-card .btn-view:hover {
    background: #e8e8e8;
}

.design-card .btn-checkout {
    background: var(--primary-color, #b8860b);
    color: white;
}

.design-card .btn-checkout:hover {
    background: var(--primary-dark, #9a6f08);
}

.design-card .btn-view-orders {
    background: #5e2db4;
    color: white;
}

.design-card .btn-view-orders:hover {
    background: #4a228c;
}

.design-card .btn-modify {
    background: linear-gradient(135deg, #14b8a6 0%, #0891b2 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(20, 184, 166, 0.25);
}

.design-card .btn-modify:hover {
    background: linear-gradient(135deg, #0d9488 0%, #0e7490 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.4);
}

.design-card .btn-modify:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(20, 184, 166, 0.3);
}

.design-card .btn-modify:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* v12: 申請報價按鈕 — 主操作，金色漸變 */
.design-card .btn-request-quote {
    background: linear-gradient(135deg, #c0a875 0%, #a08860 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(192, 168, 117, 0.3);
    font-weight: 600;
}

.design-card .btn-request-quote:hover {
    background: linear-gradient(135deg, #d4b88a 0%, #b09870 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(192, 168, 117, 0.4);
}

.design-card .btn-request-quote:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(192, 168, 117, 0.3);
}

.design-card .btn-request-quote:disabled,
.design-card .btn-request-quote.loading {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* v16: Delete Design button (軟刪除,將 visible 設為 false;按鈕文字為「Delete Design」) */
.design-card .btn-delete-design {
    background: transparent;
    color: var(--color-text-secondary, #666);
    border: 1px solid var(--color-border, #e0d0c0);
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.design-card .btn-delete-design:hover {
    background: rgba(220, 53, 69, 0.08);
    color: #dc3545;
    border-color: #dc3545;
}
.design-card .btn-delete-design:active {
    transform: scale(0.98);
}
.design-card .btn-delete-design:disabled,
.design-card .btn-delete-design.loading {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* =============================================================
   Design Detail Modal (left-right split layout)
   ============================================================= */

.design-detail {
    padding: var(--space-lg);
    max-width: 1000px;
    width: 100%;
    /* 刪除外層滾動：內層 .detail-scroll 單獨滾動 */
}

.detail-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-color, #e0e0e0);
}

.detail-header .design-id-badge {
    font-size: 0.9rem;
}

.detail-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
}

.detail-status.status-pending { background: #fff4e6; color: #b35900; }
.detail-status.status-success { background: #e6f7e6; color: #2d7a2d; }
.detail-status.status-info { background: #e6f3ff; color: #1c5db4; }
.detail-status.status-completed { background: #f0e6ff; color: #5e2db4; }
.detail-status.status-cancelled { background: #ffe6e6; color: #b32d2d; }
.detail-status.status-not-quoted { background: #fff4e6; color: #b35900; }
.detail-status.status-waiting-quote { background: #e6f3ff; color: #1c5db4; }
.detail-status.status-quoted { background: #f0e6ff; color: #5e2db4; }
.detail-status.status-order-created { background: #e6f7e6; color: #2d7a2d; }
.detail-status.status-default { background: #f0f0f0; color: #666; }

.detail-close {
    margin-left: auto;
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-light, #888);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.detail-close:hover {
    background: var(--bg-light, #f5f5f5);
    color: var(--text-dark, #333);
}

.detail-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

.detail-image-col {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.detail-image-wrapper {
    position: relative;
    background: var(--bg-light, #f5f5f5);
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.btn-expand-image-detail {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.btn-expand-image-detail:hover {
    background: rgba(0, 0, 0, 0.95);
    transform: translateY(-1px);
}

.placeholder-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, #f5f0e8, #faf8f5);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--primary-color, #b8860b);
}

.placeholder-image i {
    font-size: 4rem;
    opacity: 0.4;
}

.placeholder-image p {
    color: var(--text-light, #888);
    margin: 0;
}

/* Prompt box */
.detail-prompt-box {
    background: var(--bg-light, #f8f8f8);
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
    font-size: 0.85rem;
}

.detail-prompt-box summary {
    cursor: pointer;
    color: var(--text-medium, #666);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    user-select: none;
}

.detail-prompt-box pre {
    background: white;
    border-radius: var(--radius-sm);
    padding: var(--space-sm);
    margin: var(--space-sm) 0 0;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.75rem;
    color: #333;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 150px;
    overflow-y: auto;
}

/* Detail info col */
.detail-info-col {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    overflow-y: auto;
    max-height: 70vh;
    padding-right: var(--space-sm);
}

.detail-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--text-dark, #333);
    margin: 0 0 4px 0;
}

.detail-subtitle {
    color: var(--text-light, #888);
    font-size: 0.9rem;
    margin: 0;
}

.detail-section h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--text-dark, #333);
    margin: 0 0 var(--space-sm) 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.detail-section h3 i {
    color: var(--primary-color, #b8860b);
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
}

.detail-item {
    background: var(--bg-light, #f8f8f8);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.detail-item .item-label {
    font-size: 0.75rem;
    color: var(--text-light, #888);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-item .item-value {
    font-size: 0.9rem;
    color: var(--text-dark, #333);
    font-weight: 500;
}

.detail-engraving-text {
    background: var(--bg-light, #f8f8f8);
    border-left: 3px solid var(--primary-color, #b8860b);
    padding: var(--space-sm) var(--space-md);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--text-dark, #333);
    margin: 0;
}

.detail-quote {
    background: linear-gradient(135deg, #f5f0e8, #faf8f5);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    border: 1px solid #e0d4b8;
}

.quote-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
}

.quote-label {
    color: var(--text-medium, #666);
    font-size: 0.95rem;
}

.quote-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color, #b8860b);
}

.quote-notes {
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid #d0c4a8;
    font-size: 0.85rem;
    color: var(--text-medium, #666);
}

.quote-notes strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text-dark, #333);
}

.quote-notes p {
    margin: 0;
    line-height: 1.4;
}

.detail-info-note {
    background: #e6f3ff;
    border-left: 3px solid #1c5db4;
    padding: var(--space-sm) var(--space-md);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.85rem;
    color: #1c5db4;
}

.detail-info-note i {
    flex-shrink: 0;
    margin-top: 2px;
}

.detail-info-note p {
    margin: 0;
    line-height: 1.4;
}

/* Modal actions (bottom) */
.design-detail .modal-actions {
    display: flex;
    gap: var(--space-sm);
    justify-content: flex-end;
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-color, #e0e0e0);
}

/* AI image modal title */
.ai-image-modal-title {
    width: 100%;
    text-align: center;
    color: var(--text-dark, #333);
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: -4px;
}

/* Mobile responsive for designs */
@media (max-width: 768px) {
    .designs-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: var(--space-md);
    }
    
    .detail-body {
        grid-template-columns: 1fr;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-image-col {
        order: -1;
    }
}

@media (max-width: 480px) {
    .designs-grid {
        grid-template-columns: 1fr;
    }
    
    .designs-filter-bar {
        gap: 6px;
    }
    
    .filter-chip {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .filter-chip .filter-count {
        min-width: 20px;
        padding: 0 5px;
    }
    
    .design-detail {
        padding: var(--space-md);
    }
    
    .design-card .design-info {
        padding: var(--space-sm) var(--space-md);
    }
    
    .design-card .design-actions {
        padding: 0 var(--space-md) var(--space-sm);
    }
}

/* =============================================================
   Design Detail - Single Scroll Track (3 sections in order)
   ============================================================= */

.detail-title-inline {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--text-dark, #333);
    font-weight: 500;
    flex: 1;
}

.detail-body {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    padding: var(--space-md) 0;
}

.detail-scroll {
    /* 內層滾動：限制最大高度，內容超出時內層滾動 */
    max-height: 60vh;
    overflow-y: auto;
    padding-right: var(--space-sm);
}

.detail-section {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-color, #f0f0f0);
}

.detail-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.detail-section h3 {
    margin: 0 0 var(--space-sm) 0;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    color: var(--text-dark, #333);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-section h3 i {
    color: var(--primary-color, #b8860b);
}

.detail-image-wrapper {
    position: relative;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 480px;
    margin: 0 auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.detail-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.btn-expand-image-detail {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.btn-expand-image-detail:hover {
    background: rgba(0, 0, 0, 0.95);
    transform: translateY(-1px);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-sm);
}

.detail-item {
    background: var(--bg-light, #f8f8f8);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-item .item-label {
    font-size: 0.72rem;
    color: var(--text-light, #888);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.detail-item .item-value {
    font-size: 0.95rem;
    color: var(--text-dark, #333);
    font-weight: 500;
    word-break: break-word;
}

.detail-engraving-block {
    margin-top: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-light, #f8f8f8);
    border-radius: var(--radius-md);
}

.detail-engraving-block .item-label {
    display: block;
    font-size: 0.72rem;
    color: var(--text-light, #888);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 6px;
}

.detail-engraving-text {
    background: white;
    border-left: 3px solid var(--primary-color, #b8860b);
    padding: var(--space-sm) var(--space-md);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--text-dark, #333);
    margin: 0;
    font-size: 1rem;
}

.empty-stage-text {
    color: var(--text-light, #888);
    font-style: italic;
    text-align: center;
    margin: var(--space-md) 0;
}

.status-row {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin-bottom: var(--space-md);
}

.detail-quote {
    background: linear-gradient(135deg, #f5f0e8, #faf8f5);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    border: 1px solid #e0d4b8;
    margin-top: var(--space-sm);
}

.quote-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
}

.quote-label {
    color: var(--text-medium, #666);
    font-size: 0.95rem;
}

.quote-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color, #b8860b);
}

.quote-notes {
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid #d0c4a8;
    font-size: 0.85rem;
    color: var(--text-medium, #666);
}

.quote-notes strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text-dark, #333);
}

.quote-notes p {
    margin: 0;
    line-height: 1.4;
}

.detail-info-note {
    background: #e6f3ff;
    border-left: 3px solid #1c5db4;
    padding: var(--space-sm) var(--space-md);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.85rem;
    color: #1c5db4;
    margin-top: var(--space-sm);
}

.detail-info-note i {
    flex-shrink: 0;
    margin-top: 2px;
}

.detail-info-note p {
    margin: 0;
    line-height: 1.4;
}

.modal-actions {
    display: flex;
    gap: var(--space-sm);
    justify-content: flex-end;
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-color, #e0e0e0);
}

.modal-actions .btn-secondary,
.modal-actions .btn-primary {
    padding: 10px 20px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.modal-actions .btn-secondary {
    background: var(--bg-light, #f5f5f5);
    color: var(--text-dark, #333);
}

.modal-actions .btn-secondary:hover {
    background: #e8e8e8;
}

.modal-actions .btn-primary {
    background: var(--primary-color, #b8860b);
    color: white;
}

.modal-actions .btn-primary:hover {
    background: var(--primary-dark, #9a6f08);
}

@media (max-width: 640px) {
    .detail-section {
        padding-bottom: var(--space-sm);
    }
    .detail-section h3 {
        font-size: 1rem;
    }
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

/* =============================================================
   Usage Badge & Limit Banner (used by customize / ai-mifa)
   rendered by usage-client.js
   ============================================================= */
.usage-badge {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 14px;
    margin: 0 0 16px 0;
    background: linear-gradient(135deg, #faf8f3 0%, #f5f0e6 100%);
    border: 1px solid #e0d8c5;
    border-radius: 12px;
    font-size: 0.85rem;
    color: #333;
}
.usage-badge.subscribed {
    background: linear-gradient(135deg, #fef9e7 0%, #fcf3cf 100%);
    border-color: #d4af37;
    color: #8a6a1a;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    width: fit-content;
}
.usage-badge.subscribed i { color: #d4af37; }
.usage-badge-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.usage-badge-label { font-weight: 500; color: #333; display: inline-flex; align-items: center; gap: 6px; }
.usage-badge-value { color: #888; font-size: 0.85rem; font-weight: 600; }
.usage-badge-bar {
    width: 100%;
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
}
.usage-badge-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #d4af37, #c0a875);
    transition: width 0.3s ease;
}
.usage-badge.is-warning .usage-badge-bar-fill { background: linear-gradient(90deg, #f0a93c, #e89030); }
.usage-badge.is-danger .usage-badge-bar-fill { background: linear-gradient(90deg, #e74c3c, #c0392b); }
.usage-badge.is-danger .usage-badge-value { color: #c0392b; }
.usage-badge-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    color: #888;
}
.usage-badge-foot-left strong { color: #333; }
.usage-badge-link {
    color: #d4af37;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.usage-badge-link:hover { text-decoration: underline; }
.usage-badge-loading { color: #888; font-size: 0.85rem; }

/* Limit reached banner */
.usage-limit-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    margin: 0 0 20px 0;
    background: linear-gradient(135deg, #fef9e7 0%, #fff5d0 100%);
    border: 1px solid #d4af37;
    border-left: 4px solid #d4af37;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.15);
}
.usage-limit-icon {
    font-size: 1.5rem;
    color: #d4af37;
    flex-shrink: 0;
}
.usage-limit-text { flex: 1; }
.usage-limit-text strong { display: block; color: #8a6a1a; font-size: 1rem; margin-bottom: 2px; }
.usage-limit-text p { margin: 0; color: #666; font-size: 0.85rem; }
.usage-limit-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.usage-limit-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: linear-gradient(135deg, #d4af37 0%, #c0a875 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.usage-limit-cta:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3); }
.usage-limit-dismiss {
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 6px;
    font-size: 1rem;
    line-height: 1;
}
.usage-limit-dismiss:hover { color: #333; }
@media (max-width: 600px) {
    .usage-limit-banner { flex-direction: column; align-items: flex-start; gap: 10px; }
    .usage-limit-actions { width: 100%; justify-content: space-between; }
}

/* ============================================================
 * v17: Request Quote Dialog (給用戶填寫留言給 admin)
 * 用於 #quoteMessageModal — my-designs.html 申請報價前彈出
 * ============================================================ */
.quote-dialog {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.quote-dialog-title {
    margin: 0 0 4px;
    font-size: 1.25rem;
    font-weight: 600;
    color: #2a2a2a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.quote-dialog-title i {
    color: var(--primary-color, #c0a875);
}

.quote-dialog-intro {
    margin: 0;
    color: #555;
    line-height: 1.6;
    font-size: 0.92rem;
}

.quote-dialog-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.quote-dialog-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quote-dialog-field label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 500;
    font-size: 0.9rem;
    color: #333;
}

.quote-dialog-optional {
    font-size: 0.75rem;
    color: #888;
    font-weight: 400;
    background: rgba(192, 168, 117, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
}

.quote-dialog-field textarea {
    width: 100%;
    min-height: 110px;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 0.92rem;
    line-height: 1.5;
    color: #2a2a2a;
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    resize: vertical;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.quote-dialog-field textarea:focus {
    outline: none;
    border-color: var(--primary-color, #c0a875);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(192, 168, 117, 0.15);
}

.quote-dialog-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.quote-dialog-hint {
    color: #888;
    font-size: 0.75rem;
    flex: 1;
}

.quote-dialog-counter {
    color: #888;
    font-size: 0.75rem;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

.quote-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.quote-dialog-actions .btn-secondary,
.quote-dialog-actions .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 0.92rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s ease;
}

.quote-dialog-actions .btn-secondary {
    background: #f5f5f5;
    color: #333;
    border-color: #e0e0e0;
}

.quote-dialog-actions .btn-secondary:hover {
    background: #eaeaea;
}

.quote-dialog-actions .btn-primary {
    background: var(--primary-color, #c0a875);
    color: #fff;
}

.quote-dialog-actions .btn-primary:hover {
    background: #a88f5e;
}

.quote-dialog-actions .btn-primary:disabled,
.quote-dialog-actions .btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 顯示在卡片上的 quote_message 區塊(任何狀態都能看到) */
.quote-message-block {
    margin: 12px 0 0;
    padding: 12px 14px;
    background: linear-gradient(135deg, rgba(192, 168, 117, 0.06) 0%, rgba(192, 168, 117, 0.02) 100%);
    border: 1px solid rgba(192, 168, 117, 0.18);
    border-radius: 8px;
}

.quote-message-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: #8a6d2c;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 6px;
}

.quote-message-label i {
    font-size: 0.78rem;
}

.quote-message-text {
    font-size: 0.9rem;
    line-height: 1.55;
    color: #2a2a2a;
    white-space: pre-wrap;
    word-break: break-word;
    font-style: italic;
}

.quote-message-text.empty {
    color: #999;
    font-style: normal;
}

    .quote-dialog-title {
        margin: 0 0 4px;
        font-size: 1.25rem;
        font-weight: 600;
        color: #2a2a2a;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .quote-dialog-title i {
        color: var(--primary-color, #c0a875);
    }

    .quote-dialog-intro {
        margin: 0;
        color: #555;
        line-height: 1.6;
        font-size: 0.92rem;
    }

    .quote-dialog-form {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .quote-dialog-field {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .quote-dialog-field label {
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-weight: 500;
        font-size: 0.9rem;
        color: #333;
    }

    .quote-dialog-optional {
        font-size: 0.75rem;
        color: #888;
        font-weight: 400;
        background: rgba(192, 168, 117, 0.1);
        padding: 2px 8px;
        border-radius: 10px;
    }

    .quote-dialog-field textarea {
        width: 100%;
        min-height: 110px;
        padding: 12px 14px;
        font-family: inherit;
        font-size: 0.92rem;
        line-height: 1.5;
        color: #2a2a2a;
        background: #fafafa;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        resize: vertical;
        transition: border-color 0.15s ease, background 0.15s ease;
    }

    .quote-dialog-field textarea:focus {
        outline: none;
        border-color: var(--primary-color, #c0a875);
        background: #fff;
        box-shadow: 0 0 0 3px rgba(192, 168, 117, 0.15);
    }

    .quote-dialog-meta {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .quote-dialog-hint {
        color: #888;
        font-size: 0.75rem;
        flex: 1;
    }

    .quote-dialog-counter {
        color: #888;
        font-size: 0.75rem;
        flex-shrink: 0;
        font-variant-numeric: tabular-nums;
    }

    .quote-dialog-actions {
        display: flex;
        justify-content: flex-end;
        gap: 12px;
        flex-wrap: wrap;
        margin-top: 4px;
    }

    .quote-dialog-actions .btn-secondary,
    .quote-dialog-actions .btn-primary {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 10px 18px;
        font-size: 0.92rem;
        font-weight: 500;
        border-radius: 8px;
        cursor: pointer;
        border: 1px solid transparent;
        transition: all 0.15s ease;
    }

    .quote-dialog-actions .btn-secondary {
        background: #f5f5f5;
        color: #333;
        border-color: #e0e0e0;
    }

    .quote-dialog-actions .btn-secondary:hover {
        background: #eaeaea;
    }

    .quote-dialog-actions .btn-primary {
        background: var(--primary-color, #c0a875);
        color: #fff;
    }

    .quote-dialog-actions .btn-primary:hover {
        background: #a88f5e;
    }

    .quote-dialog-actions .btn-primary:disabled,
    .quote-dialog-actions .btn-secondary:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

    /* 顯示在卡片上的 quote_message 區塊(任何狀態都能看到) */
    .quote-message-block {
        margin: 12px 0 0;
        padding: 12px 14px;
        background: linear-gradient(135deg, rgba(192, 168, 117, 0.06) 0%, rgba(192, 168, 117, 0.02) 100%);
        border: 1px solid rgba(192, 168, 117, 0.18);
        border-radius: 8px;
    }

    .quote-message-label {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 0.72rem;
        color: #8a6d2c;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        font-weight: 600;
        margin-bottom: 6px;
    }

    .quote-message-label i {
        font-size: 0.78rem;
    }

    .quote-message-text {
        font-size: 0.9rem;
        line-height: 1.55;
        color: #2a2a2a;
        white-space: pre-wrap;
        word-break: break-word;
        font-style: italic;
    }

    .quote-message-text.empty {
        color: #999;
        font-style: normal;
    }
}
