.page-content.ops-page-active {
    padding: 0;
    max-width: none;
    margin: 0;
}

.page-content.ops-page-active #page-ops {
    height: calc(100vh - var(--header-height));
    min-height: 0;
    overflow: hidden;
}

.ops-module {
    --primary: #4F6EF7;
    --primary-light: #E8EDFF;
    --primary-dark: #3A56D4;
    --success: #22C55E;
    --success-light: #DCFCE7;
    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --danger: #EF4444;
    --danger-light: #FEE2E2;
    --info: #06B6D4;
    --info-light: #CFFAFE;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    --ops-sidebar-w: 240px;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    height: 100%;
    min-height: 0;
    background: var(--gray-50);
    color: var(--gray-800);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

.ops-module * { box-sizing: border-box; }

.ops-module .ops-shell {
    display: flex;
    height: 100%;
    min-height: 0;
    background: var(--gray-50);
    overflow: hidden;
}

.ops-module .ops-sidebar {
    width: var(--ops-sidebar-w);
    flex: 0 0 var(--ops-sidebar-w);
    background: linear-gradient(180deg, #eef4ff 0%, #e5edff 100%);
    color: var(--gray-800);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border-right: 1px solid rgba(78, 115, 223, 0.18);
    box-shadow: inset -1px 0 0 rgba(255,255,255,0.65);
}

.ops-module .ops-sidebar-nav { flex: 1; min-height: 0; padding: 16px 12px; overflow-y: auto; }

.ops-module .ops-nav-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    color: #5b6f9b;
    background: transparent;
    font-size: 14px;
    font-family: inherit;
    text-align: left;
    margin-bottom: 4px;
}

.ops-module .ops-nav-item:hover { background: rgba(78,115,223,0.08); color: var(--primary-color, #4e73df); transform: translateX(4px); }
.ops-module .ops-nav-item.active { background: #fff; color: var(--primary-color, #4e73df); border-left: 4px solid var(--primary-color, #4e73df); box-shadow: 0 6px 16px rgba(78,115,223,0.12); }
.ops-module .ops-nav-item svg { width: 20px; height: 20px; flex-shrink: 0; }
.ops-module .ops-nav-item span:not(.ops-nav-badge) { flex: 1; }
.ops-module .ops-nav-badge { margin-left: auto; background: var(--danger); color: #fff; font-size: 11px; padding: 2px 7px; border-radius: 10px; font-weight: 600; }

.ops-module .ops-main { flex: 1; min-width: 0; height: 100%; overflow-y: auto; }
.ops-module .ops-content { padding: 28px 32px; }

.ops-module .ops-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; margin-bottom: 28px; }

.ops-module .ops-kpi,
.ops-module .ops-card,
.ops-module .ops-chart-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.ops-module .ops-kpi {
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ops-module .ops-kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.ops-module .ops-kpi::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--primary); }
.ops-module .ops-kpi:nth-child(2)::after { background: var(--success); }
.ops-module .ops-kpi:nth-child(3)::after { background: var(--warning); }
.ops-module .ops-kpi:nth-child(4)::after { background: var(--danger); }
.ops-module .ops-kpi:nth-child(5)::after { background: var(--info); }
.ops-module .ops-kpi span { display: block; color: var(--gray-500); font-size: 13px; font-weight: 500; }
.ops-module .ops-kpi strong { display: block; margin-top: 10px; color: var(--gray-900); font-size: 32px; font-weight: 800; line-height: 1; }

.ops-module .ops-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.ops-module .ops-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.ops-module .ops-chart-card { padding: 24px; }
.ops-module .ops-chart-card h3,
.ops-module .ops-card h3,
.ops-module .ops-modal h3 { margin: 0; }
.ops-module .ops-chart-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ops-module .ops-chart-card h3::before { content: ''; width: 4px; height: 18px; background: var(--primary); border-radius: 2px; }
.ops-module .ops-chart-wrap { position: relative; height: 280px; }
.ops-module .ops-chart-fallback { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--gray-400); }

.ops-module .ops-card { overflow: hidden; }
.ops-module .ops-card-header { padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--gray-200); flex-wrap: wrap; gap: 12px; }
.ops-module .ops-card-header p { margin: 4px 0 0; color: var(--gray-500); font-size: 13px; }
.ops-module .ops-card-actions,
.ops-module .ops-row-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.ops-module .ops-filter { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.ops-module .ops-filter > div { flex: 1; }

.ops-module .ops-filter input,
.ops-module .ops-filter select,
.ops-module .ops-field input,
.ops-module .ops-field select,
.ops-module .ops-field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 14px;
    color: var(--gray-800);
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    font-family: inherit;
}
.ops-module .ops-filter input,
.ops-module .ops-filter select { width: auto; min-width: 160px; }
.ops-module .ops-field textarea { min-height: 80px; resize: vertical; }
.ops-module .ops-field input:focus,
.ops-module .ops-field select:focus,
.ops-module .ops-field textarea:focus,
.ops-module .ops-filter input:focus,
.ops-module .ops-filter select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,110,247,0.1); }
.ops-module .ops-field input[readonly] { background: var(--gray-50); }

.ops-module .ops-table-wrap { overflow-x: auto; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.ops-module .ops-card .ops-table-wrap { border-radius: 0; box-shadow: none; }
.ops-module .ops-table { width: 100%; border-collapse: collapse; }
.ops-module .ops-table th { padding: 12px 16px; text-align: left; font-size: 12px; font-weight: 600; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--gray-200); white-space: nowrap; background: var(--gray-50); }
.ops-module .ops-table td { padding: 14px 16px; font-size: 14px; border-bottom: 1px solid var(--gray-100); color: var(--gray-700); }
.ops-module .ops-table tr:hover td { background: var(--gray-50); }
.ops-module .ops-empty { text-align: center; padding: 60px 20px; color: var(--gray-400); }
.ops-module .ops-error { color: var(--danger); padding: 20px; }
.ops-module .ops-loading { padding: 40px; color: var(--gray-500); text-align: center; }

.ops-module .ops-btn,
.ops-module .ops-pagination button,
.ops-module .ops-modal-header button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    font-family: inherit;
}
.ops-module .ops-btn.primary { background: var(--primary); color: #fff; }
.ops-module .ops-btn.primary:hover { background: var(--primary-dark); box-shadow: 0 2px 8px rgba(79,110,247,0.3); }
.ops-module .ops-btn.success { background: var(--success); color: #fff; }
.ops-module .ops-btn.danger { background: var(--danger); color: #fff; }
.ops-module .ops-btn.outline,
.ops-module .ops-pagination button { background: #fff; color: var(--gray-700); border: 1px solid var(--gray-300); }
.ops-module .ops-btn.outline:hover,
.ops-module .ops-pagination button:hover { background: var(--gray-50); border-color: var(--gray-400); }
.ops-module .ops-btn:disabled,
.ops-module .ops-pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

.ops-module .ops-badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; background: var(--gray-100); color: var(--gray-600); }
.ops-module .ops-badge.success { background: var(--success-light); color: #15803D; }
.ops-module .ops-badge.warning { background: var(--warning-light); color: #92400E; }
.ops-module .ops-badge.danger { background: var(--danger-light); color: #991B1B; }
.ops-module .ops-badge.info { background: var(--info-light); color: #0E7490; }
.ops-module .ops-badge.muted { background: var(--gray-100); color: var(--gray-600); }

.ops-module .ops-pagination { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; border-top: 1px solid var(--gray-200); color: var(--gray-500); font-size: 13px; }
.ops-module .ops-pagination div { display: flex; gap: 4px; }
.ops-module .ops-pagination button { width: 32px; height: 32px; padding: 0; border-radius: 6px; font-size: 13px; }
.ops-module .ops-pagination button.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.ops-module .ops-reminder { border-radius: var(--radius); padding: 16px 20px; margin-bottom: 20px; display: flex; align-items: center; gap: 12px; font-size: 14px; }
.ops-module .ops-reminder.danger { background: var(--danger-light); border: 1px solid #FECACA; color: var(--gray-800); }
.ops-module .ops-reminder.warning { background: var(--warning-light); border: 1px solid #FDE68A; color: var(--gray-800); }
.ops-module .ops-reminder.success { background: var(--success-light); border: 1px solid #BBF7D0; color: var(--gray-800); }

.ops-module .ops-modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 2000; display: flex; align-items: center; justify-content: center; animation: opsFadeIn 0.2s; }
.ops-module .ops-modal { background: #fff; border-radius: 16px; width: 90%; max-width: 720px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); animation: opsSlideUp 0.3s; }
.ops-module .ops-modal.large { max-width: 900px; }
.ops-module .ops-modal-header { padding: 24px 28px 0; display: flex; align-items: center; justify-content: space-between; }
.ops-module .ops-modal-header h3 { font-size: 20px; font-weight: 700; color: var(--gray-900); }
.ops-module .ops-modal-header button { width: 36px; height: 36px; border-radius: 8px; border: none; background: var(--gray-100); cursor: pointer; font-size: 18px; color: var(--gray-500); padding: 0; }
.ops-module .ops-modal-header button:hover { background: var(--gray-200); }
.ops-module .ops-modal-body { padding: 24px 28px; }
.ops-module .ops-modal-footer { padding: 0 28px 24px; display: flex; justify-content: flex-end; gap: 10px; }

@keyframes opsFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes opsSlideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.ops-module .ops-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ops-module .ops-field { display: block; margin-bottom: 18px; font-size: 13px; font-weight: 600; color: var(--gray-700); }
.ops-module .ops-field span { display: block; margin-bottom: 6px; }
.ops-module .ops-field.full { grid-column: 1 / -1; }
.ops-module .checkbox-group { display: flex; flex-wrap: wrap; gap: 8px; }
.ops-module .checkbox-item { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--gray-300); border-radius: 8px; cursor: pointer; transition: all 0.2s; font-size: 13px; }
.ops-module .checkbox-item:hover { border-color: var(--primary); }
.ops-module .checkbox-item.checked { background: var(--primary-light); border-color: var(--primary); color: var(--primary-dark); }
.ops-module .checkbox-item input { display: none; }

.ops-module .ops-file-box { border: 2px dashed var(--gray-300); border-radius: 10px; padding: 18px; background: #fff; }
.ops-module .ops-file-box input { padding: 0; border: 0; }
.ops-module .ops-preview,
.ops-module .ops-persisted-previews { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.ops-module .ops-preview-item,
.ops-module .ops-persisted-preview { position: relative; width: 100px; border-radius: 8px; overflow: hidden; border: 1px solid var(--gray-200); background: #fff; color: var(--gray-600); font-size: 12px; }
.ops-module .ops-preview-item img,
.ops-module .ops-preview-item video,
.ops-module .ops-persisted-preview img,
.ops-module .ops-persisted-preview video { width: 100%; height: 80px; object-fit: cover; display: block; background: #111827; }
.ops-module .ops-preview-item span,
.ops-module .ops-persisted-preview span { display: block; padding: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ops-module .ops-attachment-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.ops-module .ops-link-button { border: 0; background: transparent; padding: 0; color: var(--primary); cursor: pointer; text-align: left; font: inherit; }
.ops-module .ops-link-button:hover { text-decoration: underline; }
.ops-module .ops-attachment-downloads { margin-top: 12px; }

.ops-module .ops-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.ops-module .ops-detail-section { margin-bottom: 16px; padding: 12px; background: var(--gray-50); border-radius: 8px; }
.ops-module .ops-detail-section p { margin: 6px 0 0; }
.ops-module .ops-muted { color: var(--gray-500); font-size: 13px; }

.ops-module .ops-report { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 32px; }
.ops-module .ops-report h2 { text-align: center; font-size: 22px; margin-bottom: 8px; }
.ops-module .ops-report h3 { font-size: 16px; font-weight: 700; margin: 24px 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--primary); display: inline-block; }
.ops-module .ops-report > p { text-align: center; color: var(--gray-500); font-size: 13px; margin-bottom: 24px; }
.ops-module .ops-report-summary { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 16px; }
.ops-module .ops-report-summary div { background: var(--primary-light); padding: 16px; border-radius: 10px; text-align: center; }
.ops-module .ops-report-summary strong { display: block; font-size: 28px; font-weight: 800; color: var(--primary); }
.ops-module .ops-report-summary span { font-size: 13px; color: var(--gray-600); }
.ops-module .ops-report-chart { height: 260px; margin: 10px 0 18px; }

@media (max-width: 1200px) {
    .ops-module .ops-kpis { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
    .ops-module .ops-shell { flex-direction: column; }
    .ops-module .ops-sidebar { width: 100%; flex-basis: auto; }
    .ops-module .ops-sidebar-nav { display: flex; overflow-x: auto; padding: 12px; }
    .ops-module .ops-nav-item { flex: 0 0 auto; width: auto; }
    .ops-module .ops-content { padding: 20px; }
    .ops-module .ops-charts,
    .ops-module .ops-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .ops-module .ops-kpis { grid-template-columns: repeat(2, 1fr); }
    .ops-module .ops-form-grid,
    .ops-module .ops-detail-grid,
    .ops-module .ops-report-summary { grid-template-columns: 1fr; }
    .ops-module .ops-filter input,
    .ops-module .ops-filter select,
    .ops-module .ops-filter .ops-btn { width: 100%; }
}

@media print {
    .ops-module .ops-sidebar,
    .ops-module .ops-card-actions,
    .ops-module .ops-btn,
    .ops-module .ops-filter { display: none !important; }
    .ops-module .ops-shell { display: block; }
    .ops-module .ops-content { padding: 0; }
    .ops-module .ops-modal-backdrop { position: static; display: block; padding: 0; background: #fff; }
    .ops-module .ops-modal { width: auto; max-height: none; box-shadow: none; overflow: visible; }
    .ops-module .ops-modal-header,
    .ops-module .ops-modal-footer { display: none !important; }
}
