@import url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=Cairo:wght@300;400;500;600;700;800;900&family=Tajawal:wght@300;400;500;600;700;800;900&display=swap');
:root{--navy:#102a43;--navy2:#193b5a;--gold:#b9903d;--bg:#f5f7fa;--line:#dbe3ea;--danger:#a52a2a;--ok:#18794e}*{box-sizing:border-box}body{margin:0;font-family:'Tajawal',Tahoma,Arial,sans-serif;background:var(--bg);color:#1f2933;direction:rtl}a{text-decoration:none;color:inherit}.layout{display:flex;min-height:100vh}.sidebar{width:245px;background:var(--navy);color:#fff;padding:18px;position:sticky;top:0;height:100vh;max-height:100vh;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-gutter:stable;-webkit-overflow-scrolling:touch}.brand{text-align:center;padding-bottom:18px;border-bottom:1px solid #ffffff22}.brand img{width:105px;height:105px;object-fit:contain;background:#fff;border-radius:16px}.brand h2{margin:8px 0 2px}.brand small{color:#d7c088}.nav a{display:block;padding:11px 12px;margin:5px 0;border-radius:8px;color:#eef4f8}.nav a:hover,.nav a.active{background:#ffffff18}.main{flex:1;padding:24px}.topbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:18px;margin-bottom:18px;box-shadow:0 2px 7px #102a4310}.grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.stat strong{font-size:28px;color:var(--navy)}h1,h2,h3{color:var(--navy)}table{width:100%;border-collapse:collapse;background:#fff}th,td{border-bottom:1px solid var(--line);padding:10px;text-align:right;vertical-align:top}th{background:#edf2f7;color:var(--navy)}label{display:block;font-weight:bold;margin-bottom:6px}input,select,textarea{width:100%;padding:10px;border:1px solid #cbd5df;border-radius:7px;background:#fff;font:inherit}textarea{min-height:110px}.form-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}.full{grid-column:1/-1}.btn{display:inline-block;border:0;border-radius:7px;padding:9px 15px;background:var(--navy);color:#fff;cursor:pointer;font:inherit}.btn.gold{background:var(--gold)}.btn.light{background:#e9eef3;color:var(--navy)}.btn.danger{background:var(--danger)}.actions{display:flex;gap:7px;flex-wrap:wrap}.alert{padding:12px;border-radius:8px;margin-bottom:12px}.alert.success{background:#e6f6ee;color:var(--ok)}.alert.error{background:#fdecec;color:var(--danger)}.badge{display:inline-block;padding:4px 8px;border-radius:12px;background:#e7edf3}.login{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,#102a43,#284d6d)}.login-card{width:min(430px,92%);background:#fff;border-radius:16px;padding:28px}.login-card img{display:block;width:140px;margin:0 auto 15px}.document-preview{background:#fff;max-width:850px;margin:auto;padding:45px;border:1px solid #ccc;min-height:1000px;line-height:2}.doc-head{text-align:center;border-bottom:2px solid #222;padding-bottom:12px;margin-bottom:24px}.muted{color:#718096;font-size:13px}@media(max-width:900px){.sidebar{width:76px;padding:10px}.brand h2,.brand small,.nav span{display:none}.brand img{width:55px;height:55px}.main{padding:12px}.grid{grid-template-columns:repeat(2,1fr)}.form-grid{grid-template-columns:1fr}}@media print{.sidebar,.topbar,.no-print{display:none!important}.main{padding:0}.document-preview{border:0;max-width:none;min-height:auto}.card{border:0;box-shadow:none;padding:0}}

/* محرر القوالب المرئي */
.smart-editor{border:1px solid #cbd5df;border-radius:10px;overflow:hidden;background:#fff}.editor-toolbar{display:flex;align-items:center;gap:5px;flex-wrap:wrap;padding:9px;background:#edf2f7;border-bottom:1px solid #dbe3ea}.editor-toolbar button,.editor-toolbar select{width:auto;min-width:38px;padding:7px 9px;border:1px solid #c3ced8;border-radius:6px;background:#fff;color:#102a43;cursor:pointer;font:inherit}.editor-toolbar button:hover{background:#dfe8f0}.toolbar-sep{width:1px;height:25px;background:#cbd5df;margin:0 3px}.variable-bar{display:flex;gap:6px;align-items:center;flex-wrap:wrap;padding:9px 11px;background:#fff8e7;border-bottom:1px solid #ead9ad}.variable-bar span{font-weight:bold;color:#6b5526}.insert-variable{border:1px solid #cfb26d;border-radius:14px;padding:5px 9px;background:#fff;color:#6b5526;cursor:pointer;font:inherit}.insert-variable:hover{background:#f7e8bd}.editor-area{min-height:360px;padding:20px;line-height:2;outline:none;background:#fff;font-size:16px}.editor-area:focus{box-shadow:inset 0 0 0 2px #b9903d55}.editor-area h2,.editor-area h3{margin:12px 0;color:#102a43}.editor-area p{margin:8px 0}@media(max-width:700px){.editor-toolbar button{font-size:13px;padding:6px}.editor-area{min-height:300px;padding:14px}.variable-bar{max-height:130px;overflow:auto}}

/* ترويسة العقود الثنائية - عربية / رمز العدالة / إنجليزية */
.contract-letterhead{display:grid;grid-template-columns:minmax(0,1fr) 180px minmax(0,1fr);align-items:center;gap:18px;border-bottom:2px solid #171c54;padding:0 4px 20px;margin-bottom:30px;color:#111;line-height:1.65}.letterhead-ar{text-align:right}.letterhead-en{text-align:left;font-family:Arial,Tahoma,sans-serif}.contract-letterhead .lawyer-name{display:block;font-size:20px;font-weight:800;margin-bottom:5px;color:#111}.contract-letterhead .lawyer-title{font-size:17px;font-weight:700;margin-bottom:4px}.letterhead-mark{display:flex;justify-content:center;align-items:center;color:#171c54}.letterhead-mark svg{display:block;width:165px;height:165px;max-width:100%}.letterhead-ar>div,.letterhead-en>div{font-size:15px;font-weight:600}.document-preview>h1:first-of-type,.document-preview>h2:first-of-type{text-align:center}@media(max-width:700px){.contract-letterhead{grid-template-columns:1fr 90px 1fr;gap:8px;padding-bottom:14px}.contract-letterhead .lawyer-name{font-size:12px}.contract-letterhead .lawyer-title{font-size:11px}.letterhead-ar>div,.letterhead-en>div{font-size:10px}.letterhead-mark svg{width:85px;height:85px}.document-preview{padding:20px 12px}}@media print{.contract-letterhead{grid-template-columns:minmax(0,1fr) 165px minmax(0,1fr);break-inside:avoid;page-break-inside:avoid}.contract-letterhead .lawyer-name{font-size:17px}.contract-letterhead .lawyer-title{font-size:15px}.letterhead-ar>div,.letterhead-en>div{font-size:13px}.letterhead-mark svg{width:150px;height:150px}}

/* تذييل المستند: بيانات المحامي أسفل يسار الصفحة */
.document-preview{display:flex;flex-direction:column}
.document-body{width:100%}
.document-lawyer-footer{
  margin-top:auto;
  padding-top:70px;
  width:100%;
  text-align:left;
  direction:rtl;
  font-weight:800;
  line-height:1.75;
  color:#111;
  break-inside:avoid;
  page-break-inside:avoid;
}
.document-lawyer-footer>div{font-weight:800;text-align:left}
.document-footer-city-inline{display:none}
@media print{
  .document-preview{min-height:260mm;padding:12mm 14mm}
  .document-lawyer-footer{padding-top:22mm}
}

/* Smart editor tables */
.editor-area .editor-table,.document-preview .editor-table{width:100%;table-layout:fixed;border-collapse:collapse;margin:12px 0;background:transparent}
.editor-area .editor-table td,.editor-area .editor-table th,.document-preview .editor-table td,.document-preview .editor-table th{box-sizing:border-box;border:0;padding:8px;min-width:35px;min-height:28px;background:transparent;vertical-align:top;overflow-wrap:anywhere}
.editor-area .editor-table.table-bordered td,.editor-area .editor-table.table-bordered th,.document-preview .editor-table.table-bordered td,.document-preview .editor-table.table-bordered th{border:1px solid #687786}
.editor-area .editor-table td{outline:1px dashed #cbd5df;outline-offset:-1px}
.editor-area .editor-table.table-bordered td{outline:0}
.editor-area .editor-table td.is-selected-cell,.editor-area .editor-table th.is-selected-cell{box-shadow:inset 0 0 0 2px #b9903d;background:#fff8e7}
.table-tools{padding:10px;border-top:1px solid #dbe3ea;background:#f8fafc}
.table-tools[hidden]{display:none!important}
.table-tools-title{font-weight:bold;color:#102a43;margin-bottom:7px}
.table-tools-row{display:flex;gap:6px;align-items:end;flex-wrap:wrap;margin-bottom:7px}
.table-tools button{width:auto;padding:6px 9px;border:1px solid #c3ced8;border-radius:6px;background:#fff;color:#102a43;cursor:pointer;font:inherit}
.table-tools button:hover{background:#e9eef3}
.table-tools .danger-tool{color:#a52a2a;border-color:#e6b8b8}
.table-tools label{font-size:12px;margin:0;display:flex;flex-direction:column;gap:3px}
.table-tools input[type=number]{width:82px;padding:6px}
.table-tools input[type=color]{width:42px;height:32px;padding:2px}
.table-tools small{display:block;color:#718096}
@media(max-width:700px){.table-tools{overflow-x:auto}.table-tools-row{min-width:620px}.editor-area .editor-table{min-width:420px}.editor-area{overflow-x:auto}}
@media print{.editor-area .editor-table td{outline:0!important}.table-tools{display:none!important}.document-preview .table-borderless td,.document-preview .table-borderless th{border:0!important}}

/* Mobile navigation */
.topbar-title{display:flex;align-items:center;gap:12px;min-width:0}.topbar-title h1{margin:0}.menu-toggle,.sidebar-backdrop{display:none}.menu-toggle{width:42px;height:42px;padding:9px;border:1px solid var(--line);border-radius:9px;background:#fff;cursor:pointer;flex:0 0 auto}.menu-toggle span{display:block;height:2px;margin:5px 0;border-radius:2px;background:var(--navy)}
@media(max-width:900px){
 body.menu-open{overflow:hidden}
 .sidebar{position:fixed;z-index:1001;top:0;right:0;width:min(285px,84vw);height:100vh;padding:18px;transform:translateX(105%);transition:transform .25s ease;box-shadow:-8px 0 24px #102a4333;overflow-y:auto}
 .sidebar.is-open{transform:translateX(0)}
 .brand h2,.brand small,.nav span{display:block}
 .brand img{width:82px;height:82px}
 .menu-toggle{display:inline-block}
 .sidebar-backdrop{position:fixed;z-index:1000;inset:0;border:0;background:#102a4373;cursor:pointer}
 body.menu-open .sidebar-backdrop{display:block}
 .main{width:100%;min-width:0;padding:12px}
 .topbar{gap:10px;align-items:center}
 .topbar-title{flex:1}
 .topbar-title h1{font-size:21px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
}
@media print{.menu-toggle,.sidebar-backdrop{display:none!important}}


/* Mobile PDF-like document viewport */
.document-preview-shell{
  width:100%;
  overflow-x:auto;
  overflow-y:hidden;
  padding:4px 0 14px;
  direction:rtl;
  -webkit-overflow-scrolling:touch;
  scrollbar-gutter:stable;
}
.document-preview-shell .document-preview{direction:rtl}
@media(max-width:700px){
  .document-preview-shell{
    background:#e9eef3;
    border:1px solid var(--line);
    border-radius:10px;
    padding:12px 0 16px;
    box-shadow:inset 0 1px 3px #102a4312;
  }
  .document-preview-shell .document-preview{
    width:794px;
    max-width:none;
    min-width:794px;
    min-height:1123px;
    margin:0 12px;
    padding:45px;
    border:1px solid #c9d1d9;
    box-shadow:0 4px 14px #102a4326;
  }
  .document-preview-shell .contract-letterhead{
    grid-template-columns:minmax(0,1fr) 180px minmax(0,1fr);
    gap:18px;
    padding:0 4px 20px;
  }
  .document-preview-shell .contract-letterhead .lawyer-name{font-size:20px}
  .document-preview-shell .contract-letterhead .lawyer-title{font-size:17px}
  .document-preview-shell .letterhead-ar>div,
  .document-preview-shell .letterhead-en>div{font-size:15px}
  .document-preview-shell .letterhead-mark svg{width:165px;height:165px}
}
@media print{
  .document-preview-shell{overflow:visible;padding:0;border:0;background:none;box-shadow:none}
  .document-preview-shell .document-preview{margin:0;width:auto;min-width:0;box-shadow:none}
}
.section-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:18px}.section-heading h3{margin-top:0}.admin-template-form{display:grid;gap:18px}.template-fields{border-top:1px solid #e7e1d4;padding-top:18px}.template-field-row{display:grid;grid-template-columns:1.1fr 1.2fr .8fr 1fr auto auto;gap:8px;align-items:center;margin-bottom:9px}.check-label{display:flex;align-items:center;gap:5px;white-space:nowrap}.check-label input{width:auto}.remove-template-field{width:38px;height:38px;border:0;border-radius:8px;background:#f7e5e5;color:#9b2226;font-size:22px;cursor:pointer}.table-scroll{overflow-x:auto}@media(max-width:900px){.template-field-row{grid-template-columns:1fr 1fr}.template-field-row .check-label,.template-field-row .remove-template-field{justify-self:start}.section-heading{align-items:stretch;flex-direction:column}}

/* Lawyer private templates: collapsed title list */
.template-count{display:inline-flex;align-items:center;justify-content:center;min-width:70px;padding:7px 11px;border-radius:18px;background:#edf2f7;color:#102a43;font-size:13px;font-weight:700}
.empty-state{padding:22px;border:1px dashed #cbd5df;border-radius:10px;text-align:center;color:#718096;background:#f8fafc}
.lawyer-template-item{border:1px solid #dbe3ea;border-radius:11px;background:#fff;margin-bottom:10px;overflow:hidden}
.lawyer-template-item>summary{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:12px;padding:15px 17px;cursor:pointer;list-style:none;background:#f8fafc;transition:background .2s ease}
.lawyer-template-item>summary::-webkit-details-marker{display:none}
.lawyer-template-item>summary:hover,.lawyer-template-item[open]>summary{background:#edf2f7}
.lawyer-template-title{font-weight:800;color:#102a43;overflow-wrap:anywhere}
.lawyer-template-base{font-size:12px;color:#718096}
.lawyer-template-chevron{font-size:20px;line-height:1;transition:transform .2s ease}
.lawyer-template-item[open] .lawyer-template-chevron{transform:rotate(180deg)}
.lawyer-template-panel{padding:18px;border-top:1px solid #dbe3ea}
.field-label-spaced{margin-top:14px}
.template-edit-actions{display:flex;justify-content:flex-start;margin-top:14px}
.delete-template-form{display:flex;justify-content:flex-end;padding-top:14px;margin-top:16px;border-top:1px solid #edf0f2}
.btn.danger{background:#a52a2a;color:#fff;border-color:#a52a2a}
.btn.danger:hover{background:#852020}
@media(max-width:700px){
 .lawyer-template-item>summary{grid-template-columns:minmax(0,1fr) auto;padding:13px}
 .lawyer-template-base{grid-column:1/2}
 .lawyer-template-chevron{grid-column:2;grid-row:1/3}
 .lawyer-template-panel{padding:12px}
 .delete-template-form,.template-edit-actions{justify-content:stretch}
 .delete-template-form .btn,.template-edit-actions .btn{width:100%}
}
@media print{.lawyer-template-item>summary,.delete-template-form{display:none!important}.lawyer-template-panel{border:0;padding:0}}

/* Multiple private copies from each core template */
.template-copy-form {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 360px;
}
.template-copy-form input {
  flex: 1 1 230px;
  min-width: 180px;
}
@media (max-width: 700px) {
  .template-copy-form {
    min-width: 280px;
    flex-direction: column;
    align-items: stretch;
  }
  .template-copy-form input { min-width: 0; width: 100%; }
}


/* نسخ القوالب الخاصة */
.private-template-copy-form{margin-top:16px;padding-top:16px;border-top:1px solid #edf0f2}
.private-template-copy-form>label{display:block;font-weight:700;margin-bottom:8px}
.private-template-copy-row{display:flex;align-items:center;gap:10px}
.private-template-copy-row input{flex:1;min-width:220px}
.private-template-copy-form small{display:block;margin-top:7px}
@media (max-width:700px){
 .private-template-copy-row{flex-direction:column;align-items:stretch}
 .private-template-copy-row input,.private-template-copy-row .btn{width:100%;min-width:0}
}
@media print{.private-template-copy-form{display:none!important}}

/* PDF export choices: normal flow or dynamically fitted one-page body. */
.pdf-print-actions{margin-bottom:12px}

body.print-one-page,
body.print-one-page .layout,
body.print-one-page .main,
body.print-one-page .document-preview-shell{
  /* One-page export uses the full A4 portrait height. The print script
     also fixes this mode to A4 portrait, so the body is not needlessly
     compressed to the 210mm landscape height. */
  height:297mm!important;
  max-height:297mm!important;
  min-height:0!important;
  overflow:hidden!important;
}
body.print-one-page .layout{display:block!important}
body.print-one-page .main{padding:0!important;margin:0!important}
body.print-one-page .document-preview-shell{padding:0!important;margin:0!important}
body.print-one-page .document-preview{
  position:relative!important;
  display:block!important;
  width:210mm!important;
  height:297mm!important;
  min-height:297mm!important;
  max-height:297mm!important;
  margin:0 auto!important;
  padding:8mm 14mm 8mm!important;
  overflow:hidden!important;
  break-after:avoid-page!important;
  page-break-after:avoid!important;
}
/* The letterhead remains exactly at its normal print size. */
body.print-one-page .contract-letterhead{
  transform:none!important;
  zoom:1!important;
  flex:none!important;
  break-inside:avoid!important;
  page-break-inside:avoid!important;
}
/* The contract typography is calculated by JavaScript from its real rendered height. */
body.print-one-page .document-body{
  display:block!important;
  width:100%!important;
  max-height:none!important;
  overflow:hidden!important;
  font-size:var(--document-one-page-font-size,16px)!important;
  line-height:var(--document-one-page-line-height,1.32)!important;
}
body.print-one-page .document-body *{
  font-size:inherit!important;
  line-height:inherit!important;
}
body.print-one-page .document-body p,
body.print-one-page .document-body div,
body.print-one-page .document-body h1,
body.print-one-page .document-body h2,
body.print-one-page .document-body h3,
body.print-one-page .document-body h4{
  margin-top:.22em!important;
  margin-bottom:.22em!important;
}
body.print-one-page .document-body td,
body.print-one-page .document-body th{
  padding:.22em .35em!important;
}
body.print-one-page .document-lawyer-footer{
  position:static!important;
  display:block!important;
  width:100%!important;
  margin:var(--document-one-page-footer-gap,6px) 0 0!important;
  padding:0!important;
  text-align:left!important;
  direction:rtl!important;
  font-size:var(--document-one-page-font-size,16px)!important;
  line-height:var(--document-one-page-line-height,1.32)!important;
  break-before:avoid!important;
  page-break-before:avoid!important;
  break-inside:avoid!important;
  page-break-inside:avoid!important;
}
body.print-one-page .document-lawyer-footer>div{
  font-size:inherit!important;
  line-height:inherit!important;
  text-align:left!important;
  margin:0!important;
  padding:0!important;
}
body.print-one-page .document-footer-city-inline{display:inline!important}
body.print-one-page .document-footer-city-line{display:none!important}


@media print{
  @page{size:A4 portrait;margin:0}
  body.print-one-page{margin:0!important;padding:0!important}
  body.print-one-page .document-preview{
    border:0!important;
    box-shadow:none!important;
  }
}


/* Mobile-safe one-page PDF sizing. This applies only while the one-page button is active. */
body.print-one-page{
  width:210mm!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  overflow:visible!important;
}
body.print-one-page .layout,
body.print-one-page .main,
body.print-one-page .document-preview-shell{
  width:210mm!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  overflow:visible!important;
}
body.print-one-page .document-preview{
  width:210mm!important;
  height:295.5mm!important;
  min-height:295.5mm!important;
  max-height:295.5mm!important;
  margin:0!important;
  padding:8mm 14mm!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
}
body.print-one-page .contract-letterhead{
  grid-template-columns:minmax(0,1fr) 165px minmax(0,1fr)!important;
  gap:18px!important;
  padding:0 4px 20px!important;
  margin-bottom:30px!important;
}
body.print-one-page .contract-letterhead .lawyer-name{font-size:17px!important}
body.print-one-page .contract-letterhead .lawyer-title{font-size:15px!important}
body.print-one-page .letterhead-ar>div,
body.print-one-page .letterhead-en>div{font-size:13px!important}
body.print-one-page .letterhead-mark svg{width:150px!important;height:150px!important}

@media(max-width:700px){
  body.print-one-page-mobile,
  body.print-one-page-mobile .layout,
  body.print-one-page-mobile .main,
  body.print-one-page-mobile .document-preview-shell{
    width:210mm!important;
    min-width:210mm!important;
    max-width:210mm!important;
  }
  body.print-one-page-mobile .document-preview{
    width:210mm!important;
    min-width:210mm!important;
    max-width:210mm!important;
    height:295.5mm!important;
    min-height:295.5mm!important;
    max-height:295.5mm!important;
    padding:8mm 14mm!important;
    transform:none!important;
    zoom:1!important;
  }
}

@media print{
  @page{size:A4 portrait;margin:0}
  html,
  body.print-one-page{
    width:210mm!important;
    height:auto!important;
    min-height:0!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
  }
  body.print-one-page .layout,
  body.print-one-page .main,
  body.print-one-page .document-preview-shell{
    width:210mm!important;
    height:auto!important;
    min-height:0!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
  }
  body.print-one-page .document-preview{
    width:210mm!important;
    height:295.5mm!important;
    min-height:295.5mm!important;
    max-height:295.5mm!important;
    margin:0!important;
    padding:8mm 14mm!important;
    border:0!important;
    box-shadow:none!important;
    overflow:hidden!important;
    break-after:avoid-page!important;
    page-break-after:avoid!important;
  }
}

/* Add a new document party directly from a client field. */
.document-client-field{display:grid;gap:9px}
.new-client-panel{padding:12px;border:1px solid #dbe3ea;border-radius:9px;background:#f8fafc}
.new-client-panel[hidden]{display:none!important}
.new-client-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}
.new-client-note{margin:9px 0 0}
@media(max-width:700px){.new-client-grid{grid-template-columns:1fr}}

/* Professional dashboard */
.dashboard-hero{display:flex;align-items:center;justify-content:space-between;gap:22px;margin-bottom:18px;padding:26px 28px;border-radius:18px;background:linear-gradient(135deg,#102a43,#1d496c);color:#fff;box-shadow:0 12px 30px #102a4324;overflow:hidden;position:relative}.dashboard-hero:after{content:"";position:absolute;width:220px;height:220px;border-radius:50%;left:-70px;top:-115px;border:42px solid #ffffff0b}.dashboard-hero>div{position:relative;z-index:1}.dashboard-eyebrow{display:inline-block;color:#e2c77f;font-size:13px;font-weight:700;margin-bottom:6px}.dashboard-hero h2{color:#fff;margin:0 0 7px;font-size:28px}.dashboard-hero p{margin:0;color:#dbe8f1;line-height:1.8}.dashboard-date{min-width:145px;padding:13px 16px;border:1px solid #ffffff26;border-radius:12px;background:#ffffff10;text-align:center}.dashboard-date span,.dashboard-date strong{display:block}.dashboard-date span{font-size:12px;color:#cbdbe7;margin-bottom:5px}.dashboard-date strong{font-size:16px}.dashboard-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}.dashboard-stat{display:flex;align-items:center;gap:14px;min-height:126px;padding:18px;background:#fff;border:1px solid var(--line);border-radius:15px;box-shadow:0 5px 18px #102a430c;transition:transform .2s ease,box-shadow .2s ease}.dashboard-stat:hover{transform:translateY(-2px);box-shadow:0 10px 24px #102a4316}.stat-icon{display:grid;place-items:center;width:48px;height:48px;flex:0 0 48px;border-radius:13px;background:#edf3f7;color:var(--navy);font-size:20px;font-weight:900}.dashboard-stat:nth-child(2) .stat-icon{background:#f7f1df;color:#8a6824}.dashboard-stat:nth-child(3) .stat-icon{background:#e8f5ef;color:#18794e}.dashboard-stat:nth-child(4) .stat-icon{background:#f1ebf8;color:#65418a}.dashboard-stat div{min-width:0}.dashboard-stat small,.dashboard-stat em{display:block;font-style:normal}.dashboard-stat small{color:#718096;font-size:12px;font-weight:700}.dashboard-stat strong{display:block;margin:4px 0 3px;color:var(--navy);font-size:27px;line-height:1}.dashboard-stat em{color:#8a96a3;font-size:11px}.subscription-text{font-size:21px!important}.subscription-text.active{color:var(--ok)}.subscription-text.inactive{color:var(--danger)}.dashboard-columns{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(270px,.75fr);gap:18px}.dashboard-panel{margin-bottom:18px;padding:0;overflow:hidden}.dashboard-wide{min-width:0}.dashboard-panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 20px;border-bottom:1px solid #edf1f4}.dashboard-panel-head h3{margin:0 0 4px;font-size:17px}.dashboard-panel-head p{margin:0;color:#84909c;font-size:12px}.dashboard-link{color:#8a6824;font-size:12px;font-weight:700}.dashboard-table th{padding:10px 16px;background:#f8fafc;font-size:12px}.dashboard-table td{padding:13px 16px;font-size:13px}.dashboard-table td strong,.dashboard-table td small{display:block}.dashboard-table td small{margin-top:4px;color:#8a96a3;font-size:11px}.status-pill{display:inline-flex;align-items:center;padding:5px 9px;border-radius:20px;background:#edf2f7;color:#4b5b6b;font-size:11px;font-weight:700;white-space:nowrap}.status-pill.is-active,.status-pill.status-approved{background:#e5f5ed;color:#18794e}.status-pill.is-pending,.status-pill.status-draft{background:#fff4d9;color:#80611c}.status-pill.status-saved{background:#e7f0fa;color:#255d8b}.status-pill.status-cancelled{background:#fdecec;color:#a52a2a}.row-open{display:inline-block;padding:6px 10px;border-radius:7px;background:#edf2f7;color:var(--navy);font-size:12px;font-weight:700}.quick-actions{padding:10px}.quick-actions>a{display:flex;align-items:center;gap:12px;padding:13px 10px;border-radius:10px;transition:background .2s}.quick-actions>a:hover{background:#f6f8fa}.quick-actions>a>span{display:grid;place-items:center;width:38px;height:38px;border-radius:10px;background:#edf2f7;color:var(--navy);font-size:11px;font-weight:800}.quick-actions strong,.quick-actions small{display:block}.quick-actions strong{font-size:13px;color:var(--navy)}.quick-actions small{margin-top:3px;color:#84909c;font-size:11px}.dashboard-actions-card{padding:0;overflow:hidden}.dashboard-action-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;padding:18px}.dashboard-action-grid>a{display:flex;align-items:center;gap:12px;padding:16px;border:1px solid #e2e8ee;border-radius:12px;background:#fafbfd;transition:.2s ease}.dashboard-action-grid>a:hover{border-color:#b9903d;transform:translateY(-2px)}.dashboard-action-grid>a>span{display:grid;place-items:center;width:42px;height:42px;flex:0 0 42px;border-radius:11px;background:#edf2f7;color:var(--navy);font-size:18px;font-weight:900}.dashboard-action-grid>a.primary-action{background:var(--navy);border-color:var(--navy)}.dashboard-action-grid>a.primary-action span{background:#ffffff18;color:#fff}.dashboard-action-grid>a.primary-action strong{color:#fff}.dashboard-action-grid>a.primary-action small{color:#cddbe6}.dashboard-action-grid strong,.dashboard-action-grid small{display:block}.dashboard-action-grid strong{color:var(--navy);font-size:13px}.dashboard-action-grid small{margin-top:4px;color:#84909c;font-size:11px;line-height:1.5}.recent-client-list{padding:8px 16px 14px}.recent-client-list>div{display:flex;align-items:center;gap:11px;padding:11px 0;border-bottom:1px solid #edf1f4}.recent-client-list>div:last-child{border-bottom:0}.recent-client-list>div>span{display:grid;place-items:center;width:38px;height:38px;flex:0 0 38px;border-radius:50%;background:#edf2f7;color:var(--navy);font-weight:800}.recent-client-list p{margin:0;min-width:0}.recent-client-list strong,.recent-client-list small{display:block}.recent-client-list strong{font-size:13px;color:var(--navy);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.recent-client-list small{margin-top:3px;color:#84909c;font-size:11px}.dashboard-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:190px;padding:30px;text-align:center;color:#7b8794}.dashboard-empty strong{color:var(--navy);margin-bottom:7px}.dashboard-empty.compact{min-height:160px}
@media(max-width:1100px){.dashboard-stats{grid-template-columns:repeat(2,1fr)}.dashboard-action-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:760px){.dashboard-hero{align-items:flex-start;flex-direction:column;padding:21px}.dashboard-hero h2{font-size:23px}.dashboard-date{width:100%;text-align:right}.dashboard-stats{grid-template-columns:1fr 1fr;gap:10px}.dashboard-stat{min-height:108px;padding:14px;gap:10px}.stat-icon{width:40px;height:40px;flex-basis:40px}.dashboard-stat strong{font-size:23px}.dashboard-columns{grid-template-columns:1fr}.dashboard-action-grid{grid-template-columns:1fr 1fr;padding:12px}.dashboard-action-grid>a{align-items:flex-start;padding:13px}.dashboard-panel-head{padding:15px}.dashboard-table{min-width:690px}}
@media(max-width:460px){.dashboard-stats{grid-template-columns:1fr}.dashboard-action-grid{grid-template-columns:1fr}.dashboard-hero p{font-size:13px}.dashboard-stat{min-height:auto}.dashboard-date{display:flex;align-items:center;justify-content:space-between}.dashboard-date span{margin:0}}


/* Document copy controls */
.document-clone-form{display:inline-flex;gap:6px;align-items:center;flex-wrap:wrap}
.document-clone-form input[name="clone_title"]{min-width:220px}
@media(max-width:700px){.document-clone-form{width:100%}.document-clone-form input[name="clone_title"]{min-width:0;flex:1 1 180px}}

/* Document search */
.document-search-card{margin-bottom:18px}.document-search-form{display:grid;gap:14px}.document-search-main{display:grid;grid-template-columns:minmax(260px,1fr) auto auto auto;gap:10px;align-items:center}.document-search-main input{min-height:46px}.document-date-shortcuts{display:flex;gap:8px;flex-wrap:wrap}.search-chip{border:1px solid var(--border,#d9dee8);background:#fff;border-radius:999px;padding:8px 14px;cursor:pointer;font:inherit}.search-chip.active,.search-chip:hover{background:var(--primary,#163a5f);color:#fff;border-color:var(--primary,#163a5f)}.advanced-search-panel{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:16px;border:1px solid var(--border,#d9dee8);border-radius:14px;background:#f8fafc}.advanced-search-panel[hidden]{display:none}.advanced-search-panel .full{grid-column:1/-1}.advanced-search-actions{display:flex;align-items:end}.document-search-card label{display:block;margin-bottom:6px;font-weight:700}.document-search-card input,.document-search-card select{width:100%}
@media(max-width:760px){.document-search-main{grid-template-columns:1fr 1fr}.document-search-main input{grid-column:1/-1}.document-search-main .btn{width:100%}.advanced-search-panel{grid-template-columns:1fr}.advanced-search-panel .full{grid-column:auto}.document-date-shortcuts{display:grid;grid-template-columns:1fr 1fr}.search-chip{width:100%}}


/* Subscription management */
.subscription-summary{display:flex;justify-content:space-between;align-items:center;gap:24px;padding:24px;margin-bottom:20px;border-radius:18px;background:#fff;border:1px solid var(--border,#e5e7eb);box-shadow:0 10px 30px rgba(15,23,42,.06)}
.subscription-summary h2{margin:6px 0;font-size:28px}.subscription-summary p{margin:0;color:#64748b}.subscription-summary>div>span{font-size:13px;color:#64748b}
.subscription-days{min-width:125px;text-align:center;padding:16px 20px;border-radius:16px;background:rgba(15,23,42,.04)}.subscription-days strong{display:block;font-size:34px;line-height:1}.subscription-days span{display:block;margin-top:7px}
.subscription-active{border-inline-start:5px solid #16a34a}.subscription-soon{border-inline-start:5px solid #ca8a04}.subscription-warning{border-inline-start:5px solid #ea580c}.subscription-danger,.subscription-expired{border-inline-start:5px solid #dc2626}
.status-pill{display:inline-flex;align-items:center;justify-content:center;padding:6px 10px;border-radius:999px;font-size:12px;font-weight:700;white-space:nowrap}.status-active{background:#dcfce7;color:#166534}.status-soon{background:#fef9c3;color:#854d0e}.status-warning{background:#ffedd5;color:#9a3412}.status-danger,.status-expired{background:#fee2e2;color:#991b1b}
.subscription-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.renewal-form{display:flex;align-items:center;gap:8px;flex-wrap:nowrap}.renewal-form select{min-width:105px;margin:0}
@media(max-width:700px){.subscription-summary{align-items:stretch;flex-direction:column}.subscription-days{width:100%}.renewal-form{align-items:stretch;flex-direction:column}.renewal-form select,.renewal-form .btn{width:100%}}


/* Subscription extension requests */
.subscription-request-card{margin-top:18px}
.request-reference{display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding:18px;border:1px dashed #b89242;border-radius:12px;background:#fffaf0}
.request-reference span,.request-reference em{color:#6b7280;font-style:normal}
.request-reference strong,.request-number{font-size:1.35rem;letter-spacing:3px;font-variant-numeric:tabular-nums;direction:ltr;display:inline-block}
.reject-request-form{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.reject-request-form input{min-width:170px}
@media(max-width:700px){.request-reference{align-items:flex-start;flex-direction:column}.renewal-form{align-items:stretch}.renewal-form select,.renewal-form button,.reject-request-form input,.reject-request-form button{width:100%}}

/* Lawyer profile permissions */
.locked-label{display:inline-block;margin-inline-start:6px;padding:2px 7px;border-radius:999px;background:#f0f1f3;color:#6b7280;font-size:.72rem;font-weight:600}
.locked-input[readonly]{background:#f5f6f8;color:#5f6670;border-color:#dfe3e8;cursor:not-allowed;box-shadow:none}
.password-card{margin-top:18px}
@media (max-width:700px){.locked-label{display:block;width:max-content;margin:4px 0 0}}

/* In-app notifications */
.topbar-user{display:flex;align-items:center;gap:12px}
.notification-bell{position:relative;display:inline-flex;align-items:center;justify-content:center;width:42px;height:42px;border:1px solid #e5e7eb;border-radius:12px;background:#fff;text-decoration:none;font-size:20px}
.notification-bell b{position:absolute;top:-6px;left:-6px;min-width:20px;height:20px;padding:0 5px;border-radius:10px;background:#b42318;color:#fff;font-size:11px;line-height:20px;text-align:center}
.nav-count{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;padding:0 6px;border-radius:11px;background:#b42318;color:#fff;font-size:11px;margin-inline-start:6px}
.notifications-page{max-width:980px;margin-inline:auto}
.notification-list{display:grid;gap:10px;margin-top:18px}
.notification-item{display:grid;grid-template-columns:12px 1fr;gap:12px;padding:16px;border:1px solid #e5e7eb;border-radius:14px;text-decoration:none;color:inherit;background:#fff;transition:.2s ease}
.notification-item:hover{transform:translateY(-1px);box-shadow:0 8px 24px rgba(15,23,42,.08)}
.notification-item.is-unread{background:#fffaf0;border-color:#e7c66b}
.notification-dot{width:9px;height:9px;border-radius:50%;background:#94a3b8;margin-top:7px}
.notification-item.is-unread .notification-dot{background:#c6921f}
.notification-item strong{display:block;margin-bottom:5px}
.notification-item p{margin:0 0 7px;line-height:1.7;color:#475569}
.notification-item small{color:#94a3b8}
.empty-notifications{text-align:center;padding:38px 20px;color:#64748b;border:1px dashed #cbd5e1;border-radius:14px}
@media(max-width:700px){.topbar-user>span{display:none}.notification-bell{width:38px;height:38px}.notifications-page .section-heading{align-items:flex-start;gap:12px}.notification-item{padding:13px}}


/* Public document verification and non-flowing QR layer. */
.document-preview{position:relative}
.verification-summary{max-width:850px;margin:0 auto 12px;display:flex;justify-content:space-between;align-items:center;gap:12px;background:#fff;border:1px solid var(--line);border-radius:10px;padding:10px 14px}
.verification-summary a{color:var(--navy);text-decoration:underline}
.document-verification-qr{position:absolute;right:5mm;bottom:4mm;width:16mm;height:20mm;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:1mm;z-index:3;color:#111;font-family:Arial,sans-serif;font-size:7px;line-height:1;text-decoration:none}
.document-verification-qr img{display:block;width:16mm;height:16mm;object-fit:contain;background:#fff}
.document-verification-qr span{display:block;white-space:nowrap;letter-spacing:.2px}
.verify-public-page{min-height:100vh;background:linear-gradient(135deg,#102a43,#284d6d);padding:24px}
.verify-public-wrap{min-height:calc(100vh - 48px);display:grid;place-items:center}
.verify-public-card{width:min(620px,100%);background:#fff;border-radius:18px;padding:28px;box-shadow:0 18px 55px #0003}
.verify-public-logo{display:block;width:105px;height:105px;object-fit:contain;margin:0 auto 10px}
.verify-public-card h1{text-align:center;margin:0 0 24px}
.verify-search-row{display:grid;grid-template-columns:1fr auto;gap:8px}
.verify-result{margin-top:20px;border-radius:12px;padding:16px}
.verify-result.is-valid{background:#e6f6ee;color:#145c3e}
.verify-result.is-invalid{background:#fdecec;color:#8f2424}
.verify-result>strong{display:block;font-size:18px;margin-bottom:10px}
.verify-result dl{margin:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.verify-result dl div{background:#ffffffa8;border-radius:8px;padding:10px}
.verify-result dt{font-size:12px;color:#667; margin-bottom:4px}.verify-result dd{margin:0;font-weight:700}
@media(max-width:600px){.verify-search-row{grid-template-columns:1fr}.verify-result dl{grid-template-columns:1fr}.verification-summary{align-items:flex-start;flex-direction:column}}
@media print{.document-verification-qr{right:5mm!important;bottom:4mm!important;width:16mm!important;height:20mm!important}.document-verification-qr img{width:16mm!important;height:16mm!important}}

/* شريط إجراءات صفحة عرض المستند */
.document-actionbar{display:grid;grid-template-columns:minmax(300px,1.05fr) minmax(320px,1.35fr);gap:12px;max-width:1100px;margin:0 auto 16px;align-items:stretch}
.document-actionbar-group{position:relative;display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:28px 12px 12px;border:1px solid var(--line);border-radius:14px;background:#fff;box-shadow:0 4px 16px #102a430d}
.document-actionbar-label{position:absolute;top:8px;right:12px;color:#718096;font-size:12px;font-weight:700}
.document-actionbar form{display:flex;margin:0}
.document-action-btn{min-height:44px;display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid transparent;border-radius:10px;padding:8px 12px;font:inherit;font-weight:700;line-height:1.15;cursor:pointer;white-space:nowrap;transition:transform .15s ease,box-shadow .15s ease,background .15s ease}
.document-action-btn:hover{transform:translateY(-1px);box-shadow:0 5px 12px #102a4318}
.document-action-btn small{display:block;font-size:10px;font-weight:400;opacity:.78}
.document-action-btn-primary{background:var(--navy);color:#fff}
.document-action-btn-gold{background:var(--gold);color:#fff}
.document-action-btn-light{background:#f3f6f9;color:var(--navy);border-color:#dbe3ea}
.document-action-icon{width:25px;height:25px;display:inline-flex;align-items:center;justify-content:center;flex:0 0 25px;border-radius:7px;background:#ffffff24;font-size:12px;font-weight:800}
.document-action-btn-light .document-action-icon{background:#e3eaf1}
.document-actionbar-copy{grid-column:1/-1}
.document-clone-form-modern{width:100%;display:grid!important;grid-template-columns:minmax(220px,1fr) auto;gap:8px;align-items:center}
.document-clone-form-modern input{height:44px;margin:0;border-radius:10px}
@media(min-width:1050px){.document-actionbar{grid-template-columns:minmax(330px,.95fr) minmax(450px,1.35fr)}.document-actionbar-copy{grid-column:1/-1}}
@media(max-width:760px){.document-actionbar{grid-template-columns:1fr;gap:9px;margin-bottom:12px}.document-actionbar-copy{grid-column:auto}.document-actionbar-group{padding:27px 9px 9px;gap:7px}.document-action-btn{flex:1;min-width:135px;padding:8px 9px;font-size:13px}.document-actionbar form{flex:1}.document-actionbar form .document-action-btn{width:100%}.document-clone-form-modern{grid-template-columns:1fr!important;flex-basis:100%!important}.document-clone-form-modern .document-action-btn{width:100%}}
@media(max-width:430px){.document-action-btn{min-width:calc(50% - 4px)}.document-actionbar-manage form,.document-actionbar-manage>a{flex:1 1 calc(50% - 4px)}.document-actionbar-print .document-action-btn{flex-basis:100%}}
@media print{.document-actionbar{display:none!important}}

/* Private template editor on mobile: keep the desktop editing canvas and controls. */
@media (max-width:700px){
  .lawyer-template-panel{
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-inline:contain;
  }
  .lawyer-template-panel>.smart-editor-form{
    min-width:850px;
  }
  .lawyer-template-panel .smart-editor{
    overflow:visible;
  }
  .lawyer-template-panel .editor-toolbar{
    flex-wrap:wrap;
    padding:9px;
    gap:5px;
  }
  .lawyer-template-panel .editor-toolbar button,
  .lawyer-template-panel .editor-toolbar select{
    font-size:inherit;
    padding:7px 9px;
  }
  .lawyer-template-panel .variable-bar{
    max-height:none;
    overflow:visible;
    flex-wrap:wrap;
    padding:9px 11px;
  }
  .lawyer-template-panel .editor-area{
    min-height:360px;
    padding:20px;
    overflow-x:visible;
    font-size:16px;
  }
}

/* Public one-page website */
html{scroll-behavior:smooth}
.public-home{margin:0;background:#fff;color:#162536;font-family:Tahoma,Arial,sans-serif}
.site-container{width:min(1160px,calc(100% - 32px));margin-inline:auto}
.site-header{position:sticky;top:0;z-index:50;background:#fffffff2;backdrop-filter:blur(12px);border-bottom:1px solid #e8edf2}
.site-nav-wrap{height:78px;display:flex;align-items:center;justify-content:space-between;gap:22px}
.site-brand{display:flex;align-items:center;gap:10px;color:#102a43;text-decoration:none}.site-brand img{width:55px;height:55px;object-fit:contain}.site-brand span{display:flex;flex-direction:column}.site-brand b{font-size:22px}.site-brand small{font-size:11px;color:#718096}
.site-nav{display:flex;align-items:center;gap:8px}.site-nav a{padding:10px 13px;border-radius:9px;color:#243b53;text-decoration:none;font-weight:700;font-size:14px}.site-nav a:hover{background:#f1f5f8;color:#102a43}.site-nav .site-login-link{background:#102a43;color:#fff;padding-inline:20px}.site-nav .site-login-link:hover{background:#183f60;color:#fff}.site-menu-toggle{display:none;border:0;background:#102a43;color:#fff;border-radius:9px;width:42px;height:42px;font-size:22px}
.site-slider{position:relative;min-height:610px;overflow:hidden;background:#102a43}.site-slide{position:absolute;inset:0;opacity:0;visibility:hidden;transform:translateX(-25px);transition:opacity .65s ease,transform .65s ease,visibility .65s;background:radial-gradient(circle at 15% 15%,#c89c4830,transparent 32%),linear-gradient(135deg,#0d2337,#1f4d70)}.site-slide:nth-child(2){background:radial-gradient(circle at 80% 25%,#d6ad5b33,transparent 34%),linear-gradient(135deg,#142d42,#315d78)}.site-slide.is-active{opacity:1;visibility:visible;transform:none}.site-slide-content{min-height:610px;display:grid;grid-template-columns:1.45fr .75fr;align-items:center;gap:70px;color:#fff;padding-block:72px}.site-eyebrow,.site-section-kicker{display:inline-block;color:#d8b265;font-weight:800;font-size:13px;letter-spacing:.5px;margin-bottom:12px}.site-slide h1,.site-slide h2{font-size:clamp(36px,5vw,62px);line-height:1.25;margin:0 0 20px;max-width:760px}.site-slide p{font-size:18px;line-height:1.9;color:#e4edf4;max-width:700px}.site-hero-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:28px}.site-btn{display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:10px 22px;border-radius:10px;text-decoration:none;font-weight:800;border:1px solid transparent}.site-btn.primary{background:#c89c48;color:#fff}.site-btn.ghost{border-color:#ffffff52;color:#fff;background:#ffffff0c}.site-btn.outline{border-color:#cbd6df;color:#102a43;background:#fff}.site-hero-card{min-height:310px;border:1px solid #ffffff26;border-radius:24px;background:#ffffff10;box-shadow:0 24px 60px #0004;padding:32px;display:flex;flex-direction:column;justify-content:center;gap:15px;backdrop-filter:blur(8px)}.site-hero-card strong{font-size:35px;color:#d8b265;margin-bottom:8px}.site-hero-card span{padding:13px 15px;border-radius:9px;background:#ffffff12}.site-slider-dots{position:absolute;bottom:28px;left:50%;transform:translateX(-50%);z-index:5;display:flex;gap:8px}.site-slider-dots button{width:9px;height:9px;border-radius:20px;border:0;background:#ffffff72;padding:0;transition:.25s}.site-slider-dots button.is-active{width:30px;background:#d8b265}
.site-section{padding:92px 0}.site-section-soft{background:#f5f8fa}.site-two-col{display:grid;grid-template-columns:1.2fr .8fr;gap:70px;align-items:center}.site-section h2{font-size:clamp(30px,4vw,45px);color:#102a43;margin:0 0 18px}.site-section p{font-size:16px;line-height:2;color:#526777}.site-feature-summary{display:grid;gap:12px}.site-feature-summary div{display:flex;align-items:center;gap:15px;padding:20px;border:1px solid #e2e9ef;border-radius:13px;background:#fff;box-shadow:0 7px 24px #102a4309}.site-feature-summary b{color:#c89c48;font-size:20px}.site-feature-summary span{font-weight:800;color:#243b53}.site-section-heading{text-align:center;max-width:700px;margin:0 auto 42px}.site-section-heading p{margin:0}.site-services-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.site-services-grid article{background:#fff;border:1px solid #e0e8ee;border-radius:16px;padding:26px;transition:transform .2s,box-shadow .2s}.site-services-grid article:hover{transform:translateY(-4px);box-shadow:0 16px 40px #102a4312}.site-services-grid article>span{display:inline-grid;place-items:center;width:42px;height:42px;background:#f5ead5;color:#9a712d;border-radius:10px;font-weight:900}.site-services-grid h3{color:#102a43;margin:18px 0 8px}.site-services-grid p{font-size:14px;line-height:1.8;margin:0}
.site-pricing-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;align-items:stretch}.site-price-card{position:relative;border:1px solid #dde6ed;border-radius:18px;padding:28px 22px;background:#fff;display:flex;flex-direction:column;box-shadow:0 7px 25px #102a4308}.site-price-card.featured{border:2px solid #c89c48;transform:translateY(-8px)}.site-price-card em{position:absolute;top:-14px;right:50%;transform:translateX(50%);background:#c89c48;color:#fff;border-radius:20px;padding:6px 14px;font-size:11px;font-style:normal;font-weight:800}.site-price-card h3{text-align:center;color:#102a43;font-size:21px}.site-price{text-align:center;min-height:95px;display:flex;flex-direction:column;justify-content:center}.site-price strong{font-size:34px;color:#102a43}.site-price strong.contact-price{font-size:23px}.site-price small{color:#718096;margin-top:5px}.site-price-card ul{list-style:none;padding:0;margin:18px 0 25px;display:grid;gap:11px;flex:1}.site-price-card li{font-size:13px;color:#526777}.site-price-card li:before{content:'✓';color:#1f9d68;font-weight:900;margin-left:7px}
.site-contact{background:linear-gradient(135deg,#102a43,#254f6c);color:#fff}.site-contact h2{color:#fff}.site-contact p{color:#dbe7ef}.site-contact-grid{display:grid;grid-template-columns:1fr 1fr;gap:60px;align-items:center}.site-contact-links{display:grid;gap:10px}.site-contact-links a{display:flex;justify-content:space-between;gap:15px;padding:17px 19px;border:1px solid #ffffff24;background:#ffffff0c;border-radius:12px;color:#fff;text-decoration:none}.site-contact-links span{color:#d8b265;font-weight:800}.site-footer{background:#0a1d2c;color:#c7d4dd;padding:24px 0}.site-footer .site-container{display:flex;justify-content:space-between;gap:20px}.site-footer p{margin:0}.site-footer b{color:#fff}
@media(max-width:900px){.site-services-grid{grid-template-columns:repeat(2,1fr)}.site-pricing-grid{grid-template-columns:repeat(2,1fr)}.site-price-card.featured{transform:none}.site-slide-content{grid-template-columns:1fr;gap:35px}.site-hero-card{min-height:auto}.site-two-col,.site-contact-grid{grid-template-columns:1fr}.site-slider,.site-slide-content{min-height:720px}}
@media(max-width:700px){.site-nav-wrap{height:68px}.site-brand img{width:47px;height:47px}.site-menu-toggle{display:block}.site-nav{display:none;position:absolute;top:68px;right:16px;left:16px;padding:12px;background:#fff;border:1px solid #e1e8ee;border-radius:12px;box-shadow:0 18px 45px #102a4326;flex-direction:column;align-items:stretch}.site-nav.is-open{display:flex}.site-nav a{text-align:center}.site-slide-content{padding-block:55px}.site-slide h1,.site-slide h2{font-size:36px}.site-slide p{font-size:16px}.site-hero-card{padding:22px}.site-section{padding:70px 0}.site-services-grid,.site-pricing-grid{grid-template-columns:1fr}.site-price-card{padding:25px}.site-footer .site-container{flex-direction:column;text-align:center}.site-contact-links a{flex-direction:column;align-items:flex-start}.site-two-col{gap:35px}}

/* Admin: promote a lawyer document's template to a master template */
.admin-document-search{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:18px 0}.admin-document-search input{flex:1;min-width:260px}.table-subline{display:block;margin-top:4px;color:var(--muted,#6b7280)}
.document-actionbar-promote{min-width:min(100%,700px)}.document-promote-form{display:flex;gap:8px;align-items:stretch;flex-wrap:wrap}.document-promote-form>input{min-width:190px;flex:1}.document-promote-form .document-action-btn{flex:0 0 auto}
@media(max-width:700px){.document-promote-form{display:grid;grid-template-columns:1fr}.document-promote-form>input,.document-promote-form .document-action-btn{width:100%;min-width:0}.admin-document-search input{min-width:100%}}

/* Admin base templates: list first + duplicate action */
.admin-base-template-copy-form{display:flex;gap:7px;align-items:center;flex-wrap:nowrap;min-width:330px}
.admin-base-template-copy-form input{min-width:190px;padding:8px 10px}
.admin-base-template-copy-form .btn{white-space:nowrap}
@media(max-width:900px){
  .admin-base-template-copy-form{min-width:280px;flex-wrap:wrap}
  .admin-base-template-copy-form input{min-width:180px;flex:1}
}

/* Template categories management */
.template-category-form{align-items:end}.category-form-actions{margin:0;align-items:center}
.template-category-filter{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:14px 0 18px;padding:12px;border:1px solid #e4e9ee;border-radius:12px;background:#fafcfd}
.template-category-filter label{margin:0;font-weight:700}.template-category-filter select{min-width:220px}
.category-badge{display:inline-flex;align-items:center;padding:5px 10px;border-radius:999px;background:#eef3f7;color:#27445d;font-size:12px;font-weight:800}
@media(max-width:700px){.template-category-filter{display:grid;grid-template-columns:1fr}.template-category-filter select,.template-category-filter .btn{width:100%}.template-category-form{grid-template-columns:1fr}.category-form-actions{justify-content:flex-start}}

/* Variable ordering in base and private templates */
.template-field-row{align-items:center}
.field-drag-handle{display:inline-flex;align-items:center;justify-content:center;min-width:34px;height:38px;border:1px solid var(--border,#d9dee7);border-radius:8px;background:#f7f8fa;cursor:grab;font-size:18px;user-select:none}
.field-drag-handle:active{cursor:grabbing}
.field-order-number{display:inline-flex;align-items:center;justify-content:center;min-width:28px;height:28px;border-radius:50%;background:#eef1f5;font-weight:700;font-size:13px}
.template-field-row.is-dragging,.sortable-variable-item.is-dragging{opacity:.55;box-shadow:0 8px 24px rgba(0,0,0,.12)}
.lawyer-field-order{margin-top:22px;padding:18px;border:1px solid var(--border,#d9dee7);border-radius:14px;background:#fbfcfd}
.section-heading.compact{margin-bottom:12px}
.section-heading.compact h4{margin:0 0 4px}
.sortable-variable-list{display:grid;gap:8px}
.sortable-variable-item{display:flex;align-items:center;gap:10px;padding:10px 12px;background:#fff;border:1px solid var(--border,#d9dee7);border-radius:10px}
.sortable-variable-label{flex:1;font-weight:600}
.variable-order-actions{display:flex;gap:6px}
.variable-order-actions button{width:34px;height:34px;border:1px solid var(--border,#d9dee7);border-radius:8px;background:#f7f8fa;cursor:pointer;font-size:17px}
.variable-order-actions button:hover{background:#eef1f5}
@media(max-width:700px){.sortable-variable-item{padding:9px}.lawyer-field-order{padding:12px}.field-drag-handle{min-width:32px}.template-field-row{min-width:980px}}

/* Admin navigation groups and public website content manager */
.nav .nav-section-title{margin:18px 14px 7px;padding:0 7px 7px;border-bottom:1px solid rgba(255,255,255,.12);font-size:11px;font-weight:800;letter-spacing:.4px;color:rgba(255,255,255,.55);pointer-events:none}.nav .nav-section-title:first-of-type{margin-top:10px}.website-content-form{display:grid;gap:18px}.website-editor-intro{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:0}.website-editor-intro h3{margin:0 0 5px}.website-editor-section{margin:0}.website-editor-section .section-heading>div{display:flex;align-items:center;gap:10px}.website-section-number{display:inline-grid;place-items:center;width:34px;height:34px;border-radius:10px;background:var(--gold,#b9944b);color:#fff;font-weight:800;font-size:12px}.website-editor-section textarea{width:100%;resize:vertical;line-height:1.8}.website-plan-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-top:18px}.website-plan-grid article{padding:16px;border:1px solid #e3e6eb;border-radius:14px;background:#fafbfc}.website-plan-grid h4{margin:0 0 14px}.website-plan-grid label:not(.website-checkbox){display:block;margin:10px 0 6px;font-size:13px;font-weight:700}.website-plan-grid input:not([type=checkbox]){width:100%}.website-checkbox{display:flex;align-items:flex-start;gap:7px;margin-top:14px;font-size:12px;line-height:1.5}.website-checkbox input{margin-top:3px}.website-save-bar{position:sticky;bottom:12px;z-index:8;display:flex;justify-content:center;gap:10px;padding:12px;border:1px solid #e0e3e8;border-radius:15px;background:rgba(255,255,255,.94);box-shadow:0 12px 35px rgba(23,32,48,.14);backdrop-filter:blur(10px)}
@media(max-width:1000px){.website-plan-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.website-editor-intro{align-items:flex-start;flex-direction:column}.website-editor-intro .actions{width:100%}.website-editor-intro .actions .btn{flex:1}.website-plan-grid{grid-template-columns:1fr}.website-save-bar{bottom:8px}.website-save-bar .btn{flex:1}.nav .nav-section-title{margin-top:14px}}

/* Public website motion, hover and Cairo typography */
.public-home,.public-home button,.public-home input,.public-home textarea,.public-home select{font-family:'Cairo',Tahoma,Arial,sans-serif}
.public-home{overflow-x:hidden}
.site-header{transition:height .3s ease,background .3s ease,box-shadow .3s ease,border-color .3s ease}
.site-header.is-scrolled{background:rgba(255,255,255,.97);border-color:transparent;box-shadow:0 12px 35px rgba(16,42,67,.11)}
.site-brand img{transition:transform .4s cubic-bezier(.2,.8,.2,1)}.site-brand:hover img{transform:rotate(-4deg) scale(1.06)}
.site-nav a,.site-btn,.site-contact-links a{position:relative;overflow:hidden;isolation:isolate;transition:transform .25s ease,box-shadow .25s ease,background .25s ease,color .25s ease,border-color .25s ease}
.site-nav a:not(.site-login-link)::after{content:'';position:absolute;right:13px;left:13px;bottom:5px;height:2px;border-radius:3px;background:#c89c48;transform:scaleX(0);transform-origin:right;transition:transform .25s ease}.site-nav a:not(.site-login-link):hover::after{transform:scaleX(1)}
.site-btn:hover,.site-login-link:hover{transform:translateY(-2px);box-shadow:0 12px 24px rgba(16,42,67,.2)}
.site-btn.primary:hover{background:#b78939}.site-btn.ghost:hover{background:rgba(255,255,255,.17)}
.site-slide.is-active .site-slide-content>div:first-child{animation:siteHeroText .75s cubic-bezier(.2,.8,.2,1) both}.site-slide.is-active .site-hero-card{animation:siteHeroCard .85s .08s cubic-bezier(.2,.8,.2,1) both}
.site-hero-card{transform:perspective(900px) rotateX(var(--tilt-x,0deg)) rotateY(var(--tilt-y,0deg));transition:transform .18s ease,box-shadow .3s ease}.site-hero-card:hover{box-shadow:0 30px 75px rgba(0,0,0,.35)}
.site-hero-card span{transition:transform .25s ease,background .25s ease}.site-hero-card span:hover{transform:translateX(-6px);background:rgba(255,255,255,.18)}
.site-services-grid article,.site-price-card{transform:perspective(900px) translateY(0) rotateX(var(--tilt-x,0deg)) rotateY(var(--tilt-y,0deg));transition:transform .25s ease,box-shadow .25s ease,border-color .25s ease}
.site-services-grid article:hover{transform:perspective(900px) translateY(-8px) rotateX(var(--tilt-x,0deg)) rotateY(var(--tilt-y,0deg));box-shadow:0 22px 50px rgba(16,42,67,.16);border-color:#d3b474}.site-services-grid article>span{transition:transform .35s ease,background .3s ease}.site-services-grid article:hover>span{transform:rotate(-7deg) scale(1.12);background:#c89c48;color:#fff}
.site-price-card:hover{transform:perspective(900px) translateY(-10px) rotateX(var(--tilt-x,0deg)) rotateY(var(--tilt-y,0deg));box-shadow:0 24px 55px rgba(16,42,67,.16);border-color:#c89c48}.site-price-card.featured:hover{transform:perspective(900px) translateY(-14px) rotateX(var(--tilt-x,0deg)) rotateY(var(--tilt-y,0deg))}
.site-feature-summary div{transition:transform .25s ease,box-shadow .25s ease,border-color .25s ease}.site-feature-summary div:hover{transform:translateX(-7px);box-shadow:0 16px 35px rgba(16,42,67,.12);border-color:#d7bd8a}
.site-contact-links a:hover{transform:translateX(-7px);background:rgba(255,255,255,.16);border-color:rgba(216,178,101,.7)}
.site-reveal,.site-services-grid article,.site-price-card,.site-feature-summary div,.site-contact-links a{opacity:0;transform:translateY(26px);transition-property:opacity,transform,box-shadow,border-color,background;transition-duration:.7s,.7s,.25s,.25s,.25s;transition-timing-function:cubic-bezier(.2,.8,.2,1);transition-delay:var(--reveal-delay,0ms)}
.site-reveal.is-visible{opacity:1;transform:none}.site-reveal.is-visible .site-services-grid article,.site-reveal.is-visible .site-price-card,.site-reveal.is-visible .site-feature-summary div,.site-reveal.is-visible .site-contact-links a,.site-services-grid article.is-visible,.site-price-card.is-visible,.site-feature-summary div.is-visible,.site-contact-links a.is-visible{opacity:1}
.site-ripple{position:absolute;z-index:-1;width:14px;height:14px;border-radius:50%;background:rgba(255,255,255,.5);transform:translate(-50%,-50%) scale(0);pointer-events:none;animation:siteRipple .6s ease-out}
.site-back-to-top{position:fixed;left:22px;bottom:22px;z-index:45;width:48px;height:48px;border:0;border-radius:50%;background:#c89c48;color:#fff;font:800 22px 'Cairo',sans-serif;box-shadow:0 14px 30px rgba(16,42,67,.25);cursor:pointer;opacity:0;visibility:hidden;transform:translateY(16px) scale(.85);transition:.3s ease}.site-back-to-top.is-visible{opacity:1;visibility:visible;transform:none}.site-back-to-top:hover{transform:translateY(-4px) scale(1.04);background:#ad8137}
@keyframes siteHeroText{from{opacity:0;transform:translateY(24px)}to{opacity:1;transform:none}}
@keyframes siteHeroCard{from{opacity:0;transform:translateX(35px) scale(.96)}to{opacity:1;transform:none}}
@keyframes siteRipple{to{transform:translate(-50%,-50%) scale(18);opacity:0}}
@media(max-width:900px){.site-price-card.featured:hover{transform:translateY(-8px)}}
@media(max-width:700px){.site-back-to-top{left:14px;bottom:14px;width:44px;height:44px}.site-services-grid article:hover,.site-price-card:hover,.site-price-card.featured:hover{transform:translateY(-5px)}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.public-home *, .public-home *::before,.public-home *::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}.site-reveal,.site-services-grid article,.site-price-card,.site-feature-summary div,.site-contact-links a{opacity:1!important;transform:none!important}}


/* Dashboard typography and topbar quick actions */
.layout,.layout button,.layout input,.layout select,.layout textarea,.layout table,.layout .btn{font-family:'Tajawal',Tahoma,Arial,sans-serif}
.topbar-user{flex-wrap:nowrap}
.topbar-quick-link{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:42px;padding:0 13px;border:1px solid #e2e8f0;border-radius:12px;background:#fff;color:var(--navy);font-size:13px;font-weight:700;white-space:nowrap;transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease,background .2s ease,color .2s ease}
.topbar-quick-link:hover{transform:translateY(-2px);box-shadow:0 9px 20px rgba(16,42,67,.11);border-color:#c9d4df}
.topbar-quick-link.website-link:hover{background:#f7fafc;color:var(--navy)}
.topbar-quick-link.logout-link{color:#9f2f2f;border-color:#efd9d9;background:#fffafa}
.topbar-quick-link.logout-link:hover{background:#a52a2a;color:#fff;border-color:#a52a2a}
.topbar-link-icon{display:inline-grid;place-items:center;font-size:19px;line-height:1}
.topbar-user-name{font-weight:700;color:#334155;white-space:nowrap}
@media(max-width:850px){.topbar-link-text{display:none}.topbar-quick-link{width:38px;height:38px;min-height:38px;padding:0}.topbar-link-icon{font-size:18px}.topbar-user-name{display:none}}
@media(max-width:520px){.topbar-user{gap:7px}.notification-bell,.topbar-quick-link{width:36px;height:36px;min-height:36px;border-radius:10px}.topbar-title h1{font-size:18px}}

/* Sidebar scrolling and editor font selector */
.sidebar::-webkit-scrollbar{width:8px}.sidebar::-webkit-scrollbar-track{background:#ffffff0d}.sidebar::-webkit-scrollbar-thumb{background:#ffffff38;border-radius:10px}.sidebar::-webkit-scrollbar-thumb:hover{background:#ffffff55}.editor-toolbar .font-family-select{min-width:145px;max-width:180px}@media(max-width:700px){.editor-toolbar .font-family-select{min-width:125px;max-width:150px}}

/* Lawyer contract templates table */
.dashboard-contract-templates{margin-bottom:18px}
.contract-templates-table td:last-child{min-width:310px}
.table-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.table-actions form{margin:0}
.btn.small{padding:7px 11px;font-size:13px;min-height:auto}
.inline-copy-form,.inline-delete-form{display:inline-flex}
@media (max-width:700px){
  .dashboard-contract-templates{margin-top:12px}
  .contract-templates-table{min-width:800px}
  .contract-templates-table td:last-child{min-width:285px}
}

/* Trial registration promotion */
.site-trial-promo{display:block!important;visibility:visible!important;opacity:1!important;transform:none!important;padding-top:0}
.site-trial-box{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:32px;border-radius:24px;background:linear-gradient(135deg,rgba(184,143,45,.14),rgba(20,48,66,.08));border:1px solid rgba(184,143,45,.28)}
.site-trial-box h2{margin:6px 0 8px}
.site-trial-box p{margin:0;color:var(--muted)}
.registration-choice-note{grid-column:1/-1;display:flex;flex-direction:column;gap:4px;padding:14px 16px;margin:12px 0 18px;border-radius:12px;background:#f6f7f8;border:1px solid #e4e7ea}
.registration-choice-note.trial{background:#fff8e7;border-color:#ead397}
.registration-choice-note span{font-size:.92rem;color:var(--muted)}
@media(max-width:700px){.site-trial-box{flex-direction:column;align-items:flex-start}.site-trial-box .site-btn{width:100%;text-align:center}}

/* Admin settings */
.settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin-bottom:20px}.settings-grid>.card{margin:0}.settings-grid form{margin-top:8px}@media(max-width:850px){.settings-grid{grid-template-columns:1fr}}

/* Subscription renewal payment instructions */
.renewal-payment-notice{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:0 0 20px;padding:18px 20px;border:1px solid #d9c78d;border-radius:14px;background:#fffaf0}
.renewal-payment-notice strong{display:block;margin-bottom:7px;font-size:1.05rem}
.renewal-payment-notice p{margin:4px 0;line-height:1.8}
.whatsapp-renewal-btn{flex:0 0 auto;background:#168b4f!important;color:#fff!important;border-color:#168b4f!important;white-space:nowrap}
.whatsapp-renewal-btn:hover{background:#10733f!important;border-color:#10733f!important}
@media(max-width:700px){.renewal-payment-notice{align-items:stretch;flex-direction:column}.whatsapp-renewal-btn{width:100%;text-align:center}}

/* v1.7.4 - active bank accounts in subscription renewal notice */
.renewal-payment-content{flex:1;min-width:0}
.renewal-bank-table{margin-top:14px;background:#fff;border-radius:12px;border:1px solid rgba(0,0,0,.08)}
.renewal-bank-table table{margin:0;min-width:560px}
.renewal-bank-table th,.renewal-bank-table td{text-align:right;vertical-align:middle}
.renewal-bank-table td b[dir="ltr"]{display:inline-block;letter-spacing:.4px}
.renewal-no-bank{margin:14px 0 0}

/* v1.7.9: lawyer contract preview keeps the complete desktop sheet on mobile.
   Scoped to lawyer document pages so admin pages are not affected. */
@media screen and (max-width:900px){
  body.role-lawyer.page-document_view .main,
  body.role-lawyer.page-document_version_view .main{
    width:100%!important;
    min-width:0!important;
    overflow:hidden!important;
  }
  body.role-lawyer.page-document_view .document-preview-shell,
  body.role-lawyer.page-document_version_view .document-preview-shell{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin:0!important;
    padding:12px 0 18px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    direction:rtl!important;
    background:#e9eef3!important;
    border:1px solid var(--line)!important;
    border-radius:10px!important;
    box-shadow:inset 0 1px 3px #102a4312!important;
    -webkit-overflow-scrolling:touch!important;
    overscroll-behavior-x:contain;
  }
  body.role-lawyer.page-document_view .document-preview-shell>.document-preview,
  body.role-lawyer.page-document_version_view .document-preview-shell>.document-preview{
    display:block!important;
    box-sizing:border-box!important;
    width:794px!important;
    min-width:794px!important;
    max-width:794px!important;
    min-height:1123px!important;
    margin:0 12px!important;
    padding:45px!important;
    border:1px solid #c9d1d9!important;
    background:#fff!important;
    box-shadow:0 4px 14px #102a4326!important;
    font-size:16px!important;
    line-height:2!important;
    transform:none!important;
    zoom:1!important;
  }
  body.role-lawyer.page-document_view .contract-letterhead{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 180px minmax(0,1fr)!important;
    gap:18px!important;
    padding:0 4px 20px!important;
    margin-bottom:30px!important;
  }
  body.role-lawyer.page-document_view .contract-letterhead .lawyer-name{font-size:20px!important}
  body.role-lawyer.page-document_view .contract-letterhead .lawyer-title{font-size:17px!important}
  body.role-lawyer.page-document_view .letterhead-ar>div,
  body.role-lawyer.page-document_view .letterhead-en>div{font-size:15px!important}
  body.role-lawyer.page-document_view .letterhead-mark svg{width:165px!important;height:165px!important}
}

/* v1.8.0: show the complete desktop contract sheet fitted inside lawyer mobile screens. */
@media screen and (max-width:900px){
  body.role-lawyer.page-document_view .document-preview-shell.mobile-contract-fit,
  body.role-lawyer.page-document_version_view .document-preview-shell.mobile-contract-fit{
    position:relative!important;
    display:block!important;
    width:100%!important;
    height:calc(var(--contract-height,1123px) + 24px)!important;
    min-height:0!important;
    padding:12px 8px!important;
    overflow:hidden!important;
    direction:ltr!important;
  }
  body.role-lawyer.page-document_view .document-preview-shell.mobile-contract-fit>.document-preview,
  body.role-lawyer.page-document_version_view .document-preview-shell.mobile-contract-fit>.document-preview{
    position:absolute!important;
    top:12px!important;
    left:50%!important;
    width:794px!important;
    min-width:794px!important;
    max-width:794px!important;
    min-height:1123px!important;
    margin:0!important;
    padding:45px!important;
    transform:translateX(-50%) scale(var(--contract-scale,1))!important;
    transform-origin:top center!important;
    zoom:1!important;
    direction:rtl!important;
  }
}
@media print{
  .document-preview-shell.mobile-contract-fit{height:auto!important;overflow:visible!important;padding:0!important}
  .document-preview-shell.mobile-contract-fit>.document-preview{position:static!important;transform:none!important;width:auto!important;min-width:0!important;max-width:none!important}
}


/* v1.8.1 - Lawyer contract template editor: preserve the desktop paper canvas on mobile. */
@media (max-width:900px){
  .lawyer-template-editor-page{
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-inline:contain;
  }
  .lawyer-template-editor-page .smart-editor-form{
    width:794px;
    min-width:794px;
    max-width:none;
  }
  .lawyer-template-editor-page .smart-editor{
    width:100%;
    min-width:794px;
    overflow:visible;
  }
  .lawyer-template-editor-page .editor-toolbar{
    min-width:794px;
    flex-wrap:wrap;
    padding:9px;
    gap:5px;
  }
  .lawyer-template-editor-page .editor-toolbar button,
  .lawyer-template-editor-page .editor-toolbar select{
    font-size:inherit;
    padding:7px 9px;
  }
  .lawyer-template-editor-page .variable-bar{
    min-width:794px;
    max-height:none;
    overflow:visible;
    flex-wrap:wrap;
    padding:9px 11px;
  }
  .lawyer-template-editor-page .editor-area{
    box-sizing:border-box;
    width:794px;
    min-width:794px;
    min-height:1123px;
    padding:56px 60px;
    overflow:visible;
    font-size:16px;
    line-height:2;
    background:#fff;
  }
  .lawyer-template-editor-page .lawyer-field-order,
  .lawyer-template-editor-page .template-edit-actions{
    width:794px;
    min-width:794px;
  }
}


/* v1.8.3 - trial banner fixed at the top of the public homepage */
.site-trial-top{display:block!important;position:relative!important;z-index:20!important;width:100%!important;margin:0!important;padding:18px 0!important;background:#fff!important;visibility:visible!important;opacity:1!important;transform:none!important}
.site-trial-top .site-container{display:block!important}
.site-trial-top .site-trial-box{display:flex!important;visibility:visible!important;opacity:1!important;transform:none!important;margin:0!important;box-shadow:0 12px 32px rgba(16,42,67,.10)}
@media(max-width:700px){.site-trial-top{padding:12px 0!important}.site-trial-top .site-trial-box{flex-direction:column!important;align-items:stretch!important;padding:22px!important}.site-trial-top .site-btn{width:100%!important;text-align:center!important}}

/* v1.8.4: keep the free-trial banner visible on every viewport and session state */
.public-home .site-trial-top{
 display:block!important;
 visibility:visible!important;
 opacity:1!important;
 height:auto!important;
 min-height:0!important;
 overflow:visible!important;
 position:relative!important;
 z-index:30!important;
}
@media screen and (min-width:701px){
 .public-home .site-trial-top .site-container{display:block!important;max-width:1180px!important;margin-inline:auto!important;padding-inline:24px!important}
 .public-home .site-trial-top .site-trial-box{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:space-between!important;min-height:124px!important}
}


/* v1.8.5 — الهوية البصرية الجديدة لواجهات النظام فقط (لا تشمل مستندات PDF) */
.site-brand{gap:0;flex:0 0 auto}
.site-brand img{width:245px;height:84px;max-width:32vw;object-fit:contain;object-position:center}
.site-brand span{display:none!important}

.sidebar .brand{padding:4px 0 18px}
.sidebar .brand img{display:block;width:205px;height:92px;max-width:100%;object-fit:contain;background:#fff;border-radius:14px;margin:0 auto;padding:5px}
.sidebar .brand h2,.sidebar .brand small{display:none!important}

.login-card{width:min(470px,94%)}
.login-card img{display:block;width:315px;height:auto;max-width:100%;object-fit:contain;margin:0 auto 18px}
.verify-public-logo{width:300px!important;height:auto!important;max-width:92%!important;object-fit:contain!important;margin:0 auto 16px!important}

@media(max-width:900px){
  .sidebar .brand img{width:58px;height:58px;padding:3px;border-radius:12px;object-fit:cover;object-position:left center}
}
@media(max-width:700px){
  .site-brand img{width:190px;height:62px;max-width:58vw}
  .login-card img{width:260px}
  .verify-public-logo{width:245px!important}
}
