/** Dashboard CSS - Hệ thống Style cho giao diện quản trị. Logic: Utilities & Helpers (Layout/Text), Dashboard Layout (Sidebar/Main), Stats & Grid components, Forms & Inputs (Editor/Uploads), Profile & Modals, Responsive design. */
/* --- 1. UTILITIES & HELPERS --- */
.d-none, .hidden { display: none !important; }
.d-flex { display: flex !important; }
.flex-column { flex-direction: column !important; }
.justify-end { justify-content: flex-end !important; }
.justify-between { justify-content: space-between !important; }
.align-center { align-items: center !important; }
.gap-2 { gap: 8px !important; }
.gap-3 { gap: 16px !important; }
.mt-2 { margin-top: 8px !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: 8px !important; }
.mb-3 { margin-bottom: 16px !important; }
.mb-4 { margin-bottom: 24px !important; }
.py-5 { padding-top: 3rem !important; padding-bottom: 3rem !important; }
.p-4 { padding: 1.5rem !important; }
.p-5 { padding: 3rem !important; }
.w-100 { width: 100% !important; }
.h-100 { height: 100% !important; }
.flex-grow { flex-grow: 1 !important; }
.text-primary { color: var(--primary) !important; }
.text-light { color: var(--text-light) !important; }
.text-danger { color: #ef4444 !important; }
.text-success { color: #16a34a !important; }
.text-center-force { text-align: center !important; }
.text-right { text-align: right !important; }
.text-sm { font-size: 0.85rem; }
.font-bold { font-weight: 700; }
.cursor-pointer { cursor: pointer; }
.grid-col-full { grid-column: 1 / -1; }
.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.border-light { border: 1px solid rgba(0,0,0,0.05) !important; }
.opacity-80 { opacity: 0.8; }
.user-management-header.flex-between { justify-content: space-between; margin-bottom: 20px; }
.empty-table-message { text-align: center; padding: 30px; color: var(--text-light); }
.text-bold-primary { font-weight: 700; color: var(--primary); }
.link-back { text-decoration: none; display: inline-block; margin-bottom: 8px; }
.btn-close-modal-lg { font-size: 2rem; line-height: 1; }
.user-search-box input.search-rounded { border-radius: 50px; padding-left: 40px; }

/* --- 2. DASHBOARD LAYOUT --- */
.dashboard-section { padding: 60px 0; background: #f8fafc; min-height: 80vh; }
.dashboard-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; }
.dashboard-welcome h2 { font-size: 2rem; margin-bottom: 8px; }
.dashboard-welcome p { color: var(--text-light); }
.dashboard-wrapper { display: flex; gap: 30px; align-items: flex-start; }

.dash-sidebar { width: 250px; background: #fff; border-radius: 20px; padding: 24px; box-shadow: var(--shadow-sm); flex-shrink: 0; position: -webkit-sticky; position: sticky; top: 100px; z-index: 99; align-self: flex-start; max-height: calc(100vh - 120px); overflow-y: auto; overscroll-behavior: auto; scrollbar-width: none; transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.dash-sidebar.is-visible { opacity: 1; transform: none; visibility: visible; }
.dash-sidebar::-webkit-scrollbar { display: none; }
.dash-main { flex-grow: 1; width: 100%; min-width: 0; }
.dash-menu { list-style: none; padding: 0; margin: 0; }
.dash-menu li { margin-bottom: 8px; }
.dash-menu a { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; color: var(--text-body); font-weight: 600; transition: 0.2s; text-decoration: none; }
.dash-menu a:hover, .dash-menu a.active { background: #f1f5f9; color: var(--primary); }
.dash-menu svg { width: 20px; height: 20px; flex-shrink: 0; }

.dash-section-label { margin-bottom: 8px; font-size: 11px; text-transform: uppercase; color: #94a3b8; font-weight: 800; padding-left: 16px; letter-spacing: 0.5px; white-space: nowrap; display: flex; justify-content: space-between; align-items: center; cursor: pointer; user-select: none; }
.dash-section-label .toggle-arrow { display: flex; align-items: center; color: #cbd5e1; transition: transform 0.3s ease; }
.dash-section-label .toggle-arrow svg { width: 14px; height: 14px; display: block; }
.dash-section-label:hover .toggle-arrow { color: var(--primary); }
.dash-menu-group { margin-bottom: 2px; }
.dash-menu-group .dash-section-label { width: 100%; min-height: 32px; padding: 6px 12px 6px 16px; border: 0; border-radius: 10px; background: transparent; font-family: 'Inter', sans-serif; text-align: left; transition: color 0.2s ease; }
.dash-menu-group .dash-section-label:hover { background: transparent; color: var(--primary); }
.dash-menu-group .dash-menu { max-height: 900px; overflow: hidden; opacity: 1; transition: max-height 0.28s ease, opacity 0.2s ease, margin 0.2s ease; }
.dash-menu-group:not(.active) .dash-menu { max-height: 0; margin: 0; opacity: 0; pointer-events: none; }
.dash-menu-group:not(.active) .dash-section-label { margin-bottom: 0; color: #9aa9bd; }
.dash-menu-group.active .toggle-arrow { color: var(--primary); transform: rotate(180deg); }
.dash-menu-group.is-locked .dash-section-label { cursor: default; }
.dash-menu-group.is-locked .toggle-arrow { display: none; }
.dash-menu-standalone { margin-top: 2px; }
.dash-divider { margin: 10px 0; border-top: 1px solid #f1f5f9; }
.dash-sidebar > .dash-divider { display: block; }
.dash-sidebar .dash-menu .dash-divider { display: none; }
.dash-sidebar .dash-divider + .dash-menu-group,
.dash-sidebar .dash-divider + .dash-menu-standalone { margin-top: 8px; }
.btn-sidebar-toggle { display: none !important; }

/* --- 3. STATS & POST GRID --- */
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 30px; }
.stat-card { background: #fff; padding: 20px; border-radius: 16px; box-shadow: var(--shadow-sm); display: flex; align-items: center; gap: 16px; }
.stat-icon { width: 48px; height: 48px; border-radius: 12px; background: #e0e7ff; color: var(--primary); display: flex; align-items: center; justify-content: center; }
.stat-info h4 { font-size: 0.9rem; color: var(--text-light); margin: 0; }
.stat-info strong { font-size: 1.5rem; color: var(--text-main); line-height: 1; }
.stat-icon-green { background: rgba(34, 197, 94, 0.1); color: #16a34a; }
.stat-icon-blue { background: rgba(13, 62, 154, 0.1); color: var(--primary); }
.stat-icon-pink { background: rgba(237, 9, 164, 0.1); color: var(--accent); }

.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.dash-post-card { background: #fff; border-radius: 20px; padding: 20px; box-shadow: var(--shadow-sm); border: 1px solid rgba(0, 0, 0, 0.05); transition: 0.3s ease; display: flex; flex-direction: column; height: 100%; }
.dash-post-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-xl); }
.dash-post-thumb { height: 180px; border-radius: 12px; background-color: #f1f5f9; margin-bottom: 16px; overflow: hidden; position: relative; }
.dash-post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.dash-status { position: absolute; top: 10px; left: 10px; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 700; color: #fff; backdrop-filter: blur(4px); }
.status-publish { background: rgba(34, 197, 94, 0.9); }
.status-pending { background: rgba(234, 179, 8, 0.9); }
.status-draft { background: rgba(100, 116, 139, 0.9); }
.dash-post-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; color: var(--text-main); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dash-post-title a { text-decoration: none; color: inherit; }
.dash-post-meta { font-size: 0.85rem; color: var(--text-light); margin-bottom: 20px; flex-grow: 1; }

.dash-actions { display: flex; gap: 10px; border-top: 1px solid #f1f5f9; padding-top: 16px; margin-top: auto; }
.btn-icon { flex: 1; padding: 8px; border-radius: 8px; font-size: 13px; font-weight: 600; text-align: center; transition: 0.2s; display: flex; align-items: center; justify-content: center; gap: 6px; border: none; cursor: pointer; text-decoration: none; }
.btn-edit { background: #eff6ff; color: var(--primary); }
.btn-edit:hover { background: var(--primary); color: #fff; }
.btn-delete { background: #fef2f2; color: #ef4444; }
.btn-delete:hover { background: #ef4444; color: #fff; }

.chart-wrapper { display: flex; align-items: flex-end; justify-content: space-between; height: 200px; padding-top: 20px; gap: 10px; }
.chart-column { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.chart-bar { width: 60%; background: #e0e7ff; border-radius: 8px 8px 0 0; position: relative; transition: 0.3s; min-height: 4px; }
.chart-bar:hover { background: var(--primary); }
.chart-bar:hover .chart-tooltip { opacity: 1; transform: translateX(-50%) translateY(-10px); }
.chart-tooltip { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%) translateY(0); background: #1e293b; color: #fff; padding: 4px 8px; border-radius: 4px; font-size: 0.75rem; white-space: nowrap; opacity: 0; pointer-events: none; transition: 0.2s; font-weight: 600; z-index: 2; }
.chart-axis-label { text-align: center; font-size: 0.75rem; color: var(--text-light); margin-top: 8px; }

/* --- 4. FORMS & INPUTS --- */
.editor-container { max-width: 800px; margin: 0 auto; background: #fff; border-radius: 24px; padding: 40px; box-shadow: var(--shadow-xl); }
.pro-editor-layout { display: grid; grid-template-columns: 1fr 300px; gap: 30px; }
.editor-main { background: #fff; border-radius: 16px; padding: 30px; box-shadow: var(--shadow-sm); }
.editor-sidebar { display: flex; flex-direction: column; gap: 24px; }
.editor-widget { background: #fff; border-radius: 16px; padding: 20px; box-shadow: var(--shadow-sm); }
.editor-widget h4 { font-size: 1rem; margin-bottom: 16px; border-bottom: 1px solid #eee; padding-bottom: 8px; font-family: 'SVN-Gilroy Bold'; }
.editor-group { margin-bottom: 24px; }
.editor-label { display: block; font-weight: 700; margin-bottom: 8px; color: var(--text-main); }
.editor-input, select.editor-input { width: 100%; padding: 14px 16px; border: 1px solid #e2e8f0; border-radius: 12px; font-size: 0.95rem; font-family: 'Inter', sans-serif; color: var(--text-body); background-color: #fff; transition: all 0.3s ease; appearance: none; -webkit-appearance: none; box-sizing: border-box; height: 52px; }
.editor-input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(13, 62, 154, 0.05); outline: none; }
textarea.editor-input, .editor-textarea { min-height: 150px; line-height: 1.8; height: auto !important; padding-top: 12px; padding-bottom: 12px; }
.input-disabled { background-color: #f1f5f9; cursor: not-allowed; }
.post-title-input { font-size: 1.5rem; font-weight: 700; border: none; border-bottom: 1px solid #e2e8f0; border-radius: 0; padding-left: 0; }
.post-title-input:focus { box-shadow: none; border-bottom-color: var(--primary); }

.permalink-box { background: #f8fafc; padding: 12px; border-radius: 8px; border: 1px dashed #e2e8f0; }
.permalink-label { font-size: 0.85rem; color: #64748b; margin-bottom: 6px; display: block; font-weight: 700; }
.permalink-group { display: flex; gap: 10px; align-items: center; }
.permalink-base { color: #94a3b8; font-size: 0.9rem; white-space: nowrap; }
.permalink-input { flex: 1; padding: 8px 12px; font-size: 0.9rem; border: 1px solid #e2e8f0; border-radius: 12px; font-family: 'Inter', sans-serif; outline: none; transition: 0.2s; color: var(--text-body); }
.permalink-input:focus { border-color: var(--primary); }

.select-wrapper { position: relative; width: 100%; min-width: 0; overflow: hidden; }
.select-wrapper::after { content: ''; position: absolute; top: 50%; right: 16px; width: 12px; height: 12px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; background-size: contain; transform: translateY(-50%); pointer-events: none; transition: 0.3s; }
.select-wrapper:hover::after { transform: translateY(-40%); }

.select-wrapper select.editor-input,
select.editor-input {
    min-width: 0;
    padding-right: 44px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mce-tinymce { border-radius: 12px !important; border: 1px solid #e2e8f0 !important; box-shadow: none !important; box-sizing: border-box !important; width: 100% !important; }
.wp-editor-container { border: none !important; border-radius: 0; overflow: visible; }
.mce-toolbar-grp { background: #f8fafc !important; border-bottom: 1px solid #e2e8f0 !important; border-radius: 12px 12px 0 0 !important; }
.mce-edit-area { border-radius: 0 0 12px 12px !important; border: 1px solid #e2e8f0 !important; border-top: none !important; }
.mce-btn { background: transparent !important; border: none !important; border-radius: 6px !important; }
.mce-btn:hover, .mce-btn.mce-active { background: #e2e8f0 !important; }
.wp-media-buttons { margin-bottom: 10px; }
.wp-media-buttons .button { background: #f1f5f9; color: var(--text-main); border: none; padding: 8px 16px; border-radius: 8px; font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; transition: 0.2s; }
.wp-media-buttons .button:hover { background: #e2e8f0; color: var(--primary); }

.image-upload-box { border: 2px dashed #cbd5e1; border-radius: 16px; padding: 40px; text-align: center; cursor: pointer; transition: 0.3s; background: #f8fafc; position: relative; overflow: hidden; }
.image-upload-box:hover { border-color: var(--primary); background: #eff6ff; }
.btn-remove-thumb { position: absolute; top: 10px; right: 10px; background: rgba(255, 255, 255, 0.9); color: #ef4444; border: 1px solid #fee2e2; border-radius: 50%; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); z-index: 10; transition: 0.2s; }
.btn-remove-thumb:hover { background: #ef4444; color: #fff; transform: scale(1.1); }
.btn-remove-thumb.hidden { display: none; }
.upload-preview { max-width: 100%; max-height: 300px; border-radius: 8px; display: none; margin: 0 auto; object-fit: cover; }
.upload-preview.has-image { display: block; }
.upload-placeholder.hidden { display: none; }
.image-upload-box input[type="file"], .profile-avatar-upload input[type="file"], .tpl-upload-box input[type="file"] { display: none !important; opacity: 0; pointer-events: none; position: absolute; }

.btn-full { width: 100%; display: block; }
.view-switcher { display: flex; gap: 8px; background: #fff; padding: 4px; border-radius: 10px; border: 1px solid #e2e8f0; }
.btn-switch { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; border: none; background: transparent; color: #64748b; cursor: pointer; transition: all 0.2s ease; will-change: background, color; }
.btn-switch:hover { background: #f1f5f9; color: var(--primary); }
.view-mode-grid .btn-switch-grid, .view-mode-list .btn-switch-list { background: #eff6ff; color: var(--primary); font-weight: bold; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.view-mode-grid .view-container-list, .view-mode-list .view-container-grid { display: none !important; }

/* --- 5. PROFILE & USERS --- */
.profile-card-header { background: #fff; border-radius: 20px; padding: 30px; display: flex; align-items: center; gap: 30px; box-shadow: var(--shadow-sm); margin-bottom: 30px; border: 1px solid rgba(0, 0, 0, 0.05); }
.profile-avatar-upload { position: relative; width: 100px; height: 100px; cursor: pointer; }
.profile-avatar-upload img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 4px solid #f8fafc; box-shadow: var(--shadow-sm); }
.avatar-edit-icon { position: absolute; bottom: 0; right: 0; width: 32px; height: 32px; background: var(--primary); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; border: 2px solid #fff; transition: 0.2s; }
.avatar-edit-icon:hover { background: var(--accent); transform: scale(1.1); }
.profile-avatar-upload:focus-visible, .avatar-edit-icon:focus-visible { outline: 3px solid rgba(37, 99, 235, 0.35); outline-offset: 4px; }
.profile-basic-info h3 { margin: 0 0 8px; font-size: 1.5rem; }
.role-badge { display: inline-block; padding: 4px 12px; background: #e0e7ff; color: var(--primary); border-radius: 20px; font-size: 0.85rem; font-weight: 600; }
.profile-heading { font-family: 'SVN-Gilroy Bold', sans-serif; font-size: 1.25rem; color: var(--text-main); font-weight: 700; margin: 30px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #f1f5f9; display: flex; align-items: center; gap: 10px; }
.profile-heading svg { width: 20px; height: 20px; color: var(--primary); }

.category-layout { display: grid; grid-template-columns: 1fr 350px; gap: 30px; }
.cat-list-box { background: #fff; border-radius: 16px; padding: 24px; box-shadow: var(--shadow-sm); }
.cat-item { display: flex; justify-content: space-between; align-items: center; padding: 16px; border-bottom: 1px solid #f1f5f9; transition: 0.2s; }
.cat-item:last-child { border-bottom: none; }
.cat-item:hover { background-color: #f8fafc; border-radius: 8px; }
.cat-info h4 { margin: 0 0 4px; font-size: 1rem; color: var(--text-main); }
.cat-info span { font-size: 0.8rem; color: var(--text-light); background: #f1f5f9; padding: 2px 8px; border-radius: 12px; }
.cat-actions { display: flex; gap: 8px; transition: 0.2s; }
.cat-item:hover .cat-actions { opacity: 1; }

.btn-cat-action { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; border: 1px solid #e2e8f0; background: #fff; cursor: pointer; transition: all 0.2s ease; color: var(--text-light); flex-shrink: 0; }
.btn-edit-cat:hover, .btn-edit-tpl:hover, .btn-user-edit:hover, .btn-edit-domain:hover { border-color: var(--primary); color: var(--primary); background: #fff; }
.btn-delete-cat:hover, .btn-delete-tpl:hover, .btn-user-delete:hover, .btn-delete-domain:hover { border-color: #ef4444; color: #ef4444; background: #fff; }
.btn-add-cat { width: 52px; height: 52px; min-width: 52px; min-height: 52px; max-width: 52px; max-height: 52px; flex-shrink: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 1px solid #e2e8f0; background: #fff; color: var(--primary); cursor: pointer; transition: 0.2s; padding: 0; font-size: 1.5rem; line-height: 1; box-sizing: border-box; }
.btn-add-cat:hover { background: #f1f5f9; border-color: var(--primary); transform: scale(1.05); }

.cat-quick-add { display: flex; gap: 10px; margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid #f1f5f9; align-items: center; }
.cat-quick-add input { flex: 1; padding: 8px 20px; border: 1px solid #e2e8f0; border-radius: 50px; font-size: 14px; background: #fcfcfd; transition: 0.3s; font-family: 'Inter', sans-serif; }
.cat-quick-add input:focus { border-color: var(--primary); background: #fff; outline: none; box-shadow: 0 0 0 4px rgba(13, 62, 154, 0.05); }

.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(4px); z-index: 9999; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: 0.3s; }
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content { background: #fff; width: 800px; max-width: 90%; max-height: 90vh; border-radius: 20px; box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1); transform: translateY(20px); transition: 0.3s; position: relative; padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.modal-overlay.active .modal-content { transform: translateY(0); }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 24px 30px; border-bottom: 1px solid #f1f5f9; flex-shrink: 0; background: #fff; }
.modal-header h3 { margin: 0; font-size: 1.5rem; font-family: 'SVN-Gilroy Bold'; }
.btn-close-modal { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #94a3b8; }
.modal-body-scroll { padding: 30px; overflow-y: auto; flex-grow: 1; }
.modal-body-scroll::-webkit-scrollbar { width: 10px; }
.modal-body-scroll::-webkit-scrollbar-track { background: transparent; }
.modal-body-scroll::-webkit-scrollbar-thumb { background-color: #cbd5e1; border-radius: 20px; border: 2px solid #fff; }
.modal-body-scroll::-webkit-scrollbar-button { display: none !important; width: 0; height: 0; }
.modal-body-scroll::-webkit-scrollbar-corner { background: transparent; }
.modal-footer { text-align: right; margin-top: 20px; border-top: 1px solid #f1f5f9; padding-top: 20px; }
.btn-cancel { margin-right: 10px; }
.modal-sm { max-width: 500px; }

.user-management-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 16px; }
.user-search-box { position: relative; width: 300px; }
.user-search-box input { width: 100%; padding: 10px 16px 10px 40px; border-radius: 50px; border: 1px solid #e2e8f0; font-size: 0.9rem; }
.user-search-box svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #94a3b8; width: 16px; height: 16px; pointer-events: none; }

.admin-table-tools { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; padding: 14px; border: 1px solid rgba(226, 232, 240, 0.75); border-radius: 18px; background: rgba(255, 255, 255, 0.82); box-shadow: 0 10px 30px rgba(13, 62, 154, 0.04); backdrop-filter: blur(12px); }
.admin-toolbar-main { display: flex; align-items: center; gap: 12px; flex: 1 1 560px; min-width: 0; flex-wrap: wrap; }
.admin-toolbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex: 0 0 auto; flex-wrap: wrap; }
.admin-table-tools .user-search-box { width: min(360px, 100%); min-width: 260px; margin: 0; flex: 0 1 360px; }
.admin-table-tools .editor-input.search-rounded { height: 44px; padding-top: 10px; padding-bottom: 10px; background: #fff; }
.admin-filter-chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.admin-filter-chip { height: 38px; padding: 0 12px 0 14px; border: 1px solid #e2e8f0; border-radius: 999px; background: #fff; color: #64748b; font: 800 0.82rem/1 "Inter", sans-serif; letter-spacing: 0; cursor: pointer; transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; }
.admin-filter-chip:hover { color: var(--primary); border-color: rgba(13, 62, 154, 0.22); background: #fff; box-shadow: 0 6px 16px rgba(13, 62, 154, 0.06); }
.admin-filter-chip.is-active { color: var(--primary); border-color: rgba(13, 62, 154, 0.2); background: #eff6ff; box-shadow: inset 0 0 0 1px rgba(13, 62, 154, 0.04); }
.admin-filter-chip .chip-count { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: #f1f5f9; color: #64748b; display: inline-flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 900; line-height: 1; }
.admin-filter-chip.is-active .chip-count { background: #fff; color: var(--primary); }
.admin-filter-chip[data-filter-value="pending"] .chip-count,
.admin-filter-chip[data-filter-value="processing"] .chip-count,
.admin-filter-chip[data-filter-value="draft"] .chip-count { color: #b45309; background: #fef3c7; }
.admin-filter-chip[data-filter-value="completed"] .chip-count,
.admin-filter-chip[data-filter-value="publish"] .chip-count,
.admin-filter-chip[data-filter-value="active"] .chip-count { color: #15803d; background: #dcfce7; }
.admin-filter-chip[data-filter-value="cancelled"] .chip-count,
.admin-filter-chip[data-filter-value="expired"] .chip-count,
.admin-filter-chip[data-filter-value="used-up"] .chip-count { color: #dc2626; background: #fee2e2; }
.admin-filter-chip[data-filter-value="administrator"] .chip-count { color: #dc2626; background: #fee2e2; }
.admin-filter-chip[data-filter-value="editor"] .chip-count,
.admin-filter-chip[data-filter-value="paid"] .chip-count { color: #b45309; background: #fef3c7; }
.admin-filter-chip[data-filter-value="subscriber"] .chip-count,
.admin-filter-chip[data-filter-value="free"] .chip-count { color: #0d3e9a; background: #eff6ff; }
.admin-table-card { overflow: hidden; border-radius: 18px; border: 1px solid rgba(226, 232, 240, 0.82); box-shadow: 0 14px 34px rgba(13, 62, 154, 0.05); }
.admin-table-card .user-table th { background: #f8fafc; }
.admin-filter-empty td { padding: 34px 24px !important; text-align: center; color: var(--text-light); font-weight: 700; }
.admin-filter-empty.is-hidden { display: none !important; }
.admin-control-readonly { background: #f1f5f9 !important; cursor: not-allowed; }
.admin-control-editable { background: #fff !important; cursor: text; }
.is-flex-visible { display: flex !important; }
.is-hidden { display: none !important; }
.initial-hidden { display: none; }
.dashboard-section .btn-primary::before { display: block; }
.dashboard-section .btn-primary:hover { color: #fff; filter: brightness(1.04); transform: translateY(-1px); box-shadow: 0 5px 14px rgba(108, 46, 231, 0.24); }
.dashboard-section .btn-danger:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(239, 68, 68, 0.18); }
.dashboard-section .btn-outline:hover { transform: none; box-shadow: 0 6px 16px rgba(13, 62, 154, 0.06); }
.dashboard-section .modal-header .btn-close-modal { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; line-height: 1; transition: background 0.18s ease, color 0.18s ease; }
.dashboard-section .modal-header .btn-close-modal:hover { background: #f8fafc; color: var(--primary); }

.table-responsive { overflow-x: auto; background: #fff; border-radius: 16px; box-shadow: var(--shadow-sm); border: 1px solid rgba(0, 0, 0, 0.05); }
.user-table { width: 100%; border-collapse: collapse; table-layout: auto; }
.user-table th { text-align: left; padding: 16px 24px; background: #f8fafc; font-weight: 700; font-size: 0.85rem; color: var(--text-light); text-transform: uppercase; border-bottom: 1px solid #e2e8f0; }
.user-table td { padding: 16px 24px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; font-size: 0.95rem; color: var(--text-body); white-space: normal; word-wrap: break-word; }
.user-table tr:last-child td { border-bottom: none; }
.user-table tr:hover { background: #fdfdfe; }

.col-thumb { width: 80px; }
.col-code { width: 100px; white-space: nowrap; }
.col-cat { width: 140px; }
.col-pkg { width: 120px; }
.col-actions { width: 110px; text-align: right; }
.col-role { width: 1%; white-space: nowrap; padding-right: 30px !important; }
.col-date { width: 1%; white-space: nowrap; padding-right: 30px !important; }
.col-posts { width: 1%; white-space: nowrap; text-align: center; padding-right: 30px !important; }
.col-info { width: 30%; min-width: 200px; }
.col-tag { width: 15%; }
.col-price { width: 15%; white-space: nowrap; }
.col-combo { width: 25%; }

.tbl-user-info { display: flex; align-items: center; gap: 12px; }
.tbl-user-text { display: flex; flex-direction: column; }
.tbl-user-info img, .rounded-circle { width: 36px; height: 36px; border-radius: 50px; object-fit: cover; }
.tbl-user-text h4 { margin: 0; font-size: 0.95rem; font-weight: 600; white-space: normal; }
.tbl-user-text span { font-size: 0.8rem; color: #94a3b8; display: block; white-space: normal; }

.badge { padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; text-transform: uppercase; display: inline-block; white-space: nowrap; }
.badge-admin { background: #fee2e2; color: #ef4444; }
.badge-editor { background: #fef3c7; color: #d97706; }
.badge-subscriber { background: #e0e7ff; color: var(--primary); }
.badge-status { padding: 6px 12px; border-radius: 30px; font-size: 11px; font-weight: 700; text-transform: uppercase; display: inline-block; white-space: nowrap; }
.badge-status.status-draft { background: #f8fafc; color: #475569; border: 1px solid #cbd5e1; }
.status-completed { background: rgba(34, 197, 94, 0.1); color: #16a34a; border: 1px solid rgba(34, 197, 94, 0.2); }
.status-processing { background: rgba(13, 62, 154, 0.1); color: var(--primary); border: 1px solid rgba(13, 62, 154, 0.2); }
.status-cancelled { background: rgba(239, 68, 68, 0.1); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.2); }
.badge-code { background: #f1f5f9; color: #64748b; padding: 4px 8px; border-radius: 6px; font-family: monospace; font-size: 0.85rem; font-weight: 600; letter-spacing: 0.5px; }
.badge-cat { background: #eef2ff; color: var(--primary); padding: 4px 10px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; }
.badge-pkg { padding: 4px 8px; border-radius: 6px; color: #fff; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; }

.cat-manage-hint { margin-top: 20px; padding-top: 20px; border-top: 1px dashed #e2e8f0; text-align: center; color: #64748b; font-size: 0.85rem; }
.dash-header-title { margin-top: 8px; }
.dash-header-desc { color: var(--text-light); }
.header-actions { display: flex; gap: 10px; }
.btn-manage-cats { border: 1px solid #e2e8f0; color: var(--text-main); }
.icon-inline { vertical-align: text-bottom; margin-right: 5px; }

.tpl-modal-split { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; margin-bottom: 20px; }
.tpl-info-col { display: flex; flex-direction: column; gap: 20px; }
.tpl-image-col { display: flex; flex-direction: column; height: 100%; }
.tpl-sub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.tpl-upload-box { flex-grow: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 160px; padding: 10px; position: relative; overflow: hidden; height: 100%; }
.upload-placeholder-content { position: static; transform: none; display: flex; flex-direction: column; align-items: center; }
.upload-icon { margin-bottom: 10px; }
.upload-text { margin: 0; color: #64748b; font-weight: 600; font-size: 0.85rem; }
.tpl-upload-preview { display: none; width: 100%; height: 100%; object-fit: cover; border-radius: 12px; position: static; }
.tpl-thumb-img { width: 50px; height: 50px; object-fit: cover; border-radius: 8px; border: 1px solid #eee; }
.action-group { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.col-code-status { width: 80px; }
.input-excerpt { flex-grow: 1; resize: vertical; min-height: 120px; }
.code-editor { font-family: monospace; font-size: 0.85rem; background: #f8fafc; white-space: pre; overflow-x: auto; resize: vertical; height: auto !important; min-height: 400px; }

.payment-card-gradient { background: linear-gradient(135deg, #0d3e9a 0%, #0a2d75 100%); color: #fff; padding: 24px; border-radius: 16px; max-width: 400px; margin-bottom: 30px; position: relative; overflow: hidden; }
.payment-card-content { position: relative; z-index: 2; }
.payment-card-bg-icon { position: absolute; right: -20px; bottom: -20px; width: 150px; height: 150px; opacity: 0.1; color: #fff; }
.msg-box { display: none; margin-bottom: 15px; padding: 12px; border-radius: 8px; }
.empty-state-box { padding: 40px; text-align: center; color: var(--text-light); }
.empty-state-box a { color: var(--primary); }

.detail-modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
.detail-info-box { background: #f8fafc; border-radius: 12px; padding: 20px; margin-bottom: 24px; }
.detail-info-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #e2e8f0; }
.detail-info-row:last-child { border-bottom: none; }
.detail-total-row { display: flex; justify-content: space-between; padding: 12px 0 0; }
.detail-notes-box { background: #fff; border: 1px solid #e2e8f0; padding: 15px; border-radius: 12px; font-size: 0.9rem; color: #64748b; line-height: 1.6; white-space: pre-wrap; }
.detail-modal-footer { text-align: right; margin-top: 30px; }

.cat-manage-list { list-style: none; padding: 0; margin: 0; }
.cat-manage-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid #f1f5f9; transition: 0.2s; }
.cat-manage-item:last-child { border-bottom: none; }
.cat-manage-item:hover { background: #f8fafc; border-radius: 8px; }
.cat-manage-name { font-weight: 600; color: var(--text-main); display: block; }
.cat-manage-count { font-size: 0.8rem; color: #94a3b8; }

.input-group-merge { display: flex; align-items: center; border: 1px solid #e2e8f0; border-radius: 12px; background-color: #fcfcfd; padding: 0 16px; transition: 0.3s; overflow: hidden; height: 52px; box-sizing: border-box; position: relative; }
.input-group-merge:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(13, 62, 154, 0.05); background-color: #fff; }
.input-group-text { color: #94a3b8; font-size: 0.95rem; white-space: nowrap; user-select: none; font-weight: 500; }
.input-clean { border: none !important; box-shadow: none !important; outline: none !important; background: transparent !important; width: 100%; padding: 0 0 0 4px !important; margin: 0; font-family: "Inter", sans-serif; color: var(--text-main); font-weight: 700; height: 100%; font-size: 0.95rem; }
.input-clean:focus, .input-clean:active { border: none !important; outline: none !important; box-shadow: none !important; }
.slug-status-icon { margin-left: 8px; display: flex; align-items: center; }

/* --- 6. RESPONSIVE DESIGN --- */
@media (max-width: 992px) {
    .dashboard-wrapper { flex-direction: column; }
    .dash-sidebar { width: 100%; position: static; max-height: min(70vh, 520px); overflow-y: auto; }
    .tpl-modal-split { grid-template-columns: 1fr; }
    .pro-editor-layout { grid-template-columns: 1fr; }
    .editor-sidebar { flex-direction: row; flex-wrap: wrap; }
    .editor-widget { flex: 1; }
    .stats-grid { grid-template-columns: 1fr; }
    .category-layout { grid-template-columns: 1fr; }
    .dash-sidebar.collapsed { width: 100%; }
    .table-responsive { overflow-x: auto; }
    .user-table { min-width: 800px; table-layout: auto; }
    .admin-table-tools { align-items: stretch; }
    .admin-toolbar-main, .admin-toolbar-actions, .admin-table-tools .user-search-box { width: 100%; flex-basis: 100%; }
    .admin-toolbar-actions { justify-content: flex-start; }
}

@media (max-width: 768px) {
    .dashboard-header { flex-direction: column; align-items: flex-start; gap: 16px; }
    .editor-container { padding: 24px; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .editor-sidebar { flex-direction: column; }
    .cat-list-box { order: 2; }
    .profile-card-header { flex-direction: column; text-align: center; padding: 24px; }
    .admin-table-tools { padding: 12px; border-radius: 16px; }
    .admin-filter-chips { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; scrollbar-width: none; }
    .admin-filter-chips::-webkit-scrollbar { display: none; }
    .admin-filter-chip { flex: 0 0 auto; }
}
.z-9999 { z-index: 9999; }
.mr-4px { margin-right: 4px; }
.mr-6px { margin-right: 6px; }
.bg-none { background: none !important; border: none !important; }
.font-mono { font-family: monospace; }
.w-80px { width: 80px; }
.mt-3 { margin-top: 16px !important; }
.mt-4 { margin-top: 24px !important; }
.flex-shrink-0 { flex-shrink: 0; }


.nav-divider { border-top: 1px solid #e2e8f0; margin-top: 8px; padding-top: 14px; }
.bg-light-blue { background: #f8fafc; }
.compose-row-first { background: #f8fafc; border-radius: 8px 8px 0 0; border: 1px solid #e2e8f0; border-bottom: none; }
.compose-row-mid { background: #f8fafc; border-left: 1px solid #e2e8f0; border-right: 1px solid #e2e8f0; border-bottom: none; }
.compose-row-last { border: 1px solid #e2e8f0; border-top: none; border-radius: 0 0 8px 8px; overflow: hidden; background: #fff; }
.max-w-700 { max-width: 700px; }
.btn-toggle-pw { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: #94a3b8; padding: 0; }
.notice-box { background: #e0e7ff; border-color: #c7d2fe; display: flex; gap: 12px; align-items: flex-start; }


.mt-2px { margin-top: 2px; }
.pr-40 { padding-right: 40px; }
.bg-white { background: #fff !important; }


.grid-1-1-gap20 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 0; }
.pos-rel { position: relative; }
.input-search-text { padding-right: 30px; cursor: text; }
.icon-right-center { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.searchable-dropdown-menu { display: none; position: absolute; top: calc(100% + 4px); left: 0; width: 100%; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; max-height: 220px; overflow-y: auto; z-index: 100; box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1); }
.searchable-item { padding: 10px 16px; cursor: pointer; border-bottom: 1px solid #f1f5f9; font-size: 0.9rem; transition: 0.2s; }
.searchable-item-title { color: var(--text-main); display: block; margin-bottom: 2px; }
.searchable-item-desc { color: #64748b; font-size: 0.8rem; }
.searchable-empty { display: none; padding: 15px; color: #94a3b8; text-align: center; font-size: 0.9rem; }
.grid-1-1-gap20-mb20 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }


.ml-8px { margin-left: 8px; }
.img-placeholder-60 { width: 60px; height: 60px; background: #f1f5f9; border-radius: 8px; }
.rounded-16 { border-radius: 16px; }


.del-price { color: #94a3b8; font-size: 0.85rem; font-weight: normal; }
.btn-bulk { background: #fee2e2; color: #ef4444; border: none; border-radius: 8px; font-weight: bold; align-items: center; gap: 6px; }
.checkbox-lg { cursor: pointer; width: 16px; height: 16px; margin: 0; }
.order-id-col { font-family: monospace; font-size: 0.85rem; color: var(--text-main); word-break: break-all; display: inline-block; max-width: 130px; line-height: 1.4; }
.status-icon-badge { padding: 6px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; cursor: help; }
.modal-title-lg { font-size: 1.2rem; word-break: break-all; }
.text-success-alt { color: #16a34a; }
.text-lg-right { font-size: 1.1rem; text-align: right; }
.spinner-icon { border-top-color: #ef4444; width: 14px; height: 14px; margin-right: 6px; }


.badge-cart-count { background: #ef4444; color: white; padding: 2px 8px; border-radius: 12px; font-size: 11px; font-weight: bold; margin-left: auto; }
.order-id-primary { font-family: monospace; font-size: 0.85rem; color: var(--primary); word-break: break-all; display: inline-block; max-width: 130px; line-height: 1.4; }
.order-id-basic { font-family: monospace; font-size: 0.85rem; color: var(--text-main); word-break: break-all; }
.grid-1-col { grid-template-columns: 1fr !important; }
.modal-action-wrap { margin-top: 24px; display: none; text-align: center; }


.pkg-color-box { width: 36px; height: 36px; border-radius: 8px; display: inline-block; flex-shrink: 0; }
.pkg-code { text-transform: uppercase; font-size: 0.75rem; }
.pkg-prices { font-size: 0.85rem; color: var(--text-light); line-height: 1.4; }
.input-color-sm { width: 60px; padding: 2px; }


.pt-40 { padding-top: 40px; }
.max-w-1200 { max-width: 1200px; }
.link-back-style { text-decoration: none; margin-bottom: 12px; transition: 0.2s; }
.text-2xl { font-size: 2rem; }
.textarea-sapo { min-height: 80px; padding: 16px; }
.select-rounded-lg { border-radius: 50px; padding: 10px 20px; }
.text-warning { color: #f59e0b; }
.chart-title { font-family: 'SVN-Gilroy Bold'; font-size: 1.1rem; }
.badge-code-lg { font-size: 1rem; color: var(--primary); }
.text-1-1rem { font-size: 1.1rem; }
.text-lg { font-size: 1.2rem; }
.text-left { text-align: left !important; }
.text-uppercase { text-transform: uppercase; }
.flex-1 { flex: 1; }
.input-code { text-transform: uppercase; font-weight: bold; }
.badge-admin { font-size: 10px; color: #ef4444; background: #fee2e2; padding: 2px 6px; border-radius: 10px; vertical-align: middle; margin-left: 4px; }
.font-italic { font-style: italic; }


.grid-2-gap20 { grid-template-columns: 1fr 1fr; gap: 20px; }


.page-center-msg { padding: 100px 0; text-align: center; }
.icon-4rem-mb20 { font-size: 4rem; margin-bottom: 20px; }
.title-svn-bold { font-family: 'SVN-Gilroy Bold'; color: var(--text-main); }
.text-light-mb30 { color: var(--text-light); margin-bottom: 30px; }
.text-desc-lg { color: var(--text-light); font-size: 1.1rem; max-width: 600px; margin: 0 auto 30px; line-height: 1.6; }

/* Dynamic Inline Style Helpers */
.bg-dynamic-color { background-color: var(--dynamic-color) !important; }
.badge-dynamic-color { color: var(--dynamic-color) !important; background-color: rgba(0,0,0,0.05) !important; }
.h-dynamic { height: var(--dynamic-height) !important; }
.cursor-help { cursor: help !important; }

/* JS Helpers */
.spinner-icon-white { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff; border-radius: 50%; animation: spin 0.8s linear infinite; margin-right: 8px; vertical-align: middle; }
.danger-alert-box { background: #fef2f2; padding: 15px; border-radius: 12px; border: 1px solid #fecaca; margin-bottom: 24px; }
.danger-checkbox-label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; margin: 0; }
.danger-checkbox-input { margin-top: 3px; width: 18px; height: 18px; accent-color: #ef4444; flex-shrink: 0; }
.danger-alert-text { font-size: 0.9rem; color: #991b1b; line-height: 1.5; font-weight: 500; text-align: left; }
.danger-alert-small { font-weight: normal; color: #b91c1c; }
.is-loading-control { opacity: 0.7; }
.is-disabled-pay { opacity: 0.68; cursor: not-allowed; }

/* Post Editor Layout */
.pro-editor-layout{display:grid;grid-template-columns:1fr 320px;gap:30px;align-items:start;}
.editor-main{padding:32px;background:#fff;border-radius:20px;box-shadow:var(--shadow-sm);border:1px solid rgba(0,0,0,0.05);}
.editor-sidebar{position:sticky;top:100px;display:flex;flex-direction:column;gap:20px;}
.editor-widget{padding:24px;}
.link-back:hover{color:var(--primary)!important;transform:translateX(-4px);}
.post-title-input{font-size:1.8rem;font-weight:800;border:none;border-bottom:2px solid #e2e8f0;border-radius:0;padding:12px 0;background:transparent;color:var(--text-main);}
.post-title-input:focus{box-shadow:none;border-bottom-color:var(--primary);background:transparent;}
@media(max-width:1024px){.pro-editor-layout{grid-template-columns:1fr}.editor-sidebar{position:static;flex-direction:row;flex-wrap:wrap}.editor-widget{flex:1;min-width:250px}}
@media(max-width:768px){.editor-sidebar{flex-direction:column}.editor-main{padding:20px}.post-title-input{font-size:1.4rem}}

/* Phase 5 - Table Checkbox Column */
.th-checkbox { width: 40px; text-align: center; }
.td-checkbox { text-align: center; }

/* Phase 5 - Email Compose Icon spacing */
.icon-mr-6 { margin-right: 6px; }

/* Phase 5 - Dynamic color badge (uses CSS custom properties injected via PHP) */
.badge-code-dynamic {
    background: var(--dynamic-bg-color, #f1f5f9);
    color: var(--dynamic-text-color, #64748b);
}

/* Status Badge - Pending override */
.status-pending { background: #fef9c3 !important; color: #b45309 !important; border: 1px solid #fde047 !important; }

/* --- 8. TESTIMONIAL MODERATION --- */
.review-admin-section .dashboard-header {
    align-items: flex-end;
}

.review-admin-notice {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 14px;
    font-weight: 700;
    border: 1px solid transparent;
    background: #eff6ff;
    color: var(--primary);
}

.review-admin-notice-success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #16a34a;
}

.review-admin-notice-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #ef4444;
}

.review-admin-stats .stat-icon {
    font-family: 'SVN-Gilroy Bold', sans-serif;
    font-size: 1.2rem;
}

.review-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.review-admin-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 22px;
    border-radius: 18px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.review-admin-card-head {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}

.review-admin-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    background: #f1f5f9;
}

.review-admin-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--vibe-gradient);
    font-family: 'SVN-Gilroy Bold', sans-serif;
}

.review-admin-person {
    min-width: 0;
}

.review-admin-person h3 {
    margin: 0 0 4px;
    color: var(--text-main);
    font-size: 1rem;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.review-admin-person span,
.review-admin-date {
    color: var(--text-light);
    font-size: 0.84rem;
}

.review-admin-stars {
    margin-bottom: 10px;
    color: #f59e0b;
    letter-spacing: 0;
}

.review-admin-content {
    flex: 1;
    margin: 0 0 16px;
    color: var(--text-body);
    line-height: 1.65;
}

.review-admin-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

.review-admin-actions form {
    margin: 0;
}

.review-admin-actions .btn {
    min-height: 38px;
}

@media (max-width: 768px) {
    .review-admin-grid {
        grid-template-columns: 1fr;
    }

    .review-admin-card-head {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .review-admin-card-head .badge-status {
        grid-column: 1 / -1;
        width: fit-content;
    }
}


/* Customer Dashboard - Logout Link */
.dash-menu a.logout-link { color: #ef4444 !important; transition: all .2s ease; }
.dash-menu a.logout-link:hover { background-color: #fef2f2 !important; color: #dc2626 !important; }

/* Admin table badge system */
.dashboard-section .user-table .badge,
.dashboard-section .user-table .badge-status,
.dashboard-section .review-admin-card .badge-status {
    min-height: 28px;
    padding: 0 11px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid transparent;
    font: 800 0.76rem/1 "Inter", sans-serif;
    letter-spacing: 0;
    text-transform: none;
    vertical-align: middle;
    white-space: nowrap;
    margin: 0;
}

.dashboard-section .user-table .badge-admin,
.dashboard-section .badge-admin,
.dashboard-section .user-table .badge-editor,
.dashboard-section .badge-editor,
.dashboard-section .user-table .badge-subscriber,
.dashboard-section .badge-subscriber {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    font: 800 0.76rem/1 "Inter", sans-serif;
    letter-spacing: 0;
    text-transform: none;
    vertical-align: middle;
    white-space: nowrap;
    padding: 0 11px;
    border-radius: 999px;
    margin: 0;
}

.dashboard-section .user-table .badge-admin,
.dashboard-section .badge-admin {
    color: #dc2626;
    background: #fef2f2;
    border-color: #fecaca;
}

.dashboard-section .user-table .badge-editor,
.dashboard-section .badge-editor {
    color: #b45309;
    background: #fffbeb;
    border-color: #fde68a;
}

.dashboard-section .user-table .badge-subscriber,
.dashboard-section .badge-subscriber {
    color: #0d3e9a;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.dashboard-section .user-table .status-publish,
.dashboard-section .user-table .status-completed,
.dashboard-section .review-admin-card .status-completed {
    color: #15803d !important;
    background: #f0fdf4 !important;
    border-color: #bbf7d0 !important;
}

.dashboard-section .user-table .status-pending,
.dashboard-section .review-admin-card .status-pending {
    color: #b45309 !important;
    background: #fffbeb !important;
    border-color: #fde68a !important;
}

.dashboard-section .user-table .status-processing {
    color: #0d3e9a !important;
    background: #eff6ff !important;
    border-color: #bfdbfe !important;
}

.dashboard-section .user-table .status-draft {
    color: #475569 !important;
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
}

.dashboard-section .user-table .status-cancelled,
.dashboard-section .user-table .status-expired,
.dashboard-section .user-table .status-used-up {
    color: #dc2626 !important;
    background: #fef2f2 !important;
    border-color: #fecaca !important;
}

.dashboard-section .user-table .status-icon-badge {
    width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    border-radius: 50%;
}

.dashboard-section .user-table .status-icon-badge svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.dashboard-section .user-table .badge-code,
.dashboard-section .user-table .badge-code-dynamic,
.dashboard-section .user-table .badge-pkg,
.dashboard-section .user-table .badge-cat {
    min-height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(226, 232, 240, 0.9);
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
    padding: 0 12px;
}

.dashboard-section .user-table .badge-code,
.dashboard-section .user-table .badge-cat {
    color: var(--primary);
    background: #eff6ff;
}

.dashboard-section .user-table .badge-dynamic-color,
.dashboard-section .badge-dynamic-color {
    border-color: currentColor;
    background-color: rgba(248, 250, 252, 0.96) !important;
}

.dashboard-section .user-table .badge-code-dynamic {
    color: var(--dynamic-text-color, #64748b) !important;
    background: var(--dynamic-bg-color, #f1f5f9) !important;
    border-color: transparent;
}

.dashboard-section .user-table .pkg-code {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: 3px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #f8fafc;
    color: #64748b;
    font: 800 0.7rem/1 "Inter", sans-serif;
    letter-spacing: 0;
}

.dashboard-section .tbl-user-text h4 .badge-admin {
    min-height: 22px;
    padding: 0 8px;
    margin-left: 6px;
    font-size: 0.66rem;
    transform: translateY(-1px);
}

/* Admin controls - Mail style sync */
.dashboard-section .btn {
    min-height: 40px;
    gap: 8px;
    border-radius: 999px;
    font-family: "SVN-Gilroy Bold", sans-serif;
    letter-spacing: 0;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.dashboard-section .btn svg {
    flex-shrink: 0;
    margin: 0;
}

.dashboard-section .btn-sm {
    min-height: 38px;
    padding: 9px 18px;
    font-size: 0.86rem;
}

.dashboard-section .btn:disabled,
.dashboard-section .btn[disabled],
.dashboard-section .btn.is-loading,
.dashboard-section .btn-cat-action:disabled,
.dashboard-section .btn-cat-action[disabled] {
    opacity: 0.62;
    cursor: not-allowed;
    pointer-events: none;
    transform: none !important;
    box-shadow: none !important;
}

.dashboard-section .btn-primary {
    background: var(--vibe-gradient);
    color: #fff;
    border: 0;
    box-shadow: 0 2px 8px rgba(108, 46, 231, 0.16);
}

.dashboard-section .btn-primary:hover {
    color: #fff;
    filter: brightness(1.04);
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(108, 46, 231, 0.24);
}

.dashboard-section .btn-primary:active {
    transform: none;
    box-shadow: 0 1px 5px rgba(108, 46, 231, 0.18);
}

.dashboard-section .btn-outline,
.dashboard-section .btn-manage-cats {
    background: #fff;
    border: 1px solid #dbe4f0;
    color: #475569;
    box-shadow: none;
}

.dashboard-section .btn-outline:hover,
.dashboard-section .btn-outline:focus-visible,
.dashboard-section .btn-manage-cats:hover,
.dashboard-section .btn-manage-cats:focus-visible {
    background: #f8fafc;
    border-color: #b9c7dc;
    color: var(--primary);
    transform: none;
    box-shadow: 0 6px 16px rgba(13, 62, 154, 0.06);
}

.dashboard-section .btn-danger {
    background: #fff5f5;
    border: 1px solid #fecaca;
    color: #ef4444;
    box-shadow: none;
}

.dashboard-section .btn-danger:hover,
.dashboard-section .btn-danger:focus-visible {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(239, 68, 68, 0.12);
}

.dashboard-section .admin-toolbar-actions .btn,
.dashboard-section .dashboard-header .btn,
.dashboard-section .header-actions .btn,
.dashboard-section .editor-widget .btn {
    min-height: 40px;
    padding-left: 20px;
    padding-right: 20px;
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.dashboard-section .btn-toolbar-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid #dbe4f0;
    background: #f8fafc;
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    line-height: 1;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.dashboard-section .btn-toolbar-icon:hover,
.dashboard-section .btn-toolbar-icon:focus-visible {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: var(--primary);
    transform: none;
    box-shadow: 0 4px 12px rgba(13, 62, 154, 0.08);
    outline: none;
}

.dashboard-section .btn-toolbar-icon svg {
    width: 17px;
    height: 17px;
}

.dashboard-section .btn-toolbar-icon.btn-toolbar-primary {
    background: var(--vibe-gradient);
    border: 0;
    color: #fff;
    box-shadow: 0 2px 8px rgba(108, 46, 231, 0.16);
}

.dashboard-section .btn-toolbar-icon.btn-toolbar-primary:hover {
    background: var(--vibe-gradient);
    border: 0;
    color: #fff;
    filter: brightness(1.04);
    box-shadow: 0 4px 12px rgba(108, 46, 231, 0.22);
    transform: translateY(-1px);
}

.dashboard-section .btn-toolbar-icon.btn-toolbar-primary:focus-visible {
    background: var(--vibe-gradient);
    border: 0;
    color: #fff;
    filter: none;
    transform: none;
    box-shadow: var(--mv-btn-focus) !important;
}

.dashboard-section .btn-toolbar-icon.btn-toolbar-primary:active {
    transform: none;
    box-shadow: 0 1px 5px rgba(108, 46, 231, 0.18);
}

.dashboard-section .btn-toolbar-icon.btn-toolbar-danger {
    background: #fff5f5;
    border-color: #fecaca;
    color: #ef4444;
}

.dashboard-section .btn-toolbar-icon.btn-toolbar-danger:hover,
.dashboard-section .btn-toolbar-icon.btn-toolbar-danger:focus-visible {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
}

.dashboard-section .action-group,
.dashboard-section .cat-actions {
    gap: 8px;
}

.dashboard-section .user-table td :is(.d-flex, .action-group).justify-end {
    gap: 8px !important;
}

.dashboard-section .btn-cat-action,
.dashboard-section a.btn-cat-action,
.dashboard-section button.btn-cat-action {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    padding: 0;
    border-radius: 50% !important;
    border: 1px solid #dbe4f0;
    background: #f8fafc;
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    text-decoration: none;
    box-shadow: none;
    overflow: hidden;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.dashboard-section .btn-cat-action svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin: 0 !important;
}

.dashboard-section .btn-cat-action:hover,
.dashboard-section .btn-cat-action:focus-visible {
    background: #f1f5f9;
    border-color: #b9c7dc;
    color: var(--primary);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    outline: none;
    transform: none;
}

.dashboard-section :is(
    .btn-edit-cat,
    .btn-cat-edit,
    .btn-edit-tpl,
    .btn-user-edit,
    .btn-edit-domain,
    .btn-customer-edit,
    .btn-edit-voucher,
    .btn-edit-post,
    .btn-view-order,
    .btn-view-customer-order,
    .btn-cat-action.text-primary,
    .btn-cat-action.bg-light.text-primary
) {
    background: #eff6ff;
    border-color: #dbeafe;
    color: var(--primary) !important;
}

.dashboard-section :is(
    .btn-edit-cat,
    .btn-cat-edit,
    .btn-edit-tpl,
    .btn-user-edit,
    .btn-edit-domain,
    .btn-customer-edit,
    .btn-edit-voucher,
    .btn-edit-post,
    .btn-view-order,
    .btn-view-customer-order,
    .btn-cat-action.text-primary,
    .btn-cat-action.bg-light.text-primary
):hover,
.dashboard-section :is(
    .btn-edit-cat,
    .btn-cat-edit,
    .btn-edit-tpl,
    .btn-user-edit,
    .btn-edit-domain,
    .btn-customer-edit,
    .btn-edit-voucher,
    .btn-edit-post,
    .btn-view-order,
    .btn-view-customer-order,
    .btn-cat-action.text-primary,
    .btn-cat-action.bg-light.text-primary
):focus-visible {
    background: #dbeafe;
    border-color: #bfdbfe;
    color: #174fa4 !important;
    box-shadow: 0 4px 12px rgba(13, 62, 154, 0.08);
}

.dashboard-section :is(
    .btn-delete-cat,
    .btn-cat-delete,
    .btn-delete-tpl,
    .btn-user-delete,
    .btn-delete-domain,
    .btn-delete-order,
    .btn-delete-voucher,
    .btn-delete-post,
    .btn-cat-action.text-danger,
    .btn-cat-action.btn-delete
) {
    background: #fff5f5;
    border-color: #fecaca;
    color: #ef4444 !important;
}

.dashboard-section :is(
    .btn-delete-cat,
    .btn-cat-delete,
    .btn-delete-tpl,
    .btn-user-delete,
    .btn-delete-domain,
    .btn-delete-order,
    .btn-delete-voucher,
    .btn-delete-post,
    .btn-cat-action.text-danger,
    .btn-cat-action.btn-delete
):hover,
.dashboard-section :is(
    .btn-delete-cat,
    .btn-cat-delete,
    .btn-delete-tpl,
    .btn-user-delete,
    .btn-delete-domain,
    .btn-delete-order,
    .btn-delete-voucher,
    .btn-delete-post,
    .btn-cat-action.text-danger,
    .btn-cat-action.btn-delete
):focus-visible {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626 !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.1);
}

.dashboard-section .dash-actions {
    gap: 10px;
}

.dashboard-section .btn-icon {
    min-height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-family: "Inter", sans-serif;
    font-weight: 800;
    letter-spacing: 0;
    box-shadow: none;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.dashboard-section .btn-icon.btn-edit {
    background: #eff6ff;
    border-color: #dbeafe;
    color: var(--primary);
}

.dashboard-section .btn-icon.btn-edit:hover,
.dashboard-section .btn-icon.btn-edit:focus-visible {
    background: #dbeafe;
    border-color: #bfdbfe;
    color: #174fa4;
    box-shadow: 0 4px 12px rgba(13, 62, 154, 0.08);
}

.dashboard-section .btn-icon.btn-delete {
    background: #fff5f5;
    border-color: #fecaca;
    color: #ef4444;
}

.dashboard-section .btn-icon.btn-delete:hover,
.dashboard-section .btn-icon.btn-delete:focus-visible {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.1);
}

.dashboard-section .table-responsive.admin-table-card {
    border-radius: 16px;
    border-color: #e2e8f0;
    box-shadow: 0 10px 30px rgba(13, 62, 154, 0.05);
}

.dashboard-section .admin-table-card .user-table th {
    letter-spacing: 0;
    color: #64748b;
}

.dashboard-section .admin-table-card .user-table tbody tr {
    transition: background 0.16s ease;
}

.dashboard-section .admin-table-card .user-table tbody tr:hover {
    background: #f8fafc;
}

.dashboard-section .post-list-thumb,
.dashboard-section .post-list-thumb-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    display: block;
}

.dashboard-section .post-list-thumb-placeholder {
    position: relative;
}

.dashboard-section .post-list-thumb-placeholder::after {
    content: '';
    position: absolute;
    inset: 18px;
    border-radius: 8px;
    border: 2px solid #cbd5e1;
}

.modal-overlay {
    background: rgba(15, 23, 42, 0.52);
    backdrop-filter: blur(6px);
    padding: 24px;
}

.modal-content {
    width: min(820px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 48px);
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.2);
    transform: translateY(16px) scale(0.98);
    transition: transform 0.24s ease, opacity 0.24s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-content.modal-sm {
    width: min(560px, calc(100vw - 32px));
}

.modal-header {
    min-height: 72px;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h3,
.modal-title-lg {
    margin: 0;
    font-size: 1.18rem;
    line-height: 1.35;
    letter-spacing: 0;
}

.btn-close-modal {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    border: 1px solid transparent;
    background: #f1f5f9;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    font-size: 1.25rem;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.btn-close-modal:hover,
.btn-close-modal:focus-visible {
    background: #e2e8f0;
    border-color: #dbe4f0;
    color: var(--primary);
    outline: none;
}

.btn-close-modal-lg {
    font-size: 1.55rem;
}

.modal-body-scroll {
    padding: 24px;
    background: #fff;
}

.modal-body-scroll > :last-child {
    margin-bottom: 0;
}

.modal-footer,
.detail-modal-footer,
.modal-action-wrap,
.modal-body-scroll form > .text-center.mt-4,
.modal-body-scroll form > .mt-4:last-child {
    margin: 24px -24px -24px;
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    text-align: initial;
}

.modal-body-scroll form > .text-center.mt-4,
.modal-body-scroll form > .mt-4:last-child {
    justify-content: center;
}

.modal-footer .btn-cancel,
.detail-modal-footer .btn-cancel {
    margin-right: 0;
}

.modal-action-wrap {
    display: none;
}

.modal-action-wrap[style*="display: block"],
.modal-action-wrap[style*="display:block"] {
    display: flex !important;
}

.modal-body-scroll form > .btn-full:last-child {
    width: auto;
    min-width: 180px;
    margin-top: 24px;
    min-height: 44px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 28px;
    padding-right: 28px;
}

@media (max-width: 768px) {
    .modal-overlay {
        align-items: flex-end;
        padding: 12px;
    }

    .modal-content,
    .modal-content.modal-sm {
        width: 100%;
        max-width: 100%;
        max-height: calc(100vh - 24px);
        border-radius: 18px 18px 0 0;
    }

    .modal-header {
        min-height: 64px;
        padding: 16px 20px;
    }

    .modal-body-scroll {
        padding: 20px;
    }

    .modal-footer,
    .detail-modal-footer,
    .modal-action-wrap,
    .modal-body-scroll form > .text-center.mt-4,
    .modal-body-scroll form > .mt-4:last-child {
        margin: 20px -20px -20px;
        padding: 14px 20px;
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .modal-footer .btn,
    .detail-modal-footer .btn,
    .modal-action-wrap .btn,
    .modal-body-scroll form > .text-center.mt-4 .btn,
    .modal-body-scroll form > .mt-4:last-child .btn {
        width: 100%;
    }
}

/* Unified action-button polish shared by dashboard, SEO, and mail surfaces. */
:is(.dashboard-section, body.seo-app-mode, body.mail-app-mode) :is(.btn,.btn-cat-action,.btn-toolbar-icon,.btn-action-circle,.wm-icon-action,.wm-btn-circle,.wm-stack-tool,.sl-stats-close,.btn-close-modal,.btn-copy,.qr-btn-close,.search-btn-absolute) {
    font-family: "Inter", sans-serif;
    letter-spacing: 0;
    box-sizing: border-box;
}

:is(.dashboard-section, body.seo-app-mode, body.mail-app-mode) .btn {
    font-family: "SVN-Gilroy Bold", sans-serif;
}

#global-alert-modal .mv-modal-box::before,
#global-confirm-modal .mv-modal-box::before,
#global-prompt-modal .mv-modal-box::before {
    content: none !important;
    display: none !important;
}

:is(.dashboard-section, body.seo-app-mode, body.mail-app-mode) :is(.btn-cat-action,.btn-toolbar-icon,.btn-action-circle,.wm-icon-action,.wm-btn-circle,.wm-stack-tool,.sl-stats-close,.btn-close-modal,.btn-copy,.qr-btn-close,.search-btn-absolute) {
    width: var(--mv-btn-icon-size, 38px);
    height: var(--mv-btn-icon-size, 38px);
    min-width: var(--mv-btn-icon-size, 38px);
    min-height: var(--mv-btn-icon-size, 38px);
    padding: 0;
    border-radius: 50% !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    text-decoration: none;
    appearance: none;
    -webkit-appearance: none;
}

:is(.dashboard-section, body.seo-app-mode, body.mail-app-mode) :is(.btn-cat-action,.btn-toolbar-icon,.btn-action-circle,.wm-icon-action,.wm-btn-circle,.wm-stack-tool,.btn-copy,.qr-btn-close,.search-btn-absolute):not(.btn-toolbar-primary):not(.text-danger):not(.danger):not(.wm-icon-action-danger) {
    border: 1px solid #dbe4f0;
    background: #f8fafc;
    color: #475569;
}

:is(.dashboard-section, body.seo-app-mode, body.mail-app-mode) :is(.btn-cat-action,.btn-toolbar-icon,.btn-action-circle,.wm-icon-action,.wm-btn-circle,.wm-stack-tool,.btn-copy,.qr-btn-close,.search-btn-absolute):not(.btn-toolbar-primary):not(.text-danger):not(.danger):not(.wm-icon-action-danger):hover {
    border-color: #b9c7dc;
    background: #f1f5f9;
    color: var(--primary);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    transform: none;
}

:is(.dashboard-section, body.seo-app-mode, body.mail-app-mode) :is(.text-danger,.danger,.wm-icon-action-danger).btn-cat-action,
:is(.dashboard-section, body.seo-app-mode, body.mail-app-mode) :is(.text-danger,.danger,.wm-icon-action-danger).btn-action-circle,
:is(.dashboard-section, body.seo-app-mode, body.mail-app-mode) :is(.text-danger,.danger,.wm-icon-action-danger).wm-btn-circle,
:is(.dashboard-section, body.seo-app-mode, body.mail-app-mode) .wm-icon-action-danger {
    border-color: #fecaca;
    background: #fff5f5;
    color: #ef4444 !important;
}

.dashboard-section .checkbox-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
    color: var(--text-body);
    font-weight: 700;
    line-height: 1.35;
}

.dashboard-section .checkbox-line input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    accent-color: var(--primary);
}

.dashboard-section .admin-check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 14px;
}

@media (max-width: 640px) {
    .dashboard-section .admin-check-grid {
        grid-template-columns: 1fr;
    }
}

/* MyVibe Admin Shell 2.0 baseline */
.dashboard-section {
    padding: 40px 0 56px;
    background: var(--mv-surface-soft, #f8fafc);
    min-height: calc(100vh - var(--header-height, 72px));
}

.dashboard-section > .container {
    width: 100%;
    max-width: 1440px;
    padding-left: 24px;
    padding-right: 24px;
}

.dashboard-header {
    align-items: flex-end;
    gap: 18px;
    margin-bottom: 24px;
}

.dashboard-header h2,
.dashboard-welcome h2,
.dash-header-title {
    margin: 0 0 6px;
    font-size: clamp(1.75rem, 2vw, 2rem);
    line-height: 1.2;
    letter-spacing: 0;
}

.dashboard-header p,
.dashboard-welcome p,
.dash-header-desc {
    max-width: 760px;
    margin: 0;
    color: var(--text-light);
    font-size: 0.98rem;
}

.dashboard-wrapper {
    gap: var(--mv-shell-gap, 28px);
}

.dash-sidebar {
    width: var(--mv-sidebar-width, 260px);
    padding: 14px;
    border: 1px solid var(--mv-border-soft, rgba(226, 232, 240, 0.82));
    border-radius: var(--mv-radius-card, 18px);
    background: var(--mv-surface, #fff);
    box-shadow: var(--mv-shadow-card, 0 12px 30px rgba(13, 62, 154, 0.05));
    top: calc(var(--header-height, 72px) + 20px);
    max-height: calc(100vh - var(--header-height, 72px) - 40px);
}

.dash-menu-group {
    margin-bottom: 6px;
}

.dash-menu-group .dash-section-label {
    min-height: 32px;
    margin: 0 0 6px;
    padding: 6px 10px;
    color: var(--mv-muted-text, #64748b);
    letter-spacing: 0;
}

.dash-menu a {
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--text-body);
    line-height: 1.2;
}

.dash-menu a:hover {
    background: var(--mv-surface-soft, #f8fafc);
    border-color: var(--mv-border-soft, rgba(226, 232, 240, 0.82));
    color: var(--primary);
}

.dash-menu a.active {
    background: var(--primary-bg);
    border-color: var(--primary-border);
    color: var(--primary);
    box-shadow: inset 3px 0 0 var(--primary);
}

.dash-menu a span {
    min-width: 0;
    white-space: normal;
}

.dash-divider {
    border-color: var(--mv-border-soft, rgba(226, 232, 240, 0.82));
}

.dash-main {
    min-width: 0;
}

.cat-list-box,
.editor-container,
.editor-main,
.editor-widget,
.profile-card-header,
.stat-card,
.dash-post-card,
.detail-info-box {
    border: 1px solid var(--mv-border-soft, rgba(226, 232, 240, 0.82));
    border-radius: var(--mv-radius-card, 18px);
    background: var(--mv-surface, #fff);
    box-shadow: var(--mv-shadow-card, 0 12px 30px rgba(13, 62, 154, 0.05));
}

.cat-list-box,
.editor-main,
.editor-widget,
.profile-card-header {
    padding: 24px;
}

.editor-container {
    box-shadow: var(--mv-shadow-card, 0 12px 30px rgba(13, 62, 154, 0.05));
}

.dash-post-card:hover,
.stat-card:hover,
.cat-list-box:hover {
    box-shadow: var(--mv-shadow-hover, 0 18px 42px rgba(13, 62, 154, 0.08));
}

.editor-input,
select.editor-input,
.permalink-input,
.cat-quick-add input,
.user-search-box input,
.input-group-merge,
.searchable-dropdown-menu {
    border-color: var(--mv-border-soft, rgba(226, 232, 240, 0.82));
    border-radius: var(--mv-radius-control, 12px);
    background: var(--mv-surface, #fff);
}

.editor-input,
select.editor-input,
.user-search-box input,
.input-group-merge {
    min-height: var(--mv-control-height, 44px);
}

.editor-input:focus,
.permalink-input:focus,
.cat-quick-add input:focus,
.user-search-box input:focus,
.input-group-merge:focus-within {
    border-color: rgba(13, 62, 154, 0.42);
    box-shadow: var(--mv-focus-ring, 0 0 0 3px rgba(13, 62, 154, 0.16));
    background: var(--mv-surface, #fff);
    outline: none;
}

.admin-table-tools {
    padding: 14px;
    border: 1px solid var(--mv-border-soft, rgba(226, 232, 240, 0.82));
    border-radius: var(--mv-radius-card, 18px);
    background: var(--mv-surface, #fff);
    box-shadow: var(--mv-shadow-card, 0 12px 30px rgba(13, 62, 154, 0.05));
    backdrop-filter: none;
}

.admin-toolbar-main {
    gap: 10px;
}

.admin-table-tools .editor-input.search-rounded,
.admin-table-tools select.editor-input {
    height: var(--mv-control-height, 44px);
    background: var(--mv-surface-soft, #f8fafc);
}

.admin-filter-chip {
    height: 38px;
    border-color: var(--mv-border-soft, rgba(226, 232, 240, 0.82));
    background: var(--mv-chip-bg, #fff);
    color: var(--text-body);
}

.admin-filter-chip:hover {
    background: var(--mv-surface-soft, #f8fafc);
    border-color: rgba(13, 62, 154, 0.28);
    box-shadow: none;
}

.admin-filter-chip.is-active {
    background: var(--primary-bg);
    border-color: var(--primary-border);
    color: var(--primary);
}

.table-responsive,
.dashboard-section .table-responsive.admin-table-card,
.admin-table-card {
    border: 1px solid var(--mv-border-soft, rgba(226, 232, 240, 0.82));
    border-radius: var(--mv-radius-card, 18px);
    background: var(--mv-surface, #fff);
    box-shadow: var(--mv-shadow-card, 0 12px 30px rgba(13, 62, 154, 0.05));
}

.user-table th,
.dashboard-section .admin-table-card .user-table th {
    padding: 14px 18px;
    background: var(--mv-table-head, #f8fafc);
    border-bottom-color: var(--mv-border-soft, rgba(226, 232, 240, 0.82));
    color: var(--mv-muted-text, #64748b);
    font-size: 0.78rem;
    letter-spacing: 0;
}

.user-table td {
    padding: 15px 18px;
    border-bottom-color: var(--mv-border-soft, rgba(226, 232, 240, 0.82));
}

.user-table tr:hover,
.dashboard-section .admin-table-card .user-table tbody tr:hover {
    background: var(--mv-row-hover, #f8fafc);
}

.badge,
.badge-status,
.dashboard-section .user-table .badge,
.dashboard-section .user-table .badge-status,
.dashboard-section .review-admin-card .badge-status {
    min-height: 24px;
    padding: 5px 10px;
    border-radius: 999px;
    line-height: 1.1;
    letter-spacing: 0;
}

.detail-info-box {
    background: var(--mv-surface-soft, #f8fafc);
    box-shadow: none;
}

.detail-info-row,
.detail-total-row {
    gap: 16px;
}

.detail-info-row span,
.detail-total-row span {
    flex: 0 0 auto;
}

.detail-info-row strong,
.detail-total-row strong {
    min-width: 0;
    text-align: right;
    overflow-wrap: anywhere;
}

.detail-notes-box {
    border-color: var(--mv-border-soft, rgba(226, 232, 240, 0.82));
    background: var(--mv-surface, #fff);
}

.empty-state-box {
    border: 0;
    background: transparent;
    box-shadow: none;
    margin: 0;
    padding: 40px 24px;
    color: var(--text-light);
}

@media (max-width: 992px) {
    .dashboard-section {
        padding-top: 24px;
    }

    .dashboard-section > .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .dashboard-wrapper {
        gap: 18px;
    }

    .dash-sidebar {
        max-height: min(42vh, 420px);
        border-radius: 16px;
    }

    .user-table {
        min-width: 760px;
    }
}

@media (max-width: 768px) {
    .dashboard-header {
        align-items: stretch;
        margin-bottom: 18px;
    }

    .dashboard-header .header-actions,
    .admin-toolbar-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .cat-list-box,
    .editor-main,
    .editor-widget,
    .profile-card-header {
        padding: 18px;
    }

    .detail-info-row,
    .detail-total-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .detail-info-row strong,
    .detail-total-row strong {
        text-align: left;
    }
}

/* Content administration surfaces */
.content-admin-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.content-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.content-kpi-card {
    min-height: 94px;
    padding: 18px;
    border: 1px solid var(--mv-border-soft, rgba(226, 232, 240, 0.82));
    border-radius: var(--mv-radius-card, 18px);
    background: var(--mv-surface, #fff);
    box-shadow: var(--mv-shadow-card, 0 12px 30px rgba(13, 62, 154, 0.05));
}

.content-kpi-card span {
    display: block;
    margin-bottom: 10px;
    color: var(--mv-muted-text, #64748b);
    font: 800 0.78rem/1.2 "Inter", sans-serif;
}

.content-kpi-card strong {
    display: block;
    color: var(--text-main);
    font-size: 1.9rem;
    line-height: 1;
    overflow-wrap: anywhere;
}

.content-kpi-card.is-green {
    border-color: rgba(22, 163, 74, 0.22);
}

.content-kpi-card.is-blue {
    border-color: rgba(13, 62, 154, 0.22);
}

.content-kpi-card.is-amber {
    border-color: rgba(180, 83, 9, 0.22);
}

.admin-search-field {
    position: relative;
    display: flex;
    align-items: center;
    width: min(100%, 360px);
    min-width: 240px;
    color: #94a3b8;
}

.admin-search-field svg {
    position: absolute;
    left: 14px;
    z-index: 1;
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.admin-search-field .editor-input {
    width: 100%;
    height: var(--mv-control-height, 44px);
    padding-left: 42px;
    background: var(--mv-surface-soft, #f8fafc);
}

.content-search-field {
    flex: 1 1 280px;
}

.dashboard-section .status-future {
    background: rgba(14, 165, 233, 0.9);
}

.dashboard-section .badge-status.status-future,
.dashboard-section .user-table .badge-status.status-future {
    background: #e0f2fe;
    color: #0369a1;
}

.dashboard-section .admin-filter-chip[data-filter-value="future"] .chip-count {
    color: #0369a1;
    background: #e0f2fe;
}

html[data-theme="dark"] .dashboard-section .admin-filter-chip .chip-count {
    background: var(--mv-surface-soft, #0f1728) !important;
    color: var(--text-light, #94a3b8) !important;
    border: 1px solid var(--border, #263247) !important;
}

html[data-theme="dark"] .dashboard-section .admin-filter-chip.is-active .chip-count {
    background: rgba(139, 181, 255, 0.16) !important;
    color: var(--primary, #8bb5ff) !important;
    border-color: rgba(139, 181, 255, 0.28) !important;
}

html[data-theme="dark"] .dashboard-section .admin-filter-chip[data-filter-value="pending"] .chip-count,
html[data-theme="dark"] .dashboard-section .admin-filter-chip[data-filter-value="processing"] .chip-count,
html[data-theme="dark"] .dashboard-section .admin-filter-chip[data-filter-value="draft"] .chip-count,
html[data-theme="dark"] .dashboard-section .admin-filter-chip[data-filter-value="editor"] .chip-count,
html[data-theme="dark"] .dashboard-section .admin-filter-chip[data-filter-value="paid"] .chip-count {
    background: rgba(245, 158, 11, 0.14) !important;
    color: #fbbf24 !important;
    border-color: rgba(245, 158, 11, 0.3) !important;
}

html[data-theme="dark"] .dashboard-section .admin-filter-chip[data-filter-value="completed"] .chip-count,
html[data-theme="dark"] .dashboard-section .admin-filter-chip[data-filter-value="publish"] .chip-count,
html[data-theme="dark"] .dashboard-section .admin-filter-chip[data-filter-value="active"] .chip-count {
    background: rgba(34, 197, 94, 0.14) !important;
    color: #86efac !important;
    border-color: rgba(34, 197, 94, 0.3) !important;
}

html[data-theme="dark"] .dashboard-section .admin-filter-chip[data-filter-value="cancelled"] .chip-count,
html[data-theme="dark"] .dashboard-section .admin-filter-chip[data-filter-value="expired"] .chip-count,
html[data-theme="dark"] .dashboard-section .admin-filter-chip[data-filter-value="used-up"] .chip-count,
html[data-theme="dark"] .dashboard-section .admin-filter-chip[data-filter-value="administrator"] .chip-count {
    background: rgba(239, 68, 68, 0.14) !important;
    color: #fca5a5 !important;
    border-color: rgba(248, 113, 113, 0.32) !important;
}

html[data-theme="dark"] .dashboard-section .admin-filter-chip[data-filter-value="subscriber"] .chip-count,
html[data-theme="dark"] .dashboard-section .admin-filter-chip[data-filter-value="free"] .chip-count,
html[data-theme="dark"] .dashboard-section .admin-filter-chip[data-filter-value="future"] .chip-count {
    background: rgba(14, 165, 233, 0.14) !important;
    color: #7dd3fc !important;
    border-color: rgba(14, 165, 233, 0.3) !important;
}

html[data-theme="dark"] .dashboard-section .badge-admin,
html[data-theme="dark"] .dashboard-section .user-table .badge-admin {
    background: rgba(239, 68, 68, 0.14) !important;
    border-color: rgba(248, 113, 113, 0.32) !important;
    color: #fca5a5 !important;
}

html[data-theme="dark"] .dashboard-section .badge-editor,
html[data-theme="dark"] .dashboard-section .user-table .badge-editor {
    background: rgba(245, 158, 11, 0.14) !important;
    border-color: rgba(245, 158, 11, 0.3) !important;
    color: #fbbf24 !important;
}

html[data-theme="dark"] .dashboard-section .badge-subscriber,
html[data-theme="dark"] .dashboard-section .user-table .badge-subscriber,
html[data-theme="dark"] .dashboard-section .badge-code,
html[data-theme="dark"] .dashboard-section .badge-cat,
html[data-theme="dark"] .dashboard-section .user-table .badge-code,
html[data-theme="dark"] .dashboard-section .user-table .badge-cat {
    background: rgba(139, 181, 255, 0.12) !important;
    border-color: rgba(139, 181, 255, 0.28) !important;
    color: var(--primary, #8bb5ff) !important;
}

html[data-theme="dark"] .dashboard-section .badge-dynamic-color,
html[data-theme="dark"] .dashboard-section .user-table .badge-dynamic-color {
    background-color: rgba(15, 23, 40, 0.88) !important;
}

html[data-theme="dark"] .dashboard-section .status-publish,
html[data-theme="dark"] .dashboard-section .status-completed,
html[data-theme="dark"] .dashboard-section .user-table .status-publish,
html[data-theme="dark"] .dashboard-section .user-table .status-completed,
html[data-theme="dark"] .dashboard-section .review-admin-card .status-completed {
    background: rgba(34, 197, 94, 0.14) !important;
    border-color: rgba(34, 197, 94, 0.32) !important;
    color: #86efac !important;
}

html[data-theme="dark"] .dashboard-section .status-pending,
html[data-theme="dark"] .dashboard-section .user-table .status-pending,
html[data-theme="dark"] .dashboard-section .review-admin-card .status-pending {
    background: rgba(245, 158, 11, 0.14) !important;
    border-color: rgba(245, 158, 11, 0.32) !important;
    color: #fbbf24 !important;
}

html[data-theme="dark"] .dashboard-section .status-processing,
html[data-theme="dark"] .dashboard-section .user-table .status-processing,
html[data-theme="dark"] .dashboard-section .badge-status.status-future,
html[data-theme="dark"] .dashboard-section .user-table .badge-status.status-future {
    background: rgba(14, 165, 233, 0.14) !important;
    border-color: rgba(14, 165, 233, 0.32) !important;
    color: #7dd3fc !important;
}

html[data-theme="dark"] .dashboard-section .status-draft,
html[data-theme="dark"] .dashboard-section .user-table .status-draft {
    background: var(--mv-surface-soft, #0f1728) !important;
    border-color: var(--border, #263247) !important;
    color: var(--text-light, #94a3b8) !important;
}

html[data-theme="dark"] .dashboard-section .status-cancelled,
html[data-theme="dark"] .dashboard-section .status-expired,
html[data-theme="dark"] .dashboard-section .status-used-up,
html[data-theme="dark"] .dashboard-section .user-table .status-cancelled,
html[data-theme="dark"] .dashboard-section .user-table .status-expired,
html[data-theme="dark"] .dashboard-section .user-table .status-used-up {
    background: rgba(239, 68, 68, 0.14) !important;
    border-color: rgba(248, 113, 113, 0.32) !important;
    color: #fca5a5 !important;
}

.dash-post-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    background: #f8fafc;
}

.dash-post-thumb-placeholder svg {
    opacity: 0.9;
}

.content-editor-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--mv-border-soft, rgba(226, 232, 240, 0.82));
    color: var(--text-light);
    font-size: 0.86rem;
    font-weight: 800;
}

.editor-widget-publish {
    border-color: rgba(13, 62, 154, 0.16);
    box-shadow: 0 16px 36px rgba(13, 62, 154, 0.08);
}

.pro-editor-layout {
    align-items: start;
}

.pro-editor-layout .editor-sidebar {
    position: sticky;
    top: calc(var(--header-height, 72px) + 20px);
}

.category-admin-main {
    display: grid;
    gap: 18px;
}

.category-layout-modal {
    display: block;
}

.category-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cat-list-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.category-tools {
    margin-bottom: 14px;
    box-shadow: none;
}

.category-tools .admin-toolbar-main,
.review-admin-tools .admin-toolbar-main {
    width: 100%;
}

.category-modal-footer {
    justify-content: flex-end;
}

.category-modal-footer .btn {
    min-width: 120px;
}

.cat-list-inner {
    display: grid;
    gap: 8px;
}

.cat-item {
    border: 1px solid transparent;
    border-radius: 14px;
}

.cat-item:hover {
    border-color: var(--mv-border-soft, rgba(226, 232, 240, 0.82));
}

.cat-info {
    min-width: 0;
}

.cat-info h4,
.cat-info p {
    overflow-wrap: anywhere;
}

@media (max-width: 1100px) {
    .content-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .category-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .pro-editor-layout {
        grid-template-columns: 1fr;
    }

    .pro-editor-layout .editor-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .content-admin-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .content-admin-actions .btn {
        flex: 1 1 160px;
    }

    .content-kpi-grid,
    .category-kpi-grid {
        grid-template-columns: 1fr;
    }

    .admin-search-field {
        width: 100%;
        min-width: 0;
    }

    .admin-toolbar-main {
        width: 100%;
    }
}

/* Voucher and package administration */
.voucher-management .voucher-table {
    min-width: 950px;
}

.voucher-management .voucher-code-col {
    min-width: 174px;
}

.voucher-management .voucher-value-col {
    min-width: 132px;
}

.voucher-management .voucher-scope-col {
    min-width: 206px;
}

.voucher-management .voucher-state-col {
    min-width: 230px;
}

.voucher-management .voucher-mode-pill {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    margin-top: 10px;
    padding: 4px 10px;
    border: 1px solid #dbe4f0;
    border-radius: 999px;
    background: #f8fafc;
    color: #64748b;
    font: 700 0.75rem/1.2 "Inter", sans-serif;
}

.voucher-management .voucher-mode-pill.is-auto {
    border-color: #bbf7d0;
    background: #ecfdf5;
    color: #15803d;
}

.voucher-management .voucher-display-label {
    max-width: 200px;
    margin-top: 9px;
    color: #15803d;
    font-size: 0.82rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.voucher-management .voucher-value {
    display: block;
    color: var(--primary);
    font: 800 1.22rem/1.2 "SVN-Gilroy Bold", sans-serif;
    letter-spacing: -0.01em;
}

.voucher-management .voucher-effect-note,
.voucher-management .voucher-duration-note {
    margin-top: 8px;
    color: var(--text-light);
    font-size: 0.8rem;
    line-height: 1.45;
}

.voucher-management .voucher-target-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.voucher-management .voucher-target-chip {
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    padding: 4px 10px;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: #eff6ff;
    color: var(--primary);
    font-size: 0.76rem;
    font-weight: 700;
}

.voucher-management .voucher-target-chip.is-all {
    border-color: #e2e8f0;
    background: #f8fafc;
    color: #475569;
}

.voucher-management .voucher-meta-list {
    display: grid;
    gap: 6px;
    margin-top: 10px;
}

.voucher-management .voucher-meta-list div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    color: var(--text-light);
    font-size: 0.78rem;
    line-height: 1.4;
}

.voucher-management .voucher-meta-list strong {
    color: var(--text-body);
    font-weight: 700;
    text-align: right;
}

#voucher-modal .voucher-modal-content {
    width: min(900px, calc(100vw - 32px));
}

#package-modal .package-modal-content {
    width: min(720px, calc(100vw - 32px));
}

#voucher-modal .voucher-modal-header {
    align-items: flex-start;
    padding: 22px 28px 20px;
}

#voucher-modal .modal-eyebrow {
    margin: 0 0 6px;
    color: var(--primary);
    font: 800 0.7rem/1.2 "Inter", sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

#voucher-modal .modal-subtitle {
    max-width: 600px;
    margin: 6px 0 0;
    color: var(--text-light);
    font-size: 0.86rem;
    line-height: 1.45;
}

#voucher-modal .modal-body-scroll {
    padding: 22px 28px 0;
    background: #f8fafc;
}

#voucher-modal .voucher-form {
    display: grid;
    gap: 16px;
}

#voucher-modal .voucher-form-section {
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #fff;
}

#voucher-modal .voucher-section-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
}

#voucher-modal .voucher-section-head > span {
    display: inline-flex;
    flex: 0 0 29px;
    align-items: center;
    justify-content: center;
    width: 29px;
    height: 29px;
    border-radius: 50%;
    background: #eff6ff;
    color: var(--primary);
    font: 800 0.82rem/1 "Inter", sans-serif;
}

#voucher-modal .voucher-section-head h4 {
    margin: 1px 0 3px;
    color: var(--text-main);
    font-size: 0.96rem;
}

#voucher-modal .voucher-section-head p {
    margin: 0;
    color: var(--text-light);
    font-size: 0.8rem;
    line-height: 1.4;
}

#voucher-modal .voucher-fields-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

#voucher-modal .editor-group {
    min-width: 0;
    margin-bottom: 0;
}

#voucher-modal .editor-label {
    margin-bottom: 7px;
    font-size: 0.84rem;
}

#voucher-modal .field-hint {
    margin-top: 6px;
    color: var(--text-light);
    font-size: 0.76rem;
    line-height: 1.35;
}

#voucher-modal .voucher-value-input {
    position: relative;
}

#voucher-modal .voucher-value-input .editor-input {
    padding-right: 58px;
    font-weight: 700;
}

#voucher-modal .voucher-value-input span {
    position: absolute;
    top: 50%;
    right: 14px;
    padding-left: 10px;
    border-left: 1px solid #e2e8f0;
    color: var(--text-light);
    font: 700 0.77rem/1 "Inter", sans-serif;
    transform: translateY(-50%);
}

#voucher-modal .voucher-toggle-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 18px;
    padding: 13px 14px;
    border: 1px solid #bfdbfe;
    border-radius: 13px;
    background: #eff6ff;
    cursor: pointer;
}

#voucher-modal .voucher-toggle-card input,
#voucher-modal .checkbox-line input[type="checkbox"],
#package-modal .checkbox-line input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin: 2px 0 0;
    accent-color: var(--primary);
}

#voucher-modal .voucher-toggle-card strong,
#voucher-modal .voucher-toggle-card small {
    display: block;
}

#voucher-modal .voucher-toggle-card strong {
    color: var(--text-main);
    font-size: 0.86rem;
}

#voucher-modal .voucher-toggle-card small {
    margin-top: 3px;
    color: var(--text-body);
    font-size: 0.77rem;
    line-height: 1.45;
}

#voucher-modal .voucher-scope-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

#voucher-modal .voucher-choice-box {
    min-width: 0;
    margin: 0;
    padding: 13px 14px 11px;
    border: 1px solid #e2e8f0;
    border-radius: 13px;
    background: #f8fafc;
}

#voucher-modal .voucher-choice-box legend {
    padding: 0 6px;
    color: var(--text-main);
    font-size: 0.83rem;
    font-weight: 700;
}

#voucher-modal .admin-check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px 10px;
}

#voucher-modal .checkbox-line,
#package-modal .checkbox-line {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 5px 0;
    color: var(--text-body);
    font-size: 0.81rem;
    font-weight: 700;
    line-height: 1.35;
}

#voucher-modal .voucher-choice-box p {
    margin: 9px 0 0;
    color: var(--text-light);
    font-size: 0.73rem;
}

#voucher-modal .voucher-form-footer {
    position: sticky;
    bottom: 0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin: 2px -28px 0;
    padding: 16px 28px;
    border-top: 1px solid #e2e8f0;
    background: #fff;
}

#voucher-modal .voucher-form-footer .btn {
    min-width: 128px;
    min-height: 44px;
}

#voucher-modal .voucher-form-footer .btn-outline {
    border: 1px solid #dbe4f0;
    background: #fff;
    color: #475569;
}

.package-management .package-table .pkg-color-box {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 11px;
}

.package-management .package-table .pkg-prices {
    font-variant-numeric: tabular-nums;
    line-height: 1.7;
}

@media (max-width: 768px) {
    #voucher-modal .voucher-modal-content,
    #package-modal .package-modal-content {
        width: 100%;
    }

    #voucher-modal .voucher-modal-header {
        padding: 17px 20px;
    }

    #voucher-modal .modal-subtitle {
        display: none;
    }

    #voucher-modal .modal-body-scroll {
        padding: 16px 16px 0;
    }

    #voucher-modal .voucher-form-section {
        padding: 15px;
    }

    #voucher-modal .voucher-fields-grid,
    #voucher-modal .voucher-scope-grid,
    #voucher-modal .admin-check-grid {
        grid-template-columns: 1fr;
    }

    #voucher-modal .voucher-form-footer {
        flex-direction: column-reverse;
        margin-left: -16px;
        margin-right: -16px;
        padding: 14px 16px;
    }

    #voucher-modal .voucher-form-footer .btn {
        width: 100%;
    }
}

html[data-theme="dark"] .voucher-management .voucher-mode-pill {
    border-color: var(--border);
    background: #182235;
    color: var(--text-body);
}

html[data-theme="dark"] .voucher-management .voucher-mode-pill.is-auto,
html[data-theme="dark"] .voucher-management .voucher-display-label {
    border-color: rgba(34, 197, 94, 0.3);
    background: rgba(34, 197, 94, 0.12);
    color: #86efac;
}

html[data-theme="dark"] .voucher-management .voucher-display-label {
    background: transparent;
}

html[data-theme="dark"] .voucher-management .voucher-target-chip,
html[data-theme="dark"] #voucher-modal .voucher-section-head > span {
    border-color: rgba(139, 181, 255, 0.28);
    background: rgba(139, 181, 255, 0.12);
    color: var(--primary);
}

html[data-theme="dark"] .voucher-management .voucher-target-chip.is-all {
    border-color: var(--border);
    background: #182235;
    color: var(--text-body);
}

html[data-theme="dark"] #voucher-modal .modal-body-scroll,
html[data-theme="dark"] #voucher-modal .voucher-choice-box {
    background: #0f1728 !important;
}

html[data-theme="dark"] #voucher-modal .voucher-form-section,
html[data-theme="dark"] #voucher-modal .voucher-form-footer {
    border-color: var(--border);
    background: #121a2b;
}

html[data-theme="dark"] #voucher-modal .voucher-toggle-card {
    border-color: rgba(139, 181, 255, 0.3);
    background: rgba(139, 181, 255, 0.1);
}

html[data-theme="dark"] #voucher-modal .voucher-value-input span {
    border-color: var(--border);
}
