* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background: #f6f6f7;
  color: #222;
  -webkit-font-smoothing: antialiased;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
}

.brand {
  font-weight: 600;
  text-decoration: none;
  color: #222;
}

.logout button {
  background: none;
  border: 0;
  color: #666;
  font-size: 0.85rem;
  cursor: pointer;
}

main {
  max-width: 480px;
  margin: 1.25rem auto;
  padding: 0 1rem 4rem;
}

h1 {
  font-size: 1.35rem;
  margin: 0.5rem 0 1rem;
}

h2 {
  font-size: 1rem;
  color: #666;
  margin: 2rem 0 0.75rem;
  font-weight: 600;
}

.card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.card.center {
  align-items: center;
  text-align: center;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: #555;
}

input[type=password],
input[type=text],
select {
  font: inherit;
  padding: 0.7rem 0.75rem;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  background: #fff;
}

input[type=file] {
  font: inherit;
  padding: 0.5rem 0;
}

button, .btn-link {
  font: inherit;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid #d0d0d0;
  background: #fff;
  cursor: pointer;
  text-decoration: none;
  color: #222;
  display: inline-block;
  text-align: center;
}

button.primary {
  background: #222;
  color: #fff;
  border-color: #222;
  font-weight: 600;
}

button.danger {
  background: #fff;
  border-color: #e5e5e5;
  color: #aa3333;
  padding: 0.25rem 0.6rem;
  font-size: 1rem;
  line-height: 1;
}

.error {
  color: #aa3333;
  font-size: 0.85rem;
  margin: 0;
}

.qr {
  width: 240px;
  height: 240px;
  image-rendering: pixelated;
}

.filename {
  font-weight: 600;
  margin: 0;
  word-break: break-all;
}

.dim {
  color: #888;
  font-size: 0.85rem;
  margin: 0;
}

.url-row {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}

.url-row input {
  flex: 1;
  font-size: 0.8rem;
}

.shares {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.shares li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  padding: 0.6rem 0.85rem;
}

.shares li.inactive {
  opacity: 0.55;
}

.share-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.share-meta a {
  color: #222;
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-link {
  margin-top: 0.5rem;
}

nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

nav a {
  color: #555;
  text-decoration: none;
  font-size: 0.85rem;
}

progress {
  width: 100%;
  height: 14px;
  border-radius: 8px;
  overflow: hidden;
  -webkit-appearance: none;
  appearance: none;
  border: 1px solid #d0d0d0;
  background: #f0f0f0;
}

progress::-webkit-progress-bar { background: #f0f0f0; }
progress::-webkit-progress-value { background: #222; }
progress::-moz-progress-bar { background: #222; }

.preview {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 8px;
  background: #000;
}

.btn-primary {
  display: inline-block;
  padding: 0.85rem 1.4rem;
  background: #222;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
}
