:root {
    --bg: #0f1115;
    --bg-2: #161a22;
    --bg-3: #1e2430;
    --border: #2a3141;
    --text: #e6e9ef;
    --muted: #8b93a5;
    --primary: #6366f1;
    --primary-2: #4f52d9;
    --danger: #ef4444;
    --ok: #22c55e;
    --warn: #f59e0b;
    --github: #8b5cf6;
    --reddit: #ff4500;
    --discord: #5865f2;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(0,0,0,.4);
}
* { box-sizing: border-box; }
/* el atributo hidden manda sobre cualquier display de estas hojas */
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
    background: var(--bg);
    color: var(--text);
    font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
    min-height: 100vh;
}
a { color: #a5b4fc; text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.35rem; margin: 0; font-weight: 650; }
h2 { font-size: 1.05rem; margin: 0 0 .75rem; font-weight: 600; }
h3 { font-size: .95rem; margin: 1.25rem 0 .5rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
code { background: var(--bg-3); padding: .1em .35em; border-radius: 4px; font-size: .92em; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.nowrap { white-space: nowrap; }
.inline { display: inline; }
.block { display: block; width: 100%; }
.stack { display: flex; flex-direction: column; gap: .6rem; }
.empty { color: var(--muted); font-style: italic; padding: 1rem .5rem; text-align: center; }

/* topbar */
.topbar {
    display: flex; align-items: center; gap: 1.25rem;
    padding: .55rem 1.25rem; background: var(--bg-2); border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 50;
}
.brand { font-weight: 700; color: var(--text); font-size: 1rem; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: .25rem; flex: 1; }
.nav-link { color: var(--muted); padding: .35rem .7rem; border-radius: 6px; font-weight: 500; }
.nav-link:hover { color: var(--text); background: var(--bg-3); text-decoration: none; }
.nav-link.active { color: var(--text); background: var(--bg-3); }
.topbar-right { display: flex; align-items: center; gap: .75rem; }
.sync-form { display: flex; align-items: center; gap: .5rem; }
.sync-last { font-size: .78rem; }
#sync-btn.busy .sync-icon { display: inline-block; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.user-menu { display: flex; align-items: center; gap: .5rem; }

.main { padding: 1.25rem; max-width: 1800px; margin: 0 auto; }
.bare-main { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 1rem; }

/* buttons & forms */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
    background: var(--bg-3); color: var(--text); border: 1px solid var(--border);
    padding: .5rem .9rem; border-radius: 8px; cursor: pointer; font: inherit; font-weight: 500;
    white-space: nowrap;
}
.btn:hover { border-color: #3b4458; text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-2); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); background: var(--bg-3); }
.btn-danger { color: #fca5a5; }
.btn-danger:hover { background: rgba(239,68,68,.15); border-color: var(--danger); }
.btn-sm { padding: .3rem .6rem; font-size: .82rem; }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0; color: #a5b4fc; cursor: pointer; font: inherit; font-size: .8rem; padding: 0; }
.link-btn:hover { text-decoration: underline; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=date], select, textarea {
    background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 8px;
    padding: .5rem .65rem; font: inherit; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(99,102,241,.5); outline-offset: 1px; border-color: var(--primary); }
textarea { resize: vertical; min-height: 60px; }
/* selects: no system chrome, own chevron drawn as an inline SVG background */
select {
    width: auto;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 2rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%238b93a5' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .6rem center;
    background-size: 10px 7px;
    text-overflow: ellipsis;
    transition: border-color .15s, background-color .15s;
}
select:hover:not(:disabled) { border-color: #3b4458; background-color: var(--bg-3); }
select:focus-visible { outline: 2px solid rgba(99,102,241,.5); outline-offset: 1px; border-color: var(--primary); }
select:disabled { opacity: .55; cursor: not-allowed; background-color: var(--bg-2); }
select::-ms-expand { display: none; }
/* the dropdown list itself is drawn by the OS: at least keep it in the dark palette */
select option, select optgroup {
    background: var(--bg-2);
    color: var(--text);
}
select option:disabled { color: var(--muted); }
/* multi-line selects show a list, not a closed box: drop the chevron */
select[multiple], select[size]:not([size="1"]) {
    background-image: none;
    padding-right: .65rem;
}

input[type=date] { cursor: pointer; }
input[type=date]::-webkit-calendar-picker-indicator { filter: invert(.65); cursor: pointer; }
input[type=color] { width: 34px; height: 34px; padding: 2px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); cursor: pointer; }
input[type=checkbox], input[type=radio] {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg);
    cursor: pointer;
    vertical-align: -2px;
    display: inline-grid;
    place-content: center;
    flex-shrink: 0;
    transition: background-color .15s, border-color .15s;
}
input[type=radio] { border-radius: 50%; }
input[type=checkbox]:hover:not(:disabled), input[type=radio]:hover:not(:disabled) { border-color: #3b4458; }
input[type=checkbox]::before {
    content: "";
    width: 9px;
    height: 9px;
    transform: scale(0);
    transition: transform .12s ease-out;
    background: #fff;
    clip-path: polygon(14% 44%, 0 65%, 44% 100%, 100% 16%, 84% 0, 41% 66%);
}
input[type=radio]::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fff;
    transform: scale(0);
    transition: transform .12s ease-out;
}
input[type=checkbox]:checked, input[type=radio]:checked { background: var(--primary); border-color: var(--primary); }
input[type=checkbox]:checked::before, input[type=radio]:checked::before { transform: scale(1); }
input[type=checkbox]:focus-visible, input[type=radio]:focus-visible { outline: 2px solid rgba(99,102,241,.5); outline-offset: 1px; }
input[type=checkbox]:disabled, input[type=radio]:disabled { opacity: .5; cursor: not-allowed; }

label { display: block; font-size: .85rem; color: var(--muted); }
label input, label select { margin-top: .25rem; }
label.small select { margin: 0 .25rem 0 0; display: inline; width: auto; }
/* las casillas llevan diseño propio: no tocar aquí ni display ni width, o se quedan en nada */
label.small input[type=checkbox] { margin: 0 .25rem 0 0; }

/* auth */
.auth-card { width: 100%; max-width: 380px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 14px; padding: 2rem; box-shadow: var(--shadow); }
.auth-brand { font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; }
.auth-card h1 { margin-bottom: 1rem; }
.auth-card form { display: flex; flex-direction: column; gap: .8rem; }

/* toasts */
.toasts { position: fixed; top: 4rem; right: 1rem; z-index: 100; display: flex; flex-direction: column; gap: .5rem; max-width: 420px; }
.toast { background: var(--bg-3); border: 1px solid var(--border); border-left: 4px solid var(--primary); padding: .65rem .9rem; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.4); animation: toast-in .2s ease-out; }
.toast-success { border-left-color: var(--ok); }
.toast-error { border-left-color: var(--danger); }
.toast-info { border-left-color: var(--primary); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-6px); } }

.alert { padding: .6rem .9rem; border-radius: 8px; border: 1px solid var(--border); margin: .75rem 0; }
.alert-error { border-color: var(--danger); background: rgba(239,68,68,.1); }
.alert-warn { border-color: var(--warn); background: rgba(245,158,11,.1); }

/* page head & filters */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; flex-wrap: wrap; }
.page-head h1 .muted { font-weight: 400; font-size: .95rem; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem; }
.filter-search { max-width: 280px; }
.filter-select { padding: .4rem 1.7rem .4rem .6rem; font-size: .85rem; max-width: 220px; background-position: right .5rem center; }
.chips { display: flex; gap: .3rem; }
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .65rem; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-2); cursor: pointer; font-size: .82rem; color: var(--muted); user-select: none; }
.chip input { display: none; }
.chip.on { color: #fff; border-color: transparent; }
.chip.on.chip-github { background: var(--github); }
.chip.on.chip-reddit { background: var(--reddit); }
.chip.on.chip-discord { background: var(--discord); }
.chip.on:not([class*="chip-"]) { background: var(--primary); }

/* lista personal */
.personal-list { list-style: none; margin: .6rem 0 0; padding: 0; }
.personal-item { display: flex; align-items: center; gap: .5rem; padding: .4rem 0; border-bottom: 1px solid var(--border); }
.personal-item:last-child { border-bottom: 0; }
.personal-item.done { opacity: .55; }
.personal-item.done .personal-text, .personal-item.done .personal-edit input { text-decoration: line-through; }
.personal-text { flex: 1; overflow-wrap: anywhere; }
.personal-edit { display: flex; align-items: center; gap: .4rem; flex: 1; }
.personal-edit input[type=text] { flex: 1; padding: .3rem .5rem; font-size: .9rem; }
.personal-edit .link-btn { opacity: 0; }
.personal-edit:focus-within .link-btn { opacity: 1; }
.personal-item .link-btn { color: var(--muted); }
.personal-item .link-btn:hover { color: #fca5a5; }
.personal-add { display: flex; gap: .4rem; margin-top: .7rem; }
.personal-add input[type=text] { flex: 1; }

/* inicio */
.view-as { display: flex; align-items: center; gap: .4rem; }
.view-as label { margin: 0; white-space: nowrap; }
.view-as-banner { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.home-stats { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.stat {
    display: flex; flex-direction: column; align-items: center; gap: .1rem; min-width: 108px;
    background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius);
    padding: .7rem 1rem; color: var(--muted);
}
.stat:hover { border-color: #3b4458; text-decoration: none; color: var(--text); }
.stat-num { font-size: 1.5rem; font-weight: 700; line-height: 1.1; }
.stat-label { font-size: .78rem; }
/* sin align-items: start, las tarjetas de una misma fila igualan su altura */
.home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; }
.home-source { display: flex; flex-direction: column; margin-bottom: 0; }
/* la lista crece y empuja el botón abajo; si no hay nada, el aviso se centra */
.home-source .empty { flex: 1; display: flex; align-items: center; justify-content: center; margin: 0; padding: 1.2rem .5rem; }
.home-source > form.personal-add { margin-top: auto; }
.home-source .section-head h2 { display: flex; align-items: center; gap: .5rem; font-size: 1rem; }
.home-list { list-style: none; margin: 0 0 .8rem; padding: 0; flex: 1; }
.home-list li { padding: .5rem 0; border-bottom: 1px solid var(--border); }
.home-list li:last-child { border-bottom: 0; }
.home-title { color: var(--text); font-weight: 550; display: block; overflow-wrap: anywhere; }
.home-meta { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; margin-top: .2rem; }
.home-empty { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; text-align: center; color: var(--muted); }
.home-sync { text-align: center; margin-top: 1rem; }

/* board */
.board { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(250px, 1fr)); gap: .9rem; align-items: start; overflow-x: auto; padding-bottom: 1rem; }
.column { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; max-height: calc(100vh - 190px); }
.column-head { display: flex; align-items: center; gap: .5rem; padding: .7rem .85rem; border-bottom: 1px solid var(--border); font-weight: 600; }
.column-head .dot { width: 10px; height: 10px; border-radius: 50%; }
.column-head .count { margin-left: auto; background: var(--bg-3); border-radius: 999px; padding: 0 .55rem; font-size: .78rem; color: var(--muted); }
.column-body { padding: .6rem; overflow-y: auto; display: flex; flex-direction: column; gap: .55rem; min-height: 120px; flex: 1; }
.column-body.drag-over { background: rgba(99,102,241,.08); outline: 2px dashed rgba(99,102,241,.5); outline-offset: -4px; border-radius: 8px; }
.more { text-align: center; font-size: .82rem; padding: .4rem; }

.card { background: var(--bg-3); border: 1px solid var(--border); border-radius: 8px; padding: .6rem .7rem; cursor: grab; box-shadow: var(--shadow); transition: border-color .15s; border-left-width: 3px; }
.card:hover { border-color: #3b4458; }
.card.dragging { opacity: .45; }
/* nadie ha contestado todavía y ya no es reciente: tinte ámbar SOBRE el fondo de la
   tarjeta (background-image, no background, para no borrar var(--bg-3)) */
/* sin borde propio: el borde izquierdo ámbar ya significa "prioridad alta" */
.card.unanswered { background-image: linear-gradient(rgba(245,158,11,.13), rgba(245,158,11,.13)); }
.card.unanswered:hover { background-image: linear-gradient(rgba(245,158,11,.2), rgba(245,158,11,.2)); }
.badge-unanswered { color: #fcd34d; border-color: rgba(245,158,11,.55); background: rgba(245,158,11,.12); }
.table tr.unanswered td { background-image: linear-gradient(rgba(245,158,11,.11), rgba(245,158,11,.11)); }
.table tr.unanswered:hover td { background-image: linear-gradient(rgba(245,158,11,.17), rgba(245,158,11,.17)); }
.card.prio-urgent { border-left-color: var(--danger); }
.card.prio-high { border-left-color: var(--warn); }
.card.prio-low { border-left-color: #475569; }
.card-top { display: flex; align-items: center; gap: .4rem; font-size: .74rem; color: var(--muted); margin-bottom: .3rem; }
.card-ref { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-title { display: block; color: var(--text); font-weight: 550; line-height: 1.35; margin-bottom: .35rem; overflow-wrap: anywhere; }
.card-meta { display: flex; align-items: center; gap: .5rem; font-size: .76rem; color: var(--muted); margin-top: .4rem; }
.card-author { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40%; }
.card-comments { margin-left: auto; }
.prio-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); margin-left: auto; }
.card.prio-urgent .prio-dot { background: var(--danger); }

.src { display: inline-block; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .1rem .4rem; border-radius: 4px; color: #fff; }
.src-github { background: var(--github); }
.src-reddit { background: var(--reddit); }
.src-discord { background: var(--discord); }
.labels { display: flex; flex-wrap: wrap; gap: .25rem; margin: .25rem 0; }
.label { display: inline-block; font-size: .7rem; font-weight: 600; padding: .05rem .45rem; border-radius: 999px; line-height: 1.5; }
.badge { display: inline-block; font-size: .7rem; padding: .05rem .45rem; border-radius: 4px; background: var(--bg); border: 1px solid var(--border); color: var(--muted); }
.badge-closed { color: #fca5a5; border-color: rgba(239,68,68,.5); }
.badge-pr { color: #c4b5fd; border-color: rgba(139,92,246,.55); background: rgba(139,92,246,.14); font-weight: 600; }
.badge-ours { color: #86efac; border-color: rgba(34,197,94,.5); }
.badge-ok { color: #86efac; border-color: rgba(34,197,94,.5); }
.badge-warn { color: #fcd34d; border-color: rgba(245,158,11,.5); }
.badge-err { color: #fca5a5; border-color: rgba(239,68,68,.5); }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; color: #fff; font-weight: 700; font-size: .75rem; flex-shrink: 0; }
.avatar:hover { text-decoration: none; }
.avatar-sm { width: 22px; height: 22px; font-size: .62rem; }
.avatar-empty { background: transparent; border: 1px dashed var(--border); color: var(--muted); }

/* table / list */
.table-wrap { overflow-x: auto; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: .55rem .7rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
.table tr:last-child td { border-bottom: 0; }
.table.compact th, .table.compact td { padding: .4rem .55rem; }
.w-check { width: 32px; }
.row-title { color: var(--text); font-weight: 550; }
.inline-select { padding: .25rem 1.4rem .25rem .5rem; font-size: .82rem; background-color: var(--bg); background-position: right .35rem center; background-size: 9px 6px; max-width: 100%; }
.inline-select.block { width: 100%; }
.prio-select.prio-urgent { color: #fca5a5; }
.prio-select.prio-high { color: #fcd34d; }
.prio-select.prio-low { color: var(--muted); }
.bulk-bar { display: flex; align-items: center; gap: .6rem; background: var(--bg-3); border: 1px solid var(--primary); border-radius: 8px; padding: .5rem .8rem; margin-bottom: .75rem; flex-wrap: wrap; }
.pagination { display: flex; gap: .3rem; margin-top: 1rem; justify-content: center; }
.pagination a, .pagination span { padding: .3rem .6rem; border-radius: 6px; background: var(--bg-2); border: 1px solid var(--border); }
.pagination .current { background: var(--primary); border-color: var(--primary); color: #fff; }

/* pestañas */
.tabs { display: flex; gap: .25rem; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin-bottom: 1rem; }
.tab {
    background: none; border: 1px solid transparent; border-bottom: 0; color: var(--muted);
    padding: .5rem .9rem; border-radius: 8px 8px 0 0; cursor: pointer; font: inherit; font-weight: 500;
    margin-bottom: -1px;
}
.tab:hover { color: var(--text); background: var(--bg-2); }
.tab.active { color: var(--text); background: var(--bg-2); border-color: var(--border); border-bottom-color: var(--bg-2); }
.tabs-enabled .panel { margin-bottom: 0; }

/* panels */
.panel { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.25rem; margin-bottom: 1rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
.label-row, .user-row { display: flex; gap: .5rem; align-items: center; margin-bottom: .5rem; flex-wrap: wrap; }
.label-row input[type=text], .user-row input[type=text], .user-row input[type=email], .user-row input[type=password] { flex: 1; min-width: 120px; }
.rule-form { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.rule-form input[type=text] { flex: 1; min-width: 200px; }
.reply-template { display: flex; flex-direction: column; gap: .4rem; padding: .75rem; border: 1px solid var(--border); border-radius: 8px; margin-bottom: .6rem; background: var(--bg); }
.row-actions { display: flex; gap: .4rem; }

/* navegación entre issues del conjunto filtrado */
.issue-nav { display: flex; align-items: center; gap: .75rem; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: .45rem .6rem; margin-bottom: .9rem; flex-wrap: wrap; }
.issue-nav-info { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.issue-nav-info a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.issue-progress { display: flex; align-items: center; gap: .5rem; flex: 1; min-width: 140px; }
.issue-progress-bar { flex: 1; height: 7px; background: var(--bg); border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.issue-progress-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--ok)); transition: width .3s; }

/* issue page */
.issue-page { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.25rem; align-items: start; }
.issue-main { min-width: 0; }
.issue-side { position: sticky; top: 4.2rem; display: flex; flex-direction: column; gap: .75rem; }
.side-block { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: .8rem .9rem; }
.side-label { display: flex; justify-content: space-between; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: .4rem; font-weight: 600; }
#translate-btn { align-self: flex-start; margin: .3rem 0; }
.issue-crumbs { display: flex; align-items: center; gap: .6rem; font-size: .85rem; margin-bottom: .4rem; flex-wrap: wrap; }
.issue-title { font-size: 1.4rem; line-height: 1.3; overflow-wrap: anywhere; }
.issue-sub { margin: .3rem 0 1rem; }
.issue-body { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.2rem; margin-bottom: 1.25rem; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .6rem; }
.section-head h2 { margin: 0; }
.comment, .note { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: .75rem 1rem; margin-bottom: .6rem; }
.comment.ours { border-color: rgba(34,197,94,.45); background: rgba(34,197,94,.05); }
/* mensaje escrito por alguien del equipo directamente en la fuente: su color */
.comment.from-team { border-left-width: 3px; }
.comment-head { display: flex; align-items: center; gap: .6rem; font-size: .85rem; margin-bottom: .35rem; flex-wrap: wrap; }
.reply-box, .notes, .timeline { margin-top: 1.5rem; }
.reply-box form { display: flex; flex-direction: column; gap: .6rem; }
.reply-tools { display: flex; align-items: center; gap: .6rem; }
.reply-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.reply-actions .btn { margin-left: auto; }
.reply-target { font-size: .85rem; background: var(--bg-3); padding: .4rem .7rem; border-radius: 6px; }
.note { background: rgba(245,158,11,.06); border-color: rgba(245,158,11,.3); }
.note-form { display: flex; gap: .5rem; align-items: flex-start; margin-top: .5rem; }
.note-form textarea { min-height: 44px; }
/* secciones plegables (Actividad): cerradas por defecto para no meter ruido */
details.collapsible > summary {
    cursor: pointer;
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: .5rem;
    list-style: none;
    display: flex;
    align-items: center;
    gap: .4rem;
    color: var(--muted);
}
details.collapsible > summary::-webkit-details-marker { display: none; }
details.collapsible > summary::before { content: "▸"; font-size: .8em; transition: transform .15s; }
details.collapsible[open] > summary { color: var(--text); }
details.collapsible[open] > summary::before { transform: rotate(90deg); }
details.collapsible > summary:hover { color: var(--text); }
.timeline ul { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: .3rem 0; border-bottom: 1px solid var(--border); font-size: .88rem; }
.label-picker { display: flex; flex-wrap: wrap; gap: .3rem; }
.label-option { cursor: pointer; }
.label-option input { display: none; }
.label-option .label { opacity: .4; border: 1px solid transparent; }
.label-option input:checked + .label { opacity: 1; box-shadow: 0 0 0 2px var(--bg-2), 0 0 0 3px rgba(255,255,255,.5); }

/* markdown */
.md { overflow-wrap: anywhere; }
.md p { margin: 0 0 .7rem; }
.md p:last-child { margin-bottom: 0; }
.md-code { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: .7rem .9rem; overflow-x: auto; font-size: .85rem; margin: .5rem 0; white-space: pre; }
.md-code code { background: none; padding: 0; }
.md-inline { background: var(--bg); }
.md-quote { border-left: 3px solid var(--border); margin: .5rem 0; padding: .2rem .8rem; color: var(--muted); }
.md-list { margin: .3rem 0 .7rem; padding-left: 1.4rem; }
.md-h { margin: .8rem 0 .4rem; font-size: 1rem; }
.md-img img { max-width: 100%; max-height: 420px; border-radius: 8px; border: 1px solid var(--border); display: block; margin: .4rem 0; }
.md hr { border: 0; border-top: 1px solid var(--border); margin: .8rem 0; }

.error-page { text-align: center; padding: 4rem 1rem; }
.error-page h1 { font-size: 3rem; }

@media (max-width: 1100px) {
    .board { grid-template-columns: repeat(var(--cols, 4), 280px); }
    .issue-page { grid-template-columns: 1fr; }
    .issue-side { position: static; }
    .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
    .topbar { flex-wrap: wrap; gap: .5rem; }
    .nav { order: 3; width: 100%; overflow-x: auto; }
    .main { padding: .75rem; }
    .sync-label, .sync-last { display: none; }
}

/* context menu */
.card { position: relative; }
.card-menu-btn { margin-left: auto; background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 .2rem; border-radius: 4px; opacity: 0; transition: opacity .15s; }
.card:hover .card-menu-btn, .card-menu-btn:focus { opacity: 1; }
.card-menu-btn:hover { background: var(--bg); color: var(--text); }
.card-top .prio-dot { margin-left: auto; }
.card-top .prio-dot + .card-menu-btn { margin-left: 0; }
.ctx-menu { position: fixed; z-index: 200; min-width: 200px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.55); padding: .3rem; font-size: .88rem; animation: toast-in .12s ease-out; user-select: none; }
.ctx-title { padding: .35rem .7rem .45rem; color: var(--muted); font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; border-bottom: 1px solid var(--border); margin-bottom: .25rem; }
.ctx-item { position: relative; display: flex; align-items: center; gap: .5rem; padding: .42rem .7rem; border-radius: 6px; cursor: pointer; color: var(--text); white-space: nowrap; }
.ctx-item:hover, .ctx-item.open { background: var(--bg-3); }
.ctx-item .ctx-check { width: 1em; color: var(--ok); font-weight: 700; flex-shrink: 0; }
.ctx-item .ctx-swatch { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.ctx-item .ctx-arrow { margin-left: auto; color: var(--muted); padding-left: 1rem; }
.ctx-sep { height: 1px; background: var(--border); margin: .3rem .2rem; }
.ctx-sub { display: none; position: absolute; top: -.35rem; left: 100%; min-width: 190px; max-height: 60vh; overflow-y: auto; background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.55); padding: .3rem; margin-left: 2px; }
.ctx-item.has-sub:hover > .ctx-sub, .ctx-item.open > .ctx-sub { display: block; }
.ctx-item.flip > .ctx-sub { left: auto; right: 100%; margin-left: 0; margin-right: 2px; }
.ctx-item.busy { opacity: .5; pointer-events: none; }
.ctx-item.danger { color: #fca5a5; }
.ctx-item.danger:hover { background: rgba(239,68,68,.15); }
.ctx-empty { padding: .4rem .7rem; color: var(--muted); font-style: italic; }
tr[data-id], li[data-id] { cursor: context-menu; }
.home-list li { transition: opacity .2s; }

/* project board */
.badge-milestone { color: #c4b5fd; border-color: rgba(139,92,246,.5); }
.badge-project { color: #c4b5fd; border-color: rgba(139,92,246,.5); text-decoration: none; margin-left: .3rem; }
.issue-sources { display: inline-flex; gap: .25rem; flex-wrap: wrap; }
.issue-sources .src { font-size: .62rem; padding: .05rem .3rem; }
.project-tabs { display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: .9rem; border-bottom: 1px solid var(--border); padding-bottom: .6rem; }
.project-tab { display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .75rem; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-2); color: var(--muted); font-weight: 500; }
.project-tab:hover { color: var(--text); border-color: #3b4458; text-decoration: none; }
.project-tab.active { color: var(--text); background: var(--bg-3); border-color: #3b4458; }
.project-tab .dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.project-tab .count { background: var(--bg); border-radius: 999px; padding: 0 .45rem; font-size: .75rem; }
.project-tab-manage { margin-left: auto; }
.project-row { display: flex; gap: .5rem; align-items: center; margin-bottom: .5rem; flex-wrap: wrap; }
.project-row input[type=text] { flex: 1; min-width: 120px; }
.release-form { display: flex; align-items: center; gap: .4rem; background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px; padding: .25rem .5rem; }
.release-form label { margin: 0; white-space: nowrap; }
.release-form input[type=text] { width: 7rem; padding: .25rem .45rem; font-size: .85rem; }
.page-actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.new-card-form { display: flex; flex-direction: column; gap: .6rem; }
.form-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.form-row input[type=text] { flex: 1; min-width: 200px; }
.card-edit { display: flex; flex-direction: column; gap: .6rem; margin: .4rem 0 1rem; }
/* pulsar para editar: el contenido se ve como texto hasta que se toca */
.editable { cursor: text; border-radius: 8px; transition: background-color .12s, box-shadow .12s; }
.editable:hover { background-color: var(--bg-3); box-shadow: 0 0 0 1px var(--border); }
h1.editable { cursor: text; padding: .1rem .4rem; margin-left: -.4rem; }
.side-block .release-form { padding: 0; border: 0; background: none; gap: .35rem; }
.side-block .release-form input[type=text] { width: auto; flex: 1; min-width: 0; }
.card-edit .title-input { font-size: 1.25rem; font-weight: 650; }
.quota { display: flex; align-items: center; gap: .6rem; max-width: 460px; margin: .6rem 0; }

/* modales */
.modal-backdrop {
    position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.6); padding: 1.5rem 1rem; animation: toast-in .12s ease-out;
}
.modal {
    display: flex; flex-direction: column; width: 100%; max-width: 720px; max-height: 88vh;
    background: var(--bg-2); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 24px 60px rgba(0,0,0,.6);
}
.modal-head { display: flex; align-items: center; gap: .6rem; padding: .8rem 1rem; border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 0; font-size: 1.05rem; flex: 1; overflow-wrap: anywhere; }
.modal-head .btn { margin-left: auto; }
.modal-body { padding: 1rem; overflow-y: auto; flex: 1; }
.modal-body h3 { margin-top: 1.2rem; }
.modal-foot { display: flex; align-items: center; gap: .5rem; padding: .7rem 1rem; border-top: 1px solid var(--border); flex-wrap: wrap; }
.modal-foot .muted { margin-right: auto; }
body.modal-open { overflow: hidden; }
.link-plain { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.link-plain:hover { text-decoration: underline; }
.subtask-meta { margin: .15rem 0 0 1.55rem; }
.subtask-add-btn { margin-top: .6rem; width: 100%; }
@media (max-width: 700px) { .modal { max-height: 94vh; } }

/* adjuntos */
.attachments { margin-top: 1.25rem; }
.attachment-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .7rem; }
.attachment { margin: 0; background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.attachment img, .attachment video { display: block; width: 100%; height: 130px; object-fit: cover; background: var(--bg); }
.attachment video { object-fit: contain; }
.attachment figcaption { display: flex; align-items: center; gap: .4rem; padding: .35rem .5rem; font-size: .8rem; }
.attachment figcaption a { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment figcaption .link-btn { color: var(--muted); }
.attachment figcaption .link-btn:hover { color: #fca5a5; }
.upload-form { margin-top: .7rem; }
.dropzone {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem;
    padding: 1.1rem .9rem; text-align: center; cursor: pointer;
    border: 1px dashed var(--border); border-radius: var(--radius); background: var(--bg-2);
    color: var(--muted); font-size: .88rem;
    transition: border-color .15s, background-color .15s, color .15s;
}
.dropzone:hover, .dropzone:focus-visible { border-color: #3b4458; color: var(--text); outline: none; }
.dropzone.dragover { border-color: var(--primary); border-style: solid; background: rgba(99,102,241,.12); color: var(--text); }
.dropzone.busy { cursor: progress; }
.dropzone-link { color: #a5b4fc; text-decoration: underline; }
.upload-progress { display: flex; align-items: center; gap: .5rem; width: 100%; max-width: 320px; margin-top: .5rem; }
.upload-progress-bar { flex: 1; height: 7px; background: var(--bg); border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.upload-progress-bar span { display: block; height: 100%; width: 0; background: var(--primary); transition: width .15s; }

/* subtareas */
.subtasks { margin-top: 1.5rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
.subtask-group { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem 1rem; }
.subtask-group .section-head { align-items: baseline; }
.subtask-group h2 { display: flex; align-items: center; gap: .45rem; margin: 0; }
.subtask { background: var(--bg); border: 1px solid var(--border); border-left: 3px solid var(--border); border-radius: 8px; padding: .5rem .7rem; margin-bottom: .45rem; }
.subtask.done { opacity: .6; }
.subtask.done .subtask-title { text-decoration: line-through; }
.subtask-head { display: flex; align-items: center; gap: .5rem; }
.subtask-title { font-weight: 550; flex: 1; overflow-wrap: anywhere; }
.subtask-progress { display: flex; gap: .3rem; flex-wrap: wrap; margin: .3rem 0; }
.chip-progress { font-size: .68rem; font-weight: 600; padding: .05rem .4rem; border: 1px solid; border-radius: 999px; }
.chip-progress.complete { background: rgba(34,197,94,.15); border-color: rgba(34,197,94,.5) !important; color: #86efac !important; }
@media (max-width: 900px) { .subtasks { grid-template-columns: 1fr; } }

.linked-issues { margin-top: 1.25rem; }
.linked-issue { display: flex; align-items: center; gap: .6rem; padding: .5rem .75rem; background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px; margin-bottom: .4rem; flex-wrap: wrap; }
.linked-issue .linked-title { color: var(--text); font-weight: 550; flex: 1; min-width: 200px; }
.link-form { position: relative; margin-top: .6rem; }
.search-results { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 12px 32px rgba(0,0,0,.5); max-height: 300px; overflow-y: auto; }
.search-result { display: flex; gap: .5rem; align-items: center; padding: .45rem .7rem; cursor: pointer; }
.search-result:hover { background: var(--bg-3); }
.search-result .muted { margin-left: auto; white-space: nowrap; }

.table .group-row td { background: var(--bg-3); color: var(--text); font-size: .82rem; }

/* vacaciones */
.month-nav { display: flex; align-items: center; gap: .25rem; }
.vac-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1rem; align-items: start; }
.vac-calendar { padding: 1rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { text-align: center; font-size: .74rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding-bottom: .25rem; }
.cal-day { min-height: 92px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: .3rem; display: flex; flex-direction: column; gap: 2px; }
.cal-day.is-out { opacity: .45; }
.cal-day.is-weekend { background: var(--bg-2); }
.cal-day.is-today { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.cal-num { font-size: .78rem; font-weight: 600; color: var(--muted); }
.cal-day.is-today .cal-num { color: var(--text); }
.cal-person {
    font-size: .72rem; line-height: 1.25; padding: .12rem .35rem; border-radius: 4px;
    border-left: 3px solid var(--primary); color: var(--text);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.vac-side { display: flex; flex-direction: column; gap: 1rem; }
.vac-side .panel { margin-bottom: 0; }
.vac-form { display: flex; flex-direction: column; gap: .55rem; }
.vac-form label { display: flex; flex-direction: column; gap: .2rem; }
.vac-dates { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.vac-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.vac-list li { display: flex; align-items: flex-start; gap: .5rem; }
.vac-item { flex: 1; min-width: 0; }
.vac-edit summary { color: var(--muted); cursor: pointer; margin-top: .2rem; }
.vac-edit[open] { margin-top: .4rem; padding: .5rem; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; }
.vac-edit form + form { margin-top: .5rem; }
@media (max-width: 900px) {
    .vac-layout { grid-template-columns: 1fr; }
    .cal-day { min-height: 70px; }
    .cal-person { font-size: .66rem; }
}
.home-away { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: .55rem .9rem; margin: 0 0 1rem; }
.away-person { display: inline-flex; align-items: center; gap: .35rem; }

/* patreon */
.src-patreon { background: #ff424d; }
.patreon-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1rem; align-items: start; }
.patreon-side { display: flex; flex-direction: column; gap: .75rem; }
.patreon-side .panel { margin-bottom: 0; }
.filter-search { width: auto; min-width: 200px; padding: .4rem .6rem; font-size: .85rem; }
.table-wrap { overflow-x: auto; }
.patreon-table td.num, .patreon-table th.num { text-align: right; }
.patron { display: flex; align-items: center; gap: .6rem; }
.patron-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--bg-3); }
.patreon-events { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.patreon-events .ev { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem; padding-left: .6rem; border-left: 3px solid var(--border); }
.patreon-events .ev-kind { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.patreon-events .ev-who { font-weight: 550; }
.patreon-events .ev-joined, .patreon-events .ev-recovered { border-left-color: var(--ok); }
.patreon-events .ev-joined .ev-kind, .patreon-events .ev-recovered .ev-kind { color: #86efac; }
.patreon-events .ev-left, .patreon-events .ev-declined { border-left-color: var(--danger); }
.patreon-events .ev-left .ev-kind, .patreon-events .ev-declined .ev-kind { color: #fca5a5; }
.patreon-events .ev-tier_change, .patreon-events .ev-amount_change { border-left-color: var(--primary); }
.home-patreon .ev { font-size: .9rem; }
@media (max-width: 900px) { .patreon-layout { grid-template-columns: 1fr; } }

/* ajustes › usuarios */
.user-cards { display: flex; flex-direction: column; gap: .6rem; }
.user-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); }
.user-card.is-inactive > summary { opacity: .6; }
.user-card > summary { display: flex; align-items: center; gap: .75rem; padding: .7rem .9rem; cursor: pointer; list-style: none; }
.user-card > summary::-webkit-details-marker { display: none; }
.user-card > summary::after { content: '›'; margin-left: auto; color: var(--muted); font-size: 1.2rem; line-height: 1; transition: transform .15s; }
.user-card[open] > summary::after { transform: rotate(90deg); }
.user-card[open] > summary { border-bottom: 1px solid var(--border); }
.user-card-title { display: flex; flex-direction: column; min-width: 0; }
.user-card-title strong { color: var(--text); }
.user-card-badges { display: flex; gap: .3rem; flex-wrap: wrap; }
.user-card form { padding: .9rem; }
.user-card h3 { margin: 1rem 0 .5rem; }
.user-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .6rem .9rem; }
.user-fields select { width: 100%; }
.user-fields input[type=color] { display: block; }
.user-card-foot { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-top: 1rem; }
.user-card-foot label { display: flex; align-items: center; gap: .35rem; }
