/* Liunga Pipare - admin pages and installer */
@font-face { font-family: "Fell"; src: url(fonts/im-fell-double-pica-latin-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Alegreya Sans"; font-weight: 400; src: url(fonts/alegreya-sans-latin-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Alegreya Sans"; font-weight: 500; src: url(fonts/alegreya-sans-latin-500-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Alegreya Sans"; font-weight: 700; src: url(fonts/alegreya-sans-latin-700-normal.woff2) format("woff2"); font-display: swap; }

:root { --lime: #f3f4ef; --ink: #1b2126; --muted: #56615b; --green: #1e4b3c; --green-deep: #153529; --red: #a3242b; --line: #cfd5c9; --paper: #fff; }
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--lime); color: var(--ink); font: 400 1.0625rem/1.5 "Alegreya Sans", "Gill Sans", "Trebuchet MS", sans-serif; }
a { color: var(--green); }
a:hover { color: var(--red); }
h1, h2 { font-family: "Fell", Georgia, serif; font-weight: 400; line-height: 1.15; }
h1 { font-size: 2.2rem; margin: 0 0 1.2rem; }
h2 { font-size: 1.5rem; margin: 2rem 0 .7rem; }
h2:first-child { margin-top: 0; }
p { margin: 0 0 .9rem; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
[hidden] { display: none !important; }

.top { background: var(--green); color: var(--lime); display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 2rem; padding: .7rem max(1.25rem, calc((100% - 68rem) / 2)); }
.top a { color: inherit; text-decoration: none; }
.top :focus-visible { outline-color: var(--lime); }
.brand { font: 400 1.35rem "Fell", Georgia, serif; display: flex; align-items: center; gap: .6rem; }
.brand small { font: 400 .95rem "Alegreya Sans", sans-serif; opacity: .8; }
.seal { width: 2.2rem; height: 2.2rem; background: var(--lime); -webkit-mask: url(seal.png) center / contain no-repeat; mask: url(seal.png) center / contain no-repeat; }
.top nav { display: flex; flex-wrap: wrap; gap: .1rem 1.3rem; flex: 1; }
.top nav a { padding: .3rem 0; border-bottom: 2px solid transparent; }
.top nav a:hover, .top nav a[aria-current] { border-bottom-color: var(--lime); }
.who { display: flex; gap: 1.2rem; align-items: center; font-size: .95rem; }
.who form { margin: 0; }
button.link { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; }

main { width: min(100% - 2.5rem, 68rem); margin: 2rem auto 5rem; }
main.narrow { max-width: 40rem; }
.lead { font-size: 1.15rem; max-width: 44rem; }
.hint { color: var(--muted); font-size: .95rem; font-weight: 400; display: block; margin-top: .15rem; }
p.hint { margin-bottom: .9rem; max-width: 46rem; }

.flash { padding: .7rem 1rem; border-left: 4px solid var(--green); background: #e1ecdf; max-width: 46rem; }
.flash.err { border-color: var(--red); background: #f6e1df; }
.flash.warn { border-color: #b58a2a; background: #f5edd8; }

.card { background: var(--paper); border: 1px solid var(--line); padding: 1.4rem 1.5rem; margin-bottom: 1.5rem; }
.form { max-width: 46rem; }
.form label { display: block; font-weight: 500; margin-bottom: 1rem; }
.form input[type=text], .form input:not([type]), .form input[type=password], .form input[type=date], .form input[type=url], .form input[type=number], .form select, .form textarea {
  display: block; width: 100%; margin-top: .25rem; padding: .5rem .65rem; font: inherit; color: inherit; background: #fff; border: 1.5px solid #9aa596; border-radius: 2px; }
.form textarea { min-height: 7rem; resize: vertical; line-height: 1.45; }
.form input[type=date], .form input.short { width: auto; min-width: 11rem; }
.form label.check { font-weight: 400; display: flex; gap: .5rem; align-items: baseline; }
.form fieldset { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0 0; padding: 1.2rem 0 0; }
.form legend { font: 400 1.3rem "Fell", Georgia, serif; padding: 0 .6rem 0 0; }
.row2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0 1.2rem; }
.actions { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; margin-top: 1.2rem; }

.btn { display: inline-block; font: inherit; font-weight: 500; text-decoration: none; cursor: pointer; padding: .5rem 1.1rem; border-radius: 2px; border: 1.5px solid var(--ink); background: none; color: var(--ink); }
.btn:hover { background: var(--ink); color: #fff; }
.btn.primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn.primary:hover { background: var(--green-deep); }
.btn.danger { border-color: var(--red); color: var(--red); }
.btn.danger:hover { background: var(--red); color: #fff; }
.btn.small { padding: .2rem .6rem; font-size: .95rem; }
.btn[disabled] { opacity: .5; cursor: default; }

table.list { width: 100%; border-collapse: collapse; background: var(--paper); border: 1px solid var(--line); }
.list th, .list td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.list th { font-weight: 700; font-size: .95rem; background: #e9ece3; }
.list td.num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.list td.tools { white-space: nowrap; text-align: right; }
.list td.tools form { display: inline; }
.list .sub { color: var(--muted); font-size: .95rem; display: block; }
.scroll { overflow-x: auto; }

.tag { display: inline-block; font-size: .9rem; font-weight: 500; padding: .05rem .55rem; border-radius: 99px; background: #e1ecdf; color: var(--green-deep); white-space: nowrap; }
.tag.wait { background: #f5edd8; color: #6b4f0e; }
.tag.off { background: #e6e6e3; color: #4c4f4b; }
.tag.miss { background: #f6e1df; color: #7d1a20; }

.drop { border: 2px dashed #8f9b8b; background: #fff; padding: 1.6rem; text-align: center; margin-bottom: 1.5rem; }
.drop.over { border-color: var(--green); background: #e1ecdf; }
.drop p { margin: 0 0 .6rem; }
.drop input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.progress { text-align: left; margin: 1rem 0 0; padding: 0; list-style: none; }
.progress li { display: flex; gap: .8rem; align-items: center; padding: .25rem 0; border-top: 1px solid var(--line); }
.progress li span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress progress { width: 9rem; }
.progress .bad { color: var(--red); }

.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 1rem; margin: 0; padding: 0; list-style: none; }
.thumbs a { display: block; background: var(--paper); border: 1px solid var(--line); text-decoration: none; color: inherit; height: 100%; }
.thumbs a:hover { border-color: var(--green); }
.thumbs img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.thumbs span { display: block; padding: .4rem .6rem .1rem; line-height: 1.3; }
.thumbs small { display: block; padding: 0 .6rem .5rem; color: var(--muted); }
.preview { max-width: 22rem; display: block; margin-bottom: 1rem; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.tiles a { display: block; background: var(--paper); border: 1px solid var(--line); padding: 1.1rem 1.2rem; text-decoration: none; color: inherit; }
.tiles a:hover { border-color: var(--green); }
.tiles strong { display: block; font: 400 1.5rem "Fell", Georgia, serif; }
.tiles span { color: var(--muted); }

@media (max-width: 40rem) {
  .list th:nth-child(n+3):not(:last-child), .list td:nth-child(n+3):not(:last-child) { display: none; }
}

/* Groups */
.list tr.group-head th { background: var(--green); color: #fff; font: 400 1.2rem "Fell", Georgia, serif; padding: .45rem .8rem; }
.list tr.group-head .sub { color: #d9e0d4; display: inline; font: .95rem "Alegreya Sans", sans-serif; margin-left: .5rem; }
.group-pick { margin: 0; }
.group-pick select, .drop-group select { font: inherit; padding: .2rem .4rem; border: 1.5px solid #9aa596; border-radius: 2px; background: #fff; max-width: 19rem; }
.drop-group label { display: inline-flex; gap: .5rem; align-items: center; }
.drop-group { margin: .9rem 0 0; }
.inline-rename { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 0; }
.inline-rename input { flex: 1 1 16rem; padding: .35rem .55rem !important; margin: 0 !important; display: inline-block !important; width: auto !important; }
.groups .list td { vertical-align: middle; }
.groups .list .sub { margin-top: .3rem; }
.groups { margin-top: 2rem; }
