/* Artbid Tracker — modern stylesheet */

:root {
  /* Brand */
  --brand: #f94432;
  --brand-dark: #d6301f;
  --brand-soft: #fdece9;

  /* Surfaces & ink */
  --bg: #f5f6f8;
  --card: #ffffff;
  --ink: #1b2129;
  --text: #262d38;
  --muted: #67707e;
  --line: #e5e8ed;
  --line-strong: #d3d8e0;

  /* Semantic */
  --danger: #d92d20;
  --ok-bg: #e9f7ee;
  --ok-text: #177245;
  --err-bg: #fdecea;
  --err-text: #b42318;
  --warn-bg: #fdf3e1;
  --warn-text: #93610b;

  --radius: 12px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, .05);
  --shadow-md: 0 6px 20px rgba(17, 24, 39, .09);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

h1 { font-size: 23px; font-weight: 700; letter-spacing: -.015em; color: var(--ink); margin: 0; }
h2 { font-size: 16px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); margin: 30px 0 12px; }

main.container { padding-top: 28px; padding-bottom: 56px; min-height: calc(100vh - 130px); }

.footer { padding: 24px 20px 36px; font-size: 13px; }
.footer-inner { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.footer-sep { color: #cbd5e1; user-select: none; }
.footer-link { color: var(--muted); text-decoration: none; font-weight: 500; transition: color .15s; }
.footer-link:hover { color: var(--brand); text-decoration: underline; }

:focus-visible { outline: 3px solid rgba(249, 68, 50, .35); outline-offset: 1px; }

/* ---------- top bar ---------- */
.topbar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.topbar-inner { display: flex; align-items: center; gap: 22px; padding: 11px 20px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; }
.brand:hover { text-decoration: none; }
.brand img { height: 26px; display: block; }
.nav { display: flex; gap: 2px; flex: 1; flex-wrap: wrap; }
.nav a { color: #566170; font-size: 14px; font-weight: 500; padding: 7px 12px; border-radius: 8px; transition: background .15s, color .15s; }
.nav a:hover { background: #f2f4f7; color: var(--ink); text-decoration: none; }
.nav a.active { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
.topbar-user { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--brand), #ff8a63);
  color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .02em;
  display: inline-flex; align-items: center; justify-content: center;
}
.user-meta { display: flex; flex-direction: column; line-height: 1.2; }
.user-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.user-role { font-size: 11px; color: var(--muted); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 14px; border: 1px solid #c5cdd8; border-radius: var(--radius-sm);
  background: #eef2f6; color: #1e293b; font: inherit; font-size: 13.5px; font-weight: 600;
  cursor: pointer; transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
  line-height: 1.3;
}
.btn:hover {
  border-color: #94a3b8; background: #e2e8f0; color: #0f172a;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.12); text-decoration: none;
}
.btn:active { transform: translateY(1px); box-shadow: 0 1px 1px rgba(15, 23, 42, 0.08); }
.btn-primary {
  background: var(--brand); border-color: var(--brand-dark); color: #fff;
  box-shadow: 0 1px 3px rgba(249, 68, 50, .4);
}
.btn-primary:hover {
  background: var(--brand-dark); border-color: #b82415; color: #fff;
  box-shadow: 0 2px 5px rgba(249, 68, 50, .5);
}
.btn-danger {
  background: #fef2f2; border-color: #fca5a5; color: #dc2626;
  box-shadow: 0 1px 2px rgba(220, 38, 38, 0.08);
}
.btn-danger:hover {
  background: #fee2e2; border-color: #ef4444; color: #b91c1c;
  box-shadow: 0 2px 4px rgba(220, 38, 38, 0.15);
}
.btn-sm { padding: 5px 11px; font-size: 12.5px; border-radius: 7px; }
/* ---------- forms ---------- */
input[type=text], input[type=password], input[type=email], input[type=date], input[type=number], select, textarea {
  width: 100%; padding: 8px 11px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  font: inherit; font-size: 14px; background: #fff; color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(249, 68, 50, .14);
}
label { display: block; font-size: 13px; font-weight: 600; color: #3a4250; margin-bottom: 12px; }
label input, label select, label textarea, label .rte-wrapper, label .rte-editor { margin-top: 5px; font-weight: 400; }

.form-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.form-row label { flex: 1; min-width: 160px; }
.form-row .grow { flex: 2; }
.form-card { max-width: 720px; }
.form-actions { margin-top: 16px; }

.inline-form { display: inline-flex; align-items: center; gap: 6px; margin: 0; }

/* ---------- cards & layout ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; margin-bottom: 14px; box-shadow: var(--shadow-sm);
}
details.card summary { cursor: pointer; font-weight: 600; color: var(--ink); margin-bottom: 10px; }
details.card summary:hover { color: var(--brand-dark); }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 800px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------- tables ---------- */
.table {
  width: 100%; border-collapse: separate; border-spacing: 0; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
}
.table th, .table td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.table th {
  background: #fafbfc; font-size: 11px; text-transform: uppercase;
  letter-spacing: .07em; color: var(--muted); font-weight: 600;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #fafbfd; }
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table tr.inactive td { opacity: .55; }

/* ---------- badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .75; }
.badge-open        { background: #e7efff; color: #2457c5; }
.badge-in_progress { background: #fdf1d7; color: #96660a; }
.badge-doing       { background: #fdf1d7; color: #96660a; }
.badge-on_hold     { background: #eef1f5; color: #59636f; }
.badge-todo        { background: #eef1f5; color: #59636f; }
.badge-resolved    { background: #e2f4e9; color: #1a7a46; }
.badge-done        { background: #e2f4e9; color: #1a7a46; }
.badge-closed      { background: #e9eaee; color: #565a63; }
.badge-task-todo   { background: #eef1f5; color: #59636f; }
.badge-task-doing  { background: #fdf1d7; color: #96660a; }
.badge-task-done   { background: #e2f4e9; color: #1a7a46; }

.role-chip { display: inline-block; padding: 1px 8px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 11px; color: var(--muted); }

/* ---------- flashes ---------- */
.flash { padding: 11px 14px; border-radius: var(--radius-sm); margin-bottom: 12px; font-size: 14px; border: 1px solid transparent; }
.flash.ok   { background: var(--ok-bg); color: var(--ok-text); border-color: #bfe8cd; }
.flash.err  { background: var(--err-bg); color: var(--err-text); border-color: #f3c3bd; }
.flash.warn { background: var(--warn-bg); color: var(--warn-text); border-color: #efdcae; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.tab {
  padding: 6px 14px; border: 1px solid var(--line-strong); border-radius: 999px;
  background: #fff; color: #4a5462; font-size: 13px; font-weight: 550;
  transition: background .15s, border-color .15s, color .15s;
}
.tab:hover { text-decoration: none; border-color: #b7bfca; color: var(--ink); }
.tab.active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- stats (dashboard) ---------- */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 18px 0 8px; }
.stat { text-align: center; margin-bottom: 0; }
.stat-value { font-size: 26px; font-weight: 700; color: var(--ink); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 11px; color: var(--muted); margin-top: 3px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }


/* ---------- ticket list view (2-line rows) ---------- */
.ticket-list {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}
.ticket-row-item {
  padding: 13px 18px; border-bottom: 1px solid var(--line);
  transition: background .12s ease; cursor: pointer;
}
.ticket-row-item:last-child { border-bottom: none; }
.ticket-row-item:hover { background: #f8fafc; }
.ticket-line-primary {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin-bottom: 6px;
}
.ticket-title-group {
  display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0;
}
.ticket-num {
  font-size: 13.5px; font-weight: 700; color: var(--muted);
  flex-shrink: 0; font-variant-numeric: tabular-nums;
}
.ticket-subject {
  font-size: 15px; font-weight: 600; color: var(--ink);
  text-decoration: none; line-height: 1.4;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ticket-subject:hover { color: var(--brand-dark); text-decoration: underline; }
.ticket-status-group {
  display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.ticket-line-secondary {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--muted); line-height: 1.4;
}
.ticket-meta-cell {
  display: inline-flex; align-items: center; gap: 3px; white-space: nowrap;
}
.meta-tag { color: #8892a0; font-weight: 500; }
.meta-dot { color: #cbd5e1; font-weight: bold; user-select: none; }
/* ---------- ticket page ---------- */
.meta-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 14px; font-size: 14px; }
.ticket-desc { white-space: normal; color: #3a4250; }

.totals-row { display: flex; gap: 22px; flex-wrap: wrap; font-size: 14px; margin-bottom: 8px; }


.over { color: var(--danger); font-weight: 600; }

/* ---------- ticket view & content ---------- */
.ticket-meta { font-size: 13px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.ticket-meta strong { color: var(--ink); }

.ticket-content-card { margin-bottom: 20px; }
.ticket-card-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
.ticket-card-heading {
  font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); margin: 0;
}
.ticket-body { font-size: 14px; line-height: 1.6; }
.empty-desc { margin: 0; color: var(--muted); font-style: italic; }

.ticket-attachments {
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line);
}
.ticket-att-title { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.att-list { display: flex; flex-direction: column; gap: 4px; }

.ticket-edit-panel {
  margin-top: 16px; padding-top: 16px; border-top: 2px solid var(--line);
}

/* ---------- section headers with actions ---------- */
.section-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 32px 0 16px; flex-wrap: wrap;
}
.section-head h2 { margin: 0; font-size: 18px; font-weight: 700; color: var(--ink); }
.section-actions { display: inline-flex; align-items: center; gap: 10px; }

.panel-collapsible {
  margin-bottom: 22px; border: 1px solid #cbd5e1; box-shadow: var(--shadow-md);
  background: #fff; border-radius: var(--radius); padding: 18px 20px;
}
.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.panel-header h3 { margin: 0; font-size: 15px; font-weight: 700; color: var(--ink); }
.btn-close {
  background: none; border: none; font-size: 22px; line-height: 1;
  color: var(--muted); cursor: pointer; padding: 0 4px; border-radius: 4px;
}
.btn-close:hover { color: var(--ink); background: var(--line); }

/* ---------- tasks ---------- */
.task-card { padding: 12px 18px; margin-bottom: 10px; }
.task-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%;
  min-height: 32px;
}
.task-summary {
  display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0;
}
.task-summary .task-desc {
  font-weight: 600; color: var(--ink); font-size: 14px; line-height: 1.4; margin: 0;
}
.task-summary .badge { line-height: 1; vertical-align: middle; }

.task-actions {
  display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0;
}
.task-actions .task-spent {
  font-size: 13px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums;
  font-weight: 500; margin-right: 4px; line-height: 1;
}
.task-actions form { margin: 0; padding: 0; display: inline-flex; align-items: center; line-height: 1; }
.task-actions .btn {
  height: 30px; padding: 0 11px; font-size: 12.5px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
  box-sizing: border-box; line-height: 1; border-radius: 7px;
}
.task-edit-panel {
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line);
}

.edit-btn { color: #334155; border-color: #cbd5e1; background: #eef2f6; }
.edit-btn:hover, .edit-btn.active { background: #e2e8f0; border-color: #64748b; color: #0f172a; }
.btn.active { background: #cbd5e1; border-color: #64748b; color: #0f172a; }

.task-form { display: flex; align-items: center; gap: 8px; flex: 1; flex-wrap: wrap; margin: 0; }
.task-status { flex: 0 0 140px; }

.stats.stats-2 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); max-width: 460px; }
.stats.stats-3 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); max-width: 580px; }

.stat-status {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
}
.stat-status-val {
  min-height: 32px; display: flex; align-items: center; justify-content: center;
}
.status-quick-form { margin: 0; display: inline-flex; }
.status-select-wrap { position: relative; display: inline-flex; align-items: center; }
.status-dropdown {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  padding: 4px 26px 4px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 700; cursor: pointer;
  border: 1px solid transparent; transition: all .15s ease;
  line-height: 1.3; box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.status-dropdown:focus {
  outline: none; box-shadow: 0 0 0 3px rgba(249, 68, 50, .2);
}
.status-dropdown option { color: var(--ink); background: #fff; }
.status-dropdown-arrow {
  position: absolute; right: 9px; pointer-events: none; opacity: .7;
}

.status-dropdown-open {
  background: #e7efff; color: #2457c5; border-color: #bfd5fe;
}
.status-dropdown-open:hover { background: #dbe7fe; }

.status-dropdown-in_progress {
  background: #fdf1d7; color: #96660a; border-color: #fce1ab;
}
.status-dropdown-in_progress:hover { background: #fae7be; }

.status-dropdown-on_hold {
  background: #eef1f5; color: #59636f; border-color: #d8dee6;
}
.status-dropdown-on_hold:hover { background: #e3e7ee; }

.status-dropdown-resolved {
  background: #e2f4e9; color: #1a7a46; border-color: #bce7cc;
}
.status-dropdown-resolved:hover { background: #d2edd9; }

.status-dropdown-closed {
  background: #e9eaee; color: #565a63; border-color: #d1d5db;
}
.status-dropdown-closed:hover { background: #dedfe4; }
/* ---------- date picker with DD/MM/YYYY ---------- */
.date-picker-wrap {
  position: relative; display: inline-flex; align-items: center; width: 100%;
}
.date-picker-wrap .date-input-pt {
  padding-right: 34px; font-variant-numeric: tabular-nums; letter-spacing: .02em;
}
.date-picker-btn {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: none; padding: 4px; cursor: pointer;
  color: var(--muted); border-radius: 4px; display: inline-flex;
  align-items: center; justify-content: center; transition: color .15s, background .15s;
}
.date-picker-btn:hover { color: var(--brand); background: #f1f5f9; }

/* ---------- users page ---------- */
.user-email-form { display: inline-flex; align-items: center; gap: 5px; margin: 0; }
.user-email-input {
  width: 175px; height: 29px; padding: 3px 8px; font-size: 12.5px; border-radius: 6px;
}
.user-row-actions { display: flex; flex-direction: column; gap: 5px; align-items: flex-end; }
.user-actions-line1 { display: inline-flex; align-items: center; gap: 5px; }
.user-actions-line2 { display: inline-flex; align-items: center; }
.user-actions-line2 form { display: inline-flex; align-items: center; gap: 4px; margin: 0; }
.user-pass-input {
  width: 115px; height: 29px; padding: 3px 8px; font-size: 12px; border-radius: 6px;
}
.form-card .form-row label { display: inline-flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 13px; color: #3a4250; margin: 0 0 8px 0; flex: 1; }
.form-card .form-row .grow { flex: 2; }
.actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
textarea { min-height: 120px; resize: vertical; }
/* ---------- ticket stats strip ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 18px 0; }
.stats .stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; text-align: center; margin-bottom: 0; box-shadow: var(--shadow-sm);
}
.stats .num { font-size: 23px; font-weight: 700; color: var(--ink); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stats .lbl { font-size: 11px; color: var(--muted); margin-top: 3px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }

/* ---------- comments ---------- */
.comment { padding: 16px 18px; }
.comment-head { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.comment-head strong { color: var(--ink); }
.comment-body { white-space: pre-wrap; color: var(--text); }
.right { margin-left: auto; }

/* ---------- attachments ---------- */
.att-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.att-item:last-child { border-bottom: none; }
.thumb { height: 42px; border-radius: 6px; display: block; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }

/* ---------- gitea ---------- */
.git-card { margin-top: 20px; }
.git-ref { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.git-pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; background: #24292f; color: #fff; font-size: 11px; font-weight: 600; }
.git-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; }
.git-pill.git-open::before { background: #3fb950; }
.git-pill.git-closed::before { background: #a371f7; }
.git-pill.git-offline::before { background: #8b949e; }
.badge-git-open    { background: #e2f4e9; color: #1a7a46; }
.badge-git-closed  { background: #efeafd; color: #6741c9; }
.badge-git-offline { background: #eef1f5; color: #59636f; }

/* ---------- misc ---------- */
.muted { color: var(--muted); }
.empty { padding: 26px 18px; text-align: center; color: var(--muted); }
code { background: #f1f3f6; border-radius: 6px; padding: 1px 6px; font-size: 13px; }

/* ---------- auth pages ---------- */
.login-box { max-width: 420px; margin: 7vh auto 0; padding: 30px; border-radius: 16px; box-shadow: var(--shadow-md); }
.login-box h1 { text-align: center; font-size: 21px; margin-bottom: 20px; }
.auth-logo { display: block; height: 30px; margin: 2px auto 16px; }
.login-box .btn-primary { width: 100%; padding: 10px; margin-top: 4px; }


/* ---------- Rich Text Editor (RTE) ---------- */
.rte-wrapper {
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: #fff; overflow: hidden; transition: border-color .15s, box-shadow .15s;
  margin-top: 5px; margin-bottom: 12px; font-weight: 400;
}
.rte-wrapper:focus-within {
  border-color: var(--brand); box-shadow: 0 0 0 3px rgba(249, 68, 50, .14);
}
.rte-toolbar {
  display: flex; align-items: center; gap: 3px; padding: 6px 8px;
  background: #f8fafc; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.rte-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 26px; padding: 0 7px; background: transparent;
  border: 1px solid transparent; border-radius: 5px; color: #334155;
  font-size: 12px; font-weight: 600; cursor: pointer; transition: all .12s ease;
  user-select: none;
}
.rte-btn:hover { background: #e2e8f0; color: #0f172a; }
.rte-btn.active { background: #cbd5e1; color: #0f172a; border-color: #94a3b8; }
.rte-sep {
  display: inline-block; width: 1px; height: 16px;
  background: #cbd5e1; margin: 0 4px;
}
.rte-editor {
  min-height: 120px; max-height: 480px; overflow-y: auto;
  padding: 10px 14px; font-size: 14.5px; line-height: 1.6;
  color: var(--text); outline: none;
  font-weight: 400 !important; font-style: normal; text-align: left;
}
.rte-editor b, .rte-editor strong { font-weight: 700 !important; }
.rte-editor i, .rte-editor em { font-style: italic !important; }
.rte-editor u { text-decoration: underline; }
.rte-editor s, .rte-editor strike { text-decoration: line-through; }
.rte-editor[data-placeholder]:empty::before {
  content: attr(data-placeholder); color: var(--muted); pointer-events: none;
}
.rte-editor p { margin: 0 0 8px; }
.rte-editor p:last-child { margin-bottom: 0; }
.rte-editor h3 { margin: 10px 0 6px; font-size: 16px; color: var(--ink); }
.rte-editor ul, .rte-editor ol { margin: 4px 0 8px 20px; padding: 0; }
.rte-editor li { margin-bottom: 3px; }
.rte-editor blockquote {
  border-left: 3px solid var(--brand); margin: 8px 0; padding: 4px 12px;
  color: var(--muted); background: #fdf2f1; border-radius: 0 6px 6px 0;
}
.rte-editor code {
  background: #f1f5f9; border-radius: 4px; padding: 2px 6px;
  font-size: 13px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Rich text rendered content */
.rich-text-content { line-height: 1.6; }
.rich-text-content p { margin: 0 0 10px; }
.rich-text-content p:last-child { margin-bottom: 0; }
.rich-text-content ul, .rich-text-content ol { margin: 6px 0 10px 22px; padding: 0; }
.rich-text-content li { margin-bottom: 4px; }
.rich-text-content h3 { font-size: 16px; margin: 14px 0 6px; color: var(--ink); }
.rich-text-content blockquote {
  border-left: 3px solid var(--brand); margin: 10px 0; padding: 6px 14px;
  color: var(--muted); background: #fdf2f1; border-radius: 0 6px 6px 0;
}
.rich-text-content code {
  background: #f1f5f9; border-radius: 4px; padding: 2px 6px;
  font-size: 13px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.comment-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.comment-actions { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.comment-edit-panel { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
/* ---------- responsive ---------- */
@media (max-width: 640px) {
  .container { padding: 0 14px; }
  .topbar-inner { gap: 12px; }
  h1 { font-size: 20px; }
  .table th, .table td { padding: 8px 10px; }
  .table { display: block; overflow-x: auto; white-space: nowrap; }
  .user-meta { display: none; }
}