/* ============================================================
 * agent.css — main agent page (welcome + chat thread)
 * ============================================================ */

/* ===== Page shell ===== */
.ai-agent-page {
  display: flex;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  background: var(--page-bg);
  color: var(--ink-2);
}

/* ===== Sidebar ===== */
.ai-agent-sidebar {
  position: relative;
  flex-shrink: 0;
  width: 280px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(245, 197, 24, 0.15);
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(8px);
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 60px;
  min-height: 60px;
  padding: 15px 12px;
}
.sidebar-brand__logo {
  width: 24px; height: 24px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgb(245, 197, 24), rgb(255, 217, 90));
  color: #fff;
  flex-shrink: 0;
}
.sidebar-brand__text { flex: 1 1 0%; min-width: 0; overflow: hidden; white-space: nowrap; }
.sidebar-brand__name { display: block; font-size: 15px; line-height: 1.5; font-weight: 700; color: var(--ink); }
.sidebar-brand__toggle {
  cursor: pointer; width: 36px; height: 36px; border: none; background: transparent;
  color: rgb(138, 138, 150); border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background-color .2s, color .2s, transform .2s;
}
.sidebar-brand__toggle:hover { background: rgba(245, 197, 24, 0.12); color: rgb(111, 115, 137); }

/* 機構 logo 區塊：置於 sidebar-brand 上方 */
.sidebar-inst-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 96px;
  padding: 12px 16px;
}
.sidebar-inst-logo img {
  height: 96px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}

.sidebar-nav { padding: 4px; display: flex; flex-direction: column; gap: 4px; }
.sidebar-link {
  cursor: pointer; position: relative; width: 100%; border: none; background: transparent;
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  color: var(--ink-2); font-size: 14px; font-family: inherit; text-align: left;
  transition: background-color .2s, color .2s, box-shadow .2s;
}
.sidebar-link:hover { background: rgba(245, 197, 24, 0.16); color: var(--ink); box-shadow: rgba(245, 197, 24, 0.12) 0 10px 20px; }
.sidebar-link__icon { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; flex-shrink: 0; }
.sidebar-link--active { color: var(--ink); font-weight: 600; background: linear-gradient(135deg, rgba(245,197,24,0.18), rgba(255,217,90,0.1)); }
.sidebar-link--active::before { content: ""; position: absolute; left: 0; top: 20%; bottom: 20%; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold); }

.sidebar-history { flex: 1 1 0%; min-height: 0; padding: 6px; overflow: hidden auto; }
.sidebar-history__head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
  font-size: 12px; line-height: 16px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; color: rgb(170, 170, 187); padding: 0 12px;
}
.sidebar-history__head::after { content: ""; order: 2; flex: 1 1 0%; height: 1px; background: rgba(245,197,24,0.18); }
.sidebar-history__clear {
  order: 3; flex: none; border: 0; background: transparent; cursor: pointer; padding: 0;
  font: inherit; font-size: 11px; letter-spacing: 0.05em; color: rgb(139, 139, 164);
  transition: color .2s;
}
.sidebar-history__clear:hover { color: rgb(245, 197, 24); }
.sidebar-history__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.sidebar-history__item {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 12px; border-radius: 8px; cursor: pointer;
  color: rgb(139, 139, 164);
  transition: background-color .2s, color .2s, transform .2s, box-shadow .2s;
}
.sidebar-history__item:hover { background: rgba(245,197,24,0.16); color: var(--ink); box-shadow: rgba(245,197,24,0.12) 0 8px 18px; transform: translateY(-1px); }
.sidebar-history__item--active { background: rgba(245,197,24,0.2); color: var(--ink); }
.sidebar-history__item-title {
  flex: 1 1 0%; font-size: 14px; line-height: 21px; height: 21px;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  display: flex; align-items: center;
}
.history-item-more {
  border: none; background: transparent; color: rgb(160, 160, 175);
  width: 20px; height: 20px; border-radius: 6px; cursor: pointer;
  display: none; align-items: center; justify-content: center; flex-shrink: 0;
}
.sidebar-history__item:hover .history-item-more { display: flex; }
.sidebar-history__empty { padding: 8px 12px; color: rgb(180,180,195); font-size: 13px; }

.sidebar-signin {
  margin-top: auto; padding: 16px 24px 20px; position: sticky; bottom: 0;
  background: linear-gradient(rgba(255,255,255,0.92), rgba(255,255,255,0.98) 60%, rgb(255,255,255));
  border-top: 1px solid rgba(245,197,24,0.12);
}
.signin-btn {
  width: 100%; height: 40px; border-radius: 10px; border: 1px solid rgba(245,197,24,0.45);
  background: transparent; color: rgb(173, 132, 32); font-size: 14px; font-weight: 500;
  font-family: inherit; white-space: nowrap; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s, box-shadow .2s;
}
.signin-btn:hover { background: rgba(245,197,24,0.25); color: rgb(138, 101, 8); border-color: rgba(245,197,24,0.65); transform: translateY(-1px); box-shadow: rgba(245,197,24,0.16) 0 8px 18px; }

/* ===== Main ===== */
.ai-agent-main { flex: 1 1 0%; min-width: 0; display: flex; flex-direction: column; position: relative; height: 100vh; overflow: hidden; }

.topbar {
  position: relative; flex-shrink: 0; z-index: 20; height: 42px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px 0 14px; border-bottom: 1px solid rgba(245,197,24,0.12);
}
.topbar__left { display: flex; align-items: center; gap: 10px; }
.topbar__title { font-size: 15px; color: var(--ink); }
.topbar__actions { display: flex; align-items: center; gap: 20px; }
.lang-trigger {
  display: inline-flex; align-items: center; gap: 6px; color: rgb(90, 90, 102);
  font-weight: 500; cursor: pointer; font-size: 14px; transition: color .2s;
  position: relative;
}
.lang-trigger:hover { color: var(--ink); }
.trigger-arrow { font-size: 14px; color: inherit; display: inline-flex; transition: transform .2s; }
.lang-trigger[aria-expanded="true"] .trigger-arrow { transform: rotate(180deg); }
.lang-dropdown {
  display: none; position: absolute; top: calc(100% + 6px); right: 0;
  background: #fff; border: 1px solid rgba(0,0,0,.1); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12); list-style: none; margin: 0; padding: 4px 0;
  min-width: 130px; z-index: 200;
}
.lang-trigger[aria-expanded="true"] .lang-dropdown { display: block; }
.lang-dropdown__item {
  padding: 8px 16px; font-size: 14px; font-weight: 500; color: rgb(60,60,75);
  cursor: pointer; white-space: nowrap; transition: background .15s;
}
.lang-dropdown__item:hover { background: rgba(0,0,0,.05); }
.lang-dropdown__item--active { color: var(--brand, #f5c518); font-weight: 700; }
.topbar-signin {
  height: 32px; padding: 0 14px; border-radius: 10px;
  border: 1px solid rgba(245,197,24,0.45); background: rgba(255,239,190,0.28);
  color: rgb(138, 101, 8); font-size: 14px; font-weight: 600; font-family: inherit;
  cursor: pointer; text-decoration: none; display: inline-flex; align-items: center;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s, box-shadow .2s;
}
.topbar-signin:hover { background: rgba(255,239,190,0.45); color: rgb(111, 82, 6); border-color: rgba(245,197,24,0.65); transform: translateY(-1px); }

/* background blobs */
.workspace-background { position: absolute; inset: 42px 0 0 0; overflow: hidden; pointer-events: none; z-index: 0; }
.workspace-background__blob { position: absolute; border-radius: 50%; filter: blur(64px); opacity: 0.85; mix-blend-mode: screen; animation: blobFloat 14s ease-in-out infinite alternate; }
.workspace-background__blob--gold { top: 6%; left: 12%; width: 300px; height: 300px; background: radial-gradient(circle, rgba(255,183,58,0.9), rgba(255,183,58,0.4) 52%, rgba(255,183,58,0) 78%); }
.workspace-background__blob--blue { top: 12%; right: 14%; width: 360px; height: 360px; background: radial-gradient(circle, rgba(107,179,255,0.85), rgba(107,179,255,0.36) 54%, rgba(107,179,255,0) 78%); animation-delay: -4s; }
.workspace-background__blob--peach { top: 36%; left: 26%; width: 280px; height: 280px; background: radial-gradient(circle, rgba(255,183,120,0.78), rgba(255,183,120,0.32) 50%, rgba(255,183,120,0) 78%); animation-delay: -6s; }
.workspace-background__blob--lavender { right: 20%; bottom: 10%; width: 340px; height: 340px; background: radial-gradient(circle, rgba(153,201,255,0.78), rgba(153,201,255,0.32) 48%, rgba(153,201,255,0) 76%); animation-delay: -8s; }
@keyframes blobFloat {
  0% { transform: translateZ(0) scale(1); opacity: .46; }
  33% { transform: translate3d(40px,-26px,0) scale(1.08); opacity: .64; }
  66% { transform: translate3d(-32px,32px,0) scale(.9); opacity: .52; }
  100% { transform: translate3d(26px,16px,0) scale(1.12); opacity: .68; }
}

.scroll-area { flex: 1 1 0%; overflow-y: auto; position: relative; display: flex; flex-direction: column; }
.workspace { position: relative; z-index: 1; flex: 1 1 0%; width: min(980px, 100% - 60px); margin: 0 auto; padding: 60px 0 56px; display: flex; flex-direction: column; }

/* hero */
.hero { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 50px; }
.hero__mascot { width: 95px; height: auto; object-fit: contain; animation: floatGently 3s ease-in-out .5s infinite; }
.hero__mascot:hover { animation: none; }
@keyframes floatGently { 0% { transform: translateY(0); } 50% { transform: translateY(-10px); } 100% { transform: translateY(0); } }
.hero__content { max-width: 640px; }
.hero__title { margin: 0; color: rgb(47, 43, 66); font-family: Georgia, "Times New Roman", serif; font-size: 26px; line-height: 1.25; font-weight: 700; white-space: pre-line; }
.hero__desc { margin: 12px 0 0; color: var(--muted); font-size: 14px; line-height: 1.35; }

/* composer */
.composer {
  position: relative; z-index: 1; width: min(100%, 800px); margin: 0 auto;
  border-radius: 16px; background: #fff; border: 1px solid rgba(31,41,55,0.08);
  box-shadow: rgba(35,35,52,0.08) 0 18px 40px; overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.composer:focus-within { border-color: rgba(245,197,24,0.5); box-shadow: rgba(245,197,24,0.18) 0 0 0 1px, rgba(35,35,52,0.06) 0 10px 24px; }
.composer__input {
  display: block; width: 100%; min-height: 128px; max-height: 240px; padding: 12px 16px;
  border: none; background: transparent; resize: none; outline: none;
  color: var(--ink-2); font-size: 16px; line-height: 1.6; font-family: inherit;
}
.composer__input::placeholder { color: rgb(177, 173, 185); }
.composer-toolbar-inner { display: flex; align-items: center; justify-content: flex-end; padding: 4px 12px 14px 4px; }
.composer-actions { display: flex; align-items: center; gap: 12px; }
.mode-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px;
  border-radius: 12px; border: 1px solid rgb(245, 216, 108); background: rgb(255, 250, 240);
  color: rgb(138, 101, 8); font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s, box-shadow .2s;
}
.mode-btn:hover { background: rgb(255, 243, 196); color: rgb(117, 82, 6); border-color: var(--gold); transform: translateY(-1px); box-shadow: rgba(245,197,24,0.16) 0 8px 16px; }
.mode-btn__chevron { font-size: 11px; color: inherit; line-height: 1; display: inline-flex; }
.send-btn {
  width: 52px; height: 36px; border: none; margin-left: 0; border-radius: 12px;
  background: linear-gradient(135deg, rgb(251,226,138), rgb(245,197,24)); color: #000;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: rgba(245,197,24,0.18) 0 10px 20px; cursor: pointer;
  transition: transform .2s, box-shadow .2s, opacity .2s;
}
.send-btn:hover { transform: translateY(-1px); box-shadow: rgba(245,197,24,0.22) 0 14px 26px; }
.send-btn--disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; transform: none; }
.send-btn--disabled:hover { transform: none; box-shadow: none; }

/* suggestions */
.suggestions { width: min(100%, 800px); margin: 24px auto 40px; }
.suggestions__viewport { position: relative; display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
.suggestions__row {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, rgba(0,0,0,.92) 48px, #000 calc(100% - 48px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, rgba(0,0,0,.92) 48px, #000 calc(100% - 48px), transparent 100%);
}
.suggestions__track { width: max-content; display: flex; align-items: center; gap: 8px; }
.suggestions__row--left .suggestions__track { animation: marqueeLeft 60s linear infinite; }
.suggestions__row--right .suggestions__track { animation: marqueeRight 60s linear infinite; }
.suggestions__row:hover .suggestions__track { animation-play-state: paused; }
@keyframes marqueeLeft { 0% { transform: translateX(0); } 100% { transform: translateX(calc(-50% - 4px)); } }
@keyframes marqueeRight { 0% { transform: translateX(calc(-50% - 4px)); } 100% { transform: translateX(0); } }
.chip {
  min-height: 30px; padding: 6px 14px; border-radius: 999px;
  border: 1px solid rgba(245,197,24,0.55); background: rgb(254,254,254);
  color: var(--ink-2); font-size: 12px; font-family: inherit; white-space: nowrap; flex-shrink: 0; cursor: pointer;
  transition: transform .2s, background-color .2s, box-shadow .2s;
}
.chip:hover { transform: scale(1.04); background: rgb(255, 248, 223); box-shadow: var(--gold) 0 0 0 1px inset, rgba(245,197,24,0.16) 0 8px 18px; }

/* tips */
.tips { position: relative; z-index: 1; width: min(100%, 800px); margin: 0 auto; }
.tips__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.tips__title-wrap { display: inline-flex; align-items: center; gap: 8px; }
.tips__title { margin: 0; color: var(--ink-2); font-size: 24px; line-height: 1.2; font-weight: 700; }
.tips__more { border: none; background: transparent; display: inline-flex; align-items: center; gap: 6px; color: rgb(213, 154, 6); font-size: 14px; font-family: inherit; cursor: pointer; }
.tips__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tip-card {
  cursor: pointer; overflow: hidden; border-radius: 12px; background: rgb(254,254,254);
  border: 1px solid rgba(255,255,255,0.42); backdrop-filter: blur(18px) saturate(135%);
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.tip-card:hover { transform: translateY(-2px) scale(1.01); border-color: rgba(245,197,24,0.35); box-shadow: rgba(35,35,52,0.14) 0 18px 32px; }
.tip-card__media { position: relative; height: 118px; overflow: hidden; }
.tip-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tip-card__badge {
  position: absolute; top: 6px; left: 6px; min-width: 38px; height: 18px; padding: 0 6px;
  border-radius: 4px; background: var(--gold); color: rgb(31,41,55);
  font-size: 12px; font-weight: 600; line-height: 18px; text-align: center;
}
.tip-card__badge--article { background: rgb(43,140,196); color: #fff; }
.tip-card__play {
  position: absolute; inset: 50% auto auto 50%; transform: translate(-50%,-50%);
  width: 32px; height: 32px; border: none; border-radius: 50%;
  background: rgba(255,255,255,0.92); color: var(--ink-2);
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .2s, box-shadow .2s;
}
.tip-card:hover .tip-card__play { transform: translate(-50%,-50%) scale(1.08); box-shadow: rgba(0,0,0,0.16) 0 12px 24px; }
.tip-card__body { padding: 10px 10px 12px; }
.tip-card__title { margin: 0; color: var(--ink-2); font-size: 16px; line-height: 1.35; font-weight: 700; }
.tip-card__desc { margin: 8px 0 0; color: rgb(155,149,169); font-size: 13px; line-height: 1.45; }

/* ============================================================
 * Chat thread (shown once a conversation starts)
 * ============================================================ */
.chat-thread {
  position: relative; z-index: 1;
  width: min(100%, 800px); margin: 0 auto;
  flex: 1 1 0%;
  display: flex; flex-direction: column; gap: 22px;
  padding-bottom: 8px;
}
.msg { display: flex; gap: 12px; align-items: flex-start; }
.msg--user { flex-direction: row-reverse; }
.msg__avatar {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.msg__avatar--bot { background: rgba(245,197,24,0.14); }
.msg__avatar--bot img, .msg__avatar--bot video { width: 32px; height: 32px; object-fit: contain; }
.msg__avatar--user { background: linear-gradient(135deg, rgb(245,197,24), rgb(255,217,90)); color: #fff; }
.msg__bubble {
  max-width: 80%; padding: 12px 16px; border-radius: 14px;
  font-size: 15px; line-height: 1.6; white-space: pre-wrap; word-break: break-word;
}
.msg--bot .msg__bubble {
  background: #fff; border: 1px solid rgba(31,41,55,0.08);
  box-shadow: rgba(35,35,52,0.05) 0 8px 22px; color: var(--ink-2);
  border-top-left-radius: 4px;
}
.msg--user .msg__bubble {
  background: linear-gradient(135deg, rgba(255,243,196,0.95), rgba(255,236,170,0.95));
  border: 1px solid rgba(245,197,24,0.4); color: rgb(70,56,12);
  border-top-right-radius: 4px;
}
/* rendered markdown / HTML bot replies */
.msg__bubble--rich { white-space: normal; }
.msg__bubble--rich > :first-child { margin-top: 0; }
.msg__bubble--rich > :last-child { margin-bottom: 0; }
.msg__bubble--rich p { margin: 0 0 10px; }
.msg__bubble--rich h1,
.msg__bubble--rich h2,
.msg__bubble--rich h3 { margin: 16px 0 8px; line-height: 1.3; font-weight: 600; }
.msg__bubble--rich h1 { font-size: 1.35em; }
.msg__bubble--rich h2 { font-size: 1.2em; }
.msg__bubble--rich h3 { font-size: 1.05em; }
.msg__bubble--rich ul,
.msg__bubble--rich ol { margin: 0 0 10px; padding-left: 1.4em; }
.msg__bubble--rich li { margin: 2px 0; }
.msg__bubble--rich a { color: #2563eb; text-decoration: underline; }
.msg__bubble--rich code {
  background: rgba(31,41,55,0.06); padding: 1px 5px; border-radius: 4px;
  font-size: 0.9em; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.msg__bubble--rich pre {
  background: rgba(31,41,55,0.06); padding: 12px 14px; border-radius: 8px;
  overflow-x: auto; margin: 0 0 10px;
}
.msg__bubble--rich pre code { background: none; padding: 0; }
.msg__bubble--rich hr { border: none; border-top: 1px solid rgba(31,41,55,0.12); margin: 16px 0; }
.msg__bubble--rich img { max-width: 100%; height: auto; }
.msg__bubble--rich table { max-width: 100%; }
/* 書卡內容較寬，放寬含表格的氣泡寬度以完整顯示 */
.msg--bot:has(.msg__bubble--rich table) .msg__bubble { max-width: 100%; }

/* typing dots */
.typing { display: inline-flex; gap: 5px; align-items: center; padding: 4px 2px; }
.typing span {
  width: 7px; height: 7px; border-radius: 50%; background: rgba(245,197,24,0.85);
  animation: typingBounce 1.2s ease-in-out infinite;
}
.typing--inline { margin-left: 6px; vertical-align: middle; padding: 0; }
.typing span:nth-child(2) { animation-delay: .18s; }
.typing span:nth-child(3) { animation-delay: .36s; }
@keyframes typingBounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }

/* composer pinned to bottom while in conversation */
.composer-dock {
  flex-shrink: 0;
  position: relative; z-index: 5;
  padding: 8px 0 18px;
  background: linear-gradient(rgba(247,246,242,0), rgba(247,246,242,0.92) 38%, var(--page-bg));
}
.composer-dock .composer { width: min(800px, 100% - 60px); margin: 0 auto; }
.composer--docked { box-shadow: rgba(35,35,52,0.1) 0 8px 28px; }
.composer--docked .composer__input { min-height: 56px; }

.is-hidden { display: none !important; }

@media (max-width: 1100px) {
  .workspace { width: calc(100% - 40px); }
  .tips__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .ai-agent-sidebar { display: none; }
  .msg__bubble { max-width: 88%; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__mascot, .workspace-background__blob, .suggestions__track { animation: none; }
}

/* ── Credentials Modal ─────────────────────────────────────────────────── */
.creds-modal {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}
.creds-modal[hidden] { display: none !important; }
.creds-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(2px);
}
.creds-modal__box {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 32px 28px 24px;
  width: min(380px, 92vw);
  box-shadow: 0 24px 60px rgba(0,0,0,.18);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.creds-modal__hint {
  margin: 0 0 4px;
  font-size: .9rem;
  color: #555;
  text-align: center;
}
.creds-modal__input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  border: 1.5px solid #d0cfc9;
  border-radius: 8px;
  font-size: .95rem;
  outline: none;
  transition: border-color .15s;
}
.creds-modal__input:focus { border-color: #7b6ef6; }
.creds-modal__input:disabled { background: #f5f4f1; color: #999; }
.creds-modal__error {
  margin: 0;
  font-size: .82rem;
  color: #d23f3f;
  text-align: center;
}
.creds-modal__error[hidden] { display: none; }
.creds-modal__actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}
.creds-modal__btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 8px;
  font-size: .9rem;
  cursor: pointer;
  transition: opacity .15s;
}
.creds-modal__btn:hover { opacity: .85; }
.creds-modal__btn:disabled { opacity: .5; cursor: default; }
.creds-modal__btn--cancel {
  background: #f0eeea;
  color: #444;
}
.creds-modal__btn--submit {
  background: #7b6ef6;
  color: #fff;
  font-weight: 600;
}
