/* SoftGrid Labs — account pages (sign in, sign up, cabinet, admin) and the legal pages. Builds on base.css. */
.acc-main { position: relative; min-height: calc(100svh - 4rem); padding: 3.5rem 1rem 4rem; display: grid; place-items: start center; }
.acc-card { position: relative; width: min(100%, 24rem); padding: 1.5rem; border-radius: var(--radius-lg);
  background: var(--panel); border: 1px solid var(--border); }
.acc-card.wide { width: min(100%, 46rem); }
.acc-card .updated { margin: 0 0 .5rem; font-size: .8125rem; color: var(--muted); }
.acc-card h1 { margin: 0 0 .375rem; font-size: 1.5rem; font-weight: 600; letter-spacing: -.015em; line-height: 1.2; }
.acc-card > p { margin: 0 0 1.25rem; color: var(--muted); font-size: .875rem; }
.js .acc-card { animation: card-in .45s cubic-bezier(.2,.8,.2,1) both; }
@keyframes card-in { from { opacity: 0; transform: translateY(.75rem) scale(.99); } }
.acc-form { display: grid; gap: .875rem; }
.field { display: grid; gap: .375rem; }
.field span { font-size: .875rem; color: var(--text); font-weight: 500; }
.field input, .field textarea, .field select {
  width: 100%; height: 2.25rem; padding: 0 .75rem; border-radius: var(--radius); border: 1px solid var(--border); outline: 0; font: inherit; font-size: .875rem;
  color: var(--text); background: var(--bg); transition: border-color .15s, box-shadow .15s;
}
.field textarea { height: auto; min-height: 4.5rem; padding: .5rem .75rem; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgb(255 179 71 / .15); }
.acc-form .btn { width: 100%; height: 2.25rem; font-size: .875rem; }
.btn[disabled] { opacity: .6; cursor: default; }
.form-error { min-height: 1.25rem; margin: 0; padding: .5rem .75rem; border-radius: var(--radius); font-size: .8125rem; color: #ffa198;
  background: rgb(248 81 73 / .1); border: 1px solid rgb(248 81 73 / .4); }
.form-error:empty { display: none; }
.acc-links { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; padding-top: 1rem;
  border-top: 1px solid var(--border-muted); font-size: .8125rem; }
.check { display: flex; gap: .625rem; align-items: flex-start; font-size: .8125rem; color: var(--muted); }
.check input { margin-top: .2rem; accent-color: var(--green-btn); }
.done { text-align: center; }
.done .big-ico { width: 3rem; height: 3rem; margin: 0 auto 1rem; border-radius: 50%; display: grid; place-items: center; font-size: 1.375rem;
  color: var(--primary); background: var(--primary-dim); border: 1px solid rgb(255 179 71 / .35); animation: pop .5s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.notice { padding: .625rem .875rem; border-radius: var(--radius); font-size: .8125rem; color: #e3b341; background: rgb(187 128 9 / .15); border: 1px solid rgb(187 128 9 / .4); }
.hidden { display: none !important; }

/* ---------- cabinet ---------- */
.cab { display: grid; gap: .75rem; }
.cab-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .875rem 1rem; border-radius: var(--radius);
  background: var(--bg); border: 1px solid var(--border); }
.cab-row b { display: block; font-size: .875rem; font-weight: 600; }
.cab-row small { color: var(--muted); font-size: .8125rem; }
.cab-row .btn { height: 1.75rem; font-size: .8125rem; }
.status { display: inline-flex; align-items: center; gap: .375rem; padding: 0 .5rem; height: 1.375rem; border-radius: 2rem; font-size: .75rem; font-weight: 500; border: 1px solid; }
.status::before { content: ""; width: .375rem; height: .375rem; border-radius: 50%; background: currentColor; }
.status.on { color: var(--primary); background: var(--primary-dim); border-color: rgb(255 179 71 / .35); }
.status.off { color: var(--muted); background: transparent; border-color: var(--border); }
.status.warn { color: #e3b341; background: rgb(187 128 9 / .15); border-color: rgb(187 128 9 / .4); }
.status.bad { color: #ff7b72; background: rgb(248 81 73 / .1); border-color: rgb(248 81 73 / .4); }
.cab h2 { margin: .75rem 0 0; font-size: .875rem; font-weight: 600; color: var(--text); }
.danger-link { background: none; border: 0; padding: 0; font: inherit; font-size: .8125rem; color: var(--red); cursor: pointer; }
.danger-link:hover { text-decoration: underline; }

/* ---------- admin ---------- */
.adm { width: min(100%, 72rem); }
.adm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.adm-head h1 { margin: 0; font-size: 1.75rem; font-weight: 600; }
.adm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: .75rem; margin-bottom: 1.25rem; }
.adm-stat { padding: .75rem 1rem; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--border); }
.adm-stat b { display: block; font-size: 1.5rem; font-weight: 600; }
.adm-stat span { font-size: .75rem; color: var(--muted); }
.adm-stat.hl { border-color: rgb(255 179 71 / .5); }
.adm-bar { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; margin-bottom: .875rem; }
.tabs { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; flex-wrap: wrap; }
.tabs button { border: 0; border-left: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; font-size: .8125rem; font-weight: 500;
  padding: .375rem .875rem; cursor: pointer; }
.tabs button:first-child { border-left: 0; }
.tabs button:hover { background: var(--panel-2); }
.tabs button.on { background: var(--primary); color: #100c0b; }
.adm-search { flex: 1; min-width: 12rem; }
.adm-search input { height: 2rem; }
.table { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--bg); }
.trow { display: grid; grid-template-columns: minmax(0, 2fr) 9rem 9rem 7rem; gap: .75rem; align-items: center; padding: .625rem 1rem;
  border-top: 1px solid var(--border-muted); cursor: pointer; font-size: .875rem; }
.trow:first-child { border-top: 0; }
.trow:hover { background: var(--panel); }
.trow.head { cursor: default; font-size: .75rem; font-weight: 600; color: var(--muted); background: var(--panel); }
.trow .email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--text); }
.trow small { color: var(--muted); }
.empty-row { padding: 2rem; text-align: center; color: var(--muted); font-size: .875rem; }
.pager { display: flex; justify-content: center; gap: .5rem; margin-top: .875rem; }
.pager .btn { height: 1.75rem; font-size: .8125rem; }
@media (max-width: 760px) { .trow { grid-template-columns: minmax(0, 1fr) auto; } .trow > :nth-child(3), .trow > :nth-child(4) { display: none; } }

/* user sheet */
.sheet-wrap { position: fixed; inset: 0; z-index: 40; background: rgb(1 4 9 / .6); display: flex; justify-content: flex-end; }
.sheet { width: min(100%, 34rem); height: 100%; overflow-y: auto; padding: 1.5rem 1.5rem 2.5rem; background: var(--panel); border-left: 1px solid var(--border);
  animation: slide .3s cubic-bezier(.2,.8,.2,1) both; }
@keyframes slide { from { transform: translateX(2rem); opacity: 0; } }
.sheet-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.sheet h2 { margin: .375rem 0 .25rem; font-size: 1.25rem; font-weight: 600; word-break: break-all; }
.sheet h3 { margin: 1.5rem 0 .625rem; font-size: .875rem; font-weight: 600; }
.x-btn { border: 1px solid var(--border); background: var(--panel-2); color: var(--text); width: 2rem; height: 2rem; border-radius: var(--radius); cursor: pointer; font-size: 1rem; flex: none; }
.grant { display: flex; flex-wrap: wrap; gap: .5rem; }
.grant .btn, .sheet .actions .btn { height: 1.75rem; font-size: .8125rem; }
.grant-custom { display: flex; gap: .5rem; margin-top: .625rem; }
.grant-custom input { width: 6rem; height: 2rem; }
.grant-custom .field { flex: 1; }
.list { display: grid; gap: .375rem; }
.li { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem .75rem; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--border-muted); font-size: .8125rem; }
.li span:last-child { color: var(--muted); white-space: nowrap; }
.li.revoked { opacity: .55; }
.sheet .actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.btn.red { color: var(--red); background: var(--panel-2); }
.btn.red:hover { color: #fff; background: #da3633; border-color: #da3633; }
.toast-msg { position: fixed; left: 50%; bottom: 1.5rem; translate: -50% 0; z-index: 60; padding: .625rem 1rem; border-radius: var(--radius); font-size: .875rem;
  background: var(--panel-2); border: 1px solid var(--border); box-shadow: 0 .5rem 1.5rem rgb(1 4 9 / .6); animation: card-in .3s ease both; }

/* ---------- admin: projects, shares, files ---------- */
.top-tabs { margin-bottom: 1.25rem; }
.view-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .875rem; }
.view-bar small { color: var(--muted); }
.view-bar .btn { height: 1.75rem; font-size: .8125rem; }
.trow.p { grid-template-columns: minmax(0, 2fr) 9rem 6rem 6rem 7rem 6rem; }
.trow.s { grid-template-columns: minmax(0, 2fr) 9rem 6rem 7rem 7rem; }
.trow.f { grid-template-columns: minmax(0, 2fr) 5.5rem 7rem 5.5rem minmax(0, 1.4fr) 11rem; }
.trow.static { cursor: default; }
.trow.static:hover { background: transparent; }
.trow .used { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-btns { display: flex; gap: .375rem; justify-content: flex-end; }
.row-btns .btn { height: 1.625rem; padding: 0 .5rem; font-size: .75rem; }
.pname { display: flex; align-items: center; gap: .625rem; }
.pname img, .pname i { width: 1.5rem; height: 1.5rem; flex: none; border-radius: .375rem; object-fit: contain; background: var(--panel-2); }
@media (max-width: 760px) {
  .trow.p, .trow.s, .trow.f { grid-template-columns: minmax(0, 1fr) auto; }
  .trow.p > :nth-child(n+3), .trow.s > :nth-child(n+3), .trow.f > :nth-child(n+3):not(:last-child) { display: none; }
  .trow.f > :nth-child(2) { display: block; }
}

/* upload area and progress rows */
.drop { display: flex; align-items: center; justify-content: center; gap: .75rem; flex-wrap: wrap; padding: 1.125rem 1rem; border-radius: var(--radius);
  border: 1px dashed var(--border-strong); background: var(--bg); color: var(--muted); font-size: .875rem; transition: border-color .15s, background .15s; }
.drop.over { border-color: var(--primary); background: var(--primary-dim); color: var(--text); }
.drop .btn { height: 1.75rem; font-size: .8125rem; }
.up-list { display: grid; gap: .5rem; margin-top: .5rem; }
.up-row { padding: .5rem .75rem; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--border-muted); font-size: .8125rem; }
.up-top { display: flex; align-items: center; gap: .625rem; }
.up-top b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.up-top small, .up-row > small { color: var(--muted); }
.up-top .x-btn { width: 1.5rem; height: 1.5rem; font-size: .875rem; }
.bar { height: .25rem; margin: .375rem 0 .25rem; border-radius: 2px; background: var(--panel-2); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--primary); transition: width .2s; }
.up-row.done .bar i { background: var(--green); }
.up-row.failed { border-color: rgb(248 81 73 / .5); }
.up-row.failed .bar i { background: var(--red); }
.up-row.failed > small { color: #ffa198; }

/* sheets with forms */
.sheet.wide { width: min(100%, 40rem); }
.stack { display: grid; gap: .875rem; margin-top: 1.25rem; }
.stack h3 { margin: .75rem 0 0; }
.form-row { display: flex; gap: .75rem; }
.form-row > * { flex: 1; min-width: 0; }
@media (max-width: 520px) { .form-row { flex-direction: column; } }
.field .hint { color: var(--faint); font-size: .75rem; }
.field textarea { font-family: inherit; }
.linkbox { display: grid; gap: .625rem; padding: .875rem 1rem; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--border); }
.linkbox input { width: 100%; height: 2.25rem; padding: 0 .75rem; border-radius: var(--radius); border: 1px solid var(--border); font: .8125rem var(--mono); color: var(--text); background: var(--bg-inset); }
.link-top { display: flex; align-items: center; gap: .625rem; }
.pick { display: grid; gap: .125rem; max-height: 13rem; overflow-y: auto; padding: .375rem; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--border); }
.pick .check { align-items: center; padding: .25rem .375rem; border-radius: var(--radius); color: var(--text); }
.pick .check:hover { background: var(--panel); }
.pick .check span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick .check small { color: var(--muted); }

/* live preview of a project card */
.pv { --accent: var(--primary); position: relative; padding: .875rem 1rem 1rem; border-radius: var(--radius-lg); background: var(--bg); border: 1px solid var(--border); overflow: hidden; }
.pv::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--accent); }
.pv-head { display: flex; align-items: center; gap: .625rem; }
.pv-head img, .pv-head i { width: 2rem; height: 2rem; flex: none; border-radius: .5rem; object-fit: contain; background: color-mix(in srgb, var(--accent) 12%, var(--bg)); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.pv-head div { flex: 1; min-width: 0; }
.pv-head b { display: block; font-size: 1rem; }
.pv-head small { color: var(--muted); font: .6875rem var(--mono); }
.pv p { margin: .625rem 0 0; color: var(--muted); font-size: .8125rem; }
.pv-tags { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .625rem; }
.pv-tags span { font: .625rem var(--mono); padding: .125rem .4rem; border-radius: var(--radius); color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }

/* a share page (share/) */
.share-files { display: grid; gap: .5rem; margin-top: 1.25rem; }
.share-file .btn { height: 1.75rem; font-size: .8125rem; flex: none; }
.share-file b { overflow-wrap: anywhere; }
.share-all { display: flex; align-items: center; gap: .75rem; margin-top: 1rem; }
.share-all small { color: var(--muted); }
#note { margin-top: .75rem; }
#note:empty { display: none; }
#expires:empty { display: none; }
