:root {
    --border: #d9d9d9;
    --bg-muted: #f5f7ff;
    --text-muted: #666;
    --accent: #2f4f8f;
    --danger: #a10202;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    line-height: 1.5;
}

/* --- karkasas --- */

.topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-muted);
}

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

.nav {
    display: flex;
    gap: 14px;
    font-size: 14px;
}

.nav a { color: var(--accent); }

.spacer { flex: 1; }

.who {
    color: var(--text-muted);
    font-size: 14px;
}

.logout {
    color: var(--accent);
    font-size: 14px;
}

main { padding: 16px; }

.empty { color: var(--text-muted); }

.items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.items li {
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
}

/* --- eBay paemimas --- */

.lookup {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
}

.lookup input {
    flex: 1;
    max-width: 520px;
    padding: 8px 11px;
    font-size: 15px;
    border: 1px solid var(--border);
    border-radius: 4px;
}

.lookup button {
    padding: 8px 18px;
    font-size: 15px;
    color: #fff;
    background: var(--accent);
    border: 0;
    border-radius: 4px;
    cursor: pointer;
}

.card {
    max-width: 1100px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
}

.card h2 { margin-top: 0; font-size: 19px; }
.card h3 { margin: 20px 0 8px; font-size: 15px; color: var(--text-muted); }

.facts {
    border-collapse: collapse;
    width: 100%;
    max-width: 640px;
}

.facts th,
.facts td {
    padding: 5px 10px 5px 0;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--border);
    font-weight: normal;
}

.facts th {
    width: 190px;
    color: var(--text-muted);
    font-size: 14px;
}

.cond {
    max-width: 640px;
    padding: 10px;
    background: var(--bg-muted);
    border-radius: 4px;
    font-size: 14px;
}

.shots {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.shots img {
    height: 150px;
    border: 1px solid var(--border);
    border-radius: 3px;
}

.sub {
    margin-top: -6px;
    color: var(--text-muted);
    font-size: 14px;
}

.actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 14px 0 4px;
}

.actions button {
    padding: 7px 16px;
    font-size: 14px;
    color: #fff;
    background: var(--accent);
    border: 0;
    border-radius: 4px;
    cursor: pointer;
}

.linked-count { font-size: 14px; }

/* --- Discogs kandidatai --- */

.cand {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    max-width: 1100px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 5px;
    margin-bottom: 8px;
}

.cand-bad {
    background: #fff8f8;
    border-color: #e9c5c5;
}

.cand-cover {
    flex: 0 0 90px;
    height: 90px;
    background: var(--bg-muted);
    border-radius: 3px;
    overflow: hidden;
}

.cand-cover img {
    width: 90px;
    height: 90px;
    object-fit: cover;
}

.cand-body { flex: 1; min-width: 0; }

.cand-title { font-weight: 600; margin-bottom: 3px; }

.cand-meta {
    color: var(--text-muted);
    font-size: 13px;
}

.why {
    margin: 6px 0 0;
    padding-left: 18px;
    font-size: 12px;
    color: var(--text-muted);
}

.cand-action {
    flex: 0 0 150px;
    text-align: right;
}

.score {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 6px;
}

.cand-action button {
    width: 100%;
    padding: 7px;
    font-size: 14px;
    color: #fff;
    background: var(--accent);
    border: 0;
    border-radius: 4px;
    cursor: pointer;
}

.cand-action button.danger { background: var(--danger); }

.tick {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 3px;
    cursor: pointer;
}

.tick-warn { color: var(--danger); }

.tag {
    display: inline-block;
    padding: 1px 6px;
    font-size: 11px;
    background: var(--bg-muted);
    border-radius: 3px;
    margin-left: 4px;
}

.tag-done { background: #dff0e0; color: #1c6b2b; }
.tag-warn { background: #fdeaea; color: var(--danger); }

/* --- koreguojama paieska --- */

.search-box {
    max-width: 1100px;
    padding: 12px 14px;
    margin-bottom: 16px;
    background: var(--bg-muted);
    border: 1px solid var(--border);
    border-radius: 5px;
}

.search-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 10px;
}

.search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 8px 12px;
}

.search-grid label {
    display: flex;
    flex-direction: column;
    font-size: 12px;
    color: var(--text-muted);
}

.search-grid input {
    margin-top: 2px;
    padding: 6px 8px;
    font-size: 14px;
    color: #000;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 3px;
}

.search-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.search-actions button {
    padding: 7px 20px;
    font-size: 14px;
    color: #fff;
    background: var(--accent);
    border: 0;
    border-radius: 4px;
    cursor: pointer;
}

.photos-link {
    display: block;
    font-size: 12px;
    margin-bottom: 6px;
}

/* --- nuotrauku palyginimas --- */

.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 6px;
}

.gallery img {
    height: 300px;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: var(--bg-muted);
}

/* --- issaugotu daiktu sarasas --- */

.row-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    max-width: 1300px;
    padding: 10px;
    border-bottom: 1px solid var(--border);
}

.row-cover {
    flex: 0 0 80px;
    height: 80px;
}

.row-cover img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 1px solid var(--border);
    border-radius: 3px;
}

.row-main { flex: 1; min-width: 0; }

.row-title { font-weight: 600; margin-bottom: 2px; }

.row-link {
    margin-top: 5px;
    padding-left: 10px;
    border-left: 3px solid var(--bg-muted);
    font-size: 14px;
}

.row-price {
    flex: 0 0 150px;
    text-align: right;
}

.price-now {
    font-size: 17px;
    font-weight: 700;
}

.row-side {
    flex: 0 0 150px;
    text-align: right;
}

details { margin-top: 20px; }
details summary { cursor: pointer; color: var(--text-muted); font-size: 14px; }

details pre {
    max-height: 420px;
    overflow: auto;
    padding: 12px;
    background: #1e1e1e;
    color: #d4d4d4;
    border-radius: 4px;
    font-size: 12px;
}

/* --- prisijungimas --- */

.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-muted);
}

.login-box {
    width: 100%;
    max-width: 320px;
    padding: 28px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
}

.login-box h1 {
    margin: 0 0 20px;
    font-size: 22px;
    text-align: center;
}

.login-box input {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    padding: 9px 11px;
    font-size: 15px;
    border: 1px solid var(--border);
    border-radius: 4px;
}

.login-box input:focus {
    outline: 2px solid var(--accent);
    outline-offset: -1px;
}

.login-box button {
    width: 100%;
    padding: 10px;
    font-size: 15px;
    color: #fff;
    background: var(--accent);
    border: 0;
    border-radius: 4px;
    cursor: pointer;
}

.login-box button:hover { background: #24406f; }

.error {
    margin-bottom: 14px;
    padding: 9px 11px;
    font-size: 14px;
    color: var(--danger);
    background: #fdeaea;
    border-radius: 4px;
}

.notice {
    margin-bottom: 14px;
    padding: 9px 11px;
    font-size: 14px;
    background: var(--bg-muted);
    border-radius: 4px;
}

.ok  { color: #1c6b2b; font-weight: 600; }
.bad { color: var(--danger); font-weight: 600; }

.inline-form { margin-top: 16px; }

.inline-form button {
    padding: 8px 18px;
    font-size: 15px;
    color: #fff;
    background: var(--accent);
    border: 0;
    border-radius: 4px;
    cursor: pointer;
}

.inline-form button.danger { background: var(--danger); }
