/* 後台管理系統樣式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

/* 管理後台佈局 */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* 手機導航切換按鈕 */
.mobile-nav-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1003;
    background: #2c3e50;
    border: none;
    border-radius: 4px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    /* 確保按鈕在手機版時可見 */
    min-width: 36px;
    min-height: 36px;
    /* 防止被其他元素影響 */
    pointer-events: auto;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.mobile-nav-toggle:hover {
    background: #34495e;
}

.hamburger {
    display: block;
    width: 20px;
    height: 2px;
    background: white;
    position: relative;
    transition: all 0.3s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: white;
    transition: all 0.3s ease;
}

.hamburger::before {
    top: -6px;
}

.hamburger::after {
    bottom: -6px;
}

/* 側邊欄 */
.sidebar {
    width: 260px;
    background: #2c3e50;
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #34495e;
    position: relative;
}

.sidebar-header h2 {
    font-size: 18px;
    margin-bottom: 15px;
}

.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-info span {
    font-size: 14px;
    color: #bdc3c7;
}

.user-role {
    font-size: 11px;
    color: #95a5a6;
    font-style: italic;
}

.btn-logout {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-logout:hover {
    background: #c0392b;
}

/* 手機關閉按鈕 */
.close-sidebar {
    display: none;
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #bdc3c7;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s;
}

.close-sidebar:hover {
    background: #34495e;
    color: white;
}

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

.nav-menu li {
    border-bottom: 1px solid #34495e;
}

.nav-link {
    display: block;
    padding: 15px 20px;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}

.nav-link:hover,
.nav-link.active {
    background: #34495e;
    color: white;
    border-left: 3px solid #3498db;
}

.nav-link.external {
    border-top: 1px solid #34495e;
    margin-top: 20px;
}

/* 主內容區 */
.main-content {
    flex: 1;
    margin-left: 260px;
    background: #f5f7fa;
    min-height: 100vh;
}

/* 內容標題 */
.content-header {
    background: white;
    padding: 20px 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e0e6ed;
}

.content-header h1 {
    font-size: 24px;
    color: #2c3e50;
    font-weight: 600;
}

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

/* 內容區域 */
.content-area {
    padding: 30px;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

/* 控制台樣式 */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 24px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 10px;
}

.stat-info h3 {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 5px;
}

.stat-info p {
    color: #7f8c8d;
    font-size: 14px;
}

/* 最近活動 */
.recent-activity {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.recent-activity h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.activity-list {
    max-height: 300px;
    overflow-y: auto;
}

.activity-item {
    padding: 10px 0;
    border-bottom: 1px solid #ecf0f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.activity-content {
    color: #34495e;
    font-size: 14px;
}

.activity-time {
    color: #95a5a6;
    font-size: 12px;
}

/* 篩選和搜尋 */
.search-section,
.reports-filters {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.search-input,
.filter-select {
    flex: 1;
    min-width: 200px;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.result-count {
    color: #7f8c8d;
    font-size: 14px;
    white-space: nowrap;
}

/* 列表樣式 */
.shops-list,
.reports-list,
.users-list,
.fields-list {
    display: grid;
    gap: 15px;
}

.shops-list {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
}

.reports-list,
.users-list,
.fields-list {
    grid-template-columns: 1fr;
}

/* 卡片樣式 */
.shop-card,
.report-card,
.user-card,
.field-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.shop-card:hover,
.report-card:hover,
.user-card:hover,
.field-card:hover {
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.card-subtitle {
    font-size: 14px;
    color: #7f8c8d;
}

.card-actions {
    display: flex;
    gap: 8px;
}

.card-content {
    margin-top: 15px;
}

.card-content p {
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.4;
}

.card-content p:last-child {
    margin-bottom: 0;
}

/* 備份區域 */
.backup-container {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.backup-info {
    text-align: center;
    margin-bottom: 30px;
}

.backup-info h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.backup-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.backup-list {
    max-height: 400px;
    overflow-y: auto;
}

/* 設定區域 */
.settings-container {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

/* 個人資料區域 */
.profile-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.profile-card,
.password-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.profile-card h3,
.password-card h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.profile-form,
.password-form {
    max-width: 100%;
}

.profile-form input[readonly] {
    background-color: #f8f9fa;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .profile-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* 欄位容器 */
.fields-container {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.fields-container h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.fields-description {
    color: #7f8c8d;
    margin-bottom: 30px;
    font-size: 14px;
}

.fields-categories {
    display: grid;
    gap: 30px;
}

.category-section {
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    padding: 20px;
}

.category-section h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 16px;
}

.system-fields-list,
.custom-fields-list {
    display: grid;
    gap: 10px;
}

.field-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.field-item.system {
    border-left-color: #95a5a6;
    background: #ecf0f1;
}

.field-item.custom {
    border-left-color: #27ae60;
}

.field-info {
    flex: 1;
}

.field-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.field-details {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #7f8c8d;
}

.field-type {
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 4px;
}

.field-actions {
    display: flex;
    gap: 8px;
}

.field-actions .btn {
    padding: 4px 8px;
    font-size: 12px;
}

/* 表單樣式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* 按鈕樣式 */
.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
    text-transform: none;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #229954;
}

.btn-warning {
    background: #f39c12;
    color: white;
}

.btn-warning:hover {
    background: #e67e22;
}

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

.btn-danger:hover {
    background: #c0392b;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* 狀態標識 */
.status-active {
    color: #27ae60;
    font-weight: 500;
}

.status-closed {
    color: #e74c3c;
    font-weight: 500;
}

.status-pending {
    color: #f39c12;
    font-weight: 500;
}

/* 模態框 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

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

.modal-header h2 {
    margin: 0;
    color: #2c3e50;
    font-size: 20px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #95a5a6;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
}

.close-btn:hover {
    color: #e74c3c;
    background-color: #f8f9fa;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

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

/* 增強版關閉按鈕樣式 */
.close-modal {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    font-size: 20px;
    cursor: pointer;
    color: #6c757d;
    padding: 8px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.close-modal:hover {
    color: #dc3545;
    background-color: #fff5f5;
    border-color: #dc3545;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.close-modal:active {
    transform: scale(0.95);
}

/* 模態框關閉提示 */
.modal-header {
    position: relative;
}

.modal-header::after {
    content: "💡 點擊 ✕ 關閉，或按 ESC 鍵";
    position: absolute;
    top: -30px;
    right: 0;
    background: #fff3cd;
    color: #856404;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    border: 1px solid #ffeaa7;
    z-index: 15;
}

.modal-header:hover::after {
    opacity: 1;
}

/* 用戶模態框專用提示 */
#create-user-modal .modal-header::after {
    content: "💡 點擊 ✕ 關閉，或按 ESC 鍵 (會確認是否儲存)";
}

.shop-form,
.form {
    padding: 30px;
}

/* 用戶模態框的按鈕區域改善 */
#create-user-modal .form-actions {
    border-top: 1px solid #e9ecef;
    padding-top: 20px;
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

#create-user-modal .form-actions .btn {
    flex: 1;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
    min-height: 48px;
}

#create-user-modal .form-actions .btn-secondary {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    color: #6c757d;
    position: relative;
}

#create-user-modal .form-actions .btn-secondary:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #495057;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

#create-user-modal .form-actions .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

#create-user-modal .form-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}

/* 響應式設計 */
@media (max-width: 768px) {
    #create-user-modal .form-actions {
        flex-direction: column;
    }

    #create-user-modal .form-actions .btn {
        width: 100%;
    }
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e6ed;
}

/* 座標輸入 */
.coordinates {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* 食記輸入工具 */
.reviews-input-container {
    position: relative;
}

.reviews-tools {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-tool {
    background: #ecf0f1;
    border: 1px solid #bdc3c7;
    color: #2c3e50;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}

.btn-tool:hover {
    background: #d5dbdb;
}

.help-text {
    font-size: 12px;
    color: #7f8c8d;
}

/* 通知 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    z-index: 3000;
    animation: slideIn 0.3s ease;
}

.notification-success {
    background: #27ae60;
}

.notification-error {
    background: #e74c3c;
}

.notification-info {
    background: #3498db;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 欄位類型特定樣式 */
#field-options-group {
    transition: all 0.3s ease;
}

/* 編輯群食記管理 */
.editor-reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.editor-reviews-header h2 {
    color: #2c3e50;
    margin: 0;
    flex: 1;
}

.header-stats {
    display: flex;
    gap: 15px;
}

.stat-card {
    background: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
    min-width: 80px;
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #3498db;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-select {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    color: #2c3e50;
    font-size: 14px;
    min-width: 150px;
}

.search-input {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    flex: 1;
    min-width: 200px;
    max-width: 300px;
}

.editor-reviews-list {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.editor-review-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.editor-review-item:hover {
    background-color: #f8f9fa;
}

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

.review-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.review-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
    margin: 0;
}

.review-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #7f8c8d;
    align-items: center;
}

.review-shop {
    color: #3498db;
    text-decoration: none;
}

.review-shop:hover {
    text-decoration: underline;
}

.review-author {
    font-weight: 500;
}

.review-date {
    opacity: 0.8;
}

.review-status {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

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

.review-actions {
    display: flex;
    gap: 8px;
}

.review-actions .btn {
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 60px;
    justify-content: center;
    transition: all 0.2s ease;
}

.review-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.review-actions .btn i {
    font-size: 11px;
}

/* 響應式調整 */
@media (max-width: 768px) {
    .review-actions .btn {
        padding: 5px 8px;
        font-size: 11px;
        min-width: 50px;
    }

    .review-actions .btn i {
        font-size: 10px;
    }
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.5;
    color: #bdc3c7;
}

.empty-state h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 20px;
}

.empty-state p {
    color: #7f8c8d;
    font-size: 14px;
    margin: 0;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .editor-reviews-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .header-stats {
        justify-content: center;
    }
    
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-input {
        max-width: none;
    }
    
    .editor-review-item {
        grid-template-columns: 1fr;
        gap: 15px;
        text-align: center;
    }
    
    .review-meta {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .review-actions {
        justify-content: center;
    }
    
    /* 手機導航切換按鈕顯示 */
    .mobile-nav-toggle {
        display: block !important;
        position: fixed !important;
        top: 15px !important;
        left: 15px !important;
        z-index: 1003 !important;
        visibility: visible !important;
        opacity: 1 !important;
        /* 確保按鈕在手機版時有明顯的視覺提示 */
        background: #e74c3c !important;
        border: 2px solid #fff !important;
        box-shadow: 0 4px 15px rgba(0,0,0,0.5) !important;
    }
    
    /* 側邊欄手機樣式 */
    .sidebar {
        width: 280px;
        height: 100vh;
        position: fixed;
        left: -280px;
        top: 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 2px 0 10px rgba(0,0,0,0.3);
        z-index: 1002;
    }
    
    .sidebar.active {
        transform: translateX(0);
        left: 0;
    }
    
    /* 手機關閉按鈕顯示 */
    .close-sidebar {
        display: block;
    }
    
    /* 主要內容區域調整 */
    .main-content {
        margin-left: 0;
        width: 100%;
        padding-top: 60px;
    }
    
    .content-area {
        padding: 15px;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .coordinates {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 2% auto;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .form,
    .shop-form {
        padding: 20px;
    }
    
    /* 改善觸控體驗 */
    .nav-link {
        padding: 18px 20px;
        min-height: 50px;
        display: flex;
        align-items: center;
        touch-action: manipulation;
    }
    
    .btn {
        min-height: 44px;
        padding: 12px 16px;
        touch-action: manipulation;
        user-select: none;
    }
    
    /* 改善表格和卡片在手機上的顯示 */
    .shop-card,
    .report-card,
    .user-card {
        margin-bottom: 15px;
        padding: 15px;
    }
    
    .card-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .card-actions .btn {
        width: 100%;
        text-align: center;
    }
}

/* 刷新按鈕和自動刷新樣式 */
.reports-header,
.shops-header,
.users-header,
.fields-header,
.backup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 0;
    border-bottom: 1px solid #e1e8ed;
}

.reports-filters,
.search-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.reports-actions,
.shops-actions,
.users-actions,
.fields-actions,
.backup-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.refresh-icon {
    display: inline-block;
    transition: transform 0.5s ease;
}

.auto-refresh-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.auto-refresh-toggle label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.auto-refresh-toggle input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .reports-header,
    .shops-header,
    .users-header,
    .fields-header,
    .backup-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .reports-filters,
    .search-section {
        flex-wrap: wrap;
    }
    
    .reports-actions,
    .shops-actions,
    .users-actions,
    .fields-actions,
    .backup-actions {
        justify-content: center;
    }
}

    .reports-actions,
    .fields-actions,
    .awards-actions {
        display: flex;
        gap: 10px;
        align-items: center;
    }

    .awards-container {
        padding: 20px;
    }

    .awards-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        padding: 20px;
        background: white;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .awards-info h3 {
        margin-bottom: 5px;
        color: #2c3e50;
    }

    .awards-description {
        color: #7f8c8d;
        font-size: 14px;
    }

    .awards-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 20px;
        margin-top: 20px;
    }

    .award-card {
        background: white;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        overflow: hidden;
        transition: transform 0.2s, box-shadow 0.2s;
    }

    .award-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    }

    .award-card .card-header {
        display: flex;
        align-items: center;
        padding: 15px;
        background: #f8f9fa;
        border-bottom: 1px solid #e9ecef;
    }

    .award-icon {
        font-size: 24px;
        margin-right: 15px;
        min-width: 40px;
        text-align: center;
    }

    .award-info {
        flex: 1;
    }

    .award-title {
        font-weight: 600;
        color: #2c3e50;
        margin-bottom: 2px;
    }

    .award-category {
        font-size: 12px;
        color: #7f8c8d;
        background: #ecf0f1;
        padding: 2px 8px;
        border-radius: 12px;
        display: inline-block;
    }

    .award-card .card-content {
        padding: 15px;
    }

    .award-card .card-content p {
    margin-bottom: 8px;
    font-size: 14px;
}

/* 店家卡片專用樣式 */
.shop-info {
    flex: 1;
    min-width: 0;
}

.shop-tags {
    margin-top: 8px;
}

.tag {
    display: inline-block;
    background: #e1f5fe;
    color: #0277bd;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 12px;
    margin-right: 4px;
    margin-bottom: 4px;
    border: 1px solid #b3e5fc;
}

.info-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 8px;
    gap: 8px;
}

.info-label {
    font-weight: 500;
    color: #555;
    min-width: 80px;
    flex-shrink: 0;
    font-size: 13px;
}

.info-value {
    color: #333;
    flex: 1;
    font-size: 13px;
    word-break: break-word;
}

.info-value.review-text {
    font-style: italic;
    color: #666;
    max-height: 3em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    box-orient: vertical;
}

.status-active {
    color: #27ae60;
    font-weight: 500;
}

.status-inactive {
    color: #e74c3c;
    font-weight: 500;
}

.status-pending {
    color: #f39c12;
    font-weight: 500;
}

    .award-card .card-content p:last-child {
    margin-bottom: 0;
}

.award-card.status-inactive {
    opacity: 0.7;
    border-left: 4px solid #dc3545;
}

.award-card.status-active {
    border-left: 4px solid #28a745;
}

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

.status-inactive {
    color: #dc3545;
    font-weight: bold;
}

    .help-text {
        font-size: 12px;
        color: #7f8c8d;
        margin-top: 4px;
        display: block;
    }

    @media (max-width: 768px) {
        .awards-header {
            flex-direction: column;
            gap: 15px;
            align-items: stretch;
        }

        .awards-actions {
            justify-content: center;
        }

        .awards-list {
            grid-template-columns: 1fr;
        }
    }

/* 店家獎項管理樣式 */
.awards-management {
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 15px;
    background-color: #f8f9fa;
}

.current-awards {
    margin-bottom: 15px;
    min-height: 60px;
    border: 1px dashed #dee2e6;
    border-radius: 6px;
    padding: 10px;
    background-color: white;
}

.current-awards .no-awards {
    color: #6c757d;
    font-style: italic;
    text-align: center;
    margin: 20px 0;
}

.current-awards .error {
    color: #dc3545;
    text-align: center;
    margin: 20px 0;
}

.award-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    margin: 4px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.award-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.award-icon {
    font-size: 16px;
}

.award-name {
    font-weight: 500;
}

.remove-award {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 2px;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: background-color 0.2s ease;
}

.remove-award:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.awards-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.awards-select {
    flex: 1;
    min-width: 200px;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    background-color: white;
    font-size: 14px;
}

.awards-select:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

@media (max-width: 768px) {
    .awards-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .awards-select {
        min-width: auto;
        margin-bottom: 10px;
    }
    
    .award-tag {
        font-size: 12px;
        padding: 6px 10px;
    }
}

/* 手機上的表單優化 */
@media (max-width: 768px) {
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group label {
        display: block;
        margin-bottom: 8px;
        font-weight: 500;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        width: 100%;
        padding: 12px;
        font-size: 16px; /* 防止iOS縮放 */
        border: 1px solid #ddd;
        border-radius: 4px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .form-actions .btn {
        width: 100%;
        margin: 0;
    }
    
    /* 改善搜尋區域 */
    .search-section {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .search-input {
        width: 100%;
        padding: 12px;
        font-size: 16px;
    }
    
    /* 改善統計卡片 */
    .stat-card {
        padding: 20px;
        text-align: center;
    }
    
    .stat-icon {
        font-size: 2.5em;
        margin-bottom: 15px;
    }
    
    /* 改善模態框 */
    .modal-content {
        margin: 5% auto;
        max-height: 85vh;
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .modal-body {
        padding: 20px;
        max-height: 60vh;
        overflow-y: auto;
    }
    
    /* 改善通知 */
    .notification {
        position: fixed;
        top: 70px;
        left: 15px;
        right: 15px;
        z-index: 1002;
        max-width: none;
    }
}

/* 額外的手機優化 */
@media (max-width: 480px) {
    .mobile-nav-toggle {
        top: 10px;
        left: 10px;
        padding: 10px;
        display: block !important;
        z-index: 1003;
    }
    
    .hamburger,
    .hamburger::before,
    .hamburger::after {
        width: 18px;
    }
    
    .sidebar {
        width: 100%;
        left: -100%;
        z-index: 1002;
    }
    
    .content-area {
        padding: 10px;
    }
    
    .content-header {
        padding: 15px 10px;
    }
    
    .content-header h1 {
        font-size: 20px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-info h3 {
        font-size: 24px;
    }
    
    .shop-card,
    .report-card,
    .user-card {
        padding: 15px;
        margin-bottom: 10px;
    }
    
    .card-title {
        font-size: 16px;
    }
    
    .card-subtitle {
        font-size: 14px;
    }
}

/* 觸控優化 */
@media (hover: none) and (pointer: coarse) {
    .nav-link:hover {
        background: #34495e;
        color: white;
        border-left: 3px solid #3498db;
    }
    
    .btn:hover {
        opacity: 1;
        transform: none;
    }
    
    .shop-card:hover,
    .report-card:hover,
    .user-card:hover {
        transform: none;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
}

/* 改善滾動體驗 */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #34495e;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #5a6c7d;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #7f8c8d;
}

/* 改善載入狀態 */
.loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}

.loading::before {
    content: '⏳ ';
    font-size: 20px;
    margin-right: 10px;
}

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

.empty-state h3 {
    margin-bottom: 15px;
    color: #333;
}

.empty-state p {
    font-size: 16px;
    line-height: 1.6;
}

/* 支付方式多選選項樣式 */
.payment-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 8px;
}

.payment-option {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
}

.payment-option:hover {
    border-color: #007bff;
    background: #f8f9fa;
}

.payment-option input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.1);
}

.payment-option input[type="checkbox"]:checked + .payment-icon + .payment-label {
    color: #007bff;
    font-weight: 500;
}

.payment-option:has(input[type="checkbox"]:checked) {
    border-color: #007bff;
    background: #e3f2fd;
}

.payment-icon {
    margin-right: 6px;
    font-size: 16px;
}

.payment-label {
    font-size: 14px;
    color: #333;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .payment-options {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 8px;
    }
    
    .payment-option {
        padding: 6px 8px;
    }
    
    .payment-label {
        font-size: 13px;
    }
}

/* 關鍵字提示框樣式 */
.help-text-box {
    margin-top: 8px;
    padding: 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.4;
}

.keyword-group {
    color: #495057;
    margin-top: 6px;
    display: inline-block;
}

.keyword {
    background: #007bff;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    margin: 2px;
    display: inline-block;
}

.help-text-box br {
    line-height: 1.8;
}

/* =================================================================
   增強版用戶管理系統樣式
   ================================================================= */

/* 用戶管理工具列 */
.user-management-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #e1e5e9;
}

.toolbar-left, .toolbar-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

.user-controls {
    margin-bottom: 20px;
}

.search-filters {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 15px;
}

.search-box {
    display: flex;
    gap: 8px;
    align-items: center;
}

.search-box input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    min-width: 250px;
}

.filter-controls {
    display: flex;
    gap: 10px;
}

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

/* 增強的用戶統計 */
.user-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #e1e5e9;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.stat-card.stat-total {
    border-left: 4px solid #007bff;
}

.stat-card.stat-active {
    border-left: 4px solid #28a745;
}

.stat-card.stat-admins {
    border-left: 4px solid #6f42c1;
}

.stat-card.stat-today {
    border-left: 4px solid #fd7e14;
}

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

.stat-number {
    font-size: 2em;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.stat-label {
    font-size: 0.9em;
    color: #666;
    margin: 0;
}

.stat-icon {
    font-size: 2em;
    opacity: 0.7;
}

/* 批量操作工具列 */
.bulk-actions-toolbar {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.bulk-info {
    font-weight: 500;
    color: #856404;
}

.bulk-buttons {
    display: flex;
    gap: 10px;
}

/* 增強的用戶表格 */
.user-table.enhanced {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.user-table.enhanced thead {
    background: #f8f9fa;
}

.user-table.enhanced th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    font-size: 0.9em;
}

.user-table.enhanced td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
}

.user-table.enhanced tbody tr:hover {
    background: #f8f9fa;
}

.user-table.enhanced tbody tr:last-child td {
    border-bottom: none;
}

/* 表格列寬度 */
.checkbox-column { width: 40px; }
.avatar-column { width: 80px; }
.user-info-column { min-width: 200px; }
.role-column { width: 140px; }
.status-column { width: 120px; }
.last-login-column { width: 150px; }
.created-column { width: 120px; }
.actions-column { width: 200px; }

/* 用戶頭像 */
.user-avatar {
    display: flex;
    justify-content: center;
    align-items: center;
}

.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 16px;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 用戶資訊 */
.user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-name {
    font-weight: 600;
    color: #333;
    font-size: 1em;
}

.user-email {
    color: #666;
    font-size: 0.9em;
}

.user-meta {
    color: #999;
    font-size: 0.8em;
}

/* 角色和狀態徽章 */
.role-badge, .status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
}

/* 角色徽章樣式 */
.role-badge.role-super-admin {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
}

.role-badge.role-admin {
    background: linear-gradient(135deg, #6f42c1, #5a32a3);
    color: white;
}

.role-badge.role-editor {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #212529;
}

.role-badge.role-user {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
}

/* 狀態徽章樣式 */
.status-badge.status-active {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    color: white;
}

.status-badge.status-inactive {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
}

.status-badge.status-suspended {
    background: linear-gradient(135deg, #dc3545, #bd2130);
    color: white;
}

/* 角色和狀態單元格 */
.role-cell, .status-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 用戶表格中的下拉選單樣式 */
.role-select, .status-select {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 0.85em;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
}

.role-select:focus, .status-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.role-select:hover, .status-select:hover {
    border-color: #007bff;
}

/* 為下拉選單中的圖標添加樣式 */
.role-select option, .status-select option {
    padding: 4px 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 改善用戶表格的響應式設計 */
@media (max-width: 1200px) {
    .role-select, .status-select {
        font-size: 0.8em;
        min-width: 80px;
    }

    .user-table.enhanced th,
    .user-table.enhanced td {
        padding: 8px 4px;
    }

    .user-name, .user-email {
        font-size: 0.85em;
    }
}

.btn-quick-edit {
    padding: 2px 6px;
    font-size: 0.8em;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-quick-edit:hover {
    background: #f8f9fa;
    border-color: #007bff;
    color: #007bff;
}

/* 登入時間資訊 */
.last-login-info, .created-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.login-time, .created-time {
    font-size: 0.9em;
    color: #333;
}

/* 操作按鈕 */
.action-buttons {
    display: flex;
    gap: 6px;
}

.action-buttons .btn {
    padding: 6px 10px;
    font-size: 0.85em;
}

/* 分頁控制 */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #e1e5e9;
}

.pagination-info {
    color: #666;
    font-size: 0.9em;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-indicator {
    margin: 0 15px;
    font-weight: 500;
    color: #333;
}

/* 用戶表單標籤頁 */
.user-form-tabs {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.tab-buttons {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.tab-btn:hover {
    background: #e9ecef;
    color: #007bff;
}

.tab-btn.active {
    color: #007bff;
    border-bottom-color: #007bff;
    background: #fff;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: #007bff;
}

/* 表單分段 */
.form-section {
    margin-bottom: 25px;
}

.form-section h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-section h4::before {
    content: '';
    width: 4px;
    height: 20px;
    background: #007bff;
    border-radius: 2px;
}

/* 權限設定網格 */
.permissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.permission-group {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
}

.permission-group h5 {
    margin-bottom: 12px;
    color: #495057;
    font-size: 0.95em;
    font-weight: 600;
}

.permission-group .checkbox-label {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.permission-group .checkbox-label:hover {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.permission-group .checkbox-label input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.1);
}

/* 權限預設按鈕 */
.permission-presets {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.permission-presets h5 {
    margin-bottom: 15px;
    color: #495057;
    font-size: 0.95em;
}

.preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.preset-buttons .btn {
    padding: 8px 16px;
    font-size: 0.85em;
    border-radius: 20px;
}

/* 密碼輸入組 */
.password-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-group input {
    flex: 1;
    padding-right: 40px;
}

.password-toggle {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.password-toggle:hover {
    background: #f8f9fa;
    color: #333;
}

/* Toast 提示樣式 */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

.toast {
    background: #333;
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.toast.toast-success {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.toast.toast-error {
    background: linear-gradient(135deg, #dc3545, #e74c3c);
}

.toast.toast-warning {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: #212529;
}

.toast.toast-info {
    background: linear-gradient(135deg, #007bff, #17a2b8);
}

/* 響應式設計 */
@media (max-width: 1200px) {
    .user-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .permissions-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .user-management-toolbar {
        flex-direction: column;
        gap: 15px;
    }

    .toolbar-left, .toolbar-right {
        width: 100%;
        justify-content: center;
    }

    .search-filters {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .search-box input {
        min-width: 100%;
    }

    .filter-controls {
        justify-content: center;
    }

    .user-table.enhanced {
        font-size: 0.9em;
    }

    .user-table.enhanced th,
    .user-table.enhanced td {
        padding: 8px 6px;
    }

    .action-buttons {
        flex-direction: column;
        gap: 4px;
    }

    .action-buttons .btn {
        padding: 4px 8px;
        font-size: 0.8em;
    }

    .pagination-container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .tab-buttons {
        flex-direction: column;
    }

    .preset-buttons {
        justify-content: center;
    }
}

/* 評論管理樣式 */
.content-type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
    margin-left: 8px;
}

.content-type-badge.short-review {
    background: #e3f2fd;
    color: #1976d2;
}

.content-type-badge.member-review {
    background: #e8f5e8;
    color: #2e7d32;
}

.content-type-badge.editor-review {
    background: #fff3e0;
    color: #f57c00;
}

.user-level-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.7em;
    font-weight: 500;
    margin-left: 4px;
}

.user-level-badge.user-level {
    background: #f5f5f5;
    color: #666;
}

.user-level-badge.member-level {
    background: #e3f2fd;
    color: #1976d2;
}

.user-level-badge.editor-level {
    background: #fff3e0;
    color: #f57c00;
}

.user-level-badge.admin-level {
    background: #ffebee;
    color: #d32f2f;
}

/* 評論卡片樣式 */
.report-card.user_review {
    border-left: 4px solid #2196f3;
}

.report-card.user_food_review {
    border-left: 4px solid #4caf50;
}

.report-card.editor_review {
    border-left: 4px solid #ff9800;
}

/* 篩選器樣式 */
.reports-filters {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    min-width: 120px;
}

.filter-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* 轉換按鈕樣式 */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    border: none;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268 0%, #3d4449 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4);
}

/* 轉換按鈕特殊樣式 */
.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
    margin: 2px;
    font-weight: 500;
}

/* 按鈕組樣式 */
.card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    margin-top: 10px;
}

/* 響應式按鈕 */
@media (max-width: 768px) {
    .card-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn-sm {
        width: 100%;
        margin: 2px 0;
    }
}