:root{--red:#ab2634;--dark-red:#8f1f2c;--navy:#172336;--ink:#233044;--muted:#6e7c8e;--line:#e8ebf0;--bg:#f7f8fa;--white:#fff;--gold:#e0bb6c;--shadow:0 14px 45px rgba(27,43,65,.045)}*{box-sizing:border-box}html{font-family:Inter,"Segoe UI",Arial,sans-serif}body{margin:0;background:var(--bg);color:var(--ink);font-size:14px}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.52;cursor:not-allowed}a{color:var(--red)}:focus-visible{outline:3px solid #ddb86b;outline-offset:2px}input,select,textarea{width:100%;border:1px solid #dce2e9;border-radius:9px;padding:12px 13px;background:#fff;color:var(--ink);outline:none}input:focus,select:focus,textarea:focus{border-color:#bc7982;box-shadow:0 0 0 3px #c8586a1c}textarea{resize:vertical}label{font-size:12px;font-weight:700;color:#394559}.muted,.page-heading p,.panel-head p{color:var(--muted)}.eyebrow{font-size:10px;font-weight:800;letter-spacing:2.2px;color:var(--red)}.eyebrow.light{color:#f3d7b1}.btn{border:0;border-radius:9px;padding:12px 17px;font-weight:700;transition:.15s ease;white-space:nowrap}.btn.primary{background:var(--red);color:#fff;box-shadow:0 7px 18px #ab263423}.btn.primary:hover{background:var(--dark-red)}.btn.secondary{border:1px solid #dfe4eb;background:#fff;color:#4b596a}.btn.secondary:hover{background:#f5f6f8}.btn.small{padding:8px 12px;font-size:12px}.btn.wide{width:100%;display:flex;justify-content:space-between;align-items:center}.login-screen{display:grid;grid-template-columns:1fr 1fr;min-height:100vh}.login-identity{position:relative;background:linear-gradient(150deg,#7d1b28 0%,#ae2837 53%,#c33c45 100%);padding:clamp(36px,7vw,105px);display:flex;flex-direction:column;align-items:flex-start;justify-content:center;color:#fff;overflow:hidden}.login-identity:after{content:"";position:absolute;right:-145px;top:-70px;width:540px;height:540px;border:1px solid #ffffff28;border-radius:50%;box-shadow:0 0 0 110px #ffffff07,0 0 0 230px #ffffff06}.login-identity>*{position:relative;z-index:1}.seal{width:99px;height:99px;border:2px solid #edcf8b;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-direction:column;font-weight:900;font-size:25px;letter-spacing:1px;line-height:1.04;margin-bottom:60px}.seal span{font-size:14px;letter-spacing:2px;color:#f1d68e}.login-identity h1{font-size:clamp(40px,4.4vw,68px);line-height:1.075;margin:20px 0 18px;letter-spacing:-2px}.heading-mark{color:#f3d8a1}.login-identity p{font-size:16px;line-height:1.9;color:#f5e0e2;max-width:500px}.identity-foot{margin-top:70px;font-size:12px;color:#f4dade;display:flex;gap:11px;align-items:center}.identity-dot,.status-dot{width:8px;height:8px;display:inline-block;border-radius:50%;background:#74ce9a}.login-panel{display:flex;justify-content:center;align-items:center;padding:35px}.login-card{max-width:425px;width:100%;padding:20px}.login-card h2{font-size:32px;line-height:1.15;color:var(--navy);margin:15px 0}.login-card>.muted{line-height:1.75}.form-stack{display:flex;flex-direction:column;gap:12px;margin-top:36px}.form-stack label{margin-top:5px}.form-stack .btn{margin-top:10px}.login-help{color:var(--muted);font-size:12px;line-height:1.8;margin:26px 0}.connection-note{display:flex;gap:10px;align-items:center;padding:16px 0;border-top:1px solid var(--line);font-size:12px;color:#6d7d8c}.form-error{color:#9b2430;background:#fff0f1;border:1px solid #f4c3c7;padding:10px 12px;border-radius:7px;margin:6px 0}.form-error[hidden]{display:none}.app-shell{display:flex;min-height:100vh}.app-shell[hidden],.login-screen[hidden],.page[hidden],[hidden]{display:none!important}.sidebar{position:fixed;inset:0 auto 0 0;background:var(--navy);width:251px;z-index:30;color:#dce2ea;display:flex;flex-direction:column}.brand{padding:27px 22px;display:flex;gap:12px;align-items:center;border-bottom:1px solid #ffffff16}.brand-seal{border:2px solid #d7b878;border-radius:50%;width:46px;height:46px;display:grid;place-items:center;font-weight:900;letter-spacing:-1px;color:#f0d493;font-size:18px}.brand strong{font-size:15px;color:#fff;display:block;letter-spacing:.3px}.brand span{font-size:8px;font-weight:800;letter-spacing:1.15px;color:#a9b6c6}.nav-group-title{font-size:10px;font-weight:800;color:#8396af;letter-spacing:2px;margin:34px 23px 12px}.sidebar nav{padding:0 12px;display:flex;flex-direction:column;gap:6px}.nav-link{border:0;background:transparent;color:#bdc8d7;text-align:left;width:100%;padding:12px 15px;border-radius:9px;display:flex;gap:11px;align-items:center;font-size:13px;font-weight:650}.nav-link.active{background:#ffffff17;color:#fff;box-shadow:inset 3px 0 #e0ba6a}.nav-link:hover{background:#ffffff0d;color:white}.nav-icon{font-size:18px;width:22px;text-align:center}.sidebar-bottom{margin-top:auto;padding:25px 19px;border-top:1px solid #ffffff14;color:#98a7b8}.secure-message{font-size:12px;margin-bottom:9px}.secure-message span{color:#5bc291}.sidebar-bottom small{font-size:10px}.main-area{min-width:0;width:100%;margin-left:251px}.topbar{height:78px;background:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 clamp(22px,4vw,54px);border-bottom:1px solid var(--line)}.topbar-start{display:flex;align-items:center;gap:15px}.topbar-meta{color:#8993a3;font-weight:800;letter-spacing:1.7px;font-size:10px}.topbar-user{display:flex;align-items:center;gap:14px}.user-email{font-weight:650;color:#4d5b6d;font-size:12px}.role-chip{font-size:10px;font-weight:800;color:#85631c;background:#faf2dd;padding:6px 8px;border-radius:5px;letter-spacing:.65px}.content-wrap{max-width:1550px;padding:37px clamp(18px,3.6vw,54px) 90px;margin:auto}.page{display:none}.page.active{display:block}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:30px}.page-heading h1{font-size:30px;letter-spacing:-.7px;color:var(--navy);margin:10px 0 6px}.page-heading p{margin:0;line-height:1.7}.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;margin-bottom:23px}.stat-card{background:#fff;border:1px solid var(--line);border-radius:13px;padding:24px;box-shadow:var(--shadow)}.stat-card>span{display:block;color:#647284;font-size:12px;font-weight:700}.stat-card strong{font-size:42px;letter-spacing:-1px;display:block;color:var(--navy);margin:16px 0 8px}.stat-card small{color:#8a94a4;font-size:11px}.stat-card.accent{border-top:3px solid var(--red)}.panel{background:#fff;border:1px solid var(--line);border-radius:13px;box-shadow:var(--shadow);margin-bottom:23px}.panel-head{display:flex;justify-content:space-between;align-items:flex-start;padding:24px 25px 16px;gap:18px}.panel-head h2{font-size:17px;color:var(--navy);margin:0 0 7px}.panel-head p{font-size:12px;margin:0}.chart-panel{padding-bottom:15px}.filter-inline{display:flex;align-items:flex-end;gap:9px;flex-wrap:wrap}.filter-inline label{color:#768394;font-size:10px}.filter-inline input{padding:8px 9px;max-width:150px;display:block;margin-top:6px;font-size:11px}.bar-chart{padding:25px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:end;gap:30px;min-height:268px}.bar-item{display:flex;flex-direction:column;align-items:center;justify-content:end;gap:8px;min-width:0}.bar-track{height:165px;background:#f4f6f9;width:min(80%,138px);position:relative;display:flex;align-items:flex-end;border-radius:8px 8px 3px 3px;overflow:hidden}.bar-fill{height:0%;width:100%;background:linear-gradient(0deg,#b12b38,#e0a18e);border-radius:7px 7px 0 0;min-height:0;transition:height .4s}.bar-item:nth-child(2) .bar-fill{background:linear-gradient(0deg,#365477,#91abc4)}.bar-item:nth-child(3) .bar-fill{background:linear-gradient(0deg,#b3873d,#e1c98d)}.bar-item:nth-child(4) .bar-fill{background:linear-gradient(0deg,#657483,#aebcc8)}.bar-value{font-size:19px;color:var(--navy);font-weight:850}.bar-label{font-size:12px;color:#616d7b;font-weight:700}.chart-empty{grid-column:1/-1;text-align:center;color:#8792a1;align-self:center}.chart-foot{padding:8px 25px 10px;font-size:11px;color:#8b98a5;margin:0}.table-wrap{overflow-x:auto}table{border-collapse:collapse;width:100%;min-width:650px}th{text-align:left;background:#fafbfc;text-transform:uppercase;color:#758295;letter-spacing:1px;font-size:9px;font-weight:800;border-top:1px solid #f0f2f5;border-bottom:1px solid #eaeef2;padding:13px 16px}td{border-bottom:1px solid #eff1f4;padding:15px 16px;font-size:12px;max-width:280px;overflow-wrap:anywhere}tbody tr:last-child td{border-bottom:0}.empty-row{text-align:center;color:#8e99a7;padding:35px}.control-text{font-weight:500;color:#9c2a36;white-space:nowrap}.pill{display:inline-block;border-radius:7px;background:#f1f4f7;padding:6px 9px;font-weight:700;font-size:11px;color:#536273}.pill.complaint{background:#fdebee;color:#a52c3c}.pill.inquiry{background:#edf3f9;color:#365d86}.pill.concern{background:#fff5df;color:#97702e}.pill.others{background:#edf1f3;color:#556674}.action-links{white-space:nowrap;display:flex;gap:8px}.link-btn{border:0;padding:5px;background:transparent;color:#a42937;font-size:12px;font-weight:750}.link-btn:hover{text-decoration:underline}.form-layout{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:23px;align-items:start}.form-panel{padding:30px}.field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.field{display:flex;flex-direction:column;gap:8px}.wide-field{grid-column:1/-1}.field label em{color:#b12d3b;font-style:normal}.optional{color:#8997a4;font-weight:500}.readonly-input{background:#f7f8fb;color:#8894a4;border:1px dashed #d8dfe8;border-radius:9px;padding:13px;font-size:12px}.form-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;margin-top:25px;padding-top:22px;border-top:1px solid var(--line)}.side-stack{display:flex;flex-direction:column;gap:16px}.info-card{padding:24px;border-radius:13px;background:#fffbf5;border:1px solid #f1e2c9}.info-card h3{font-size:16px;color:#4b3c27;margin:17px 0 8px}.info-card p{line-height:1.8;color:#796f61;font-size:12px}.info-card small{color:#948978;font-size:11px;line-height:1.7;display:block}.info-card.subtle{background:#fff;border-color:var(--line)}.info-card.subtle h3{color:var(--navy);margin-top:0}.info-card.subtle p{color:#758194}.info-badge{display:inline-block;padding:6px 9px;background:#f4e7c9;color:#91753f;font-size:10px;font-weight:800;letter-spacing:.6px;border-radius:5px}.control-example{font-size:11px;font-weight:800;overflow-wrap:anywhere;color:#9b2434;padding:12px;background:white;border-radius:6px;margin:16px 0 10px}.registry-filters{padding:19px;display:flex;gap:10px;align-items:center;flex-wrap:wrap}.registry-filters select{max-width:180px;font-size:12px;padding:10px}.filter-search{display:flex;flex:1 1 350px;min-width:0}.filter-search select{max-width:150px;border-radius:8px 0 0 8px}.filter-search input{border-left:0;border-radius:0 8px 8px 0;min-width:120px}.table-footer{display:flex;justify-content:space-between;align-items:center;padding:15px 20px;font-size:12px;color:#7c8999;border-top:1px solid var(--line)}.pagination{display:flex;gap:10px;align-items:center}.info-banner{background:#fff9eb;color:#6c5a3e;border:1px solid #f1dcb7;padding:19px 21px;border-radius:10px;line-height:1.7;margin-bottom:19px}.info-banner a{font-weight:800}.user-control{padding:6px 8px;font-size:11px;width:110px}.user-name{width:150px;max-width:150px;padding:8px}.status-label{font-size:11px;font-weight:700;color:#23764f}.status-label.inactive{color:#9a5a31}.panel-foot{padding:12px 20px;color:#86919e;font-size:11px}.menu-btn{display:none!important}.icon-btn{border:0;background:transparent;color:#647386;padding:8px;font-size:23px}.memo-dialog{width:min(700px,calc(100vw - 30px));max-height:90vh;overflow-y:auto;border:0;border-radius:15px;padding:28px;box-shadow:0 25px 80px #101b2d46}.memo-dialog::backdrop{background:#17233692}.dialog-top{display:flex;justify-content:space-between;gap:12px}.dialog-top h2{font-size:20px;color:var(--navy);overflow-wrap:anywhere}.dialog-fields{margin-top:22px}.dialog-actions{grid-column:1/-1;display:flex;justify-content:flex-end;gap:10px;margin-top:5px}.toast{position:fixed;top:18px;right:20px;padding:14px 18px;background:#233044;color:#fff;z-index:1000;border-radius:9px;box-shadow:0 15px 40px #1421373b;max-width:380px;opacity:0;transform:translateY(-12px);pointer-events:none;transition:.25s;font-size:12px;line-height:1.6}.toast.show{opacity:1;transform:translateY(0)}.toast.error{background:#a42d39}.toast.success{background:#266848}@media(max-width:1100px){.stats-grid{grid-template-columns:repeat(2,1fr)}.form-layout{grid-template-columns:1fr}.side-stack{display:grid;grid-template-columns:1fr 1fr}.user-email{display:none}}@media(max-width:800px){.login-screen{grid-template-columns:1fr}.login-identity{padding:40px;min-height:300px}.login-identity .seal,.identity-foot{display:none}.login-identity h1{font-size:38px}.login-identity p{font-size:14px}.login-panel{padding:28px 10px}.sidebar{transform:translateX(-100%);transition:transform .2s}.sidebar.open{transform:translateX(0)}.main-area{margin-left:0}.menu-btn{display:inline-flex!important}.topbar{padding:0 15px}.content-wrap{padding:26px 16px 70px}.page-heading h1{font-size:25px}.page-heading{align-items:flex-start}.page-heading .btn{font-size:11px}.bar-chart{gap:8px}.panel-head{flex-wrap:wrap}}@media(max-width:560px){.stats-grid{gap:10px}.stat-card{padding:16px}.stat-card strong{font-size:32px}.field-grid,.side-stack{grid-template-columns:1fr}.wide-field{grid-column:1}.form-panel{padding:19px}.bar-chart{padding:12px}.bar-track{width:95%}.bar-label{font-size:10px}.topbar-meta{font-size:8px;letter-spacing:.4px}.role-chip{display:none}.form-actions{flex-direction:column}.form-actions .btn{width:100%}.filter-inline input{max-width:126px}}

/* Version 0.2: registry columns follow the Google Sheets visible sequence. */
#page-registry .table-wrap { overflow-x:auto; scrollbar-gutter:stable; }
#page-registry table { min-width:1460px; }
#page-registry th:nth-child(1) { min-width:265px; }
#page-registry th:nth-child(2) { min-width:130px; }
#page-registry th:nth-child(3) { min-width:140px; }
#page-registry th:nth-child(4) { min-width:200px; }
#page-registry th:nth-child(5) { min-width:190px; }
#page-registry th:nth-child(6) { min-width:150px; }
#page-registry th:nth-child(7) { min-width:180px; }
#page-registry th:nth-child(8) { min-width:155px; }
#page-registry th:nth-child(9) { min-width:110px; }
#page-registry td:nth-child(2) { white-space:nowrap; }
.control-inline { display:inline-flex; align-items:center; gap:9px; white-space:nowrap; }
.copy-inline { border:1px solid #d9e1eb; border-radius:6px; background:#fff; color:#72515b; font-size:10px; padding:4px 7px; font-weight:650; cursor:pointer; }
.copy-inline:hover,.copy-inline:focus-visible { background:#f7f3ee; border-color:#bca8ac; color:#9c2a36; }

.table-scroll-tip { font-size:11px; color:#7d8999; padding:0 18px 10px; }
@media (min-width:1800px) { .table-scroll-tip { display:none; } }


/* Version 0.3 — readability and consistent official typography.
   Preserve the original uppercase spelling of the small section headings. */
.sidebar { width: 270px; }
.main-area { margin-left: 270px; }
.brand { padding: 25px 16px; gap: 12px; }
.brand strong { font-size: 17px; line-height: 1.35; }
.brand span { color: #E1C17B; font-size: 14px; font-weight: 700; letter-spacing: 0.35px; line-height: 1.4; margin-top: 3px; white-space: nowrap; }
.nav-group-title { font-size: 12px; font-weight: 800; letter-spacing: 1.2px; }
.nav-link { font-size: 15px; line-height: 1.4; }
.topbar { min-height: 83px; }
.topbar-meta { font-size: 14px; font-weight: 700; line-height: 1.35; letter-spacing: 0.85px; color: #63728A; }
.eyebrow { font-size: 14px; font-weight: 800; line-height: 1.35; letter-spacing: 1px; }
.panel-head h2 { font-size: 19px; }
.stat-card > span { font-size: 14px; }
.page-heading h1 { line-height: 1.2; }
/* Readability of table headings, cell values, and buttons. */
th { font-size: 11px; letter-spacing: 0.65px; }
td { font-size: 13px; line-height: 1.5; }
.btn.small { font-size: 13px; }
.copy-inline { font-size: 12px; font-weight: 650; padding: 5px 8px; }
.control-text { font-weight: 500; }
/* Recent Memoranda: Copy + Control Number | Drafter's Code | Subject | Nature | Date Encoded. */
#page-dashboard .recent-memos-table { min-width: 970px; width: 100%; }
#page-dashboard .recent-memos-table th:nth-child(1) { min-width: 345px; }
#page-dashboard .recent-memos-table th:nth-child(2) { min-width: 125px; }
#page-dashboard .recent-memos-table th:nth-child(3) { min-width: 220px; }
#page-dashboard .recent-memos-table th:nth-child(4) { min-width: 115px; }
#page-dashboard .recent-memos-table th:nth-child(5) { min-width: 165px; }
#page-dashboard .recent-memos-table td { overflow-wrap: normal; word-break: normal; }
#page-dashboard .recent-memos-table td:nth-child(3) { overflow-wrap: anywhere; }
#page-dashboard .recent-memos-table .control-inline { gap: 8px; }
#page-dashboard .recent-memos-table .copy-inline { flex: none; }
#page-dashboard .recent-memos-table .control-text { flex: none; }
@media (max-width: 800px) {
  .main-area { margin-left: 0; }
  .topbar-meta { font-size: 12px; letter-spacing: 0.35px; }
  .eyebrow { font-size: 13px; }
}
@media (max-width: 560px) {
  .topbar-meta { font-size: 11px; letter-spacing: 0.15px; }
  .brand span { font-size: 13px; }
}

/* Version 0.4 — paired Memo/Cover Memo registration. */
.stats-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
.doc-type-field { border:0; padding:0; margin:0; min-width:0; }
.doc-type-field legend { color:var(--ink); font-weight:700; font-size:14px; margin-bottom:10px; }
.doc-type-field legend em { color:var(--red); font-style:normal; }
.doc-type-field small { color:var(--muted); font-size:12px; line-height:1.55; }
.doc-choice-list { display:flex; flex-wrap:wrap; gap:12px; margin:2px 0 9px; }
.doc-choice { display:inline-flex!important; flex-direction:row!important; align-items:center; gap:10px; cursor:pointer; border:1px solid #dfe4ed; background:#fafbfc; border-radius:10px; padding:13px 16px; font-weight:700; font-size:14px; color:#293950; }
.doc-choice:has(input:checked) { border-color:#aebdd2; background:#f1f6fd; box-shadow:inset 0 0 0 1px #cfdae8; }
.doc-choice input { width:18px; height:18px; accent-color:var(--red); margin:0; flex:0 0 auto; }
#memo-cover-nature-row .readonly-input { color:#4e5867; font-size:14px; font-weight:750; border-style:solid; background:#f4f6fa; }
.memo-saved-panel { margin-top:22px; padding:22px; border:1px solid #b9d9c6; background:#f4faf6; border-radius:11px; }
.memo-saved-panel[hidden] { display:none!important; }
.saved-title { font-size:18px; font-weight:800; color:#246044; }
.memo-saved-panel p { margin:8px 0 15px; font-size:13px; line-height:1.6; color:#50685c; }
.saved-results { display:flex; flex-direction:column; gap:9px; margin-bottom:18px; }
.saved-record { border:1px solid #e3eadf; border-radius:8px; padding:13px; background:#fff; }
.saved-record-label { color:#627582; font-weight:750; font-size:12px; margin-bottom:8px; }
.saved-record-number { display:flex; gap:11px; align-items:center; flex-wrap:wrap; font-size:14px; }
.pill.not-applicable { background:#eef0f2; color:#576574; }
@media(max-width:1180px) { .stats-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:800px) { .stats-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:420px) { .stats-grid { grid-template-columns:1fr; } }
