:root {
  --bg: #f4f5f2;
  --panel: #ffffff;
  --line: #deded7;
  --text: #191919;
  --muted: #656860;
  --accent: #007f68;
  --accent-strong: #006553;
  --danger: #b42318;
  --warning: #946200;
  --radius: 8px;
  --sidebar-width: 286px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: Arial, "Noto Sans TC", sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

.login-page {
  background: radial-gradient(circle at center, #333 0, #111 46%, #050505 100%);
}

/* Visual style adapted from Uiverse.io by glisovic01 */
.login-box {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(400px, calc(100vw - 32px));
  padding: 40px;
  margin: 20px auto;
  transform: translate(-50%, -55%);
  background: rgba(0, 0, 0, .9);
  box-sizing: border-box;
  box-shadow: 0 15px 25px rgba(0, 0, 0, .6);
  border-radius: 10px;
}

.login-box > p:first-child {
  margin: 0 0 30px;
  padding: 0;
  color: #fff;
  text-align: center;
  font-size: 1.5rem;
  font-weight: bold;
  letter-spacing: 1px;
}

.login-box .user-box {
  position: relative;
}

.login-box .user-box input {
  width: 100%;
  padding: 10px 0;
  font-size: 16px;
  color: #fff;
  margin-bottom: 30px;
  border: none;
  border-bottom: 1px solid #fff;
  outline: none;
  background: transparent;
}

.login-box .user-box label {
  position: absolute;
  top: 0;
  left: 0;
  padding: 10px 0;
  font-size: 16px;
  color: #fff;
  pointer-events: none;
  transition: .5s;
}

.login-box .user-box input:focus ~ label,
.login-box .user-box input:valid ~ label {
  top: -20px;
  left: 0;
  color: #fff;
  font-size: 12px;
}

.login-box form button {
  position: relative;
  display: inline-block;
  padding: 10px 20px;
  margin-top: 40px;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: bold;
  color: #fff;
  font-size: 16px;
  text-decoration: none;
  text-transform: uppercase;
  overflow: hidden;
  transition: .5s;
  letter-spacing: 3px;
  cursor: pointer;
}

.login-box form button:hover,
.login-box form button:focus-visible {
  background: #fff;
  color: #272727;
  border-radius: 5px;
  outline: none;
}

.login-box form button span {
  position: absolute;
  display: block;
}

.login-box form button span:nth-child(1) {
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #fff);
  animation: btn-anim1 1.5s linear infinite;
}

@keyframes btn-anim1 {
  0% { left: -100%; }
  50%, 100% { left: 100%; }
}

.login-box form button span:nth-child(2) {
  top: -100%;
  right: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(180deg, transparent, #fff);
  animation: btn-anim2 1.5s linear infinite;
  animation-delay: .375s;
}

@keyframes btn-anim2 {
  0% { top: -100%; }
  50%, 100% { top: 100%; }
}

.login-box form button span:nth-child(3) {
  bottom: 0;
  right: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(270deg, transparent, #fff);
  animation: btn-anim3 1.5s linear infinite;
  animation-delay: .75s;
}

@keyframes btn-anim3 {
  0% { right: -100%; }
  50%, 100% { right: 100%; }
}

.login-box form button span:nth-child(4) {
  bottom: -100%;
  left: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(360deg, transparent, #fff);
  animation: btn-anim4 1.5s linear infinite;
  animation-delay: 1.125s;
}

@keyframes btn-anim4 {
  0% { bottom: -100%; }
  50%, 100% { bottom: 100%; }
}

.login-box .login-error {
  margin: -10px 0 0;
  color: #ffb4b4;
  font-size: 14px;
}

.dashboard-page {
  background: var(--bg);
}

.top-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 72px;
  padding: 10px 24px;
  border-bottom: 1px solid #202020;
  background: #050505;
  color: #f7f7f7;
  backdrop-filter: blur(8px);
}

.sidebar-toggle {
  position: fixed;
  top: 18px;
  left: 24px;
  z-index: 40;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 36px;
  border: 0;
  border-radius: 6px;
  padding: 0;
  background: transparent;
  cursor: pointer;
  transition: transform .24s ease, background .2s ease, box-shadow .2s ease;
}

.sidebar-toggle:hover,
.sidebar-toggle:focus-visible {
  background: #1f1f1f;
  outline: none;
}

.sidebar-toggle span {
  display: block;
  width: 23px;
  height: 2px;
  border-radius: 999px;
  background: #f7f7f7;
  transition: transform .24s ease, opacity .18s ease;
}

.dashboard-page.sidebar-open .sidebar-toggle {
  transform: translateX(var(--sidebar-width));
  background: #0f0f0f;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .28);
}

.dashboard-page.sidebar-open .sidebar-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.dashboard-page.sidebar-open .sidebar-toggle span:nth-child(2) {
  opacity: 0;
  transform: translateX(-6px);
}

.dashboard-page.sidebar-open .sidebar-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.top-bar-side {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-bar-user {
  position: absolute;
  top: 50%;
  right: 5%;
  transform: translateY(-50%);
  justify-content: flex-end;
  color: #f7f7f7;
}

.logo-link {
  position: absolute;
  left: 88px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dashboard-sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  width: var(--sidebar-width);
  border-right: 1px solid #202020;
  background: #050505;
  box-shadow: 18px 0 48px rgba(0, 0, 0, .24);
  transform: translateX(-100%);
  transition: transform .24s ease;
  padding: 88px 16px 20px;
  overflow-y: auto;
}

.dashboard-page.sidebar-open .dashboard-sidebar {
  transform: translateX(0);
}

.sidebar-profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 1px solid #242424;
  border-radius: 10px;
  margin-bottom: 14px;
  padding: 12px;
  color: #f7f7f7;
  background: #101010;
  text-align: left;
  cursor: pointer;
}

.sidebar-profile-card:hover,
.sidebar-profile-card:focus-visible,
.sidebar-profile-card.is-active {
  border-color: #8f5d24;
  outline: none;
  background: #1b1510;
}

.profile-avatar {
  position: relative;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  color: #fff4d3;
  background: linear-gradient(145deg, #8f5d24, #3f2917);
  font-weight: 800;
  text-transform: uppercase;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-profile-avatar {
  width: 54px;
  height: 54px;
  border: 2px solid #a67939;
  font-size: 1.35rem;
}

.sidebar-profile-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.sidebar-profile-copy strong,
.sidebar-profile-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-profile-copy small {
  color: #b8a481;
  font-size: .75rem;
}

.sidebar-nav {
  display: grid;
  gap: 6px;
}

.sidebar-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  padding: 10px 12px;
  background: transparent;
  color: #f7f7f7;
  font-size: .95rem;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.sidebar-nav-icon {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(214, 161, 75, .34));
}

.sidebar-profile-icon {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.sidebar-nav-link span {
  min-width: 0;
}

.sidebar-nav-text {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-pending-badge {
  flex: 0 0 auto;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  padding: 0 6px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: var(--danger);
  font-size: .74rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 0 10px rgba(180, 35, 24, .42);
}

.sidebar-pending-badge[hidden] {
  display: none;
}

.sidebar-nav-link:hover,
.sidebar-nav-link:focus-visible,
.sidebar-nav-link.is-active {
  background: #1f1f1f;
  outline: none;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 25;
  border: 0;
  padding: 0;
  background: rgba(0, 0, 0, .22);
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s ease;
}

.dashboard-page.sidebar-open .sidebar-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.reward-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  border: 0;
  padding: 24px;
  background: rgba(0, 0, 0, .97);
  color: #f4d99a;
  cursor: pointer;
}

.reward-overlay[hidden] {
  display: none;
}

.reward-popup {
  display: grid;
  justify-items: center;
  gap: 18px;
  max-width: min(420px, calc(100vw - 40px));
  animation: reward-pop .26s ease-out;
}

.reward-popup-icon {
  display: block;
  width: min(190px, 48vw);
  max-height: 220px;
  object-fit: contain;
  filter:
    drop-shadow(0 0 16px rgba(214, 161, 75, .54))
    drop-shadow(0 16px 24px rgba(0, 0, 0, .7));
}

.reward-overlay[data-variant="redemption-success"] .reward-popup-icon {
  width: min(280px, 66vw);
  max-height: min(320px, 48vh);
}

.reward-overlay[data-variant="no-money"] .reward-popup-icon {
  width: min(240px, 62vw);
  max-height: min(280px, 42vh);
}

.reward-popup-message {
  min-width: min(280px, calc(100vw - 56px));
  border: 1px solid rgba(214, 161, 75, .82);
  border-radius: var(--radius);
  padding: 12px 22px;
  background:
    linear-gradient(180deg, rgba(54, 38, 23, .96), rgba(18, 12, 8, .98)),
    #140f0b;
  box-shadow:
    inset 0 1px 0 rgba(255, 236, 182, .14),
    0 0 32px rgba(214, 161, 75, .22);
  font-size: 1.28rem;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  white-space: pre-line;
  text-shadow: 0 1px 0 #000, 0 0 12px rgba(214, 161, 75, .38);
}

@keyframes reward-pop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(.94);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.top-logo {
  display: block;
  width: 200px;
  height: auto;
  max-height: 98px;
  object-fit: contain;
}

.top-bar .ghost-button {
  border-color: #f7f7f7;
  color: #f7f7f7;
}

.top-bar .ghost-button:hover,
.top-bar .ghost-button:focus-visible {
  background: #1f1f1f;
}

.board-shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 18px 24px 32px;
}

.utility-panel {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 22px 24px 36px;
}

.utility-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.utility-header h1 {
  margin: 0;
  font-size: 1.25rem;
}

.currency-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--text);
  background: var(--panel);
  font-weight: 700;
}

.currency-pill img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.utility-tabs {
  display: inline-flex;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px;
  background: var(--panel);
}

.utility-tab {
  border: 0;
  border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
  color: var(--muted);
  background: transparent;
}

.utility-tab:hover,
.utility-tab:focus-visible,
.utility-tab.is-active {
  color: #080604;
  background: var(--accent);
  outline: none;
}

.profile-panel {
  max-width: 920px;
}

.profile-editor {
  display: grid;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  background: var(--panel);
}

.profile-editor-summary {
  display: flex;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.profile-editor-avatar {
  width: 104px;
  height: 104px;
  border: 3px solid #a67939;
  font-size: 2.5rem;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .32);
}

.profile-editor-summary h2,
.profile-section-heading h2 {
  margin: 0;
}

.profile-editor-summary p,
.profile-section-heading p {
  margin: 5px 0 0;
  color: var(--muted);
}

.profile-editor-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.profile-editor-fields label {
  display: grid;
  align-content: start;
  gap: 7px;
  color: var(--muted);
}

.profile-editor-fields label:nth-child(2) {
  grid-column: 1 / -1;
  grid-row: 2;
}

.profile-editor-fields small {
  font-weight: 400;
}

.profile-editor-fields input,
.profile-editor-fields textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: var(--text);
  background: rgba(10, 8, 6, .72);
  resize: vertical;
}

.profile-editor-fields input[readonly] {
  color: #9d927d;
  cursor: default;
}

.profile-editor-fields input:focus,
.profile-editor-fields textarea:focus {
  border-color: #d6a14b;
  outline: 2px solid rgba(214, 161, 75, .22);
}

.profile-avatar-editor {
  display: grid;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.profile-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.profile-upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid #a67939;
  border-radius: var(--radius);
  padding: 8px 14px;
  color: #e5c886;
  background: rgba(12, 8, 5, .42);
  cursor: pointer;
}

.profile-upload-button:hover,
.profile-upload-button:focus-within {
  background: rgba(98, 62, 29, .42);
}

.profile-upload-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}

.profile-avatar-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 10px;
}

.profile-avatar-option {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 126px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 8px;
  color: var(--muted);
  background: rgba(10, 8, 6, .5);
  cursor: pointer;
}

.profile-avatar-option:hover,
.profile-avatar-option:focus-visible,
.profile-avatar-option.is-selected {
  border-color: #d6a14b;
  color: #f4d99a;
  outline: none;
  box-shadow: 0 0 0 2px rgba(214, 161, 75, .16);
}

.option-avatar {
  width: 72px;
  height: 72px;
  border: 2px solid rgba(214, 161, 75, .66);
  font-size: 1.7rem;
}

.profile-avatar-option > span:last-child {
  width: 100%;
  overflow: hidden;
  font-size: .82rem;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-editor-actions {
  display: flex;
  position: sticky;
  bottom: 0;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  background: var(--panel);
}

.profile-editor-actions[hidden] {
  display: none;
}

.profile-save-status {
  margin: 0;
  color: #9fcd82;
  text-align: right;
}

.prize-shop {
  margin-top: 14px;
}

.prize-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.prize-card {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 14px;
  min-height: 180px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--panel);
}

.sidebar-toggle-new-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  z-index: 1;
  min-width: 20px;
  height: 20px;
  border: 2px solid #050505;
  border-radius: 999px;
  padding: 0 5px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: var(--danger);
  box-shadow: 0 0 10px rgba(180, 35, 24, .42);
  font-size: .72rem;
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
}

.sidebar-toggle-new-badge[hidden] {
  display: none;
}

.prize-manage-card,
.prize-add-card {
  width: 100%;
  appearance: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.prize-manage-card:hover,
.prize-manage-card:focus-visible,
.prize-add-card:hover,
.prize-add-card:focus-visible {
  border-color: var(--accent-strong);
  outline: none;
  transform: translateY(-2px);
}

.prize-manage-card.is-inactive {
  opacity: .66;
}

.prize-image-wrap {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 156px;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(0, 0, 0, .1);
}

.prize-state-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 999px;
  padding: 3px 8px;
  color: #fff;
  background: rgba(91, 25, 19, .88);
  font-size: .76rem;
  font-weight: 700;
}

.prize-image {
  width: 100%;
  max-height: 156px;
  object-fit: contain;
}

.prize-info {
  display: grid;
  align-content: space-between;
  gap: 12px;
  min-width: 0;
}

.prize-info h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.prize-cost {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--text);
  background: rgba(255, 255, 255, .72);
  font-weight: 700;
}

.prize-cost img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.prize-edit-hint {
  color: var(--muted);
  font-size: .82rem;
}

.prize-add-card {
  grid-template-columns: 1fr;
  place-items: center;
  align-content: center;
  gap: 12px;
  text-align: center;
  border-style: dashed;
  background: rgba(255, 255, 255, .025);
}

.prize-add-card strong {
  color: var(--muted);
  letter-spacing: .08em;
}

.prize-add-symbol {
  position: relative;
  display: block;
  width: 70px;
  height: 70px;
  border: 2px solid rgba(214, 161, 75, .38);
  border-radius: 50%;
  background: rgba(214, 161, 75, .06);
}

.prize-add-symbol::before,
.prize-add-symbol::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28px;
  height: 3px;
  border-radius: 3px;
  background: rgba(237, 199, 119, .58);
  transform: translate(-50%, -50%);
}

.prize-add-symbol::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.redemption-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.redemption-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--panel);
}

.redemption-row.is-history {
  grid-template-columns: 54px minmax(0, 1fr);
}

.redemption-icon {
  width: 54px;
  height: 54px;
  object-fit: contain;
  border-radius: 6px;
  background: rgba(0, 0, 0, .12);
}

.redemption-main {
  min-width: 0;
}

.redemption-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 4px;
}

.redemption-title strong {
  overflow-wrap: anywhere;
}

.redemption-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  color: var(--muted);
  font-size: .86rem;
}

.empty-state {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  color: var(--muted);
  background: var(--panel);
}

#confirm-message {
  white-space: pre-line;
}

.performance-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 14px;
  height: calc(100vh - 150px);
  min-height: 420px;
  overflow: hidden;
}

.performance-layout.is-single {
  grid-template-columns: minmax(0, 1fr);
}

.employee-list-panel,
.performance-detail,
.review-list {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fdfdfb;
}

.employee-list-panel,
.performance-detail {
  min-height: 0;
  overflow: hidden;
}

.employee-list {
  display: grid;
  align-content: start;
  gap: 6px;
  height: 100%;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px;
}

.employee-list button,
.review-actions button {
  width: 100%;
}

.employee-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 7px 10px;
  background: transparent;
  color: var(--text);
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
}

.employee-list button strong,
.employee-list button small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-list button small {
  color: var(--muted);
  font-size: .78rem;
}

.employee-list button:hover,
.employee-list button:focus-visible,
.employee-list button.is-active {
  border-color: var(--line);
  background: #eef5f1;
  outline: none;
}

.performance-detail {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
  overflow: hidden;
  padding: 14px;
}

.performance-overview {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.performance-history-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  min-height: 0;
  overflow: hidden;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.performance-history-panel::before {
  content: "過往結算任務";
  color: var(--muted);
  font-size: .86rem;
  font-weight: 700;
}

.performance-history-scroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.metric-box,
.history-row,
.review-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.metric-box {
  padding: 12px;
}

.metric-box span {
  display: block;
  color: var(--muted);
  font-size: .82rem;
}

.metric-box .metric-label {
  display: flex;
  align-items: center;
  gap: 7px;
}

.metric-box.is-currency .metric-label::before {
  content: "";
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  background: url("../images/currency_icon.9b8c54d8ea19.png") center / contain no-repeat;
  filter: drop-shadow(0 0 7px rgba(214, 161, 75, .42));
}

.metric-box strong {
  display: block;
  margin-top: 5px;
  font-size: 1.25rem;
}

.status-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.history-list {
  display: grid;
  gap: 8px;
  margin-top: 0;
}

.history-row,
.review-card {
  padding: 12px;
}

.history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.history-row-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.history-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid rgba(130, 95, 48, .8);
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(30, 22, 15, .74);
  color: #ead7ad;
  font-size: .76rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.history-status-badge.is-positive {
  border-color: rgba(104, 181, 96, .78);
  background: linear-gradient(180deg, rgba(59, 112, 58, .26), rgba(19, 45, 29, .42));
  color: #a9ef9f;
  box-shadow: 0 0 10px rgba(104, 181, 96, .2);
  text-shadow: 0 0 8px rgba(120, 224, 111, .42);
}

.history-status-badge.is-negative {
  border-color: rgba(198, 72, 56, .84);
  background: linear-gradient(180deg, rgba(125, 39, 31, .3), rgba(52, 16, 13, .5));
  color: #ff9d90;
  box-shadow: 0 0 10px rgba(198, 72, 56, .24);
  text-shadow: 0 0 8px rgba(255, 118, 100, .42);
}

.history-status-badge.is-pending,
.history-status-badge.is-neutral {
  border-color: rgba(214, 161, 75, .72);
  background: linear-gradient(180deg, rgba(112, 78, 30, .28), rgba(45, 31, 14, .46));
  color: #f4d99a;
  box-shadow: 0 0 10px rgba(214, 161, 75, .18);
  text-shadow: 0 0 8px rgba(214, 161, 75, .28);
}

.history-row small,
.review-card small {
  color: var(--muted);
}

.review-list {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.review-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.review-card dl {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 6px 10px;
  margin: 0;
}

.review-card dt {
  color: var(--muted);
}

.review-card dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.review-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.board-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.toolbar-button,
.ghost-button {
  min-height: 38px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 8px 14px;
  cursor: pointer;
}

.toolbar-button {
  background: var(--accent);
  color: #fff;
}

.toolbar-button:hover,
.toolbar-button:focus-visible {
  background: var(--accent-strong);
  outline: none;
}

.ghost-button {
  background: transparent;
  color: var(--accent);
}

.ghost-button:hover,
.ghost-button:focus-visible {
  background: #e7f3ef;
  outline: none;
}

.board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.board-column {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 150px);
  min-height: 420px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fdfdfb;
}

.board-column h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 14px 14px 8px;
  border-bottom: 1px solid var(--line);
  font-size: 1rem;
  line-height: 1.2;
}

.board-status-icon {
  --icon-accent: #d6a14b;
  --icon-haze: rgba(214, 161, 75, .24);
  --icon-glow: rgba(214, 161, 75, .48);
  position: relative;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
}

.board-status-icon::before,
.board-status-icon::after {
  content: "";
  position: absolute;
  display: block;
}

.board-status-icon::before {
  inset: 3px;
  border: 1px solid rgba(244, 217, 154, .58);
  border-radius: 4px;
  background:
    radial-gradient(circle at 50% 48%, var(--icon-haze), transparent 62%),
    linear-gradient(135deg, rgba(255, 237, 184, .16), rgba(18, 11, 7, .95));
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, .5),
    0 0 12px var(--icon-glow);
  transform: rotate(45deg);
}

.board-status-icon::after {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.board-status-icon.is-pending::after {
  width: 12px;
  height: 15px;
  border-top: 2px solid var(--icon-accent);
  border-bottom: 2px solid var(--icon-accent);
  background:
    linear-gradient(135deg, transparent calc(50% - 1px), var(--icon-accent) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(45deg, transparent calc(50% - 1px), var(--icon-accent) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px));
  filter: drop-shadow(0 0 5px var(--icon-glow));
}

.board-status-icon.is-active {
  --icon-accent: #dc6f35;
  --icon-haze: rgba(220, 111, 53, .27);
  --icon-glow: rgba(220, 111, 53, .52);
}

.board-status-icon.is-active::after {
  width: 13px;
  height: 17px;
  background:
    linear-gradient(180deg, #ffd98d 0%, var(--icon-accent) 45%, #7b2e21 100%);
  clip-path: polygon(50% 0, 69% 31%, 62% 100%, 38% 100%, 31% 31%);
  filter: drop-shadow(0 0 6px var(--icon-glow));
  transform: translate(-50%, -50%) rotate(18deg);
}

.board-status-icon.is-completed {
  --icon-accent: #7fca72;
  --icon-haze: rgba(127, 202, 114, .24);
  --icon-glow: rgba(127, 202, 114, .46);
}

.board-status-icon.is-completed::after {
  width: 14px;
  height: 8px;
  border-left: 3px solid var(--icon-accent);
  border-bottom: 3px solid var(--icon-accent);
  filter: drop-shadow(0 0 5px var(--icon-glow));
  transform: translate(-50%, -64%) rotate(-45deg);
}

.task-list {
  display: grid;
  align-content: start;
  gap: 10px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px;
}

.task-card {
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--panel);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
  cursor: pointer;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.task-card[data-urgency="urgent"] {
  border-left-color: var(--danger);
}

.task-card[data-urgency="medium"] {
  border-left-color: #ffd166;
}

.task-card[data-urgency="normal"] {
  border-left-color: #4f6f52;
}

.task-card:focus-visible,
.task-card.is-dragging {
  outline: 3px solid rgba(0, 127, 104, .22);
}

.task-card-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.task-card h3 {
  margin: 0;
  font-size: .98rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.assigner {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: .86rem;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.task-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  background: #fafaf7;
  color: #30332e;
  font-size: .78rem;
  font-weight: 700;
}

.deadline-chip.is-overdue {
  border-color: #f4b5af;
  color: var(--danger);
  background: #fff1ef;
}

.deadline-chip.is-complete {
  color: var(--muted);
}

.completed-time {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: .86rem;
}

.urgency-badge {
  flex: 0 0 auto;
  min-width: 44px;
  border-radius: 999px;
  padding: 3px 9px;
  text-align: center;
  font-size: .78rem;
  font-weight: 700;
}

.urgency-badge[data-urgency="urgent"] {
  color: #fff;
  background: var(--danger);
}

.urgency-badge[data-urgency="medium"] {
  color: #1c1400;
  background: #ffd166;
}

.urgency-badge[data-urgency="normal"] {
  color: #fff;
  background: #4f6f52;
}

.task-detail {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: #30332e;
  font-size: .9rem;
}

.task-detail dl {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 6px 10px;
  margin: 0 0 10px;
}

.task-detail dt {
  color: var(--muted);
}

.task-detail dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.child-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.child-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
  background: #fafaf7;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.tree-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-left: 0;
  list-style: none;
}

.tree-list .tree-list {
  margin-left: 16px;
  padding-left: 12px;
  border-left: 2px solid var(--line);
}

.tree-node {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
  background: #fff;
}

.drop-target {
  outline: 3px solid rgba(0, 127, 104, .2);
  outline-offset: -4px;
}

.action-dialog {
  width: min(460px, calc(100vw - 32px));
  border: 0;
  border-radius: var(--radius);
  padding: 22px;
  color: var(--text);
  box-shadow: 0 20px 80px rgba(0, 0, 0, .28);
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.prize-editor-dialog {
  width: min(720px, calc(100vw - 32px));
}

.prize-editor-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
}

.prize-editor-preview-wrap {
  display: grid;
  place-items: center;
  align-self: start;
  min-height: 220px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 12px;
  color: var(--muted);
  background: rgba(0, 0, 0, .18);
  text-align: center;
}

.prize-editor-preview {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
}

.prize-editor-fields {
  display: grid;
  gap: 12px;
}

.prize-editor-fields small {
  color: var(--muted);
  line-height: 1.45;
}

.action-dialog::backdrop {
  background: rgba(0, 0, 0, .42);
}

.action-dialog h3 {
  margin: 0 0 12px;
  font-size: 1.05rem;
}

.action-dialog p {
  margin: 0 0 18px;
  color: var(--muted);
}

.action-dialog form {
  display: grid;
  gap: 12px;
}

.action-dialog label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: .9rem;
}

.action-dialog .checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.action-dialog .checkbox-row input {
  width: auto;
}

.action-dialog input,
.action-dialog select,
.action-dialog textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 10px;
  color: var(--text);
  background: #fff;
}

.action-dialog input,
.action-dialog textarea {
  -webkit-touch-callout: default;
  -webkit-user-select: text;
  user-select: text;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

/* Dark fantasy visual pass: POE-adjacent mood without using game assets. */
.dashboard-page {
  --bg: #090807;
  --panel: rgba(28, 21, 15, .96);
  --line: #5a4528;
  --text: #f0e3c7;
  --muted: #b8a481;
  --accent: #b9822f;
  --accent-strong: #d6a14b;
  --danger: #b63a2e;
  --warning: #d4a63f;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 12%, rgba(157, 93, 30, .18), transparent 34rem),
    linear-gradient(rgba(4, 3, 2, .38), rgba(4, 3, 2, .76)),
    url("../images/dark_rpg_panel_bg.e994a525048d.png") center top / cover fixed,
    #090807;
}

.dashboard-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .48), transparent 18%, transparent 82%, rgba(0, 0, 0, .48)),
    repeating-linear-gradient(0deg, rgba(255, 244, 214, .025) 0 1px, transparent 1px 5px);
}

.dashboard-page .top-bar {
  border-bottom: 1px solid #7a5a2e;
  background:
    linear-gradient(180deg, rgba(29, 22, 15, .98), rgba(6, 5, 4, .98)),
    #080706;
  box-shadow: 0 12px 36px rgba(0, 0, 0, .42);
}

.dashboard-page .dashboard-sidebar {
  border-right: 1px solid #7a5a2e;
  background:
    linear-gradient(180deg, rgba(22, 16, 11, .98), rgba(5, 4, 3, .98)),
    #070604;
  box-shadow: 22px 0 56px rgba(0, 0, 0, .55);
}

.dashboard-page .sidebar-toggle:hover,
.dashboard-page .sidebar-toggle:focus-visible,
.dashboard-page .sidebar-nav-link:hover,
.dashboard-page .sidebar-nav-link:focus-visible,
.dashboard-page .sidebar-nav-link.is-active,
.dashboard-page.sidebar-open .sidebar-toggle {
  background: linear-gradient(180deg, rgba(129, 89, 39, .42), rgba(24, 16, 10, .86));
}

.dashboard-page .sidebar-toggle span {
  background: #e9c778;
  box-shadow: 0 0 8px rgba(214, 161, 75, .42);
}

.dashboard-page .sidebar-backdrop {
  background: rgba(0, 0, 0, .46);
}

.dashboard-page .board-shell,
.dashboard-page .utility-panel {
  color: var(--text);
}

.dashboard-page .board-actions {
  border: 1px solid rgba(122, 90, 46, .78);
  border-radius: var(--radius);
  padding: 10px;
  background:
    linear-gradient(180deg, rgba(38, 27, 18, .94), rgba(15, 11, 8, .94));
  box-shadow: inset 0 1px 0 rgba(255, 232, 173, .12), 0 12px 34px rgba(0, 0, 0, .34);
}

.dashboard-page .toolbar-button,
.dashboard-page .ghost-button {
  border-color: #a67939;
  box-shadow: inset 0 1px 0 rgba(255, 235, 176, .18);
}

.dashboard-page .toolbar-button {
  color: #1a1007;
  background: linear-gradient(180deg, #d3a14d, #8f5d24);
}

.dashboard-page .toolbar-button:hover,
.dashboard-page .toolbar-button:focus-visible {
  color: #080604;
  background: linear-gradient(180deg, #edc777, #a96e2a);
}

.dashboard-page .ghost-button {
  color: #e5c886;
  background: rgba(12, 8, 5, .42);
}

.dashboard-page .ghost-button:hover,
.dashboard-page .ghost-button:focus-visible {
  background: rgba(98, 62, 29, .42);
}

.dashboard-page .board-column,
.dashboard-page .employee-list-panel,
.dashboard-page .performance-detail,
.dashboard-page .review-list {
  border-color: rgba(122, 90, 46, .84);
  background:
    linear-gradient(180deg, rgba(33, 25, 18, .94), rgba(13, 10, 8, .94)),
    rgba(13, 10, 8, .94);
  box-shadow:
    inset 0 1px 0 rgba(255, 232, 173, .11),
    inset 0 0 0 1px rgba(0, 0, 0, .42),
    0 18px 42px rgba(0, 0, 0, .32);
}

.dashboard-page .board-column h2,
.dashboard-page .utility-header h1 {
  color: #f4d99a;
  text-shadow: 0 1px 0 #000, 0 0 14px rgba(169, 92, 38, .28);
}

.dashboard-page .board-column h2 {
  border-bottom-color: rgba(122, 90, 46, .72);
  background: linear-gradient(180deg, rgba(55, 37, 21, .66), rgba(18, 12, 8, .5));
}

.dashboard-page .task-list {
  scrollbar-color: #8f5d24 #140f0b;
}

.dashboard-page .task-card,
.dashboard-page .metric-box,
.dashboard-page .history-row,
.dashboard-page .review-card,
.dashboard-page .prize-card,
.dashboard-page .redemption-row,
.dashboard-page .empty-state,
.dashboard-page .currency-pill,
.dashboard-page .utility-tabs,
.dashboard-page .profile-editor,
.dashboard-page .profile-avatar-option,
.dashboard-page .tree-node,
.dashboard-page .child-item {
  border-color: rgba(130, 95, 48, .86);
  background:
    linear-gradient(180deg, rgba(44, 33, 22, .98), rgba(24, 18, 13, .98)),
    #1b130d;
  box-shadow:
    inset 0 1px 0 rgba(255, 236, 182, .12),
    0 8px 20px rgba(0, 0, 0, .28);
}

.dashboard-page .task-card {
  border-left-color: #8f5d24;
}

.dashboard-page .task-card[data-urgency="urgent"] {
  border-left-color: #c64838;
  box-shadow:
    inset 0 1px 0 rgba(255, 236, 182, .1),
    0 0 0 1px rgba(198, 72, 56, .18),
    0 8px 22px rgba(0, 0, 0, .3);
}

.dashboard-page .task-card[data-urgency="medium"] {
  border-left-color: #d6a14b;
}

.dashboard-page .task-card[data-urgency="normal"] {
  border-left-color: #6f8a5f;
}

.dashboard-page .task-card:focus-visible,
.dashboard-page .task-card.is-dragging,
.dashboard-page .drop-target {
  outline-color: rgba(214, 161, 75, .36);
}

.dashboard-page .task-card h3,
.dashboard-page .prize-info h3,
.dashboard-page .redemption-title strong,
.dashboard-page .tree-node strong,
.dashboard-page .review-card h3,
.dashboard-page .history-row strong {
  color: #f5e2b8;
}

.dashboard-page .assigner,
.dashboard-page .completed-time,
.dashboard-page .task-detail dt,
.dashboard-page .metric-box span,
.dashboard-page .redemption-meta,
.dashboard-page .empty-state,
.dashboard-page .history-row small,
.dashboard-page .review-card small,
.dashboard-page .review-card dt,
.dashboard-page .action-dialog p,
.dashboard-page .action-dialog label {
  color: var(--muted);
}

.dashboard-page .task-meta span {
  border-color: rgba(130, 95, 48, .82);
  color: #e9c778;
  background: linear-gradient(180deg, rgba(42, 29, 17, .96), rgba(15, 10, 7, .96));
}

.dashboard-page .prize-cost {
  border-color: rgba(130, 95, 48, .82);
  color: #e9c778;
  background: linear-gradient(180deg, rgba(42, 29, 17, .96), rgba(15, 10, 7, .96));
}

.dashboard-page .prize-image-wrap,
.dashboard-page .redemption-icon {
  background: radial-gradient(circle at center, rgba(214, 161, 75, .12), rgba(0, 0, 0, .32));
}

.dashboard-page .utility-tab {
  color: var(--muted);
}

.dashboard-page .utility-tab:hover,
.dashboard-page .utility-tab:focus-visible,
.dashboard-page .utility-tab.is-active {
  color: #080604;
  background: linear-gradient(180deg, #edc777, #a96e2a);
}

.dashboard-page .deadline-chip.is-overdue {
  border-color: rgba(198, 72, 56, .9);
  color: #ffb2a8;
  background: rgba(93, 24, 19, .45);
}

.dashboard-page .deadline-chip.is-complete {
  color: #c7b38b;
}

.dashboard-page .urgency-badge[data-urgency="urgent"] {
  color: #fff2e3;
  background: linear-gradient(180deg, #b74435, #681b18);
}

.dashboard-page .urgency-badge[data-urgency="medium"] {
  color: #1a1007;
  background: linear-gradient(180deg, #e4bc5d, #a8732d);
}

.dashboard-page .urgency-badge[data-urgency="normal"] {
  color: #f5f1df;
  background: linear-gradient(180deg, #70865d, #3e4f37);
}

.dashboard-page .task-detail,
.dashboard-page .tree-list .tree-list {
  border-color: rgba(122, 90, 46, .62);
}

.dashboard-page .task-detail,
.dashboard-page .task-detail dd,
.dashboard-page .tree-node,
.dashboard-page .tree-node div,
.dashboard-page .review-card dd,
.dashboard-page .history-row,
.dashboard-page .history-list p,
.dashboard-page .performance-detail > p {
  color: #ead7ad;
}

.dashboard-page .performance-history-panel {
  border-top-color: rgba(122, 90, 46, .72);
}

.dashboard-page .performance-history-panel::before {
  color: #f4d99a;
  text-shadow: 0 1px 0 #000;
}

.dashboard-page .metric-box strong {
  color: #f4d99a;
}

.dashboard-page .employee-list,
.dashboard-page .performance-history-scroll {
  scrollbar-color: #a66f2e #140f0b;
}

.dashboard-page .employee-list button {
  color: var(--text);
}

.dashboard-page .employee-list button:hover,
.dashboard-page .employee-list button:focus-visible,
.dashboard-page .employee-list button.is-active {
  border-color: rgba(166, 121, 57, .9);
  background: linear-gradient(180deg, rgba(85, 55, 25, .48), rgba(26, 18, 12, .82));
}

.dashboard-page .action-dialog {
  border: 1px solid rgba(166, 121, 57, .9);
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(42, 30, 19, .98), rgba(16, 11, 8, .98)),
    #17110c;
  box-shadow: 0 26px 96px rgba(0, 0, 0, .62);
}

.dashboard-page .action-dialog::backdrop {
  background: rgba(0, 0, 0, .7);
}

.dashboard-page .action-dialog h3 {
  color: #f4d99a;
}

.dashboard-page .action-dialog input,
.dashboard-page .action-dialog select,
.dashboard-page .action-dialog textarea {
  border-color: rgba(130, 95, 48, .88);
  color: #f0e3c7;
  background: #100c09;
}

.dashboard-page .action-dialog input[type="file"]::file-selector-button {
  margin-right: 10px;
  border: 1px solid rgba(166, 121, 57, .9);
  border-radius: 6px;
  padding: 6px 10px;
  color: #f4d99a;
  background: linear-gradient(180deg, rgba(65, 44, 25, .98), rgba(28, 18, 11, .98));
  cursor: pointer;
}

.dashboard-page .action-dialog input[type="datetime-local"] {
  color-scheme: dark;
}

.dashboard-page .action-dialog input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 1;
  filter:
    invert(75%)
    sepia(57%)
    saturate(672%)
    hue-rotate(356deg)
    brightness(100%)
    contrast(91%)
    drop-shadow(0 0 4px rgba(214, 161, 75, .52));
}

.dashboard-page .action-dialog input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover {
  filter:
    invert(88%)
    sepia(44%)
    saturate(574%)
    hue-rotate(352deg)
    brightness(105%)
    contrast(95%)
    drop-shadow(0 0 6px rgba(237, 199, 119, .72));
}

.dashboard-page .action-dialog input:focus,
.dashboard-page .action-dialog select:focus,
.dashboard-page .action-dialog textarea:focus {
  border-color: #d6a14b;
  outline: 2px solid rgba(214, 161, 75, .22);
}

@media (max-width: 767px) {
  :root {
    --sidebar-width: min(82vw, 286px);
  }

  .dashboard-page {
    min-height: 100vh;
    min-height: 100dvh;
  }

  .login-box {
    padding: 32px 24px;
    transform: translate(-50%, -50%);
  }

  .top-bar {
    grid-template-columns: auto 1fr auto;
    padding: 8px 12px;
  }

  .sidebar-toggle {
    top: 14px;
    left: 12px;
  }

  .logo-link {
    left: 50%;
    transform: translate(-50%, -50%);
  }

  .top-logo {
    width: min(200px, calc(100vw - 168px));
    max-height: 60px;
  }

  .top-bar-user span {
    display: none;
  }

  .board-shell {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 72px);
    height: calc(100dvh - 72px);
    padding: 12px 0 24px;
  }

  .utility-panel {
    padding: 14px 12px 24px;
  }

  .profile-editor {
    gap: 16px;
    padding: 16px;
  }

  .profile-editor-summary {
    align-items: flex-start;
  }

  .profile-editor-avatar {
    width: 82px;
    height: 82px;
    font-size: 2rem;
  }

  .profile-editor-fields {
    grid-template-columns: 1fr;
  }

  .profile-editor-fields label:nth-child(2) {
    grid-column: auto;
    grid-row: auto;
  }

  .profile-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-upload-button {
    width: 100%;
  }

  .profile-avatar-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .performance-layout {
    grid-template-columns: 1fr;
    grid-template-rows: 96px minmax(0, 1fr);
    gap: 10px;
    height: calc(100vh - 130px);
    height: calc(100dvh - 130px);
    min-height: 0;
  }

  .performance-layout.is-single {
    grid-template-rows: minmax(0, 1fr);
  }

  .metric-grid,
  .status-summary {
    grid-auto-flow: column;
    grid-auto-columns: minmax(118px, 38vw);
    grid-template-columns: none;
    gap: 8px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
  }

  .performance-detail {
    grid-template-rows: auto minmax(180px, 1fr);
    gap: 8px;
    padding: 10px;
  }

  .performance-overview {
    gap: 8px;
  }

  .performance-history-panel {
    padding-top: 8px;
  }

  .metric-box {
    min-height: 58px;
    padding: 8px 10px;
    scroll-snap-align: start;
  }

  .metric-box span {
    font-size: .75rem;
  }

  .metric-box strong {
    margin-top: 3px;
    font-size: 1.05rem;
  }

  .history-row {
    grid-template-columns: 1fr;
  }

  .utility-header {
    align-items: flex-start;
    gap: 10px;
  }

  .currency-pill {
    min-height: 32px;
    padding: 5px 10px;
  }

  .utility-tabs {
    width: 100%;
  }

  .utility-tab {
    flex: 1 1 0;
    padding: 8px 10px;
  }

  .prize-grid {
    grid-template-columns: 1fr;
  }

  .prize-card {
    grid-template-columns: 112px minmax(0, 1fr);
    min-height: 150px;
    gap: 10px;
  }

  .prize-add-card {
    grid-template-columns: 1fr;
  }

  .prize-editor-dialog {
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
  }

  .prize-editor-layout {
    grid-template-columns: 1fr;
  }

  .prize-editor-preview-wrap {
    min-height: 150px;
  }

  .prize-editor-preview {
    max-height: 180px;
  }

  .prize-image-wrap {
    min-height: 126px;
  }

  .prize-image {
    max-height: 126px;
  }

  .redemption-row,
  .redemption-row.is-history {
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: start;
  }

  .redemption-row .toolbar-button {
    grid-column: 1 / -1;
    min-height: 42px;
  }

  .redemption-icon {
    width: 46px;
    height: 46px;
  }

  .board-actions {
    flex-shrink: 0;
    padding: 0 12px;
  }

  .board {
    display: flex;
    flex: 1;
    min-height: 0;
    gap: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
  }

  .board-column {
    flex: 0 0 88vw;
    height: 100%;
    min-height: 0;
    margin-left: 12px;
    scroll-snap-align: center;
  }

  .board-column:last-child {
    margin-right: 12px;
  }
}

.deadline-picker {
  width: min(380px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  box-sizing: border-box;
}

.deadline-calendar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.deadline-weekdays,
.deadline-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  text-align: center;
}

.deadline-weekdays {
  margin-bottom: 8px;
}

.deadline-days {
  grid-template-rows: repeat(6, 38px);
}

.deadline-days .ghost-button {
  padding: 8px 0;
  min-height: 36px;
}

.dashboard-page .deadline-days [aria-pressed="true"] {
  background: #d6a14b;
  color: #100c09;
  border-color: #f0d59c;
}

.deadline-time {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.deadline-time label {
  display: grid;
  gap: 6px;
}

.deadline-picker .dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.deadline-picker [data-today] {
  margin-right: auto;
}

.deadline-field input[readonly] {
  cursor: pointer;
}

.deadline-field input[readonly]::-webkit-calendar-picker-indicator {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.assistant-widget {
  position: fixed;
  right: 22px;
  bottom: 20px;
  z-index: 70;
}

.assistant-launcher {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 58px;
  padding: 5px 16px 5px 5px;
  color: #f9ead0;
  background: linear-gradient(145deg, #241a14, #100c09);
  border: 1px solid #795832;
  border-radius: 32px;
  box-shadow: 0 12px 32px rgba(23, 13, 7, 0.34);
  cursor: pointer;
}

.assistant-launcher img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  object-position: center top;
  background: #93d7f0;
  border: 1px solid #aa8656;
  border-radius: 50%;
}

.assistant-launcher span {
  font-weight: 700;
}

.assistant-panel {
  position: absolute;
  right: 0;
  bottom: 70px;
  display: grid;
  grid-template-rows: auto minmax(220px, 1fr) auto auto auto;
  width: min(520px, calc(100vw - 28px));
  height: min(720px, calc(100dvh - 110px));
  overflow: hidden;
  color: #f3eee7;
  background: #15110e;
  border: 1px solid #5f4932;
  border-radius: 16px;
  box-shadow: 0 22px 60px rgba(9, 5, 3, 0.48);
}

.assistant-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 16px;
  background: linear-gradient(135deg, #2c2017, #17110d);
  border-bottom: 1px solid #493725;
}

.assistant-header-title {
  display: grid;
  gap: 3px;
}

.assistant-header-actions {
  display: flex;
  gap: 7px;
  align-items: center;
}

.assistant-clear-button {
  padding: 7px 10px;
  color: #dcc5a5;
  font-size: 12px;
  background: transparent;
  border: 1px solid #65503a;
  border-radius: 999px;
  cursor: pointer;
}

.assistant-clear-button:hover {
  color: #fff1dc;
  border-color: #a98558;
}

.assistant-header small {
  color: #bfa98d;
}

.assistant-icon-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  color: #ead8bd;
  text-decoration: none;
  background: transparent;
  border: 1px solid #65503a;
  border-radius: 50%;
  cursor: pointer;
}

.assistant-messages {
  min-height: 0;
  padding: 16px;
  overflow-y: auto;
  background: radial-gradient(circle at top, #241a13 0, #15110e 55%);
}

.assistant-welcome {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  padding: 12px;
  color: #dacbb8;
  background: rgba(75, 55, 37, 0.42);
  border: 1px solid #493724;
  border-radius: 12px;
}

.assistant-welcome img {
  width: 54px;
  height: 54px;
  object-fit: cover;
  object-position: center top;
  background: #93d7f0;
  border-radius: 10px;
}

.assistant-welcome p,
.assistant-message-body p {
  margin: 0;
  overflow-wrap: anywhere;
}

.assistant-message {
  display: grid;
  gap: 5px;
  width: fit-content;
  max-width: 88%;
  padding: 10px 12px;
  margin-top: 12px;
  background: #29211a;
  border: 1px solid #4d3c2c;
  border-radius: 12px 12px 12px 4px;
}

.assistant-message.is-user {
  margin-left: auto;
  color: #15110e;
  background: #dab272;
  border-color: #e7c58d;
  border-radius: 12px 12px 4px;
}

.assistant-message-author {
  font-size: 12px;
  color: #c5a87d;
}

.assistant-message.is-user .assistant-message-author {
  color: #5a4227;
}

.assistant-message-body {
  min-width: 0;
  font-size: 14px;
  line-height: 1.58;
  overflow-wrap: anywhere;
}

.assistant-message.is-assistant {
  width: 100%;
  max-width: 96%;
}

.assistant-message-body > * + * {
  margin-top: 10px;
}

.assistant-message-body h2,
.assistant-message-body h3,
.assistant-message-body h4,
.assistant-message-body h5,
.assistant-message-body h6 {
  margin: 0;
  color: #fff1dd;
  line-height: 1.3;
}

.assistant-message-body h2 {
  padding-bottom: 6px;
  font-size: 18px;
  border-bottom: 1px solid rgba(231, 197, 141, 0.3);
}

.assistant-message-body h3 {
  font-size: 16px;
}

.assistant-message-body h4,
.assistant-message-body h5,
.assistant-message-body h6 {
  font-size: 14px;
}

.assistant-message-body strong {
  color: #ffe0a8;
  font-weight: 750;
}

.assistant-message-body em {
  color: #e4d5c2;
}

.assistant-message-body ul,
.assistant-message-body ol {
  padding-left: 22px;
  margin-bottom: 0;
}

.assistant-message-body li + li {
  margin-top: 4px;
}

.assistant-message-body a {
  color: #efbd70;
  font-weight: 650;
  text-decoration: underline;
  text-decoration-color: rgba(239, 189, 112, 0.55);
  text-underline-offset: 3px;
}

.assistant-message-body a:hover {
  color: #ffe1aa;
}

.assistant-message-body code {
  padding: 1px 5px;
  color: #ffdc9c;
  font: 0.9em/1.5 Consolas, "Courier New", monospace;
  background: #15110e;
  border: 1px solid #4e3c2c;
  border-radius: 5px;
}

.assistant-message-body pre {
  max-width: 100%;
  padding: 10px 12px;
  overflow-x: auto;
  background: #100d0b;
  border: 1px solid #4e3c2c;
  border-radius: 8px;
}

.assistant-message-body pre code {
  padding: 0;
  color: #f3e8da;
  white-space: pre;
  background: transparent;
  border: 0;
}

.assistant-message-body blockquote {
  padding: 7px 10px;
  margin-bottom: 0;
  color: #d8c7b0;
  background: rgba(231, 197, 141, 0.07);
  border-left: 3px solid #b9894d;
}

.assistant-message-body hr {
  margin-bottom: 0;
  border: 0;
  border-top: 1px solid #57432f;
}

.assistant-markdown-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid #59442f;
  border-radius: 8px;
}

.assistant-markdown-table-wrap table {
  width: 100%;
  min-width: 280px;
  border-collapse: collapse;
  font-size: 13px;
}

.assistant-markdown-table-wrap th,
.assistant-markdown-table-wrap td {
  padding: 7px 9px;
  text-align: left;
  vertical-align: top;
  border-right: 1px solid #4b3928;
  border-bottom: 1px solid #4b3928;
}

.assistant-markdown-table-wrap th:last-child,
.assistant-markdown-table-wrap td:last-child {
  border-right: 0;
}

.assistant-markdown-table-wrap tbody tr:last-child td {
  border-bottom: 0;
}

.assistant-markdown-table-wrap th {
  color: #ffe2ae;
  font-weight: 700;
  background: #33271d;
}

.assistant-markdown-table-wrap tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.035);
}

.assistant-message.is-user .assistant-message-body p {
  white-space: pre-wrap;
}

.assistant-checklist {
  display: grid;
  gap: 8px;
  padding: 9px 10px;
  background: rgba(16, 13, 11, 0.42);
  border: 1px solid rgba(185, 137, 77, 0.35);
  border-radius: 9px;
}

.assistant-checklist-summary {
  display: grid;
  grid-template-columns: auto minmax(80px, 1fr);
  gap: 10px;
  align-items: center;
  color: #cbb99f;
  font-size: 12px;
}

.assistant-checklist progress,
.assistant-work-card-progress progress {
  width: 100%;
  height: 7px;
  overflow: hidden;
  appearance: none;
  background: #15110e;
  border: 0;
  border-radius: 999px;
}

.assistant-checklist progress::-webkit-progress-bar,
.assistant-work-card-progress progress::-webkit-progress-bar {
  background: #15110e;
  border-radius: 999px;
}

.assistant-checklist progress::-webkit-progress-value,
.assistant-work-card-progress progress::-webkit-progress-value {
  background: linear-gradient(90deg, #9f713c, #e2b565);
  border-radius: 999px;
}

.assistant-checklist progress::-moz-progress-bar,
.assistant-work-card-progress progress::-moz-progress-bar {
  background: linear-gradient(90deg, #9f713c, #e2b565);
  border-radius: 999px;
}

.assistant-checklist-items {
  display: grid;
  gap: 6px;
  padding: 0 !important;
  margin: 0 !important;
  list-style: none;
}

.assistant-checklist-items li {
  margin: 0 !important;
}

.assistant-checklist-items label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  cursor: pointer;
}

.assistant-checklist-items input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.assistant-checklist-box {
  position: relative;
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  margin-top: 1px;
  background: #17120e;
  border: 1px solid #80603c;
  border-radius: 5px;
  transition: 140ms ease;
}

.assistant-checklist-items input:focus-visible + .assistant-checklist-box {
  outline: 2px solid #efbd70;
  outline-offset: 2px;
}

.assistant-checklist-items input:checked + .assistant-checklist-box {
  background: #c38d43;
  border-color: #edc37f;
}

.assistant-checklist-items input:checked + .assistant-checklist-box::after {
  width: 8px;
  height: 4px;
  content: "";
  border-bottom: 2px solid #17100b;
  border-left: 2px solid #17100b;
  transform: translateY(-1px) rotate(-45deg);
}

.assistant-checklist-label {
  color: #e8dccd;
}

.assistant-checklist-items .is-complete .assistant-checklist-label {
  color: #938574;
  text-decoration: line-through;
}

.assistant-structured-widgets {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin-top: 5px;
}

.assistant-structured-card {
  position: relative;
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 13px;
  overflow: hidden;
  color: #e8dccd;
  background: linear-gradient(145deg, rgba(63, 47, 33, 0.95), rgba(31, 24, 19, 0.98));
  border: 1px solid #685038;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(6, 4, 3, 0.18);
}

.assistant-structured-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  content: "";
  background: #9d7648;
}

.assistant-structured-card.is-info::before,
.assistant-chart-card::before {
  background: #61a7b5;
}

.assistant-structured-card.is-success::before,
.assistant-work-card.is-normal::before {
  background: #69a77f;
}

.assistant-structured-card.is-warning::before,
.assistant-work-card.is-medium::before {
  background: #d6a14b;
}

.assistant-structured-card.is-danger::before,
.assistant-work-card.is-urgent::before {
  background: #d56c58;
}

.assistant-structured-card-header {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}

.assistant-structured-card-title {
  margin: 0;
  color: #fff0d8;
  font-size: 15px;
  line-height: 1.35;
}

.assistant-structured-card-badges {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-end;
}

.assistant-widget-badge {
  padding: 3px 7px;
  color: #d8c9b4;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  background: #31271f;
  border: 1px solid #66513c;
  border-radius: 999px;
}

.assistant-widget-badge.is-info,
.assistant-widget-badge.is-in_progress {
  color: #b9e6ed;
  background: rgba(57, 125, 139, 0.22);
  border-color: #3b7883;
}

.assistant-widget-badge.is-success,
.assistant-widget-badge.is-completed,
.assistant-widget-badge.is-normal {
  color: #bfe6c8;
  background: rgba(70, 127, 85, 0.24);
  border-color: #477b55;
}

.assistant-widget-badge.is-warning,
.assistant-widget-badge.is-pending,
.assistant-widget-badge.is-medium {
  color: #f5d49c;
  background: rgba(155, 105, 40, 0.25);
  border-color: #8e6535;
}

.assistant-widget-badge.is-danger,
.assistant-widget-badge.is-blocked,
.assistant-widget-badge.is-urgent {
  color: #ffc1b5;
  background: rgba(143, 65, 53, 0.25);
  border-color: #8e4d42;
}

.assistant-structured-card-description {
  margin: 0;
  color: #d8cab8;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.assistant-widget-rows,
.assistant-work-card-meta {
  display: grid;
  grid-template-columns: minmax(55px, auto) minmax(0, 1fr);
  gap: 5px 10px;
  margin: 0;
  font-size: 12px;
}

.assistant-widget-rows dt,
.assistant-work-card-meta dt {
  color: #a99882;
}

.assistant-widget-rows dd,
.assistant-work-card-meta dd {
  margin: 0;
  color: #eee1cf;
  overflow-wrap: anywhere;
}

.assistant-widget-list {
  display: grid;
  gap: 5px;
  padding-left: 18px;
  margin: 0;
  color: #dfd2c1;
  font-size: 13px;
}

.assistant-work-card-progress {
  display: grid;
  grid-template-columns: auto minmax(80px, 1fr);
  gap: 10px;
  align-items: center;
  color: #cbb99f;
  font-size: 12px;
}

.assistant-widget-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 2px;
}

.assistant-widget-action {
  padding: 7px 10px;
  color: #f4dfbd;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  background: linear-gradient(145deg, #4b3927, #35291f);
  border: 1px solid #85643e;
  border-radius: 8px;
  cursor: pointer;
}

.assistant-widget-action:hover {
  color: #fff2d9;
  border-color: #c49554;
}

.assistant-widget-action:focus-visible {
  outline: 2px solid #efbd70;
  outline-offset: 2px;
}

.assistant-work-card-note,
.assistant-chart-source {
  color: #9f907d;
  font-size: 10px;
}

.assistant-echart {
  width: 100%;
  height: 270px;
  background: rgba(13, 10, 8, 0.3);
  border: 1px solid rgba(108, 83, 58, 0.45);
  border-radius: 8px;
}

.assistant-chart-fallback {
  display: grid;
  height: 100%;
  place-items: center;
  padding: 16px;
  margin: 0;
  color: #cdbca7;
  text-align: center;
}

.assistant-chart-data summary {
  color: #c6b294;
  font-size: 11px;
  cursor: pointer;
}

.assistant-chart-data .assistant-markdown-table-wrap {
  margin-top: 7px;
}

.assistant-message-attachments {
  display: grid;
  gap: 4px;
}

.assistant-message-attachments button {
  padding: 5px 7px;
  overflow: hidden;
  color: inherit;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.18);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.assistant-message-sources {
  display: grid;
  gap: 4px;
  padding-top: 7px;
  margin-top: 3px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.assistant-message-sources span {
  color: #bfa98d;
  font-size: 11px;
}

.assistant-message-sources a {
  color: #e7c58d;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.assistant-files {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  overflow-x: auto;
  background: #1d1712;
  border-top: 1px solid #3e3023;
}

.assistant-file-chip {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  max-width: 250px;
  background: #33271d;
  border: 1px solid #5c4632;
  border-radius: 8px;
}

.assistant-file-chip button,
.assistant-file-chip a {
  padding: 7px 9px;
  overflow: hidden;
  color: #eadbc8;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.assistant-file-chip a {
  border-left: 1px solid #5c4632;
}

.assistant-status {
  padding: 7px 12px;
  margin: 0;
  color: #c9b595;
  font-size: 13px;
  background: #1c1712;
}

.assistant-status.is-error {
  color: #ffb4ab;
}

.assistant-form {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
  padding: 11px;
  background: #100d0b;
  border-top: 1px solid #3e3023;
}

.assistant-form textarea {
  width: 100%;
  min-height: 42px;
  max-height: 120px;
  padding: 10px 12px;
  color: #f2ece4;
  resize: none;
  background: #29221c;
  border: 1px solid #554231;
  border-radius: 10px;
  outline: none;
}

.assistant-form textarea:focus {
  border-color: #b88a50;
}

.assistant-attach-button,
.assistant-send-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  padding: 0;
  color: #f1dec2;
  background: #31251b;
  border: 1px solid #654c35;
  border-radius: 10px;
  cursor: pointer;
}

.assistant-attach-button input {
  display: none;
}

.assistant-send-button {
  color: #17100b;
  background: #d6a14b;
  border-color: #e3bb76;
}

.assistant-panel.is-busy .assistant-send-button {
  opacity: 0.55;
}

.assistant-preview-dialog {
  width: min(1000px, calc(100vw - 32px));
  height: min(760px, calc(100dvh - 32px));
  padding: 0;
  color: #f2ece4;
  background: #15110e;
  border: 1px solid #65503a;
  border-radius: 14px;
}

.assistant-preview-dialog::backdrop {
  background: rgba(10, 7, 5, 0.72);
}

.assistant-preview-dialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 10px 14px;
  border-bottom: 1px solid #493725;
}

.assistant-preview-dialog header > div {
  display: flex;
  gap: 7px;
}

.assistant-preview-dialog iframe {
  width: 100%;
  height: calc(100% - 58px);
  background: #fff;
  border: 0;
}

@media (max-width: 600px) {
  .assistant-widget {
    right: 12px;
    bottom: 12px;
  }

  .assistant-launcher {
    width: 56px;
    min-height: 56px;
    padding: 4px;
  }

  .assistant-launcher img {
    width: 46px;
    height: 46px;
  }

  .assistant-launcher span {
    display: none;
  }

  .assistant-panel {
    position: fixed;
    inset: 8px;
    width: auto;
    height: auto;
    border-radius: 12px;
  }

  .assistant-echart {
    height: 235px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-box form button span {
    animation: none;
  }
}
