.ic-drop { border: 2px dashed #b5c4d6; border-radius: 6px; padding: 22px 16px; text-align: center; background: #f8fafc; transition: background .15s, border-color .15s; }
.ic-drop.ic-over { background: #e8f1fb; border-color: #337ab7; }
.ic-drop-text { margin-bottom: 10px; color: #444; }
.ic-drop-sub { margin-top: 8px; font-size: 12px; color: #888; }
.ic-pick { margin: 0; cursor: pointer; }
.ic-pick input[type=file] { display: none; }

.ic-error { padding: 10px 12px; margin: 10px 0; border: 1px solid #ebccd1; background: #f2dede; color: #a94442; font-size: 13px; border-radius: 3px; white-space: pre-wrap; }
.ic-hint { font-size: 12px; color: #a94442; margin-top: 4px; }
.ic-note { font-size: 12px; color: #777; margin-top: 6px; }

.ic-files { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.ic-file { display: flex; align-items: center; gap: 8px; border: 2px solid #ddd; border-radius: 4px; padding: 4px 8px 4px 4px; background: #fff; cursor: pointer; max-width: 260px; font-size: 12px; }
.ic-file.ic-cur { border-color: #337ab7; background: #f0f6fc; }
.ic-file img { width: 40px; height: 40px; object-fit: contain; flex: none; background: repeating-conic-gradient(#eee 0% 25%, #fff 0% 50%) 50% / 10px 10px; }
.ic-file .ic-fname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ic-file .ic-fsub { color: #888; }
.ic-file.ic-ng { border-color: #ebccd1; background: #fbf1f1; }

.ic-main { display: flex; gap: 20px; align-items: flex-start; margin-top: 16px; }
.ic-settings { flex: 0 0 380px; min-width: 0; }
.ic-previewpane { flex: 1 1 0; min-width: 0; position: sticky; top: 8px; }

.ic-panel { border: 1px solid #d5dde6; border-radius: 4px; padding: 8px 12px 4px; margin: 0 0 12px; min-width: 0; }
.ic-panel legend { width: auto; border: 0; margin: 0; padding: 0 6px; font-size: 14px; font-weight: bold; color: #2c3e50; }
.ic-panel label { display: block; font-size: 13px; font-weight: bold; margin-bottom: 4px; color: #2c3e50; }
.ic-panel label.ic-check { font-weight: normal; cursor: pointer; }
.ic-panel label.ic-check input { margin-right: 4px; }
.ic-panel .form-group { margin-bottom: 10px; }
.ic-quality { display: flex; align-items: center; gap: 10px; }
.ic-quality input[type=range] { flex: 1; min-width: 0; }
.ic-quality input[type=number], .ic-quality input[type=text] { width: 80px; flex: none; }
.ic-inline { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #666; }
.ic-inline input { width: 90px; flex: none; }
.ic-color { width: 60px; height: 34px; padding: 2px; border: 1px solid #ccc; border-radius: 3px; background: #fff; cursor: pointer; }
.ic-icosizes { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.ic-icosizes label { font-weight: normal; margin: 0; cursor: pointer; }

.ic-sizes { background: #f4f7fa; border-radius: 3px; padding: 6px 10px; margin-bottom: 10px; font-size: 13px; }
.ic-sizes .ic-k { display: inline-block; width: 7em; color: #666; }
.ic-sizes span + span, .ic-sizes #ic_new_size { font-weight: bold; }
.ic-dimrow { display: flex; gap: 8px; align-items: flex-end; margin-bottom: 8px; }
.ic-dim-item { flex: 1; min-width: 0; }
.ic-dim-item input, .ic-dim-item select { width: 100%; }
.ic-dim-x { padding-bottom: 8px; color: #888; }
.ic-unit { flex: 1.1; }
.ic-btnrow { margin-bottom: 10px; }
.ic-btnrow .btn { margin-right: 4px; margin-bottom: 4px; }

.ic-tabs { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-bottom: 8px; }
.ic-tabsep { flex: 1; }
.ic-tab.ic-on, .ic-zoom.ic-on { background: #337ab7; border-color: #2e6da4; color: #fff; }
.ic-stage { position: relative; display: flex; gap: 8px; min-height: 220px; border: 1px solid #d5dde6; border-radius: 4px; padding: 8px; background: #fafbfc; }
.ic-pane { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.ic-panetitle { font-size: 12px; color: #666; margin-bottom: 4px; }
.ic-canvaswrap { flex: 1; overflow: auto; max-height: 560px; border: 1px solid #ddd; background: repeating-conic-gradient(#e6e6e6 0% 25%, #fff 0% 50%) 50% / 16px 16px; text-align: center; }
.ic-canvaswrap canvas { display: block; margin: 0 auto; image-rendering: auto; }
.ic-fit canvas { max-width: 100%; height: auto; }
.ic-z100 canvas { max-width: none; }
.ic-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #999; font-size: 13px; background: #fafbfc; text-align: center; padding: 10px; }
.ic-busy { position: absolute; top: 6px; right: 10px; font-size: 12px; color: #fff; background: rgba(51,122,183,.9); border-radius: 3px; padding: 2px 8px; }

.ic-stats { margin-top: 10px; font-size: 13px; }
.ic-stats table { border-collapse: collapse; width: 100%; }
.ic-stats th { text-align: left; font-weight: normal; color: #666; padding: 3px 8px 3px 0; width: 9em; vertical-align: top; }
.ic-stats td { padding: 3px 0; word-break: break-all; }
.ic-good { color: #3c763d; font-weight: bold; }
.ic-bad { color: #a94442; }
.ic-warn { color: #8a6d3b; }
.ic-palette { display: flex; flex-wrap: wrap; gap: 1px; margin-top: 8px; }
.ic-palette i { display: block; width: 12px; height: 12px; border: 1px solid rgba(0,0,0,.15); }
.ic-palette i.ic-tr { background: repeating-conic-gradient(#ccc 0% 25%, #fff 0% 50%) 50% / 6px 6px; }
.ic-actions { margin: 12px 0 4px; }
.ic-actions .btn { margin-right: 6px; margin-bottom: 4px; }

@media (max-width: 900px) {
	.ic-main { flex-direction: column; }
	.ic-settings { flex: none; width: 100%; }
	.ic-previewpane { position: static; width: 100%; order: -1; }
}
@media (max-width: 600px) {
	.ic-stage { flex-direction: column; }
	.ic-dimrow { flex-wrap: wrap; }
	.ic-unit { flex: 1 1 100%; }
	.ic-dim-x { display: none; }
	.ic-stats th { width: 7em; }
	.ic-file { max-width: 100%; }
}
