/* Eko Water Scanner v1.0 */
.ews { max-width: 800px; margin: 0 auto; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }

.ews-hero { text-align: center; padding: 30px 20px 20px; }
.ews-hero h2 { font-size: 28px; margin-bottom: 10px; color: #1565c0; }
.ews-hero p { font-size: 16px; color: #555; max-width: 600px; margin: 0 auto; line-height: 1.5; }

/* Upload zone */
.ews-upload { border: 2px dashed #90caf9; border-radius: 12px; padding: 30px 20px; text-align: center; background: #e3f2fd; cursor: pointer; transition: all 0.2s; margin: 0 auto 15px; max-width: 500px; }
.ews-upload:hover, .ews-upload.ews-dragging { border-color: #1565c0; background: #bbdefb; }
.ews-upload-icon { font-size: 36px; margin-bottom: 8px; }
.ews-upload-text { font-size: 15px; color: #37474f; font-weight: 500; }
.ews-upload-hint { font-size: 12px; color: #78909c; margin-top: 4px; margin-bottom: 12px; }
.ews-filename { font-size: 13px; color: #1565c0; font-weight: 600; margin-top: 8px; }

/* Buttons */
.ews-btn { display: inline-block; padding: 12px 28px; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; border: none; transition: all 0.2s; }
.ews-btn-primary { background: #1565c0; color: #fff; }
.ews-btn-primary:hover { background: #0d47a1; }
.ews-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.ews-btn-outline { background: transparent; color: #1565c0; border: 2px solid #1565c0; padding: 8px 20px; font-size: 13px; }
.ews-btn-outline:hover { background: #e3f2fd; }
#ews-scan-btn { display: block; margin: 0 auto 20px; }

/* Messages */
.ews-msg { padding: 12px 16px; border-radius: 8px; font-size: 14px; margin: 10px auto; max-width: 500px; text-align: center; }
.ews-msg-error { background: #ffebee; border: 1px solid #ef9a9a; color: #c62828; }
.ews-msg-success { background: #e8f5e9; border: 1px solid #a5d6a7; color: #2e7d32; }

/* Spinner */
.ews-spinner { text-align: center; padding: 30px; color: #1565c0; font-size: 15px; }
.ews-spinner-icon { font-size: 32px; margin-bottom: 8px; animation: ews-pulse 1.5s ease-in-out infinite; }
.ews-spinner-hint { font-size: 12px; color: #90a4ae; margin-top: 4px; }
@keyframes ews-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* Results sections */
.ews-section { background: #fff; border: 1px solid #e0e0e0; border-radius: 12px; padding: 24px; margin-bottom: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.ews-section h3 { font-size: 20px; margin: 0 0 16px; color: #263238; }

/* Table */
.ews-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ews-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ews-table th { background: #f5f5f5; padding: 10px 12px; text-align: left; font-weight: 600; font-size: 12px; text-transform: uppercase; color: #546e7a; border-bottom: 2px solid #e0e0e0; }
.ews-table td { padding: 10px 12px; border-bottom: 1px solid #f0f0f0; }
.ews-table tr:last-child td { border-bottom: none; }
.ews-right { text-align: right !important; }
.ews-center { text-align: center !important; }
.ews-val-ok { color: #2e7d32; font-weight: 700; }
.ews-val-warn { color: #e65100; font-weight: 700; }
.ews-val-danger { color: #c62828; font-weight: 700; }
.ews-dot { font-size: 18px; }
.ews-dot-ok { color: #4caf50; }
.ews-dot-warn { color: #ff9800; }
.ews-dot-danger { color: #f44336; }
.ews-norms-footer { font-size: 11px; color: #90a4ae; margin-top: 10px; text-align: center; }

/* Recommendations */
.ews-recs-list { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.ews-rec { display: flex; gap: 12px; padding: 14px; border-radius: 8px; border-left: 4px solid; }
.ews-rec-critical { background: #ffebee; border-left-color: #c62828; }
.ews-rec-required { background: #fff3e0; border-left-color: #e65100; }
.ews-rec-recommended { background: #fffde7; border-left-color: #f9a825; }
.ews-rec-num { width: 28px; height: 28px; border-radius: 50%; background: rgba(0,0,0,0.08); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.ews-rec-body { flex: 1; }
.ews-rec-type { font-weight: 600; font-size: 15px; margin-bottom: 2px; }
.ews-rec-badge { font-size: 10px; padding: 2px 8px; border-radius: 10px; font-weight: 700; vertical-align: middle; margin-left: 6px; }
.ews-rec-critical .ews-rec-badge { background: #c62828; color: #fff; }
.ews-rec-required .ews-rec-badge { background: #e65100; color: #fff; }
.ews-rec-recommended .ews-rec-badge { background: #f9a825; color: #333; }
.ews-rec-reason { font-size: 13px; color: #555; }
.ews-sequence-note { margin-top: 14px; padding: 10px 14px; background: #e8f5e9; border-radius: 6px; font-size: 13px; color: #2e7d32; }

/* Lead form */
.ews-lead-section { background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%); border-color: #90caf9; }
.ews-lead-form { margin-top: 16px; }
.ews-form-row { display: flex; gap: 12px; margin-bottom: 12px; }
.ews-input { flex: 1; padding: 12px 14px; border: 1px solid #ccc; border-radius: 8px; font-size: 14px; }
.ews-input:focus { outline: none; border-color: #1565c0; box-shadow: 0 0 0 3px rgba(21,101,192,0.1); }

/* Article */
.ews-article { max-width: 800px; margin: 40px auto; line-height: 1.7; color: #333; }
.ews-article h2 { font-size: 28px; color: #1565c0; margin-bottom: 10px; }
.ews-article h3 { font-size: 22px; color: #263238; margin-top: 36px; margin-bottom: 12px; padding-bottom: 6px; border-bottom: 2px solid #e3f2fd; }
.ews-article h4 { font-size: 17px; color: #37474f; margin-top: 20px; }
.ews-article-lead { font-size: 17px; color: #555; line-height: 1.6; margin-bottom: 24px; }
.ews-article p { margin-bottom: 14px; }
.ews-article ul, .ews-article ol { margin-bottom: 14px; padding-left: 24px; }
.ews-article li { margin-bottom: 6px; }

.ews-toc { background: #f5f5f5; border-radius: 8px; padding: 16px 20px; margin-bottom: 30px; }
.ews-toc ol { margin: 8px 0 0; padding-left: 20px; }
.ews-toc a { color: #1565c0; text-decoration: none; }
.ews-toc a:hover { text-decoration: underline; }

.ews-article-table { width: 100%; border-collapse: collapse; margin: 14px 0 20px; font-size: 14px; }
.ews-article-table th { background: #e3f2fd; padding: 10px 12px; text-align: left; font-weight: 600; }
.ews-article-table td { padding: 8px 12px; border-bottom: 1px solid #eee; }

.ews-info-box { background: #e8f5e9; border-left: 4px solid #4caf50; padding: 14px 18px; border-radius: 0 8px 8px 0; margin: 16px 0; font-size: 14px; }
.ews-warning-box { background: #fff3e0; border-left: 4px solid #ff9800; padding: 14px 18px; border-radius: 0 8px 8px 0; margin: 16px 0; font-size: 14px; }
.ews-cta-box { background: #e3f2fd; border: 2px solid #1565c0; border-radius: 8px; padding: 16px 20px; margin: 20px 0; text-align: center; font-size: 15px; }
.ews-cta-box a { color: #1565c0; font-weight: 700; }

.ews-pipeline { display: flex; align-items: flex-start; gap: 4px; overflow-x: auto; padding: 14px 0; -webkit-overflow-scrolling: touch; }
.ews-pipe-step { min-width: 80px; text-align: center; padding: 10px 6px; border-radius: 8px; background: #e8f5e9; border: 2px solid #4caf50; font-size: 12px; line-height: 1.3; }
.ews-pipe-critical { background: #ffebee; border-color: #c62828; }
.ews-pipe-num { display: inline-block; width: 20px; height: 20px; background: rgba(0,0,0,0.1); border-radius: 50%; font-size: 11px; font-weight: 700; line-height: 20px; margin-bottom: 4px; }
.ews-pipe-arrow { color: #bbb; font-size: 18px; display: flex; align-items: center; }

.ews-final-cta { text-align: center; background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%); border-radius: 12px; padding: 30px; margin-top: 40px; }
.ews-final-cta h3 { border: none; text-align: center; }

/* Mobile */
@media (max-width: 600px) {
    .ews-hero h2 { font-size: 22px; }
    .ews-hero p { font-size: 14px; }
    .ews-section { padding: 16px; }
    .ews-table { font-size: 12px; }
    .ews-table th, .ews-table td { padding: 6px 8px; }
    .ews-form-row { flex-direction: column; }
    .ews-rec { flex-direction: column; gap: 6px; }
}
