Files
second-brain/static/style.css

503 lines
12 KiB
CSS

/* ─── Reset & Base ────────────────────────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 14px; }
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
background: #0f0f12;
color: #e8e8ee;
-webkit-font-smoothing: antialiased;
overscroll-behavior-y: contain;
}
.app {
max-width: 480px;
margin: 0 auto;
min-height: 100vh;
background: #141419;
width: 100%;
}
/* ─── Stats Bar ───────────────────────────────────────────────────────────── */
.stats-bar {
display: flex;
justify-content: space-around;
padding: 10px 8px;
background: linear-gradient(180deg, #1a1a22 0%, #131318 100%);
border-bottom: 1px solid #252530;
position: sticky;
top: 0;
z-index: 50;
}
.tabs-bar{
display:flex;
gap:8px;
padding:8px 12px 10px;
background:#141419;
border-bottom:1px solid #252530;
position: sticky;
top: 52px;
z-index: 45;
}
.tabs-bar .tab-btn{
flex:1;
background:#1e1e28;
border:1px solid #2a2a3a;
border-radius: 12px;
padding:10px 10px;
color:#cfd3ff;
font-weight:700;
font-size:0.82rem;
}
.tabs-bar .tab-btn.active{
border-color:#6c8af5;
box-shadow:0 0 0 1px rgba(108,138,245,0.22) inset;
}
.stat {
text-align: center;
min-width: 60px;
}
.stat-num {
display: block;
font-size: 1.3rem;
font-weight: 700;
color: #6c8af5;
line-height: 1.2;
}
.stat-label {
display: block;
font-size: 0.65rem;
color: #888899;
text-transform: uppercase;
letter-spacing: 0.5px;
margin-top: 2px;
}
/* ─── Search ──────────────────────────────────────────────────────────────── */
.search-box {
display: flex;
gap: 8px;
padding: 10px 12px;
background: #141419;
flex-wrap: wrap;
}
/* tab buttons styled via .tabs-bar */
/* ─── Panels (Graph/Status) ──────────────────────────────────────────────── */
.panel {
margin: 8px 12px;
background: #1a1a24;
border: 1px solid #252533;
border-radius: 14px;
padding: 10px 12px;
}
.panel-title {
font-size: 0.8rem;
text-transform: uppercase;
letter-spacing: 0.5px;
color: #9aa3d9;
margin-bottom: 8px;
}
.kv-row {
display: flex;
gap: 10px;
padding: 6px 0;
border-bottom: 1px solid #20202a;
}
.kv-row:last-child { border-bottom: none; }
.kv-key {
width: 110px;
color: #888899;
font-size: 0.78rem;
}
.kv-val {
flex: 1;
color: #e8e8ee;
font-size: 0.85rem;
word-break: break-word;
}
.pill {
display: inline-block;
margin: 2px 4px 2px 0;
padding: 2px 8px;
border-radius: 999px;
background: #2a2a3a;
color: #8a9aff;
font-size: 0.72rem;
}
.verdict-pill{
display:inline-block;
margin: 2px 6px 2px 0;
padding: 2px 8px;
border-radius: 999px;
font-size: 0.72rem;
font-weight: 800;
letter-spacing: 0.4px;
border: 1px solid #2a2a3a;
background: #1e1e28;
color: #cfd3ff;
}
.verdict-pill.v-true{ border-color:#2f6b3f; color:#aaf0b6; }
.verdict-pill.v-false{ border-color:#7a2c2c; color:#ffb3b3; }
.verdict-pill.v-prob-true{ border-color:#6c8af5; color:#cfd9ff; }
.verdict-pill.v-prob-false{ border-color:#b08a2a; color:#ffe2a3; }
.verdict-pill.v-unknown{ border-color:#3a3a55; color:#b9b9c9; }
.muted {
color: #888899;
font-size: 0.8rem;
margin-top: 6px;
}
.small { font-size: 0.75rem; }
/* Graph canvas */
#graphCanvas{
display:block;
margin: 8px auto 0;
background:#12121a;
border:1px solid #252533;
border-radius: 14px;
touch-action: none;
}
.graph-controls{
display:flex;
gap:8px;
padding: 10px 12px 0;
align-items:center;
flex-wrap: wrap;
}
.graph-controls .btn{
background:#1e1e28;
border:1px solid #2a2a3a;
border-radius: 10px;
padding: 8px 10px;
color:#cfd3ff;
font-weight:700;
font-size:0.82rem;
}
.graph-controls .btn.primary{
border-color:#6c8af5;
box-shadow:0 0 0 1px rgba(108,138,245,0.18) inset;
}
.graph-legend{
margin: 8px 12px 0;
padding: 10px 12px;
background:#1a1a24;
border:1px solid #252533;
border-radius: 14px;
color:#b9b9c9;
font-size:0.8rem;
line-height:1.4;
}
.legend-row{ display:flex; align-items:center; gap:8px; margin-top:6px; }
.legend-dot{ width:10px; height:10px; border-radius:50%; display:inline-block; }
.legend-dot.engram{ background:#6c8af5; }
.legend-dot.tag{ background:#8a9aff; }
.legend-dot.match{ background:#f7d154; }
.graph-hint{ padding: 4px 12px 10px; }
#searchInput {
flex: 1;
min-width: 0;
background: #1e1e28;
border: 1px solid #2a2a3a;
border-radius: 10px;
padding: 10px 14px;
color: #e8e8ee;
font-size: 0.95rem;
outline: none;
}
#searchInput:focus { border-color: #6c8af5; }
#filterSelect {
background: #1e1e28;
border: 1px solid #2a2a3a;
border-radius: 10px;
padding: 10px;
color: #e8e8ee;
font-size: 0.85rem;
outline: none;
min-width: 0;
}
#exportFormat {
background: #1e1e28;
border: 1px solid #2a2a3a;
border-radius: 10px;
padding: 10px;
color: #e8e8ee;
font-size: 0.85rem;
outline: none;
min-width: 0;
}
.btn-export {
background: #1e1e28;
border: 1px solid #2a2a3a;
border-radius: 10px;
padding: 10px 12px;
color: #cfd3ff;
font-weight: 700;
font-size: 0.85rem;
cursor: pointer;
min-width: 0;
}
.btn-export:active { transform: scale(0.98); }
/* ─── New Engram ──────────────────────────────────────────────────────────── */
.new-engram {
padding: 0 12px 8px;
display: flex;
flex-direction: column;
gap: 6px;
}
.new-engram textarea {
background: #1e1e28;
border: 1px solid #2a2a3a;
border-radius: 10px;
padding: 10px;
color: #e8e8ee;
font-size: 0.9rem;
resize: vertical;
min-height: 50px;
}
.new-engram input {
background: #1e1e28;
border: 1px solid #2a2a3a;
border-radius: 10px;
padding: 8px 10px;
color: #e8e8ee;
font-size: 0.85rem;
}
.new-engram button {
background: #3a7d3a;
border: none;
border-radius: 10px;
padding: 10px;
color: #fff;
font-weight: 600;
font-size: 0.95rem;
}
/* ─── Cards ───────────────────────────────────────────────────────────────── */
.cards {
padding: 4px 12px;
display: flex;
flex-direction: column;
gap: 10px;
}
.card {
background: #1a1a24;
border: 1px solid #252533;
border-radius: 14px;
overflow: hidden;
transition: transform 0.15s ease, border-color 0.2s ease;
touch-action: manipulation;
}
.card.selected {
border-color: #6c8af5;
box-shadow: 0 0 0 1px rgba(108,138,245,0.25) inset;
}
.card:active { transform: scale(0.985); }
.card.confirmed { border-left: 4px solid #3a7d3a; }
.card.rejected { border-left: 4px solid #8a3a3a; }
.card-header {
display: flex;
align-items: center;
gap: 8px;
padding: 10px 12px 6px;
border-bottom: 1px solid #20202a;
}
.conf-badge {
font-size: 0.75rem;
font-weight: 700;
color: #fff;
padding: 2px 8px;
border-radius: 20px;
min-width: 36px;
text-align: center;
}
.tags {
flex: 1;
display: flex;
flex-wrap: wrap;
gap: 4px;
}
.tag {
background: #2a2a3a;
color: #8a9aff;
font-size: 0.68rem;
padding: 2px 8px;
border-radius: 12px;
text-transform: uppercase;
letter-spacing: 0.3px;
}
.date {
font-size: 0.65rem;
color: #666677;
white-space: nowrap;
}
.card-body {
padding: 10px 12px;
font-size: 0.9rem;
line-height: 1.45;
color: #ccccdd;
cursor: pointer;
}
.card-footer {
display: flex;
align-items: center;
gap: 8px;
padding: 8px 12px 10px;
border-top: 1px solid #20202a;
}
.reason-input {
flex: 1;
background: #14141a;
border: 1px solid #2a2a3a;
border-radius: 8px;
padding: 6px 10px;
color: #b0b0c0;
font-size: 0.8rem;
}
.actions {
display: flex;
gap: 6px;
}
.actions button {
width: 34px;
height: 34px;
border-radius: 50%;
border: none;
font-size: 1rem;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: transform 0.1s;
}
.actions button:active { transform: scale(0.9); }
.btn-ok { background: #2a5a2a; }
.btn-no { background: #5a2a2a; }
.btn-archive { background: #2a2a4a; }
/* ─── Pagination ──────────────────────────────────────────────────────────── */
.pagination {
display: flex;
justify-content: center;
align-items: center;
gap: 16px;
padding: 14px;
}
.pagination button {
background: #252535;
border: none;
border-radius: 10px;
width: 40px;
height: 40px;
color: #e8e8ee;
font-size: 1.1rem;
}
.pagination button:disabled {
opacity: 0.3;
}
#pageNum {
font-weight: 700;
color: #6c8af5;
}
/* ─── Footer ──────────────────────────────────────────────────────────────── */
.footer {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 16px 20px;
color: #555566;
font-size: 0.75rem;
}
.refresh-btn {
background: #252535;
border: none;
border-radius: 50%;
width: 36px;
height: 36px;
color: #8888aa;
font-size: 1.2rem;
}
/* ─── Modal ───────────────────────────────────────────────────────────────── */
.modal {
display: none;
position: fixed;
inset: 0;
background: rgba(0,0,0,0.85);
z-index: 100;
overflow-y: auto;
padding: 20px 16px;
}
.modal.open { display: block; }
.modal-content {
background: #1a1a24;
border: 1px solid #333344;
border-radius: 16px;
padding: 20px 16px;
max-width: 480px;
margin: 0 auto;
position: relative;
}
.close-btn {
position: absolute;
top: 10px;
right: 14px;
background: none;
border: none;
color: #8888aa;
font-size: 1.5rem;
cursor: pointer;
}
.history {
list-style: none;
font-size: 0.8rem;
color: #9999aa;
}
.history li {
padding: 4px 0;
border-bottom: 1px solid #20202a;
}
.detail-content {
background: #14141a;
border-radius: 10px;
padding: 12px;
font-size: 0.88rem;
line-height: 1.5;
margin: 8px 0;
max-height: 40vh;
overflow-y: auto;
}
/* ─── Scrollbar ───────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #333344; border-radius: 4px; }
/* ─── Touch fix ───────────────────────────────────────────────────────────── */
@media (pointer: coarse) {
button, .card { -webkit-tap-highlight-color: transparent; }
}
/* ─── Small Screens ────────────────────────────────────────────────────────── */
@media (max-width: 420px) {
html { font-size: 13px; }
.stat { min-width: 48px; }
.stat-num { font-size: 1.15rem; }
.tabs-bar { top: 48px; }
.search-box { flex-wrap: wrap; }
#searchInput { flex: 1 0 100%; min-width: 0; }
#filterSelect, #exportFormat, .btn-export { flex: 1 1 auto; min-width: 0; }
.modal { padding: 14px 10px; }
.modal-content { padding: 16px 12px; }
}