* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.5;
}

/* Auth */
.auth-container {
    max-width: 400px;
    margin: 80px auto;
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.auth-container h1 { text-align: center; color: #2563eb; margin-bottom: 5px; }
.auth-container h2 { text-align: center; font-weight: 400; color: #666; margin-bottom: 30px; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 4px; font-weight: 500; }
.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}
.form-group input:focus { outline: none; border-color: #2563eb; }

.auth-link { text-align: center; margin-top: 15px; color: #666; }
.auth-link a { color: #2563eb; }

.error-msg {
    margin-top: 15px;
    padding: 10px;
    background: #fef2f2;
    color: #dc2626;
    border-radius: 6px;
    text-align: center;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}
.btn-primary { background: #2563eb; color: #fff; }
.btn-primary:hover { background: #1d4ed8; }
.btn-primary:disabled { background: #93c5fd; cursor: not-allowed; }
.btn-secondary { background: #e5e7eb; color: #374151; }
.btn-secondary:hover { background: #d1d5db; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-info { background: #0891b2; color: #fff; width: 30px; height: 30px; padding: 0; border-radius: 50%; font-style: italic; }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-back { text-decoration: none; color: #2563eb; background: none; padding: 0; }

/* Dashboard */
.dashboard-container { max-width: 900px; margin: 0 auto; padding: 20px; }
.dashboard-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.dashboard-actions { margin-bottom: 20px; }

.price-check-card {
    background: #fff;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.pc-header { display: flex; justify-content: space-between; align-items: center; }
.pc-header h3 { font-size: 16px; }
.pc-actions { display: flex; gap: 8px; margin-top: 10px; }

.badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}
.badge-draft { background: #fef3c7; color: #92400e; }
.badge-manual { background: #dbeafe; color: #1e40af; }
.badge-automation { background: #e0e7ff; color: #3730a3; }
.badge-completed_auto { background: #d1fae5; color: #065f46; }
.badge-confirmationM { background: #fce7f3; color: #9d174d; }
.badge-completed { background: #d1fae5; color: #065f46; }

/* Page header */
.page-header {
    display: flex; align-items: center; gap: 15px;
    padding: 15px 20px; background: #fff;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 20px;
}

/* Search */
.search-panel { padding: 0 20px; margin-bottom: 20px; }
.search-row { display: flex; gap: 10px; }
.search-input { flex: 1; padding: 10px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; }

/* Content */
.content-split { display: flex; gap: 20px; padding: 0 20px; }
.products-results { flex: 2; }
.collection-panel { flex: 1; background: #fff; padding: 15px; border-radius: 8px; }

.product-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 15px; background: #fff; margin-bottom: 5px;
    border-radius: 6px; border: 1px solid #e5e7eb;
}
.product-row.selected { border-color: #2563eb; background: #eff6ff; }
.product-info { display: flex; flex-direction: column; gap: 2px; }
.price { color: #059669; font-weight: 600; }

/* Tables */
.items-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; }
.items-table th { background: #f9fafb; padding: 10px 15px; text-align: left; font-weight: 600; border-bottom: 2px solid #e5e7eb; }
.items-table td { padding: 10px 15px; border-bottom: 1px solid #f3f4f6; }
.items-table tr:hover { background: #f9fafb; }
.items-list { padding: 0 20px; }

/* Modal */
.modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000;
}
.modal-content {
    background: #fff; padding: 30px; border-radius: 12px;
    min-width: 400px; max-width: 600px; max-height: 80vh; overflow-y: auto;
}
.modal-content h3 { margin-bottom: 15px; }
.modal-content input { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 6px; margin-bottom: 15px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

.history-entry { padding: 8px 0; border-bottom: 1px solid #f3f4f6; font-size: 14px; }
