/* ===== Admin Card-Style Layout ===== */ :root { --admin-primary: #6366f1; --admin-primary-light: rgba(99, 102, 241, 0.08); --admin-success: #22c55e; --admin-danger: #ef4444; --admin-warning: #f59e0b; --admin-radius: 10px; } body { background: #f1f5f9 !important; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", sans-serif !important; } /* Sidebar */ .navbar-vertical { background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%) !important; border-right: none !important; box-shadow: 2px 0 12px rgba(0, 0, 0, 0.08); } .navbar-vertical .nav-link { border-radius: 8px !important; margin: 2px 8px !important; padding: 8px 12px !important; transition: all 0.2s ease !important; } .navbar-vertical .nav-link:hover { background: rgba(99, 102, 241, 0.15) !important; } .navbar-vertical .nav-link.active { background: var(--admin-primary) !important; color: #fff !important; } /* Page header */ .page-header { padding: 16px 0 8px !important; } .page-title { font-size: 1.5rem !important; font-weight: 700 !important; color: #1e293b !important; } /* Cards */ .card { border: none !important; border-radius: var(--admin-radius) !important; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04) !important; overflow: hidden; } .card-header { background: #fff !important; border-bottom: 1px solid #f1f5f9 !important; padding: 16px 20px !important; } .card-title { font-weight: 700 !important; color: #1e293b !important; } /* Table styling */ .table { margin-bottom: 0 !important; } .table thead th { background: #f8fafc !important; border-bottom: 2px solid #e2e8f0 !important; font-weight: 600 !important; color: #64748b !important; font-size: 13px !important; text-transform: none !important; padding: 12px 16px !important; white-space: nowrap; } .table tbody tr { transition: all 0.15s ease; } .table tbody tr:hover { background: var(--admin-primary-light) !important; } .table tbody td { padding: 14px 16px !important; vertical-align: middle !important; border-bottom: 1px solid #f1f5f9 !important; font-size: 14px !important; color: #334155 !important; max-width: 300px; overflow: hidden; text-overflow: ellipsis; } /* Action column icons */ .table tbody td:nth-child(2) a { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; transition: all 0.2s ease; text-decoration: none !important; } .table tbody td:nth-child(2) a:hover { background: #f1f5f9; } .table tbody td:nth-child(2) a[title="View"] i, .table tbody td:nth-child(2) a[title="查看"] i { color: var(--admin-primary) !important; } .table tbody td:nth-child(2) a[title="Edit"] i, .table tbody td:nth-child(2) a[title="编辑"] i { color: var(--admin-warning) !important; } .table tbody td:nth-child(2) a[title="Delete"] i, .table tbody td:nth-child(2) a[title="删除"] i { color: var(--admin-danger) !important; } /* Image previews in table */ .table img { border-radius: 8px !important; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1); transition: transform 0.2s ease; } .table img:hover { transform: scale(1.05); } /* Buttons */ .btn-primary { background: var(--admin-primary) !important; border-color: var(--admin-primary) !important; border-radius: 8px !important; font-weight: 600 !important; padding: 8px 18px !important; transition: all 0.2s ease !important; } .btn-primary:hover { background: #4f46e5 !important; border-color: #4f46e5 !important; box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3) !important; } .btn-secondary, .btn-light { border-radius: 8px !important; } /* Search bar */ #search-input { border-radius: 8px 0 0 8px !important; border: 1px solid #e2e8f0 !important; padding: 8px 14px !important; } #search-input:focus { border-color: var(--admin-primary) !important; box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12) !important; } #search-button { border-radius: 0 8px 8px 0 !important; background: var(--admin-primary) !important; color: #fff !important; border: 1px solid var(--admin-primary) !important; } #search-reset { border-radius: 0 !important; } /* Pagination */ .card-footer { background: #fff !important; padding: 14px 20px !important; border-top: 1px solid #f1f5f9 !important; } .page-item.active .page-link { background: var(--admin-primary) !important; border-color: var(--admin-primary) !important; } .page-link { border-radius: 6px !important; margin: 0 2px !important; } /* Form styling */ .form-control, .form-select { border-radius: 8px !important; border: 1px solid #e2e8f0 !important; padding: 10px 14px !important; } .form-control:focus, .form-select:focus { border-color: var(--admin-primary) !important; box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12) !important; } .form-label { font-weight: 600 !important; color: #475569 !important; font-size: 13px !important; margin-bottom: 6px !important; } /* Detail page */ .table-bordered td, .table-bordered th { border-color: #f1f5f9 !important; } /* Select2 */ .select2-container--default .select2-selection--single { border-radius: 8px !important; border: 1px solid #e2e8f0 !important; height: 42px !important; padding: 6px 8px !important; } /* Checkbox styling */ .form-check-input:checked { background-color: var(--admin-primary) !important; border-color: var(--admin-primary) !important; } /* Filter sidebar */ #filter-sidebar { border-radius: var(--admin-radius) !important; } #filter-sidebar .card-header { background: #f8fafc !important; } /* Dropdown menus */ .dropdown-menu { border-radius: 10px !important; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12) !important; border: 1px solid #e2e8f0 !important; padding: 6px !important; } .dropdown-item { border-radius: 6px !important; padding: 8px 14px !important; } .dropdown-item:hover { background: var(--admin-primary-light) !important; color: var(--admin-primary) !important; } /* Modal */ .modal-content { border-radius: 14px !important; border: none !important; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2) !important; } .modal-header { border-bottom: 1px solid #f1f5f9 !important; padding: 20px 24px !important; } .modal-footer { border-top: 1px solid #f1f5f9 !important; padding: 16px 24px !important; } /* Login page */ .vh-100 { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important; } .vh-100 .card { border-radius: 16px !important; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2) !important; } /* Responsive table: wrap long text in smaller screens */ @media (max-width: 1200px) { .table-responsive { overflow-x: auto; } } /* Boolean columns: style True/False */ td:has(> .fa-check), td:has(> .fa-times) { text-align: center; } /* Smooth scrollbar */ ::-webkit-scrollbar { width: 6px; height: 6px; } ::-webkit-scrollbar-track { background: transparent; } ::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; } ::-webkit-scrollbar-thumb:hover { background: #94a3b8; } /* Logout button */ .btn-icon { border-radius: 8px !important; transition: all 0.2s ease !important; } .btn-icon:hover { background: rgba(239, 68, 68, 0.15) !important; border-color: transparent !important; color: var(--admin-danger) !important; } /* ===== Image Picker Widget ===== */ .image-picker-wrapper { padding: 12px 0; } .image-picker-preview { position: relative; display: inline-block; margin-bottom: 10px; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.10); } .image-picker-preview img { display: block; max-width: 200px; max-height: 200px; object-fit: cover; border-radius: 10px; } .image-picker-remove { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border: none; border-radius: 50%; background: rgba(0,0,0,0.55); color: #fff; font-size: 16px; line-height: 26px; text-align: center; cursor: pointer; transition: background 0.2s; padding: 0; } .image-picker-remove:hover { background: var(--admin-danger); } .image-picker-actions { display: flex; gap: 8px; flex-wrap: wrap; } .image-picker-actions .btn { border-radius: 8px !important; font-size: 13px !important; padding: 6px 14px !important; } /* ===== Image Picker Modal ===== */ .ip-modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 99999; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px); } .ip-modal { background: #fff; border-radius: 16px; width: 90vw; max-width: 900px; max-height: 80vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,0.25); overflow: hidden; } .ip-modal-header { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; border-bottom: 1px solid #f1f5f9; } .ip-modal-header h3 { margin: 0; font-size: 18px; font-weight: 700; color: #1e293b; } .ip-modal-header-actions { display: flex; gap: 8px; } .ip-modal-body { flex: 1; overflow-y: auto; padding: 20px 24px; } .ip-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; } .ip-gallery-item { cursor: pointer; border-radius: 10px; overflow: hidden; border: 2px solid transparent; transition: all 0.2s ease; background: #f8fafc; } .ip-gallery-item:hover { border-color: var(--admin-primary); box-shadow: 0 4px 12px rgba(99,102,241,0.2); transform: translateY(-2px); } .ip-gallery-item img { width: 100%; height: 120px; object-fit: cover; display: block; } .ip-gallery-name { padding: 4px 8px; font-size: 11px; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; } .ip-loading, .ip-empty { text-align: center; padding: 40px 0; color: #94a3b8; font-size: 15px; }