:root {
  --teal: #033B45; --green: #17987A; --green-light: #5fd3b4;
  --ink: #033B45; --muted: #5B6B6D; --line: #e4ebeb; --bg: #f2f5f5; --card: #fff;
  --danger: #c0392b; --radius: 14px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Montserrat, system-ui, sans-serif; background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.5; }
.wrap { max-width: 960px; margin: 0 auto; padding: 28px 16px 60px; }
.wrap.narrow { max-width: 480px; padding-top: 10vh; }
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.logo { height: 26px; width: auto; }
header.top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
header.top .brand { margin: 0; }
.brand small { color: var(--muted); font-weight: 500; border-left: 1px solid var(--line); padding-left: 12px; }
.user { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.user img { width: 28px; height: 28px; border-radius: 50%; }
.card { background: var(--card); border-radius: var(--radius); padding: 28px; box-shadow: 0 1px 2px rgba(3,59,69,.06), 0 8px 24px rgba(3,59,69,.05); margin-bottom: 20px; }
h1 { font-size: 22px; margin: 0 0 6px; } h2 { font-size: 17px; margin: 0 0 16px; }
.muted { color: var(--muted); margin: 0 0 18px; }
.filename { word-break: break-word; }
.file-icon { width: 52px; height: 52px; border-radius: 50%; background: #e6f4f0; color: var(--green); display: grid; place-items: center; font-size: 24px; margin-bottom: 14px; }
.stack { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; }
input[type=password], input[type=text] { font: inherit; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; width: 100%; background: #fff; color: var(--ink); }
input:focus { outline: 2px solid var(--green-light); border-color: var(--green); }
.btn { font: inherit; font-weight: 600; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 10px; padding: 10px 16px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn:hover { border-color: var(--green); }
.btn.primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn.primary:hover { background: #128568; }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn.danger { color: var(--danger); }
.btn:disabled { opacity: .5; cursor: default; }
.error { color: var(--danger); font-size: 14px; margin: 0; }
.foot { text-align: center; color: var(--muted); font-size: 12px; }
.drop { border: 2px dashed #b9d3cd; border-radius: var(--radius); padding: 34px 16px; text-align: center; cursor: pointer; transition: .15s; background: #fafcfc; }
.drop.over { border-color: var(--green); background: #eef8f5; }
.drop strong { color: var(--green); }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.row > .field { flex: 1 1 220px; }
.progress { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress > div { height: 100%; width: 0; background: var(--green); transition: width .2s; }
.result { background: #eef8f5; border-radius: 10px; padding: 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.result input { flex: 1 1 240px; }
.tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.tabs button { font: inherit; font-size: 13px; font-weight: 600; border: 0; background: transparent; color: var(--muted); padding: 7px 12px; border-radius: 99px; cursor: pointer; }
.tabs button.active { background: var(--teal); color: #fff; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
td.name { font-weight: 600; word-break: break-word; min-width: 160px; }
td.nowrap, th.nowrap { white-space: nowrap; }
td.actions { white-space: nowrap; text-align: right; }
.tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--line); color: var(--teal); }
.tag.download { background: #dff3ec; color: var(--green); }
.tag.login { background: #e3eef7; color: #1f5b8a; }
.tag.bad { background: #fbe6e3; color: var(--danger); }
.empty { color: var(--muted); text-align: center; padding: 24px; }
.hidden { display: none !important; }
.login-box { display: grid; justify-items: center; gap: 14px; text-align: center; padding: 18px 0 6px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--teal); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; }
@media (max-width: 560px) { .card { padding: 20px; } td.actions .btn { margin-top: 4px; } }
.login-only { min-height: 80vh; display: grid; place-content: center; justify-items: center; gap: 12px; }
dialog.modal { border: 0; border-radius: var(--radius); padding: 0; width: min(960px, calc(100vw - 32px)); max-height: calc(100vh - 64px); color: var(--ink); box-shadow: 0 20px 60px rgba(3,59,69,.25); }
dialog.modal::backdrop { background: rgba(3,59,69,.45); }
.modal-head { display: flex; justify-content: space-between; align-items: start; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; }
#file-log-body { padding: 8px 24px 24px; }
.code-reveal { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-left: 4px; font-weight: 500; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; background: #eef8f5; color: var(--teal); padding: 3px 8px; border-radius: 6px; word-break: break-all; }
.btn.link { border: 0; background: none; color: var(--green); padding: 2px 4px; text-decoration: underline; }
.small-note { font-size: 12px; margin: 0; }
