﻿/* MDU result.aspx style page */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: Verdana, Tahoma, Arial, sans-serif;
  color: #262626;
  background: linear-gradient(180deg, #cfe0ee 0%, #b3cadd 45%, #9fbdd3 100%);
  min-height: 100vh;
  -webkit-text-size-adjust: 100%;
}
a { text-decoration: none; color: inherit; }

/* Top bar */
.r-topbar {
  background: linear-gradient(90deg, #001530, #002147);
  color: #fff; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px 18px; padding-top: max(10px, env(safe-area-inset-top));
}
.r-brand { display: flex; align-items: center; gap: 12px; }
.r-logo {
  width: 42px; height: 42px; flex: 0 0 42px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #008BE7, #001530);
  border: 2px solid #f5b301; display: grid; place-items: center;
  font-family: Arial; font-weight: 800; font-size: .85rem;
}
.r-logo-img { height: 46px; width: auto; flex: 0 0 auto; background: #fff; border-radius: 6px; padding: 3px; }
.r-brand strong { display: block; font-size: .95rem; letter-spacing: .3px; }
.r-brand small { font-size: .72rem; opacity: .85; }
.r-home { background: #c0392b; padding: 7px 14px; border-radius: 6px; font-size: .8rem; white-space: nowrap; }
.r-home:hover { background: #9c2c20; }

/* Layout */
.r-wrap {
  display: grid; grid-template-columns: 320px 1fr; gap: 18px;
  max-width: 1200px; margin: 18px auto; padding: 0 16px; align-items: start;
}

/* Left declared list */
.r-left {
  background: #fff; border: 1px solid #7fa6c9; border-radius: 2px;
  box-shadow: 0 2px 6px rgba(0,0,0,.15); overflow: hidden;
}
.r-declared { width: 100%; border-collapse: collapse; font-size: .78rem; }
.r-declared thead th {
  background: #2e3a4d; color: #fff; text-align: left; padding: 7px 8px;
  font-size: .8rem; position: sticky; top: 0;
}
.r-declared thead th.sn { width: 38px; text-align: center; }
.r-left { max-height: 640px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.r-declared tbody td { padding: 7px 8px; border-bottom: 1px solid #cdd9e6; vertical-align: top; line-height: 1.4; }
.r-declared tbody td.sn { text-align: center; color: #444; }
.r-declared tbody tr:nth-child(odd) { background: #eef4ea; }
.r-declared tbody tr:nth-child(even) { background: #f7faf4; }
.r-declared tbody tr.clickable { cursor: pointer; }
.r-declared tbody tr.clickable:hover { background: #d8ead0; }
.r-declared tbody tr.active { background: #c7e0bb; outline: 1px solid #6aa84f; }
.r-loading, .r-empty { text-align: center; color: #555; padding: 18px !important; font-style: italic; }
.r-declared .rd-title { font-weight: 600; color: #143a6b; }
.r-declared .rd-meta { color: #555; }

/* Right result panel */
.r-right { min-width: 0; }
.r-title {
  font-family: Arial, sans-serif; font-style: italic; font-weight: 700;
  color: #002147; font-size: 1.7rem; margin-bottom: 10px;
  text-shadow: 0 1px 0 #fff;
}

/* Yellow form box */
.r-form {
  background: #f7f4c6; border: 1px solid #c9c478; border-radius: 2px;
  padding: 18px 16px; box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
.r-form-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.r-form-row label { font-size: .82rem; font-weight: 600; color: #333; }
.r-form-row .lbl-roll { margin-left: 18px; }
.r-form-row input {
  border: 1px solid #8a8a8a; border-radius: 2px; padding: 6px 8px; font-size: 16px;
  width: 180px; max-width: 100%; background: #fff; outline: none;
}
.r-form-row input:focus { border-color: #002147; }
.r-form-actions { display: flex; justify-content: flex-end; margin-top: 14px; }
#proceed-btn {
  background: linear-gradient(180deg, #f3c98a, #d99a3a);
  border: 1px solid #b5791f; color: #4a2d00; font-weight: 700; font-size: .82rem;
  padding: 7px 14px; border-radius: 3px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px;
}
#proceed-btn:hover { background: linear-gradient(180deg, #f7d49b, #e0a648); }
#proceed-btn:disabled { opacity: .6; cursor: not-allowed; }

.r-note { color: #c0163a; font-weight: 700; font-size: .82rem; margin: 14px 0 4px; }
.r-instructions { color: #b3261e; font-size: .82rem; margin-top: 10px; }
.r-instructions ol { margin: 6px 0 0 20px; }
.r-instructions li { margin-bottom: 4px; }
.r-instructions em { font-style: italic; }

.r-status { font-size: .85rem; font-weight: 600; margin: 14px 0; min-height: 18px; }
.r-status.ok { color: #1a7a3c; }
.r-status.err { color: #c0163a; }
.r-status.info { color: #002147; }

/* Output */
.r-output {
  margin-top: 16px; background: #fff; border: 1px solid #7fa6c9; border-radius: 4px;
  box-shadow: 0 3px 10px rgba(0,0,0,.18); overflow: hidden;
}
.r-output-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: #002147; color: #fff; padding: 10px 14px; flex-wrap: wrap;
}
.r-output-meta strong { display: block; font-size: .9rem; }
.r-output-meta small { font-size: .76rem; opacity: .85; }
.r-output-actions { display: flex; gap: 8px; }
.r-btn-dl, .r-btn-open {
  font-size: .8rem; font-weight: 700; padding: 7px 12px; border-radius: 4px;
  display: inline-flex; align-items: center; gap: 6px;
}
.r-btn-dl { background: linear-gradient(180deg, #f3c98a, #d99a3a); color: #4a2d00; border: 1px solid #b5791f; }
.r-btn-dl:hover { background: linear-gradient(180deg, #f7d49b, #e0a648); }
.r-btn-open { background: rgba(255,255,255,.2); color: #fff; }
.r-btn-open:hover { background: rgba(255,255,255,.35); }
.r-pdf-frame { background: #525659; }
#out-frame { width: 100%; height: 75vh; min-height: 480px; border: none; display: block; background: #fff; }

.r-footer { text-align: center; padding: 16px; padding-bottom: max(16px, env(safe-area-inset-bottom)); }
.r-footer p { font-size: .76rem; color: #2a4763; }

/* Tablet */
@media (max-width: 900px) {
  .r-wrap { grid-template-columns: 1fr; }
  .r-left { max-height: 320px; }
}

/* Mobile */
@media (max-width: 560px) {
  .r-brand small { display: none; }
  .r-brand strong { font-size: .82rem; }
  .r-title { font-size: 1.4rem; }
  .r-form-row input { width: 100%; }
  .r-form-row .lbl-roll { margin-left: 0; }
  .r-form-row label { width: 100%; }
  #out-frame { height: 70vh; }
}
