/* Scoped to the proposal dock and its two form controls. */
#automation-attendance-dock {
  position: fixed;
  right: 20px;
  bottom: 18px;
  width: min(320px, calc(100vw - 28px));
  z-index: 1190;
  color: #eaf3ff;
  font: 13px/1.4 Inter, system-ui, sans-serif;
  border: 1px solid #30445e;
  border-radius: 15px;
  background: #111f32;
  box-shadow: 0 12px 38px #0005;
  overflow: hidden;
}
#automation-attendance-dock[hidden] { display: none !important; }
#automation-attendance-dock button { font: inherit; cursor: pointer; }
#automation-attendance-dock button:focus-visible { outline: 2px solid #87baff; outline-offset: -3px; }
#automation-attendance-dock .attendance-dock-heading {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 12px;
  border: 0; background: #172b44; color: inherit; text-align: left;
}
#automation-attendance-dock .attendance-dock-heading > span:first-child { flex: 1; font-weight: 700; }
#automation-attendance-dock .attendance-dock-heading b { margin-left: 5px; background: #2e5076; padding: 1px 6px; border-radius: 8px; }
#automation-attendance-dock .attendance-dock-heading small { color: #b3c9e2; font-size: 11px; }
#automation-attendance-dock .attendance-dock-list { max-height: min(510px, 65vh); overflow: auto; padding: 8px; display: grid; gap: 8px; }
#automation-attendance-dock.is-collapsed .attendance-dock-list { display: none; }
#automation-attendance-dock .attendance-card {
  position: relative; border: 1px solid #3b506b; border-left: 4px solid #7197c9;
  border-radius: 10px; background: #17283d; overflow: hidden;
}
#automation-attendance-dock .attendance-card.is-active { outline: 1px solid #8bb9ff; }
#automation-attendance-dock .attendance-card.is-success { border-color: #26885e; background: #102f29; }
#automation-attendance-dock .attendance-card.is-error { border-color: #cd5865; background: #3a202b; }
#automation-attendance-dock .attendance-card.is-warning { border-color: #cda454; background: #362d20; }
#automation-attendance-dock .attendance-card-open {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 84px;
  padding: 10px 30px 10px 10px; border: 0; color: inherit; background: transparent; text-align: left;
}
#automation-attendance-dock .attendance-card-copy { min-width: 0; display: grid; gap: 3px; }
#automation-attendance-dock .attendance-card-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
#automation-attendance-dock .attendance-card-copy small { color: #bfd0e4; font-size: 10px; }
#automation-attendance-dock .attendance-card-copy > span { font-size: 11px; color: #ccd9eb; }
#automation-attendance-dock .attendance-card-icon { flex: 0 0 24px; text-align: center; font-size: 23px; font-weight: 700; color: #a5c5f0; }
#automation-attendance-dock .is-success .attendance-card-icon { color: #70e2ad; }
#automation-attendance-dock .is-error .attendance-card-icon { color: #ffa6ae; }
#automation-attendance-dock .is-warning .attendance-card-icon { color: #ffda8e; }
#automation-attendance-dock .is-loading .attendance-card-icon {
  flex-basis: 18px; width: 18px; height: 18px; border: 2px solid #47688f; border-top-color: #a5c5f0;
  border-radius: 50%; animation: attendance-spin 1s linear infinite;
}
#automation-attendance-dock .attendance-card-close { position: absolute; right: 4px; top: 4px; width: 27px; height: 27px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: #c7d6e8; font-size: 20px; }
#automation-attendance-dock .attendance-card-close:hover { background: #ffffff18; }
#automation-attendance-dock .attendance-card-link { display: block; width: calc(100% - 18px); margin: 0 9px 9px; padding: 7px; border: 1px solid #528475; border-radius: 6px; color: #d5fff0; background: #235443; font-weight: 650; }
#automation-attendance-dock .is-warning .attendance-card-link { color: #ffe8bd; background: #534125; border-color: #927440; }
.automation-bank-flow-head .automation-bank-flow-identity { margin-right: auto; }
#automation-bank-flow-minimize { flex: 0 0 38px; width: 38px; height: 38px; padding: 0; border-radius: 11px; border: 1px solid #60758e66; background: #25384d; color: #d4e5fb; font-size: 25px; cursor: pointer; }
.automation-attendance-banner { margin-bottom: 14px; padding: 11px 14px; border: 1px solid #507aa9; border-radius: 9px; background: #193b5a; color: #e1efff; font: 600 13px/1.5 system-ui, sans-serif; }
.automation-attendance-banner.is-success { background: #123c2e; border-color: #398765; color: #b1f7d1; }
.automation-attendance-banner.is-error { background: #4c222c; border-color: #ad5363; color: #ffd0d7; }
.automation-attendance-banner.is-warning { background: #46351c; border-color: #a78546; color: #ffe1a4; }
#automation-bank-flow-modal { position: relative; }
#automation-bank-flow-modal .automation-attendance-loader {
  position: absolute; inset: 78px 0 0; z-index: 20;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 15px;
  padding: 24px; text-align: center; color: #e1efff;
  background: rgba(7, 22, 30, .96); border-radius: 0 0 22px 22px;
  font: 14px/1.5 Inter, system-ui, sans-serif;
}
.automation-attendance-loader strong { font-size: 19px; }
.automation-attendance-loader small { max-width: 320px; color: #b3c9e2; }
.automation-attendance-loader .attendance-loader-client { overflow-wrap: anywhere; }
.attendance-loader-spinner {
  width: 44px; height: 44px; border: 4px solid #365369; border-top-color: #62e8b5;
  border-radius: 50%; animation: attendance-spin 1s linear infinite;
}
html[data-app-theme="light"] #automation-bank-flow-modal .automation-attendance-loader { background: rgba(245, 250, 255, .97); color: #17314b; }
html[data-app-theme="light"] .automation-attendance-loader small { color: #45617a; }
@keyframes attendance-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { #automation-attendance-dock .is-loading .attendance-card-icon, .attendance-loader-spinner { animation: none; } }
@media (max-width: 600px) {
  #automation-attendance-dock { right: 10px; bottom: 10px; width: min(290px, calc(100vw - 20px)); }
  #automation-attendance-dock .attendance-dock-list { max-height: 35vh; }
  .automation-bank-flow-head { gap: 8px; }
  #automation-bank-flow-name { font-size: 16px; }
}

/* Premium, readable minimized attendances. Scoped; no global UI changes. */
#automation-attendance-dock {
  border-color: #3979a3; border-radius: 18px;
  background: linear-gradient(160deg, #132940, #101e36 80%);
  box-shadow: 0 18px 48px #020c1dcc, inset 0 1px 0 #b5e5ff16;
}
#automation-attendance-dock .attendance-dock-heading {
  background: linear-gradient(110deg, #173757, #162941);
  border-bottom: 1px solid #4dbde822;
}
#automation-attendance-dock .attendance-card {
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
  background: linear-gradient(125deg, #1b3755, #16263e);
  box-shadow: inset 0 1px 0 #ffffff13, 0 4px 14px #0003;
}
#automation-attendance-dock .attendance-card:hover,
#automation-attendance-dock .attendance-card:focus-within {
  border-color: #76bdf0;
  box-shadow: 0 4px 20px #1b92f82a, inset 0 1px 0 #ffffff22;
}
#automation-attendance-dock .attendance-card.is-success { background: linear-gradient(120deg, #0e443e, #112b38); }
#automation-attendance-dock .attendance-card.is-error { background: linear-gradient(120deg, #502332, #27263f); }
#automation-attendance-dock .attendance-card.is-warning { background: linear-gradient(120deg, #433222, #242d42); }
#automation-attendance-dock .attendance-card-open { min-height: 86px; }
#automation-attendance-dock .attendance-card-copy { flex: 1; gap: 4px; }
#automation-attendance-dock .attendance-card-copy strong {
  font-size: 14px; font-weight: 800; letter-spacing: .015em;
  color: #a8edff; text-shadow: 0 0 14px #38bdf84a;
}
#automation-attendance-dock .is-success .attendance-card-copy strong { color: #c3ffed; }
#automation-attendance-dock .is-error .attendance-card-copy strong { color: #ffd0e2; }
#automation-attendance-dock .attendance-card-status { font-weight: 650; }
#automation-attendance-dock .is-draft .attendance-card-status {
  color: #ff83dd; font-weight: 850; letter-spacing: .035em;
  text-shadow: 0 0 10px #f725b577, 0 0 20px #f725b533;
}
#automation-attendance-dock .attendance-card-close { z-index: 1; }

/* Scoped centered result modal, matches the existing futuristic blue/green UI. */
#automation-attendance-feedback {
  position: fixed; inset: 0; z-index: 1400; display: grid; place-items: center;
  padding: 22px; background: #020a18c7; backdrop-filter: blur(8px);
}
#automation-attendance-feedback .attendance-feedback-panel {
  position: relative; width: min(520px, 100%); max-height: min(750px, 90vh);
  overflow: auto; border: 1px solid #579fe8; border-radius: 22px;
  padding: 30px 27px; color: #eef8ff; text-align: center;
  background: linear-gradient(145deg, #122c50, #0b182b);
  box-shadow: 0 22px 70px #000b, inset 0 1px 0 #ffffff22, 0 0 24px #367df544;
}
#automation-attendance-feedback.is-success .attendance-feedback-panel { border-color: #29c98d; box-shadow: 0 22px 70px #000b, 0 0 27px #23d59f26; }
#automation-attendance-feedback.is-error .attendance-feedback-panel { border-color: #ed6c90; box-shadow: 0 22px 70px #000b, 0 0 27px #f0528730; }
#automation-attendance-feedback .attendance-feedback-close {
  position: absolute; top: 12px; right: 14px; color: #c4d9f0; background: #ffffff13;
  border: 1px solid #ffffff22; border-radius: 9px; cursor: pointer;
  width: 34px; height: 34px; font-size: 23px;
}
#automation-attendance-feedback .attendance-feedback-symbol {
  width: 62px; height: 62px; margin: 0 auto 18px; display: grid; place-items: center;
  border-radius: 18px; font-size: 35px; font-weight: 800;
  background: #16a77d27; border: 1px solid #23d59f; color: #77ffd0;
  box-shadow: 0 0 25px #17b88c35;
}
#automation-attendance-feedback.is-error .attendance-feedback-symbol { background: #ff376b22; border-color: #ec6284; color: #ffacc4; }
#automation-attendance-feedback .attendance-feedback-eyebrow { color: #81c4ff; font-weight: 800; letter-spacing: .11em; }
#automation-attendance-feedback h2 { margin: 9px 0 6px; font-size: clamp(20px, 3vw, 25px); }
#automation-attendance-feedback .attendance-feedback-client { font-size: 12px; color: #bdd7f4; }
#automation-attendance-feedback .attendance-feedback-message { margin: 18px 0; font-size: 14px; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
#automation-attendance-feedback .attendance-feedback-link-label { display: block; text-align: left; font-size: 11px; font-weight: 800; color: #b5dfff; margin-bottom: 5px; }
#automation-attendance-feedback .attendance-feedback-panel input { width: 100%; box-sizing: border-box; padding: 12px; border: 1px solid #5188ac; border-radius: 9px; background: #071a30; color: #dcefff; font-size: 12px; }
#automation-attendance-feedback .attendance-feedback-actions { display: flex; justify-content: center; gap: 9px; flex-wrap: wrap; margin-top: 18px; }
#automation-attendance-feedback .attendance-feedback-actions button { flex: 1 1 135px; border: 1px solid #5f93bf; border-radius: 10px; padding: 12px 14px; background: #173b64; color: #ebf8ff; font-weight: 800; cursor: pointer; }
#automation-attendance-feedback .attendance-feedback-actions button.is-primary { background: linear-gradient(110deg, #279ef0, #71dbff); color: #081a32; border-color: #80d6ff; }
#automation-attendance-feedback .attendance-feedback-actions button:focus-visible { outline: 2px solid white; outline-offset: 2px; }
html[data-app-theme="light"] #automation-attendance-feedback .attendance-feedback-panel { color: #f2f9ff; }
@media (max-width: 600px) { #automation-attendance-feedback .attendance-feedback-panel { padding: 28px 18px; } }
@media (prefers-reduced-motion: reduce) { #automation-attendance-dock .attendance-card { transition: none; } }


/* Formalization / review dialogs: luminous, unmistakable states, fully scoped. */
#automation-attendance-feedback.is-success .attendance-feedback-panel {
  border: 1.5px solid #24ffa8;
  background: radial-gradient(ellipse 95% 64% at 50% -6%, #0d86564d, transparent 78%),
              linear-gradient(145deg, #12352e, #071b1c 88%);
  box-shadow: 0 22px 72px #020b15d9, 0 0 9px #31ffc7b3, 0 0 43px #0aff9666,
              inset 0 1px 0 #b2ffe55a, inset 0 0 32px #13e99012;
}
#automation-attendance-feedback.is-success .attendance-feedback-symbol {
  color: #d3fff0; border-color: #4affbf;
  background: linear-gradient(135deg, #0c8f64b3, #09d08b4d);
  box-shadow: 0 0 16px #21ffb9a8, 0 0 38px #0df09952, inset 0 0 20px #1affaa2a;
  text-shadow: 0 0 13px #84ffe8;
}
#automation-attendance-feedback.is-success .attendance-feedback-eyebrow,
#automation-attendance-feedback.is-success .attendance-feedback-link-label {
  color: #7affd2; text-shadow: 0 0 14px #32edab99;
}
#automation-attendance-feedback.is-success h2 {
  color: #f1fff8; text-shadow: 0 0 18px #27fcb94a;
}
#automation-attendance-feedback.is-success .attendance-feedback-panel input {
  border-color: #38d8ad; background: #061c23;
  box-shadow: inset 0 0 12px #0bd58e1f, 0 0 13px #0caa8852;
}
#automation-attendance-feedback.is-success .attendance-feedback-actions button {
  border-color: #3ee8b8; background: linear-gradient(135deg, #104e4c, #136c65);
  color: #e5fff6; box-shadow: 0 0 14px #06df9470, inset 0 1px 0 #caffdd36;
}
#automation-attendance-feedback.is-success .attendance-feedback-actions button.is-primary {
  border-color: #8affdb; color: #002b25;
  background: linear-gradient(115deg, #13ee9c, #80ffd6);
  box-shadow: 0 0 17px #14ffacb3, 0 0 32px #08fb9269, inset 0 1px 0 #ffffff8a;
}
#automation-attendance-feedback.is-error .attendance-feedback-panel {
  border: 1.5px solid #ff496d;
  background: radial-gradient(ellipse 100% 55% at 50% -5%, #b9234650, transparent 82%),
              linear-gradient(145deg, #351322, #160e21 86%);
  box-shadow: 0 22px 72px #06060edb, 0 0 11px #ff47639c, 0 0 39px #fa244e58,
              inset 0 1px 0 #ffced03b, inset 0 0 34px #ff34501a;
}
#automation-attendance-feedback.is-error .attendance-feedback-symbol {
  border-color: #ff6483; color: #ffe6eb;
  background: linear-gradient(135deg, #e82e5b80, #ff406039);
  box-shadow: 0 0 20px #ff456da1, 0 0 37px #ff2f514a, inset 0 0 18px #ff53622b;
  text-shadow: 0 0 14px #ff92a7;
}
#automation-attendance-feedback.is-error .attendance-feedback-eyebrow {
  color: #ff8297; text-shadow: 0 0 14px #ff496f9c;
}
#automation-attendance-feedback.is-error h2 { color: #fff1f3; text-shadow: 0 0 14px #ff46634d; }
#automation-attendance-feedback.is-error .attendance-feedback-message { color: #ffe1e7; }
#automation-attendance-feedback.is-error .attendance-feedback-actions button {
  background: linear-gradient(130deg, #4b2035, #65263b);
  border-color: #ed6a85; color: #ffebef;
  box-shadow: 0 0 15px #ff45644f, inset 0 1px 0 #ffcfdb30;
}
#automation-attendance-feedback.is-error .attendance-feedback-actions button.is-primary {
  background: linear-gradient(115deg, #f12e57, #ff7f92);
  border-color: #ffa2b3; color: #fff;
  box-shadow: 0 0 19px #ff4069a3, 0 0 31px #ff214e50, inset 0 1px 0 #fffbfb5c;
}
#automation-attendance-feedback .attendance-feedback-actions button:hover {
  filter: brightness(1.13); transform: translateY(-1px);
}
#automation-attendance-feedback .attendance-feedback-actions button:active {
  filter: brightness(.95); transform: translateY(0);
}
#automation-attendance-feedback .attendance-feedback-actions button {
  transition: filter .16s ease, transform .16s ease, box-shadow .16s ease;
}
@media (prefers-reduced-motion: reduce) {
  #automation-attendance-feedback .attendance-feedback-actions button { transition: none; }
}


/* Attendance dock visual polish (2026-10): CSS-only, no JS or bank workflow. */
/* DARK: more luminous completed proposal, glossy copy button. */
html:not([data-app-theme="light"]) #automation-attendance-dock .attendance-card.is-success {
  border: 1px solid #2bf3a1;
  border-left: 4px solid #46ffc0;
  background: radial-gradient(ellipse at 14% 0%, #2dbe8b3f 0%, transparent 70%),
              linear-gradient(145deg, #0d5144 0%, #0c302f 65%, #0b2730 100%);
  box-shadow: 0 0 13px #25ffae6b, 0 0 27px #10e99025,
              inset 0 1px 0 #d7ffed42, inset 0 0 18px #15ef8720;
}
html:not([data-app-theme="light"]) #automation-attendance-dock .attendance-card.is-success:hover,
html:not([data-app-theme="light"]) #automation-attendance-dock .attendance-card.is-success:focus-within {
  border-color: #92ffdb;
  box-shadow: 0 0 17px #25ffb58c, 0 0 31px #15e99a45,
              inset 0 1px 0 #eafff066;
}
html:not([data-app-theme="light"]) #automation-attendance-dock .attendance-card.is-success .attendance-card-copy strong {
  color: #b5ffe4;
  /* Glow follows the glyphs rather than a cropped rectangular text box. */
  line-height: 1.5;
  padding: 4px 5px;
  margin: -4px -5px;
  text-shadow: 0 0 2px #d8fff0c4, 0 0 6px #4affba89, 0 0 9px #15dda536;
}
html:not([data-app-theme="light"]) #automation-attendance-dock .attendance-card.is-success .attendance-card-icon {
  color: #60ffc4;
  text-shadow: 0 0 12px #42f9a8, 0 0 22px #20e39b82;
}
html:not([data-app-theme="light"]) #automation-attendance-dock .attendance-card.is-success .attendance-card-status {
  color: #9afed3;
}
html:not([data-app-theme="light"]) #automation-attendance-dock .attendance-card.is-success .attendance-card-link {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #e9fff5;
  border: 1px solid #5affbe;
  background: linear-gradient(180deg, #43e8a787 0%, #1d996e8f 49%, #106c566b 50%, #18775a 100%);
  box-shadow: inset 0 1px 0 #edfff7a1, inset 0 -1px 0 #0b604a,
              0 0 12px #21fbb16d, 0 4px 17px #00f8a029;
  text-shadow: 0 1px 2px #063e2c;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease;
}
html:not([data-app-theme="light"]) #automation-attendance-dock .attendance-card.is-success .attendance-card-link::before {
  content: "";
  position: absolute;
  inset: 1px 2px 53%;
  border-radius: 4px 4px 55% 55% / 4px 4px 40% 40%;
  background: linear-gradient(180deg, #ffffff66, #d1ffee09);
  pointer-events: none;
  z-index: -1;
}
html:not([data-app-theme="light"]) #automation-attendance-dock .attendance-card.is-success .attendance-card-link::after {
  content: "";
  position: absolute;
  inset: -100% auto -100% -75%;
  width: 45%;
  transform: rotate(23deg);
  background: linear-gradient(90deg, transparent, #ffffff60, transparent);
  pointer-events: none;
  z-index: -1;
  transition: left .65s ease;
}
html:not([data-app-theme="light"]) #automation-attendance-dock .attendance-card.is-success .attendance-card-link:hover {
  transform: translateY(-1px);
  border-color: #aeffe0;
  box-shadow: inset 0 1px 0 #ffffffc7, 0 0 20px #31ffc1b3,
              0 5px 19px #00eda64d;
}
html:not([data-app-theme="light"]) #automation-attendance-dock .attendance-card.is-success .attendance-card-link:hover::after,
html:not([data-app-theme="light"]) #automation-attendance-dock .attendance-card.is-success .attendance-card-link:focus-visible::after {
  left: 155%;
}

/* LIGHT: an independent light palette, including every minimized state. */
html[data-app-theme="light"] #automation-attendance-dock {
  color: #18374c;
  border-color: #a8c8e3;
  background: linear-gradient(155deg, #fafdff 0%, #eaf3ff 100%);
  box-shadow: 0 14px 32px #244a7440, 0 1px 0 #ffffff inset;
}
html[data-app-theme="light"] #automation-attendance-dock .attendance-dock-heading {
  color: #143b5b;
  border-bottom: 1px solid #bbd7ee;
  background: linear-gradient(110deg, #edf7ff, #dcecff);
}
html[data-app-theme="light"] #automation-attendance-dock .attendance-dock-heading b {
  color: #fff;
  background: #3d78ad;
}
html[data-app-theme="light"] #automation-attendance-dock .attendance-dock-heading small {
  color: #365a79;
}
html[data-app-theme="light"] #automation-attendance-dock .attendance-dock-list {
  background: linear-gradient(165deg, #f7fbff, #eaf2fb);
}
html[data-app-theme="light"] #automation-attendance-dock .attendance-card {
  border-color: #b2cfe6;
  border-left: 4px solid #6ca7d5;
  color: #173952;
  background: linear-gradient(125deg, #fff, #e9f3ff);
  box-shadow: inset 0 1px 0 #fff, 0 3px 11px #3759771b;
}
html[data-app-theme="light"] #automation-attendance-dock .attendance-card:hover,
html[data-app-theme="light"] #automation-attendance-dock .attendance-card:focus-within {
  border-color: #5b9bcf;
  box-shadow: 0 4px 15px #3385c22c, inset 0 1px 0 #fff;
}
html[data-app-theme="light"] #automation-attendance-dock .attendance-card.is-active {
  outline-color: #4b93dc;
}
html[data-app-theme="light"] #automation-attendance-dock .attendance-card-copy strong {
  color: #115b8f;
  text-shadow: none;
}
html[data-app-theme="light"] #automation-attendance-dock .attendance-card-copy small,
html[data-app-theme="light"] #automation-attendance-dock .attendance-card-copy > span {
  color: #425f78;
}
html[data-app-theme="light"] #automation-attendance-dock .attendance-card-icon {
  color: #4e87bb;
}
html[data-app-theme="light"] #automation-attendance-dock .attendance-card-close {
  color: #41617a;
}
html[data-app-theme="light"] #automation-attendance-dock .attendance-card-close:hover {
  color: #183d59;
  background: #bfd7ec;
}
html[data-app-theme="light"] #automation-attendance-dock .attendance-card.is-loading .attendance-card-icon {
  border-color: #b4cfe5;
  border-top-color: #347fb3;
}
html[data-app-theme="light"] #automation-attendance-dock .attendance-card.is-draft .attendance-card-status {
  color: #ae087c;
  text-shadow: 0 0 8px #f048ba24;
}
html[data-app-theme="light"] #automation-attendance-dock .attendance-card.is-success {
  border-color: #67c39a;
  border-left-color: #17a875;
  background: linear-gradient(125deg, #f0fff5, #d7f6e7);
  box-shadow: 0 3px 13px #2aa47120, inset 0 1px 0 #fff;
}
html[data-app-theme="light"] #automation-attendance-dock .attendance-card.is-success .attendance-card-copy strong {
  color: #0c7956;
}
html[data-app-theme="light"] #automation-attendance-dock .attendance-card.is-success .attendance-card-icon,
html[data-app-theme="light"] #automation-attendance-dock .attendance-card.is-success .attendance-card-status {
  color: #117957;
}
html[data-app-theme="light"] #automation-attendance-dock .attendance-card.is-error {
  border-color: #e8a8b2;
  border-left-color: #e64c6d;
  background: linear-gradient(125deg, #fff4f6, #ffe1e8);
}
html[data-app-theme="light"] #automation-attendance-dock .attendance-card.is-error .attendance-card-copy strong,
html[data-app-theme="light"] #automation-attendance-dock .attendance-card.is-error .attendance-card-icon,
html[data-app-theme="light"] #automation-attendance-dock .attendance-card.is-error .attendance-card-status {
  color: #ac2946;
}
html[data-app-theme="light"] #automation-attendance-dock .attendance-card.is-warning {
  border-color: #e3bf7e;
  border-left-color: #d99429;
  background: linear-gradient(125deg, #fffaf0, #fff0d6);
}
html[data-app-theme="light"] #automation-attendance-dock .attendance-card.is-warning .attendance-card-icon,
html[data-app-theme="light"] #automation-attendance-dock .attendance-card.is-warning .attendance-card-status {
  color: #926018;
}
html[data-app-theme="light"] #automation-attendance-dock .attendance-card-link {
  color: #145b48;
  border-color: #80caa9;
  background: linear-gradient(180deg, #edfff6, #ccefe0);
  box-shadow: inset 0 1px 0 #fff, 0 2px 7px #28845f20;
}
html[data-app-theme="light"] #automation-attendance-dock .attendance-card-link:hover {
  border-color: #34a679;
  background: linear-gradient(180deg, #deffee, #b7e8d3);
}
html[data-app-theme="light"] #automation-attendance-dock .attendance-card.is-warning .attendance-card-link {
  color: #825312;
  border-color: #dfb778;
  background: #fff2d7;
}
@media (prefers-reduced-motion: reduce) {
  html:not([data-app-theme="light"]) #automation-attendance-dock .attendance-card.is-success .attendance-card-link,
  html:not([data-app-theme="light"]) #automation-attendance-dock .attendance-card.is-success .attendance-card-link::after {
    transition: none;
  }
}


/* Expanded bank proposal: subtle, live Worker progress by the final action. */
/* Visual-only: the bank task and existing disabled submit button are untouched. */
#automation-bank-flow-content .automation-attendance-bank-progress {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 15px;
  min-height: 92px;
  margin: 0 0 12px;
  padding: 16px 18px 21px;
  overflow: hidden;
  border: 1px solid #388cc6;
  border-radius: 15px;
  color: #e4f6ff;
  background: radial-gradient(ellipse at 3% 0%, #36d5ff19 0%, transparent 70%),
              linear-gradient(110deg, #102b4b, #0a2139);
  box-shadow: inset 0 1px 0 #b3efff27, 0 0 16px #1da3e52b;
}
#automation-bank-flow-content .attendance-bank-progress-indicator {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border: 3px solid #3f95ba57;
  border-top-color: #71e4ff;
  border-right-color: #31bfff;
  border-radius: 50%;
  box-shadow: 0 0 15px #28caff54, inset 0 0 8px #28caff23;
  animation: attendance-bank-progress-spin 1.15s linear infinite;
}
#automation-bank-flow-content .attendance-bank-progress-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
  flex: 1;
}
#automation-bank-flow-content .attendance-bank-progress-title {
  font-size: 14px;
  font-weight: 800;
  color: #b2eeff;
  letter-spacing: .015em;
}
#automation-bank-flow-content .attendance-bank-progress-stage {
  font-size: 12px;
  font-weight: 650;
  color: #e0f7ff;
  overflow-wrap: anywhere;
}
#automation-bank-flow-content .attendance-bank-progress-copy small {
  font-size: 11px;
  line-height: 1.35;
  color: #95b9cf;
}
#automation-bank-flow-content .attendance-bank-progress-track {
  position: absolute;
  height: 3px;
  bottom: 0;
  left: 0;
  right: 0;
  overflow: hidden;
  background: #14517b;
}
#automation-bank-flow-content .attendance-bank-progress-track::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -36%;
  width: 36%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, #44cfff, #c1f9ff, transparent);
  box-shadow: 0 0 11px #4bcaff;
  animation: attendance-bank-progress-flow 2.4s ease-in-out infinite;
}
#automation-bank-flow-content .automation-attendance-bank-progress[data-status="confirming"],
#automation-bank-flow-content .automation-attendance-bank-progress[data-status="review"] {
  border-color: #45b99b;
  background: radial-gradient(ellipse at 3% 0%, #35e6b51f 0%, transparent 70%),
              linear-gradient(110deg, #103e3d, #0c2939);
}
#automation-bank-flow-content .automation-attendance-bank-progress[data-status="confirming"] .attendance-bank-progress-indicator,
#automation-bank-flow-content .automation-attendance-bank-progress[data-status="review"] .attendance-bank-progress-indicator {
  border-top-color: #74ffcc;
  border-right-color: #31e7a5;
  box-shadow: 0 0 15px #37e9ad6b;
}
#automation-bank-flow-content .automation-attendance-bank-progress[data-status="confirming"] .attendance-bank-progress-track::after,
#automation-bank-flow-content .automation-attendance-bank-progress[data-status="review"] .attendance-bank-progress-track::after {
  background: linear-gradient(90deg, transparent, #32ebac, #d6ffec, transparent);
  box-shadow: 0 0 11px #32ebac;
}
html[data-app-theme="light"] #automation-bank-flow-content .automation-attendance-bank-progress {
  color: #173d58;
  border-color: #90cbe8;
  background: linear-gradient(110deg, #e9f7ff, #f7fcff);
  box-shadow: inset 0 1px 0 #fff, 0 3px 12px #398cba18;
}
html[data-app-theme="light"] #automation-bank-flow-content .attendance-bank-progress-title {
  color: #176391;
}
html[data-app-theme="light"] #automation-bank-flow-content .attendance-bank-progress-stage {
  color: #274c67;
}
html[data-app-theme="light"] #automation-bank-flow-content .attendance-bank-progress-copy small {
  color: #55748a;
}
html[data-app-theme="light"] #automation-bank-flow-content .automation-attendance-bank-progress[data-status="confirming"],
html[data-app-theme="light"] #automation-bank-flow-content .automation-attendance-bank-progress[data-status="review"] {
  background: linear-gradient(110deg, #e2fff2, #f4fcff);
  border-color: #87d7b6;
}
@keyframes attendance-bank-progress-spin { to { transform: rotate(360deg); } }
@keyframes attendance-bank-progress-flow {
  0% { left: -36%; }
  100% { left: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  #automation-bank-flow-content .attendance-bank-progress-indicator,
  #automation-bank-flow-content .attendance-bank-progress-track::after {
    animation: none;
  }
  #automation-bank-flow-content .attendance-bank-progress-track::after { left: 32%; }
}

/* Scheduled bank checks are waiting for a timer, not continuously using a Worker.
   Keep the state readable in the expanded proposal without a false loading spinner. */
#automation-bank-flow-content .automation-attendance-bank-progress.is-awaiting-recovery .attendance-bank-progress-indicator {
  animation: none;
  border-color: #52c4ad;
  border-top-color: #b2ffe5;
  background: radial-gradient(circle, #52e9b345, transparent 68%);
  box-shadow: 0 0 10px #49e9b55c, inset 0 0 8px #39caa52a;
}
#automation-bank-flow-content .automation-attendance-bank-progress.is-awaiting-recovery .attendance-bank-progress-indicator::after {
  content: "";
  display: block;
  width: 6px;
  height: 6px;
  margin: 9px;
  background: #adffe3;
  border-radius: 50%;
  box-shadow: 0 0 7px #8ef6d6;
}
#automation-bank-flow-content .automation-attendance-bank-progress.is-awaiting-recovery .attendance-bank-progress-track::after {
  animation: none;
  left: 0;
  width: 100%;
  opacity: .34;
}
html[data-app-theme="light"] #automation-bank-flow-content .automation-attendance-bank-progress.is-awaiting-recovery .attendance-bank-progress-indicator {
  border-color: #64bca2;
  border-top-color: #21896f;
  box-shadow: 0 0 9px #26947433;
}

/* Warn clearly when a bounded automatic retry could have created a second
   bank contract, without changing the normal successful link dialog. */
#automation-attendance-feedback .attendance-feedback-duplicate {
  display: grid;
  gap: 5px;
  margin: 0 0 14px;
  padding: 11px 13px;
  border: 1px solid #eeb45a;
  border-radius: 10px;
  text-align: left;
  background: #5e41182b;
  color: #ffe6b0;
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
#automation-attendance-feedback .attendance-feedback-duplicate strong {
  color: #ffce73;
  font-size: 12px;
}
