:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --text: #1f2328;
  --muted: #6b7280;
  --line: #d9dce1;
  --accent: #1f5f8b;
  --accent-soft: #e8f0f6;
  --ok: #1d7a46;
  --err: #b42318;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 16px;
}

.card {
  width: 100%;
  max-width: 600px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 32px;
}

h1 { margin: 0; font-size: 1.5rem; font-weight: 600; letter-spacing: -0.01em; }
.sub { margin: 4px 0 28px; color: var(--muted); }
.muted { color: var(--muted); margin: 4px 0; }
.small { font-size: 0.85rem; }

label { display: block; font-weight: 500; margin-bottom: 6px; }
.login { max-width: 360px; margin: 0 auto; }
.login .lock { display: block; width: 36px; height: 36px; margin: 0 auto 18px; color: var(--accent); }
.field { position: relative; margin-bottom: 14px; }
.login .field input { margin-bottom: 0; padding-right: 92px; }
.eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; color: var(--muted); font-size: 0.85rem; padding: 6px 8px; border-radius: 4px;
}
.eye:hover { color: var(--text); background: var(--bg); }
.wide { width: 100%; padding: 12px 18px; }
input[type=password], input[type=text] {
  width: 100%;
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 14px;
}
input[type=password]:focus, input[type=text]:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }

button { font: inherit; cursor: pointer; }
.primary {
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 10px 18px;
  font-weight: 500;
}
.primary:hover { filter: brightness(1.1); }
.primary:disabled { opacity: 0.6; cursor: default; }
.link { background: none; border: 0; color: var(--muted); text-decoration: underline; padding: 0; }

.drop {
  border: 2px dashed var(--line);
  border-radius: 8px;
  padding: 40px 16px;
  text-align: center;
  transition: background 0.15s, border-color 0.15s;
}
.drop svg { width: 40px; height: 40px; color: var(--accent); }
.drop p { margin: 4px 0; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.list { list-style: none; padding: 0; margin: 20px 0 0; }
.item { border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; margin-bottom: 8px; }
.item .row { display: flex; justify-content: space-between; gap: 12px; font-size: 0.92rem; }
.item .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .state { color: var(--muted); white-space: nowrap; }
.bar { height: 6px; background: var(--bg); border-radius: 3px; margin-top: 8px; overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.2s; }
.item.ok .state { color: var(--ok); }
.item.ok .bar span { background: var(--ok); }
.item.err .state { color: var(--err); white-space: normal; text-align: right; }
.item.err .bar span { background: var(--err); }

.msg { margin: 12px 0 0; color: var(--err); text-align: center; font-size: 0.92rem; }
.foot { text-align: right; margin: 16px 0 0; font-size: 0.9rem; }

@media (max-width: 480px) {
  body { padding: 16px; }
  .card { padding: 20px; }
  .drop { padding: 28px 12px; }
}
