[hidden] { display: none !important; }
.admin { min-height: 100vh; background: radial-gradient(ellipse at 50% -10%, rgba(134, 190, 176, .1), transparent 55%), var(--night); }
.admin-top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px; padding: 14px var(--gutter); background: rgba(8, 28, 36, .9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.admin-top img { height: 30px; width: auto; }
.admin-label { font: italic 500 22px/1 var(--display); color: var(--brass); }
.admin-actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.admin-main { max-width: 1280px; margin: 0 auto; padding: 32px var(--gutter) 80px; }

.login { max-width: 380px; margin: 12vh auto 0; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.login h1 { font-size: 44px; }
.login p { color: var(--muted); margin: 0; }
.login input { width: 100%; padding: 14px 16px; border-radius: 2px; border: 1px solid var(--line); background: var(--deep); color: var(--paper); font: inherit; }
.login input:focus { outline: none; border-color: var(--brass); }
.login .btn { width: 100%; justify-content: center; }
.login-err { color: var(--ember) !important; min-height: 1.5em; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 28px; }
.stat { padding: 22px; border-radius: 2px; border: 1px solid var(--line); background: rgba(16, 47, 56, .45); }
.stat b { display: block; font: 600 48px/1 var(--display); color: var(--paper); margin-bottom: 6px; }
.stat span { color: var(--muted); font-size: 14px; }

.panel { padding: 26px; border-radius: 2px; border: 1px solid var(--line); background: rgba(12, 37, 46, .6); margin-bottom: 24px; }
.panel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; margin-bottom: 20px; }
.panel-head h2 { font-size: 30px; }
.panel-head p { margin: 0; color: var(--muted); font-size: 14px; }
.panel .filters { margin: 0; }

.bars { display: grid; gap: 12px; }
.bar { display: grid; grid-template-columns: 170px 1fr 150px; align-items: center; gap: 14px; font-size: 14px; }
.bar-track { height: 12px; border-radius: 2px; background: rgba(244, 235, 221, .07); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--brass), var(--ember)); }
.bar-num { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .bar { grid-template-columns: 1fr auto; } .bar-track { grid-column: 1 / -1; grid-row: 2; } }

.top-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.top-card { display: block; text-decoration: none; border-radius: 2px; overflow: hidden; background: var(--deep); border: 1px solid transparent; transition: border-color .2s; }
.top-card:hover { border-color: var(--brass); }
.top-card .thumb { position: relative; aspect-ratio: 16 / 9; }
.top-card img { width: 100%; height: 100%; object-fit: cover; }
.top-card .rank { position: absolute; top: 8px; left: 8px; font: 600 12px/1 var(--body); padding: 5px 9px; border-radius: 2px; background: rgba(8, 28, 36, .8); }
.top-card .count { position: absolute; top: 8px; right: 8px; font: 700 13px/1 var(--body); padding: 5px 10px; border-radius: 2px; background: var(--ember); color: var(--night); }
.top-card .meta { padding: 10px 12px 12px; }
.top-card .meta b { display: block; font: 500 18px/1.2 var(--display); }
.top-card .meta span { font-size: 12px; color: var(--muted); }

.notes { display: grid; gap: 12px; }
.note { display: grid; grid-template-columns: 140px 1fr auto; gap: 16px; align-items: start; padding: 14px; border-radius: 2px; background: var(--deep); }
.note img { width: 140px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 2px; }
.note .body { white-space: pre-wrap; word-break: break-word; font-size: 15px; margin: 4px 0 0; }
.note .where { font-size: 12px; color: var(--muted); }
.note .where a { color: var(--brass); text-decoration: none; }
.note .del { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 13px; padding: 4px 8px; border-radius: 8px; }
.note .del:hover { color: var(--ember); background: rgba(216, 128, 88, .1); }
.empty { color: var(--muted); font-style: italic; font-family: var(--display); font-size: 20px; margin: 0; }
@media (max-width: 640px) { .note { grid-template-columns: 1fr; } .note img { width: 100%; } }

.document-note{padding:24px;border-top:1px solid #aab6b6}.document-note blockquote{border-left:3px solid #ac8b5a;padding:12px;margin:16px 0;white-space:pre-wrap;overflow-wrap:anywhere}.document-body{white-space:pre-wrap;overflow-wrap:anywhere}.document-note label{display:block;margin-top:16px}.document-note select,#document-filter{font:inherit;padding:8px}#document-error{color:#ad3333}
