/* Đối chiếu iLovePDF — nhóm edit (09/11/2026). Chỉ agent nhóm edit sửa tệp này. */

/* ===== Chỉnh sửa PDF: thanh công cụ ===== */
.ed-shell{background:#f5f5fa}
.ed-shell .ed-top{min-height:48px;height:48px;border-bottom:0;box-shadow:3px 3px 6px #3232324d;z-index:3;overflow:visible}
.ed-shell .ed-switch{margin:0 16px;height:26px;padding:1px;border:1px solid #47474f;background:#47474f;border-radius:20px;flex:none;gap:0}
.ed-shell .ed-switch button{min-width:0;min-height:22px;height:22px;padding:2px 8px;gap:5px;border-radius:20px;color:#fff;font-size:13px;font-weight:600;background:transparent;border-left:0;width:auto}
.ed-shell .ed-switch button span{font-size:13px}
.ed-shell .ed-switch button svg{width:14px;height:14px}
.ed-shell .ed-switch button.on,.ed-shell .ed-switch button.on:hover{background:#fff;color:#47474f}
.ed-shell .ed-switch button:not(.on):hover{background:transparent;color:#fff;opacity:.85}
.ed-shell .ed-top>button{min-width:52px;height:48px;min-height:48px;padding:0 14px;border-left:1px solid #e6e6eb;color:#707078;border-radius:0;transition:background .15s,color .15s}
.ed-shell .ed-top>button:last-child{border-right:1px solid #e6e6eb}
.ed-shell .ed-top>button svg{width:22px;height:22px}
.ed-shell .ed-top>button:hover{background:#f5f5fa;color:#47474f}
.ed-shell .ed-top>button.on{background:#f5f5fa;color:#e5322d}
.ed-shell .ed-top>button span{font-size:13px;color:inherit}
.ed-shell .ed-sub{min-height:48px;padding:0 12px;gap:6px;border-bottom:0;box-shadow:3px 3px 6px #32323226;z-index:2}
.ed-shell .ed-sub button{min-height:36px;min-width:36px;padding:4px 8px;border-radius:4px;color:#47474f}
.ed-shell .ed-sub button:hover{background:#f5f5fa;color:#161616}
.ed-shell .ed-sub button.on{background:#ebebf4;color:#e5322d}
.ed-shell .ed-sub button:disabled{opacity:.35;background:none}
.ed-shell .ed-sub select,.ed-shell .ed-sub input[type=number]{height:30px;border:1px solid #c2c2cc;border-radius:4px;padding:0 8px;font-size:13px;color:#47474f}
.ed-shell .ed-sub input[type=color]{width:28px;height:28px;border-radius:4px;border:1px solid #c2c2cc;cursor:pointer}
.ed-shell .ed-sub label{font-size:13px;color:#47474f}

/* Trang & hình nhỏ */
.ed-shell .ed-main{grid-template-columns:190px minmax(0,1fr) 300px}
.ed-shell.no-thumbs .ed-main{grid-template-columns:0 minmax(0,1fr) 300px}
.ed-library-open .ed-main{grid-template-columns:250px minmax(0,1fr) 300px}
.ed-shell .ed-thumbs{background:#f5f5fa;border-right:12px solid #e6e6eb;padding:8px 6px 24px;gap:18px}
.ed-shell .ed-thumbs button span{width:96px;max-width:96px;box-shadow:0 0 8px #00000014;outline:1px solid transparent;transition:outline-color .15s}
.ed-shell .ed-thumbs button:hover span{outline-color:#c2c2cc}
.ed-shell .ed-thumbs .active span{outline:1px solid #4b6dff}
.ed-shell .ed-thumbs small{font-size:12px;color:#47474f}
.ed-shell .ed-sheet{box-shadow:0 0 8px #00000014}
.ed-shell .ed-object.editing{outline:1px dashed #4b6dff}
.ed-shell .ed-inline-edit{cursor:text;outline:none;user-select:text;-webkit-user-select:text;caret-color:#161616}
.ed-shell .ed-center{user-select:none;-webkit-user-select:none}

/* Thanh điều hướng dưới */
.ed-shell .ed-view{bottom:24px;gap:8px;height:40px;padding:4px 12px;border-radius:4px;background:#47474f;box-shadow:none;font-size:16px}
.ed-shell .ed-view button{width:24px;height:24px;padding:0;border-radius:3px;color:#fff;flex:none}
.ed-shell .ed-view button:hover:not(:disabled){background:#ffffff1f}
.ed-shell .ed-view button:disabled{opacity:.4}
.ed-shell .ed-view svg{width:18px;height:18px}
.ed-shell .ed-view input{height:32px;width:65px;padding:4px 12px;border:1px solid #707078;border-radius:4px;background:#707078;color:#fff;font-size:16px;text-align:left}
.ed-shell .ed-view input[data-view=zoom]{width:85px}
.ed-shell .ed-view select{height:32px;max-width:120px;border-radius:4px;background:#707078;color:#fff;font-size:14px;padding:0 6px}
.ed-shell .ed-view-pages{display:inline-flex;align-items:center;gap:8px;white-space:nowrap}
.ed-shell .ed-view-sep{display:block;width:1px;height:24px;background:#85858e;margin:0 4px;flex:none}

/* Thanh bên phải */
.ed-shell .ed-side{border-left:1px solid #0003}
.ed-shell .ed-side h1{font-size:22px;font-weight:600;line-height:30px;padding:12px;color:#33333b;border-bottom:1px solid #0003}
.ed-shell .ed-details{padding:24px 15px 16px}
.ed-shell .ed-details .info-box{position:relative;margin:0 0 16px;padding:10px 14px 12px 40px;font-size:14px;line-height:22px;letter-spacing:.3px;color:#161616;background:#def2ff;border:1px solid #008ee9;border-radius:8px}
.ed-shell .ed-details .info-box::before{content:'i';position:absolute;left:13px;top:14px;width:14px;height:14px;line-height:11px;border:1.5px solid #008ee9;border-radius:50%;font-size:10px;font-weight:600;text-align:center;color:#008ee9;box-sizing:border-box}
.ed-shell .ed-clear{margin:0 0 4px auto;color:#e5322d;font-size:16px;font-weight:500;text-decoration:underline}
.ed-shell .ed-clear:hover{color:#bd060a}
.ed-shell .ed-details h3{font-size:16px;font-weight:600;color:#33333b;padding:0 0 12px;margin:8px 0 12px;border-bottom:1px solid #0003}
.ed-shell .ed-layer{gap:2px;margin:0 0 4px;padding:6px 6px 6px 4px;background:transparent;border-radius:4px;cursor:grab;transition:background .15s}
.ed-shell .ed-layer:hover,.ed-shell .ed-layer.active{background:#f5f5fa;outline:0}
.ed-shell .ed-layer>button:first-child{gap:12px;color:#707078}
.ed-shell .ed-layer>button:first-child svg{width:26px;height:26px;padding:4px;border:1px dashed #85858e;border-radius:2px}
.ed-shell .ed-layer>button:first-child span{font-size:16px;color:#707078}
.ed-shell .ed-layer>button:not(:first-child){color:#47474f;opacity:.75;border-radius:3px}
.ed-shell .ed-layer>button:not(:first-child):hover{opacity:1;background:#e6e6eb}
.ed-shell .ed-save-wrap{display:flex;justify-content:flex-end;padding:0 24px 24px}
.ed-shell .ed-save{width:252px;max-width:100%;min-height:64px;height:64px;padding:8px 12px;gap:16px;font-size:22px;font-weight:500;border-radius:12px;box-shadow:0 2px 8px #3232324d}
.ed-shell .ed-save:disabled{opacity:.5}
.ed-shell .ed-save svg{width:26px;height:26px;flex:none}
@media(max-width:760px){
  .ed-shell .ed-main,.ed-shell.no-thumbs .ed-main,.ed-library-open .ed-main{grid-template-columns:0 minmax(0,1fr)}
  .ed-shell .ed-thumbs{border-right:0}
  .ed-shell .ed-top{height:auto;min-height:40px;overflow-x:auto}
  .ed-shell .ed-top>button{min-width:44px;height:40px;min-height:40px;padding:0 10px}
  .ed-shell .ed-switch{margin:0 8px}
  .ed-shell .ed-save-wrap{padding:6px 12px 10px}
  .ed-shell .ed-save{width:100%;height:48px;min-height:48px;font-size:18px}
  .ed-shell .ed-view{bottom:8px;gap:4px;padding:4px 8px;left:50%;transform:translateX(-50%);max-width:calc(100% - 16px)}
  .ed-shell .ed-view input{width:44px;padding:4px 6px}
  .ed-shell .ed-view input[data-view=zoom]{width:58px}
  .ed-shell .ed-view select,.ed-shell .ed-view [data-ed=outline],.ed-shell .ed-view-sep{display:none}
}

/* ===== Cắt cúp PDF + Biểu mẫu PDF (layout-tool) ===== */
.layout-shell{grid-template-columns:minmax(0,1fr) 440px;background:#f1f2f4}
@media(max-width:1440px) and (min-width:761px){.layout-shell.crop-view{grid-template-columns:minmax(0,1fr) 380px}}
.layout-shell .layout-sheet{box-shadow:0 0 8px #00000014}
.layout-shell .layout-side{border-left:1px solid #0003}
.layout-shell .layout-side h1{font-size:22px;font-weight:600;line-height:30px;padding:12px;color:#33333b;border-bottom:1px solid #0003}
.layout-shell .layout-options{padding:20px 16px 16px}
.layout-shell .layout-options .info-box{position:relative;margin:0 0 16px;padding:10px 14px 12px 40px;font-size:14px;line-height:22px;letter-spacing:.3px;color:#161616;background:#def2ff;border:1px solid #008ee9;border-radius:8px}
.layout-shell .layout-options .info-box::before{position:absolute;left:13px;top:14px;margin:0;width:14px;height:14px;border:1.5px solid #008ee9;color:#008ee9;box-sizing:border-box;font-size:10px;line-height:1}
.layout-shell .layout-reset{margin:32px 0 4px auto;padding:0;color:#e5322d;font-size:16px;font-weight:500;text-decoration:underline}
.layout-shell .layout-reset:hover{color:#bd060a}
.crop-view .layout-options fieldset{margin:0}
.crop-view .layout-options legend{font-size:16px;font-weight:500;line-height:22px;color:#47474f;margin-bottom:8px;padding:0}
.crop-view .layout-options fieldset>label{display:inline-flex;align-items:center;gap:12px;margin:0 24px 0 0;font-size:16px;line-height:22px;color:#47474f;cursor:pointer}
.crop-view .layout-options input[type=radio]{appearance:none;-webkit-appearance:none;width:22px;height:22px;margin:0;border:1px solid #85858e;border-radius:50%;background:#fff;display:grid;place-items:center;cursor:pointer;transition:border-color .15s}
.crop-view .layout-options input[type=radio]::before{content:"";width:12px;height:12px;border-radius:50%;background:#2ec27e;transform:scale(0);transition:transform .15s}
.crop-view .layout-options input[type=radio]:checked{border:2px solid #2ec27e}
.crop-view .layout-options input[type=radio]:checked::before{transform:scale(1)}
.crop-view .layout-options input[type=radio]:focus-visible{outline:2px solid #387cc4;outline-offset:2px}
.layout-shell .layout-export{align-self:flex-end;width:calc(100% - 50px);max-width:330px;height:64px;min-height:64px;margin:16px 24px 24px;padding:8px 12px;display:flex;align-items:center;justify-content:center;gap:16px;font-size:22px;font-weight:500;line-height:26px;border-radius:12px;box-shadow:0 2px 8px #3232324d}
.forms-view .layout-export{max-width:252px}
.layout-shell .layout-export svg{width:26px;height:26px;flex:none}
.layout-shell .layout-export:disabled{opacity:.5}
.layout-shell .layout-message{margin:8px 16px}
.layout-shell .layout-message.is-info{background:#def2ff;border-color:#008ee9;color:#161616}

/* Thanh điều hướng dưới */
.layout-shell .layout-nav{bottom:24px;gap:8px;height:40px;padding:4px 12px;border-radius:4px;background:#47474f;font-size:16px;box-shadow:none}
.layout-shell .layout-nav button{width:24px;min-width:24px;height:24px;padding:0;display:grid;place-items:center;background:transparent;border-radius:3px;color:#fff}
.layout-shell .layout-nav button:hover:not(:disabled){background:#ffffff1f}
.layout-shell .layout-nav input{height:32px;width:65px;padding:4px 12px;background:#707078;border:1px solid #707078;border-radius:4px;color:#fff;font-size:16px;text-align:left;-moz-appearance:textfield}
.layout-shell .layout-nav input::-webkit-inner-spin-button,.layout-shell .layout-nav input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.layout-shell .layout-nav input[data-zoom]{width:85px}
.layout-shell .layout-nav-total{white-space:nowrap;margin-left:2px}
.layout-shell .layout-nav-sep{display:block;width:1px;height:24px;background:#85858e;margin:0 4px}
.layout-shell .layout-spreads{bottom:calc(100% + 8px);right:0;padding:4px;gap:2px;background:#47474f;border-radius:4px}
.layout-shell .layout-spreads button{width:auto;height:32px;padding:0 12px;white-space:nowrap;font-size:14px}

/* Biểu mẫu: thanh trên giống iLovePDF */
.forms-view .form-bar{height:48px;min-height:48px;padding:0 16px;gap:32px;border-bottom:1px solid #e6e6eb;flex-wrap:nowrap}
.forms-view .form-switch{display:flex;height:26px;padding:1px;border:1px solid #47474f;background:#47474f;border-radius:20px}
.forms-view .form-switch button{display:inline-flex;align-items:center;gap:5px;height:22px;padding:2px 8px;border:0;border-radius:20px;background:transparent;color:#fff;font-size:13px;font-weight:600;line-height:16px}
.forms-view .form-switch button svg{width:14px;height:14px}
.forms-view .form-switch button[aria-pressed=true]{background:#fff;color:#47474f}
.forms-view .form-bar>[data-toggle-index]{width:34px;height:32px;padding:0;display:grid;place-items:center;border:0;border-radius:4px;color:#47474f;background:transparent}
.forms-view .form-bar>[data-toggle-index]:hover{background:#f5f5fa}
.forms-view .form-bar>[data-toggle-index][aria-pressed=true]{color:#2b6fd6;background:#eaf1fc}
.forms-view .form-tools{height:48px;min-height:48px;padding:0 16px;gap:12px;justify-content:center;flex-wrap:nowrap;overflow-x:auto;background:#f5f5fa;border-bottom:1px solid #e6e6eb}
.forms-view .form-tools button{width:32px;height:32px;min-width:32px;padding:0;display:grid;place-items:center;border:1px solid transparent;border-radius:4px;background:transparent;color:#47474f;transition:background .15s,border-color .15s}
.forms-view .form-tools button:hover:not(:disabled){background:#e6e6eb}
.forms-view .form-tools button[aria-pressed=true]{border-color:#2b6fd6;color:#2b6fd6;background:#eaf1fc}
.forms-view .form-tools button:disabled{opacity:.35}
.forms-view .form-tools button svg{width:20px;height:20px}
.forms-view .form-tools-sep{display:block;width:1px;height:24px;background:#c2c2cc;margin:0 4px;flex:none}
.forms-view .form-list-title{display:flex;gap:4px;align-items:baseline;font-size:16px;font-weight:600;color:#33333b;margin:4px 0 16px}
.forms-view .form-list-title small{font-size:16px;font-weight:400;color:#47474f}
.forms-view .form-empty{display:grid;justify-items:center;gap:12px;margin-top:32px;color:#85858e;text-align:center}
.forms-view .form-empty p{font-size:14px;line-height:18px;max-width:150px;color:#47474f}

/* Hộp thoại "không có trường điền" */
.form-nofields-dialog{width:min(750px,calc(100vw - 32px));padding:48px 64px;border-radius:12px;text-align:center}
.form-nofields-dialog .pdf-dialog-close{display:none}
.form-nofields-dialog::backdrop{backdrop-filter:none;background:#0000008c}
.form-nofields-dialog h2{font-size:20px;font-weight:600;line-height:28px;color:#33333b;margin:0 0 20px}
.form-nofields-dialog .form-nofields-text{font-size:16px;line-height:22px;color:#47474f;margin:0}
.form-nofields-dialog .form-detect-status{display:flex;justify-content:center;align-items:center;gap:10px;margin:0;font-size:14px;color:#47474f}
.form-nofields-dialog.detecting .form-detect-status{margin-top:16px}
.form-nofields-dialog .form-nofields-actions{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;margin-top:32px;padding-top:32px;border-top:1px solid #e6e6eb}
.form-nofields-dialog .form-nofields-actions button{display:inline-flex;align-items:center;gap:8px;height:42px;padding:0 18px;border-radius:6px;background:#fff;font-size:16px;font-weight:600;transition:background .15s}
.form-nofields-dialog .form-detect{color:#5b4bd4;border:2px solid #7b6cf0}
.form-nofields-dialog .form-detect:hover{background:#f3f1ff}
.form-nofields-dialog .form-manual{color:#e5322d;border:2px solid #e5322d}
.form-nofields-dialog .form-manual:hover{background:#fff3f2}
.form-nofields-dialog.detecting .form-nofields-actions button{opacity:.5;pointer-events:none}
.form-nofields-dialog.detect-empty h2{margin-bottom:0}
.form-detect-spinner{width:18px;height:18px;border:3px solid #e6e6eb;border-top-color:#e5322d;border-radius:50%;animation:form-spin .8s linear infinite}
@keyframes form-spin{to{transform:rotate(360deg)}}
@media(max-width:760px){
  .layout-shell{grid-template-columns:minmax(0,1fr)}
  .layout-shell .layout-export{width:calc(100% - 24px);max-width:none;margin:8px 12px 12px;height:52px;min-height:52px;font-size:19px}
  .layout-shell .layout-nav{bottom:8px;gap:4px;padding:4px 8px;max-width:calc(100% - 16px)}
  .layout-shell .layout-nav input{width:46px;padding:4px 6px}
  .layout-shell .layout-nav input[data-zoom]{width:58px}
  .layout-shell .layout-nav-sep{display:none}
  .forms-view .form-tools{justify-content:flex-start}
  .form-nofields-dialog{padding:32px 20px}
}
