.dictionary-editor-body {
    background: linear-gradient(180deg, #0b1120 0%, #111827 100%);
    color: #e5e7eb;
}

.dictionary-editor {
    --bg: #0f172a;
    --panel: #111827;
    --line: #263244;
    --text: #e5e7eb;
    --muted: #94a3b8;
    --brand: #38bdf8;
    --brand-soft: rgba(56, 189, 248, .14);
    --danger: #ef4444;
    --good: #22c55e;
    --warn: #f59e0b;

    max-width: 1600px;
    margin: 0 auto;
    padding: 28px;
    color: var(--text);
}

.dictionary-editor * {
    box-sizing: border-box;
}

.dictionary-editor a {
    color: inherit;
    text-decoration: none;
}

.dictionary-editor .topbar,
.dictionary-editor .panel-title-row,
.dictionary-editor .form-actions {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.dictionary-editor h1 {
    margin: 0 0 8px;
    color: var(--text);
    font-size: 32px;
    font-family: Arial, Helvetica, sans-serif;
}

.dictionary-editor h2,
.dictionary-editor h3 {
    margin-top: 0;
    color: var(--text);
    text-align: left;
}

.dictionary-editor .muted {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.dictionary-editor .button,
.dictionary-editor .button-secondary,
.dictionary-editor .button-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 14px;
    padding: 11px 15px;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
}

.dictionary-editor .button {
    background: linear-gradient(135deg, var(--brand), #22d3ee);
    color: #07111f;
}

.dictionary-editor .button-secondary {
    background: rgba(17, 24, 39, .88);
    border-color: var(--line);
    color: var(--text);
}

.dictionary-editor .button-danger {
    background: rgba(239, 68, 68, .16);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, .26);
}

.dictionary-editor .grid {
    display: grid;
    grid-template-columns: 1fr 520px;
    gap: 20px;
    align-items: start;
}

.dictionary-editor .card {
    background: rgba(17, 24, 39, .92);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 18px;
    box-shadow: 0 12px 36px rgba(2, 6, 23, .24);
}

.dictionary-editor .notice {
    padding: 12px 14px;
    border-radius: 14px;
    margin: 16px 0;
    font-size: 14px;
    border: 1px solid rgba(148, 163, 184, .18);
}

.dictionary-editor .notice-success {
    background: rgba(34, 197, 94, .14);
    color: #bbf7d0;
}

.dictionary-editor .notice-error {
    background: rgba(239, 68, 68, .14);
    color: #fecaca;
}

.dictionary-editor .notice-warn {
    background: rgba(245, 158, 11, .14);
    color: #fde68a;
}

.dictionary-editor input,
.dictionary-editor textarea,
.dictionary-editor select {
    width: 100%;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, .78);
    color: var(--text);
    border-radius: 14px;
    padding: 12px 14px;
    font: inherit;
}

.dictionary-editor textarea {
    min-height: 120px;
    resize: vertical;
}

.dictionary-editor select[multiple] {
    min-height: 180px;
}

.dictionary-editor .schema-field {
    min-height: 220px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
}

.dictionary-editor label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
    font-weight: 800;
    margin: 14px 0 7px;
}

.dictionary-editor .checkbox-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 14px 0;
}

.dictionary-editor .checkbox-row input {
    width: auto;
    margin-top: 3px;
}

.dictionary-editor .search-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    margin-bottom: 16px;
}

.dictionary-editor .term-scroll {
    overflow-x: auto;
    max-height: 500px;
    overflow-y: auto;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, .12);
}

.dictionary-editor .term-scroll thead th {
    position: sticky;
    top: 0;
    background: #111827;
    z-index: 2;
}

.dictionary-editor .data-table {
    width: 100%;
    border-collapse: collapse;
}

.dictionary-editor .data-table th,
.dictionary-editor .data-table td {
    text-align: left;
    padding: 13px 10px;
    border-bottom: 1px solid rgba(148, 163, 184, .12);
    vertical-align: top;
}

.dictionary-editor .data-table th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.dictionary-editor .text-link {
    color: var(--brand);
    font-size: 13px;
    font-weight: 800;
}

.dictionary-editor .pill {
    display: inline-flex;
    padding: 5px 8px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: #7dd3fc;
    font-size: 12px;
    font-weight: 800;
}

.dictionary-editor .pill-warn {
    background: rgba(245, 158, 11, .16);
    color: #fbbf24;
}

.dictionary-editor .pill-good {
    background: rgba(34, 197, 94, .16);
    color: #86efac;
}

.dictionary-editor .definition-box,
.dictionary-editor .seo-box {
    border: 1px solid rgba(148, 163, 184, .13);
    border-radius: 16px;
    padding: 14px;
    margin-top: 14px;
    background: rgba(255, 255, 255, .025);
}

.dictionary-editor .seo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.dictionary-editor .empty-state {
    padding: 22px;
    border-radius: 18px;
    border: 1px dashed rgba(148, 163, 184, .22);
    color: var(--muted);
    text-align: center;
}

.dictionary-editor .pagination {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    align-items: center;
}

.dictionary-editor .preview {
    background: #f8fafc;
    color: #0f172a;
    border-radius: 16px;
    padding: 16px;
    margin-top: 12px;
}

.dictionary-editor .preview-title {
    color: #1a0dab;
    font-size: 18px;
    margin-bottom: 4px;
}

.dictionary-editor .preview-url {
    color: #006621;
    font-size: 13px;
    margin-bottom: 6px;
    overflow-wrap: anywhere;
}

.dictionary-editor .preview-description {
    color: #4b5563;
    font-size: 13px;
    line-height: 1.45;
}

@media (max-width: 1200px) {
    .dictionary-editor .grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .dictionary-editor .seo-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .dictionary-editor {
        padding: 18px;
    }

    .dictionary-editor .search-row {
        grid-template-columns: 1fr;
    }
}