/* Office → PDF tools (server-side conversion). Shared by word-to-pdf and convert-excel-to-pdf. */
.tool-wrapper.protect-wrapper {
    --acc: #c53030; --acc-dark: #9b2c2c; --acc-soft: #fff5f5;
    max-width: 1100px; margin: 0 auto; color: #2d3748;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.protect-wrapper .hidden { display: none !important; }

.office-options {
    display: flex; flex-wrap: wrap; gap: 0.8rem 1.6rem; align-items: center;
    padding: 0.9rem 1.1rem; margin-bottom: 1rem; background: #f7f8fa;
    border: 1px solid #e2e8f0; border-radius: 0.8rem; font-size: 0.9rem;
}
.office-options label { display: inline-flex; align-items: center; gap: 0.45rem; cursor: pointer; }
.office-options .opt-title { font-weight: 600; color: #4a5568; }
.office-options select {
    font-size: 0.88rem; border: 1px solid #e2e8f0; border-radius: 0.4rem;
    padding: 0.35rem 0.5rem; background: #fff; color: #2d3748; max-width: 100%;
}
.office-options input[type="checkbox"] { width: 1rem; height: 1rem; accent-color: var(--acc); }

.protect-wrapper .upload-area {
    display: block; border: 2px dashed #cbd5e0; border-radius: 0.9rem; padding: 2.4rem 1.5rem;
    text-align: center; cursor: pointer; background: #fafbfc; margin-bottom: 1.2rem;
    transition: border-color 0.15s, background 0.15s;
}
.protect-wrapper .upload-area:hover, .protect-wrapper .upload-area.dragover { border-color: var(--acc); background: var(--acc-soft); }
.protect-wrapper .upload-icon { font-size: 2.6rem; color: var(--acc); margin-bottom: 0.6rem; }
.protect-wrapper .upload-text { font-weight: 600; font-size: 1.05rem; margin-bottom: 0.3rem; }
.protect-wrapper .upload-hint { color: #718096; font-size: 0.85rem; margin-bottom: 1rem; }
.protect-wrapper .upload-btn {
    background: var(--acc); color: #fff; padding: 0.55rem 1.4rem; border-radius: 2rem;
    font-weight: 600; display: inline-flex; align-items: center; gap: 0.4rem;
}
.protect-wrapper .upload-btn:hover { background: var(--acc-dark); }
.protect-wrapper .upload-security-note {
    display: flex; align-items: center; justify-content: center; gap: 0.4rem;
    margin-top: 1rem; font-size: 0.8rem; color: #4a5568;
}
.protect-wrapper .upload-security-note i { color: var(--acc); }

.protect-wrapper .progress-area {
    display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
    padding: 3rem 1.5rem; background: #fafbfc; border: 1px solid #e2e8f0;
    border-radius: 0.9rem; margin-bottom: 1.2rem;
}
.protect-wrapper .progress-spinner { font-size: 1.8rem; color: var(--acc); }
.protect-wrapper .progress-text { font-weight: 600; color: #4a5568; text-align: center; }
.protect-wrapper .progress-bar-track { width: 100%; max-width: 360px; height: 8px; border-radius: 999px; background: #e2e8f0; overflow: hidden; }
.protect-wrapper .progress-bar-fill { height: 100%; width: 0; background: var(--acc); border-radius: 999px; transition: width 0.25s ease; }

.office-result { border: 1px solid #d7dde5; border-radius: 0.8rem; background: #fff; margin-bottom: 1.2rem; overflow: hidden; }
.office-result-bar {
    display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; justify-content: space-between;
    padding: 0.8rem 1rem; background: #f7f8fa; border-bottom: 1px solid #e2e8f0;
}
.office-result-info { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.office-result-info i { color: #c53030; font-size: 1.5rem; }
.office-result-name { font-weight: 600; word-break: break-all; }
.office-result-meta { font-size: 0.82rem; color: #718096; }
.office-result-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.office-btn {
    display: inline-flex; align-items: center; gap: 0.45rem; border-radius: 0.5rem; cursor: pointer;
    padding: 0.55rem 1.1rem; font-weight: 600; font-size: 0.9rem; border: 1px solid #cbd5e0;
    background: #fff; color: #2d3748;
}
.office-btn:hover { background: #edf2f7; }
.office-btn-primary { background: var(--acc); border-color: var(--acc); color: #fff; }
.office-btn-primary:hover { background: var(--acc-dark); }
.office-thumbs {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.9rem;
    padding: 1rem; background: #eef1f5;
}
.office-thumb { background: #fff; border-radius: 0.3rem; box-shadow: 0 1px 4px rgba(0,0,0,0.12); overflow: hidden; text-align: center; }
.office-thumb canvas { display: block; width: 100%; height: auto; }
.office-thumb span { display: block; font-size: 0.75rem; color: #718096; padding: 0.25rem 0; }
.office-more { grid-column: 1 / -1; text-align: center; font-size: 0.85rem; color: #4a5568; }

.office-status {
    padding: 0.8rem 1rem; border-radius: 0.6rem; margin-bottom: 1rem; font-size: 0.9rem;
    background: #fff5f5; color: #c53030; border: 1px solid #feb2b2;
}
@media (max-width: 600px) {
    .office-result-bar { flex-direction: column; align-items: stretch; }
    .office-result-actions .office-btn { flex: 1; justify-content: center; }
}

/* Protect PDF form */
.protect-form { border: 1px solid #d7dde5; border-radius: 0.8rem; background: #fff; padding: 1.2rem 1.3rem; margin-bottom: 1.2rem; }
.protect-file { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; flex-wrap: wrap;
    padding-bottom: 0.9rem; margin-bottom: 1rem; border-bottom: 1px solid #edf2f7; }
.protect-file-info { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.protect-file-info i { color: var(--acc); font-size: 1.5rem; }
.protect-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.9rem 1.2rem; }
.protect-field label { display: block; font-weight: 600; font-size: 0.88rem; color: #4a5568; margin-bottom: 0.35rem; }
.protect-input { display: flex; border: 1px solid #cbd5e0; border-radius: 0.5rem; overflow: hidden; background: #fff; }
.protect-input input { flex: 1; border: 0; padding: 0.6rem 0.7rem; font-size: 0.95rem; min-width: 0; outline: none; }
.protect-input button { border: 0; background: #f7f8fa; padding: 0 0.8rem; cursor: pointer; color: #4a5568; }
.protect-input:focus-within { border-color: var(--acc); box-shadow: 0 0 0 2px var(--acc-soft); }
.protect-check { display: flex; align-items: center; gap: 0.5rem; margin: 1.1rem 0 0.4rem; font-weight: 600; cursor: pointer; }
.protect-check input, .protect-perms input { width: 1rem; height: 1rem; accent-color: var(--acc); }
.protect-restrict { background: #f7f8fa; border-radius: 0.6rem; padding: 0.9rem 1rem; margin-top: 0.5rem; }
.protect-perms { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.5rem 1rem; margin-top: 0.9rem; font-size: 0.9rem; }
.protect-perms label { display: flex; align-items: center; gap: 0.45rem; cursor: pointer; }
.protect-actions { margin-top: 1.2rem; display: flex; gap: 0.6rem; flex-wrap: wrap; }
.protect-hint { font-size: 0.8rem; color: #718096; margin-top: 0.35rem; }
.protect-progress { text-align: center; padding: 0.8rem; color: #4a5568; font-weight: 600; }
.protect-wrapper .office-status.ok { background: #f0fff4; color: #276749; border-color: #9ae6b4; }
