* { box-sizing: border-box; }
body {
  font-family: -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  background: #f4f5f7;
  color: #1a1a1a;
}
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background: #14213d;
}
.login-box {
  background: #fff;
  padding: 40px;
  border-radius: 12px;
  width: 320px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.login-box h1 { font-size: 20px; margin-bottom: 20px; }
.login-box form { display: flex; flex-direction: column; gap: 6px; }
.login-box input {
  padding: 10px;
  margin-bottom: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
}
.login-box button, .btn, .download-btn {
  background: #14213d;
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
  display: inline-block;
}
.error { color: #c0392b; font-size: 14px; }
.topbar {
  background: #fff;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e2e2e2;
}
.topbar h1 { font-size: 18px; margin: 0; }
.back { text-decoration: none; color: #14213d; margin-right: 8px; }
.link-btn {
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  text-decoration: underline;
}
.container { max-width: 900px; margin: 24px auto; padding: 0 16px; }
.card {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.card h2 { margin-top: 0; font-size: 16px; }
.inline-form { display: flex; gap: 8px; }
.inline-form input { flex: 1; padding: 10px; border: 1px solid #ccc; border-radius: 6px; }
.stacked-form { display: flex; flex-direction: column; gap: 8px; max-width: 420px; }
.stacked-form.small { max-width: 100%; }
.stacked-form.wide { max-width: 640px; }
.stacked-form input, .stacked-form select, .stacked-form textarea {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  width: 100%;
}
.stacked-form textarea { resize: vertical; }
.stacked-form label { font-size: 13px; color: #555; }
.stacked-form .hint { font-weight: normal; color: #999; }
.stacked-form .row { display: flex; gap: 12px; }
.stacked-form .row > div { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.color-field { display: flex; gap: 6px; align-items: center; }
.color-field input[type="color"] {
  width: 40px;
  height: 36px;
  padding: 2px;
  flex: 0 0 auto;
  cursor: pointer;
}
.color-field input[type="text"] {
  flex: 1;
  font-family: monospace;
  text-transform: uppercase;
}
.item-list { display: flex; flex-direction: column; gap: 20px; }
.item-row {
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: 16px;
  align-items: start;
  padding: 16px 0;
  border-bottom: 1px solid #eee;
}
.item-row:last-child { border-bottom: none; }
.item-thumb {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
}
.client-list { list-style: none; padding: 0; margin: 0; }
.client-list li {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
  flex-wrap: wrap;
  gap: 10px;
}
.client-list li:last-child { border-bottom: none; }
.muted { color: #888; }
.muted.small { font-size: 12px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
.duplicate-details { position: relative; }
.duplicate-details summary { list-style: none; cursor: pointer; }
.duplicate-details summary::-webkit-details-marker { display: none; }
.duplicate-details[open] summary { background: #ddd; }
.duplicate-form {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 260px;
  z-index: 10;
}
.duplicate-form input[type="text"] {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 13px;
}
.checkbox-label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: #555; }
.checkbox-label input { width: auto; }
.btn.secondary { background: #eee; color: #14213d; }
.btn.danger, button.danger { background: #c0392b; }
.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.item-card {
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 10px;
}
.item-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 8px;
}
.item-actions { display: flex; gap: 6px; margin-top: 8px; }
.item-actions form { display: inline; }
.item-actions button {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  background: #fff;
  cursor: pointer;
}
