:root{
  --bg:#f6f9fa;
  --card:#ffffff;
  --ink:#1e3740;
  --muted:#72858c;
  --line:#dfe8ec;
  --line-soft:#edf3f5;
  --primary:#0f6771;
  --primary-dark:#0b5962;
  --primary-soft:#e9f4f5;
  --success:#1b7b5e;
  --success-soft:#edf8f4;
  --danger:#9b4750;
  --danger-soft:#fbf0f1;
  --warning:#9a6b30;
  --warning-soft:#fbf6ec;
  --gold:#aa7d3d;
  --shadow:0 18px 42px rgba(28,61,72,.07);
}

*{box-sizing:border-box}

body{
  margin:0;
  min-height:100vh;
  font-family:"Cairo","Segoe UI",Tahoma,Arial,sans-serif;
  color:var(--ink);
  background:linear-gradient(180deg,#fbfdfd 0%,var(--bg) 100%);
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(circle at 80px 80px, rgba(15,103,113,.05), transparent 260px),
    radial-gradient(circle at calc(100% - 120px) 10px, rgba(170,125,61,.04), transparent 260px);
}

a{text-decoration:none;color:inherit}

.page{
  position:relative;
  width:min(760px, calc(100% - 32px));
  margin:0 auto;
  padding:28px 0 22px;
}

.service-card,.result-card,.message-card,.admin-card{
  background:rgba(255,255,255,.97);
  border:1px solid var(--line);
  box-shadow:var(--shadow);
}

.service-card{
  border-radius:18px;
  padding:24px;
}

.service-header{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:14px;
  padding-bottom:18px;
  border-bottom:1px solid var(--line-soft);
}

.official-mark{
  width:44px;
  height:44px;
  flex:0 0 auto;
  border-radius:13px;
  display:grid;
  place-items:center;
  background:var(--primary);
  box-shadow:0 10px 24px rgba(15,103,113,.14);
}

.official-mark span{
  width:18px;
  height:18px;
  border:5px solid #fff;
  border-top-color:#c99a55;
  border-radius:6px;
  transform:rotate(45deg);
}

.agency{
  margin:0 0 4px;
  color:var(--gold);
  font-size:12.5px;
  line-height:1.6;
  font-weight:600;
}

h1{
  margin:0;
  font-size:clamp(27px,4.2vw,34px);
  line-height:1.35;
  letter-spacing:-.2px;
  font-weight:600;
  color:#17323b;
}

.subtitle{
  margin:5px 0 0;
  color:var(--muted);
  font-size:13px;
  line-height:1.8;
  font-weight:400;
}

/* Stable inquiry form */
.inquiry-form{
  margin-top:18px;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.form-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) 180px;
  gap:10px;
  align-items:end;
}

.input-group label{
  display:block;
  margin:0 2px 7px;
  color:#344d56;
  font-size:13px;
  line-height:1.5;
  font-weight:600;
}

input,select{
  width:100%;
  height:44px;
  border:1px solid #d6e3e7;
  border-radius:12px;
  background:#fff;
  color:#18353e;
  outline:none;
  padding:0 14px;
  font-family:inherit;
  font-size:14px;
  line-height:44px;
  font-weight:500;
  transition:border-color .18s ease, box-shadow .18s ease;
}

input[type="file"]{
  height:auto;
  line-height:1.6;
  padding:11px 14px;
}

.inquiry-form input{
  font-size:16px;
  text-align:center;
  direction:ltr;
}

input::placeholder{color:#9aa9ae;font-weight:400}

input:focus,select:focus{
  border-color:rgba(15,103,113,.62);
  box-shadow:0 0 0 4px rgba(15,103,113,.07);
}

button,.primary-btn,.secondary-btn,.exit-btn,.exit-link{
  min-height:44px;
  border:0;
  border-radius:12px;
  font-family:inherit;
  font-size:14px;
  font-weight:600;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

button,.primary-btn{
  background:var(--primary);
  color:#fff;
  padding:0 18px;
}

.search-button{
  width:100%;
}

button:hover,.primary-btn:hover{background:var(--primary-dark)}

.secondary-btn,.exit-btn,.exit-link{
  color:#28434c;
  background:#f7fbfc;
  border:1px solid var(--line);
  padding:0 16px;
}

.form-note{
  margin:0 2px;
  color:var(--muted);
  font-size:11.5px;
  line-height:1.8;
  font-weight:400;
}

.records-list{
  display:grid;
  gap:12px;
  margin-top:14px;
}

.result-card{
  border-radius:18px;
  overflow:hidden;
}

.result-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:16px 20px;
  border-bottom:1px solid var(--line-soft);
}

.result-meta{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.eyebrow{
  color:var(--muted);
  font-size:12px;
  line-height:1.5;
  font-weight:500;
}

.status-badge,.mini-status,.reference-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  font-size:12px;
  line-height:1.4;
  font-weight:600;
  white-space:nowrap;
}

.status-badge,.mini-status{
  border:1px solid rgba(27,123,94,.22);
  background:var(--success-soft);
  color:var(--success);
}

.reference-pill{
  min-height:32px;
  padding:6px 12px;
  border:1px solid var(--line);
  background:#f8fbfc;
  color:#536b73;
}

.status-badge{min-height:32px;padding:6px 13px}
.mini-status{min-height:26px;padding:4px 10px;font-size:11.5px}

.decision-box{
  margin:18px 20px 0;
  padding:18px 20px;
  border-radius:16px;
  background:#f8fbfc;
  border:1px solid var(--line);
}

.decision-box h2{
  margin:0;
  color:var(--warning);
  font-size:clamp(23px,3.4vw,30px);
  line-height:1.45;
  font-weight:600;
}

.decision-box p{
  margin:6px 0 0;
  color:#455f68;
  font-size:13.5px;
  line-height:1.9;
  font-weight:400;
}

.renewed-box{
  background:linear-gradient(180deg,#f5fbf8 0%,#ffffff 100%);
  border-color:rgba(27,123,94,.20);
}

.renewed-box h2{color:var(--success)}

.info-section{
  padding:18px 20px 20px;
}

.info-section h3{
  margin:0 0 12px;
  color:#28434c;
  font-size:14px;
  line-height:1.7;
  font-weight:600;
}

.info-table{
  display:grid;
  grid-template-columns:1fr 1fr;
  border:1px solid var(--line);
  border-radius:14px;
  overflow:hidden;
  background:#fff;
}

.info-row{
  display:grid;
  grid-template-columns:112px minmax(0,1fr);
  align-items:center;
  min-height:48px;
  border-bottom:1px solid var(--line-soft);
}

.info-row:nth-child(odd){border-left:1px solid var(--line-soft)}
.info-row.full{grid-column:1/-1;border-left:0;border-bottom:0}
.info-row:nth-last-child(2):not(.full){border-bottom:0}

.info-row span{
  height:100%;
  display:flex;
  align-items:center;
  padding:10px 13px;
  background:#f8fbfc;
  color:#74878e;
  font-size:12px;
  line-height:1.6;
  font-weight:500;
  border-left:1px solid var(--line-soft);
}

.info-row strong{
  display:block;
  min-width:0;
  padding:10px 13px;
  color:#213d46;
  font-size:13px;
  line-height:1.8;
  font-weight:500;
  word-break:break-word;
}

.result-actions{
  display:flex;
  justify-content:flex-start;
  padding:0 20px 20px;
}

.message-card{
  margin-top:14px;
  border-radius:16px;
  padding:16px 18px;
  display:grid;
  gap:8px;
}

.message-card strong{
  color:#25424b;
  font-size:15px;
  line-height:1.7;
  font-weight:600;
}

.message-card span,.message-card small{
  color:var(--muted);
  font-size:13px;
  line-height:1.8;
}

.message-card.alert{
  border-color:rgba(155,71,80,.18);
  background:#fffafa;
}

.status-not_renewed .decision-box,
.status-not-renewed .decision-box{border-color:rgba(155,71,80,.18);background:var(--danger-soft)}
.status-not_renewed .decision-box h2,
.status-not-renewed .decision-box h2,
.status-not_renewed .mini-status,
.status-not-renewed .mini-status,
.status-not_renewed .status-badge,
.status-not-renewed .status-badge{color:var(--danger)}
.status-not_renewed .status-badge,
.status-not-renewed .status-badge,
.status-not_renewed .mini-status,
.status-not-renewed .mini-status{border-color:rgba(155,71,80,.22);background:var(--danger-soft)}

.status-limited .decision-box,.status-pending .decision-box{border-color:rgba(154,107,48,.20);background:var(--warning-soft)}
.status-limited .decision-box h2,.status-pending .decision-box h2,
.status-limited .status-badge,.status-pending .status-badge,
.status-limited .mini-status,.status-pending .mini-status{color:var(--warning)}
.status-limited .status-badge,.status-pending .status-badge,
.status-limited .mini-status,.status-pending .mini-status{border-color:rgba(154,107,48,.22);background:var(--warning-soft)}

.footer{
  margin-top:14px;
  color:#819198;
  font-size:11.5px;
  line-height:1.8;
  text-align:center;
  font-weight:400;
}

/* Admin */
.admin-page{
  position:relative;
  width:min(1180px,calc(100% - 32px));
  margin:0 auto;
  padding:28px 0;
}

.admin-page.narrow{width:min(760px,calc(100% - 32px))}

.admin-header{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin-bottom:16px;
}

.admin-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.stats-grid{
  display:grid;
  grid-template-columns:repeat(6,1fr);
  gap:10px;
  margin-bottom:14px;
}

.log-stats{grid-template-columns:repeat(3,1fr)}
.import-stats{grid-template-columns:repeat(4,1fr)}

.stat-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:16px;
  padding:14px;
  box-shadow:0 10px 24px rgba(28,61,72,.045);
}

.stat-card span{
  display:block;
  color:var(--muted);
  font-size:12px;
  line-height:1.7;
  font-weight:500;
}

.stat-card strong{
  display:block;
  margin-top:3px;
  color:#18353e;
  font-size:24px;
  line-height:1.3;
  font-weight:600;
}

.stat-card.success strong{color:var(--success)}
.stat-card.danger strong{color:var(--danger)}
.stat-card.warning strong{color:var(--warning)}

.category-strip{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:10px;
  margin-bottom:14px;
}

.category-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:16px;
  padding:13px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  box-shadow:0 10px 24px rgba(28,61,72,.04);
}

.category-card span{
  color:#536b73;
  font-size:13px;
  font-weight:600;
}

.category-card strong{
  color:#18353e;
  font-size:22px;
  line-height:1;
  font-weight:600;
}

.category-card.active{
  border-color:rgba(15,103,113,.35);
  background:var(--primary-soft);
}

.admin-card{
  border-radius:18px;
  padding:16px;
  margin-bottom:14px;
}

.admin-filter{
  display:grid;
  grid-template-columns:minmax(260px,1fr) 180px 180px 96px auto;
  gap:8px;
  align-items:center;
  margin-bottom:14px;
}

.logs-filter{
  grid-template-columns:minmax(260px,1fr) 180px 96px auto;
}

.clear-filter{
  min-height:44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:var(--muted);
  font-size:13px;
  padding:0 10px;
}

.filter-note{
  margin:-2px 0 12px;
  color:#60747c;
  font-size:12.5px;
}

.table-wrap{
  overflow:auto;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
}

/* Stable real tables */
.admin-table{
  width:100%;
  border-collapse:collapse;
  background:#fff;
}

.records-table{min-width:1040px}
.logs-table{min-width:1280px}
.summary-table{min-width:720px}

.admin-table th{
  text-align:right;
  background:#f8fbfc;
  color:#60747c;
  font-size:12px;
  line-height:1.7;
  font-weight:600;
  padding:11px 12px;
  border-bottom:1px solid var(--line);
  white-space:nowrap;
}

.admin-table td{
  color:#263f48;
  font-size:12.5px;
  line-height:1.7;
  font-weight:500;
  padding:10px 12px;
  border-bottom:1px solid var(--line-soft);
  vertical-align:middle;
}

.admin-table tr:last-child td{border-bottom:0}

.summary-table th,
.summary-table td{
  text-align:center;
}

.summary-table th:first-child,
.summary-table td:first-child{
  text-align:right;
}

.table-link{
  color:var(--primary);
  font-weight:600;
}

.ltr{direction:ltr;text-align:right}
.ua-cell{max-width:280px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;direction:ltr;text-align:left}

.row-actions{
  display:flex;
  align-items:center;
  gap:8px;
  white-space:nowrap;
}

.row-actions a{
  color:var(--primary);
  font-size:12.5px;
  font-weight:600;
}

.row-actions form{margin:0}

.delete-link{
  min-height:auto;
  height:auto;
  border:0;
  background:transparent !important;
  color:var(--danger);
  padding:0;
  font-size:12.5px;
  font-weight:600;
  box-shadow:none;
}

.empty-row{
  text-align:center;
  color:var(--muted) !important;
  padding:24px !important;
}

.pagination{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:14px;
  padding-top:14px;
  color:var(--muted);
  font-size:13px;
}

.pagination a{
  color:var(--primary);
  font-weight:600;
}

.admin-messages{
  display:grid;
  gap:8px;
  margin-bottom:12px;
}

.message-item{
  border:1px solid rgba(27,123,94,.18);
  background:var(--success-soft);
  color:var(--success);
  border-radius:12px;
  padding:10px 12px;
  font-size:13px;
  font-weight:500;
}

.message-item.error{
  border-color:rgba(155,71,80,.18);
  background:var(--danger-soft);
  color:var(--danger);
}

.record-form,.import-form{
  display:grid;
  gap:16px;
}

.form-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}

.form-field{
  display:grid;
  gap:7px;
}

.form-field label,.upload-box label,.mode-box label{
  color:#344d56;
  font-size:13px;
  font-weight:600;
}

.checkbox-field{
  grid-column:1/-1;
  display:flex;
  flex-direction:row;
  align-items:center;
  gap:10px;
}

.checkbox-field input{
  width:18px;
  height:18px;
  padding:0;
}

.field-error,.form-errors,.error-text{
  color:var(--danger);
  font-size:12px;
  line-height:1.7;
}

.help-text,.upload-box p{
  color:var(--muted);
  font-size:11.5px;
  line-height:1.8;
  margin:0;
}

.form-actions,.confirm-form{
  display:flex;
  gap:8px;
  justify-content:flex-start;
  padding-top:4px;
  flex-wrap:wrap;
}

.import-layout{
  display:grid;
  grid-template-columns:1.1fr .9fr;
  gap:16px;
}

.upload-box,.mode-box{
  display:grid;
  gap:8px;
  align-content:start;
  border:1px solid var(--line);
  border-radius:16px;
  padding:16px;
  background:#fbfdfd;
}

.mode-box ul{
  margin:0;
  padding:0;
  list-style:none;
  display:grid;
  gap:8px;
}

.mode-box li{
  display:flex;
  align-items:center;
  gap:8px;
  color:#334b54;
  font-size:13px;
}

.mode-box input{
  width:16px;
  height:16px;
  padding:0;
}

.section-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:14px;
}

.section-head.compact{margin-bottom:10px}

.section-head h2{
  margin:0;
  color:#17323b;
  font-size:20px;
  line-height:1.5;
  font-weight:600;
}

.section-head p{
  margin:2px 0 0;
  color:var(--muted);
  font-size:12.5px;
  line-height:1.8;
}

.outline-danger{
  background:#fff !important;
  border:1px solid rgba(155,71,80,.22);
  color:var(--danger);
}

.ok-text{
  color:var(--success);
  font-size:12px;
  font-weight:600;
}

.confirm-import-card{
  border-color:rgba(170,125,61,.22);
  background:linear-gradient(180deg,#fffdfa 0%,#fff 100%);
}

.confirm-panel{
  display:grid;
  gap:12px;
}

.confirm-check{
  display:flex;
  align-items:flex-start;
  gap:10px;
  border:1px solid var(--line);
  background:#fff;
  border-radius:14px;
  padding:12px 14px;
  color:#344d56;
  font-size:13px;
  line-height:1.8;
  font-weight:500;
}

.confirm-check input{
  width:18px;
  height:18px;
  padding:0;
  margin-top:3px;
}

.success-text{color:var(--success) !important}
.danger-text{color:var(--danger) !important}
.warning-text{color:var(--warning) !important}

@media (max-width:1000px){
  .stats-grid,.category-strip{grid-template-columns:repeat(3,1fr)}
  .admin-header{align-items:flex-start;flex-direction:column}
  .admin-filter,.logs-filter{grid-template-columns:1fr}
  .import-layout{grid-template-columns:1fr}
  .form-row{grid-template-columns:1fr}
}

@media (max-width:680px){
  .page,.admin-page{
    width:min(100% - 22px,720px);
    padding:14px 0 16px;
  }

  .service-card{
    padding:18px;
    border-radius:16px;
  }

  .service-header{
    align-items:flex-start;
    justify-content:flex-start;
  }

  .official-mark{
    width:40px;
    height:40px;
    border-radius:12px;
  }

  button,.primary-btn,.secondary-btn{
    width:100%;
  }

  .result-top{
    flex-direction:column;
    align-items:flex-start;
  }

  .result-meta{
    justify-content:flex-start;
  }

  .info-table{
    grid-template-columns:1fr;
  }

  .info-row{
    grid-template-columns:100px minmax(0,1fr);
    border-left:0 !important;
  }

  .info-row:nth-last-child(2):not(.full){
    border-bottom:1px solid var(--line-soft);
  }

  h1{font-size:26px}
  .stats-grid,.category-strip{grid-template-columns:1fr 1fr}
  .form-grid{grid-template-columns:1fr}
  .section-head{flex-direction:column}
}


/* V9 result-only refinements */
.result-only-page{
  width:min(760px, calc(100% - 32px));
}

.result-page-header{
  background:rgba(255,255,255,.97);
  border:1px solid var(--line);
  border-radius:18px;
  box-shadow:var(--shadow);
  padding:18px 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-bottom:14px;
}

.result-page-header h1{
  font-size:28px;
}

.result-page-header .secondary-btn{
  min-width:120px;
}

.inquiry-form{
  margin-top:18px;
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
}

.inquiry-form .search-button{
  width:100%;
}

.inquiry-form input{
  font-size:16px;
  text-align:center;
  direction:ltr;
}

@media (max-width:680px){
  .result-page-header{
    align-items:flex-start;
    flex-direction:column;
  }

  .result-page-header .secondary-btn{
    width:100%;
  }
}



/* V10 Final Look */
.result-only-page{
  width:min(760px, calc(100% - 32px));
  padding-top:18px;
}

.result-page-header{
  background:rgba(255,255,255,.97);
  border:1px solid var(--line);
  border-radius:18px;
  box-shadow:0 14px 34px rgba(28,61,72,.055);
  padding:17px 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-bottom:12px;
}

.result-page-header h1{
  font-size:27px;
  line-height:1.35;
  font-weight:600;
}

.result-header-meta{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin-top:5px;
  color:var(--muted);
  font-size:12.5px;
  line-height:1.8;
}

.reference-pill,
.reference-line bdi{
  direction:ltr;
  unicode-bidi:isolate;
}

.reference-pill{
  min-height:28px;
  padding:5px 11px;
  border:1px solid var(--line);
  background:#f8fbfc;
  color:#536b73;
  border-radius:999px;
  font-size:11.5px;
  font-weight:600;
}

.result-page-header .secondary-btn{
  min-width:118px;
  min-height:40px;
}

.final-result-card{
  padding-top:0;
}

.final-result-card .decision-box{
  margin:20px 20px 0;
  padding:18px 20px;
  position:relative;
}

.final-result-card .decision-box .status-badge{
  position:absolute;
  top:14px;
  inset-inline-start:16px;
  min-height:28px;
  padding:5px 12px;
  font-size:11.5px;
}

.final-result-card .decision-box h2{
  padding-inline-start:110px;
  font-size:clamp(25px,3.2vw,31px);
  font-weight:600;
}

.final-result-card .decision-box p{
  padding-inline-start:110px;
  font-size:13px;
}

.final-result-card .info-section{
  padding-top:18px;
}

.final-result-card .info-section h3{
  margin-bottom:10px;
}

.info-row span{
  background:#fafcfd;
  color:#7a8b91;
  font-weight:500;
}

.info-row strong{
  color:#263f48;
  font-weight:500;
}

.result-actions{
  padding-top:0;
}

.exit-btn{
  min-height:40px;
}

.footer{
  margin-top:12px;
}

@media (max-width:680px){
  .result-page-header{
    align-items:flex-start;
    flex-direction:column;
  }

  .result-page-header .secondary-btn{
    width:100%;
  }

  .final-result-card .decision-box .status-badge{
    position:static;
    margin-bottom:8px;
  }

  .final-result-card .decision-box h2,
  .final-result-card .decision-box p{
    padding-inline-start:0;
  }
}



/* V11 Unified result document */
.result-only-page{
  width:min(760px, calc(100% - 32px));
  padding-top:18px;
}

.result-only-page .records-list{
  margin-top:0;
}

.result-document-card{
  background:rgba(255,255,255,.98);
  border:1px solid var(--line);
  border-radius:20px;
  box-shadow:0 18px 42px rgba(28,61,72,.07);
  overflow:hidden;
}

.document-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding:22px 22px 18px;
  border-bottom:1px solid var(--line-soft);
}

.document-title h1{
  margin:0;
  font-size:30px;
  line-height:1.35;
  font-weight:600;
  color:#17323b;
}

.document-header .secondary-btn{
  min-width:116px;
  min-height:40px;
  flex:0 0 auto;
}

.document-meta{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  padding:16px 22px 0;
}

.meta-item{
  min-height:54px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fbfdfd;
  padding:9px 13px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.meta-item span{
  color:#7a8b91;
  font-size:12px;
  font-weight:500;
}

.meta-item strong{
  color:#263f48;
  font-size:13px;
  font-weight:600;
}

.meta-item bdi{
  direction:ltr;
  unicode-bidi:isolate;
}

.document-decision{
  margin:16px 22px 0 !important;
  padding:20px 22px !important;
  text-align:center;
}

.document-decision h2{
  padding:0 !important;
  font-size:clamp(27px,3.4vw,33px) !important;
}

.document-decision p{
  padding:0 !important;
  margin-top:7px !important;
}

.document-info{
  padding:18px 22px 22px !important;
}

.document-info h3{
  margin-bottom:11px;
}

.result-actions,
.result-top,
.result-page-header{
  display:none !important;
}

.footer{
  margin-top:12px;
}

@media (max-width:680px){
  .document-header{
    flex-direction:column;
  }

  .document-header .secondary-btn{
    width:100%;
  }

  .document-meta{
    grid-template-columns:1fr;
  }

  .document-title h1{
    font-size:27px;
  }
}



/* V12 Final benefit-style result */
.document-header{
  padding:20px 22px 16px !important;
}

.document-title h1{
  font-size:29px !important;
}

.new-query-btn{
  min-height:36px !important;
  min-width:104px !important;
  padding:0 14px !important;
  border-radius:11px !important;
  font-size:13px !important;
  font-weight:600 !important;
  background:#fbfdfd !important;
}

.document-meta{
  grid-template-columns:1fr 1fr !important;
  padding:14px 22px 0 !important;
}

.meta-item{
  min-height:50px !important;
  padding:8px 13px !important;
  background:#fff !important;
}

.meta-item span{
  color:#7d8e94 !important;
  font-size:11.5px !important;
}

.meta-item strong{
  color:#1f3a43 !important;
  font-size:14px !important;
  font-weight:600 !important;
}

.status-meta strong{
  color:var(--success) !important;
}

.status-not_renewed .status-meta strong,
.status-not-renewed .status-meta strong{
  color:var(--danger) !important;
}

.status-limited .status-meta strong,
.status-pending .status-meta strong{
  color:var(--warning) !important;
}

.document-decision{
  margin:15px 22px 0 !important;
  padding:18px 22px !important;
}

.document-decision h2{
  font-size:clamp(27px,3.2vw,32px) !important;
}

.document-info{
  padding:18px 22px 22px !important;
}

.benefit-info{
  display:grid;
  gap:10px;
}

.benefit-pair{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

.benefit-item{
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
  padding:11px 14px;
  min-height:58px;
  display:grid;
  align-content:center;
  gap:4px;
}

.benefit-item span{
  color:#809096;
  font-size:11.5px;
  line-height:1.6;
  font-weight:500;
}

.benefit-item strong{
  color:#263f48;
  font-size:13.5px;
  line-height:1.9;
  font-weight:500;
  word-break:break-word;
}

.benefit-item.full strong{
  font-size:14px;
}

.status-line{
  background:#fbfdfd;
}

.status-line strong{
  color:#1f3a43;
  font-weight:600;
}

.info-table{
  display:none !important;
}

@media (max-width:680px){
  .document-meta,
  .benefit-pair{
    grid-template-columns:1fr !important;
  }

  .new-query-btn{
    width:100% !important;
  }
}



/* V13 Final micro-polish */
.result-only-page{
  padding-top:14px !important;
}

.result-document-card{
  border-radius:18px !important;
}

.document-header{
  padding:17px 22px 13px !important;
}

.document-title .agency{
  margin-bottom:2px !important;
}

.document-title h1{
  font-size:28px !important;
  line-height:1.28 !important;
}

.document-title .subtitle{
  margin-top:3px !important;
  font-size:12.5px !important;
}

.new-query-btn{
  min-height:34px !important;
  min-width:100px !important;
  padding:0 13px !important;
  font-size:12.5px !important;
}

.document-meta{
  padding:12px 22px 0 !important;
  gap:9px !important;
}

.meta-item{
  min-height:46px !important;
  padding:7px 13px !important;
  border-radius:13px !important;
}

.meta-item span{
  font-size:11.5px !important;
}

.meta-item strong{
  font-size:14.5px !important;
  font-weight:600 !important;
}

.document-decision{
  margin:14px 22px 0 !important;
  padding:17px 20px !important;
  border-radius:15px !important;
}

.document-decision h2{
  font-size:clamp(27px,3vw,31px) !important;
  line-height:1.35 !important;
}

.document-decision p{
  margin-top:5px !important;
  font-size:12.8px !important;
  line-height:1.85 !important;
}

.document-info{
  padding:16px 22px 20px !important;
}

.document-info h3{
  margin-bottom:9px !important;
  font-size:13.5px !important;
}

.benefit-info{
  gap:9px !important;
}

.benefit-pair{
  gap:9px !important;
}

.benefit-item{
  min-height:54px !important;
  padding:10px 13px !important;
  border-radius:13px !important;
}

.benefit-item span{
  font-size:11.3px !important;
}

.benefit-item strong{
  font-size:13.3px !important;
  line-height:1.8 !important;
}

.benefit-item.full strong{
  font-size:13.7px !important;
}

.footer{
  margin-top:10px !important;
  font-size:11.3px !important;
}

/* Entry card polish */
.service-card{
  padding:22px 24px !important;
}

.service-header{
  padding-bottom:16px !important;
}

.inquiry-form{
  margin-top:16px !important;
}

.inquiry-form .search-button{
  min-height:42px !important;
}

@media (max-width:680px){
  .document-header{
    padding:16px 18px 12px !important;
  }

  .document-meta,
  .document-decision,
  .document-info{
    margin-left:18px !important;
    margin-right:18px !important;
  }

  .document-meta{
    padding-left:18px !important;
    padding-right:18px !important;
  }

  .document-info{
    padding-left:18px !important;
    padding-right:18px !important;
  }
}



/* V14 decision data */
.decision-details{
  margin:0 22px 22px;
  padding-top:2px;
}

.decision-details h3{
  margin:0 0 10px;
  color:#28434c;
  font-size:13.5px;
  line-height:1.7;
  font-weight:600;
}

.decision-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:9px;
}

.decision-item{
  min-height:54px;
  border:1px solid var(--line);
  border-radius:13px;
  background:#fff;
  padding:10px 13px;
  display:grid;
  align-content:center;
  gap:4px;
}

.decision-item span{
  color:#809096;
  font-size:11.3px;
  line-height:1.6;
  font-weight:500;
}

.decision-item strong{
  color:#263f48;
  font-size:13.3px;
  line-height:1.8;
  font-weight:500;
  word-break:break-word;
}

.decision-item bdi{
  direction:ltr;
  unicode-bidi:isolate;
}

.decision-note{
  margin-top:9px;
  border:1px solid rgba(170,125,61,.20);
  background:#fffdfa;
  color:#5d6e74;
  border-radius:13px;
  padding:11px 13px;
  font-size:12.5px;
  line-height:1.9;
  font-weight:400;
}

.status-renewed .decision-note{
  border-color:rgba(27,123,94,.16);
  background:#f8fcfa;
}

.status-not_renewed .decision-note,
.status-not-renewed .decision-note{
  border-color:rgba(155,71,80,.16);
  background:#fffafa;
}

.wide-field{
  grid-column:1/-1;
}

.form-field textarea{
  width:100%;
  border:1px solid #d6e3e7;
  border-radius:12px;
  background:#fff;
  color:#18353e;
  outline:none;
  padding:12px 14px;
  font-family:inherit;
  font-size:14px;
  line-height:1.8;
  font-weight:500;
  resize:vertical;
}

.form-field textarea:focus{
  border-color:rgba(15,103,113,.62);
  box-shadow:0 0 0 4px rgba(15,103,113,.07);
}

@media (max-width:680px){
  .decision-grid{
    grid-template-columns:1fr;
  }

  .decision-details{
    margin-left:18px;
    margin-right:18px;
  }
}



/* V16 decision notice refinement */
.decision-details{
  margin:0 22px 22px !important;
  padding:0 !important;
}

.decision-details h3{
  margin:0 0 9px !important;
  color:#28434c !important;
  font-size:13.5px !important;
  line-height:1.7 !important;
  font-weight:600 !important;
}

.decision-grid{
  display:grid !important;
  grid-template-columns:1fr 1fr !important;
  gap:9px !important;
  margin-bottom:9px !important;
}

.decision-item{
  min-height:52px !important;
  border:1px solid var(--line) !important;
  border-radius:13px !important;
  background:#fff !important;
  padding:10px 13px !important;
  display:grid !important;
  align-content:center !important;
  gap:4px !important;
}

.decision-item span{
  color:#809096 !important;
  font-size:11.3px !important;
  line-height:1.6 !important;
  font-weight:500 !important;
}

.decision-item strong{
  color:#263f48 !important;
  font-size:13.3px !important;
  line-height:1.8 !important;
  font-weight:500 !important;
  word-break:break-word !important;
}

.official-notice{
  display:block !important;
  width:100% !important;
  box-sizing:border-box !important;
  margin:0 !important;
  border:1px solid rgba(170,125,61,.20) !important;
  background:#fffdfa !important;
  color:#52686f !important;
  border-radius:13px !important;
  padding:12px 14px !important;
  font-size:12.5px !important;
  line-height:1.95 !important;
  font-weight:500 !important;
  text-align:right !important;
  overflow-wrap:anywhere !important;
}

.status-renewed .official-notice{
  border-color:rgba(27,123,94,.16) !important;
  background:#f8fcfa !important;
}

.status-not_renewed .official-notice,
.status-not-renewed .official-notice{
  border-color:rgba(155,71,80,.16) !important;
  background:#fffafa !important;
}

@media (max-width:680px){
  .decision-details{
    margin-left:18px !important;
    margin-right:18px !important;
  }

  .decision-grid{
    grid-template-columns:1fr !important;
  }
}



/* V22 not-found result refinement */
.message-card.alert{
  max-width:760px !important;
  margin:14px auto 0 !important;
  padding:18px 20px !important;
  border-radius:16px !important;
  text-align:right !important;
  gap:6px !important;
}

.message-card.alert strong{
  font-size:15px !important;
  line-height:1.8 !important;
  font-weight:600 !important;
}

.message-card.alert span{
  font-size:13px !important;
  line-height:1.9 !important;
}

.message-card.alert .reference-line{
  margin-top:5px !important;
  color:#7f9197 !important;
  font-size:12px !important;
  line-height:1.7 !important;
}

.message-card.alert .exit-link{
  display:none !important;
}



/* V24 clean edit page */
.edit-page{
  max-width:980px !important;
  padding-top:36px !important;
}

.edit-header{
  display:grid;
  grid-template-columns:1fr auto;
  align-items:end;
  gap:18px;
  margin-bottom:16px;
}

.edit-title{
  text-align:right;
}

.edit-title .agency{
  margin:0 0 4px;
  color:#b98536;
  font-size:12px;
  font-weight:600;
}

.edit-title h1{
  margin:0;
  color:#18343d;
  font-size:clamp(30px,4vw,42px);
  line-height:1.25;
  font-weight:600;
  letter-spacing:-.04em;
}

.edit-title .subtitle{
  margin:6px 0 0;
  color:#7b9097;
  font-size:13px;
  line-height:1.8;
}

.back-btn{
  min-width:70px !important;
  height:44px !important;
  border-radius:13px !important;
  align-self:center;
}

.edit-record-card{
  max-width:860px !important;
  margin:0 auto !important;
  padding:18px 18px 16px !important;
  border-radius:18px !important;
}

.clean-record-form{
  display:grid;
  gap:14px;
}

.form-section{
  display:grid;
  gap:12px;
}

.form-section h2{
  margin:0;
  color:#28434c;
  font-size:14px;
  line-height:1.7;
  font-weight:600;
}

.edit-form-grid{
  display:grid !important;
  grid-template-columns:1fr 1fr !important;
  gap:12px 14px !important;
}

.edit-form-grid .wide-field{
  grid-column:1/-1 !important;
}

.edit-form-grid .form-field{
  margin:0 !important;
}

.edit-form-grid label,
.publish-toggle span{
  color:#48626a;
  font-size:12.5px;
  line-height:1.7;
  font-weight:600;
}

.edit-form-grid input,
.edit-form-grid select{
  min-height:44px !important;
  border-radius:12px !important;
  font-size:13.5px !important;
  font-weight:500 !important;
}

.publish-section{
  display:flex;
  justify-content:flex-end;
  padding-top:2px;
}

.publish-toggle{
  display:inline-flex;
  align-items:center;
  gap:9px;
  cursor:pointer;
  user-select:none;
}

.publish-toggle input{
  width:17px;
  height:17px;
  accent-color:#0f737b;
}

.edit-actions{
  display:flex !important;
  justify-content:flex-end !important;
  align-items:center !important;
  gap:10px !important;
  margin-top:2px !important;
  padding-top:0 !important;
}

.edit-actions button{
  min-height:44px !important;
  min-width:130px !important;
  border-radius:13px !important;
}

.edit-actions .secondary-btn{
  min-height:42px !important;
  min-width:72px !important;
  border-radius:12px !important;
}

@media (max-width:720px){
  .edit-header{
    grid-template-columns:1fr;
  }

  .back-btn{
    justify-self:start;
  }

  .edit-form-grid{
    grid-template-columns:1fr !important;
  }

  .publish-section,
  .edit-actions{
    justify-content:stretch !important;
  }

  .edit-actions{
    flex-direction:column;
  }

  .edit-actions button,
  .edit-actions .secondary-btn{
    width:100% !important;
  }
}



/* V25 edit page final polish */
.edit-page{
  max-width:960px !important;
  padding-top:34px !important;
}

.edit-record-card{
  max-width:820px !important;
  padding:16px 18px 14px !important;
  border-radius:18px !important;
}

.clean-record-form{
  gap:12px !important;
}

.form-section{
  gap:10px !important;
}

.form-section h2{
  padding:0 2px 2px !important;
  border-bottom:1px solid rgba(214,227,231,.75) !important;
}

.edit-form-grid{
  gap:10px 14px !important;
}

.edit-form-grid input,
.edit-form-grid select{
  min-height:42px !important;
}

.publish-section{
  display:flex !important;
  justify-content:flex-start !important;
  align-items:center !important;
  min-height:46px !important;
  margin-top:2px !important;
  padding:9px 12px !important;
  border:1px solid #dbe8eb !important;
  border-radius:13px !important;
  background:#f8fbfc !important;
}

.publish-toggle{
  width:100% !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:10px !important;
}

.publish-toggle span{
  color:#314e57 !important;
  font-size:12.8px !important;
  font-weight:600 !important;
}

.publish-toggle input{
  width:18px !important;
  height:18px !important;
}

.edit-actions{
  justify-content:flex-end !important;
  margin-top:0 !important;
  padding-top:2px !important;
}

.edit-actions button{
  min-height:43px !important;
  min-width:128px !important;
}

.edit-actions .secondary-btn{
  min-height:41px !important;
  min-width:72px !important;
}

@media (max-width:720px){
  .publish-section{
    padding:10px 12px !important;
  }
}



/* V26 clean manage table */
.clean-records-table th,
.clean-records-table td{
  white-space:nowrap;
}

.clean-records-table th:nth-child(2),
.clean-records-table td:nth-child(2),
.clean-records-table th:nth-child(4),
.clean-records-table td:nth-child(4){
  white-space:normal;
}

.clean-records-table td:nth-child(2){
  min-width:190px;
}

.clean-records-table td:nth-child(4){
  min-width:220px;
}

.admin-filter input{
  min-width:320px;
}

@media (max-width:760px){
  .admin-filter input{
    min-width:0;
  }
}



/* V27 import review center */
.import-review-page{
  max-width:1180px !important;
}

.import-review-header{
  margin-bottom:18px !important;
}

.review-upload-card{
  padding:18px !important;
}

.quality-card{
  margin:16px 0 14px;
  border:1px solid #d8e7eb;
  border-radius:18px;
  background:#fff;
  padding:16px 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  box-shadow:0 18px 50px rgba(20,55,64,.06);
}

.quality-card span{
  display:block;
  color:#7c9097;
  font-size:12px;
  line-height:1.7;
}

.quality-card strong{
  display:block;
  color:#1f3f49;
  font-size:21px;
  line-height:1.6;
  font-weight:600;
}

.quality-card p{
  margin:2px 0 0;
  color:#61777e;
  font-size:12.8px;
  line-height:1.9;
}

.quality-badge{
  min-width:86px;
  height:42px;
  border-radius:13px;
  display:grid;
  place-items:center;
  font-size:13px;
  font-weight:600;
}

.quality-success{
  border-color:rgba(27,123,94,.22);
  background:#f8fcfa;
}

.quality-success .quality-badge{
  color:#137451;
  background:#e8f7ef;
}

.quality-warning{
  border-color:rgba(170,104,32,.24);
  background:#fffdfa;
}

.quality-warning .quality-badge{
  color:#986016;
  background:#fff0d8;
}

.quality-danger{
  border-color:rgba(167,71,80,.22);
  background:#fffafa;
}

.quality-danger .quality-badge{
  color:#a3444f;
  background:#ffe8eb;
}

.review-stats{
  grid-template-columns:repeat(6,minmax(0,1fr)) !important;
}

.review-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  margin-top:14px;
}

.review-panel{
  padding:16px 18px !important;
}

.mini-review-list{
  display:grid;
  gap:8px;
}

.mini-review-item{
  min-height:42px;
  border:1px solid #e0ebee;
  background:#fbfdfe;
  border-radius:12px;
  padding:8px 11px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.mini-review-item span{
  color:#526c74;
  font-size:12.5px;
  font-weight:500;
}

.mini-review-item strong{
  color:#193943;
  font-size:17px;
  font-weight:600;
}

.issue-strip{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:9px;
}

.issue-strip div{
  border:1px solid #e0ebee;
  background:#fbfdfe;
  border-radius:12px;
  padding:9px 10px;
  display:grid;
  gap:3px;
}

.issue-strip span{
  color:#789098;
  font-size:11.5px;
  line-height:1.6;
}

.issue-strip strong{
  color:#1f3f49;
  font-size:18px;
  line-height:1.4;
  font-weight:600;
}

.review-table th,
.review-table td{
  white-space:nowrap;
}

.review-table th:nth-child(3),
.review-table td:nth-child(3),
.review-table th:nth-child(5),
.review-table td:nth-child(5),
.review-table th:last-child,
.review-table td:last-child{
  white-space:normal;
}

.warning-inline{
  display:inline-block;
  color:#9b641f;
  background:#fff4df;
  border:1px solid rgba(170,104,32,.18);
  border-radius:999px;
  padding:3px 8px;
  font-size:11px;
  line-height:1.5;
  margin:2px;
}

.review-alert{
  max-width:none !important;
  margin:14px 0 !important;
}

.review-confirm-card{
  margin-top:14px !important;
}

.confirm-panel button:disabled,
.confirm-check input:disabled{
  opacity:.55;
  cursor:not-allowed;
}

.confirm-check b{
  display:block;
  margin-top:4px;
  color:#a3444f;
  font-size:12px;
  font-weight:600;
}

@media (max-width:980px){
  .review-stats{
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  }

  .issue-strip{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}

@media (max-width:720px){
  .quality-card{
    align-items:stretch;
    flex-direction:column;
  }

  .review-grid{
    grid-template-columns:1fr;
  }

  .review-stats,
  .issue-strip{
    grid-template-columns:1fr !important;
  }
}



/* V29 quick admin inquiry */
.quick-page{
  max-width:980px !important;
}

.quick-header{
  margin-bottom:18px !important;
}

.quick-search-card{
  border:1px solid #d8e7eb;
  border-radius:20px;
  background:#fff;
  padding:18px;
  box-shadow:0 18px 50px rgba(20,55,64,.06);
}

.quick-search-form{
  display:grid;
  grid-template-columns:1fr 130px;
  align-items:end;
  gap:12px;
}

.quick-input{
  display:grid;
  gap:7px;
}

.quick-input label{
  color:#48626a;
  font-size:12.5px;
  line-height:1.7;
  font-weight:600;
}

.quick-input input{
  width:100%;
  min-height:46px;
  border:1px solid #d6e3e7;
  border-radius:13px;
  background:#fff;
  color:#18353e;
  outline:none;
  padding:0 14px;
  font-family:inherit;
  font-size:15px;
  font-weight:500;
}

.quick-input input:focus{
  border-color:rgba(15,103,113,.62);
  box-shadow:0 0 0 4px rgba(15,103,113,.07);
}

.quick-search-form button{
  min-height:46px;
  border:0;
  border-radius:13px;
  background:linear-gradient(135deg,#0d6771,#0e7d82);
  color:#fff;
  font-family:inherit;
  font-size:14px;
  font-weight:600;
  cursor:pointer;
}

.quick-results{
  display:grid;
  gap:14px;
  margin-top:16px;
}

.quick-result-card{
  border:1px solid #d8e7eb;
  border-radius:20px;
  background:#fff;
  padding:18px;
  box-shadow:0 18px 50px rgba(20,55,64,.06);
}

.quick-result-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-bottom:14px;
  padding-bottom:12px;
  border-bottom:1px solid #e2ecef;
}

.quick-result-head span{
  display:block;
  color:#7d9197;
  font-size:12px;
  line-height:1.6;
  font-weight:500;
}

.quick-result-head h2{
  margin:0;
  color:#173841;
  font-size:28px;
  line-height:1.35;
  font-weight:600;
  letter-spacing:-.03em;
}

.publish-badge{
  min-width:118px;
  min-height:34px;
  border-radius:999px;
  display:inline-grid;
  place-items:center;
  padding:0 12px;
  font-size:12px;
  line-height:1.5;
  font-weight:600;
}

.publish-badge.published{
  color:#137451;
  background:#e8f7ef;
}

.publish-badge.hidden{
  color:#9b641f;
  background:#fff0d8;
}

.quick-info-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:9px;
}

.quick-info-item{
  border:1px solid #e0ebee;
  border-radius:13px;
  background:#fbfdfe;
  padding:10px 13px;
  min-height:54px;
  display:grid;
  align-content:center;
  gap:4px;
}

.quick-info-item.full{
  grid-column:1/-1;
}

.quick-info-item span{
  color:#809096;
  font-size:11.5px;
  line-height:1.6;
  font-weight:500;
}

.quick-info-item strong{
  color:#263f48;
  font-size:13.5px;
  line-height:1.8;
  font-weight:500;
}

.quick-reply-box{
  margin-top:12px;
  border:1px solid rgba(15,103,113,.16);
  background:#f8fcfa;
  border-radius:15px;
  padding:13px 14px;
}

.quick-reply-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:7px;
}

.quick-reply-head h3{
  margin:0;
  color:#28434c;
  font-size:13.5px;
  line-height:1.7;
  font-weight:600;
}

.copy-reply-btn{
  min-height:34px;
  border:1px solid rgba(15,103,113,.22);
  border-radius:11px;
  background:#fff;
  color:#0d6771;
  padding:0 12px;
  font-family:inherit;
  font-size:12.5px;
  font-weight:600;
  cursor:pointer;
}

.copy-reply-btn.copied{
  color:#137451;
  background:#e8f7ef;
}

.quick-reply-box p{
  margin:0;
  color:#52686f;
  font-size:13px;
  line-height:1.95;
  font-weight:500;
}

.no-result-card{
  margin-top:16px;
  border-color:rgba(155,71,80,.18);
  background:#fffafa;
}

.no-result-card .quick-reply-box{
  border-color:rgba(155,71,80,.15);
  background:#fff;
}

.status-renewed .quick-result-head h2{
  color:#137451;
}

.status-not_renewed .quick-result-head h2,
.status-not-renewed .quick-result-head h2{
  color:#a3444f;
}

.status-limited .quick-result-head h2,
.status-pending .quick-result-head h2{
  color:#986016;
}

@media (max-width:720px){
  .quick-search-form{
    grid-template-columns:1fr;
  }

  .quick-info-grid{
    grid-template-columns:1fr;
  }

  .quick-result-head,
  .quick-reply-head{
    align-items:stretch;
    flex-direction:column;
  }

  .publish-badge,
  .copy-reply-btn{
    width:100%;
  }
}



/* V30 admin quick inquiry same as beneficiary page */
.admin-public-like{
  position:relative;
}

.admin-mini-bar{
  width:min(760px,100%);
  margin:0 auto 12px;
  min-height:42px;
  border:1px solid #dbe8eb;
  border-radius:14px;
  background:rgba(255,255,255,.84);
  backdrop-filter:blur(8px);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:8px 12px;
  box-shadow:0 12px 35px rgba(20,55,64,.05);
}

.admin-mini-bar span{
  color:#1d4650;
  font-size:12.5px;
  font-weight:600;
}

.admin-mini-bar div{
  display:flex;
  align-items:center;
  gap:8px;
}

.admin-mini-bar a{
  color:#0d6771;
  text-decoration:none;
  font-size:12px;
  font-weight:600;
}

.admin-copy-reply{
  width:min(760px,100%);
  margin:12px auto 0;
  border:1px solid rgba(15,103,113,.16);
  background:#f8fcfa;
  border-radius:15px;
  padding:13px 14px;
  box-sizing:border-box;
}

.admin-copy-reply.inside-result{
  width:auto;
  margin:0 22px 22px;
}

.reply-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:7px;
}

.reply-title strong{
  color:#28434c;
  font-size:13.5px;
  line-height:1.7;
  font-weight:600;
}

.admin-copy-reply p{
  margin:0;
  color:#52686f;
  font-size:13px;
  line-height:1.95;
  font-weight:500;
}

.copy-reply-btn{
  min-height:34px;
  border:1px solid rgba(15,103,113,.22);
  border-radius:11px;
  background:#fff;
  color:#0d6771;
  padding:0 12px;
  font-family:inherit;
  font-size:12.5px;
  font-weight:600;
  cursor:pointer;
}

.copy-reply-btn.copied{
  color:#137451;
  background:#e8f7ef;
}

@media (max-width:680px){
  .admin-mini-bar,
  .reply-title{
    align-items:stretch;
    flex-direction:column;
  }

  .admin-mini-bar div{
    justify-content:space-between;
  }

  .copy-reply-btn{
    width:100%;
  }

  .admin-copy-reply.inside-result{
    margin-left:18px;
    margin-right:18px;
  }
}



/* V31 distinct admin quick inquiry */
.quick-admin-page{
  max-width:1160px !important;
  padding-top:34px !important;
}

.quick-admin-header{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  margin-bottom:18px;
}

.quick-admin-header .agency{
  margin:0 0 4px;
  color:#b98536;
  font-size:12px;
  font-weight:600;
}

.quick-admin-header h1{
  margin:0;
  color:#173841;
  font-size:clamp(34px,4vw,48px);
  line-height:1.22;
  font-weight:600;
  letter-spacing:-.04em;
}

.quick-admin-header .subtitle{
  margin:7px 0 0;
  color:#7b9097;
  font-size:13px;
  line-height:1.8;
}

.quick-admin-workspace{
  display:grid;
  grid-template-columns:310px 1fr;
  gap:16px;
  align-items:start;
}

.quick-search-panel{
  position:sticky;
  top:18px;
  border:1px solid #d8e7eb;
  border-radius:22px;
  background:#fff;
  padding:18px;
  box-shadow:0 18px 50px rgba(20,55,64,.06);
}

.panel-title{
  margin-bottom:16px;
}

.panel-title span{
  display:block;
  color:#7c9097;
  font-size:12px;
  line-height:1.7;
}

.panel-title strong{
  display:block;
  color:#183943;
  font-size:22px;
  line-height:1.45;
  font-weight:600;
}

.quick-admin-form{
  display:grid;
  gap:9px;
}

.quick-admin-form label{
  color:#48626a;
  font-size:12.5px;
  font-weight:600;
}

.quick-admin-form input{
  width:100%;
  min-height:46px;
  border:1px solid #d6e3e7;
  border-radius:13px;
  background:#fff;
  color:#18353e;
  outline:none;
  padding:0 14px;
  font-family:inherit;
  font-size:15px;
  font-weight:500;
  box-sizing:border-box;
}

.quick-admin-form input:focus{
  border-color:rgba(15,103,113,.62);
  box-shadow:0 0 0 4px rgba(15,103,113,.07);
}

.quick-admin-form button{
  min-height:46px;
  margin-top:4px;
  border:0;
  border-radius:13px;
  background:linear-gradient(135deg,#0d6771,#0e7d82);
  color:#fff;
  font-family:inherit;
  font-size:14px;
  font-weight:600;
  cursor:pointer;
}

.quick-admin-note{
  margin-top:13px;
  border:1px solid rgba(170,125,61,.18);
  background:#fffdfa;
  border-radius:13px;
  color:#657981;
  padding:10px 12px;
  font-size:12px;
  line-height:1.85;
}

.quick-admin-result-area{
  min-height:360px;
}

.quick-empty-state{
  min-height:330px;
  border:1px dashed #cddfe4;
  border-radius:22px;
  background:rgba(255,255,255,.70);
  display:grid;
  place-content:center;
  text-align:center;
  padding:28px;
}

.quick-empty-state span{
  color:#b98536;
  font-size:12px;
  font-weight:600;
}

.quick-empty-state h2{
  margin:8px 0 4px;
  color:#183943;
  font-size:25px;
  line-height:1.55;
  font-weight:600;
}

.quick-empty-state p{
  margin:0;
  color:#7b9097;
  font-size:13px;
  line-height:1.9;
}

.quick-result-stack{
  display:grid;
  gap:14px;
}

.quick-admin-card{
  border:1px solid #d8e7eb;
  border-radius:22px;
  background:#fff;
  padding:18px;
  box-shadow:0 18px 50px rgba(20,55,64,.06);
}

.quick-status-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding-bottom:13px;
  margin-bottom:13px;
  border-bottom:1px solid #e2ecef;
}

.quick-status-head span{
  display:block;
  color:#7d9197;
  font-size:12px;
  line-height:1.6;
  font-weight:500;
}

.quick-status-head h2{
  margin:0;
  color:#173841;
  font-size:30px;
  line-height:1.35;
  font-weight:600;
  letter-spacing:-.035em;
}

.status-renewed .quick-status-head h2{
  color:#137451;
}

.status-not_renewed .quick-status-head h2,
.status-not-renewed .quick-status-head h2,
.no-result .quick-status-head h2{
  color:#a3444f;
}

.status-limited .quick-status-head h2,
.status-pending .quick-status-head h2{
  color:#986016;
}

.admin-publish-chip{
  min-width:120px;
  min-height:34px;
  border-radius:999px;
  display:inline-grid;
  place-items:center;
  padding:0 12px;
  font-size:12px;
  font-weight:600;
}

.admin-publish-chip.published{
  color:#137451;
  background:#e8f7ef;
}

.admin-publish-chip.hidden{
  color:#9b641f;
  background:#fff0d8;
}

.quick-person-card{
  border:1px solid rgba(15,103,113,.14);
  background:#f8fcfa;
  border-radius:16px;
  padding:13px 14px;
  display:grid;
  gap:3px;
  margin-bottom:10px;
}

.quick-person-card span{
  color:#789098;
  font-size:11.5px;
}

.quick-person-card strong{
  color:#193943;
  font-size:18px;
  line-height:1.65;
  font-weight:600;
}

.quick-person-card small{
  color:#7b9097;
  font-size:12px;
  direction:ltr;
  unicode-bidi:isolate;
}

.quick-admin-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:9px;
}

.quick-admin-grid div{
  border:1px solid #e0ebee;
  background:#fbfdfe;
  border-radius:13px;
  min-height:52px;
  padding:10px 13px;
  display:grid;
  align-content:center;
  gap:4px;
}

.quick-admin-grid .wide{
  grid-column:1/-1;
}

.quick-admin-grid .muted{
  background:#fff;
}

.quick-admin-grid span{
  color:#809096;
  font-size:11.5px;
  line-height:1.6;
}

.quick-admin-grid strong{
  color:#263f48;
  font-size:13.5px;
  line-height:1.8;
  font-weight:500;
}

.reply-panel{
  margin-top:12px;
  border:1px solid rgba(15,103,113,.16);
  background:#f8fcfa;
  border-radius:15px;
  padding:13px 14px;
}

.no-result .reply-panel{
  border-color:rgba(155,71,80,.15);
  background:#fff;
}

.reply-panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:7px;
}

.reply-panel-head strong{
  color:#28434c;
  font-size:13.5px;
  line-height:1.7;
  font-weight:600;
}

.reply-panel p{
  margin:0;
  color:#52686f;
  font-size:13px;
  line-height:1.95;
  font-weight:500;
}

.copy-reply-btn{
  min-height:34px;
  border:1px solid rgba(15,103,113,.22);
  border-radius:11px;
  background:#fff;
  color:#0d6771;
  padding:0 12px;
  font-family:inherit;
  font-size:12.5px;
  font-weight:600;
  cursor:pointer;
}

.copy-reply-btn.copied{
  color:#137451;
  background:#e8f7ef;
}

.quick-admin-message{
  margin:0 0 10px;
  color:#657981;
  font-size:13px;
  line-height:1.9;
}

@media (max-width:900px){
  .quick-admin-header{
    align-items:stretch;
    flex-direction:column;
  }

  .quick-admin-workspace{
    grid-template-columns:1fr;
  }

  .quick-search-panel{
    position:static;
  }
}

@media (max-width:680px){
  .quick-admin-grid{
    grid-template-columns:1fr;
  }

  .quick-status-head,
  .reply-panel-head{
    align-items:stretch;
    flex-direction:column;
  }

  .admin-publish-chip,
  .copy-reply-btn{
    width:100%;
  }
}



/* V32 admin inquiry based on Excel columns */
.quick-admin-workspace.columns-view{
  grid-template-columns:330px 1fr !important;
}

.admin-columns-card{
  border:1px solid #e0ebee;
  background:#fbfdfe;
  border-radius:17px;
  padding:14px;
  margin-top:4px;
}

.admin-columns-card h3{
  margin:0 0 10px;
  color:#28434c;
  font-size:14px;
  line-height:1.7;
  font-weight:600;
}

.admin-columns-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:9px;
}

.admin-columns-grid > div{
  border:1px solid #dbe8eb;
  background:#fff;
  border-radius:13px;
  min-height:54px;
  padding:10px 13px;
  display:grid;
  align-content:center;
  gap:4px;
}

.admin-columns-grid > div.wide{
  grid-column:1/-1;
}

.admin-columns-grid > div.internal-only{
  border-color:rgba(170,125,61,.25);
  background:#fffdfa;
}

.admin-columns-grid span{
  color:#809096;
  font-size:11.5px;
  line-height:1.6;
  font-weight:500;
}

.admin-columns-grid strong{
  color:#263f48;
  font-size:13.5px;
  line-height:1.8;
  font-weight:500;
  word-break:break-word;
}

.internal-only span::after{
  content:" - داخلي";
  color:#b98536;
  font-weight:600;
}

.edit-form-grid textarea{
  width:100%;
  min-height:84px;
  border:1px solid #d6e3e7;
  border-radius:12px;
  background:#fff;
  color:#18353e;
  outline:none;
  padding:12px 14px;
  font-family:inherit;
  font-size:13.5px;
  line-height:1.8;
  resize:vertical;
  box-sizing:border-box;
}

@media (max-width:900px){
  .quick-admin-workspace.columns-view{
    grid-template-columns:1fr !important;
  }
}

@media (max-width:680px){
  .admin-columns-grid{
    grid-template-columns:1fr;
  }
}



/* V33 hide empty internal fields and refine admin result */
.admin-columns-grid > div.internal-only{
  border-color:rgba(170,125,61,.24) !important;
  background:#fffdfa !important;
}

.admin-columns-grid > div.internal-only strong{
  color:#4f3d28 !important;
}

.quick-admin-card.status-renewed .admin-columns-card{
  border-color:rgba(27,123,94,.13);
}

.quick-admin-card.status-not_renewed .admin-columns-card,
.quick-admin-card.status-not-renewed .admin-columns-card{
  border-color:rgba(155,71,80,.14);
}

.quick-admin-card.status-not_renewed .internal-only,
.quick-admin-card.status-not-renewed .internal-only{
  border-color:rgba(155,71,80,.20) !important;
  background:#fffafa !important;
}

.quick-admin-card.status-not_renewed .internal-only span::after,
.quick-admin-card.status-not-renewed .internal-only span::after{
  color:#a3444f;
}

.quick-admin-card.status-not_renewed .internal-only strong,
.quick-admin-card.status-not-renewed .internal-only strong{
  color:#5d2e34 !important;
}





/* V41: رسالة التحقق داخل النموذج بدون مربع أحمر */
.inline-form-alert{
  margin: -2px 2px 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #7b8b91;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.7;
  text-align: right;
}

.message-card.alert{
  display: none !important;
}


/* V42: الاكتفاء بعبارة الحقل داخل المستطيل */
.public-search-card .input-group label{
  display: none !important;
}

.inline-form-alert{
  display: none !important;
}


/* V43: إنزال بطاقة الاستعلام قليلًا عن شريط المتصفح */
body{
  padding-top: clamp(56px, 8vh, 86px);
}

@media (max-width: 768px){
  body{
    padding-top: 36px;
  }
}


/* V44: فتح وإغلاق الاستعلام */
.service-closed-box{
  margin-top: 18px;
  border: 1px solid rgba(184, 137, 78, .28);
  background: #fffaf2;
  border-radius: 18px;
  padding: 18px 20px;
  text-align: center;
  color: #455a61;
  line-height: 1.9;
}

.service-closed-box strong{
  display:block;
  color:#9b6b2f;
  font-size:17px;
  margin-bottom:6px;
}

.service-closed-box p{
  margin:0;
  font-size:14px;
}

.availability-strip{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  border:1px solid #d7e8ec;
  background:#ffffff;
  border-radius:22px;
  padding:18px 20px;
  margin-bottom:18px;
  box-shadow:0 18px 40px rgba(20, 64, 75, .07);
}

.availability-strip span,
.settings-status-card span{
  display:block;
  color:#8aa0a8;
  font-size:13px;
  margin-bottom:4px;
}

.availability-strip strong,
.settings-status-card strong{
  display:block;
  color:#173b44;
  font-size:21px;
  font-weight:700;
}

.availability-strip small{
  color:#7d8d94;
  font-size:13px;
}

.availability-strip.open{
  border-color:rgba(23,122,128,.22);
  background:linear-gradient(135deg,#ffffff,#f4fbfa);
}

.availability-strip.closed{
  border-color:rgba(168,77,86,.22);
  background:linear-gradient(135deg,#ffffff,#fff8f8);
}

.settings-page .admin-header{
  margin-bottom:20px;
}

.settings-status-card{
  border:1px solid #d7e8ec;
  border-radius:24px;
  padding:22px 24px;
  background:#fff;
  margin-bottom:18px;
  box-shadow:0 18px 40px rgba(20, 64, 75, .07);
}

.settings-status-card p{
  margin:8px 0 0;
  color:#7d8d94;
}

.settings-status-card.open strong{
  color:#137b80;
}

.settings-status-card.closed strong{
  color:#9b4b55;
}

.settings-card{
  max-width:980px;
}

.setting-toggle-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:18px 18px;
  border:1px solid #d7e8ec;
  border-radius:18px;
  background:#fbfefe;
  margin-bottom:18px;
}

.setting-toggle-row h2{
  margin:0 0 6px;
  font-size:20px;
  color:#173b44;
}

.setting-toggle-row p{
  margin:0;
  color:#7d8d94;
  font-size:14px;
  line-height:1.8;
}

.switch-field{
  display:flex;
  align-items:center;
  gap:10px;
  white-space:nowrap;
  padding:10px 14px;
  border-radius:999px;
  background:#edf8f7;
  color:#137b80;
  font-weight:700;
}

.switch-field input{
  width:20px;
  height:20px;
  accent-color:#137b80;
}

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

.settings-form textarea,
.settings-form input[type="datetime-local"]{
  width:100%;
  border:1px solid #d7e8ec;
  border-radius:14px;
  padding:12px 14px;
  font-family:inherit;
  font-size:14px;
  background:#fff;
  color:#173b44;
}

.settings-form textarea:focus,
.settings-form input[type="datetime-local"]:focus{
  outline:none;
  border-color:#137b80;
  box-shadow:0 0 0 3px rgba(19,123,128,.12);
}

.field-block small{
  display:block;
  margin-top:7px;
  color:#8aa0a8;
  font-size:12px;
}

.settings-help{
  margin-top:18px;
  padding:15px 16px;
  border:1px dashed #d7e8ec;
  border-radius:16px;
  background:#fbfefe;
  color:#536970;
  line-height:1.9;
  font-size:14px;
}

@media (max-width: 768px){
  .availability-strip,
  .setting-toggle-row{
    flex-direction:column;
    align-items:stretch;
  }

  .form-grid.two{
    grid-template-columns:1fr;
  }
}


/* V45: تهذيب صفحة إتاحة الاستعلام وتوحيد عرض البطاقات */
.settings-page{
  max-width: 1120px;
  margin: 0 auto;
  padding: 52px 34px 90px;
}

.settings-page .admin-header,
.settings-page .settings-status-card,
.settings-page .settings-card{
  max-width: 980px;
  margin-right: auto;
  margin-left: auto;
}

.settings-page .admin-header{
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.settings-page .admin-header h1{
  margin-top: 4px;
  line-height: 1.25;
}

.settings-page .admin-header .subtitle{
  max-width: 620px;
  line-height: 1.8;
}

.settings-page .admin-actions{
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.settings-status-card{
  padding: 20px 24px;
  margin-bottom: 18px;
}

.settings-status-card strong{
  font-size: 24px;
  line-height: 1.45;
}

.settings-status-card p{
  font-size: 14px;
  line-height: 1.8;
}

.settings-card{
  padding: 16px;
}

.settings-card .record-form{
  padding: 0;
}

.settings-form input[type="datetime-local"]{
  direction: ltr;
  text-align: center;
}

.setting-toggle-row{
  margin-bottom: 20px;
}

.form-actions{
  margin-top: 20px;
  padding-bottom: 4px;
}

@media (max-width: 768px){
  .settings-page{
    padding: 34px 14px 70px;
  }

  .settings-page .admin-header{
    align-items: stretch;
    flex-direction: column;
  }

  .settings-page .admin-actions{
    width: 100%;
    justify-content: stretch;
  }

  .settings-page .admin-actions a{
    flex: 1;
    text-align: center;
  }

  .settings-status-card strong{
    font-size: 21px;
  }
}


/* V48: عرض رسالة إغلاق الاستعلام في المنتصف بشكل رسمي */
.service-closed-box.single-line{
  margin: 22px auto 2px;
  border: 0;
  background: transparent;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 56px;
}

.service-closed-box.single-line span{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 26px;
  border-radius: 999px;
  border: 1px solid rgba(184, 137, 78, .28);
  background: #fffaf2;
  color: #8b642d;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.7;
  box-shadow: 0 10px 24px rgba(139, 100, 45, .07);
}

.service-closed-box.single-line strong,
.service-closed-box.single-line p{
  display: none !important;
}
