/* ============================================
   餐饮油烟清洗平台 - 管理后台 Admin CSS
   ============================================ */
:root {
  --sidebar-width: 240px;
  --topbar-height: 56px;
  --sidebar-bg: #0f172a;
  --sidebar-hover: #1e293b;
  --sidebar-active: #1d4ed8;
  --sidebar-text: #94a3b8;
  --sidebar-text-active: #ffffff;
  --primary: #2563eb;
  --primary-light: #3b82f6;
  --danger: #ef4444;
  --danger-light: #fef2f2;
  --success: #10b981;
  --success-light: #ecfdf5;
  --warning: #f59e0b;
  --warning-light: #fffbeb;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --card-shadow: 0 1px 3px 0 rgba(0,0,0,0.06), 0 1px 2px -1px rgba(0,0,0,0.06);
  --card-radius: 12px;
  --transition: all 0.2s ease;
}
* { margin:0; padding:0; box-sizing:border-box; }
body { font-family: 'Inter','Microsoft YaHei',-apple-system,BlinkMacSystemFont,sans-serif; background: var(--gray-100); color: var(--gray-700); overflow: hidden; height: 100vh; }

/* ========== LAYOUT ========== */
.app-layout { display: flex; height: 100vh; overflow: hidden; }

/* ========== SIDEBAR ========== */
.sidebar { width: var(--sidebar-width); min-width: var(--sidebar-width); background: var(--sidebar-bg); color: var(--sidebar-text); display: flex; flex-direction: column; height: 100vh; overflow: hidden; user-select: none; }
.sidebar-logo { height: 56px; display: flex; align-items: center; padding: 0 20px; border-bottom: 1px solid rgba(255,255,255,0.06); flex-shrink: 0; }
.sidebar-logo .logo-icon { width: 32px; height: 32px; background: linear-gradient(135deg,#2563eb,#1d4ed8); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 16px; font-weight: 700; margin-right: 10px; }
.sidebar-logo .logo-text { font-size: 15px; font-weight: 600; color: #f1f5f9; letter-spacing: 0.5px; }
.sidebar-menu { flex: 1; overflow-y: auto; padding: 8px 0; }
.sidebar-menu::-webkit-scrollbar { width: 4px; }
.sidebar-menu::-webkit-scrollbar-track { background: transparent; }
.sidebar-menu::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }
.menu-group + .menu-group { margin-top: 4px; }
.menu-group-label { padding: 12px 20px 6px; font-size: 11px; font-weight: 600; color: rgba(148,163,184,0.5); text-transform: uppercase; letter-spacing: 0.8px; }
.menu-item { display: flex; align-items: center; padding: 9px 20px; margin: 1px 8px; border-radius: 8px; cursor: pointer; transition: var(--transition); font-size: 13.5px; color: var(--sidebar-text); text-decoration: none; gap: 10px; position: relative; }
.menu-item:hover { background: var(--sidebar-hover); color: #e2e8f0; }
.menu-item.active { background: var(--sidebar-active); color: var(--sidebar-text-active); font-weight: 500; }
.menu-item .menu-icon { width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 16px; }
.menu-item .menu-text { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-item .menu-arrow { font-size: 12px; opacity: 0.5; transition: transform 0.2s ease; }
.menu-item .menu-arrow.open { transform: rotate(180deg); }
.submenu { overflow: hidden; max-height: 0; transition: max-height 0.3s ease; }
.submenu.open { max-height: 500px; }
.submenu .menu-item { padding-left: 48px; font-size: 13px; }

/* ========== MAIN CONTENT ========== */
.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }

/* ========== TOPBAR ========== */
.topbar { height: var(--topbar-height); min-height: var(--topbar-height); background: #fff; border-bottom: 1px solid var(--gray-200); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; flex-shrink: 0; }
.topbar-left { display: flex; align-items: center; gap: 12px; }
.breadcrumb { font-size: 15px; color: var(--gray-500); }
.breadcrumb-current { font-weight: 600; color: var(--gray-800); }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.notification-btn { position: relative; width: 36px; height: 36px; border-radius: 8px; border: none; background: var(--gray-50); cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--gray-500); transition: var(--transition); }
.notification-btn:hover { background: var(--gray-100); color: var(--gray-700); }
.notification-dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; background: var(--danger); border-radius: 50%; border: 2px solid #fff; }
.admin-avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg,#2563eb,#1d4ed8); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; cursor: pointer; }

/* ========== PAGE BODY ========== */
.page-body { flex: 1; overflow-y: auto; padding: 20px 24px 32px; }
.page-body::-webkit-scrollbar { width: 6px; }
.page-body::-webkit-scrollbar-track { background: transparent; }
.page-body::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
.page-section { display: none; }
.page-section.active { display: block; }

/* ========== CARDS ========== */
.card { background: #fff; border-radius: var(--card-radius); box-shadow: var(--card-shadow); border: 1px solid var(--gray-200); }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--gray-100); display: flex; align-items: center; justify-content: space-between; }
.card-title { font-size: 15px; font-weight: 600; color: var(--gray-800); }
.card-body { padding: 20px; }
.card-footer { padding: 14px 20px; border-top: 1px solid var(--gray-100); display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.card + .card { margin-top: 16px; }

/* ========== STAT CARDS ========== */
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 20px; }
.stat-card { background: #fff; border-radius: var(--card-radius); box-shadow: var(--card-shadow); border: 1px solid var(--gray-200); padding: 20px; display: flex; align-items: flex-start; justify-content: space-between; transition: var(--transition); }
.stat-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); transform: translateY(-1px); }
.stat-card-info { flex: 1; }
.stat-card-label { font-size: 13px; color: var(--gray-500); margin-bottom: 6px; }
.stat-card-value { font-size: 26px; font-weight: 700; color: var(--gray-800); line-height: 1.2; }
.stat-card-change { font-size: 12px; margin-top: 4px; }
.stat-card-change.up { color: var(--success); }
.stat-card-change.down { color: var(--danger); }
.stat-card-icon { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.stat-card-icon.blue { background: #eff6ff; color: var(--primary); }
.stat-card-icon.green { background: var(--success-light); color: var(--success); }
.stat-card-icon.orange { background: var(--warning-light); color: var(--warning); }
.stat-card-icon.red { background: var(--danger-light); color: var(--danger); }

/* ========== CHARTS ========== */
.charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.chart-container { width: 100%; height: 320px; }
.charts-grid .card { display: flex; flex-direction: column; height: 100%; margin-top: 0; }
.charts-grid .card + .card { margin-top: 0; }
.charts-grid .card .card-body { flex: 1; }

/* ========== BUTTONS ========== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 16px; font-size: 13.5px; font-weight: 500; line-height: 1.4; border-radius: 8px; border: 1px solid transparent; cursor: pointer; transition: all 0.2s ease; white-space: nowrap; user-select: none; font-family: inherit; text-decoration: none; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: #1d4ed8; }
.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-success:hover { background: #059669; }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #dc2626; }
.btn-warning { background: var(--warning); color: #fff; border-color: var(--warning); }
.btn-outline { background: transparent; color: var(--gray-700); border-color: var(--gray-300); }
.btn-outline:hover { background: var(--gray-50); border-color: var(--gray-400); }
.btn-outline-primary { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: #eff6ff; }
.btn-outline-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-outline-danger:hover { background: var(--danger-light); }
.btn-ghost { background: transparent; color: var(--gray-600); border-color: transparent; }
.btn-ghost:hover { background: var(--gray-100); color: var(--gray-800); }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 6px; }
.btn-lg { padding: 10px 24px; font-size: 15px; border-radius: 10px; }
.btn-icon { width: 36px; height: 36px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; }
.btn-icon.btn-sm { width: 30px; height: 30px; border-radius: 6px; }

/* ========== FORMS ========== */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 500; color: var(--gray-700); margin-bottom: 6px; }
.form-label .required { color: var(--danger); margin-left: 2px; }
.form-input, .form-select, .form-textarea { width: 100%; padding: 8px 12px; font-size: 13.5px; font-family: inherit; color: var(--gray-700); background: #fff; border: 1px solid var(--gray-300); border-radius: 8px; transition: all 0.2s ease; outline: none; line-height: 1.5; }
.form-input::placeholder, .form-textarea::placeholder { color: var(--gray-400); }
.form-input:hover, .form-select:hover, .form-textarea:hover { border-color: var(--gray-400); }
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' 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-position: right 10px center; padding-right: 32px; }
.form-textarea { min-height: 80px; resize: vertical; }
.form-hint { font-size: 12px; color: var(--gray-400); margin-top: 4px; }
.form-switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.form-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch-track { width: 40px; height: 22px; background: var(--gray-300); border-radius: 11px; transition: all 0.2s ease; position: relative; flex-shrink: 0; }
.switch-track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; background: #fff; border-radius: 50%; transition: all 0.2s ease; box-shadow: 0 1px 3px rgba(0,0,0,0.15); }
.form-switch input:checked + .switch-track { background: var(--primary); }
.form-switch input:checked + .switch-track::after { left: 21px; }
.checkbox-wrapper { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 0; font-size: 13.5px; color: var(--gray-700); }
.checkbox-wrapper input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; flex-shrink: 0; }
.form-inline { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.form-inline .form-group { margin-bottom: 0; }

/* ========== DATA TABLE ========== */
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table th { padding: 10px 14px; text-align: left; font-weight: 600; font-size: 12px; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 2px solid var(--gray-200); white-space: nowrap; }
.data-table td { padding: 11px 14px; border-bottom: 1px solid var(--gray-100); color: var(--gray-700); }
.data-table tbody tr { transition: background 0.15s ease; }
.data-table tbody tr:hover { background: var(--gray-50); }
.data-table .text-right { text-align: right; }
.data-table .text-center { text-align: center; }
.table-actions { display: flex; align-items: center; gap: 4px; }

/* ========== BADGES ========== */
.badge { display: inline-flex; align-items: center; padding: 2px 8px; font-size: 11px; font-weight: 500; line-height: 1.5; border-radius: 10px; white-space: nowrap; }
.badge-primary { background: #eff6ff; color: var(--primary); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: #d97706; }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-info { background: #f0f9ff; color: #0284c7; }
.badge-outline { background: transparent; border: 1px solid var(--gray-300); color: var(--gray-500); }

/* ========== TABS ========== */
.tabs { display: inline-flex; gap: 2px; padding: 4px; background: var(--gray-100); border-radius: 10px; margin-bottom: 20px; }
.tab-item, .tab-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 20px; font-size: 13.5px; font-weight: 500; color: var(--gray-500); cursor: pointer; border: none; border-radius: 8px; transition: all 0.2s ease; user-select: none; background: transparent; font-family: inherit; white-space: nowrap; }
.tab-item:hover, .tab-btn:hover { color: var(--gray-700); background: rgba(255,255,255,0.7); }
.tab-item.active, .tab-btn.active { color: #fff; background: var(--primary); font-weight: 600; box-shadow: 0 1px 3px rgba(37,99,235,0.3); }
.tab-item .tab-icon, .tab-btn .tab-icon { font-size: 15px; line-height: 1; }
.tab-content { padding: 20px 0; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ========== PAGINATION ========== */
.pagination { display: flex; align-items: center; gap: 4px; }
.page-item { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 8px; font-size: 13px; font-weight: 500; color: var(--gray-600); border-radius: 6px; cursor: pointer; transition: all 0.15s ease; user-select: none; border: 1px solid transparent; }
.page-item:hover { background: var(--gray-100); color: var(--gray-800); }
.page-item.active { background: var(--primary); color: #fff; }
.page-item.disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

/* ========== MODAL ========== */
.modal-overlay { position: fixed; inset: 0; background: rgba(15,23,42,0.5); display: flex; align-items: center; justify-content: center; z-index: 1000; opacity: 0; pointer-events: none; transition: opacity 0.2s ease; }
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal { background: #fff; border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,0.15); width: 520px; max-width: 90vw; max-height: 85vh; display: flex; flex-direction: column; transform: scale(0.95); transition: transform 0.2s ease; }
.modal-overlay.open .modal { transform: scale(1); }
.modal-sm { width: 400px; }
.modal-lg { width: 720px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px 14px; border-bottom: 1px solid var(--gray-100); }
.modal-title { font-size: 16px; font-weight: 600; color: var(--gray-800); }
.modal-close { width: 28px; height: 28px; border: none; background: var(--gray-50); border-radius: 6px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--gray-500); transition: all 0.15s ease; }
.modal-close:hover { background: var(--gray-200); color: var(--gray-700); }
.modal-body { padding: 20px 24px; overflow-y: auto; font-size: 13.5px; color: var(--gray-600); line-height: 1.6; flex: 1; }
.modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 24px 18px; border-top: 1px solid var(--gray-100); }

/* ========== TOAST ========== */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: #fff; border-radius: 10px; box-shadow: 0 4px 20px rgba(0,0,0,0.12); border: 1px solid var(--gray-200); font-size: 13.5px; min-width: 300px; pointer-events: auto; animation: toastIn 0.3s ease; }
@keyframes toastIn { from { opacity:0; transform:translateX(40px); } to { opacity:1; transform:translateX(0); } }
.toast-success { border-left: 3px solid var(--success); }
.toast-error { border-left: 3px solid var(--danger); }
.toast-warning { border-left: 3px solid var(--warning); }
.toast-info { border-left: 3px solid var(--primary); }

/* ========== EMPTY STATE ========== */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 24px; text-align: center; }
.empty-state-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--gray-50); display: flex; align-items: center; justify-content: center; color: var(--gray-300); margin-bottom: 16px; }
.empty-state-title { font-size: 15px; font-weight: 600; color: var(--gray-600); margin-bottom: 6px; }
.empty-state-text { font-size: 13px; color: var(--gray-400); max-width: 280px; line-height: 1.5; }

/* ========== PROGRESS BAR ========== */
.progress-bar { width: 100%; height: 8px; background: var(--gray-100); border-radius: 4px; overflow: hidden; }
.progress-value { height: 100%; border-radius: 4px; background: var(--primary); transition: width 0.4s ease; }
.progress-value.success { background: var(--success); }
.progress-value.warning { background: var(--warning); }
.progress-value.danger { background: var(--danger); }

/* ========== DIVIDER ========== */
.divider { border: none; height: 1px; background: var(--gray-200); margin: 24px 0; }

/* ========== TOOLBAR ========== */
.toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.toolbar-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.toolbar-right { display: flex; align-items: center; gap: 8px; }

/* ========== PAGE HEADER ========== */
.page-header { margin-bottom: 20px; }
.page-header h1 { font-size: 20px; font-weight: 700; color: var(--gray-800); margin-bottom: 4px; }
.page-header p { font-size: 13px; color: var(--gray-400); }

/* ========== DETAIL SECTION ========== */
.detail-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
.detail-grid.col-3 { grid-template-columns: repeat(3,1fr); }
.detail-item { }
.detail-item-label { font-size: 12px; color: var(--gray-400); margin-bottom: 2px; }
.detail-item-value { font-size: 14px; font-weight: 500; color: var(--gray-800); }

/* ========== TIMELINE ========== */
.timeline { position: relative; padding-left: 24px; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 4px; bottom: 4px; width: 2px; background: var(--gray-200); }
.timeline-item { position: relative; padding-bottom: 20px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot { position: absolute; left: -20px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--primary); }
.timeline-dot.green { background: var(--success); box-shadow: 0 0 0 2px var(--success); }
.timeline-dot.orange { background: var(--warning); box-shadow: 0 0 0 2px var(--warning); }
.timeline-dot.gray { background: var(--gray-400); box-shadow: 0 0 0 2px var(--gray-400); }
.timeline-title { font-size: 13.5px; font-weight: 600; color: var(--gray-800); }
.timeline-time { font-size: 11px; color: var(--gray-400); margin-top: 2px; }
.timeline-desc { font-size: 12px; color: var(--gray-500); margin-top: 2px; }

/* ========== COMPARISON IMAGES ========== */
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.compare-item { border-radius: 10px; overflow: hidden; border: 1px solid var(--gray-200); }
.compare-item-header { padding: 8px 12px; font-size: 12px; font-weight: 600; text-align: center; }
.compare-item-header.before { background: #fef2f2; color: var(--danger); }
.compare-item-header.after { background: #ecfdf5; color: var(--success); }
.compare-item img { width: 100%; height: 180px; object-fit: cover; display: block; }

/* ========== FILTER BAR ========== */
.filter-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; background: var(--gray-50); border-radius: 10px; margin-bottom: 16px; }
.filter-bar .form-group { margin-bottom: 0; }
.filter-bar .form-input, .filter-bar .form-select { width: auto; min-width: 140px; }

/* ========== ALERT ITEM ========== */
.alert-item { display: flex; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--gray-100); gap: 12px; transition: background 0.15s ease; border-radius: 6px; margin: 0 -4px; padding-left: 4px; padding-right: 4px; }
.alert-item[style*="cursor:pointer"]:hover { background: var(--gray-50); }
.alert-item:last-child { border-bottom: none; }
.alert-icon { width: 28px; height: 28px; border-radius: 6px; background: var(--danger-light); color: var(--danger); display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.alert-text { flex: 1; font-size: 13.5px; color: var(--gray-700); }
.alert-badge { font-size: 11px; padding: 2px 8px; border-radius: 10px; background: var(--danger-light); color: var(--danger); font-weight: 500; flex-shrink: 0; }

/* ========== QUICK ACTIONS ========== */
.quick-actions { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 20px; }
.quick-action { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: #fff; border-radius: 10px; border: 1px solid var(--gray-200); cursor: pointer; transition: all 0.2s ease; }
.quick-action:hover { border-color: var(--primary); box-shadow: 0 2px 8px rgba(37,99,235,0.1); }
.quick-action-icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.quick-action-text { font-size: 13px; font-weight: 500; color: var(--gray-700); }

/* ========== RESPONSIVE ========== */
@media (max-width:1200px) { .stats-grid { grid-template-columns: repeat(2,1fr); } .charts-grid { grid-template-columns: 1fr; } .quick-actions { grid-template-columns: repeat(2,1fr); } }
@media (max-width:768px) { .sidebar { display: none; } .stats-grid { grid-template-columns: 1fr; } .detail-grid { grid-template-columns: 1fr; } }

/* ========== ACTIVITY ITEMS ========== */
.activity-item { display: flex; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--gray-100); }
.activity-item:last-child { border-bottom: none; }
.activity-dot-wrap { padding: 4px 12px 0 0; flex-shrink: 0; }
.activity-dot { width: 8px; height: 8px; border-radius: 50%; display: block; }
.activity-dot.gray { background: var(--gray-400); }
.activity-dot.blue { background: var(--primary); }
.activity-dot.green { background: var(--success); }
.activity-dot.orange { background: var(--warning); }
.activity-dot.purple { background: #8b5cf6; }
.activity-dot.red { background: var(--danger); }
.activity-content { flex: 1; min-width: 0; }
.activity-text { font-size: 13px; color: var(--gray-700); line-height: 1.5; }
.activity-text strong { color: var(--gray-800); }
.activity-time { font-size: 11px; color: var(--gray-400); margin-top: 2px; }

/* ========== EMBEDDED TABLE IN MODAL ========== */
.modal-body .data-table td { padding: 8px 10px; }
.modal-body .data-table th { padding: 8px 10px; }

/* ========== COMMISSION RATE TOOLTIP ========== */
.rate-tooltip-wrap {
  position: relative;
  display: inline-block;
  cursor: pointer;
}
.rate-tooltip-trigger {
  display: inline-block;
  padding: 2px 10px;
  background: var(--primary-light);
  color: #fff;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  border-bottom: 2px dotted rgba(255,255,255,0.6);
  transition: background 0.2s;
}
.rate-tooltip-trigger:hover { background: var(--primary); }
.rate-tooltip-trigger.no-rates {
  background: var(--gray-100);
  color: var(--gray-400);
  border-bottom: none;
  cursor: default;
}
.rate-tooltip-trigger.no-rates:hover { background: var(--gray-100); }
.rate-tooltip-box {
  display: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 100%;
  margin-top: 6px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  padding: 8px 12px;
  min-width: 180px;
  z-index: 999;
  white-space: nowrap;
}
.rate-tooltip-box::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid #fff;
}
.rate-tooltip-wrap:hover .rate-tooltip-box {
  display: block;
}
.rate-tooltip-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--gray-100);
  gap: 20px;
}
.rate-tooltip-row:last-child { border-bottom: none; }
.rate-tooltip-row .proj-name { color: var(--gray-600); }
.rate-tooltip-row .proj-rate { color: var(--primary); font-weight: 600; }

/* ========== ACCEPTANCE DEMO ========== */
.acceptance-page-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.acceptance-header-actions, .acceptance-action-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.acceptance-notice { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 20px; padding: 12px 14px; border: 1px solid #bfdbfe; border-radius: 10px; background: #eff6ff; color: #1e40af; font-size: 13px; line-height: 1.6; }
.acceptance-notice > svg { width: 18px; height: 18px; margin-top: 1px; flex-shrink: 0; }
.acceptance-notice strong { display: block; color: #1e3a8a; }
.acceptance-notice-danger { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
.acceptance-notice-danger strong { color: #991b1b; }
.acceptance-section-title { margin: 22px 0 10px; color: var(--gray-700); font-size: 14px; font-weight: 700; }
.acceptance-identity-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.acceptance-identity-card { display: flex; align-items: flex-start; gap: 12px; padding: 18px; }
.acceptance-identity-card + .acceptance-identity-card, .acceptance-artifact-card + .acceptance-artifact-card { margin-top: 0; }
.acceptance-role-icon { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--primary); background: #eff6ff; }
.acceptance-role-icon svg { width: 20px; height: 20px; }
.acceptance-identity-main { flex: 1; min-width: 0; }
.acceptance-identity-title { color: var(--gray-500); font-size: 12px; }
.acceptance-identity-name { margin: 2px 0 5px; color: var(--gray-800); font-size: 15px; font-weight: 700; }
.acceptance-identity-main code { display: block; overflow: hidden; color: var(--gray-500); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.acceptance-identity-hint { margin-top: 8px; color: var(--gray-500); font-size: 12px; line-height: 1.5; }
.acceptance-work-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(340px, .65fr); gap: 16px; margin-top: 18px; align-items: start; }
.acceptance-work-grid .card { margin-top: 0; }
.acceptance-next-title { color: var(--gray-800); font-size: 20px; font-weight: 700; }
.acceptance-next-description { margin: 8px 0 18px; color: var(--gray-600); font-size: 13px; line-height: 1.7; }
.acceptance-order-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-bottom: 18px; overflow: hidden; border: 1px solid var(--gray-200); border-radius: 8px; background: var(--gray-200); }
.acceptance-order-summary > div { padding: 10px 12px; background: #fff; }
.acceptance-order-summary span { display: block; margin-bottom: 3px; color: var(--gray-400); font-size: 11px; }
.acceptance-order-summary strong { color: var(--gray-700); font-size: 13px; }
.acceptance-switch-tip { color: var(--gray-500); font-size: 12px; line-height: 1.6; }
.acceptance-progress-card .card-body { padding-top: 16px; }
.acceptance-step-list { margin-top: 16px; }
.acceptance-step { display: flex; align-items: center; gap: 10px; min-height: 36px; color: var(--gray-400); }
.acceptance-step-dot { width: 23px; height: 23px; border: 1px solid var(--gray-300); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: #fff; font-size: 10px; font-weight: 700; }
.acceptance-step > div { display: flex; flex: 1; align-items: center; justify-content: space-between; gap: 10px; }
.acceptance-step strong { font-size: 12px; font-weight: 500; }
.acceptance-step span:last-child { font-size: 10px; }
.acceptance-step.completed { color: var(--success); }
.acceptance-step.completed .acceptance-step-dot { border-color: var(--success); background: var(--success); color: #fff; }
.acceptance-step.current { color: var(--primary); }
.acceptance-step.current .acceptance-step-dot { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); color: var(--primary); }
.acceptance-artifact-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.acceptance-artifact-card { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 14px; }
.acceptance-artifact-card > svg { width: 21px; height: 21px; flex-shrink: 0; color: var(--gray-400); }
.acceptance-artifact-card.ready > svg { color: var(--success); }
.acceptance-artifact-card > div { flex: 1; min-width: 0; }
.acceptance-artifact-card strong, .acceptance-artifact-card span { display: block; }
.acceptance-artifact-card strong { color: var(--gray-700); font-size: 12px; }
.acceptance-artifact-card > div span { overflow: hidden; margin-top: 2px; color: var(--gray-400); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 1200px) {
  .acceptance-artifact-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .acceptance-identity-grid, .acceptance-work-grid { grid-template-columns: 1fr; }
  .acceptance-artifact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .acceptance-page-header { align-items: flex-start; flex-direction: column; }
  .acceptance-artifact-grid, .acceptance-order-summary { grid-template-columns: 1fr; }
}
