* {
  box-sizing:border-box
}
:root {
  --green:#08734b;
  --dark:#172033;
  --line:#d8dfdc;
  --soft:#edf2ef;
  --page:#f2f4f3
}
html,body {
  margin:0;
  min-height:100%;
  font-family:Arial,Helvetica,sans-serif;
  color:var(--dark)
}
body {
  background:var(--page);
  font-size:14px
}
button,input,select {
  font:inherit
}

button {
  cursor:pointer
}

a {
  color:inherit
}
[hidden] {
  display:none!important
}
.site-shell {
  min-height:100vh;
  display:flex;
  flex-direction:column
}
.topbar {
  height:64px;
  padding:0 4%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  background:#fff
}
.topbar img {
  max-width:145px;
  max-height:44px;
  object-fit:contain
}
.main-stage {
  flex:1;
  padding:35px 3%;
  background:#f1f2f2
}
.record-card {
  width:900px;
  max-width:100%;
  margin:auto;
  background:#fff;
  border:1px solid var(--line)
}
.record-tabs {
  min-height:90px;
  display:grid;
  grid-template-columns:28% 44% 28%;
  border-bottom:1px solid var(--line)
}
.status-cell,.heading-cell,.logo-cell {
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:14px;
  border-left:1px solid var(--line)
}
.status-cell {
  color:var(--green);
  font-weight:700
}
.heading-cell {
  font-size:21px;
  font-weight:700
}
.partner-logos {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:18px
}
.partner-logos img {
  max-width:46%;
  max-height:48px;
  object-fit:contain
}
.record-content {
  padding:30px 18px
}
.permit-success-text {
  margin:12px auto;
  padding:22px 15px;
  text-align:center;
  color:#08734b;
  font-size:22px;
  font-weight:700;
  line-height:1.7;
  background:#eef8f2;
  border:1px solid #cce8d7;
  border-radius:8px
}
.footer {
  padding:25px 5%;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:22px;
  background:#fff
}
.footer-logo-strip {
  display:flex;
  align-items:center;
  gap:18px;
  flex:1 1 280px
}
.footer-logo-strip img {
  max-width:95px;
  max-height:45px;
  object-fit:contain
}
.footer-column {
  display:flex;
  flex-direction:column;
  gap:8px
}
.footer-column a {
  color:#667085;
  text-decoration:none
}
.footer-disclaimer {
  width:100%;
  margin:0;
  text-align:center;
  color:#77808a;
  font-size:11px
}
.admin-body {
  background:linear-gradient(135deg,#f2f7f4,#f3f5f9)
}
.login-card {
  width:min(420px,92%);
  margin:10vh auto;
  padding:30px;
  background:white;
  border:1px solid #e1e8e4;
  border-radius:15px;
  box-shadow:0 10px 35px #10251b0c
}
.login-card h1 {
  margin:0 0 8px;
  color:#075c40;
  font-size:25px
}
.login-card p {
  color:#667085;
  line-height:1.6
}
.login-card form {
  display:grid;
  gap:14px
}
.login-card label,.field {
  display:flex;
  flex-direction:column;
  gap:7px;
  font-weight:600;
  color:#344054
}
.login-card input,.field input,.field select,.search-input {
  width:100%;
  min-height:43px;
  padding:10px;
  border:1px solid #d4ddd8;
  border-radius:8px;
  background:#fff
}
input:focus,select:focus {
  outline:none;
  border-color:#0b8055;
  box-shadow:0 0 0 3px #0b80551c
}
.primary-button {
  border:0;
  border-radius:8px;
  padding:11px 18px;
  background:linear-gradient(135deg,#08734b,#0a9361);
  color:#fff;
  font-weight:700
}
.secondary-button {
  border:1px solid #cfd8d3;
  border-radius:8px;
  padding:9px 13px;
  background:#fff;
  color:#344054
}
.hint {
  font-size:12px
}
.admin-header {
  position:sticky;
  top:0;
  z-index:5;
  padding:14px 4%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
  background:#fff;
  border-bottom:1px solid #e2e8e4;
  box-shadow:0 4px 18px #10251b0b
}
.admin-header strong {
  display:block;
  color:#075c40;
  font-size:17px
}
.admin-header span {
  display:block;
  margin-top:4px;
  color:#667085;
  font-size:12px
}
.header-actions {
  display:flex;
  align-items:center;
  gap:14px
}
.header-actions a {
  color:var(--green);
  text-decoration:none
}
.admin-main {
  width:min(1160px,94%);
  margin:25px auto;
  display:grid;
  gap:18px
}
.admin-stats {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:14px
}
.stat-card,.admin-panel {
  padding:22px;
  background:#fff;
  border:1px solid #e2e9e5;
  border-radius:13px;
  box-shadow:0 6px 22px #10251b08
}
.stat-card {
  display:flex;
  flex-direction:column;
  gap:8px
}
.stat-card span {
  color:#667085;
  font-size:13px;
  font-weight:600
}
.stat-card strong {
  color:var(--green);
  font-size:28px
}
.panel-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:18px;
  padding-bottom:14px;
  border-bottom:1px solid #edf0ee
}
.panel-heading h1,.panel-heading h2 {
  margin:0 0 6px;
  font-size:20px
}
.panel-heading p {
  margin:0;
  color:#667085;
  font-size:13px
}
.employee-form {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:15px
}
.field {
  font-size:13px
}
.active-check {
  display:flex;
  align-items:center;
  gap:9px;
  font-weight:600
}
.active-check input {
  width:17px;
  height:17px
}
.form-actions {
  grid-column:1/-1;
  display:flex;
  gap:9px
}
.form-message {
  margin:4px 0;
  color:var(--green);
  font-size:13px;
  line-height:1.5
}
.wide {
  grid-column:1/-1
}
.records-heading {
  margin-bottom:14px
}
.search-input {
  margin-bottom:14px
}
.table-wrap {
  overflow-x:auto;
  border:1px solid #e8ecea;
  border-radius:9px
}
table {
  width:100%;
  min-width:700px;
  border-collapse:collapse;
  font-size:13px
}
th,td {
  padding:13px 11px;
  text-align:left;
  border-bottom:1px solid #e8ecea
}
th {
  background:#f3f7f5;
  color:#344b40
}
tbody tr:hover {
  background:#fafdfb
}
.actions {
  white-space:nowrap
}
.actions button {
  border:0;
  border-radius:6px;
  padding:7px 10px;
  margin-right:5px;
  background:#eaf2ff;
  color:#2459a6
}
.actions .delete-button {
  background:#fff0f0;
  color:#b42318
}
.status {
  padding:4px 8px;
  border-radius:12px;
  font-size:11px;
  font-weight:700
}
.status.active {
  background:#e8f7ee;
  color:#067647
}
.status.inactive {
  background:#fff1f0;
  color:#b42318
}
@media(max-width:760px) {
  .record-tabs {
    display:flex;
    flex-direction:column
  }

  .status-cell,.heading-cell,.logo-cell {
    min-height:60px;
    border-left:0;
    border-bottom:1px solid var(--line)
  }

  .admin-stats {
    grid-template-columns:1fr
  }

  .employee-form {
    grid-template-columns:repeat(2,minmax(0,1fr))
  }

  .admin-header {
    align-items:flex-start;
    flex-direction:column
  }

  .header-actions {
    width:100%;
    justify-content:space-between
  }

}
@media(max-width:480px) {
  .employee-form {
    grid-template-columns:1fr
  }

  .admin-panel {
    padding:15px
  }

  .login-card {
    padding:22px
  }

  .main-stage {
    padding:18px 8px
  }

  .permit-success-text {
    font-size:18px
  }

  .footer-column {
    width:100%
  }

}
/* Admin search and permit preview */

.search-help {
  margin:-6px 0 14px;
  color:#667085;
  font-size:12px;
  line-height:1.5
}
.actions .view-button {
  background:#e8f7ee;
  color:#067647;
  font-weight:700
}
.permit-modal {
  position:fixed;
  inset:0;
  z-index:20;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:#10182899;
  overflow-y:auto
}
.permit-modal[hidden] {
  display:none!important
}
.permit-modal-card {
  width:min(850px,100%);
  max-height:90vh;
  overflow-y:auto;
  background:#fff;
  border-radius:14px;
  padding:24px;
  box-shadow:0 20px 60px #0003
}
.permit-modal-heading {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:15px;
  padding-bottom:15px;
  margin-bottom:18px;
  border-bottom:1px solid #e8ecea
}
.permit-modal-heading h2 {
  margin:0 0 5px;
  color:#075c40
}

.permit-modal-heading p {
  margin:0;
  color:#667085;
  font-size:13px
}
.permit-details {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px
}
.permit-detail-item {
  padding:12px;
  border:1px solid #e2e9e5;
  border-radius:8px;
  min-width:0
}
.permit-detail-item span {
  display:block;
  color:#667085;
  font-size:12px;
  margin-bottom:6px
}
.permit-detail-item strong {
  display:block;
  color:#172033;
  font-size:14px;
  overflow-wrap:anywhere
}
.permit-modal-actions {
  display:flex;
  gap:10px;
  justify-content:flex-end;
  margin-top:20px;
  padding-top:15px;
  border-top:1px solid #e8ecea
}
body.modal-open {
  overflow:hidden
}
@media(max-width:560px) {
  .permit-modal-card {
    padding:16px
  }

  .permit-details {
    grid-template-columns:1fr
  }

  .permit-modal-actions {
    flex-wrap:wrap
  }

  .permit-modal-actions button {
    flex:1
  }

}
@media print {
  .permit-modal {
    position:static;
    background:#fff;
    padding:0
  }

  .permit-modal-card {
    box-shadow:none;
    max-height:none;
    overflow:visible
  }

  .permit-modal-heading button,.permit-modal-actions {
    display:none
  }

}
/* Restored partner and government logos */

.topbar img {
  max-width:170px;
  max-height:52px;
  width:auto;
  height:auto
}
.partner-logos img {
  max-width:46%;
  max-height:58px;
  width:auto;
  height:auto
}
.footer-logo-strip {
  flex-wrap:wrap
}
.footer-logo-strip img {
  max-width:125px;
  max-height:52px;
  width:auto;
  height:auto
}
.footer-logo-strip img[src*="digital-govt"] {
  max-width:170px
}
.social-logo {
  width:28px;
  height:28px;
  object-fit:contain
}
@media(max-width:480px) {
  .topbar {
    height:auto;
    min-height:64px;
    padding:10px 4%;
    gap:12px
  }

  .topbar img {
    max-width:44vw;
    max-height:42px
  }

  .footer-logo-strip {
    justify-content:center;
    gap:14px
  }

  .footer-logo-strip img {
    max-width:28vw;
    max-height:42px
  }

}
/* Arabic public search and permit details */

.search-card {
  width:min(760px,100%);
  margin:45px auto;
  padding:34px;
  background:#fff;
  border:1px solid var(--line);
  box-shadow:0 8px 28px #15251b0b
}
.search-heading {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:20px;
  margin-bottom:18px
}
.search-heading img {
  max-width:130px;
  max-height:58px;
  object-fit:contain
}
.search-heading h1 {
  margin:0;
  font-size:25px;
  text-align:center
}
.search-card>p {
  text-align:center;
  color:#667085
}
.public-search-form {
  max-width:560px;
  margin:28px auto 0
}
.public-search-form label {
  display:block;
  margin-bottom:9px;
  font-weight:700
}
.search-row {
  display:flex;
  gap:10px
}
.search-row input {
  flex:1;
  min-width:0;
  padding:12px 14px;
  border:1px solid #cfd8d3;
  border-radius:6px;
  direction:rtl
}
.search-message {
  color:#b42318;
  min-height:20px
}
.permit-data-section {
  margin:18px 0
}
.permit-data-section h2 {
  margin:0;
  padding:12px;
  text-align:center;
  background:#e9eeee;
  border:1px solid #d5dddd;
  font-size:16px
}
.permit-data-table {
  width:100%;
  min-width:0;
  border:1px solid #d5dddd;
  border-collapse:collapse
}
.permit-data-table th,.permit-data-table td {
  width:25%;
  padding:12px 10px;
  border:1px solid #d5dddd;
  text-align:center;
  vertical-align:middle
}
.permit-data-table th {
  background:#e9eeee;
  font-weight:400;
  color:#344054
}
.permit-data-table td {
  background:#fff;
  font-weight:600;
  overflow-wrap:anywhere
}
.status-invalid {
  color:#b42318
}
.permit-warning-text {
  margin:12px auto;
  padding:18px;
  text-align:center;
  color:#b42318;
  background:#fff1f0;
  border:1px solid #fecdca;
  line-height:1.7
}
@media(max-width:600px) {
  .search-card {
    margin:10px auto;
    padding:20px 14px
  }
  .search-heading {
    flex-direction:column;
    gap:8px
  }
  .search-heading h1 {
    font-size:20px
  }
  .search-row {
    flex-direction:column
  }
  .search-row .primary-button {
    width:100%
  }
  .permit-data-table th,.permit-data-table td {
    padding:9px 6px;
    font-size:12px
  }
}
@media print {
  .topbar,.footer {
    display:none
  }
  .main-stage {
    padding:0;
    background:#fff
  }
  .record-card {
    width:100%;
    border:0
  }
}
/* Public permit layout matched to the supplied page(1).html/style(9).css reference */

.main-stage {
  flex:1;
  padding:26px 2.3% 34px;
  background:#efefef
}
.stage-inner {
  min-height:610px;
  padding:18px;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  background:#f7f8f8
}
.record-card {
  width:850px;
  max-width:100%;
  margin:0;
  background:#fff;
  border:1px solid #d4d9dc;
  border-radius:0
}
.record-tabs {
  min-height:82px;
  display:grid;
  grid-template-columns:22% 48% 30%;
  border-bottom:1px solid #d4d9dc
}
.status-cell,.heading-cell,.logo-cell {
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:10px;
  border-left:1px solid #d4d9dc
}
.status-cell {
  color:#08734b;
  font-size:14px;
  font-weight:600
}
.status-cell.status-invalid {
  color:#a33
}
.heading-cell {
  font-size:21px;
  color:#111;
  font-weight:600
}
.logo-cell {
  border-left:0
}
.partner-logos {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:20px;
  width:100%
}
.partner-logos img {
  max-width:48%;
  max-height:52px;
  object-fit:contain
}
.record-content {
  padding:20px 14px 16px
}
.info-section {
  margin-bottom:16px;
  border:1px solid #d4d9dc;
  background:#fff
}
.section-title {
  min-height:42px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  background:#e8edee;
  border-bottom:1px solid #d4d9dc;
  font-size:16px;
  font-weight:700
}
.data-row {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr))
}
.data-pair {
  display:contents
}
.data-value,.data-label {
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  overflow-wrap:anywhere;
  padding:11px 8px;
  border-left:1px solid #d4d9dc;
  border-bottom:1px solid #d4d9dc;
  font-size:14px;
  line-height:1.5
}
.data-label {
  background:#e8edee;
  font-size:13px;
  color:#555b61
}
.data-row:last-child .data-value,.data-row:last-child .data-label {
  border-bottom:0
}
.data-row>*:last-child {
  border-left:0
}
.info-section:last-child {
  margin-bottom:0
}
.footer {
  padding:22px max(5%,calc((100% - 1120px)/2));
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  background:#fff
}
.footer-logo-strip {
  display:flex;
  align-items:center;
  gap:20px;
  flex:1 1 300px;
  flex-wrap:wrap
}
.footer-logo-strip img {
  max-width:105px;
  max-height:48px;
  object-fit:contain
}
.footer-column {
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:9px;
  min-width:130px
}
.footer-column strong {
  font-size:14px
}
.footer-column a {
  font-size:13px;
  color:#667085;
  text-decoration:none
}
.footer-column a:hover {
  color:#08734b;
  text-decoration:underline
}
.footer-disclaimer {
  width:100%;
  margin:0;
  text-align:center;
  color:#77808a;
  font-size:11px
}
.notice {
  text-align:center;
  color:#a33;
  margin:16px 0;
  font-size:14px
}
.permit-warning-text {
  padding:14px;
  line-height:1.7;
  background:#fff1f0;
  border:1px solid #fecdca
}
@media(max-width:760px) {
  /* Android/mobile permit layout: full-width stacked rows like the supplied screenshot */

  html,body {
    width:100%;
    min-width:320px;
    overflow-x:hidden
  }
  .topbar {
    height:48px;
    padding:0 10px
  }
  .topbar img {
    max-width:92px;
    max-height:32px
  }
  .main-stage {
    min-height:auto;
    padding:8px 5px 14px;
    background:#f1f1f1
  }
  .stage-inner {
    min-height:0;
    padding:0;
    display:block;
    background:#f7f8f8
  }
  .record-card {
    width:100%;
    max-width:none;
    border:1px solid #d4d9dc
  }
  .record-tabs {
    display:flex;
    flex-direction:column
  }
  .logo-cell {
    order:1;
    min-height:76px;
    border:0;
    border-bottom:1px solid #d4d9dc
  }
  .partner-logos {
    gap:14px
  }
  .partner-logos img {
    max-width:44%;
    max-height:48px
  }
  .heading-cell {
    order:2;
    min-height:52px;
    padding:9px;
    font-size:18px;
    border:0;
    border-bottom:1px solid #d4d9dc
  }
  .status-cell {
    order:3;
    min-height:46px;
    padding:8px;
    border:0;
    border-bottom:1px solid #d4d9dc;
    font-size:13px
  }
  .record-content {
    padding:0 0 14px
  }
  .info-section {
    margin:0 0 12px;
    border:1px solid #d4d9dc;
    border-left:0;
    border-right:0
  }
  .section-title {
    min-height:42px;
    justify-content:flex-start;
    padding:10px 12px;
    text-align:right;
    font-size:15px;
    background:#e8edee
  }
  .data-row {
    display:flex;
    flex-direction:column
  }
  .data-pair {
    display:flex;
    flex-direction:column;
    width:100%;
    border-bottom:1px solid #d4d9dc
  }
  .data-pair.right-pair {
    order:0
  }

  .data-pair.left-pair {
    order:1
  }
  .data-label,.data-value {
    display:block;
    width:100%;
    min-height:0;
    padding:9px 12px;
    text-align:right;
    border:0;
    overflow-wrap:anywhere;
    background:#fff;
    font-size:13px;
    line-height:1.45
  }
  .data-label {
    color:#555b61;
    background:#e8edee;
    font-size:12px;
    padding-bottom:7px
  }
  .data-value {
    font-weight:600;
    color:#111820;
    padding-top:7px;
    padding-bottom:10px
  }
  .footer {
    padding:22px 12px 30px;
    gap:20px 10px;
    display:flex;
    flex-direction:column;
    align-items:stretch
  }
  .footer-logo-strip {
    width:100%;
    flex:0 0 auto;
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:0;
    justify-items:center;
    align-items:center;
    border:1px solid #edf0f0
  }
  .footer-logo-strip img {
    width:100%;
    max-width:125px;
    height:76px;
    max-height:76px;
    padding:12px;
    object-fit:contain;
    border-bottom:1px solid #edf0f0
  }
  .footer-column {
    width:100%;
    min-width:0;
    flex:0 0 auto;
    align-items:flex-end;
    text-align:right;
    gap:8px;
    padding:4px 8px
  }
  .footer-column strong {
    font-size:13px
  }
  .footer-column a {
    font-size:12px;
    line-height:1.6
  }
  .footer-disclaimer {
    font-size:10px;
    line-height:1.6;
    padding:0 5px
  }
}
@media(max-width:480px) {
  .topbar {
    height:52px;
    padding:0 12px
  }
  .topbar img {
    max-width:112px;
    max-height:36px
  }
  .footer-column {
    flex-basis:100%
  }
}
/* Floating help chatbot - individual permit page only */

.permit-chat {
  position:fixed!important;
  left:max(14px,env(safe-area-inset-left))!important;
  right:auto!important;
  bottom:max(14px,env(safe-area-inset-bottom))!important;
  z-index:99999!important;
  direction:rtl;
  font-family:Arial,Helvetica,sans-serif
}
.permit-chat-launcher {
  width:48px;
  height:48px;
  border:0;
  border-radius:50%;
  background:#00632f;
  color:#fff;
  display:grid;
  place-items:center;
  box-shadow:0 2px 10px #0003;
  cursor:pointer
}
.permit-chat-launcher svg {
  width:29px;
  height:29px;
  fill:none;
  stroke:#fff;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round
}
.permit-chat-panel {
  position:absolute;
  left:0;
  bottom:60px;
  width:min(340px,calc(100vw - 28px));
  height:430px;
  max-height:calc(100vh - 100px);
  background:#fff;
  border:1px solid #d8dfdb;
  border-radius:12px;
  box-shadow:0 8px 30px #0002;
  display:flex;
  flex-direction:column;
  overflow:hidden
}
.permit-chat-panel[hidden] {
  display:none
}
.permit-chat-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:13px 15px;
  background:#00632f;
  color:#fff
}
.permit-chat-head strong,.permit-chat-head small {
  display:block
}

.permit-chat-head small {
  font-size:11px;
  opacity:.85;
  margin-top:4px
}
.permit-chat-close {
  border:0;
  background:transparent;
  color:#fff;
  font-size:25px;
  cursor:pointer;
  line-height:1
}
.permit-chat-messages {
  flex:1;
  overflow:auto;
  padding:13px;
  background:#f7f9f8;
  display:flex;
  flex-direction:column;
  gap:9px
}
.permit-chat-message {
  max-width:90%;
  padding:10px 12px;
  border-radius:10px;
  font-size:13px;
  line-height:1.65;
  overflow-wrap:anywhere
}
.permit-chat-message.bot {
  align-self:flex-start;
  background:#fff;
  border:1px solid #e1e7e3;
  color:#26352d
}
.permit-chat-message.user {
  align-self:flex-end;
  background:#e4f3e9;
  color:#174b30
}
.permit-chat-quick {
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  padding:9px 10px 2px;
  background:#fff
}
.permit-chat-quick button {
  border:1px solid #cbded1;
  background:#fff;
  color:#08734b;
  border-radius:16px;
  padding:6px 9px;
  font-size:11px;
  cursor:pointer
}
.permit-chat-form {
  display:flex;
  gap:7px;
  padding:10px;
  background:#fff
}
.permit-chat-form input {
  flex:1;
  min-width:0;
  border:1px solid #cfd8d3;
  border-radius:6px;
  padding:10px;
  direction:rtl
}
.permit-chat-form button {
  border:0;
  border-radius:6px;
  padding:0 13px;
  background:#08734b;
  color:#fff;
  cursor:pointer
}
.permit-chat-note {
  margin:0;
  padding:0 10px 9px;
  text-align:center;
  font-size:10px;
  color:#7a8580;
  background:#fff
}
@media(max-width:768px) {
  .permit-chat {
    position:fixed!important;
    left:max(10px,env(safe-area-inset-left))!important;
    right:auto!important;
    bottom:max(10px,env(safe-area-inset-bottom))!important;
    z-index:99999!important
  }

  .permit-chat-launcher {
    width:50px;
    height:50px;
    touch-action:manipulation
  }

  .permit-chat-panel {
    left:0;
    bottom:62px;
    width:min(340px,calc(100vw - 24px));
    height:min(420px,calc(100dvh - 100px));
    max-height:calc(100dvh - 100px)
  }

}
@media print {
  .permit-chat {
    display:none!important
  }

}
/* Footer rebuilt to match the supplied Ajeer reference */

.footer {
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:38px;
  padding:34px max(5%,calc((100% - 1120px)/2)) 42px;
  background:#fff
}
.footer-links {
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:30px
}
.footer-links .footer-column {
  min-width:0;
  align-items:flex-end;
  text-align:right;
  gap:12px
}
.footer-links .footer-column strong {
  color:#202942;
  font-size:19px;
  font-weight:500
}
.footer-links .footer-column a {
  color:#777b80;
  font-size:17px;
  line-height:1.6;
  text-decoration:none
}
.footer-links .footer-column a:hover {
  color:#08734b
}
.footer-social {
  display:flex;
  align-items:center;
  gap:22px;
  margin-top:4px
}
.footer-social a,.footer-social span {
  display:grid;
  place-items:center;
  width:24px;
  height:28px;
  color:#202942
}
.footer-social svg {
  width:25px;
  height:25px;
  fill:currentColor
}
.footer-logo-strip {
  width:100%;
  min-height:360px;
  display:grid;
  direction:rtl;
  grid-template-columns:1fr 1fr;
  grid-template-rows:repeat(3,minmax(105px,1fr));
  align-items:center;
  justify-items:center;
  gap:0;
  padding:8px 0;
  border-top:1px solid #dedede
}
.footer-logo-strip img {
  width:100%;
  max-width:210px;
  height:100%;
  max-height:125px;
  padding:18px;
  object-fit:contain
}
.footer-logo-strip .logo-mlsd {
  grid-column:1;
  grid-row:1
}
.footer-logo-strip .logo-takamol {
  grid-column:1;
  grid-row:2
}
.footer-logo-strip .logo-tamkeen {
  grid-column:1;
  grid-row:3
}
.footer-logo-strip .logo-digital {
  grid-column:2;
  grid-row:2;
  border-right:1px solid #dedede
}
.status-cell {
  position:relative;
  color:#08734b;
  background:#f4faf6;
  font-size:16px;
  font-weight:700
}
.status-cell:not(.status-invalid)::before {
  content:"";
  width:8px;
  height:8px;
  margin-left:9px;
  border-radius:50%;
  background:#15945d;
  box-shadow:0 0 0 3px #dff2e7
}
.status-cell.status-invalid {
  color:#b42318;
  background:#fff7f6
}
.status-cell.status-invalid::before {
  content:"";
  width:8px;
  height:8px;
  margin-left:9px;
  border-radius:50%;
  background:#b42318;
  box-shadow:0 0 0 3px #fde5e3
}
@media(max-width:760px) {
  .footer {
    padding:22px 6% 30px;
    gap:32px
  }
  .footer-links {
    gap:28px
  }
  .footer-links .footer-column {
    width:100%;
    align-items:flex-end;
    text-align:right;
    gap:10px;
    padding:0 2px
  }
  .footer-links .footer-column strong {
    font-size:18px
  }
  .footer-links .footer-column a {
    font-size:16px
  }
  .footer-social {
    gap:20px
  }
  .footer-logo-strip {
    min-height:0;
    height:528px;
    grid-template-rows:repeat(3,1fr);
    border-top:1px solid #dedede;
    border-left:0
  }
  .footer-logo-strip img {
    max-width:100%;
    max-height:176px;
    height:100%;
    padding:22px 12px
  }
  .footer-logo-strip .logo-digital {
    border-right:1px solid #dedede
  }
  .footer-disclaimer {
    display:none
  }
}
@media(max-width:480px) {
  .footer {
    padding:22px 6% 30px
  }
  .footer-logo-strip {
    height:440px
  }
  .footer-logo-strip img {
    max-height:146px;
    padding:16px 8px
  }
}
/* Mobile permit header matched to the latest supplied screenshot.
   Desktop header and all permit data styling remain unchanged. */

.mobile-verification-message {
  display:none
}
@media(max-width:760px) {
  .topbar {
    height:58px;
    min-height:58px;
    padding:0 12px;
    gap:12px;
    background:#fff
  }
  .topbar img {
    max-width:112px;
    max-height:42px
  }
  .main-stage {
    padding:18px 8px 14px;
    background:#f1f1f1
  }
  .stage-inner {
    padding:0;
    background:#f7f7f7
  }
  .record-card {
    border:2px solid #d1d3d6;
    background:#fff
  }
  .record-tabs {
    display:flex;
    flex-direction:column;
    border:0
  }
  .logo-cell {
    order:1;
    min-height:102px;
    height:102px;
    padding:12px 10px;
    border:0;
    border-bottom:2px solid #d1d3d6
  }
  .partner-logos {
    height:100%;
    width:100%;
    display:flex;
    flex-direction:row;
    align-items:center;
    justify-content:space-evenly;
    gap:18px
  }
  .partner-logos img {
    display:block;
    width:42%;
    max-width:42%;
    height:70px;
    max-height:70px;
    object-fit:contain
  }
  .heading-cell {
    order:2;
    min-height:78px;
    height:auto;
    padding:12px 8px;
    border:0;
    border-bottom:2px solid #d1d3d6;
    font-size:clamp(22px,6.1vw,30px);
    line-height:1.45;
    font-weight:600;
    color:#080d12
  }
  .status-cell {
    order:3;
    min-height:69px;
    height:auto;
    padding:12px 8px;
    border:0;
    border-bottom:2px solid #d1d3d6;
    background:#fff;
    color:#20694f;
    font-size:clamp(21px,5.7vw,28px);
    font-weight:500;
    line-height:1.4
  }
  .status-cell::before {
    display:none!important;
    content:none!important
  }
  .status-cell.status-invalid {
    background:#fff;
    color:#b42318
  }
  .mobile-verification-message {
    display:flex;
    min-height:95px;
    padding:18px 12px;
    align-items:center;
    justify-content:center;
    text-align:center;
    border-bottom:2px solid #d1d3d6;
    background:#fff;
    color:#101820;
    font-size:clamp(19px,5.2vw,26px);
    font-weight:400;
    line-height:1.6
  }
  .record-content {
    padding:14px 0 14px
  }
}
@media(max-width:480px) {
  .topbar {
    height:58px;
    min-height:58px;
    padding:0 12px
  }
  .topbar img {
    max-width:112px;
    max-height:40px
  }
  .logo-cell {
    min-height:98px;
    height:98px
  }
  .partner-logos img {
    height:66px;
    max-height:66px
  }
  .heading-cell {
    min-height:76px;
    font-size:clamp(21px,6vw,25px)
  }
  .status-cell {
    min-height:66px;
    font-size:clamp(20px,5.5vw,23px)
  }
  .mobile-verification-message {
    min-height:92px;
    font-size:clamp(18px,5vw,22px)
  }
}
/* Reference-matched logo order, desktop status, and Arabic footer layout. */

.topbar {
  direction: ltr;
}
.partner-logos {
  direction: ltr;
}
/* Keep the desktop status clean: green text, no decorative status dot. */

.status-cell {
  background: #fff;
}
.status-cell::before,
.status-cell.status-invalid::before {
  display: none;
  content: none;
}
/* The footer is Arabic (RTL); keep its text aligned to the right edge. */

.footer-links {
  direction: rtl;
  align-items: flex-end;
}
.footer-links .footer-column {
  direction: rtl;
  align-items: flex-end;
  text-align: right;
}
/* Partner marks: ministry, Takamol and Tamkeen on the right;
   Digital Government Authority centered in the left column. */

.footer-logo-strip {
  position: relative;
}
.footer-logo-strip::after {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  border-left: 1px solid #dedede;
  content: "";
  pointer-events: none;
}
.footer-logo-strip .logo-mlsd {
  grid-column: 1;
  grid-row: 1;
}
.footer-logo-strip .logo-takamol {
  grid-column: 1;
  grid-row: 2;
}
.footer-logo-strip .logo-tamkeen {
  grid-column: 1;
  grid-row: 3;
}
.footer-logo-strip .logo-digital {
  grid-column: 2;
  grid-row: 2;
  border: 0;
}
@media (max-width: 760px) {
  .footer {
    padding: 22px 6% 30px;
    gap: 100px;
  }
  .footer-links {
    width: 100%;
    align-items: flex-end;
    gap: 110px;
  }
  .footer-links .footer-column {
    width: 100%;
    align-items: flex-end;
    text-align: right;
    gap: 12px;
    padding: 0 2px;
  }
  .footer-links .footer-column strong {
    font-size: 22px;
    line-height: 1.7;
  }
  .footer-links .footer-column a {
    font-size: 21px;
    line-height: 1.7;
  }
  .footer-social {
    gap: 22px;
  }
  .footer-logo-strip {
    height: 528px;
    min-height: 0;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(3, 1fr);
    border-top: 1px solid #dedede;
  }
  .footer-logo-strip img {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 176px;
    padding: 22px 12px;
  }
  .footer-logo-strip::after {
    left: 50%;
  }
}
@media (max-width: 480px) {
  .footer {
    padding: 22px 6% 30px;
    gap: 82px;
  }
  .footer-links {
    gap: 88px;
  }
  .footer-links .footer-column strong {
    font-size: 20px;
  }
  .footer-links .footer-column a {
    font-size: 19px;
  }
  .footer-logo-strip {
    height: 440px;
  }
  .footer-logo-strip img {
    max-height: 146px;
    padding: 16px 8px;
  }
}


/* Final footer alignment: anchor the Arabic footer content to the right.
   The footer remains in normal document flow (not position: fixed), so it
   never covers permit details or the chatbot on small screens. */
.footer {
  align-items: flex-start;
}

.footer-links {
  width: 100%;
  align-items: flex-start;
  direction: rtl;
}

.footer-links .footer-column {
  width: max-content;
  max-width: 100%;
  align-self: flex-start;
  align-items: flex-start;
  text-align: right;
  direction: rtl;
}

.footer-links .footer-contact {
  align-items: flex-start;
}

.footer-social {
  align-self: flex-start;
  direction: ltr;
}

@media (max-width: 760px) {
  .footer {
    align-items: flex-start;
  }

  .footer-links {
    align-items: flex-start;
  }

  .footer-links .footer-column {
    width: max-content;
    max-width: 100%;
    align-self: flex-start;
    align-items: flex-start;
    text-align: right;
  }
}


/* ==========================================================================\n   FINAL REFERENCE OVERRIDES\n   Desktop: match the supplied permit header and one-row footer reference.\n   Mobile: use compact English footer labels and keep the existing mobile\n   permit header / stacked logo layout intact.\n   ========================================================================== */

/* Hide the translated copy on desktop; the site remains Arabic by default. */
.footer-en {
  display: none;
}

@media (min-width: 761px) {
  /* Header order: status on the left, title in the middle, logos on the right. */
  .record-tabs {
    display: grid;
    direction: ltr;
    grid-template-columns: 22% 48% 30%;
    grid-template-areas: "status heading logos";
    min-height: 88px;
  }

  .record-tabs .status-cell {
    grid-area: status;
    border-left: 1px solid #d4d9dc;
    background: #fff;
    color: #176548;
  }

  .record-tabs .heading-cell {
    grid-area: heading;
    border-left: 1px solid #d4d9dc;
  }

  .record-tabs .logo-cell {
    grid-area: logos;
    border-left: 0;
  }

  .record-tabs .partner-logos {
    direction: ltr;
    justify-content: center;
    gap: 12px;
  }

  .record-tabs .partner-logos img {
    max-width: 46%;
    max-height: 48px;
  }

  /* One horizontal footer row: partner logos on the left, links on the right. */
  .footer {
    display: grid;
    grid-template-columns: minmax(360px, 42%) minmax(0, 58%);
    align-items: center;
    column-gap: 28px;
    row-gap: 0;
    padding: 24px 5%;
    background: #fff;
  }

  .footer-logo-strip {
    grid-column: 1;
    grid-row: 1;
    direction: ltr;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
    min-height: 0;
    height: auto;
    padding: 0;
    border: 0;
  }

  .footer-logo-strip::after {
    display: none;
  }

  .footer-logo-strip img {
    display: block;
    flex: 1 1 0;
    width: 0;
    max-width: 25%;
    height: 58px;
    max-height: 58px;
    padding: 4px 8px;
    object-fit: contain;
  }

  .footer-logo-strip .logo-digital,
  .footer-logo-strip .logo-takamol,
  .footer-logo-strip .logo-tamkeen,
  .footer-logo-strip .logo-mlsd {
    grid-column: auto;
    grid-row: auto;
  }

  .footer-logo-strip .logo-mlsd {
    border-left: 1px solid #dedede;
    padding-left: 14px;
  }

  .footer-links {
    grid-column: 2;
    grid-row: 1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: start;
    justify-content: stretch;
    direction: rtl;
    width: 100%;
    gap: 18px;
  }

  .footer-links .footer-column {
    width: auto;
    min-width: 0;
    max-width: none;
    align-self: start;
    align-items: flex-start;
    justify-self: stretch;
    text-align: right;
    direction: rtl;
    gap: 7px;
  }

  .footer-links .footer-column strong {
    color: #202942;
    font-size: 12px;
    line-height: 1.5;
    font-weight: 600;
  }

  .footer-links .footer-column a {
    color: #667085;
    font-size: 11px;
    line-height: 1.55;
    white-space: normal;
  }

  .footer-links .footer-contact {
    align-items: flex-start;
  }

  .footer-social {
    align-self: flex-start;
    gap: 10px;
    margin-top: 1px;
  }

  .footer-social a,
  .footer-social span {
    width: 18px;
    height: 20px;
  }

  .footer-social svg {
    width: 16px;
    height: 16px;
  }
}

@media (max-width: 760px) {
  /* Mobile footer: Arabic labels only; preserve the existing mobile layout. */
  .footer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 26px;
    padding: 26px 18px 30px;
    overflow: hidden;
  }

  .footer-ar {
    display: inline;
  }

  .footer-en {
    display: none;
  }

  .footer-links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 24px;
    direction: ltr;
  }

  .footer-links .footer-column {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    align-self: stretch;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0;
    gap: 7px;
    direction: ltr;
    text-align: right;
  }

  .footer-links .footer-column strong {
    color: #202942;
    font-size: 16px;
    line-height: 1.45;
    font-weight: 600;
  }

  .footer-links .footer-column a {
    color: #667085;
    font-size: 14px;
    line-height: 1.55;
    text-align: right;
  }

  .footer-social {
    display: flex;
    align-self: flex-end;
    direction: ltr;
    gap: 16px;
    margin-top: 3px;
  }

  .footer-social a,
  .footer-social span {
    width: 22px;
    height: 24px;
  }

  .footer-social svg {
    width: 21px;
    height: 21px;
  }

  .footer-logo-strip {
    display: grid;
    direction: ltr;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(76px, auto));
    width: 100%;
    height: auto;
    min-height: 228px;
    padding: 8px 0;
    border-top: 1px solid #dedede;
    gap: 0;
  }

  .footer-logo-strip::after {
    display: block;
    left: 50%;
    top: 8px;
    bottom: 8px;
    border-left: 1px solid #dedede;
  }

  .footer-logo-strip img {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 92px;
    padding: 12px 10px;
  }

  .footer-logo-strip .logo-digital {
    grid-column: 1;
    grid-row: 2;
    border: 0;
  }

  .footer-logo-strip .logo-takamol {
    grid-column: 2;
    grid-row: 2;
  }

  .footer-logo-strip .logo-tamkeen {
    grid-column: 2;
    grid-row: 3;
  }

  .footer-logo-strip .logo-mlsd {
    grid-column: 2;
    grid-row: 1;
    border: 0;
  }
}

@media (max-width: 480px) {
  .footer {
    gap: 22px;
    padding: 22px 16px 26px;
  }

  .footer-links {
    gap: 21px;
  }

  .footer-links .footer-column strong {
    font-size: 15px;
  }

  .footer-links .footer-column a {
    font-size: 13px;
  }

  .footer-logo-strip {
    min-height: 210px;
    grid-template-rows: repeat(3, minmax(70px, auto));
  }

  .footer-logo-strip img {
    max-height: 82px;
    padding: 10px 8px;
  }
}

/* ======================================================================
   DESKTOP PERMIT DETAILS — matched to the supplied reference screenshot
   These rules apply only above 760px. Existing mobile layout is untouched.
   ====================================================================== */
@media (min-width: 761px) {
  /* The reference starts directly with the permit card. */
  .topbar {
    display: none;
  }

  .main-stage {
    flex: 1 0 auto;
    padding: 7px 15px 0;
    background: #f7f7f7;
  }

  .stage-inner {
    min-height: 0;
    padding: 0;
    display: block;
    background: transparent;
  }

  .record-card {
    width: 100%;
    max-width: 780px;
    margin: 0 auto;
    border: 1px solid #cfd4d8;
    background: #fff;
  }

  /* Header columns: status | title | ministry and Ajeer logos. */
  .record-tabs {
    min-height: 96px;
    display: grid;
    grid-template-columns: 22% 48% 30%;
    grid-template-areas: "status heading logos";
    direction: ltr;
    border-bottom: 1px solid #cfd4d8;
  }

  .record-tabs .status-cell {
    grid-area: status;
    min-width: 0;
    padding: 8px;
    border-left: 1px solid #cfd4d8;
    background: #fff;
    color: #176548;
    font-size: 13px;
    font-weight: 600;
  }

  .record-tabs .status-cell::before,
  .record-tabs .status-cell.status-invalid::before {
    display: none !important;
    content: none !important;
  }

  .record-tabs .status-cell.status-invalid {
    color: #b42318;
    background: #fff;
  }

  .record-tabs .heading-cell {
    grid-area: heading;
    min-width: 0;
    padding: 8px;
    border-left: 1px solid #cfd4d8;
    background: #fff;
    color: #080d12;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.4;
  }

  .record-tabs .logo-cell {
    grid-area: logos;
    min-width: 0;
    padding: 8px 10px;
    border-left: 0;
    background: #fff;
  }

  .record-tabs .partner-logos {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    direction: ltr;
  }

  .record-tabs .partner-logos img {
    display: block;
    width: auto;
    max-width: 46%;
    height: 48px;
    max-height: 48px;
    object-fit: contain;
  }

  /* The success line sits between the header and the detail tables. */
  .mobile-verification-message:not([hidden]) {
    display: flex;
    min-height: 100px;
    padding: 16px 12px;
    align-items: center;
    justify-content: center;
    border-bottom: 0;
    background: #fff;
    color: #080d12;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    text-align: center;
  }

  .record-content {
    padding: 0 13px 18px;
    background: #fff;
  }

  .info-section {
    margin: 0 0 18px;
    border: 1px solid #cfd4d8;
    background: #fff;
  }

  .section-title {
    min-height: 40px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #cfd4d8;
    background: #e9eeee;
    color: #080d12;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
  }

  /* Four equal cells: value, label, value, label (left to right). */
  .data-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    direction: ltr;
  }

  .data-pair {
    display: contents;
  }

  .data-value,
  .data-label {
    min-width: 0;
    min-height: 34px;
    padding: 7px 10px;
    display: flex;
    align-items: center;
    border-left: 1px solid #cfd4d8;
    border-bottom: 1px solid #cfd4d8;
    overflow-wrap: anywhere;
    font-size: 13px;
    line-height: 1.4;
  }

  .data-value {
    justify-content: center;
    background: #fff;
    color: #080d12;
    font-weight: 600;
    text-align: center;
  }

  .data-label {
    justify-content: flex-end;
    background: #e9eeee;
    color: #172033;
    direction: rtl;
    font-size: 12px;
    font-weight: 400;
    text-align: right;
  }

  .data-row:last-child .data-value,
  .data-row:last-child .data-label {
    border-bottom: 0;
  }

  .data-row > :last-child {
    border-left: 0;
  }

  .info-section:last-child {
    margin-bottom: 0;
  }
}
