:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --ink: #1c2430;
  --muted: #6b7684;
  --line: #e3e6ea;
  --accent: #2f6feb;
  --danger: #d23f3f;
  --ok: #2e9d5b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.err {
  background: #fdecec; color: var(--danger);
  padding: .6rem .8rem; border-radius: 8px; font-size: .9rem;
}

/* layout */
.center {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.wrap { max-width: 900px; margin: 0 auto; padding: 1.5rem 1rem 4rem; }

.bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: .8rem 1.2rem; background: var(--card); border-bottom: 1px solid var(--line);
}
.bar .brand { font-weight: 700; }
.bar nav { display: flex; align-items: center; gap: 1rem; }
.bar .who { color: var(--muted); font-size: .9rem; }

/* cards / forms */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 1.5rem; width: 100%; max-width: 360px;
  display: flex; flex-direction: column; gap: .9rem;
}
.card.inline { max-width: none; }
.card h1 { margin: 0 0 .2rem; font-size: 1.25rem; }
.card h2 { margin: 0; font-size: 1rem; }
.card.inline {
  flex-direction: row; flex-wrap: wrap; align-items: flex-end; margin-bottom: 2rem;
}
label { display: flex; flex-direction: column; gap: .3rem; font-size: .85rem; color: var(--muted); }
input {
  font: inherit; padding: .5rem .6rem; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; color: var(--ink);
}
input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }

button, .btn {
  font: inherit; font-weight: 600; cursor: pointer;
  padding: .55rem .9rem; border-radius: 8px; border: 1px solid transparent;
  background: var(--accent); color: #fff;
}
button:hover, .btn:hover { filter: brightness(.95); }
.ghost { background: none; border-color: var(--line); color: var(--ink); }
.link {
  background: none; border: none; color: var(--accent); padding: .1rem .2rem;
  font-weight: 500;
}
.link.danger { color: var(--danger); }

/* quota */
.quota { margin-bottom: 1.5rem; }
.quota-head { display: flex; justify-content: space-between; font-size: .9rem; margin-bottom: .4rem; }
.track { background: var(--line); border-radius: 999px; height: 8px; overflow: hidden; }
.fill { background: var(--accent); height: 100%; }

/* dropzone */
.drop {
  border: 2px dashed var(--line); border-radius: 12px; background: var(--card);
  padding: 1.6rem; text-align: center;
}
.drop.over { border-color: var(--accent); background: #eef3fe; }
.drop p { margin: .3rem 0; }

.queue { margin: 1rem 0; display: flex; flex-direction: column; gap: .5rem; }
.up-row {
  display: grid; grid-template-columns: 1fr 140px 90px; gap: .8rem; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: .5rem .8rem;
  font-size: .85rem;
}
.up-row.err { border-color: var(--danger); color: var(--danger); }
.up-row .track { height: 6px; }
.up-row .bar { background: var(--ok); height: 100%; width: 0; transition: width .2s; }
.up-row .status { text-align: right; color: var(--muted); }

/* tables */
table.files { width: 100%; border-collapse: collapse; margin: .5rem 0 2rem; background: var(--card); }
table.files th, table.files td {
  text-align: left; padding: .6rem .7rem; border-bottom: 1px solid var(--line); font-size: .9rem;
}
table.files th { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
table.files tr.is-pending { color: var(--muted); }
.row-actions { display: flex; gap: .7rem; white-space: nowrap; }

h1 { font-size: 1.15rem; margin: 1.5rem 0 .5rem; }

@media (max-width: 620px) {
  .up-row { grid-template-columns: 1fr 70px; }
  .up-row .track { display: none; }
  table.files thead { display: none; }
}
