/* Layout from legacy apps/lib/gui.php, asset/css/uang.css and web.css.
   Local assets and native HTML controls keep navigation compatible with CSP. */
@font-face {
  font-family: "FontAwesome";
  src: url("fonts/fontawesome-webfont.af7ae505a9ee.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

*, ::before, ::after { box-sizing: border-box; }
body, h1, h2, h3, p, ul, li, form, table { margin: 0; padding: 0; }
body { font: 11px Tahoma, Arial, Verdana, sans-serif; color: #707070; background: #fff; -webkit-font-smoothing: antialiased; }
input, select, textarea, button { font: inherit; color: inherit; }
ul { list-style: none; }
a { color: #5388a0; text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid #5388a0; outline-offset: 2px; }
.clearfix::after { content: ""; display: table; clear: both; }
.fa { font-family: "FontAwesome"; font-style: normal; font-weight: 400; }
.fa-tags::before { content: "\f02c"; }
.mb10 { margin-bottom: 10px; }
.nowrap { white-space: nowrap; }
.sr-only, .menutoggle-input {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* Legacy 43px maroon masthead. Grid reserves space for both branding and menu. */
header.me {
  position: relative; display: grid; grid-template-columns: max-content minmax(0, 1fr);
  column-gap: 24px; min-height: 43px; padding: 0 15px; background: #833e4d;
}
.web-title { display: block; padding-top: 1px; align-self: start; }
.web-title:hover { text-decoration: none; }
.web-title img { float: left; height: 35px; width: auto; margin: 2px 5px 0 0; }
.web-title span { display: block; color: #fff; font-weight: 700; font-size: 14px; line-height: 18px; white-space: nowrap; }
.web-title span + span { font-size: 16px; color: #efaac5; }
.ministry-title {
  grid-column: 2; grid-row: 1; justify-self: end; padding-top: 3px;
  max-width: 100%; color: #efaac5; font-size: 9px; font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.menubar { grid-column: 2; grid-row: 1; align-self: end; z-index: 5; margin-top: 18px; }
.topnav { display: flex; justify-content: flex-end; flex-wrap: wrap; }
.topnav > li { position: relative; padding: 4px 0 6px 18px; }
.topnav > li > a, .nav-dropdown > summary { display: block; color: #fff; font-weight: 700; cursor: pointer; }
.topnav > li > a:hover { text-decoration: none; }
.nav-dropdown > summary { list-style: none; }
.nav-dropdown > summary::-webkit-details-marker { display: none; }
.nav-dropdown > summary::after {
  font-family: "FontAwesome"; content: "\f078"; font-size: 10px; margin-left: 4px;
}
.nav-dropdown > summary:focus-visible, .topnav > li > a:focus-visible { outline-color: #fff; }
.subnav {
  display: none; position: absolute; right: 0; top: 23px; width: 170px;
  background: #fff; box-shadow: 0 0 2px rgba(50, 50, 50, .5); z-index: 6;
}
.nav-dropdown[open] > .subnav { display: block; }
.subnav li a, .subnav li button {
  display: block; width: 100%; margin: 0; padding: 6px 10px; line-height: 16px; text-align: left;
  color: #35353d; background: #fff; font-weight: 400;
  border: 0; border-radius: 0; text-shadow: none; cursor: pointer;
}
.subnav li a:hover, .subnav li button:hover { background: #f5f5f5; text-decoration: none; }
.subnav li.separator { border-bottom: 1px dashed #e3e2e6; }
.subnav .nav-dropdown > summary { color: #35353d; font-weight: 400; padding: 6px 10px; }
.subnav .nav-dropdown > .subnav { position: static; box-shadow: none; width: 100%; padding-left: 12px; }
.menutoggle, .menutoggle-input { display: none; }

/* Legacy title strip and inset, bordered white page canvas. */
.page-title {
  display: flex; justify-content: space-between; align-items: baseline; gap: 5px 20px;
  padding: 0 15px; background: #fff; line-height: 20px; flex-wrap: wrap;
  border-bottom: 1px solid #bebebe; box-shadow: 0 2px 4px rgba(0, 0, 0, .12);
}
.page-title h1 { font-size: 11px; font-weight: 400; }
.page-title .fa { font-size: 12px; margin-right: 4px; }
.scope-caption { font-size: 10px; overflow-wrap: anywhere; }
.page-content {
  min-width: 0; margin: 0 15px 15px; padding: 10px 10px 20px;
  border: solid #ddd; border-width: 0 1px 1px; border-radius: 0 0 2px 2px;
  background: #fff; box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
}
.panel { background: #f6f6f6; padding: 10px; margin: 0 0 10px; border-bottom: 1px dashed #d8d7dc; }
.panel.narrow { max-width: 600px; }
.panel.toolbar { margin: -10px -10px 10px; padding: 6px 10px; }
.title { font-size: 12px; font-weight: 700; color: #5388a0; margin: 0 0 4px; text-transform: uppercase; text-shadow: 0 1px 0 #fff, 1px 2px 2px #aaa; }
.note { margin: 0 0 10px; line-height: 1.5; }

/* Only wide data regions scroll; long descriptions wrap inside their cells. */
.table-scroll { width: 100%; overflow-x: auto; margin-bottom: 15px; }
.table-scroll table.data { margin-bottom: 0; }
table.data {
  width: 100%; background: #fff; border: 1px solid #ddd; border-left: 0;
  border-collapse: separate; border-spacing: 0; border-radius: 2px; margin-bottom: 15px;
}
table.data th, table.data td {
  border-left: 1px solid #ddd; padding: 4px 5px; line-height: 20px;
  text-align: left; vertical-align: top; overflow-wrap: anywhere;
}
table.data td, table.data tbody th { border-top: 1px solid #ddd; }
table.data thead th { font-weight: 700; text-transform: uppercase; background: #fff; white-space: nowrap; }
table.data tbody tr:nth-child(odd) { background: #f8f8f8; }
table.data tbody tr:nth-child(even) { background: #fff; }
table.data tbody tr:hover td { background: #e4f0ee; }
table.data td:first-child, table.data thead th:first-child { text-align: center; width: 30px; min-width: 30px; }
table.data td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table-scroll > table.data { min-width: 780px; }
table.data.narrow { max-width: 600px; }
table.data.narrow td:first-child { text-align: left; font-weight: 700; width: 120px; }
table.data.info { border: 0; border-radius: 0; }
table.data.info th, table.data.info td { border-color: #fff; color: #646464; text-align: left; }
table.data.info thead th { background: rgba(83, 136, 160, .5); color: #fff; text-shadow: none; }
table.data.info tbody th { width: 140px; font-weight: 700; }
.menu-table td:nth-child(2) { width: 160px; }
.menu-table a { font-weight: 700; }
.widget { text-align: center; white-space: nowrap; }
table.data .widget button { margin: 0; }

/* Compact legacy inputs and blue action buttons. */
label { display: block; margin: 6px 0 3px; font-weight: 700; }
input[type=text], input[type=password], input[type=number], input[type=date],
input[type=email], input[type=file], select, textarea {
  width: 100%; max-width: 360px; min-height: 21px; padding: 2px; background: #fff;
  border: 1px solid #babcbd; border-radius: 2px; box-shadow: 0 1px 0 #eee inset, 0 1px 0 #fff;
}
select:not([multiple]) { height: 23px; padding: 0 2px; }
select[multiple] { min-height: 100px; }
textarea { min-height: 60px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #5388a0; }
input[type=checkbox] { width: auto; height: auto; vertical-align: middle; }
form p { margin-bottom: 6px; }
button, input[type=submit] {
  margin-top: 6px; padding: 3px 6px; color: #fff; background: #5388a0; cursor: pointer;
  border: 0; border-bottom: 1px solid rgba(0, 0, 0, .25); border-radius: 2px;
  text-shadow: 0 -1px 1px rgba(0, 0, 0, .1);
}
button:active, input[type=submit]:active { background: #496e7d; }
.errorlist, .alert { color: #b94a48; margin: 2px 0 10px; line-height: 1.5; }
.full { width: 100%; max-width: none; }
.alert { text-align: center; }
.helptext { display: block; margin-top: 3px; line-height: 1.5; }
details > summary { cursor: pointer; }
details.panel[open] > summary { margin-bottom: 10px; }

/* Production login reference: centered white form on a dusty rose canvas. */
body.cover { background: #b96a6f; min-height: 100vh; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 13px; }
header.front { position: relative; min-height: 43px; padding: 3px 15px; background: #fff; box-shadow: 0 2px 3px rgba(0, 0, 0, .25); }
.front-content { max-width: 940px; margin: 0 auto; }
.app-name { display: flex; align-items: center; gap: 5px; min-height: 35px; }
.app-name:hover { text-decoration: none; }
.app-name img { display: block; height: 35px; width: auto; flex-shrink: 0; }
.brand-copy { min-width: 0; }
.app-name .region, .app-name .office { display: block; font-family: Arial, sans-serif; font-weight: 700; line-height: 18px; }
.app-name .region { color: #52525a; font-size: 14px; }
.app-name .office { color: #833e4d; font-size: 16px; }
body.cover .page-content { margin: 0; padding: 15px; border: 0; background: transparent; box-shadow: none; }
.front-page { max-width: 940px; margin: 0 auto; }
.login-panel { width: 260px; max-width: 100%; margin: 0 auto; }
.login { background: #fff; padding: 12px; border-radius: 2px; box-shadow: 0 0 1px rgba(50, 50, 50, .2); }
.login-heading { font-size: 14px; font-weight: 400; margin-bottom: 12px; }
.login-field { margin-bottom: 10px; }
.login label { font-size: 12px; font-weight: 400; margin: 0 0 5px; }
.login input[type=text], .login input[type=password], .login select:not([multiple]) { max-width: none; height: 25px; min-width: 0; font-size: 13px; padding: 2px 4px; }
.login select:not([multiple]) { height: 27px; }
.keyword-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2px; }
.keyword-image { display: block; width: 100%; height: 25px; border: 1px solid #babcbd; border-radius: 2px; background: #fff; box-shadow: 0 1px 0 #eee inset, 0 1px 0 #fff; }
.keyword-refresh { display: inline-block; margin-top: 3px; font-size: 10px; }
.login-mfa { font-size: 11px; margin: 0 0 10px; }
.login-mfa[open] summary { margin-bottom: 6px; }
.login input[type=submit] { width: 100%; font-size: 12px; line-height: 19px; padding: 2px 6px; margin-top: 6px; background: linear-gradient(#5388a7, #536ca7); border: 1px solid rgba(0, 0, 0, .15); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 2px rgba(0, 0, 0, .05); }
.login-providers { margin-top: 6px; padding-top: 6px; border-top: 1px solid #ddd; }
.login .sso-button { display: block; width: 100%; margin: 0; font-size: 14px; line-height: 19px; padding: 5px 6px; border: 0; border-radius: 3px; text-shadow: none; }
.login .sso-button.planet { background: #36a62b; }
.login .sso-button.google { background: #cc412e; margin-top: 8px; }
.login .sso-button:disabled { cursor: not-allowed; }
.provider-status { display: block; font-size: 10px; line-height: 14px; }
.login-external { margin-top: 10px; padding-top: 6px; border-top: 1px solid #ddd; text-align: center; }
.login-external a { font-size: 13px; text-decoration: underline; }

@media (max-width: 900px) {
  header.me { display: block; min-height: 28px; padding: 0 15px 5px; }
  .web-title { padding-right: 30px; }
  .web-title img, .web-title span + span, .ministry-title { display: none; }
  .web-title span { font-size: 14px; line-height: 22px; }
  .menutoggle-input { display: block; }
  .menutoggle {
    display: block; position: absolute; top: 3px; right: 16px; margin: 0; cursor: pointer;
  }
  .menutoggle::before { content: "\f0c9"; color: #fff; font-family: "FontAwesome"; font-size: 16px; }
  .menutoggle-input:focus-visible + .menutoggle { outline: 2px solid #fff; outline-offset: 2px; }
  .menubar { display: none; position: relative; margin: 5px -15px -5px; background: #3e1d24; }
  .menutoggle-input:checked ~ .menubar { display: block; }
  .topnav { display: block; padding: 5px 0; }
  .topnav > li { padding: 4px 18px; }
  .nav-dropdown > summary::after { float: right; }
  .subnav { position: static; width: 100%; box-shadow: none; background: #602e39; margin-top: 5px; }
  .subnav li a, .subnav li button { background: transparent; color: #fff; padding-left: 20px; }
  .subnav li a:hover, .subnav li button:hover { background: #592a35; }
  .subnav li.separator { border-bottom-color: #4f252e; }
}
@media (max-width: 540px) {
  .app-name .region { font-size: 12px; }
  .app-name .office { font-size: 14px; }
  .page-title { padding: 3px 10px; gap: 0; }
  .scope-caption { width: 100%; line-height: 16px; }
  .page-content { margin: 0 8px 10px; padding: 10px 8px 15px; }
  .panel.toolbar { margin-left: -8px; margin-right: -8px; }
  .menu-table td:nth-child(2) { width: auto; }
  table.data.info tbody th { width: 90px; }
}
@media print {
  header, .page-title, .menubar, .panel, button { display: none !important; }
  .page-content { margin: 0; padding: 0; border: 0; box-shadow: none; }
  .table-scroll { overflow: visible; }
  .table-scroll > table.data { min-width: 0; }
  table.data { border-collapse: collapse; }
  table.data th, table.data td { color: #000; border: 1px solid #000; }
}
