/* 會員後台樣式 */
.member-container {
    display: flex;
    min-height: calc(100vh - 200px);
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    gap: 30px;
}

/* 側邊選單 */
.member-sidebar {
    width: 280px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    padding: 0;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.member-profile {
    text-align: center;
    padding: 30px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.avatar-container {
    margin-bottom: 15px;
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e9ecef;
}

.avatar-placeholder {
    width: 80px;
    height: 80px;
    background: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border: 3px solid #e9ecef;
}

.avatar-placeholder i {
    font-size: 40px;
    color: #6c757d;
}

.avatar-placeholder.large {
    width: 120px;
    height: 120px;
}

.avatar-placeholder.large i {
    font-size: 60px;
}

.member-profile h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
    color: #333;
}

.member-since {
    color: #6c757d;
    font-size: 14px;
    margin: 0;
}

/* 導航選單 */
.member-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.member-nav .nav-item {
    display: block;
    padding: 15px 25px;
    color: #555;
    text-decoration: none;
    border-bottom: 1px solid #f8f9fa;
    transition: all 0.3s ease;
}

.member-nav .nav-item:hover {
    background: #f8f9fa;
    color: #007bff;
    padding-left: 30px;
}

.member-nav .nav-item.active {
    background: #007bff;
    color: white;
    border-left: 4px solid #0056b3;
}

.member-nav .nav-item.logout {
    color: #dc3545;
}

.member-nav .nav-item.logout:hover {
    background: #f8d7da;
    color: #721c24;
}

.member-nav .nav-item i {
    margin-right: 10px;
    width: 16px;
    text-align: center;
}

/* 主要內容區 */
.member-content {
    flex: 1;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

.content-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.content-header h1 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 28px;
}

.content-header p {
    margin: 0;
    color: #6c757d;
    font-size: 16px;
}

.header-left {
    flex: 1;
}

.header-actions {
    display: flex;
    gap: 10px;
}

/* 統計卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.stat-card:nth-child(2) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.3);
}

.stat-card:nth-child(3) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

.stat-card:nth-child(4) {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    box-shadow: 0 4px 15px rgba(67, 233, 123, 0.3);
}

.stat-icon {
    font-size: 28px;
    opacity: 0.9;
}

.stat-info h3 {
    margin: 0 0 5px 0;
    font-size: 24px;
    font-weight: bold;
}

.stat-info p {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
}

/* 快速操作 */
.quick-actions {
    margin-bottom: 40px;
}

.quick-actions h2 {
    margin-bottom: 20px;
    color: #333;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.action-card {
    background: #fff;
    border: 2px solid #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    text-align: center;
}

.action-card:hover {
    border-color: #007bff;
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.15);
    color: #007bff;
}

.action-card i {
    font-size: 32px;
    margin-bottom: 15px;
    color: #007bff;
}

.action-card h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.action-card p {
    margin: 0;
    color: #6c757d;
    font-size: 14px;
}

/* 最近訂單 */
.recent-orders, .available-coupons {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    margin: 0;
    color: #333;
}

.view-all {
    color: #007bff;
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.view-all:hover {
    color: #0056b3;
}

/* 訂單表格 */
.orders-table table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.orders-table th,
.orders-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #f8f9fa;
}

.orders-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
}

.orders-table tr:hover {
    background: #f8f9fa;
}

.order-number {
    font-family: monospace;
    font-weight: bold;
    color: #007bff;
}

.amount {
    font-weight: bold;
    color: #28a745;
}

/* 狀態標籤 */
.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-processing {
    background: #d1ecf1;
    color: #0c5460;
}

.status-completed {
    background: #d4edda;
    color: #155724;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.payment-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.payment-pending {
    background: #fff3cd;
    color: #856404;
}

.payment-paid {
    background: #d4edda;
    color: #155724;
}

.payment-failed {
    background: #f8d7da;
    color: #721c24;
}

/* 商品表格樣式 */
.products-table {
    margin: 20px 0;
}

.products-table table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.products-table th,
.products-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #f8f9fa;
    vertical-align: middle;
}

.products-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
}

.product-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.product-thumb {
    width: 45px;
    height: 45px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    flex-shrink: 0;
}

.product-thumb-placeholder {
    width: 45px;
    height: 45px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    flex-shrink: 0;
}

.product-details h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.product-code {
    margin: 0;
    font-size: 12px;
    color: #6c757d;
}

.spec-info {
    color: #666;
    font-size: 14px;
}

.price, .quantity, .subtotal {
    font-weight: 500;
    color: #333;
}

/* 優惠券格子 */
.coupons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.coupon-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.coupon-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 40px 40px 0;
    border-color: transparent rgba(255, 255, 255, 0.2) transparent transparent;
}

.coupon-discount {
    text-align: center;
    margin-bottom: 15px;
}

.discount-value {
    font-size: 24px;
    font-weight: bold;
    display: block;
}

.discount-text {
    font-size: 14px;
    opacity: 0.9;
}

.coupon-info h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
}

.coupon-code {
    font-family: monospace;
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 14px;
    margin: 5px 0;
}

.coupon-expire {
    font-size: 12px;
    opacity: 0.8;
    margin: 5px 0 0 0;
}

/* 按鈕 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    justify-content: center;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
    color: white;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    color: white;
}

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

.btn-outline:hover {
    background: #007bff;
    color: white;
}

.btn-view {
    background: #28a745;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
}

.btn-view:hover {
    background: #218838;
    color: white;
}

/* 通知訊息 */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    margin-left: 15px;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .member-container {
        flex-direction: column;
        padding: 10px;
        gap: 20px;
    }
    
    .member-sidebar {
        width: 100%;
        position: static;
    }
    
    .member-profile {
        padding: 20px;
    }
    
    .avatar, .avatar-placeholder {
        width: 60px;
        height: 60px;
    }
    
    .avatar-placeholder i {
        font-size: 30px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .action-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .orders-table {
        overflow-x: auto;
    }
    
    .orders-table table {
        min-width: 600px;
    }
    
    .coupons-grid {
        grid-template-columns: 1fr;
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .header-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

/* 個人資料頁面特殊樣式 */
.profile-section {
    margin-bottom: 40px;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 30px;
}

.profile-section h2 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 20px;
    border-bottom: 2px solid #007bff;
    display: inline-block;
    padding-bottom: 5px;
}

/* 頭像上傳區 */
.avatar-upload-section {
    display: flex;
    align-items: center;
    gap: 30px;
}

.current-avatar .preview-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #e9ecef;
}

.avatar-controls {
    flex: 1;
}

.upload-hint {
    color: #6c757d;
    font-size: 14px;
    margin: 10px 0 0 0;
}

/* 表單樣式 */
.profile-form {
    max-width: none;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-group input:disabled {
    background: #f8f9fa;
    color: #6c757d;
}

.form-hint {
    color: #6c757d;
    font-size: 12px;
    margin: 5px 0 0 0;
}

.required {
    color: #dc3545;
}

/* 狀態顯示 */
.status-display {
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

.provider-display {
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 10px;
}

.created-at {
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    color: #6c757d;
}

/* 驗證狀態 */
.verification-status {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e9ecef;
}

.verification-status h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

.verification-items {
    display: flex;
    gap: 20px;
}

.verification-item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.verification-item i {
    font-size: 20px;
}

.verification-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-left: auto;
}

.verification-badge.verified {
    background: #d4edda;
    color: #155724;
}

.verification-badge.unverified {
    background: #fff3cd;
    color: #856404;
}

.text-success {
    color: #28a745 !important;
}

.text-muted {
    color: #6c757d !important;
}

.text-warning {
    color: #ffc107 !important;
}

.text-primary {
    color: #007bff !important;
}

.text-danger {
    color: #dc3545 !important;
}

/* 表單操作按鈕 */
.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

/* 訂單查詢頁面樣式 */
.order-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.filter-form {
    display: flex;
    align-items: center;
    gap: 15px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    font-weight: 500;
    color: #333;
    white-space: nowrap;
}

.filter-group select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
}

.filter-summary {
    color: #6c757d;
    font-size: 14px;
}

/* 空狀態 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 64px;
    color: #dee2e6;
    margin-bottom: 20px;
}

.empty-state h3 {
    margin: 0 0 10px 0;
    color: #6c757d;
    font-size: 20px;
}

.empty-state p {
    margin: 0 0 30px 0;
    color: #6c757d;
}

/* 訂單卡片 */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.order-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.order-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f8f9fa;
}

.order-info h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
    color: #333;
}

.order-date {
    margin: 0;
    color: #6c757d;
    font-size: 14px;
}

.order-status {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.order-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-item .label {
    color: #6c757d;
    font-size: 14px;
}

.summary-item .value {
    font-weight: 500;
    color: #333;
}

.summary-item .value.amount {
    color: #28a745;
    font-weight: bold;
}

.order-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* 分頁 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 40px 0 20px 0;
}

.page-btn {
    padding: 10px 15px;
    background: #007bff;
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.3s ease;
}

.page-btn:hover {
    background: #0056b3;
    color: white;
}

.page-numbers {
    display: flex;
    gap: 5px;
}

.page-number {
    padding: 10px 15px;
    background: #f8f9fa;
    color: #333;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.page-number:hover {
    background: #007bff;
    color: white;
}

.page-number.active {
    background: #007bff;
    color: white;
}

.pagination-info {
    text-align: center;
    color: #6c757d;
    font-size: 14px;
}

/* 密碼頁面特殊樣式 */
.security-notice {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    gap: 15px;
}

.notice-icon {
    font-size: 24px;
    color: #007bff;
}

.notice-content h3 {
    margin: 0 0 10px 0;
    color: #007bff;
    font-size: 16px;
}

.notice-content ul {
    margin: 0;
    padding-left: 20px;
    color: #333;
}

.notice-content li {
    margin-bottom: 5px;
}

.oauth-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.oauth-notice .notice-icon {
    color: #856404;
}

.oauth-notice .notice-text {
    color: #856404;
    font-size: 14px;
}

.password-section {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.password-form {
    max-width: 500px;
}

.password-input {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    font-size: 16px;
}

.password-strength {
    margin-top: 10px;
}

.strength-bar {
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 5px;
}

.strength-fill {
    height: 100%;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.strength-fill.weak {
    background: #dc3545;
}

.strength-fill.medium {
    background: #ffc107;
}

.strength-fill.good {
    background: #007bff;
}

.strength-fill.strong {
    background: #28a745;
}

.strength-text {
    font-size: 12px;
    color: #6c757d;
}

.password-match {
    margin-top: 10px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.password-match.success {
    color: #28a745;
}

.password-match.error {
    color: #dc3545;
}

.security-status {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 30px;
}

.security-status h2 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 20px;
    border-bottom: 2px solid #007bff;
    display: inline-block;
    padding-bottom: 5px;
}

.security-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.security-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.item-icon {
    font-size: 24px;
}

.item-info {
    flex: 1;
}

.item-info h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #333;
}

.item-info p {
    margin: 0;
    color: #6c757d;
    font-size: 14px;
}

.item-status {
    text-align: right;
}

/* 優惠券頁面樣式 */
.coupon-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.stat-item:nth-child(2) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.3);
}

.stat-item:nth-child(3) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

.stat-number {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

.coupon-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 30px;
    background: #f8f9fa;
    padding: 5px;
    border-radius: 8px;
}

.tab-item {
    flex: 1;
    padding: 12px 15px;
    text-decoration: none;
    color: #6c757d;
    border-radius: 6px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 500;
}

.tab-item:hover {
    color: #007bff;
    background: rgba(0, 123, 255, 0.1);
}

.tab-item.active {
    background: #007bff;
    color: white;
}

.tab-item .badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.tab-item.active .badge {
    background: rgba(255, 255, 255, 0.3);
}

.coupon-content {
    min-height: 400px;
}

.coupon-card {
    position: relative;
    overflow: hidden;
}

.coupon-card.available {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.coupon-card.used {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    opacity: 0.8;
}

.coupon-card.expired {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    opacity: 0.7;
}

.coupon-ribbon {
    position: absolute;
    top: 15px;
    right: -25px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 5px 30px;
    font-size: 12px;
    font-weight: bold;
    transform: rotate(45deg);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.coupon-status {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
}

.coupon-details {
    margin: 15px 0;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
}

.detail-item i {
    width: 16px;
    text-align: center;
}

.copy-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-left: auto;
    transition: background 0.3s ease;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.coupon-actions {
    margin-top: 15px;
}

.usage-info {
    margin-top: 10px;
}

.usage-info p {
    margin: 5px 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.expiry-info {
    margin-top: 10px;
}

.expiry-info p {
    margin: 5px 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 複製提示 */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* 響應式調整 */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .avatar-upload-section {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .verification-items {
        flex-direction: column;
        gap: 15px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .order-filters {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .order-summary {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .order-actions {
        flex-direction: column;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .coupon-stats {
        grid-template-columns: 1fr;
    }
    
    .coupon-tabs {
        flex-direction: column;
        gap: 5px;
    }
    
    .security-items {
        gap: 10px;
    }
    
    .security-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}

/* ===== 通知訊息樣式 ===== */
#alertContainer {
    margin-bottom: 20px;
    position: relative;
    z-index: 1000;
}

.alert {
    padding: 15px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    animation: slideInDown 0.3s ease-out;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.alert-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    padding: 0;
    margin-left: 15px;
    transition: opacity 0.2s;
}

.alert-close:hover {
    opacity: 1;
}

@keyframes slideInDown {
    from {
        transform: translate3d(0, -100%, 0);
        opacity: 0;
    }
    to {
        transform: translate3d(0, 0, 0);
        opacity: 1;
    }
}