body { font-family: system-ui, sans-serif; margin: 0; background: #f2f4f7; color: #1c2430; }
header { background: #1f3a5f; color: #fff; padding: 12px 20px; }
header a { color: #fff; text-decoration: none; font-size: 1.3rem; font-weight: 600; }
main { max-width: 1600px; margin: 20px auto; padding: 0 16px; }
.card { background: #fff; border-radius: 8px; padding: 16px; margin-bottom: 18px; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
form.search { display: flex; gap: 8px; }
input[type=text] { width: 100%; box-sizing: border-box; font-size: 1.1rem; padding: 10px 44px 10px 10px; border: 1px solid #99a; border-radius: 6px; }
.search-box { position: relative; flex: 1; }
.clear-btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; line-height: 30px; text-align: center; border-radius: 50%; background: #dde1e8; color: #333; text-decoration: none; font-size: 1.3rem; font-weight: 700; }
.clear-btn:hover { background: #c3c9d4; }
textarea { width: 100%; box-sizing: border-box; font-size: 1.1rem; padding: 10px; border: 1px solid #99a; border-radius: 6px; min-height: 160px; }
.btn { display: inline-block; font-size: 1.1rem; padding: 10px 18px; border: 0; border-radius: 6px; background: #1f6fd1; color: #fff; text-decoration: none; cursor: pointer; }
.btn.grey { background: #6b7684; }
.result { display: flex; align-items: center; gap: 14px; margin: 8px 0; }
.result .btn { min-width: 90px; text-align: center; }
.result span { color: #445; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table { border-collapse: collapse; width: 100%; table-layout: fixed; }
th, td { border: 1px solid #ccd; padding: 0; text-align: left; overflow: hidden; }
th { background: #e4e8ef; padding: 6px 4px; text-align: center; }
/* Hyllynumerosarake kapea, lokerot A-E jakavat loput tilasta tasan */
th:first-child { width: 2.6rem; }
td a { display: block; box-sizing: border-box; height: 2.6em; padding: 6px 8px; line-height: 1.4; color: inherit; text-decoration: none; font-size: .85rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
td a:hover { background: #dbe9ff; }
td.full a { background: #eef7ea; }
.loc { font-size: 2rem; font-weight: 700; margin: 0 0 10px; }
.actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.error { background: #fde8e6; color: #8a1c14; padding: 12px; border-radius: 6px; }

/* Pienet näytöt (puhelin) */
@media (max-width: 600px) {
  main { padding: 0 6px; margin: 10px auto; }
  .card { padding: 10px; }
  th { padding: 4px 2px; font-size: .8rem; }
  th:first-child { width: 1.9rem; }
  td a { padding: 4px 3px; font-size: .68rem; height: 3em; }
  .btn { font-size: 1rem; padding: 10px 14px; }
}
