:root {
  --accent: #ea580c;
  --accent-deep: #c2410c;
  --accent-hot: #f97316;
  --accent-soft: #ffedd5;
  --accent-glow: rgba(234, 88, 12, 0.22);
  --bg: #fffbf7;
  --surface: #ffffff;
  --ink: #1c1917;
  --muted: #78716c;
  --line: #e7e5e4;
  --danger: #dc2626;
  --warn: #d97706;
  --ok: #16a34a;
  --shadow: 0 1px 2px rgba(28, 25, 23, 0.05), 0 8px 28px rgba(234, 88, 12, 0.1);
  --shadow-lg: 0 4px 8px rgba(28, 25, 23, 0.06), 0 20px 48px rgba(234, 88, 12, 0.16);
  --radius: 14px;
  --font: "Hiragino Sans", "Noto Sans JP", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  background:
    radial-gradient(1100px 520px at 8% -8%, rgba(254, 215, 170, 0.55) 0%, transparent 58%),
    radial-gradient(900px 420px at 100% 0%, rgba(255, 237, 213, 0.7) 0%, transparent 50%),
    radial-gradient(600px 300px at 70% 100%, rgba(254, 215, 170, 0.25) 0%, transparent 55%),
    var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: var(--accent-soft);
  padding: 1px 6px;
  border-radius: 6px;
  color: var(--accent-deep);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid rgba(231, 229, 228, 0.9);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 8px 24px rgba(234, 88, 12, 0.04);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: linear-gradient(145deg, var(--accent-hot) 0%, var(--accent) 45%, var(--accent-deep) 100%);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.25) inset,
    0 4px 14px var(--accent-glow),
    0 0 24px rgba(249, 115, 22, 0.15);
  letter-spacing: -0.02em;
}
.brand strong { display: block; font-size: 15px; }
.brand .sub { display: block; font-size: 11px; color: var(--muted); }
.pill {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
}
.pill.ok { color: var(--ok); border-color: #fdba74; background: #fff7ed; }
.pill.err { color: var(--danger); border-color: #fecaca; background: #fef2f2; }

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 22px 18px 60px;
}
.page-desc {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.shell-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.tab .n {
  display: inline-block;
  min-width: 1.4em;
  margin-left: 4px;
  font-size: 11px;
  opacity: 0.85;
}
.tab.is-on {
  background: linear-gradient(145deg, var(--accent-hot), var(--accent-deep));
  color: #fff;
  box-shadow: 0 2px 10px rgba(234, 88, 12, 0.28);
}

.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition:
    background 0.18s var(--ease),
    border-color 0.18s var(--ease),
    color 0.18s var(--ease),
    box-shadow 0.18s var(--ease),
    transform 0.18s var(--ease);
}
.btn:hover { border-color: var(--accent); color: var(--accent-deep); }
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 6px 10px; font-size: 12px; }
.btn-primary {
  background: linear-gradient(145deg, var(--accent-hot) 0%, var(--accent) 50%, var(--accent-deep) 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 2px 10px rgba(234, 88, 12, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}
.btn-primary:hover {
  filter: brightness(1.06);
  color: #fff;
  box-shadow: 0 4px 18px rgba(234, 88, 12, 0.38), 0 0 0 1px rgba(255, 255, 255, 0.16) inset;
}
.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent-deep); }
.btn-danger { color: var(--danger); border-color: #fecaca; }

.card {
  background: var(--surface);
  border: 1px solid rgba(231, 229, 228, 0.95);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.card:hover {
  box-shadow: var(--shadow-lg);
  border-color: rgba(253, 186, 116, 0.55);
}
.card-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff8f3, #fff);
}
.card-hd h2 { margin: 0; font-size: 15px; }
.card-bd { padding: 0; }

.empty {
  padding: 48px 20px;
  text-align: center;
  color: var(--muted);
}
.empty-icon { font-size: 28px; margin-bottom: 8px; }
.empty-title { margin: 0 0 6px; font-weight: 700; color: var(--ink); font-size: 15px; }
.empty-sub { margin: 0 0 16px; font-size: 13px; }

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.data th,
table.data td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid #f5f5f4;
  vertical-align: middle;
}
table.data th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: #fffaf7;
}
table.data tr.row-click { cursor: pointer; }
table.data tr.row-click:hover { background: #fff7ed; }
table.data tr.is-selected { background: var(--accent-soft); }
.list-title { font-weight: 700; }
.list-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.col-status { width: 10%; }
.col-imgs, .col-sess { width: 10%; }
.col-date { width: 18%; white-space: nowrap; color: var(--muted); }
.col-actions {
  width: 72px;
  text-align: right;
  white-space: nowrap;
}
.col-actions .btn {
  opacity: 0.72;
}
table.data tr.row-click:hover .col-actions .btn,
table.data tr.is-selected .col-actions .btn {
  opacity: 1;
}
.col-actions .btn:hover {
  background: #fef2f2;
}

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}
.badge-ok { background: #ffedd5; color: #9a3412; }
.badge-wait { background: #fef3c7; color: #92400e; }
.img-pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
}
.img-pill.is-zero { background: #f3f4f6; color: #9ca3af; }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 25, 23, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 50;
}
.modal-card {
  background: var(--surface);
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(194, 65, 12, 0.22);
  width: min(560px, 100%);
  max-height: min(90vh, 900px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-card.wide { width: min(1080px, 100%); }
.modal-hd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff7ed, #fff);
}
.modal-hd h2 { margin: 0 0 4px; font-size: 17px; }
.modal-hd-sub { margin: 0; font-size: 12px; color: var(--muted); }
.modal-bd {
  padding: 16px 18px;
  overflow: auto;
  flex: 1;
}
.modal-ft {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  background: #fffbf8;
}

.form-grid { display: grid; gap: 12px; }
.form-row label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 5px;
  color: var(--ink);
}
.form-row .req { color: var(--danger); }
.form-row .muted { color: var(--muted); font-weight: 500; }
.form-hint { margin: 4px 0 0; font-size: 11px; color: var(--muted); }
input[type="text"],
input[type="file"],
textarea {
  width: 100%;
  font: inherit;
  font-size: 13px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}
input:focus, textarea:focus {
  outline: 2px solid var(--accent-glow);
  border-color: var(--accent);
}
textarea { resize: vertical; min-height: 100px; line-height: 1.5; }

.detail-split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 16px;
}
@media (max-width: 860px) {
  .detail-split { grid-template-columns: 1fr; }
}
.section {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
  background: #fffefb;
}
.section-hd {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.section-hd strong { font-size: 13px; }
.chip {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
}
.status-seg {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: #fff7ed;
  border-radius: 10px;
  border: 1px solid var(--line);
}
.status-seg .tab { padding: 5px 10px; font-size: 12px; }
.url-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.url-row input { flex: 1; min-width: 160px; font-size: 12px; }

.img-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.img-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.img-thumb-wrap {
  aspect-ratio: 16/10;
  background: #0f172a;
  overflow: hidden;
}
.img-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.img-body { padding: 8px; }
.img-name {
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
}
.img-actions { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.upload-box {
  border: 1px dashed var(--accent);
  border-radius: 12px;
  padding: 12px;
  background: #fff7ed;
}
.upload-title { font-size: 12px; font-weight: 700; margin-bottom: 8px; }
.upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}
@media (max-width: 560px) {
  .upload-grid { grid-template-columns: 1fr; }
}

.hist-table th, .hist-table td { font-size: 12px; }
.hist-row.has-lead { background: #fff7ed; }
.hist-row.is-selected { outline: 2px solid var(--accent); outline-offset: -2px; }
.lead-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
}
.lead-badge.is-ok { background: #ffedd5; color: #9a3412; }
.lead-badge.is-miss { background: #f3f4f6; color: #6b7280; }
.sess-person { font-weight: 700; font-size: 12px; }
.sess-person.is-empty { color: var(--muted); font-weight: 500; }
.sess-contact { font-size: 11px; color: var(--muted); margin-top: 2px; }
.sess-st { font-size: 11px; font-weight: 700; }
.sess-st.is-live { color: var(--accent-deep); }
.sess-st.is-ended { color: var(--muted); }
.sess-actions { width: 1%; white-space: nowrap; text-align: right; vertical-align: middle; }
.btn-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #9ca3af;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}
.btn-x:hover {
  background: #fee2e2;
  color: #dc2626;
}
.btn-x:active {
  background: #fecaca;
  color: #b91c1c;
}

/* Confirm dialog (above detail modal) */
.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(28, 25, 23, 0.5);
}
.confirm-card {
  width: min(360px, 100%);
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  animation: modal-in 0.2s var(--ease, ease);
}
.confirm-hd {
  padding: 14px 16px 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.confirm-bd {
  padding: 10px 16px 14px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}
.confirm-ft {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: #fffbf8;
}
.btn-danger-solid {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}
.btn-danger-solid:hover {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #fff;
}

.lead-card {
  border: 1px solid #fdba74;
  background: #fff7ed;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.lead-card.is-empty {
  border-color: var(--line);
  background: #f9fafb;
}
.lead-card-hd {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.lead-dl { margin: 0; }
.lead-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 6px;
  font-size: 12px;
  padding: 2px 0;
}
.lead-row dt { color: var(--muted); margin: 0; }
.lead-row dd { margin: 0; font-weight: 600; }
.lead-row a { color: var(--accent-deep); }

.hist-msgs { display: flex; flex-direction: column; gap: 8px; max-height: 360px; overflow: auto; }
.hist-msg {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
  font-size: 12px;
}
.hist-msg.role-user { border-left: 3px solid #fb923c; }
.hist-msg.role-assistant { border-left: 3px solid var(--accent); }
.hist-msg.role-image { border-left: 3px solid #a78bfa; }
.hist-msg.role-system { border-left: 3px solid #d1d5db; opacity: 0.9; }
.hist-msg-hd {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--muted);
}
.hist-msg-bd { white-space: pre-wrap; word-break: break-word; line-height: 1.45; }
.hist-img-tag {
  margin-top: 4px;
  font-size: 11px;
  color: var(--accent-deep);
  font-weight: 600;
}
.hist-detail-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 8px 0;
}
.hist-sid {
  font-size: 10px;
  background: #fff7ed;
  padding: 2px 6px;
  border-radius: 6px;
  word-break: break-all;
}

.toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 80;
  min-width: 200px;
  max-width: 360px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #1c1917;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow);
}
.toast.ok { background: var(--ok); }
.toast.err { background: var(--danger); }
.muted { color: var(--muted); }

/* Login */
body.is-login {
  background:
    radial-gradient(ellipse 900px 480px at 50% -10%, rgba(251, 146, 60, 0.28) 0%, transparent 60%),
    radial-gradient(ellipse 700px 400px at 15% 90%, rgba(254, 215, 170, 0.45) 0%, transparent 55%),
    radial-gradient(ellipse 600px 360px at 95% 70%, rgba(255, 237, 213, 0.55) 0%, transparent 50%),
    linear-gradient(165deg, #fff 0%, #fff7ed 45%, #ffedd5 100%);
  overflow-x: hidden;
}
body.is-login::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 30%, rgba(249, 115, 22, 0.07) 0%, transparent 28%),
    radial-gradient(circle at 80% 20%, rgba(234, 88, 12, 0.06) 0%, transparent 32%);
  animation: login-ambience 12s ease-in-out infinite alternate;
  z-index: 0;
}
@keyframes login-ambience {
  from { opacity: 0.7; transform: scale(1); }
  to { opacity: 1; transform: scale(1.04); }
}
.login-gate {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.login-card {
  width: min(400px, 100%);
  position: relative;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  border: 1px solid rgba(253, 186, 116, 0.35);
  border-radius: 20px;
  padding: 28px 24px 24px;
  /* 通常：やや濃いめの影 */
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 3px 8px rgba(28, 25, 23, 0.05),
    0 12px 32px rgba(234, 88, 12, 0.11),
    0 20px 40px rgba(28, 25, 23, 0.05);
  transition:
    box-shadow 0.35s var(--ease),
    border-color 0.35s var(--ease),
    transform 0.35s var(--ease),
    background 0.35s var(--ease);
}
/* ユーザーが input を初めてクリック / タイプした後だけ影をさらに淡く */
.login-card.is-engaged:focus-within {
  border-color: rgba(249, 115, 22, 0.35);
  background: rgba(255, 255, 255, 0.97);
  transform: none;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 2px 4px rgba(28, 25, 23, 0.03),
    0 6px 16px rgba(234, 88, 12, 0.055);
}
/* 装飾リングはクリックを奪わない */
.login-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 21px;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(251, 146, 60, 0.55),
    rgba(255, 255, 255, 0.2) 40%,
    rgba(234, 88, 12, 0.35)
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none !important;
  z-index: 0;
  opacity: 0.6;
  transition: opacity 0.35s var(--ease);
}
.login-card.is-engaged:focus-within::before {
  opacity: 0.32;
}
.login-card > * {
  position: relative;
  z-index: 1;
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}
.login-brand .mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 14px;
  animation: mark-pulse 3.2s ease-in-out infinite;
}
@keyframes mark-pulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(255,255,255,0.25) inset, 0 4px 14px var(--accent-glow); }
  50% { box-shadow: 0 0 0 1px rgba(255,255,255,0.35) inset, 0 6px 22px rgba(249, 115, 22, 0.4), 0 0 28px rgba(249, 115, 22, 0.2); }
}
.login-brand strong { display: block; font-size: 17px; letter-spacing: -0.02em; }
.login-brand .sub { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
.login-form { display: grid; gap: 14px; }
.login-form .form-row label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.login-form input {
  width: 100%;
  font: inherit;
  font-size: 14px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  transition:
    border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease),
    background 0.2s var(--ease);
}
.login-form input:hover {
  border-color: #d6d3d1;
}
.login-form input:focus {
  outline: none;
  border-color: var(--accent);
  background: #fffdfb;
  box-shadow:
    0 0 0 3px rgba(234, 88, 12, 0.16),
    0 2px 8px rgba(234, 88, 12, 0.08);
}
.login-form input:disabled {
  background: #f5f5f4;
  color: var(--muted);
}
.login-error {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--danger);
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 8px 10px;
  animation: login-err-in 0.25s var(--ease);
}
@keyframes login-err-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}
.btn-block {
  width: 100%;
  justify-content: center;
  padding: 12px 14px;
  margin-top: 4px;
  font-size: 14px;
  border-radius: 11px;
}
.btn-block:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  filter: none;
  box-shadow: none;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.user-chip {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: var(--accent-soft);
  color: var(--accent-deep);
  border-color: rgba(253, 186, 116, 0.6);
  font-weight: 650;
}

/* Row / table polish */
table.data tr.row-click {
  transition: background 0.15s var(--ease);
}
table.data tr.row-click:hover {
  background: #fff7ed;
}
table.data tr.is-selected {
  background: linear-gradient(90deg, #ffedd5, #fff7ed);
  box-shadow: inset 3px 0 0 var(--accent);
}

/* Modal polish */
.modal-overlay {
  backdrop-filter: blur(4px);
}
.modal-card {
  animation: modal-in 0.28s var(--ease);
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .login-card:focus-within { transform: none; }
}
