/* Ecohomes Complaints & Warranty */

.eh-complaint-form { background: var(--eh-white); border-radius: var(--eh-radius); box-shadow: var(--eh-shadow); padding: 24px; margin-bottom: 24px; }
.eh-complaint-form h3 { margin: 0 0 16px; font-size: 1rem; color: var(--eh-gray-800); }
.eh-complaint-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.eh-complaint-grid .full { grid-column: 1 / -1; }
.eh-complaint-label { display: block; font-size: .8rem; font-weight: 600; color: var(--eh-gray-500); text-transform: uppercase; margin-bottom: 6px; }
.eh-complaint-input { width: 100%; padding: 8px 12px; border: 1px solid var(--eh-gray-200); border-radius: 6px; font-size: .875rem; }
.eh-complaint-input:focus { outline: none; border-color: var(--eh-green); }
textarea.eh-complaint-input { min-height: 90px; resize: vertical; }

/* Filter pills (Semua / Aktif / Dalam Review / Selesai) */
.eh-cmp-filter-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 16px;
}
.eh-cmp-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 14px;
	border: 1px solid var(--eh-gray-200);
	border-radius: 20px;
	background: #fff;
	color: var(--eh-gray-800);
	font-size: .8125rem;
	font-weight: 600;
	cursor: pointer;
	transition: background .15s, color .15s, border-color .15s;
	white-space: nowrap;
}
.eh-cmp-pill:hover { border-color: var(--eh-green); color: var(--eh-green); background: #f0fdf4; }
.eh-cmp-pill.is-active { background: var(--eh-green); border-color: var(--eh-green); color: #fff; }
.eh-cmp-pill-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	border-radius: 10px;
	background: rgba(0,0,0,.08);
	font-size: .7rem;
	font-weight: 700;
}
.eh-cmp-pill.is-active .eh-cmp-pill-count { background: rgba(255,255,255,.25); }

/* Type radio */
.eh-type-row { display: flex; gap: 16px; }
.eh-type-option { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: .875rem; }
.eh-type-option input { accent-color: var(--eh-green); }

/* Upload zone */
.eh-complaint-upload { border: 2px dashed var(--eh-gray-200); border-radius: 6px; padding: 20px; text-align: center; cursor: pointer; font-size: .85rem; color: var(--eh-gray-500); transition: border-color .2s; }
.eh-complaint-upload:hover { border-color: var(--eh-green); background: #f0fdf4; }
.eh-upload-previews { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.eh-upload-previews img { width: 60px; height: 60px; object-fit: cover; border-radius: 4px; border: 1px solid var(--eh-gray-200); }

/* Submit button */
.eh-btn-submit-complaint { background: var(--eh-green); color: #fff; border: none; border-radius: 6px; padding: 10px 24px; font-size: .875rem; font-weight: 600; cursor: pointer; transition: background .15s; }
.eh-btn-submit-complaint:hover { background: var(--eh-green-dark); }
.eh-btn-submit-complaint:disabled { opacity: .6; cursor: not-allowed; }

/* Complaints table */
.eh-complaints-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.eh-complaints-table th { background: var(--eh-gray-100); padding: 10px 12px; text-align: left; font-weight: 600; color: var(--eh-gray-500); font-size: .75rem; text-transform: uppercase; }
.eh-complaints-table td { padding: 12px; border-bottom: 1px solid var(--eh-gray-200); vertical-align: middle; }
.eh-complaints-table tr:hover td { background: var(--eh-gray-100); }

/* Detail panel */
.eh-complaint-detail { display: none; background: var(--eh-gray-100); padding: 20px; border-left: 3px solid var(--eh-green); margin-top: 8px; border-radius: 0 var(--eh-radius) var(--eh-radius) 0; }
.eh-complaint-detail.open { display: block; }

/* Meta grid (Jenis / Prioritas / Status / Pesanan / Proyek / …) */
.eh-detail-meta { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px 20px; margin: 0 0 16px; }
.eh-detail-meta-item { display: flex; flex-direction: column; gap: 3px; margin: 0; }
.eh-detail-meta dt { font-size: .7rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--eh-gray-500); }
.eh-detail-meta dd { margin: 0; font-size: .875rem; color: var(--eh-gray-800); font-weight: 500; }
.eh-detail-meta dd a { color: var(--eh-blue); text-decoration: none; }
.eh-detail-meta dd a:hover { text-decoration: underline; }
.eh-detail-meta dd .eh-badge { font-weight: 600; }

/* Sections (Deskripsi / Lampiran) */
.eh-detail-section { margin-bottom: 16px; }
.eh-detail-section-label { display: block; font-size: .7rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--eh-gray-500); margin-bottom: 6px; }
.eh-detail-desc { font-size: .875rem; color: var(--eh-gray-800); line-height: 1.6; margin: 0; }

/* Attachments */
.eh-detail-attachments { display: flex; flex-wrap: wrap; gap: 10px; }
.eh-att { display: inline-flex; align-items: center; text-decoration: none; }
.eh-att-img { width: 72px; height: 72px; border-radius: 8px; overflow: hidden; border: 1px solid var(--eh-gray-200); background: var(--eh-white); }
.eh-att-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.eh-att-img:hover img { transform: scale(1.06); }
.eh-att-file { gap: 6px; padding: 8px 12px; background: var(--eh-white); border: 1px solid var(--eh-gray-200); border-radius: 8px; font-size: .8rem; color: var(--eh-gray-800); font-weight: 500; }
.eh-att-file:hover { border-color: var(--eh-green); color: var(--eh-green); }
.eh-att-file .dashicons { font-size: 16px; width: 16px; height: 16px; color: var(--eh-red); }

.eh-admin-reply { background: var(--eh-white); border-left: 3px solid var(--eh-blue); padding: 12px 16px; border-radius: 0 6px 6px 0; font-size: .85rem; color: var(--eh-gray-800); line-height: 1.5; }

/* SLA sidebar */
.eh-sla-widget { background: var(--eh-white); border-radius: var(--eh-radius); box-shadow: var(--eh-shadow); padding: 16px; }
.eh-sla-widget h4 { font-size: .875rem; margin: 0 0 12px; color: var(--eh-gray-800); }
.eh-sla-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--eh-gray-200); font-size: .82rem; }
.eh-sla-row:last-child { border-bottom: none; }
.eh-sla-label { color: var(--eh-gray-800); }
.eh-sla-value { font-weight: 600; color: var(--eh-green-dark); }
.eh-wa-button { display: flex; align-items: center; justify-content: center; gap: 8px; background: #25d366; color: #fff; border-radius: 6px; padding: 10px; text-decoration: none; font-size: .875rem; font-weight: 600; margin-top: 12px; }
.eh-wa-button:hover { background: #128c7e; color: #fff; }

/* Priority badges */
.eh-priority-normal { background: var(--eh-gray-200); color: var(--eh-gray-800); }
.eh-priority-tinggi  { background: #fff3cd; color: #856404; }
.eh-priority-urgen   { background: #f8d7da; color: #721c24; }

@media (max-width: 768px) {
    .eh-complaint-grid { grid-template-columns: 1fr; }
    .eh-complaints-table thead { display: none; }
    .eh-complaints-table td { display: block; padding: 6px 12px; }
    .eh-complaints-table td::before { content: attr(data-label); font-weight: 600; display: block; font-size: .72rem; color: var(--eh-gray-500); text-transform: uppercase; }
}
