/* Internal KEDO — unified interface system v5.32
   One visual language for all portal sections.
*/
:root{
  --kedo-bg:#f3f6fa;
  --kedo-surface:#fff;
  --kedo-surface-soft:#f7fafc;
  --kedo-border:#dce6ef;
  --kedo-border-strong:#cbd9e6;
  --kedo-text:#172033;
  --kedo-heading:#173b62;
  --kedo-muted:#6b7c8f;
  --kedo-primary:#1769aa;
  --kedo-primary-hover:#125b94;
  --kedo-success:#18794e;
  --kedo-danger:#b42318;
  --kedo-radius:12px;
  --kedo-shadow:0 5px 18px rgba(27,52,78,.045);
}

html,body{background:var(--kedo-bg);color:var(--kedo-text)}
body{font-size:14px;line-height:1.45}

/* ---------- Global shell ---------- */
.top{min-height:64px!important;padding:0 24px!important}
.body{width:min(1280px,calc(100% - 36px))!important;padding:18px 0 34px!important}

.nav{
  min-height:48px;
  align-items:center;
  gap:3px!important;
  padding:4px!important;
  margin-bottom:16px!important;
  background:#eaf0f5!important;
  border:1px solid #dbe5ee!important;
  border-radius:11px!important;
  box-shadow:0 2px 8px rgba(30,65,95,.025);
}
.nav button{
  min-height:38px!important;
  padding:8px 13px!important;
  border-radius:8px!important;
  color:#425466!important;
  font-size:14px!important;
  font-weight:500;
}
.nav button:hover{background:#fff!important;color:#173b62!important}
.nav button.active{background:var(--kedo-primary)!important;color:#fff!important;box-shadow:0 2px 6px rgba(23,105,170,.2)!important}
.nav button[data-page="knowledge"]{margin-left:4px!important;padding-left:17px!important;border-left:1px solid #d2dee8!important}
.nav button[data-page="admin"]{margin-left:auto!important}
.nav-admin-separator{height:25px;width:1px;background:#cbd8e3;margin-left:8px}

.user-menu-button,.global-search-button{
  height:38px!important;min-height:38px!important;
  padding:0 13px!important;
  border:1px solid rgba(255,255,255,.25)!important;
  border-radius:9px!important;
  background:rgba(255,255,255,.08)!important;
  color:#fff!important;
  box-shadow:none!important;
}
.user-menu-button{font-weight:600!important;max-width:310px!important}
.global-search-button{font-weight:500!important}
.user-menu-button:hover,.global-search-button:hover{background:rgba(255,255,255,.14)!important}

/* ---------- Typography ---------- */
.page-title{font-size:28px!important;line-height:1.15!important;margin:3px 0 7px!important;color:var(--kedo-heading)!important;letter-spacing:-.02em}
.eyebrow{font-size:10px!important;letter-spacing:.08em!important;font-weight:800!important;color:#71869a!important}
.muted{color:var(--kedo-muted)!important}

/* ---------- One card language ---------- */
.card,.stat,.admin-stat{
  border:1px solid var(--kedo-border)!important;
  border-radius:var(--kedo-radius)!important;
  box-shadow:var(--kedo-shadow)!important;
  background:var(--kedo-surface)!important;
}
.card{padding:16px!important;margin-bottom:14px!important}
.card h2{font-size:19px!important;line-height:1.25!important;margin:0 0 10px!important;color:#20364f!important}

/* Small clickable plaques / list items */
.document,.inbox-item,.home-action-row,.tasks-summary-card,.org-group-button,.branch-dep-row,.branch-employee-row,.admin-requests-card .account-request-row{
  border-color:var(--kedo-border)!important;
}
.document{padding:12px 0!important;gap:14px!important}
.doc-actions{gap:6px!important}
.doc-actions button,.admin-actions button{min-height:34px!important;padding:7px 10px!important;font-size:12px!important;border-radius:8px!important}

/* ---------- Forms become compact reusable panels ---------- */
.kedo-form-panel{
  border:1px solid var(--kedo-border)!important;
  border-radius:var(--kedo-radius)!important;
  background:#fff!important;
  box-shadow:var(--kedo-shadow)!important;
  margin-bottom:14px!important;
}
.kedo-form-panel-head{
  min-height:58px!important;
  padding:12px 15px!important;
  border-radius:var(--kedo-radius)!important;
}
.kedo-form-panel-head strong{font-size:16px!important;line-height:1.2!important}
.kedo-form-panel-head small{font-size:11px!important}
.kedo-form-chevron{font-size:18px!important}
.kedo-form-panel-body{padding:0 15px 15px!important}
.kedo-form-panel.is-collapsed .kedo-form-panel-body{padding-bottom:0!important}
.kedo-form-panel .row{gap:11px!important;margin-bottom:11px!important}
.kedo-form-panel label{font-size:12px!important;font-weight:600!important;color:#314b63!important}
.kedo-form-panel input,.kedo-form-panel select,.kedo-form-panel textarea{
  min-height:38px!important;
  padding:8px 10px!important;
  border-radius:8px!important;
  font-size:13px!important;
}
.kedo-form-panel textarea{min-height:96px!important}
.kedo-form-panel .notice{font-size:12px!important;padding:9px 11px!important;margin-bottom:11px!important}
.kedo-form-panel .primary,.kedo-form-panel .secondary,.kedo-form-panel .danger,.kedo-form-panel .danger-outline{
  min-height:36px!important;padding:8px 11px!important;font-size:12px!important;border-radius:8px!important
}

/* Document upload: same plaque as order/task/material forms */
.kedo-upload-card.kedo-form-panel{padding:0!important;overflow:hidden!important}
.kedo-upload-head{padding:0!important}
.kedo-upload-head h2{margin:2px 0 3px!important;font-size:17px!important}
.kedo-upload-head p{margin:0!important;font-size:11px!important}
.kedo-upload-card .upload-section-title{margin:13px 0 7px!important}
.kedo-upload-card .workflow-choice-grid{gap:8px!important}
.kedo-upload-card .workflow-choice{
  min-height:70px!important;padding:10px!important;border-radius:10px!important
}
.kedo-upload-card .workflow-choice b{font-size:12px!important}
.kedo-upload-card .workflow-choice small{font-size:10px!important;line-height:1.35!important}
.kedo-upload-card .file-drop-zone{
  min-height:62px!important;padding:9px 11px!important;border-radius:9px!important
}
.kedo-upload-card .file-drop-icon{width:32px!important;height:32px!important;border-radius:8px!important}
.kedo-upload-card .file-drop-zone b{font-size:12px!important}
.kedo-upload-card .file-drop-zone small{font-size:10px!important}
.kedo-upload-card .doc-actions{margin-top:11px!important}

/* Orders / knowledge use exactly the same visual language */
.order-recipient-box{gap:10px!important}
.order-group-scope-card,.workflow-target-card,.group-scope-grid,.doc-recipient-builder{
  border-color:var(--kedo-border)!important;border-radius:9px!important
}

/* ---------- Search and lists ---------- */
.search{gap:7px!important}
.search input{min-height:38px!important;border-radius:8px!important;font-size:13px!important}
.search button{min-height:38px!important;padding:8px 12px!important;font-size:12px!important;border-radius:8px!important}
.table-wrap{border-radius:9px!important}

/* ---------- Dashboard ---------- */
.home-focus.card,.home-columns .card,.leader-control-card{padding:15px!important}
.home-section-head h2{font-size:18px!important}
.home-action-row{min-height:58px!important;padding:9px 11px!important;border-radius:9px!important}
.home-metric{min-height:88px!important;border-radius:10px!important}

/* ---------- Tasks ---------- */
.tasks-summary{gap:9px!important}
.tasks-summary-card{min-height:76px!important;padding:11px 13px!important;border-radius:10px!important}
.task-create-shell{border-radius:12px!important;border-color:var(--kedo-border)!important;box-shadow:var(--kedo-shadow)!important}
.task-create-head{min-height:58px!important;padding:11px 14px!important}
.task-create-head-copy strong{font-size:16px!important}
.task-create-body{padding:0 14px 14px!important}

/* ---------- Profile ---------- */
.profile-identity,.profile-card,.profile-shortcuts{border-radius:12px!important}
.profile-identity{padding:15px!important}
.profile-card{padding:15px!important}
.profile-info-list>div{padding:9px 0!important}
.profile-setting{padding:11px 0!important}

/* ---------- Admin ---------- */
.admin-tabs{display:flex!important;gap:7px!important;margin:4px 0 14px!important}
.admin-tabs button{min-height:36px!important;padding:8px 12px!important;font-size:12px!important;border-radius:8px!important}
.admin-stats{gap:9px!important;margin-bottom:14px!important}
.admin-stat{padding:13px!important}
.admin-stat b{font-size:23px!important}
.admin-employees-card .employee-row{border-radius:10px!important;padding:8px 10px!important}
.admin-audit-card .audit-row{border-radius:9px!important;min-height:48px!important;padding:7px 10px!important}

/* ---------- Empty / notice states ---------- */
.empty,.home-empty,.inbox-empty{font-size:13px!important}
.notice,.admin-load-warning{border-radius:9px!important}

/* ---------- Responsive ---------- */
@media(max-width:900px){
  .body{width:min(100% - 24px,1280px)!important}
  .nav{overflow:auto;flex-wrap:nowrap}
  .nav button{flex:0 0 auto}
  .nav button[data-page="admin"]{margin-left:0!important}
  .nav-admin-separator{display:none}
}
@media(max-width:650px){
  .top{padding:0 12px!important}
  .body{width:calc(100% - 20px)!important}
  .page-title{font-size:24px!important}
  .card{padding:13px!important}
  .kedo-form-panel-body{padding:0 12px 12px!important}
}

/* =========================================================
   Internal KEDO 5.33 — UX audit / one-product pass
   Goal: every section should feel like the same application.
   ========================================================= */
:root{
  --kedo-space-1:4px;
  --kedo-space-2:8px;
  --kedo-space-3:12px;
  --kedo-space-4:16px;
  --kedo-space-5:20px;
  --kedo-control-h:38px;
}

/* Global rhythm */
#main{min-width:0}
#main>.page-title{margin-top:0!important;margin-bottom:4px!important}
#main>.page-title + .muted{margin:0 0 14px!important}
#main>.card{margin-bottom:12px!important}
#main>section.card:last-child{margin-bottom:0!important}
.card{box-shadow:0 4px 14px rgba(27,52,78,.035)!important}

/* Compact page headers */
.home-welcome,.inbox-hero,.branch-hero{margin-bottom:14px!important}
.home-welcome .muted,.branch-hero-copy .muted{margin-top:4px!important}
.help-page>.page-title,.profile-page>.page-title,.tasks-page>.page-title,.messages-page>.page-title{margin-bottom:4px!important}

/* Buttons: one scale, one hierarchy */
.primary,.secondary,.danger,.danger-outline{
  min-height:36px!important;
  padding:8px 12px!important;
  border-radius:8px!important;
  font-size:12px!important;
}
.primary{font-weight:600!important}
.secondary{font-weight:500!important}
.danger,.danger-outline{font-weight:500!important}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{
  outline:2px solid rgba(23,105,170,.28)!important;
  outline-offset:2px!important;
}

/* Top bar: identity and search are deliberately siblings */
.top{min-height:60px!important;padding:0 24px!important}
.top-right{gap:7px!important}
.user-menu-button,.global-search-button{
  height:36px!important;min-height:36px!important;
  border-radius:9px!important;
  border:1px solid rgba(255,255,255,.23)!important;
  background:rgba(255,255,255,.08)!important;
  box-shadow:none!important;
}
.user-menu-button{max-width:300px!important;padding:7px 12px!important}
.global-search-button{padding:7px 12px!important}
.notification-button{height:36px!important;min-width:36px!important;border-radius:9px!important}

/* Navigation: quiet by default, strong only for current section */
.nav{margin-bottom:14px!important;gap:2px!important}
.nav button{height:36px!important;min-height:36px!important;padding:7px 12px!important;border-radius:8px!important}
.nav button.active{font-weight:600!important}
.nav button[data-page="admin"]{font-weight:600!important}

/* Form plaques: same component for documents, orders, tasks and materials */
.kedo-form-panel{overflow:hidden!important}
.kedo-form-panel.is-collapsed{padding:0!important}
.kedo-form-panel-head.kedo-collapsible-head{
  width:100%!important;
  min-height:64px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  padding:11px 14px!important;
  border:0!important;
  background:#fff!important;
  color:var(--kedo-text)!important;
  text-align:left!important;
  cursor:pointer!important;
}
.kedo-form-panel-head.kedo-collapsible-head>span:first-child{display:flex;align-items:center;gap:10px;min-width:0}
.kedo-form-panel-head.kedo-collapsible-head>span:first-child>span:last-child{display:grid;gap:2px;min-width:0}
.kedo-form-panel-head strong{display:block!important;font-size:15px!important;color:#203b58!important}
.kedo-form-panel-head small{display:block!important;color:#7b8da0!important;font-size:10px!important;line-height:1.35!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:min(700px,72vw)}
.kedo-form-icon{width:34px!important;height:34px!important;display:grid!important;place-items:center!important;flex:0 0 auto!important;border-radius:9px!important;background:#edf5fb!important;color:#1769aa!important;font-weight:800!important;font-size:15px!important}
.kedo-form-panel-head:hover{background:#fbfdff!important}
.kedo-form-panel-head:hover .kedo-form-icon{background:#e6f1f8!important}
.kedo-form-panel.is-collapsed .kedo-form-panel-body{display:none!important}
.kedo-form-panel:not(.is-collapsed) .kedo-form-panel-head{border-bottom:1px solid #edf2f6!important}
.kedo-form-panel:not(.is-collapsed) .kedo-form-chevron{transform:rotate(180deg)!important}
.kedo-form-chevron{transition:transform .18s ease!important;color:#6f8395!important;font-size:17px!important}
.kedo-form-intro{margin:0 0 12px!important;font-size:12px!important;line-height:1.45!important}
.kedo-upload-card .kedo-form-panel-body{padding:12px 15px 15px!important}
.kedo-order-panel .kedo-form-panel-body{padding:12px 15px 15px!important}
.kedo-form-panel .notice{margin-bottom:12px!important}

/* Workflow choices: compact segmented cards instead of oversized tiles */
.workflow-choice-grid{gap:7px!important;margin-bottom:10px!important}
.workflow-choice{min-height:62px!important;padding:9px 10px!important;border-radius:9px!important}
.workflow-choice-icon{width:28px!important;height:28px!important;border-radius:8px!important}
.workflow-choice b{font-size:12px!important}
.workflow-choice small{font-size:9px!important;line-height:1.3!important}
.workflow-target-card{padding:10px 11px!important;margin-top:9px!important}
.workflow-target-head{gap:8px!important;margin-bottom:8px!important}
.doc-recipient-builder{gap:8px!important}
.route-summary{margin-top:8px!important;padding:8px 10px!important;font-size:10px!important}

/* Documents / orders list: less vertical air */
.document{padding:10px 0!important;grid-template-columns:minmax(0,1fr) minmax(220px,auto)!important;gap:10px!important}
.document>div:first-child>strong{font-size:13px!important;color:#203b58!important}
.document .muted{font-size:10px!important}
.doc-status-line{margin-top:6px!important;gap:4px!important}
.doc-status{padding:4px 7px!important;border-radius:7px!important;font-size:9px!important}
.doc-status-arrow{font-size:10px!important}
.signature-plaque{margin-top:8px!important;padding:8px 10px!important}
.doc-actions{gap:5px!important}
.doc-actions button{min-height:32px!important;padding:6px 9px!important}

/* Search cards */
.search{gap:6px!important;margin-bottom:10px!important}
.search input{height:36px!important;min-height:36px!important}
.search button{height:36px!important;min-height:36px!important}

/* Inbox */
.inbox-stats{gap:8px!important}
.inbox-stat{padding:10px 12px!important;border-radius:10px!important}
.inbox-stat b{font-size:19px!important}
.inbox-section{margin-bottom:10px!important}
.inbox-section-head{margin-bottom:7px!important}
.inbox-section-head h2{font-size:17px!important}
.inbox-item{padding:9px 10px!important;border-radius:10px!important;grid-template-columns:32px minmax(0,1fr) auto!important}
.inbox-item-icon{width:32px!important;height:32px!important;border-radius:9px!important}

/* Tasks: the same compact form language as documents */
.task-create-shell{border-radius:12px!important;margin-bottom:12px!important}
.task-create-head{min-height:60px!important;padding:10px 13px!important}
.task-create-icon{width:32px!important;height:32px!important;border-radius:9px!important}
.task-create-body{padding:0 13px 13px!important}
.task-card{border-radius:10px!important;padding:10px 12px!important}
.tasks-summary{gap:7px!important}
.tasks-summary-card{min-height:68px!important;padding:10px 11px!important;border-radius:9px!important}

/* Help / knowledge */
.help-grid{gap:9px!important}
.help-item{border-radius:10px!important}
.help-item summary{padding:11px 12px!important;font-size:12px!important}
.help-body{padding:0 12px 12px!important}
.knowledge-grid,.knowledge-list{gap:9px!important}

/* Messages: stable shell, no decorative jumps */
.messages-page,.chat-page{min-width:0!important}
.chat-shell,.messages-shell{border-radius:14px!important;box-shadow:0 5px 18px rgba(27,52,78,.045)!important}
.chat-contact:hover{transform:none!important}
.chat-contact.chat-moved{animation:none!important}
.chat-message{animation:none!important}

/* Profile: make it a real account area, not a lonely card */
.profile-layout,.profile-grid{gap:12px!important}
.profile-card,.profile-identity,.profile-shortcuts{border-radius:12px!important}
.profile-card h2,.profile-identity h2{font-size:18px!important}
.profile-shortcut-grid{gap:7px!important}
.profile-shortcut-grid button{min-height:62px!important;padding:9px 10px!important;border-radius:9px!important}

/* Branch / structure */
.branch-layout{gap:12px!important}
.branch-card{border-radius:12px!important}
.branch-card-head{padding:12px 14px!important}
.branch-list{padding:3px 12px 6px!important}
.branch-dep-row,.branch-employee-row{padding:9px 2px!important}
.branch-row-actions button{min-height:30px!important;padding:5px 8px!important}
.branch-add{padding:9px 12px!important}

/* Admin: hierarchy and sections are visually clear but restrained */
.admin-stats{gap:8px!important}
.admin-stat{padding:11px 12px!important;border-radius:10px!important}
.admin-stat b{font-size:21px!important}
.admin-collapsible{margin-bottom:10px!important}
.admin-collapsible-summary{min-height:52px!important;padding:10px 12px!important}
.admin-section-head{gap:10px!important}
.admin-section-head h2{font-size:17px!important}
.admin-org-groups,.admin-employees-card,.admin-audit-card{margin-top:12px!important}
.admin-employees-card .employee-row{min-height:58px!important;padding:8px 9px!important}
.admin-employees-card .employee-actions button{min-height:30px!important;padding:5px 8px!important}
.admin-audit-card .audit-filter-minimal{margin:10px 0!important}
.admin-audit-card .audit-row{min-height:48px!important;padding:7px 9px!important}

/* Modals */
.account-request-card,.admin-edit-modal,.group-management-modal,.workflow-modal{border-radius:14px!important}
.admin-edit-overlay .admin-edit-modal{box-shadow:0 24px 70px rgba(15,35,55,.28)!important}

/* Consistent empty / error states */
.empty,.home-empty,.inbox-empty,.branch-empty{padding:20px 12px!important;border-radius:9px!important}
.err.card{background:#fff!important;border-color:#f0d0cc!important}
.admin-load-warning{border-radius:9px!important;padding:9px 11px!important;margin-bottom:10px!important}

/* Desktop width: enough room for forms without making cards feel stretched */
@media(min-width:1100px){
  #main{max-width:1260px;margin:0 auto}
  .kedo-upload-card,.kedo-order-panel{max-width:1260px}
}
@media(max-width:800px){
  .top{padding:0 12px!important}
  .top>b{font-size:13px!important}
  .top-right{gap:5px!important}
  .global-search-button span{display:none!important}
  .global-search-button{width:36px!important;padding:0!important}
  .kedo-form-panel-head small{max-width:60vw}
}
@media(max-width:620px){
  .top>div:first-child{min-width:0}
  .user-menu-button{max-width:190px!important}
  .user-menu-button{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .kedo-form-panel-head{min-height:58px!important}
  .kedo-form-panel-body{padding:10px!important}
  .workflow-choice-grid{grid-template-columns:1fr!important}
  .document{grid-template-columns:1fr!important}
}

/* =========================================================
   Internal KEDO 5.34 — final UX polish
   No new business logic. This layer only tightens the existing
   visual language and makes the portal feel like one product.
   ========================================================= */

/* The nav already provides the page context; the small technical caption
   between navigation and content is visually redundant. */
#pageCaption{display:none!important}

/* One compact control language everywhere. */
button.primary,button.secondary,button.danger,button.danger-outline,
input,select,textarea{
  font-family:inherit!important;
}
button.primary,button.secondary,button.danger,button.danger-outline{
  min-height:36px!important;
  border-radius:8px!important;
  line-height:1.2!important;
}

/* Header identity/search controls are intentionally identical in size. */
.top-right{display:flex!important;align-items:center!important;gap:7px!important}
.user-menu-button,.global-search-button{
  height:36px!important;
  min-height:36px!important;
  box-sizing:border-box!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  padding:7px 12px!important;
  border:1px solid rgba(255,255,255,.22)!important;
  border-radius:9px!important;
  background:rgba(255,255,255,.075)!important;
  color:#fff!important;
  font-size:12px!important;
  font-weight:600!important;
  box-shadow:none!important;
}
.user-menu-button{max-width:300px!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
.global-search-button{min-width:104px!important}
.user-menu-button:hover,.global-search-button:hover{background:rgba(255,255,255,.14)!important;border-color:rgba(255,255,255,.3)!important}
.notification-button{height:36px!important;width:36px!important;min-width:36px!important;border-radius:9px!important}

/* Navigation: keep the administrative area visually separated without
   making the rest of the navigation noisy. */
.nav{padding:4px!important;min-height:46px!important}
.nav button{height:36px!important;min-height:36px!important}
.nav-admin-separator{margin-left:auto!important;margin-right:5px!important;height:24px!important;background:#cad7e2!important}
.nav button[data-page="admin"]{margin-left:0!important}

/* Compact page header: consistent with the cards below it. */
#main>.page-title{font-size:27px!important;line-height:1.15!important;margin:0 0 5px!important}
#main>.page-title + .muted{font-size:13px!important;color:#708197!important;margin-bottom:13px!important}

/* Every expandable form uses the same small, clickable plaque. */
.kedo-form-panel{border-radius:12px!important;margin-bottom:12px!important}
.kedo-form-panel-head.kedo-collapsible-head{
  min-height:58px!important;
  padding:9px 13px!important;
}
.kedo-form-icon{width:30px!important;height:30px!important;border-radius:8px!important;font-size:13px!important}
.kedo-form-panel-head strong{font-size:14px!important}
.kedo-form-panel-head small{font-size:10px!important}
.kedo-form-chevron{font-size:15px!important}
.kedo-form-panel-body{padding:11px 13px 13px!important}

/* Workflow choices should read as a selector, not three large cards. */
.workflow-choice-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important}
.workflow-choice{min-height:58px!important;padding:8px 9px!important;border-radius:9px!important}
.workflow-choice-icon{width:26px!important;height:26px!important;border-radius:7px!important;font-size:11px!important}
.workflow-choice b{font-size:11px!important}
.workflow-choice small{font-size:9px!important}

/* Lists: compact rows with a predictable density. */
.document,.inbox-item,.task-card,.employee-row,.audit-row,
.branch-dep-row,.branch-employee-row{transition:background .14s ease,border-color .14s ease!important}
.document:hover,.inbox-item:hover,.task-card:hover,.employee-row:hover,
.audit-row:hover,.branch-dep-row:hover,.branch-employee-row:hover{background:#fbfdff!important}

/* Employees and audit should never become a wall of oversized controls. */
.employee-actions,.admin-actions,.doc-actions,.branch-row-actions{display:flex!important;align-items:center!important;gap:5px!important;flex-wrap:wrap!important}
.employee-actions button,.admin-actions button,.doc-actions button,.branch-row-actions button{
  min-height:30px!important;
  padding:5px 8px!important;
  font-size:11px!important;
  border-radius:7px!important;
}

/* Branch selector rows: checkbox, name and action stay on one clean line. */
html body .group-department-item{
  grid-template-columns:18px minmax(0,1fr) auto!important;
  min-height:40px!important;height:40px!important;
  padding:7px 9px!important;
  border-radius:8px!important;
}
html body .group-department-item input[type="checkbox"]{
  width:16px!important;height:16px!important;min-width:16px!important;min-height:16px!important;
}
html body .group-department-item .pending-dep-remove,
html body .group-department-item button{
  min-height:28px!important;height:28px!important;padding:4px 8px!important;font-size:11px!important;
}

/* Profile: useful density without making it feel like an admin table. */
.profile-identity{min-height:96px!important}
.profile-shortcut-grid button{min-height:58px!important}
.profile-info-list>div{font-size:12px!important}

/* Messages: keep the conversation surface stable; only the message list scrolls. */
.chat-shell,.messages-shell{overflow:hidden!important}
.chat-messages,.messages-list,.chat-scroll,.message-list{
  overscroll-behavior:contain!important;
  scrollbar-gutter:stable!important;
}
.chat-message,.message-bubble{animation:none!important;transform:none!important}

/* Notifications are subtle, not modal-looking. */
.kedo-notification-toast{border-radius:10px!important;box-shadow:0 10px 28px rgba(20,45,70,.15)!important}

/* Empty/error states use the same surface as the rest of the portal. */
.empty,.home-empty,.inbox-empty,.branch-empty{border:1px solid #e3eaf0!important;background:#fbfdff!important}
.err.card{box-shadow:0 4px 14px rgba(27,52,78,.035)!important}

/* Prevent long names/titles from breaking the page grid. */
#main strong,#main h1,#main h2,#main h3{overflow-wrap:anywhere}

@media(max-width:900px){
  .workflow-choice-grid{grid-template-columns:1fr!important}
  .nav-admin-separator{margin-left:4px!important}
}
@media(max-width:650px){
  .user-menu-button{max-width:210px!important}
  .global-search-button{min-width:36px!important;width:36px!important;padding:0!important}
  .global-search-button span{display:none!important}
  #main>.page-title{font-size:24px!important}
}

/* =========================================================
   Internal KEDO 5.36 — Soft visual theme / readable density
   Softer surfaces, warmer neutral background and larger type.
   Business logic is intentionally untouched.
   ========================================================= */
:root{
  --kedo-bg:#eef2f6;
  --kedo-surface:#fbfcfd;
  --kedo-surface-soft:#f4f7fa;
  --kedo-border:#d5e0e9;
  --kedo-border-strong:#c5d3df;
  --kedo-text:#263548;
  --kedo-heading:#1d4268;
  --kedo-muted:#718197;
  --kedo-primary:#246fa8;
  --kedo-primary-hover:#1e628f;
  --kedo-success:#25805a;
  --kedo-danger:#b84a43;
  --kedo-radius:12px;
  --kedo-shadow:0 4px 18px rgba(35,55,75,.055);
}

html,body{background:var(--kedo-bg)!important;color:var(--kedo-text)!important}
body{
  font-size:15px!important;
  line-height:1.55!important;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

/* Give the whole portal more breathing room and avoid the tiny-dashboard feel. */
.body{padding:22px 0 42px!important}
#main>.page-title{font-size:30px!important;line-height:1.18!important;margin:0 0 7px!important;letter-spacing:-.018em!important}
#main>.page-title + .muted{font-size:14px!important;line-height:1.5!important;color:#718097!important;margin-bottom:16px!important}
.eyebrow{font-size:11px!important;letter-spacing:.075em!important;color:#718298!important}
.muted{color:var(--kedo-muted)!important}

/* Softer cards: no pure white glare against the page background. */
.card,.stat,.admin-stat,
.kedo-form-panel,
.chat-shell,.messages-shell,
.profile-card,.profile-identity,.profile-shortcuts,
.branch-card,.task-create-shell{
  background:var(--kedo-surface)!important;
  border-color:var(--kedo-border)!important;
  box-shadow:var(--kedo-shadow)!important;
}
.card{padding:19px!important;margin-bottom:16px!important}
.card h2{font-size:20px!important;line-height:1.3!important;color:#29435d!important}

/* Inputs and selects should feel calm rather than bright white. */
input,select,textarea,
.search input,
.kedo-form-panel input,.kedo-form-panel select,.kedo-form-panel textarea{
  background:#f9fbfc!important;
  color:#2b3c50!important;
  border-color:#cbd8e3!important;
  font-size:14px!important;
}
input::placeholder,textarea::placeholder{color:#8997a7!important;opacity:1!important}
input:focus,select:focus,textarea:focus{
  background:#fcfdfe!important;
  border-color:#8eb4d1!important;
  box-shadow:0 0 0 3px rgba(36,111,168,.09)!important;
}

/* Navigation is a quiet shell, not another high-contrast block. */
.nav{
  background:#e7edf3!important;
  border-color:#d4dfe8!important;
  box-shadow:0 2px 10px rgba(35,55,75,.035)!important;
}
.nav button{font-size:15px!important;color:#53657a!important}
.nav button:hover{background:#f8fafb!important;color:#254666!important}
.nav button.active{background:#2b74aa!important;box-shadow:0 2px 7px rgba(36,111,168,.16)!important}

/* Header controls: softer than the old bright contrast, but still clear. */
.user-menu-button,.global-search-button{
  background:rgba(255,255,255,.075)!important;
  border-color:rgba(255,255,255,.20)!important;
  font-size:14px!important;
}

/* Dashboard cards: larger labels and less visual noise. */
.home-metric{min-height:96px!important;padding:15px!important}
.home-metric b{font-size:24px!important}
.home-action-row{min-height:72px!important;padding:12px 14px!important}
.home-action-row strong{font-size:15px!important}
.home-action-row small{font-size:12px!important}
.home-focus.card,.home-columns .card,.leader-control-card{padding:19px!important}
.home-section-head h2{font-size:20px!important}

/* Status/stat cards should not look like white tiles pasted on the page. */
.stat,.admin-stat{background:#f8fafc!important}
.inbox-stat{background:#f8fafc!important;border-color:var(--kedo-border)!important}
.tasks-summary-card{background:#f8fafc!important}

/* Expandable plaques: slightly taller and easier to scan. */
.kedo-form-panel-head.kedo-collapsible-head{
  min-height:70px!important;
  padding:12px 16px!important;
}
.kedo-form-icon{width:36px!important;height:36px!important;border-radius:9px!important;background:#e9f2f8!important;color:#286f9f!important;font-size:14px!important}
.kedo-form-panel-head strong{font-size:16px!important;color:#29435d!important}
.kedo-form-panel-head small{font-size:11px!important;color:#7a899a!important}
.kedo-form-chevron{font-size:17px!important}
.kedo-form-panel-body{padding:14px 16px 17px!important}

/* Workflow choices: readable without returning to oversized tiles. */
.workflow-choice{min-height:68px!important;padding:10px 11px!important;background:#f8fafc!important}
.workflow-choice b{font-size:13px!important}
.workflow-choice small{font-size:10px!important}

/* Lists and audit rows: comfortable reading size. */
.document>div:first-child>strong{font-size:14px!important}
.document .muted{font-size:11px!important}
.inbox-item{padding:11px 12px!important}
.inbox-section-head h2{font-size:19px!important}
.task-card{padding:12px 14px!important}
.admin-employees-card .employee-row{min-height:66px!important;padding:10px 12px!important}
.admin-audit-card .audit-row{min-height:56px!important;padding:9px 12px!important}

/* Buttons remain compact, but text is no longer tiny. */
.primary,.secondary,.danger,.danger-outline,
button.primary,button.secondary,button.danger,button.danger-outline{
  min-height:38px!important;
  padding:8px 13px!important;
  font-size:13px!important;
}
.employee-actions button,.admin-actions button,.doc-actions button,.branch-row-actions button{
  min-height:32px!important;
  padding:6px 9px!important;
  font-size:12px!important;
}

/* Profile: make the identity readable at a glance. */
.profile-identity{padding:19px!important;min-height:112px!important}
.profile-card{padding:19px!important}
.profile-card h2,.profile-identity h2{font-size:20px!important}
.profile-info-list>div{padding:11px 0!important;font-size:13px!important}
.profile-shortcut-grid button{min-height:68px!important;padding:11px 12px!important}

/* Branch rows: compact, but with enough vertical room for labels. */
html body .group-department-item{
  min-height:48px!important;height:48px!important;
  padding:8px 10px!important;
  background:#f8fafc!important;
}
html body .group-department-item button,
html body .group-department-item .pending-dep-remove{
  min-height:30px!important;height:30px!important;font-size:12px!important
}

/* Modals: soften the backdrop and increase text legibility. */
.account-request-card,.admin-edit-modal,.group-management-modal,.workflow-modal{background:#fbfcfd!important}

/* Responsive typography: keep the larger base comfortable on mobile. */
@media(max-width:650px){
  body{font-size:14px!important}
  #main>.page-title{font-size:26px!important}
  .card{padding:15px!important}
  .kedo-form-panel-head.kedo-collapsible-head{min-height:64px!important;padding:10px 12px!important}
  .kedo-form-panel-head strong{font-size:15px!important}
}


/* v5.38 — calm, compact baseline. Keep all expandable forms on one controller. */
:root{
  --kedo-bg:#eef2f5;
  --kedo-surface:#f9fbfc;
  --kedo-surface-soft:#f2f6f8;
  --kedo-border:#d7e0e7;
  --kedo-border-strong:#c8d4de;
  --kedo-text:#2b3b4b;
  --kedo-heading:#23415d;
  --kedo-muted:#718092;
  --kedo-primary:#2d6f9f;
  --kedo-primary-hover:#285f89;
  --kedo-shadow:0 3px 12px rgba(31,55,75,.035);
}
html,body{background:var(--kedo-bg)!important;color:var(--kedo-text)!important}
body{font-size:14px!important;line-height:1.48!important}
.body{padding:18px 0 34px!important}
#main>.page-title{font-size:28px!important;line-height:1.16!important;margin:0 0 8px!important;color:var(--kedo-heading)!important}
#main>.page-title + .muted{font-size:13px!important;color:#768596!important;margin-bottom:14px!important}
.card,.stat,.admin-stat,.kedo-form-panel,.chat-shell,.messages-shell,.profile-card,.profile-identity,.profile-shortcuts,.branch-card,.task-create-shell{
  background:var(--kedo-surface)!important;
  border-color:var(--kedo-border)!important;
  box-shadow:var(--kedo-shadow)!important;
}
.card{padding:16px!important;margin-bottom:13px!important}
.card h2{font-size:18px!important;color:#2a435b!important}

/* Inputs: slightly smaller and less white glare. */
input,select,textarea,.search input,.kedo-form-panel input,.kedo-form-panel select,.kedo-form-panel textarea{
  background:#f5f8fa!important;
  border-color:#cbd7e0!important;
  color:#2f4050!important;
  font-size:13px!important;
}
input:focus,select:focus,textarea:focus{
  background:#f9fbfc!important;
  border-color:#91adc2!important;
  box-shadow:0 0 0 2px rgba(45,111,159,.08)!important;
}

/* Navigation: low contrast, quiet, still clearly interactive. */
.nav{background:#e5ebef!important;border-color:#d2dde5!important;box-shadow:none!important}
.nav button{font-size:14px!important;color:#526476!important}
.nav button:hover{background:#f3f6f8!important;color:#2d4b66!important}
.nav button.active{background:#3977a1!important;box-shadow:0 1px 4px rgba(45,111,159,.13)!important}

/* Header controls stay understated. */
.user-menu-button,.global-search-button{font-size:13px!important;background:rgba(255,255,255,.065)!important;border-color:rgba(255,255,255,.17)!important}

/* One canonical expandable plaque. */
.kedo-form-panel{border-radius:11px!important;margin-bottom:12px!important;overflow:hidden!important}
.kedo-form-panel-head.kedo-collapsible-head{
  min-height:62px!important;
  padding:10px 13px!important;
  border-radius:11px!important;
}
.kedo-form-icon{width:32px!important;height:32px!important;border-radius:8px!important;background:#e8f0f5!important;color:#3a7096!important;font-size:13px!important}
.kedo-form-panel-head strong{font-size:15px!important;color:#2a435b!important}
.kedo-form-panel-head small{font-size:10px!important;color:#7b8997!important}
.kedo-form-chevron{font-size:15px!important;color:#7b8b99!important}
.kedo-form-panel-body{padding:12px 14px 14px!important}
.kedo-form-panel .row{gap:10px!important;margin-bottom:10px!important}
.kedo-form-panel label{font-size:12px!important;color:#40566a!important}
.kedo-form-panel input,.kedo-form-panel select{min-height:36px!important;padding:7px 9px!important}
.kedo-form-panel textarea{min-height:90px!important;padding:8px 9px!important}
.kedo-form-panel .notice{font-size:11px!important;padding:8px 10px!important;margin-bottom:10px!important;background:#f1f5f7!important;border-color:#dbe3e9!important}
.kedo-form-panel .primary,.kedo-form-panel .secondary,.kedo-form-panel .danger,.kedo-form-panel .danger-outline{min-height:34px!important;padding:7px 10px!important;font-size:12px!important}
.kedo-upload-card .upload-section-title{margin:12px 0 7px!important}
.kedo-upload-card .workflow-choice{min-height:62px!important;padding:9px!important;background:#f3f7f9!important}
.kedo-upload-card .workflow-choice b{font-size:12px!important}
.kedo-upload-card .workflow-choice small{font-size:10px!important}
.kedo-upload-card .file-drop-zone{min-height:58px!important;padding:8px 10px!important;background:#f4f8fa!important}

/* Dashboard: fewer tiles, more breathing room, but not oversized. */
.home-metric{min-height:82px!important;padding:13px!important;background:#f5f8fa!important}
.home-metric b{font-size:22px!important}
.home-action-row{min-height:64px!important;padding:10px 12px!important}
.home-action-row strong{font-size:14px!important}
.home-action-row small{font-size:11px!important}
.home-focus.card,.home-columns .card,.leader-control-card{padding:16px!important}
.home-section-head h2{font-size:18px!important}
.stat,.admin-stat,.inbox-stat,.tasks-summary-card{background:#f4f7f9!important}

/* Lists: compact but readable. */
.document{padding:10px 0!important}
.document>div:first-child>strong{font-size:13px!important}
.document .muted{font-size:10px!important}
.inbox-item{padding:10px 11px!important}
.task-card{padding:11px 12px!important}
.admin-employees-card .employee-row{min-height:62px!important;padding:9px 11px!important}
.admin-audit-card .audit-row{min-height:52px!important;padding:8px 11px!important}

/* Buttons: no oversized blocks. */
.primary,.secondary,.danger,.danger-outline,button.primary,button.secondary,button.danger,button.danger-outline{
  min-height:35px!important;padding:7px 11px!important;font-size:12px!important;border-radius:8px!important;
}
.employee-actions button,.admin-actions button,.doc-actions button,.branch-row-actions button{min-height:30px!important;padding:5px 8px!important;font-size:11px!important}

/* Profile and branch controls. */
.profile-identity{padding:16px!important;min-height:100px!important}
.profile-card{padding:16px!important}
.profile-card h2,.profile-identity h2{font-size:19px!important}
.profile-info-list>div{padding:9px 0!important;font-size:12px!important}
.profile-shortcut-grid button{min-height:62px!important;padding:10px!important}
html body .group-department-item{min-height:44px!important;height:44px!important;padding:7px 9px!important}
html body .group-department-item button,html body .group-department-item .pending-dep-remove{min-height:28px!important;height:28px!important;font-size:11px!important}

@media(max-width:650px){
  body{font-size:13px!important}
  #main>.page-title{font-size:24px!important}
  .card{padding:14px!important}
  .kedo-form-panel-head.kedo-collapsible-head{min-height:58px!important;padding:9px 11px!important}
  .kedo-form-panel-head strong{font-size:14px!important}
}

/* =========================================================
   Internal KEDO 5.39 — calmer background + reliable collapsibles
   ========================================================= */
:root{
  --kedo-bg:#e8edf1;
  --kedo-surface:#f7f9fa;
  --kedo-surface-soft:#eef3f6;
  --kedo-border:#d2dde5;
  --kedo-border-strong:#c3d0da;
  --kedo-text:#2b3947;
  --kedo-heading:#23415d;
  --kedo-muted:#6f7e8e;
  --kedo-primary:#2f6f9e;
  --kedo-primary-hover:#285f89;
  --kedo-shadow:0 3px 12px rgba(31,55,75,.045);
}
html,body{background:var(--kedo-bg)!important;color:var(--kedo-text)!important}
.card,.stat,.admin-stat,.kedo-form-panel,.chat-shell,.messages-shell,.profile-card,.profile-identity,.profile-shortcuts,.branch-card,.task-create-shell{
  background:var(--kedo-surface)!important;
  border-color:var(--kedo-border)!important;
  box-shadow:var(--kedo-shadow)!important;
}
/* Never leave an action button visible when its form is collapsed. */
html body .kedo-form-panel.is-collapsed>.kedo-form-panel-body{
  display:none!important;
  max-height:none!important;
  height:0!important;
  min-height:0!important;
  opacity:0!important;
  padding-top:0!important;
  padding-bottom:0!important;
  margin:0!important;
  overflow:hidden!important;
  pointer-events:none!important;
}
html body .kedo-form-panel:not(.is-collapsed)>.kedo-form-panel-body{
  display:block!important;
  height:auto!important;
  max-height:none!important;
  opacity:1!important;
  overflow:visible!important;
  pointer-events:auto!important;
}
html body .kedo-form-panel-head.kedo-collapsible-head{cursor:pointer!important}

/* Audit journal: quieter, denser and easier to scan. */
.admin-audit-card{
  background:#f4f7f8!important;
  border-color:#cfdbe3!important;
  padding:15px!important;
}
.admin-audit-card .admin-section-head{padding-bottom:2px!important}
.admin-audit-card .audit-filter-bar,
.admin-audit-card .audit-filter-minimal{
  background:transparent!important;
  margin:9px 0!important;
  padding:0!important;
  display:flex!important;
  gap:5px!important;
  flex-wrap:wrap!important;
}
.admin-audit-card .audit-filter-minimal button{
  min-height:32px!important;
  padding:6px 10px!important;
  border-radius:7px!important;
  font-size:11px!important;
}
.admin-audit-card .audit-list{
  height:500px!important;
  max-height:500px!important;
  padding:2px 3px 5px 0!important;
  gap:5px!important;
  scrollbar-color:#b8c5cf transparent;
}
.admin-audit-card .audit-row{
  min-height:54px!important;
  padding:8px 11px!important;
  background:#f8fafb!important;
  border-color:#d6e0e7!important;
  border-radius:9px!important;
  box-shadow:none!important;
}
.admin-audit-card .audit-row:hover{
  background:#f3f7f9!important;
  border-color:#c7d6e0!important;
  box-shadow:0 2px 8px rgba(31,55,75,.04)!important;
}
.admin-audit-card .audit-row-top strong{font-size:12px!important;color:#2d4358!important}
.admin-audit-card .audit-row-meta{font-size:10px!important;color:#748394!important}
.admin-audit-card .audit-details summary{font-size:10px!important;color:#376b91!important}
.admin-audit-card .audit-details pre{background:#edf2f5!important;color:#536474!important;border:1px solid #d8e1e7!important}

/* Search and ordinary action buttons share the same quiet geometry. */
.search button,.doc-actions button,.admin-actions button{border-radius:8px!important}

@media(max-width:650px){
  .admin-audit-card .audit-list{height:440px!important;max-height:440px!important}
}


/* v5.40 — canonical collapsible form panels. The action row belongs to the form body and
   must never remain visible while the panel is collapsed. */
html body .kedo-form-panel.is-collapsed > .kedo-form-panel-body,
html body .kedo-form-panel-body[hidden]{
  display:none !important;
  height:0 !important;
  min-height:0 !important;
  max-height:0 !important;
  margin:0 !important;
  padding-top:0 !important;
  padding-bottom:0 !important;
  overflow:hidden !important;
  opacity:0 !important;
  pointer-events:none !important;
}
html body .kedo-form-panel:not(.is-collapsed) > .kedo-form-panel-body{
  display:block !important;
  height:auto !important;
  max-height:none !important;
  overflow:visible !important;
  opacity:1 !important;
  pointer-events:auto !important;
}
.kedo-form-panel-head.kedo-collapsible-head{
  width:100% !important;
  box-sizing:border-box !important;
  min-height:60px !important;
  padding:10px 14px !important;
  margin:0 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:12px !important;
  background:#f7fafc !important;
  border:0 !important;
  border-radius:11px !important;
}
.kedo-form-panel.is-collapsed > .kedo-form-panel-head{
  border-radius:11px !important;
}
.kedo-form-panel:not(.is-collapsed) > .kedo-form-panel-head{
  border-bottom:1px solid #e2e9ef !important;
  border-radius:11px 11px 0 0 !important;
}
.kedo-form-panel-head.kedo-collapsible-head:hover{background:#f2f7fa !important}
.kedo-form-panel-head .kedo-form-icon{
  flex:0 0 32px !important;
  width:32px !important; height:32px !important;
  display:inline-flex !important; align-items:center !important; justify-content:center !important;
  border-radius:8px !important;
  background:#e8f1f6 !important; color:#39769d !important;
}
.kedo-form-panel-head .kedo-form-chevron{
  flex:0 0 auto !important;
  font-size:15px !important; color:#718494 !important;
  transition:transform .18s ease !important;
}
.kedo-form-panel.is-collapsed .kedo-form-chevron{transform:rotate(-90deg) !important}
.kedo-form-panel:not(.is-collapsed) .kedo-form-chevron{transform:rotate(0deg) !important}
.kedo-form-panel-body{box-sizing:border-box !important}
.kedo-form-panel-body > .doc-actions{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:7px !important;
  margin-top:14px !important;
  padding-top:12px !important;
  border-top:1px solid #e7edf2 !important;
}
.kedo-form-panel-body > .doc-actions button{margin:0 !important}
html body .kedo-order-panel .kedo-form-panel-body > .doc-actions{justify-content:flex-end !important; width:100% !important; box-sizing:border-box !important}
html body .kedo-upload-card .kedo-form-panel-body > .doc-actions{justify-content:flex-end !important; width:100% !important; box-sizing:border-box !important}

/* Softer working background: less glare without making the interface grey. */
html,body{background:#edf2f5 !important}
.card,.kedo-form-panel,.stat,.admin-stat,.profile-card,.profile-identity,.profile-shortcuts,.branch-card,.task-create-shell{
  background:#fbfcfd !important;
}


/* =========================================================
   Internal KEDO 5.41 — native form panels
   Document/order upload uses <details>/<summary>. This removes the fragile
   JS/CSS toggle race that previously left only the action button visible.
   ========================================================= */
html body details.kedo-form-panel{
  overflow:hidden !important;
  padding:0 !important;
}
html body details.kedo-form-panel > summary.kedo-form-panel-head{
  list-style:none !important;
  user-select:none !important;
}
html body details.kedo-form-panel > summary.kedo-form-panel-head::-webkit-details-marker{
  display:none !important;
}
html body details.kedo-form-panel:not([open]) > .kedo-form-panel-body{
  display:none !important;
  height:0 !important;
  min-height:0 !important;
  max-height:0 !important;
  margin:0 !important;
  padding:0 !important;
  overflow:hidden !important;
  opacity:0 !important;
  pointer-events:none !important;
}
html body details.kedo-form-panel[open] > .kedo-form-panel-body{
  display:block !important;
  height:auto !important;
  max-height:none !important;
  overflow:visible !important;
  opacity:1 !important;
  pointer-events:auto !important;
  padding:12px 14px 14px !important;
}
html body details.kedo-form-panel[open] > summary.kedo-form-panel-head{
  border-bottom:1px solid #e1e8ee !important;
  border-radius:11px 11px 0 0 !important;
}
html body details.kedo-form-panel:not([open]) > summary.kedo-form-panel-head{
  border-radius:11px !important;
}
html body details.kedo-form-panel > summary .kedo-form-chevron{
  transform:rotate(-90deg) !important;
}
html body details.kedo-form-panel[open] > summary .kedo-form-chevron{
  transform:rotate(0deg) !important;
}

/* KEDO 5.44 — restore the original order form structure. The action row stays INSIDE the card. */
html body .kedo-order-panel .doc-actions{
  justify-content:flex-start !important;
  width:100% !important;
  box-sizing:border-box !important;
  margin-top:14px !important;
  padding-top:12px !important;
  border-top:1px solid #e7edf2 !important;
}
html body .kedo-order-panel .doc-actions button{margin:0 !important}
html body .kedo-order-panel.is-collapsed>.kedo-form-panel-body{
  display:none !important;
  height:0 !important;
  min-height:0 !important;
  max-height:0 !important;
  margin:0 !important;
  padding-top:0 !important;
  padding-bottom:0 !important;
  overflow:hidden !important;
  opacity:0 !important;
  pointer-events:none !important;
}
html body .kedo-order-panel:not(.is-collapsed)>.kedo-form-panel-body{
  display:block !important;
  height:auto !important;
  max-height:none !important;
  opacity:1 !important;
  overflow:visible !important;
  pointer-events:auto !important;
}

/* ---------- Document detail: structured card + original/signed copies ---------- */
.document-detail-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin:16px 0 12px}
.document-detail-subtitle{margin-top:5px;color:#718396;font-size:13px}
.document-detail-card{padding:18px!important}
.detail-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:13px}
.detail-section-head h2{margin:2px 0 0!important;font-size:18px!important}
.document-status-chip,.document-file-count{display:inline-flex;align-items:center;min-height:28px;padding:5px 9px;border-radius:8px;background:#edf4f8;color:#547087;font-size:11px;font-weight:700}
.detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;border:1px solid #e0e8ef;border-radius:10px;overflow:hidden;background:#e0e8ef}
.detail-grid>div{background:#fff;padding:11px 12px;min-width:0}
.detail-grid span{display:block;color:#7a8d9f;font-size:10px;margin-bottom:3px}
.detail-grid strong{display:block;color:#29425b;font-size:13px;line-height:1.35;overflow-wrap:anywhere}
.file-copy-list{display:grid;gap:8px}
.file-copy{display:flex;align-items:center;gap:11px;padding:11px 12px;border:1px solid #dce6ee;border-radius:10px;background:#fbfdff;min-width:0}
.file-copy-signed{background:#f7fbf9;border-color:#cfe4d8}
.file-copy-pending{background:#f8fafc;color:#77899a}
.file-copy-icon{width:36px;height:36px;display:grid;place-items:center;flex:0 0 auto;border-radius:9px;background:#edf4f8;color:#1769aa;font-size:10px;font-weight:800}
.file-copy-signed .file-copy-icon{background:#e7f5ec;color:#18794e}
.file-copy-main{min-width:0;flex:1}
.file-copy-title{font-size:12px;font-weight:800;color:#29425b}
.file-copy-name{margin-top:2px;font-size:12px;color:#405b73;overflow-wrap:anywhere}
.file-copy-meta{margin-top:3px;font-size:10px;color:#8192a2;line-height:1.35;overflow-wrap:anywhere}
.file-copy-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:5px;flex:0 0 auto}
.file-copy-actions button{min-height:31px!important;padding:6px 9px!important;font-size:11px!important}
.document-detail-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px;padding:0 2px 15px}
.signature-info-box{border:1px solid #dce7ee;border-radius:10px;background:#fbfdff;padding:12px}
.signature-info-ok{font-size:12px;font-weight:800;color:#18794e;margin-bottom:11px}
.signature-detail-grid{margin-top:0}
.signature-detail-grid>div{padding:9px 10px}
.break-code{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:10px!important;word-break:break-all}
.signature-history{display:grid;gap:7px;margin-top:10px}
.signature-record{padding:10px 11px;border:1px solid #dce6ee;border-radius:9px;background:#fff}
.signature-record-title{font-size:11px;font-weight:800;color:#1769aa;margin-bottom:7px}
.signature-record-grid{display:grid;grid-template-columns:120px minmax(0,1fr);gap:4px 10px;font-size:11px}
.signature-record-grid span{color:#8192a2}.signature-record-grid strong{color:#334e66}
.signature-record .fingerprint{margin-top:7px;padding-top:6px;border-top:1px solid #edf2f5;font-size:9px;line-height:1.35;word-break:break-all;color:#72869a;font-family:ui-monospace,SFMono-Regular,Consolas,monospace}
.document-detail-lower{gap:12px!important;margin-top:12px!important}
@media(max-width:760px){.document-detail-head{align-items:flex-start;flex-direction:column}.detail-grid{grid-template-columns:1fr}.file-copy{align-items:flex-start;flex-wrap:wrap}.file-copy-actions{width:100%;justify-content:flex-start}.document-detail-actions{justify-content:flex-start}.signature-record-grid{grid-template-columns:1fr}}
