:root { color-scheme: light; }
body { font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }

.card { background: #fff; border: 1px solid #e4e4e7; border-radius: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; height: 2.25rem; padding: 0 .9rem;
  border-radius: 9px; font-size: .875rem; font-weight: 500; border: 1px solid #e4e4e7; background: #fff; color: #18181b;
  transition: background .15s, border-color .15s, opacity .15s; white-space: nowrap; cursor: pointer; }
.btn:hover { background: #f4f4f5; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: #18181b; border-color: #18181b; color: #fff; }
.btn-primary:hover { background: #27272a; }
.btn-danger { color: #b91c1c; }
.btn-danger:hover { background: #fef2f2; border-color: #fecaca; }
.btn-sm { height: 1.9rem; padding: 0 .65rem; font-size: .8rem; border-radius: 8px; }
.btn-ghost { border-color: transparent; background: transparent; }

.input, .select, .textarea { width: 100%; border: 1px solid #d4d4d8; border-radius: 9px; background: #fff; padding: .55rem .75rem;
  font-size: .875rem; color: #18181b; outline: none; transition: border-color .15s, box-shadow .15s; }
.input:focus, .select:focus, .textarea:focus { border-color: #18181b; box-shadow: 0 0 0 3px rgba(24,24,27,.08); }
.textarea { min-height: 6rem; resize: vertical; line-height: 1.5; }
.label { display: block; font-size: .8rem; font-weight: 500; color: #3f3f46; margin-bottom: .35rem; }

.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .55rem; border-radius: 999px; font-size: .72rem;
  font-weight: 600; line-height: 1.4rem; border: 1px solid transparent; white-space: nowrap; }
.badge-gray { background: #f4f4f5; color: #52525b; }
.badge-green { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.badge-amber { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.badge-red { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.badge-blue { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.badge-violet { background: #f5f3ff; color: #6d28d9; border-color: #ddd6fe; }

.tab { padding: .5rem .2rem; font-size: .875rem; font-weight: 500; color: #71717a; border-bottom: 2px solid transparent; white-space: nowrap; cursor: pointer; }
.tab:hover { color: #18181b; }
.tab.active { color: #18181b; border-color: #18181b; }

.table { width: 100%; font-size: .875rem; border-collapse: collapse; }
.table th { text-align: left; font-weight: 500; color: #71717a; font-size: .75rem; padding: .6rem .75rem; border-bottom: 1px solid #e4e4e7; background: #fafafa; }
.table td { padding: .65rem .75rem; border-bottom: 1px solid #f4f4f5; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }

.progress { height: .4rem; background: #f4f4f5; border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: #18181b; border-radius: 999px; }

.docx-host .docx-wrapper { background: #f4f4f5 !important; padding: 16px !important; }
.docx-host .docx-wrapper > section.docx { box-shadow: 0 1px 3px rgba(0,0,0,.08) !important; margin-bottom: 16px !important; }

.fade-in { animation: fade .18s ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.skeleton { background: linear-gradient(90deg, #f4f4f5 25%, #e4e4e7 37%, #f4f4f5 63%); background-size: 400% 100%; animation: sk 1.2s ease infinite; border-radius: 8px; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* rendered markdown */
.md { font-size: .9rem; line-height: 1.65; color: #3f3f46; overflow-wrap: anywhere; }
.md > * + * { margin-top: .75em; }
.md h1, .md h2, .md h3, .md h4 { font-weight: 600; color: #18181b; line-height: 1.3; }
.md h1 { font-size: 1.35rem; }
.md h2 { font-size: 1.1rem; margin-top: 1.6em; padding-bottom: .3em; border-bottom: 1px solid #e4e4e7; }
.md h3, .md h4 { font-size: 1rem; margin-top: 1.2em; }
.md > :first-child { margin-top: 0; }
.md ul { list-style: disc; padding-left: 1.5em; } .md ol { list-style: decimal; padding-left: 1.5em; }
.md li { padding-left: .15em; } .md li + li { margin-top: .4em; }
.md li::marker { color: #71717a; font-weight: 600; }
.md strong { color: #18181b; font-weight: 600; }
.md code { background: #f4f4f5; border-radius: 4px; padding: .1em .35em; font-size: .85em; }
.md pre { background: #18181b; color: #f4f4f5; border-radius: 8px; padding: .75em 1em; overflow-x: auto; }
.md pre code { background: none; padding: 0; color: inherit; }
.md blockquote { border-left: 3px solid #a1a1aa; background: #fafafa; border-radius: 0 8px 8px 0; padding: .6em 1em; color: #52525b; }
.md blockquote > * + * { margin-top: .4em; }
.md hr { border: 0; border-top: 1px solid #e4e4e7; }
.md a { color: #1d4ed8; text-decoration: underline; }

/* target of a notification link */
@keyframes flash { from { box-shadow: 0 0 0 4px #fde68a; } to { box-shadow: 0 0 0 0 transparent; } }
.flash { animation: flash 2.6s ease-out; border-radius: 12px; }
