:root {
  --navy: #1b2d5b;
  --navy-2: #24407e;
  --orange: #f26a21;
  --gold: #f26a21;
  --bg: #f5f7fb;
  --card: #ffffff;
  --border: #e2e8f0;
  --text: #1e293b;
  --muted: #64748b;
  --blue: #2563eb;
  --green: #16a34a;
  --amber: #d97706;
  --red: #dc2626;
  --purple: #7c3aed;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(27, 45, 91, .06), 0 3px 10px rgba(27, 45, 91, .05);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; }
.hidden { display: none !important; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--text); }

/* ---------- login ---------- */
#login-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, #f8fafc 0%, #eef2f9 55%, #fdf0e7 100%); padding: 20px; }
.login-card { background: var(--card); padding: 40px 36px; border-radius: 16px; width: 100%; max-width: 400px; border: 1px solid var(--border); box-shadow: 0 16px 50px rgba(27, 45, 91, .12); text-align: center; }
.login-logo { width: 220px; max-width: 80%; margin: 0 auto 12px; display: block; }
.login-sub { color: var(--muted); font-size: 13px; margin-bottom: 24px; }
.login-card form { text-align: left; }
.login-card label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 14px; }
.login-card input { width: 100%; margin-top: 5px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; }
.login-card input:focus { outline: 2px solid var(--blue); border-color: transparent; }

/* ---------- topbar ---------- */
.topbar { display: flex; align-items: center; gap: 24px; background: #fff; color: var(--text); padding: 0 20px; height: 52px; position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--border); box-shadow: 0 1px 4px rgba(27,45,91,.05); }
.brand { display: flex; align-items: center; white-space: nowrap; }
.brand img { height: 26px; display: block; }
.tabs { display: flex; gap: 4px; flex: 1; }
.tab { background: none; border: none; color: #475569; padding: 8px 14px; border-radius: 8px; font-size: 13.5px; font-weight: 600; }
.tab:hover { color: var(--navy); background: #f1f5f9; }
.tab.active { color: var(--blue); background: #e8effc; }
.user-menu { display: flex; align-items: center; gap: 8px; }
.user-badge { font-size: 12.5px; color: var(--muted); }
.user-badge b { color: var(--text); }
.role-pill { display: inline-block; font-size: 10px; text-transform: uppercase; letter-spacing: .5px; background: #fdeadd; color: var(--orange); padding: 2px 7px; border-radius: 20px; margin-left: 6px; font-weight: 700; }

/* ---------- buttons ---------- */
.btn { border: 1px solid transparent; border-radius: 8px; padding: 8px 14px; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: #1d4fd8; }
.btn-gold { background: var(--orange); color: #fff; }
.btn-gold:hover { filter: brightness(1.06); }
.btn-ghost { background: transparent; color: inherit; border-color: transparent; }
.btn-ghost:hover { background: #f1f5f9; }
.btn-outline { background: #fff; border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }
.btn-danger { background: var(--red); color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- views ---------- */
.view { padding: 12px 20px 60px; }
.view-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.view-head h2 { font-size: 19px; margin-right: auto; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters select, .filters input { padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: #fff; font-size: 13px; }

/* ---------- board ---------- */
.board-scroll { overflow-x: auto; }
.board { min-width: 1240px; }
.board-header { display: grid; grid-template-columns: 260px repeat(7, 1fr); gap: 8px; position: sticky; top: 52px; z-index: 20; background: var(--bg); padding: 4px 0 6px; }
.col-head { text-align: center; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; padding: 7px 4px; border-radius: 8px; border: 1px solid transparent; }
.col-head.spacer { background: transparent; }
.ch-backlog { background: #eef1f5; color: #64748b; } .ch-requirements { background: #f1e9fd; color: #7c3aed; }
.ch-development { background: #e8effc; color: #2563eb; } .ch-testing { background: #fdf1dc; color: #b45309; }
.ch-uat { background: #e0f4f8; color: #0e7490; } .ch-signoff { background: #fce7f0; color: #be185d; }
.ch-production { background: #e7f7ec; color: #15803d; }

.phase-block { margin-bottom: 8px; }
.phase-title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); padding: 8px 2px 6px; }

.lane { display: grid; grid-template-columns: 260px repeat(7, 1fr); gap: 8px; margin-bottom: 8px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; box-shadow: var(--shadow); }
.lane-info { padding: 4px 6px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lane-title-row { display: flex; align-items: flex-start; gap: 6px; }
.lane-caret { background: none; border: none; color: var(--muted); font-size: 11px; padding: 3px 4px; border-radius: 5px; transition: transform .15s; }
.lane-caret:hover { background: var(--bg); }
.lane-caret.open { transform: rotate(90deg); }
.lane-title { font-weight: 700; font-size: 13.5px; line-height: 1.3; cursor: pointer; flex: 1; }
.lane-title:hover { color: var(--blue); }
.lane-meta { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.chip { font-size: 10.5px; padding: 2px 8px; border-radius: 20px; background: var(--bg); color: var(--muted); font-weight: 600; white-space: nowrap; }
.chip-product { background: #e8effc; color: #1d4fd8; }
.chip-owner { background: #fdf1dc; color: #92600a; }
.chip-tag { background: #f1e9fd; color: #6d28d9; }
.lane-progress { display: flex; align-items: center; gap: 7px; margin-top: 2px; }
.pbar { flex: 1; height: 5px; background: var(--bg); border-radius: 4px; overflow: hidden; }
.pbar > div { height: 100%; background: var(--green); border-radius: 4px; }
.pbar-label { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.lane-actions { display: flex; gap: 4px; margin-top: 2px; }
.lane-actions .btn { padding: 3px 8px; font-size: 11px; }

.cell { background: #f7f9fc; border: 1.5px dashed transparent; border-radius: 8px; min-height: 54px; padding: 5px; display: flex; flex-direction: column; gap: 5px; }
.cell.drag-over { border-color: var(--blue); background: #eaf1fe; }
.cell.prod-cell { background: #f0faf2; }

/* feature marker track — row 1 of every lane */
.cell.fcell { min-height: 40px; background: repeating-linear-gradient(90deg, #eef1f6 0, #eef1f6 6px, transparent 6px, transparent 12px) center / 100% 3px no-repeat, #fbfcfe; border: 1px solid #eef1f6; justify-content: center; }
.cell.fcell.prod-cell { background: repeating-linear-gradient(90deg, #d9efdf 0, #d9efdf 6px, transparent 6px, transparent 12px) center / 100% 3px no-repeat, #f7fcf8; }
.cell.fcell.fcell-here { border-color: transparent; }
.cell.fcell.drag-over { border: 1.5px dashed var(--blue); background: #eaf1fe; }
.cell.tcell { border-top: 1px solid #eef1f6; }

.fcard { background: var(--navy); color: #fff; border-radius: 8px; padding: 7px 10px; font-size: 12px; font-weight: 700; cursor: grab; line-height: 1.35; box-shadow: 0 2px 8px rgba(15,39,68,.35); display: flex; align-items: center; flex-wrap: wrap; gap: 4px 7px; }
.fcard.readonly { cursor: pointer; }
.fcard-flag { font-size: 8.5px; font-weight: 800; letter-spacing: .8px; background: var(--orange); color: #fff; padding: 1.5px 6px; border-radius: 4px; }
.fcard .fcard-sub { font-weight: 500; font-size: 10.5px; color: #b9c6d8; }
.fcard.prod { background: var(--green); }
.fcard.prod .fcard-flag { background: #fff; color: var(--green); }
.fcard:active { cursor: grabbing; }

.tcard { background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--blue); border-radius: 7px; padding: 6px 8px; font-size: 11.5px; cursor: grab; box-shadow: 0 1px 2px rgba(15,39,68,.07); line-height: 1.3; }
.tcard.readonly { cursor: pointer; }
.tcard:hover { border-color: var(--blue); }
.tcard.t-bug { border-left-color: var(--red); }
.tcard.t-subfeature { border-left-color: var(--purple); }
.tcard.t-improvement { border-left-color: var(--green); }
.tcard .t-meta { display: flex; gap: 5px; margin-top: 4px; align-items: center; flex-wrap: wrap; }
.t-type { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; padding: 1px 6px; border-radius: 4px; }
.t-type.task { background: #e8effc; color: #1d4fd8; }
.t-type.bug { background: #fde8e8; color: #b91c1c; }
.t-type.subfeature { background: #f1e9fd; color: #6d28d9; }
.t-type.improvement { background: #e7f7ec; color: #15803d; }
.t-prio { font-size: 9.5px; font-weight: 700; }
.t-prio.high, .t-prio.critical { color: var(--red); }
.t-prio.medium { color: var(--amber); }
.t-prio.low { color: var(--muted); }
.t-assignee { font-size: 9.5px; color: var(--muted); margin-left: auto; font-weight: 700; }
.dragging { opacity: .4; }

.add-task-cell { background: none; border: 1.5px dashed var(--border); color: var(--muted); border-radius: 7px; font-size: 11px; padding: 4px; font-weight: 600; }
.add-task-cell:hover { border-color: var(--blue); color: var(--blue); }

/* ---------- roadmap ---------- */
.roadmap-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat-tile { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.stat-tile .num { font-size: 30px; font-weight: 800; line-height: 1.1; }
.stat-tile .lbl { font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 3px; }
.stat-tile.s-done .num { color: var(--green); }
.stat-tile.s-progress .num { color: var(--blue); }
.stat-tile.s-planned .num { color: var(--muted); }
.stat-tile.s-total .num { color: var(--navy); }

.rm-group { margin-bottom: 26px; }
.rm-group-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.rm-group-head h3 { font-size: 15px; }
.rm-dot { width: 11px; height: 11px; border-radius: 50%; }
.rm-count { font-size: 12px; color: var(--muted); font-weight: 600; }
.rm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 12px; }
.rm-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.rm-card h4 { font-size: 14px; margin-bottom: 5px; }
.rm-card .rm-desc { font-size: 12px; color: var(--muted); line-height: 1.45; margin: 6px 0 10px; }
.rm-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11px; color: var(--muted); }
.stage-badge { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; color: #fff; padding: 2.5px 9px; border-radius: 20px; }

/* ---------- testing ---------- */
.env-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; margin-bottom: 30px; }
.env-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.env-head { padding: 12px 16px; display: flex; align-items: center; gap: 10px; }
.env-head.k-testing { background: #fdf1dc; color: #92600a; }
.env-head.k-uat { background: #e0f4f8; color: #0e7490; }
.env-head.k-production { background: #e7f7ec; color: #15803d; }
.env-head .chip { background: rgba(255,255,255,.75) !important; color: inherit !important; }
.env-head .icon-btn { color: inherit !important; }
.env-head h3 { font-size: 15px; flex: 1; }
.env-body { padding: 14px 16px; }
.env-row { font-size: 12.5px; margin-bottom: 7px; display: flex; gap: 6px; }
.env-row b { min-width: 56px; color: var(--muted); font-weight: 600; }
.env-row a { color: var(--blue); word-break: break-all; }
.env-notes { font-size: 12px; color: var(--muted); font-style: italic; margin: 8px 0; line-height: 1.4; }
.cred-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 12px; }
.cred-table th { text-align: left; color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .4px; padding: 5px 6px; border-bottom: 1px solid var(--border); }
.cred-table td { padding: 6px; border-bottom: 1px solid #eef1f6; }
.cred-pass { font-family: ui-monospace, Menlo, monospace; }
.icon-btn { background: none; border: none; padding: 2px 5px; border-radius: 5px; color: var(--muted); font-size: 12px; }
.icon-btn:hover { background: var(--bg); color: var(--text); }

.section-head { display: flex; align-items: center; gap: 10px; margin: 26px 0 12px; }
.section-head h3 { font-size: 16px; margin-right: auto; }
.data-table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); font-size: 13px; }
.data-table th { background: #f8fafc; color: #475569; text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.data-table td { padding: 10px 12px; border-bottom: 1px solid #eef1f6; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #f8fafd; }

/* ---------- admin ---------- */
.admin-grid { display: grid; grid-template-columns: 1fr; gap: 26px; }

/* ---------- modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(10, 22, 38, .55); display: flex; align-items: flex-start; justify-content: center; padding: 30px 16px; z-index: 100; overflow-y: auto; }
.modal { background: var(--card); border-radius: 14px; width: 100%; max-width: 560px; box-shadow: 0 24px 70px rgba(0,0,0,.35); display: flex; flex-direction: column; max-height: calc(100vh - 60px); }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; flex-shrink: 0; }
.modal-head h3 { font-size: 16px; flex: 1; }
.modal-close { background: none; border: none; font-size: 20px; color: var(--muted); padding: 2px 8px; border-radius: 6px; }
.modal-close:hover { background: var(--bg); }
.modal-body { padding: 18px 20px; overflow-y: auto; flex: 1; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; flex-shrink: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.fld { display: flex; flex-direction: column; gap: 4px; }
.fld label { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.fld input, .fld select, .fld textarea { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; background: #fff; }
.fld textarea { resize: vertical; min-height: 70px; }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: 2px solid var(--blue); border-color: transparent; }
.form-error { background: #fde8e8; color: #b91c1c; font-size: 12.5px; padding: 8px 12px; border-radius: 8px; margin: 10px 0; }
.modal-meta { font-size: 11px; color: var(--muted); margin-top: 10px; }
.danger-zone { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border); }

/* ---------- comments & attachments ---------- */
.modal.modal-wide { max-width: 940px; }
.lane-count { color: var(--muted); font-weight: 600; font-size: 12px; }

/* ---------- notification bell ---------- */
.bell-wrap { position: relative; }
#btn-bell { position: relative; font-size: 15px; }
.bell-count { position: absolute; top: -5px; right: -7px; background: var(--red); color: #fff; font-size: 9.5px; font-weight: 800; border-radius: 10px; padding: 1px 5px; min-width: 16px; text-align: center; line-height: 1.5; }
.bell-dropdown { position: absolute; right: 0; top: calc(100% + 10px); width: 380px; max-height: 460px; overflow-y: auto; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 14px 44px rgba(27,45,91,.18); z-index: 95; padding: 6px; }
.bell-empty { padding: 20px; font-size: 13px; color: var(--muted); text-align: center; }
.bell-section { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); padding: 8px 10px 4px; display: flex; align-items: center; gap: 8px; }
.bell-readall { margin-left: auto; background: none; border: none; color: var(--blue); font-size: 10.5px; font-weight: 700; text-transform: none; letter-spacing: 0; }
.bell-readall:hover { text-decoration: underline; }
.bell-item { display: block; width: 100%; text-align: left; background: none; border: none; border-radius: 8px; padding: 9px 10px; font-size: 12.5px; line-height: 1.45; color: var(--text); }
.bell-item:not(:last-child) { border-bottom: 1px solid #f1f5f9; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.bell-item + .bell-item { border-top-left-radius: 0; border-top-right-radius: 0; }
.bell-section { border-top: 1px solid var(--border); margin-top: 4px; }
.bell-section:first-child { border-top: none; margin-top: 0; }
.bell-item:hover { background: #f1f5f9; }
.bell-ref { font-family: ui-monospace, Menlo, monospace; font-size: 10px; color: var(--blue); font-weight: 700; background: #e8effc; padding: 1px 5px; border-radius: 4px; margin-right: 4px; }
.bell-sub { display: block; font-size: 10.5px; color: var(--muted); margin-top: 3px; }

/* ---------- refs, tokens, work links ---------- */
.chip-ref { font-family: ui-monospace, Menlo, monospace; background: #eef1f5; color: #475569; }
.t-ref { font-family: ui-monospace, Menlo, monospace; font-size: 9.5px; color: var(--muted); font-weight: 700; }
.token-row { display: flex; gap: 6px; }
.token-row input { flex: 1; font-family: ui-monospace, Menlo, monospace; font-size: 12px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: #f8fafc; }
.wl-row { display: flex; align-items: center; gap: 7px; font-size: 12.5px; background: #f8fafc; border: 1px solid var(--border); border-radius: 7px; padding: 6px 9px; margin-bottom: 5px; }
.wl-kind { font-size: 9px; font-weight: 800; text-transform: uppercase; padding: 1px 6px; border-radius: 4px; background: #e8effc; color: #1d4fd8; }
.wl-kind.pr { background: #f1e9fd; color: #6d28d9; }
.wl-kind.deploy { background: #e7f7ec; color: #15803d; }
.wl-kind.build { background: #fdf1dc; color: #92600a; }
.wl-kind.other { background: #eef1f5; color: #475569; }
.wl-row a { color: var(--blue); flex: 1; word-break: break-all; font-weight: 600; text-decoration: none; }
.wl-row a:hover { text-decoration: underline; }
.wl-row .wl-title { flex: 1; }
.wl-done a, .wl-done .wl-title { text-decoration: line-through; opacity: .6; }
.wl-add { display: grid; grid-template-columns: auto 1fr auto; gap: 6px; margin-top: 8px; }
.wl-add select, .wl-add input { padding: 7px 9px; border: 1px solid var(--border); border-radius: 7px; font-size: 12px; min-width: 0; }
.mv-files { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; justify-content: center; }

/* ---------- wish list & settings ---------- */
.idea-card { cursor: pointer; transition: box-shadow .12s, transform .12s; }
.idea-card:hover { box-shadow: 0 6px 20px rgba(27,45,91,.13); transform: translateY(-1px); }
.idea-promoted { opacity: .75; }
.chip-onboard { background: #e7f7ec; color: #15803d; }
.set-add { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; margin-top: 10px; }
.set-add input { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; min-width: 0; }

/* ---------- image lightbox ---------- */
.att-thumb img { cursor: zoom-in; }
.lightbox-backdrop { position: fixed; inset: 0; background: rgba(8, 14, 26, .85); z-index: 300; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 12px; padding: 30px; }
.lightbox-backdrop img { max-width: 92vw; max-height: 82vh; border-radius: 10px; background: #fff; box-shadow: 0 20px 80px rgba(0,0,0,.5); }
.lightbox-close { position: fixed; top: 14px; right: 18px; background: rgba(255,255,255,.14); color: #fff; border: none; font-size: 26px; width: 42px; height: 42px; border-radius: 10px; line-height: 1; }
.lightbox-close:hover { background: rgba(255,255,255,.28); }
.lightbox-cap { color: #cbd5e1; font-size: 12px; text-align: center; }
.t-badge { font-size: 9.5px; color: var(--muted); font-weight: 700; background: var(--bg); padding: 1px 5px; border-radius: 4px; }
.t-comment { margin-top: 5px; padding-top: 4px; border-top: 1px dashed #eef1f6; font-size: 10.5px; color: var(--muted); line-height: 1.35; }
.t-comment b { color: var(--text); }
.lane-comment { font-size: 11px; color: var(--muted); line-height: 1.4; background: #f8fafc; border-radius: 6px; padding: 5px 8px; }
.lane-comment b { color: var(--text); }

.detail-loading { margin-top: 16px; color: var(--muted); font-size: 12.5px; }
.detail-split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.detail-col h4 { font-size: 13px; margin-bottom: 10px; }
.det-empty { font-size: 12px; color: var(--muted); font-style: italic; margin-bottom: 8px; }

.att-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.att-thumb { position: relative; width: 74px; height: 74px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--bg); }
.att-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.att-thumb .att-del { position: absolute; top: 2px; right: 2px; background: rgba(0,0,0,.55); color: #fff; border: none; border-radius: 5px; width: 18px; height: 18px; font-size: 12px; line-height: 1; display: none; }
.att-thumb:hover .att-del { display: block; }
.att-links { display: flex; flex-direction: column; gap: 5px; margin-bottom: 10px; }
.att-link { display: flex; align-items: center; gap: 8px; font-size: 12.5px; background: #f8fafc; border: 1px solid var(--border); border-radius: 7px; padding: 6px 9px; }
.att-link a { color: var(--blue); font-weight: 600; word-break: break-all; flex: 1; text-decoration: none; }
.att-link a:hover { text-decoration: underline; }
.att-by { font-size: 10.5px; color: var(--muted); white-space: nowrap; }

.dropzone { border: 2px dashed var(--border); border-radius: 10px; padding: 14px; text-align: center; font-size: 12px; color: var(--muted); margin-bottom: 8px; transition: all .15s; }
.dropzone.dz-over { border-color: var(--blue); background: #eaf1fe; color: var(--blue); }
.file-pick { color: var(--blue); font-weight: 700; cursor: pointer; }
.file-pick:hover { text-decoration: underline; }
.link-row { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; }
.link-row input { padding: 7px 9px; border: 1px solid var(--border); border-radius: 7px; font-size: 12px; min-width: 0; }
.link-row input#lk-label { max-width: 110px; }

.comment-list { display: flex; flex-direction: column; gap: 8px; max-height: 280px; overflow-y: auto; margin-bottom: 10px; }
.comment { background: #f8fafc; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; }
.c-head { font-size: 11.5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.c-to { color: var(--orange); font-weight: 700; }
.c-time { color: var(--muted); font-size: 10px; margin-left: auto; }
.c-body { font-size: 12.5px; line-height: 1.45; margin-top: 4px; white-space: pre-wrap; word-break: break-word; }
.comment-form { display: flex; flex-direction: column; gap: 6px; }
.comment-form input, .comment-form textarea { padding: 7px 9px; border: 1px solid var(--border); border-radius: 7px; font-size: 12.5px; }
.comment-form textarea { min-height: 54px; resize: vertical; }
.comment-form button { align-self: flex-end; }

@media (max-width: 700px) { .detail-split { grid-template-columns: 1fr; } }

/* ---------- toast ---------- */
#toast-root { position: fixed; bottom: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--navy); color: #fff; padding: 11px 18px; border-radius: 10px; font-size: 13px; box-shadow: 0 8px 24px rgba(0,0,0,.3); animation: toast-in .2s ease; }
.toast.err { background: var(--red); }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; height: auto; padding: 8px 12px; gap: 8px; }
  .form-grid { grid-template-columns: 1fr; }
}
