body {
    font-family: Arial, sans-serif;
    margin: 0;
    background: #f6f8fb;
    color: #1f2933;
}

a, a:visited {
    color: #0b5ed7;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: #1f2933;
    color: #fff;
}

.topbar .actions button {
    margin-right: 10px;
    padding: 8px 14px;
    border: none;
    background: #0b5ed7;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
}

main {
    padding: 20px;
}

.login-page {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 20% 20%, #eef2ff, #f6f8fb 40%);
}

.login-card {
    width: 340px;
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.login-card form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
    color: #374151;
}

.login-card input {
    padding: 10px;
    border: 1px solid #cbd2d9;
    border-radius: 6px;
}

.login-card button {
    padding: 10px 14px;
    border: none;
    background: #0b5ed7;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.error-text {
    color: #b91c1c;
    font-size: 13px;
    min-height: 18px;
}

.products {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.product-card {
    background: #fff;
    border: 1px solid #e0e7f1;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.product-header {
    display: flex;
    gap: 16px;
}

.product-meta {
    flex: 1;
}

.product-header img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    background: #f0f4f8;
    border-radius: 8px;
}

.product-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.product-header .price {
    font-size: 20px;
    font-weight: bold;
    margin: 4px 0;
}

.product-header .description {
    color: #3d4a59;
    margin: 6px 0;
    line-height: 1.4;
}

.product-header .meta {
    color: #52616b;
}

.product-actions button {
    padding: 8px 12px;
    border: none;
    background: #198754;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
}

.competitors table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.competitors {
    overflow-x: auto;
}

.competitors th, .competitors td {
    padding: 8px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.competitors th {
    background: #f0f4f8;
    font-weight: 600;
}

.competitors th.sortable {
    cursor: pointer;
}

.diff-positive {
    color: #0f5132 !important;
    font-weight: 700;
}

.diff-negative {
    color: #b91c1c !important;
    font-weight: 700;
}

button.btn-crawl, button.btn-edit {
    padding: 6px 10px;
    border: none;
    margin-right: 4px;
    border-radius: 4px;
    background: #0b5ed7;
    color: #fff;
    cursor: pointer;
}

input.edit-link, .add-competitor-form input {
    padding: 6px 8px;
    margin-right: 6px;
    border: 1px solid #cbd2d9;
    border-radius: 4px;
}

.add-competitor-form button {
    padding: 6px 12px;
    border: none;
    background: #198754;
    color: #fff;
    border-radius: 4px;
}

#status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #d1e7ff;
}

.competitors-table .thumb {
    width: 48px;
    height: 48px;
    object-fit: contain;
    background: #f3f4f6;
    border-radius: 6px;
}

.topbar .actions .secondary {
    background: #475569;
}

.spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(209, 231, 255, 0.5);
    border-top-color: #d1e7ff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}

.status-indicator.loading .spinner {
    display: inline-block;
}

.status-indicator.loading .status-text {
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
