/* ============================================================
   adf-fusion.css
   Faithful recreation of the Oracle ADF Faces 11g "fusion" skin
   (JDeveloper 11g / Enterprise Manager 11g, ~2008-2012)
   Tahoma 11px, blue-gray gradients, maximum density.
   ============================================================ */

/* ---------- Base ---------- */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font: 11px Tahoma, Verdana, Helvetica, sans-serif;
  color: #1a1a1a;
  background: #e9eef3;
  min-width: 960px;
  cursor: default;
}

a {
  color: #145fa8;
  text-decoration: none;
}
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 1px dotted #333;
  outline-offset: -2px;
}

/* ---------- Branding bar (dark top) ---------- */
.af-branding {
  display: flex;
  align-items: center;
  height: 38px;
  padding: 0 12px;
  background: linear-gradient(#54749b 0%, #3a5c86 48%, #1f3f63 100%);
  border-bottom: 1px solid #122a44;
  color: #fff;
}

.af-branding .logo {
  font: bold 16px Arial, Helvetica, sans-serif;
  letter-spacing: 1px;
  color: #ff2d21;
  margin-right: 8px;
  text-shadow: 0 1px 1px rgba(0,0,0,.4);
}

.af-branding .app-name {
  font: bold 12px Tahoma, sans-serif;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0,0,0,.35);
}

.af-branding .app-name .release {
  font-weight: normal;
  font-size: 10px;
  color: #b9cbdf;
  margin-left: 4px;
}

.af-globalLinks {
  margin-left: auto;
  color: #b9cbdf;
  white-space: nowrap;
}
.af-globalLinks a {
  color: #dce8f4;
  padding: 0 2px;
}
.af-globalLinks a:hover { color: #fff; }
.af-globalLinks .sep {
  color: #6d89a8;
  margin: 0 4px;
}
.af-globalLinks b { color: #fff; }

/* ---------- Menu bar ---------- */
.af-menuBar {
  display: flex;
  align-items: center;
  padding: 1px 6px;
  background: linear-gradient(#fdfeff, #e7edf4);
  border-bottom: 1px solid #aebdcc;
}

.af-menu {
  position: relative;
  padding: 3px 9px;
  border: 1px solid transparent;
  border-radius: 2px;
  color: #16334a;
}
.af-menu:hover {
  background: linear-gradient(#f4f9fe, #dceaf8);
  border-color: #88aed6;
}

/* menu dropdown (CSS hover) */
.af-menu .af-menuPopup {
  display: none;
  position: absolute;
  top: 100%;
  left: -1px;
  z-index: 100;
  min-width: 172px;
  padding: 2px;
  background: #fcfdfe;
  border: 1px solid #7e96b0;
  box-shadow: 2px 3px 6px rgba(30, 50, 75, .35);
}
.af-menu:hover .af-menuPopup { display: block; }

.af-menuItem {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 3px 18px 3px 6px;
  border: 1px solid transparent;
  white-space: nowrap;
  color: #1a1a1a;
}
.af-menuItem:hover {
  background: #d6e6f8;
  border-color: #9dbce0;
}
.af-menuItem .mi-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.af-menuItem .accel {
  margin-left: auto;
  padding-left: 24px;
  color: #7a8794;
}
.af-menuItem.disabled { color: #9aa7b5; }
.af-menuItem.disabled:hover { background: none; border-color: transparent; }

.af-menuSep {
  height: 1px;
  margin: 2px 4px 2px 26px;
  background: #c9d3de;
}

/* ---------- Toolbar ---------- */
.af-toolbar {
  display: flex;
  align-items: center;
  gap: 1px;
  padding: 2px 6px;
  background: linear-gradient(#fafcfe, #e2e9f1);
  border-bottom: 1px solid #b3c1d0;
}

.af-toolButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 24px;
  height: 22px;
  padding: 0 3px;
  border: 1px solid transparent;
  border-radius: 2px;
  color: #16334a;
  background: none;
  font: 11px Tahoma, sans-serif;
}
.af-toolButton:hover {
  background: linear-gradient(#f4f9fe, #dceaf8);
  border-color: #88aed6;
}
.af-toolButton:active {
  background: #cbdcef;
  border-color: #6e9cce;
}
.af-toolButton.disabled {
  opacity: .45;
  pointer-events: none;
}
.af-toolButton .caret {
  font-size: 8px;
  color: #46688c;
}

.af-tbSep {
  width: 1px;
  height: 18px;
  margin: 0 4px;
  background: #b7c4d2;
  border-right: 1px solid #fff;
}

/* ---------- Navigation tabs (level 1) ---------- */
.af-navTabs {
  display: flex;
  gap: 3px;
  padding: 7px 10px 0;
  border-bottom: 1px solid #8fa6c0;
  background: #dde5ee;
}

.af-navTab {
  position: relative;
  padding: 4px 15px 5px;
  background: linear-gradient(#eff4fa, #cfdcea);
  border: 1px solid #93a9c3;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  color: #1c4879;
  white-space: nowrap;
}
.af-navTab:hover {
  background: linear-gradient(#f7fbff, #dbe7f3);
  color: #0d3a6b;
}
.af-navTab.selected {
  background: #fff;
  font-weight: bold;
  margin-bottom: -1px;
  padding-bottom: 6px;
  color: #15497e;
}

/* ---------- Layout with splitter ---------- */
.af-shell {
  position: relative;
  display: flex;
  background: #fff;
  min-height: 640px;
  align-items: stretch;
}

.af-panelLeft {
  width: 232px;
  flex: none;
  background: #eef2f6;
  border-right: 1px solid #b9c6d3;
  overflow: hidden;
}

.af-splitter {
  width: 7px;
  flex: none;
  background: linear-gradient(90deg, #e5ebf1, #cbd5e0);
  border-right: 1px solid #b9c6d3;
  position: relative;
}
.af-splitter .grip {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  margin-top: -20px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5b7a9a;
  font-size: 8px;
  background: linear-gradient(90deg, #d7dfe8, #bfccd9);
  border: 1px solid #9fb2c4;
  border-left: none;
  border-right: none;
}
.af-splitter:hover .grip { color: #24466b; background: #cddcec; }

.af-panelMain {
  flex: 1;
  min-width: 0;
  padding: 10px 14px 20px;
  background: #fff;
  overflow: auto;
}

/* ---------- Accordion (af:panelAccordion) ---------- */
.af-accHeader {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 6px;
  background: linear-gradient(#fcfdfe, #dee7f1);
  border-top: 1px solid #fff;
  border-bottom: 1px solid #b0c1d2;
  color: #15497e;
  font-weight: bold;
  user-select: none;
}
.af-accHeader:hover { background: linear-gradient(#fdfeff, #e6eef7); }
.af-accHeader .disc {
  width: 10px;
  font-size: 9px;
  color: #41668d;
}
.af-accBody {
  padding: 8px;
  background: #fcfdfe;
  border-bottom: 1px solid #c6d2de;
}
.af-accSection.collapsed .af-accBody { display: none; }

/* ---------- Tree (af:tree) ---------- */
.af-tree { list-style: none; margin: 0; padding: 0; }
.af-tree ul { list-style: none; margin: 0; padding-left: 16px; }
.af-treeRow {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 1px 3px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.af-treeRow:hover { background: #e4eefa; }
.af-treeRow.selected {
  background: #cfe2f7;
  border-color: #91b6e0;
}
.af-treeRow .tw {
  width: 10px;
  font-size: 8px;
  color: #46688c;
  text-align: center;
}
.af-treeNode.closed > ul { display: none; }

/* ---------- Breadcrumbs (af:breadCrumbs) ---------- */
.af-breadCrumbs {
  margin: 0 0 8px;
  color: #5b6b7a;
}
.af-breadCrumbs .sep { margin: 0 5px; color: #8a99a8; }

/* ---------- Headers (af:panelHeader) ---------- */
.af-panelHeader {
  display: flex;
  align-items: center;
  margin: 4px 0 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid #c8d4e0;
}
.af-panelHeader h1 {
  margin: 0;
  font: bold 14px Tahoma, sans-serif;
  color: #15497e;
}
.af-panelHeader .hdrToolbar {
  margin-left: auto;
  display: flex;
  gap: 4px;
}

.af-subHeader {
  margin: 16px 0 8px;
  font: bold 12px Tahoma, sans-serif;
  color: #15497e;
}

/* ---------- Messages (af:messages) ---------- */
.af-messages {
  margin: 0 0 12px;
  border: 1px solid #b0bdcb;
  background: #fbfcfd;
}
.af-messages .msgHead {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  background: linear-gradient(#f6f8fa, #e8edf2);
  border-bottom: 1px solid #d4dce4;
  font-weight: bold;
  color: #b00000;
}
.af-messages ul {
  margin: 5px 0 6px;
  padding-left: 30px;
}
.af-messages li { margin: 2px 0; }

/* ---------- Train (af:train) ---------- */
.af-train {
  display: flex;
  margin: 4px 0 18px;
}
.af-trainStop {
  position: relative;
  width: 108px;
  text-align: center;
}
.af-trainStop .stopIcon {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 1px solid #7e96b0;
  background: linear-gradient(#fdfeff, #dde6ef);
  color: #fff;
  font-size: 9px;
  font-weight: bold;
}
.af-trainStop::before,
.af-trainStop::after {
  content: "";
  position: absolute;
  top: 9px;
  width: 50%;
  height: 2px;
  background: #afc2d4;
  z-index: 1;
}
.af-trainStop::before { left: 0; }
.af-trainStop::after { right: 0; }
.af-trainStop:first-child::before,
.af-trainStop:last-child::after { display: none; }

.af-trainStop.visited .stopIcon {
  background: linear-gradient(#7fa7d4, #4b79ac);
  border-color: #38618f;
}
.af-trainStop.current .stopIcon {
  border: 2px solid #2e5a8f;
  background: #fff;
  box-shadow: 0 0 3px rgba(46, 90, 143, .6);
}
.af-trainStop.current .stopIcon::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(#6f9bcb, #35618f);
}
.af-trainStop .stopLabel {
  display: block;
  margin-top: 3px;
  color: #6b7a89;
}
.af-trainStop.visited .stopLabel { color: #26466b; }
.af-trainStop.current .stopLabel {
  color: #15497e;
  font-weight: bold;
}

/* ---------- Forms ---------- */
.af-form {
  display: grid;
  grid-template-columns: max-content minmax(150px, 230px) max-content minmax(150px, 230px);
  gap: 7px 8px;
  align-items: center;
  max-width: 780px;
}
.af-form .colspan { grid-column: 2 / 5; }

.af-label {
  text-align: right;
  color: #3e4b58;
  white-space: nowrap;
}
.af-label .req {
  color: #4372a6;
  font-weight: bold;
  margin-right: 2px;
}
.af-label.disabled { color: #98a6b5; }

input[type="text"],
input[type="password"],
textarea,
select {
  font: 11px Tahoma, Verdana, sans-serif;
  color: #1a1a1a;
  background: #fff;
  border: 1px solid #9cafc2;
  border-top-color: #7c92a8;
  border-radius: 0;
  padding: 2px 3px;
  margin: 0;
}
input[type="text"],
input[type="password"] { height: 19px; }

input:focus, textarea:focus, select:focus {
  border-color: #4e79ac;
  outline: none;
}

input[readonly], input.readonly {
  background: #eff2f5;
  color: #5c6873;
  border-color: #c2ccd6;
}
input:disabled, select:disabled, textarea:disabled {
  background: #eff2f5;
  color: #9aa7b5;
  border-color: #c9d2db;
}

textarea { resize: none; }

/* selects with drawn arrow (ADF dropdown) */
select:not([multiple]) {
  appearance: none;
  -webkit-appearance: none;
  height: 19px;
  padding-right: 20px;
  background-image:
    linear-gradient(#fdfeff, #dde6ef),
    linear-gradient(#9cafc2, #9cafc2);
  background-repeat: no-repeat;
  background-position: right 0 top 0, right 16px top 0;
  background-size: 16px 100%, 1px 100%;
}
select:not([multiple])::after { content: ""; }
.af-selectWrap {
  position: relative;
  display: inline-block;
  width: max-content;
  justify-self: start;
}
.af-selectWrap::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  margin-top: -1px;
  border: 4px solid transparent;
  border-top-color: #2e567f;
  pointer-events: none;
}

/* composite field: input + icon button (date, LOV) */
.af-comboField {
  display: inline-flex;
  align-items: stretch;
}
.af-comboField input { border-right: none; }
.af-iconButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  border: 1px solid #8098b2;
  background: linear-gradient(#fefefe, #edf1f6 45%, #d9e2ec);
  padding: 0;
}
.af-iconButton:hover {
  border-color: #537cae;
  background: linear-gradient(#fff, #e4eef9 45%, #c8dcf2);
}
.af-iconButton:active { background: #c9d6e5; }

/* spinbox */
.af-spinBox { display: inline-flex; align-items: stretch; }
.af-spinBox input { width: 52px; border-right: none; text-align: right; }
.af-spinButtons { display: flex; flex-direction: column; width: 16px; }
.af-spinButtons button {
  flex: 1;
  padding: 0;
  font-size: 6px;
  line-height: 1;
  color: #2e567f;
  border: 1px solid #8098b2;
  background: linear-gradient(#fefefe, #dde5ee);
}
.af-spinButtons button + button { border-top: none; }
.af-spinButtons button:hover { background: linear-gradient(#fff, #cfe0f2); }

/* compact checkbox / radio */
input[type="checkbox"], input[type="radio"] {
  width: 12px;
  height: 12px;
  margin: 0 4px 0 0;
  vertical-align: -2px;
  accent-color: #35618f;
}
.af-choiceGroup { display: flex; gap: 14px; align-items: center; }
.af-choiceGroup label { color: #1a1a1a; }

/* error state + noteWindow */
.af-error input, input.af-error {
  border-color: #cc2255 !important;
  border-width: 2px;
  padding: 1px 2px;
}
.af-noteWindow {
  position: relative;
  display: inline-block;
  margin-top: 5px;
  padding: 5px 8px;
  max-width: 260px;
  background: #fff;
  border: 1px solid #7e96b0;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, .28);
}
.af-noteWindow::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 14px;
  border: 6px solid transparent;
  border-bottom-color: #7e96b0;
  border-top: none;
}
.af-noteWindow::after {
  content: "";
  position: absolute;
  top: -5px;
  left: 15px;
  border: 5px solid transparent;
  border-bottom-color: #fff;
  border-top: none;
}
.af-noteWindow .nwError {
  color: #b00000;
  font-weight: bold;
}

/* ---------- Buttons (af:commandButton) ---------- */
.af-button {
  font: 11px Tahoma, Verdana, sans-serif;
  color: #1c3a5e;
  padding: 2px 12px 3px;
  background: linear-gradient(#fefefe, #edf1f6 45%, #d9e2ec);
  border: 1px solid #8098b2;
  border-radius: 3px;
  cursor: default;
}
.af-button:hover {
  border-color: #537cae;
  background: linear-gradient(#fff, #e4eef9 45%, #c8dcf2);
}
.af-button:active {
  background: linear-gradient(#c9d6e5, #e2eaf3);
}
.af-button:focus-visible {
  outline: 1px dotted #445566;
  outline-offset: -3px;
}
.af-button:disabled {
  color: #9aa7b5;
  border-color: #b4c0cc;
  background: #eef1f5;
}
.af-button.small { padding: 1px 8px 2px; }

.af-buttonBar {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  margin: 14px 0 4px;
  padding-top: 8px;
  border-top: 1px solid #dbe3ea;
  max-width: 780px;
}

/* ---------- Shuttle (af:selectManyShuttle) ---------- */
.af-shuttle {
  display: flex;
  gap: 8px;
  align-items: center;
}
.af-shuttleBox {
  width: 170px;
  border: 1px solid #9cafc2;
  background: #fff;
}
.af-shuttleBox .shHdr {
  padding: 3px 6px;
  background: linear-gradient(#f7f9fb, #e3eaf1);
  border-bottom: 1px solid #c2ceda;
  font-weight: bold;
  color: #23456a;
}
.af-shuttleBox select {
  display: block;
  width: 100%;
  height: 122px;
  border: none;
  outline: none;
  padding: 1px;
}
.af-shuttleBox option { padding: 1px 4px; }
.af-shuttleButtons {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.af-shuttleButtons .af-button {
  width: 26px;
  padding: 1px 0 2px;
  font-weight: bold;
  color: #2e567f;
}

/* ---------- panelCollection + table (af:table) ---------- */
.af-panelCollection {
  border: 1px solid #a9b8c7;
}
.af-pcToolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px 5px;
  background: linear-gradient(#fafcfe, #e2e9f1);
  border-bottom: 1px solid #c2cedb;
}

.af-table { width: 100%; border-collapse: collapse; }

.af-table th {
  padding: 3px 7px;
  background: linear-gradient(#fafcfd, #e4eaf1);
  border-right: 1px solid #c9d4df;
  border-bottom: 1px solid #a9b8c7;
  font-weight: normal;
  color: #20456b;
  text-align: left;
  white-space: nowrap;
}
.af-table th:hover { background: linear-gradient(#fff, #edf2f8); }
.af-table th.num, .af-table td.num { text-align: right; }
.af-table th .sortIcon {
  margin-left: 4px;
  font-size: 8px;
  color: #54759b;
}

.af-table td {
  padding: 3px 7px;
  border-right: 1px solid #e2e7ec;
  border-bottom: 1px solid #e9edf1;
  white-space: nowrap;
}

.af-table .rowHdr {
  width: 26px;
  text-align: center;
  background: linear-gradient(#fafcfd, #e4eaf1);
  border-right: 1px solid #c9d4df;
  color: #54759b;
}

.af-table tbody tr.band td { background: #f4f7fa; }
.af-table tbody tr:hover td { background: #eaf2fb; }
.af-table tbody tr.selected td {
  background: #cfe2f7;
  border-bottom-color: #aecbeb;
}
.af-table tbody tr.selected .rowHdr {
  background: linear-gradient(#d3e2f3, #b7cfe8);
}

/* filter row (QBE) */
.af-table .filterRow td {
  background: #edf1f6;
  border-bottom: 1px solid #c2cedb;
  padding: 2px 4px;
}
.af-table .filterRow input {
  width: 100%;
  height: 17px;
}

/* status bar / pagination */
.af-statusBar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 7px;
  background: linear-gradient(#f6f8fa, #e0e7ee);
  border-top: 1px solid #c2cedb;
  color: #44566a;
}
.af-statusBar .pager {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}
.af-statusBar .pager a { padding: 0 2px; }
.af-statusBar .pager .disabled { color: #9aa7b5; }

/* status with colored icon inside cells */
.st { display: inline-flex; align-items: center; gap: 5px; }
.st::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,.25);
}
.st.ok::before   { background: radial-gradient(circle at 35% 30%, #9fd98f, #3d8b2f); }
.st.warn::before { background: radial-gradient(circle at 35% 30%, #ffe08a, #d99a17); }
.st.err::before  { background: radial-gradient(circle at 35% 30%, #f29a8e, #b3271b); }

/* ---------- Inner tabs (af:panelTabbed) ---------- */
.af-panelTabbed { margin-top: 18px; }
.af-tabBar {
  display: flex;
  gap: 2px;
  padding: 0 6px;
  border-bottom: 1px solid #a5b6c8;
}
.af-tab {
  padding: 3px 13px 4px;
  background: linear-gradient(#f2f5f9, #dbe3ec);
  border: 1px solid #a5b6c8;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  color: #29506f;
  white-space: nowrap;
}
.af-tab:hover { background: linear-gradient(#f9fbfd, #e5ecf3); }
.af-tab.selected {
  background: #fff;
  font-weight: bold;
  color: #15497e;
  margin-bottom: -1px;
  padding-bottom: 5px;
}
.af-tabContent {
  border: 1px solid #a5b6c8;
  border-top: none;
  padding: 10px;
  background: #fff;
}
.af-tabPanel { display: none; }
.af-tabPanel.active { display: block; }

/* ---------- Boxes (af:panelBox) ---------- */
.af-boxRow {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  align-items: flex-start;
}
.af-panelBox {
  flex: 1;
  border: 1px solid #a2b7cc;
  border-radius: 4px;
  background: #fff;
}
.af-panelBox .boxHdr {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 3px 3px 0 0;
  border-bottom: 1px solid #a2b7cc;
  font-weight: bold;
  user-select: none;
}
.af-panelBox .boxHdr .disc { font-size: 9px; width: 10px; }
.af-panelBox .boxBody { padding: 8px; }
.af-panelBox.collapsed .boxBody { display: none; }
.af-panelBox.collapsed .boxHdr {
  border-bottom: none;
  border-radius: 3px;
}

.af-panelBox.core .boxHdr {
  background: linear-gradient(#e9eff7, #cbdaea);
  color: #1d4e7e;
}
.af-panelBox.light .boxHdr {
  background: linear-gradient(#f8fafc, #e7edf3);
  color: #33536f;
}
.af-panelBox.highlight { border-color: #56789c; }
.af-panelBox.highlight .boxHdr {
  background: linear-gradient(#6b90b6, #3d6791);
  border-bottom-color: #35597d;
  color: #fff;
}
.af-panelBox.highlight .boxHdr .disc { color: #cfe0f0; }

/* name/value list inside boxes */
.af-nameValue { display: grid; grid-template-columns: max-content 1fr; gap: 3px 10px; }
.af-nameValue dt { color: #5b6b7a; text-align: right; }
.af-nameValue dd { margin: 0; color: #1a1a1a; }

/* ---------- Progress indicator ---------- */
.af-progress {
  display: inline-block;
  width: 210px;
  height: 13px;
  padding: 1px;
  border: 1px solid #8fa6c0;
  background: #fff;
  vertical-align: middle;
}
.af-progress .bar {
  display: block;
  height: 100%;
  background:
    repeating-linear-gradient(90deg, transparent 0 7px, #fff 7px 9px),
    linear-gradient(#8fb2d9, #527eb1);
}

/* ---------- Dialog (af:dialog / af:popup) ---------- */
.af-dialogOverlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(60, 76, 94, .35);
}
.af-dialogOverlay.open { display: block; }

.af-dialog {
  width: 390px;
  background: #fff;
  border: 1px solid #5c7fa6;
  box-shadow: 0 4px 14px rgba(20, 40, 70, .5);
}
.af-dialogOverlay .af-dialog {
  position: absolute;
  top: 120px;
  left: 50%;
  margin-left: -195px;
}
.af-dialog .dlgTitle {
  display: flex;
  align-items: center;
  padding: 4px 8px;
  background: linear-gradient(#e7eff8, #c4d6e9);
  border-bottom: 1px solid #9fb5cc;
  font-weight: bold;
  color: #173f6b;
}
.af-dialog .dlgClose {
  margin-left: auto;
  width: 17px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: bold 10px Tahoma, sans-serif;
  color: #35597d;
  border: 1px solid transparent;
  border-radius: 2px;
}
.af-dialog .dlgClose:hover {
  background: #f3d3d0;
  border-color: #c98a84;
  color: #8c1c13;
}
.af-dialog .dlgBody { padding: 12px 10px; }
.af-dialog .dlgFoot {
  padding: 6px 8px;
  background: #eff3f7;
  border-top: 1px solid #d3dce5;
  text-align: right;
}
.af-dialog .dlgFoot .af-button { margin-left: 5px; }

/* ---------- Side drawer (af:panelDrawer) ---------- */
.af-drawerDock {
  position: relative;
  z-index: 41;
  flex: none;
  width: 26px;
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  background: linear-gradient(90deg, #fafcfe, #e2e9f1);
  border-left: 1px solid #b3c1d0;
}

.af-drawerTab {
  writing-mode: vertical-rl;
  padding: 11px 3px;
  margin-left: -1px;
  background: linear-gradient(to right, #eff4fa, #cfdcea);
  border: 1px solid #93a9c3;
  border-right: none;
  border-radius: 4px 0 0 4px;
  color: #1c4879;
  white-space: nowrap;
  user-select: none;
}
.af-drawerTab:hover {
  background: linear-gradient(to right, #f7fbff, #dbe7f3);
  color: #0d3a6b;
}
.af-drawerTab.selected {
  background: #fff;
  border-color: #8fa6c0;
  font-weight: bold;
  color: #15497e;
}

.af-drawer {
  display: none;
  position: absolute;
  top: 0;
  bottom: 0;
  right: 26px;
  width: 330px;
  z-index: 40;
  flex-direction: column;
  background: #fff;
  border-left: 1px solid #8fa6c0;
  box-shadow: -4px 0 10px rgba(30, 50, 75, .25);
}
.af-drawer.open {
  display: flex;
  animation: afDrawerIn .18s ease-out;
}
@keyframes afDrawerIn {
  from { transform: translateX(40px); opacity: .5; }
  to   { transform: none; opacity: 1; }
}

.af-drawer .drHeader {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  background: linear-gradient(#fcfdfe, #dee7f1);
  border-bottom: 1px solid #b0c1d2;
  font-weight: bold;
  color: #15497e;
}
.af-drawer .drClose,
.af-drawer .drExpand {
  width: 17px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: bold 10px Tahoma, sans-serif;
  color: #35597d;
  border: 1px solid transparent;
  border-radius: 2px;
}
.af-drawer .drExpand { margin-left: auto; }
.af-drawer .drExpand:hover {
  background: linear-gradient(#f4f9fe, #dceaf8);
  border-color: #88aed6;
}
.af-drawer .drClose:hover {
  background: #f3d3d0;
  border-color: #c98a84;
  color: #8c1c13;
}

/* expanded state: covers the whole content area up to the dock */
.af-drawer.expanded {
  left: 0;
  width: auto;
}
.af-drawer .icoRestore { display: none; }
.af-drawer.expanded .icoExpand { display: none; }
.af-drawer.expanded .icoRestore { display: inline; }
.af-drawer .drBody {
  flex: 1;
  overflow: auto;
  padding: 10px;
}

/* notes inside the drawer */
.af-note {
  padding: 6px 0;
  border-bottom: 1px solid #e4eaf0;
}
.af-note .noteMeta { color: #6b7a89; margin-bottom: 2px; }

/* ---------- Footer ---------- */
.af-footer {
  display: flex;
  align-items: center;
  padding: 5px 12px;
  background: linear-gradient(#f2f5f8, #dde4eb);
  border-top: 1px solid #b3c1d0;
  color: #6b7a89;
}
.af-footer .links { margin-left: auto; }
.af-footer .links a { margin-left: 10px; }

/* ---------- Utilities ---------- */
.af-spacer { height: 14px; }
.tip { color: #6b7a89; }
.gallery-note {
  margin: 6px 0 14px;
  color: #6b7a89;
}
