:root {
    --dh-accent: #10b981;
    --dh-navy: #1e2a4a;
    --dh-border: #d1d5db;
}

.ic-note {
    font-size: 13px;
    color: #6b7280;
    margin-top: 16px;
    line-height: 1.6;
}

.ic-actionbar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.ic-btn {
    background: var(--dh-navy);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.ic-btn:hover {
    background: #16213e;
    box-shadow: 0 6px 14px rgba(30, 42, 74, 0.28);
    transform: translateY(-1px);
}

.ic-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}

.ic-btn-outline {
    background: #fff;
    color: var(--dh-navy);
    border: 1px solid var(--dh-border);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.ic-btn-outline:hover {
    border-color: var(--dh-navy);
    background: #f9fafb;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.ic-btn-outline:active {
    transform: translateY(0);
}

.dh-panels {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    border: 1px solid var(--dh-border);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    min-height: 320px;
    gap: 0;
    margin-bottom: 18px;
}

.dh-panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.dh-panel + .dh-panel {
    border-left: 1px solid var(--dh-border);
}

.dh-panel-full {
    grid-column: 1 / -1;
}

.dh-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 700;
    color: var(--dh-navy);
    background: #f9fafb;
    border-bottom: 1px solid var(--dh-border);
}

.dh-upload-chip {
    cursor: pointer;
    background: var(--dh-navy);
    color: #fff;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    transition: background 0.15s ease;
}

.dh-upload-chip:hover {
    background: #16213e;
}

.dh-editor,
.dh-output {
    flex: 1;
    padding: 14px;
    font-size: 14px;
    line-height: 1.6;
    overflow: auto;
    outline: none;
}

.dh-editor {
    font-family: inherit;
    background: #fff;
}

.dh-editor:empty:before {
    content: "Paste your content from Microsoft Word here (Ctrl+V)...";
    color: #9ca3af;
}

.dh-output {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 12.5px;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--dh-navy);
    background: #f9fafb;
}

.dh-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.dh-modal-overlay.dh-modal-open {
    display: flex;
}

.dh-modal {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 900px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.dh-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    font-size: 13px;
    font-weight: 700;
    color: var(--dh-navy);
    background: #f9fafb;
    border-bottom: 1px solid var(--dh-border);
}

.dh-modal-close {
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    color: #6b7280;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 6px;
    transition: background 0.15s ease, color 0.15s ease;
}

.dh-modal-close:hover {
    background: #f3f4f6;
    color: var(--dh-navy);
}

.dh-modal-body {
    padding: 18px;
    overflow: auto;
}

.dh-modal-body .dh-editor {
    background: #fff;
    padding: 0;
}

@media (max-width: 720px) {
    .ic-actionbar {
        flex-direction: column;
        align-items: stretch;
    }

    .ic-actionbar .ic-btn,
    .ic-actionbar .ic-btn-outline {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .dh-panels {
        grid-template-columns: minmax(0, 1fr);
    }

    .dh-panel + .dh-panel {
        border-left: none;
        border-top: 1px solid var(--dh-border);
    }
}