.kda-card { padding: 28px; }
.kda-title-bar { background: linear-gradient(135deg, var(--site-dark) 0%, var(--site-dark-2) 100%); border-radius: 10px 10px 0 0; padding: 18px 24px; margin: -28px -28px 24px; }
.kda-title-bar h1 { color: #fff; margin: 0; font-size: 1.4em; text-align: center; display: flex; align-items: center; justify-content: center; gap: 10px; }

.kda-options { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; margin-bottom: 16px; padding: 14px 16px; background: #f7f8fa; border: 1px solid #eee; border-radius: 8px; }
.kda-check { display: flex; align-items: center; gap: 6px; font-size: .88em; font-weight: 600; color: #374151; cursor: pointer; user-select: none; }
.kda-check input { accent-color: var(--site-dark); width: 15px; height: 15px; cursor: pointer; }
.kda-num { display: flex; align-items: center; gap: 8px; font-size: .88em; font-weight: 600; color: #374151; }
.kda-num input { width: 70px; border: 1px solid #ddd; border-radius: 6px; padding: 6px 10px; font-size: .95em; font-family: inherit; outline: none; }
.kda-num input:focus { border-color: var(--site-light); }
.kda-num input.kda-bad { border-color: #dc2626; background: #fef2f2; }
.kda-options-right { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.kda-btn { background: #fff; border: 1px solid var(--site-light); border-radius: 20px; padding: 6px 14px; font-size: .82em; font-weight: 600; color: var(--site-dark); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-family: inherit; transition: background .15s ease; }
.kda-btn:hover { background: #f0fdfa; }
.kda-btn.kda-done { background: var(--site-success-bg, #dcfce7); border-color: #86efac; color: var(--site-success, #15803d); }
.kda-btn-ghost { border-color: #ddd; color: #6b7280; }
.kda-btn-ghost:hover { background: #f7f8fa; }

.kda-field { margin-bottom: 16px; }
.kda-field-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.kda-field-head label { font-weight: 600; font-size: .92em; color: #23272f; }
.kda-field-head label i { color: var(--site-light); margin-right: 6px; }
.kda-field-head small { color: #6b7280; font-size: .8em; }
.kda-field textarea { width: 100%; min-height: 240px; border: 1px solid #ddd; border-radius: 8px; padding: 14px 16px; font-family: inherit; font-size: .95em; line-height: 1.6; resize: vertical; box-sizing: border-box; outline: none; }
.kda-field textarea:focus, .kda-field input[type="text"]:focus { border-color: var(--site-light); }
.kda-field input[type="text"] { width: 100%; border: 1px solid #ddd; border-radius: 8px; padding: 10px 14px; font-family: inherit; font-size: .95em; box-sizing: border-box; outline: none; }
.kda-hint { font-size: .8em; color: #6b7280; margin-top: 6px; }

.kda-msg { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: 8px; padding: 10px 14px; font-size: .86em; margin-bottom: 16px; }
.kda-msg[hidden] { display: none; }

.kda-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.kda-stat { background: #f7f8fa; border: 1px solid #eee; border-radius: 10px; padding: 14px 12px; text-align: center; }
.kda-stat-val { display: block; font-size: 1.5em; font-weight: 800; color: var(--site-dark); line-height: 1.2; }
.kda-stat-val small { display: block; font-size: .5em; font-weight: 500; color: #6b7280; margin-top: 2px; }
.kda-stat-label { display: block; font-size: .76em; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #6b7280; margin-top: 6px; }

.kda-section-title { font-size: .78em; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #6b7280; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.kda-section-title i { color: var(--site-accent); }
.kda-block { margin-bottom: 22px; }
.kda-block[hidden] { display: none; }

.kda-table-wrap { overflow-x: auto; border: 1px solid #eee; border-radius: 10px; }
.kda-table { width: 100%; border-collapse: collapse; font-size: .9em; }
.kda-table th { background: #f7f8fa; color: #23272f; text-align: left; padding: 10px 12px; font-size: .82em; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid #eee; white-space: nowrap; }
.kda-table td { padding: 9px 12px; border-bottom: 1px solid #f1f1f1; color: #23272f; word-break: break-word; }
.kda-table tr:last-child td { border-bottom: none; }
.kda-table td:nth-child(2), .kda-table td:nth-child(3), .kda-table th:nth-child(2), .kda-table th:nth-child(3) { text-align: right; white-space: nowrap; }
.kda-table .kda-none { color: #6b7280; font-style: italic; text-align: left; }
.kda-target-table td:nth-child(4), .kda-target-table th:nth-child(4), .kda-target-table td:nth-child(5), .kda-target-table th:nth-child(5) { text-align: left; }

.kda-band { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: .8em; font-weight: 700; white-space: nowrap; }
.kda-band-ok { background: #ccfbf1; color: #0f766e; }
.kda-band-low { background: #eef2ff; color: #4338ca; }
.kda-band-high { background: #fef3c7; color: #b45309; }
.kda-band-none { background: #f3f4f6; color: #6b7280; }
.kda-yes { color: #0f766e; font-weight: 700; white-space: nowrap; }
.kda-no { color: #6b7280; }
.kda-band-note { font-size: .8em; color: #6b7280; margin-top: 8px; }

.kda-preview { border: 1px solid #ddd; border-radius: 8px; padding: 14px 16px; background: #fafbfc; max-height: 320px; overflow: auto; white-space: pre-wrap; word-break: break-word; font-size: .92em; line-height: 1.7; color: #23272f; }
.kda-mark { background: #99f6e4; color: #134e4a; padding: 0 2px; border-radius: 3px; }

.kda-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.kda-grid h3 { font-size: .9em; margin: 0 0 8px; color: #23272f; display: flex; align-items: center; gap: 8px; }
.kda-grid h3 span { background: #0d9488; color: #fff; border-radius: 6px; padding: 2px 8px; font-size: .78em; }

.kda-empty { text-align: center; color: #6b7280; padding: 24px 12px; border: 1px dashed #ddd; border-radius: 10px; font-size: .9em; margin-bottom: 20px; }
.kda-empty[hidden] { display: none; }
.kda-empty i { color: var(--site-light); font-size: 1.6em; display: block; margin-bottom: 8px; }

.kda-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; padding-top: 14px; border-top: 1px solid #eee; }
.kda-privacy { font-size: .8em; color: #6b7280; margin: 12px 0 0; }

@media (max-width: 1100px) {
    .kda-grid { grid-template-columns: 1fr; }
    .kda-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .kda-card { padding: 18px; }
    .kda-title-bar { margin: -18px -18px 18px; padding: 14px 16px; }
    .kda-title-bar h1 { font-size: 1.15em; }
    .kda-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .kda-options { gap: 10px 14px; }
    .kda-options-right { margin-left: 0; width: 100%; }
    .kda-options-right .kda-btn { flex: 1; justify-content: center; }
    .kda-actions { justify-content: stretch; }
    .kda-actions .kda-btn { flex: 1; justify-content: center; }
    .kda-table { font-size: .84em; }
}
