* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', system-ui, sans-serif; background: #f0f2f5; color: #1a1a2e; }

/* Header */
.header { background: linear-gradient(135deg, #232f3e 0%, #37475a 100%); color: white; padding: 16px 32px; display: flex; justify-content: space-between; align-items: center; }
.header h1 { font-size: 20px; font-weight: 600; }
.header-subtitle { font-size: 12px; opacity: 0.7; }
.config-btn { background: #ff9900; color: #232f3e; border: none; padding: 10px 20px; border-radius: 6px; font-weight: 600; cursor: pointer; font-size: 14px; }
.config-btn:hover { background: #ffad33; }

/* Config Panel */
.config-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 100; }
.config-overlay.active { display: flex; justify-content: center; align-items: flex-start; padding-top: 40px; }
.config-panel { background: white; width: 600px; max-height: 85vh; border-radius: 12px; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.config-header { background: #232f3e; color: white; padding: 20px 24px; display: flex; justify-content: space-between; align-items: center; border-radius: 12px 12px 0 0; }
.config-header h2 { font-size: 18px; }
.config-close { background: none; border: none; color: white; font-size: 24px; cursor: pointer; }
.config-body { padding: 24px; }
.csv-upload-section { margin-bottom: 24px; border: 1px solid #e0e0e0; border-radius: 8px; overflow: hidden; }
.csv-upload-header { background: #f8f9fa; padding: 12px 16px; font-weight: 600; font-size: 14px; border-bottom: 1px solid #e0e0e0; display: flex; justify-content: space-between; align-items: center; }
.csv-upload-header .source-tag { font-size: 11px; background: #e3f2fd; color: #1565c0; padding: 2px 8px; border-radius: 10px; }
.csv-upload-header .source-tag.manual { background: #fff3e0; color: #e65100; }
.csv-upload-body { padding: 16px; }
.upload-zone { border: 2px dashed #ccc; border-radius: 8px; padding: 24px; text-align: center; cursor: pointer; transition: all 0.2s; }
.upload-zone:hover, .upload-zone.dragover { border-color: #ff9900; background: #fff8ee; }
.upload-zone.loaded { border-color: #4caf50; background: #f1f8e9; }
.upload-zone p { font-size: 13px; color: #666; margin-top: 4px; }
.upload-zone .icon { font-size: 28px; }
.upload-zone .filename { font-weight: 600; color: #2e7d32; }
.column-select { margin-top: 12px; }
.column-select label { font-size: 12px; font-weight: 600; color: #555; display: block; margin-bottom: 4px; }
.column-select select { width: 100%; padding: 8px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; }
.apply-btn { background: #ff9900; color: #232f3e; border: none; padding: 12px 32px; border-radius: 6px; font-weight: 600; cursor: pointer; font-size: 15px; width: 100%; margin-top: 8px; }
.apply-btn:hover { background: #ffad33; }

/* Main Content */
.main { max-width: 1400px; margin: 0 auto; padding: 24px; }

/* Section Cards */
.section-card { background: white; border-radius: 10px; margin-bottom: 20px; box-shadow: 0 1px 4px rgba(0,0,0,0.08); overflow: hidden; }
.section-title { padding: 14px 20px; font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.section-title .dot { width: 10px; height: 10px; border-radius: 50%; }

/* Color themes per section */
.section-attendance .section-title { background: #e8f0fe; color: #1a56db; }
.section-attendance .dot { background: #1a56db; }
.section-engage .section-title { background: #fef3e2; color: #b45309; }
.section-engage .dot { background: #ff9900; }
.section-violations .section-title { background: #fde8e8; color: #c81e1e; }
.section-violations .dot { background: #e53e3e; }
.section-myvoice .section-title { background: #e8f5e9; color: #2e7d32; }
.section-myvoice .dot { background: #4caf50; }
.section-thrive .section-title { background: #f3e8ff; color: #7c3aed; }
.section-thrive .dot { background: #7c3aed; }

.section-body { padding: 16px 20px; }

/* Summary Banner */
.summary-banner { background: #f8f9fa; border-radius: 8px; padding: 14px 18px; margin-bottom: 16px; font-size: 14px; line-height: 1.6; border-left: 4px solid #1a56db; }
.summary-banner span { font-weight: 700; }

/* Tables */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { background: #f1f3f5; padding: 10px 12px; text-align: left; font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: #555; border-bottom: 2px solid #dee2e6; }
.data-table td { padding: 10px 12px; border-bottom: 1px solid #eee; color: #1a1a2e; }
.data-table tr:hover { background: #f8f9fa; }
.data-table td.site { font-weight: 700; }
.data-table td.positive { color: #2e7d32; }
.data-table td.negative { color: #c62828; }
.data-table td.warning { color: #e65100; background: #fff3e0; }
.data-table td.empty { color: #1a1a2e; }

/* Side by side layout */
.side-by-side { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.side-by-side .sub-section h4 { font-size: 13px; font-weight: 600; color: #555; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.5px; }

/* Threshold badges */
.threshold-note { font-size: 12px; color: #888; font-style: italic; margin-bottom: 12px; }

/* Day-of-week bar */
.dow-bar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 20px; }
.dow-card { background: white; border-radius: 8px; padding: 12px; text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.dow-card .day { font-size: 11px; font-weight: 700; text-transform: uppercase; color: #888; margin-bottom: 4px; }
.dow-card .task { font-size: 12px; color: #333; }

/* Editable cells */
.data-table td[contenteditable="true"] { background: #fffde7; cursor: text; }
.data-table td[contenteditable="true"]:focus { outline: 2px solid #ff9900; background: #fff; }

@media (max-width: 900px) {
  .side-by-side { grid-template-columns: 1fr; }
  .dow-bar { grid-template-columns: repeat(3, 1fr); }
}
